Skip to content

Commit f7f11d8

Browse files
committed
1 parent cc425d8 commit f7f11d8

File tree

10 files changed

+21
-23
lines changed

10 files changed

+21
-23
lines changed

Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,10 @@ variable {J : Type w}
6060
inductive WalkingParallelFamily (J : Type w) : Type w
6161
| zero : WalkingParallelFamily J
6262
| one : WalkingParallelFamily J
63+
deriving DecidableEq, Inhabited
6364

6465
open WalkingParallelFamily
6566

66-
instance : DecidableEq (WalkingParallelFamily J)
67-
| zero, zero => isTrue rfl
68-
| zero, one => isFalse fun t => WalkingParallelFamily.noConfusion t
69-
| one, zero => isFalse fun t => WalkingParallelFamily.noConfusion t
70-
| one, one => isTrue rfl
71-
72-
instance : Inhabited (WalkingParallelFamily J) :=
73-
⟨zero⟩
74-
7567
-- Don't generate unnecessary `sizeOf_spec` lemma which the `simpNF` linter will complain about.
7668
set_option genSizeOfSpec false in
7769
/-- The type family of morphisms for the diagram indexing a wide (co)equalizer. -/

Mathlib/Combinatorics/Quiver/Path.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def decidableEqBddPathsOfDecidableEq (n : ℕ) (h₁ : DecidableEq V)
270270
| _, _, .nil, .nil => isTrue rfl
271271
| _, _, .nil, .cons _ _
272272
| _, _, .cons _ _, .nil =>
273-
isFalse fun h => Quiver.Path.noConfusion rfl (heq_of_eq (Subtype.mk.inj h))
273+
isFalse fun h => Quiver.Path.noConfusion rfl .rfl .rfl .rfl (heq_of_eq (Subtype.mk.inj h))
274274
| _, _, .cons (b := v') p' α, .cons (b := v'') q' β =>
275275
match v', v'', h₁ v' v'' with
276276
| _, _, isTrue (Eq.refl _) =>

Mathlib/Data/List/Infix.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ theorem mem_inits : ∀ s t : List α, s ∈ inits t ↔ s <+: t
204204
match s, mi with
205205
| [], ⟨_, rfl⟩ => Or.inl rfl
206206
| b :: s, ⟨r, hr⟩ =>
207-
(List.noConfusion hr) fun ba (st : s ++ r = t) =>
208-
Or.inr <| by rw [ba]; exact ⟨_, (mem_inits _ _).2 ⟨_, st⟩, rfl⟩⟩
207+
(List.noConfusion rfl (heq_of_eq hr)) fun ba (st : s ++ r t) =>
208+
Or.inr <| by rw [eq_of_heq ba]; exact ⟨_, (mem_inits _ _).2 ⟨_, eq_of_heq st⟩, rfl⟩⟩
209209

210210
@[simp]
211211
theorem mem_tails : ∀ s t : List α, s ∈ tails t ↔ s <:+ t
@@ -222,7 +222,8 @@ theorem mem_tails : ∀ s t : List α, s ∈ tails t ↔ s <:+ t
222222
fun e =>
223223
match s, t, e with
224224
| _, t, ⟨[], rfl⟩ => Or.inl rfl
225-
| s, t, ⟨b :: l, he⟩ => List.noConfusion he fun _ lt => Or.inr ⟨l, lt⟩⟩
225+
| s, t, ⟨b :: l, he⟩ =>
226+
List.noConfusion rfl (heq_of_eq he) fun _ lt => Or.inr ⟨l, eq_of_heq lt⟩⟩
226227

227228
theorem inits_cons (a : α) (l : List α) : inits (a :: l) = [] :: l.inits.map fun t => a :: t := by
228229
simp

Mathlib/Data/Part.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def ofOption : Option α → Part α
296296

297297
@[simp]
298298
theorem mem_ofOption {a : α} : ∀ {o : Option α}, a ∈ ofOption o ↔ a ∈ o
299-
| Option.none => ⟨fun h => h.fst.elim, fun h => Option.noConfusion h
299+
| Option.none => ⟨fun h => h.fst.elim, fun h => Option.noConfusion rfl (heq_of_eq h)
300300
| Option.some _ => ⟨fun h => congr_arg Option.some h.snd, fun h => ⟨trivial, Option.some.inj h⟩⟩
301301

302302
@[simp]

Mathlib/Data/Prod/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lemma swap_eq_iff_eq_swap {x : α × β} {y : β × α} : x.swap = y ↔ x = y.s
2727

2828
def mk.injArrow {x₁ : α} {y₁ : β} {x₂ : α} {y₂ : β} :
2929
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁ = x₂ → y₁ = y₂ → P) → P :=
30-
fun h₁ _ h₂ ↦ Prod.noConfusion h₁ h₂
30+
fun h₁ _ h₂ ↦ Prod.noConfusion rfl rfl (heq_of_eq h₁) fun h₃ h₄ ↦ h₂ (eq_of_heq h₃) (eq_of_heq h₄)
3131

3232
@[simp]
3333
theorem mk.eta : ∀ {p : α × β}, (p.1, p.2) = p

Mathlib/Data/Prod/PProd.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ namespace PProd
2323

2424
def mk.injArrow {α : Type*} {β : Type*} {x₁ : α} {y₁ : β} {x₂ : α} {y₂ : β} :
2525
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁ = x₂ → y₁ = y₂ → P) → P :=
26-
fun h₁ _ h₂ ↦ Prod.noConfusion h₁ h₂
26+
fun h₁ _ h₂ ↦ Prod.noConfusion rfl rfl (heq_of_eq h₁)
27+
(fun h₃ h₄ ↦ h₂ (eq_of_heq h₃) (eq_of_heq h₄))
2728

2829
@[simp]
2930
theorem mk.eta {p : PProd α β} : PProd.mk p.1 p.2 = p :=

Mathlib/Data/Set/Image.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range S
747747
IsCompl.of_le
748748
(by
749749
rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, h⟩⟩
750-
exact Sum.noConfusion h)
750+
exact Sum.noConfusion rfl rfl (heq_of_eq h))
751751
(by rintro (x | y) - <;> [left; right] <;> exact mem_range_self _)
752752

753753
@[simp]

Mathlib/Data/Sigma/Basic.lean

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ instance instDecidableEqSigma [h₁ : DecidableEq α] [h₂ : ∀ a, DecidableEq
5151
| _, b₁, _, b₂, isTrue (Eq.refl _) =>
5252
match b₁, b₂, h₂ _ b₁ b₂ with
5353
| _, _, isTrue (Eq.refl _) => isTrue rfl
54-
| _, _, isFalse n => isFalse fun h ↦ Sigma.noConfusion h fun _ e₂ ↦ n <| eq_of_heq e₂
55-
| _, _, _, _, isFalse n => isFalse fun h ↦ Sigma.noConfusion h fun e₁ _ ↦ n e₁
54+
| _, _, isFalse n => isFalse fun h ↦
55+
Sigma.noConfusion rfl .rfl (heq_of_eq h) fun _ e₂ ↦ n (eq_of_heq e₂)
56+
| _, _, _, _, isFalse n => isFalse fun h ↦
57+
Sigma.noConfusion rfl .rfl (heq_of_eq h) fun e₁ _ ↦ n (eq_of_heq e₁)
5658

5759
theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
5860
Sigma.mk a₁ b₁ = ⟨a₂, b₂⟩ ↔ a₁ = a₂ ∧ b₁ ≍ b₂ := by simp
@@ -228,8 +230,10 @@ instance decidableEq [h₁ : DecidableEq α] [h₂ : ∀ a, DecidableEq (β a)]
228230
| _, b₁, _, b₂, isTrue (Eq.refl _) =>
229231
match b₁, b₂, h₂ _ b₁ b₂ with
230232
| _, _, isTrue (Eq.refl _) => isTrue rfl
231-
| _, _, isFalse n => isFalse fun h ↦ PSigma.noConfusion h fun _ e₂ ↦ n <| eq_of_heq e₂
232-
| _, _, _, _, isFalse n => isFalse fun h ↦ PSigma.noConfusion h fun e₁ _ ↦ n e₁
233+
| _, _, isFalse n => isFalse fun h ↦
234+
PSigma.noConfusion rfl .rfl (heq_of_eq h) fun _ e₂ ↦ n (eq_of_heq e₂)
235+
| _, _, _, _, isFalse n => isFalse fun h ↦
236+
PSigma.noConfusion rfl .rfl (heq_of_eq h) fun e₁ _ ↦ n (eq_of_heq e₁)
233237

234238
theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
235239
@PSigma.mk α β a₁ b₁ = @PSigma.mk α β a₂ b₂ ↔ a₁ = a₂ ∧ b₁ ≍ b₂ :=

Mathlib/GroupTheory/FreeGroup/Reduce.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ instance : DecidableEq (FreeGroup α) :=
289289
-- of equation lemmas.
290290
instance Red.decidableRel : DecidableRel (@Red α)
291291
| [], [] => isTrue Red.refl
292-
| [], _hd2 :: _tl2 => isFalse fun H => List.noConfusion (Red.nil_iff.1 H)
292+
| [], _hd2 :: _tl2 => isFalse fun H => List.noConfusion rfl (heq_of_eq (Red.nil_iff.1 H))
293293
| (x, b) :: tl, [] =>
294294
match Red.decidableRel tl [(x, not b)] with
295295
| isTrue H => isTrue <| Red.trans (Red.cons_cons H) <| (@Red.Step.not _ [] [] _ _).to_red

Mathlib/Logic/Unique.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ namespace Option
242242

243243
/-- `Option α` is a `Subsingleton` if and only if `α` is empty. -/
244244
theorem subsingleton_iff_isEmpty {α : Type u} : Subsingleton (Option α) ↔ IsEmpty α :=
245-
fun h ↦ ⟨fun x ↦ Option.noConfusion <| @Subsingleton.elim _ h x none⟩,
245+
fun h ↦ ⟨fun x ↦ Option.noConfusion rfl (heq_of_eq (@Subsingleton.elim _ h x none))⟩,
246246
fun h ↦ ⟨fun x y ↦
247247
Option.casesOn x (Option.casesOn y rfl fun x ↦ h.elim x) fun x ↦ h.elim x⟩⟩
248248

0 commit comments

Comments
 (0)