Skip to content

Commit 884f5d6

Browse files
committed
Explicitly invoke eqComm for proofs
1 parent a7cdef7 commit 884f5d6

File tree

27 files changed

+35
-47
lines changed

27 files changed

+35
-47
lines changed

Archive/Examples/IfNormalization/WithoutAesop.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def normalize' (l : AList (fun _ : ℕ => Bool)) :
9292
have := he₃ v
9393
simp_all? says
9494
simp_all only [normalized, Bool.and_eq_true, Bool.not_eq_eq_eq_not, Bool.not_true,
95-
Bool.false_eq, Bool.true_eq, AList.lookup_insert_eq_none, ne_eq, AList.lookup_insert,
96-
reduceCtorEq, imp_false]
95+
AList.lookup_insert_eq_none, ne_eq, AList.lookup_insert, reduceCtorEq, imp_false]
9796
obtain ⟨⟨⟨tn, tc⟩, tr⟩, td⟩ := ht₂
9897
split <;> rename_i h'
9998
· subst h'
@@ -105,8 +104,8 @@ def normalize' (l : AList (fun _ : ℕ => Bool)) :
105104
· subst h; simp_all
106105
· simp_all? says
107106
simp_all only [normalized, Bool.and_eq_true, Bool.not_eq_eq_eq_not, Bool.not_true,
108-
Bool.false_eq, Bool.true_eq, AList.lookup_insert_eq_none, ne_eq, not_false_eq_true,
109-
AList.lookup_insert_ne, implies_true]
107+
AList.lookup_insert_eq_none, ne_eq, not_false_eq_true, AList.lookup_insert_ne,
108+
implies_true]
110109
obtain ⟨⟨⟨en, ec⟩, er⟩, ed⟩ := he₂
111110
split at b <;> rename_i h'
112111
· subst h'; simp_all

Archive/Imo/Imo2024Q5.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ lemma winningStrategy_play_one_eq_none_or_play_two_eq_none_of_edge_zero (hN : 2
938938
lia
939939
· simp at hm
940940
exact m.notMem_monsterCells_of_fst_eq_zero rfl hm
941-
· simp at h
941+
· simp [eqComm] at h
942942
· dsimp only [Nat.reduceAdd, Nat.reduceDiv, Fin.mk_one] at hm
943943
have h1N : 1 ≤ N := by lia
944944
rw [m.mk_mem_monsterCells_iff_of_le (le_refl _) h1N] at hm

Mathlib/Algebra/CharP/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ lemma cast_eq_mod (k : ℕ) : (k : R) = (k % p : ℕ) :=
6868

6969
lemma cast_eq_iff_mod_eq [IsLeftCancelAdd R] : (a : R) = (b : R) ↔ a % p = b % p := by
7070
wlog! hle : a ≤ b
71-
· simpa [eq_comm] using (this _ _ hle.le)
71+
· simpa only [eq_comm] using (this _ _ hle.le)
7272
obtain ⟨c, rfl⟩ := Nat.exists_eq_add_of_le hle
7373
rw [Nat.cast_add, left_eq_add, CharP.cast_eq_zero_iff R p]
7474
constructor

Mathlib/Algebra/Exact.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ lemma exact_zero_iff_surjective {M N : Type*} (P : Type*)
289289
[AddCommGroup M] [AddCommGroup N] [AddCommMonoid P] [Module R N] [Module R M]
290290
[Module R P] (f : M →ₗ[R] N) :
291291
Function.Exact f (0 : N →ₗ[R] P) ↔ Function.Surjective f := by
292-
simp [range_eq_top, exact_iff]
292+
simp [range_eq_top, exact_iff, eqComm]
293293

294294
end LinearMap
295295

Mathlib/Algebra/Group/Pi/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ theorem Pi.update_eq_div_mul_mulSingle [∀ i, Group <| f i] (g : ∀ i : I, f i
300300
ext j
301301
rcases eq_or_ne i j with (rfl | h)
302302
· simp
303-
· simp [h]
303+
· simp [h, eqComm]
304304

305305
@[to_additive]
306306
theorem Pi.mulSingle_mul_mulSingle_eq_mulSingle_mul_mulSingle {M : Type*} [CommMonoid M]

Mathlib/Algebra/GroupWithZero/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ theorem mul_eq_zero : a * b = 0 ↔ a = 0 ∨ b = 0 :=
308308
/-- If `α` has no zero divisors, then the product of two elements equals zero iff one of them
309309
equals zero. -/
310310
-- This is not marked `@[simp]` since `simp` can derive this from `mul_eq_zero`.
311-
theorem zero_eq_mul : 0 = a * b ↔ a = 0 ∨ b = 0 := by simp
311+
theorem zero_eq_mul : 0 = a * b ↔ a = 0 ∨ b = 0 := by simp [eqComm]
312312

313313
/-- If `α` has no zero divisors, then the product of two elements is nonzero iff both of them
314314
are nonzero. -/

Mathlib/Algebra/Order/Antidiag/Finsupp.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ variable [DecidableEq ι] [DecidableEq μ] [AddCommMonoid μ] [PartialOrder μ]
153153
[CanonicallyOrderedAdd μ] [HasAntidiagonal μ]
154154

155155
@[simp] lemma finsuppAntidiag_zero (s : Finset ι) : finsuppAntidiag s (0 : μ) = {0} := by
156-
ext f; simp [finsuppAntidiag, ← DFunLike.coe_fn_eq (g := f), -mem_piAntidiag, eq_comm, -eqComm]
156+
ext f; simp [finsuppAntidiag, ← DFunLike.coe_fn_eq (g := f), eq_comm]
157157

158158
end CanonicallyOrderedAddCommMonoid
159159
end Finset

Mathlib/Algebra/Polynomial/Monic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ theorem Monic.mul_right_ne_zero (hp : Monic p) {q : R[X]} (hq : q ≠ 0) : p * q
503503
theorem Monic.mul_natDegree_lt_iff (h : Monic p) {q : R[X]} :
504504
(p * q).natDegree < p.natDegree ↔ p ≠ 1 ∧ q = 0 := by
505505
by_cases hq : q = 0
506-
· suffices 0 < p.natDegree ↔ p.natDegree ≠ 0 by simp [hq, ← h.natDegree_eq_zero]
506+
· suffices 0 < p.natDegree ↔ p.natDegree ≠ 0 by simp [hq, ← h.natDegree_eq_zero, iffComm]
507507
exact ⟨fun h => h.ne', fun h => lt_of_le_of_ne (Nat.zero_le _) h.symm⟩
508508
· simp [h.natDegree_mul', hq]
509509

Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Pi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ lemma cfcₙ_map_prod (f : R → R) (a : A) (b : B)
8383
let φ := NonUnitalStarAlgHom.snd S A B
8484
exact φ.map_cfcₙ f (a, b) (by rwa [Prod.quasispectrum_eq]) hf₀ continuous_snd hab hb
8585
case neg =>
86-
simp [cfcₙ_apply_of_not_map_zero _ hf₀]
86+
simp [cfcₙ_apply_of_not_map_zero _ hf₀, eqComm]
8787

8888
end nonunital_prod
8989

Mathlib/Analysis/Complex/Arg.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ variable {x y : ℂ}
3131
namespace Complex
3232

3333
set_option backward.isDefEq.respectTransparency false in
34-
-- Non-terminal simp, used to be field_simp
35-
set_option linter.flexible false in
3634
-- see https://github.com/leanprover-community/mathlib4/issues/29041
3735
set_option linter.unusedSimpArgs false in
3836
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by

0 commit comments

Comments
 (0)