Skip to content

Commit 52d95f2

Browse files
kim-emScott Morrison
andcommitted
chore: disable relaxedAutoImplicit (#5277)
We disable the "relaxed" auto-implicit feature, so only single character identifiers become eligible as auto-implicits. See discussion on [zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Auto-implicits) and [2](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.60autoImplicit.20true.60.20is.20evil). Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>
1 parent 99b2305 commit 52d95f2

File tree

19 files changed

+46
-26
lines changed

19 files changed

+46
-26
lines changed

Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ that are prime and do not contain the irrelevant ideal. -/
5757
structure ProjectiveSpectrum where
5858
asHomogeneousIdeal : HomogeneousIdeal 𝒜
5959
isPrime : asHomogeneousIdeal.toIdeal.IsPrime
60-
not_irrelevant_le : ¬HomogeneousIdeal.irrelevant 𝒜 ≤ as_homogeneous_ideal
60+
not_irrelevant_le : ¬HomogeneousIdeal.irrelevant 𝒜 ≤ asHomogeneousIdeal
6161
#align projective_spectrum ProjectiveSpectrum
6262

6363
attribute [instance] ProjectiveSpectrum.isPrime

Mathlib/CategoryTheory/Limits/FilteredColimitCommutesFiniteLimit.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ namespace CategoryTheory.Limits
3939

4040
variable {J K : Type v} [SmallCategory J] [SmallCategory K]
4141

42-
/-- `(G ⋙ lim).obj S` = `limit (G.obj S)` definitionally, so this
42+
/-- `(G ⋙ lim).obj j` = `limit (G.obj j)` definitionally, so this
4343
is just a variant of `limit_ext'`. -/
44-
@[ext] lemma comp_lim_obj_ext {G : J ⥤ K ⥤ Type v} (x y : (G ⋙ lim).obj S) (w : ∀ (j : K),
45-
limit.π (G.obj S) j x = limit.π (G.obj S) j y) : x = y :=
44+
@[ext] lemma comp_lim_obj_ext {j : J} {G : J ⥤ K ⥤ Type v} (x y : (G ⋙ lim).obj j)
45+
(w : ∀ (k : K), limit.π (G.obj j) k x = limit.π (G.obj j) k y) : x = y :=
4646
limit_ext' _ x y w
4747

4848
variable (F : J × K ⥤ Type v)
@@ -110,7 +110,7 @@ theorem colimitLimitToLimitColimit_injective :
110110
Finset.mem_image, heq_iff_eq]
111111
refine' ⟨j, _⟩
112112
simp only [heq_iff_eq] ))
113-
have gH :
113+
have gH :
114114
∀ j, (⟨ky, k j, kyO, kjO j, g j⟩ : Σ' (X Y : K) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H :=
115115
fun j =>
116116
Finset.mem_union.mpr

Mathlib/Computability/TuringMachine.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,8 @@ theorem stepAux_read (f : Γ → Stmt'₁) (v : σ) (L R : ListBlank Γ) :
18501850
rfl
18511851
#align turing.TM1to1.step_aux_read Turing.TM1to1.stepAux_read
18521852

1853-
theorem tr_respects : Respects (step M) (step (tr enc dec M)) fun c₁ c₂ ↦ trCfg enc enc₀ c₁ = c₂ :=
1853+
theorem tr_respects {enc₀} :
1854+
Respects (step M) (step (tr enc dec M)) fun c₁ c₂ ↦ trCfg enc enc₀ c₁ = c₂ :=
18541855
fun_respects.2 fun ⟨l₁, v, T⟩ ↦ by
18551856
obtain ⟨L, R, rfl⟩ := T.exists_mk'
18561857
cases' l₁ with l₁

Mathlib/Data/HashMap.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ end Std.HashMap
3535
namespace Std.RBSet
3636

3737
/-- Insert all elements of a list into an `RBSet`. -/
38-
def insertList (m : RBSet α cmp) (L : List α) : RBSet α cmp :=
38+
def insertList {cmp} (m : RBSet α cmp) (L : List α) : RBSet α cmp :=
3939
L.foldl (fun m a => m.insert a) m
4040

4141
end Std.RBSet

Mathlib/Data/List/Range.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace List
3131

3232
variable {α : Type u}
3333

34-
@[simp] theorem range'_one : range' s 1 step = [s] := rfl
34+
@[simp] theorem range'_one {step} : range' s 1 step = [s] := rfl
3535

3636
#align list.length_range' List.length_range'
3737
#align list.range'_eq_nil List.range'_eq_nil

Mathlib/Data/Seq/Computation.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,11 +1253,15 @@ def LiftRelAux (R : α → β → Prop) (C : Computation α → Computation β
12531253
--porting note: was attribute [simp] LiftRelAux but right now `simp` on defs is a Lean 4 catastrophe
12541254
-- Instead we add the equation lemmas and tag them @[simp]
12551255
@[simp] lemma LiftRelAux_inl_inl : LiftRelAux R C (Sum.inl a) (Sum.inl b) = R a b := rfl
1256-
@[simp] lemma LiftRelAux_inl_inr : LiftRelAux R C (Sum.inl a) (Sum.inr cb) = ∃ b, b ∈ cb ∧ R a b :=
1256+
@[simp] lemma LiftRelAux_inl_inr {cb} :
1257+
LiftRelAux R C (Sum.inl a) (Sum.inr cb) = ∃ b, b ∈ cb ∧ R a b :=
12571258
rfl
1258-
@[simp] lemma LiftRelAux_inr_inl : LiftRelAux R C (Sum.inr ca) (Sum.inl b) = ∃ a, a ∈ ca ∧ R a b :=
1259+
@[simp] lemma LiftRelAux_inr_inl {ca} :
1260+
LiftRelAux R C (Sum.inr ca) (Sum.inl b) = ∃ a, a ∈ ca ∧ R a b :=
1261+
rfl
1262+
@[simp] lemma LiftRelAux_inr_inr {ca cb} :
1263+
LiftRelAux R C (Sum.inr ca) (Sum.inr cb) = C ca cb :=
12591264
rfl
1260-
@[simp] lemma LiftRelAux_inr_inr : LiftRelAux R C (Sum.inr ca) (Sum.inr cb) = C ca cb := rfl
12611265

12621266
@[simp]
12631267
theorem LiftRelAux.ret_left (R : α → β → Prop) (C : Computation α → Computation β → Prop) (a cb) :

Mathlib/Data/Stream/Init.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ theorem get?_take_succ (n : Nat) (s : Stream' α) :
607607
get?_take (Nat.lt_succ_self n)
608608
#align stream.nth_take_succ Stream'.get?_take_succ
609609

610-
@[simp] theorem dropLast_take : (Stream'.take n xs).dropLast = Stream'.take (n-1) xs := by
610+
@[simp] theorem dropLast_take {xs : Stream' α} :
611+
(Stream'.take n xs).dropLast = Stream'.take (n-1) xs := by
611612
cases n; case zero => simp
612613
case succ n => rw [take_succ', List.dropLast_concat, Nat.succ_sub_one]
613614

Mathlib/Init/Algebra/Classes.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class IsSymmOp (α : Type u) (β : Type v) (op : α → α → β) : Prop where
6868
class IsCommutative (α : Type u) (op : α → α → α) : Prop where
6969
comm : ∀ a b, op a b = op b a
7070

71-
instance [IsCommutative α op] : Lean.IsCommutative op where
71+
instance {op} [IsCommutative α op] : Lean.IsCommutative op where
7272
comm := IsCommutative.comm
7373

7474
instance isSymmOp_of_isCommutative (α : Type u) (op : α → α → α)
@@ -79,7 +79,7 @@ instance isSymmOp_of_isCommutative (α : Type u) (op : α → α → α)
7979
class IsAssociative (α : Type u) (op : α → α → α) : Prop where
8080
assoc : ∀ a b c, op (op a b) c = op a (op b c)
8181

82-
instance [IsAssociative α op] : Lean.IsAssociative op where
82+
instance {op} [IsAssociative α op] : Lean.IsAssociative op where
8383
assoc := IsAssociative.assoc
8484

8585
/-- A binary operation with a left identity. -/
@@ -90,7 +90,7 @@ class IsLeftId (α : Type u) (op : α → α → α) (o : outParam α) : Prop wh
9090
class IsRightId (α : Type u) (op : α → α → α) (o : outParam α) : Prop where
9191
right_id : ∀ a, op a o = a
9292

93-
instance [IsLeftId α op o] [IsRightId α op o] : Lean.IsNeutral op o where
93+
instance {op} [IsLeftId α op o] [IsRightId α op o] : Lean.IsNeutral op o where
9494
left_neutral := IsLeftId.left_id
9595
right_neutral := IsRightId.right_id
9696

@@ -109,7 +109,7 @@ class IsRightCancel (α : Type u) (op : α → α → α) : Prop where
109109
class IsIdempotent (α : Type u) (op : α → α → α) : Prop where
110110
idempotent : ∀ a, op a a = a
111111

112-
instance [IsIdempotent α op] : Lean.IsIdempotent op where
112+
instance {op} [IsIdempotent α op] : Lean.IsIdempotent op where
113113
idempotent := IsIdempotent.idempotent
114114

115115
--class IsLeftDistrib (α : Type u) (op₁ : α → α → α) (op₂ : outParam <| α → α → α) : Prop where

Mathlib/Order/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,11 +1367,11 @@ instance linearOrder: LinearOrder PUnit where
13671367
le_antisymm := by intros; rfl
13681368
lt_iff_le_not_le := by simp only [not_true, and_false, forall_const]
13691369

1370-
theorem max_eq : max a b = star :=
1370+
theorem max_eq : max a b = unit :=
13711371
rfl
13721372
#align punit.max_eq PUnit.max_eq
13731373

1374-
theorem min_eq : min a b = star :=
1374+
theorem min_eq : min a b = unit :=
13751375
rfl
13761376
#align punit.min_eq PUnit.min_eq
13771377

Mathlib/Order/OmegaCompletePartialOrder.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ if for every chain `c : chain α`, `f (⊔ i, c i) = ⊔ i, f (c i)`.
572572
This is just the bundled version of `OrderHom.continuous`. -/
573573
structure ContinuousHom extends OrderHom α β where
574574
/-- The underlying function of a `ContinuousHom` is continuous, i.e. it preserves `ωSup` -/
575-
cont : Continuous (OrderHom.mk toFun Monotone')
575+
cont : Continuous (OrderHom.mk toFun monotone')
576576
#align omega_complete_partial_order.continuous_hom OmegaCompletePartialOrder.ContinuousHom
577577

578578
attribute [nolint docBlame] ContinuousHom.toOrderHom
@@ -813,7 +813,7 @@ def apply : (α →𝒄 β) × α →𝒄 β where
813813
dsimp
814814
trans y.fst x.snd <;> [apply h.1; apply y.1.monotone h.2]
815815
cont := by
816-
intro _ c
816+
intro c
817817
apply le_antisymm
818818
· apply ωSup_le
819819
intro i
@@ -851,7 +851,7 @@ def flip {α : Type _} (f : α → β →𝒄 γ) :
851851
β →𝒄 α → γ where
852852
toFun x y := f y x
853853
monotone' x y h a := (f a).monotone h
854-
cont := by intro _ _; ext x; change f _ _ = _; rw [(f _).continuous]; rfl
854+
cont := by intro _; ext x; change f _ _ = _; rw [(f _).continuous]; rfl
855855
#align omega_complete_partial_order.continuous_hom.flip OmegaCompletePartialOrder.ContinuousHom.flip
856856
#align omega_complete_partial_order.continuous_hom.flip_apply OmegaCompletePartialOrder.ContinuousHom.flip_apply
857857

0 commit comments

Comments
 (0)