Skip to content

Commit e62bef8

Browse files
committed
chore: remove some uses of erw introduced in relation to lean4 PR leanprover-community#2644 (leanprover-community#31680)
1 parent f8cd90e commit e62bef8

File tree

7 files changed

+7
-20
lines changed

7 files changed

+7
-20
lines changed

Mathlib/Algebra/Category/ModuleCat/Kernels.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ def kernelIsLimit : IsLimit (kernelCone f) :=
3333
(fun s => ofHom <|
3434
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11036): broken dot notation on LinearMap.ker
3535
LinearMap.codRestrict (LinearMap.ker f.hom) (Fork.ι s).hom fun c =>
36-
LinearMap.mem_ker.2 <| by
37-
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
38-
erw [← ConcreteCategory.comp_apply]
39-
rw [Fork.condition, HasZeroMorphisms.comp_zero (Fork.ι s) N]
40-
rfl)
36+
LinearMap.mem_ker.2 <| by simp [← ConcreteCategory.comp_apply])
4137
(fun _ => hom_ext <| LinearMap.subtype_comp_codRestrict _ _ _) fun s m h =>
4238
hom_ext <| LinearMap.ext fun x => Subtype.ext_iff.2 (by simp [← h]; rfl)
4339

Mathlib/Algebra/Lie/Classical.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ theorem soIndefiniteEquiv_apply {i : R} (hi : i * i = -1) (A : so' p q R) :
233233
(soIndefiniteEquiv p q R hi A : Matrix (p ⊕ q) (p ⊕ q) R) =
234234
(Pso p q R i)⁻¹ * (A : Matrix (p ⊕ q) (p ⊕ q) R) * Pso p q R i := by
235235
rw [soIndefiniteEquiv, LieEquiv.trans_apply, LieEquiv.ofEq_apply]
236-
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
237-
erw [skewAdjointMatricesLieSubalgebraEquiv_apply]
236+
grind [skewAdjointMatricesLieSubalgebraEquiv_apply]
238237

239238
/-- A matrix defining a canonical even-rank symmetric bilinear form.
240239

Mathlib/Data/Matrix/Reflection.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ example (A : Matrix (Fin 2) (Fin 2) α) :
213213
-/
214214
theorem etaExpand_eq {m n} (A : Matrix (Fin m) (Fin n) α) : etaExpand A = A := by
215215
simp_rw [etaExpand, FinVec.etaExpand_eq, Matrix.of]
216-
-- This to be in the above `simp_rw` before https://github.com/leanprover/lean4/pull/2644
217-
erw [Equiv.refl_apply]
216+
grind
218217

219218
example (A : Matrix (Fin 2) (Fin 2) α) : A = !![A 0 0, A 0 1; A 1 0, A 1 1] :=
220219
(etaExpand_eq _).symm

Mathlib/GroupTheory/HNNExtension.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,7 @@ theorem prod_unitsSMul (u : ℤˣ) (w : NormalWord d) :
526526
-- simp [equiv_symm_eq_conj, mul_assoc].
527527
simp only [toSubgroup_neg_one, toSubgroupEquiv_neg_one, Units.val_neg, Units.val_one,
528528
Int.reduceNeg, zpow_neg, zpow_one, inv_inv]
529-
erw [equiv_symm_eq_conj]
530-
simp [mul_assoc]
529+
grind [equiv_symm_eq_conj, mul_assoc]
531530
· simp only [unitsSMulGroup, SetLike.coe_sort_coe, prod_cons, prod_group_smul, map_mul, map_inv]
532531
rcases Int.units_eq_one_or u with (rfl | rfl)
533532
· -- Before https://github.com/leanprover/lean4/pull/2644, this proof was just

Mathlib/LinearAlgebra/AffineSpace/Independent.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@ theorem AffineEquiv.affineIndependent_iff {p : ι → P} (e : P ≃ᵃ[k] P₂)
402402
theorem AffineEquiv.affineIndependent_set_of_eq_iff {s : Set P} (e : P ≃ᵃ[k] P₂) :
403403
AffineIndependent k ((↑) : e '' s → P₂) ↔ AffineIndependent k ((↑) : s → P) := by
404404
have : e ∘ ((↑) : s → P) = ((↑) : e '' s → P₂) ∘ (e : P ≃ P₂).image s := rfl
405-
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
406-
erw [← e.affineIndependent_iff, this, affineIndependent_equiv]
405+
simp [← e.affineIndependent_iff, this, affineIndependent_equiv]
407406

408407
end Composition
409408

Mathlib/LinearAlgebra/FreeModule/Norm.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
4242
zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
4343
change _ = f * _
4444
rw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply]
45-
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
46-
erw [LinearEquiv.coord_apply_smul]
47-
rw [Ideal.selfBasis_def]
48-
rfl
45+
grind [LinearEquiv.coord_apply_smul, Ideal.selfBasis_def]
4946

5047
end CommRing
5148

Mathlib/ModelTheory/DirectLimit.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ theorem coe_natLERec (m n : ℕ) (h : m ≤ n) :
5858
obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le h
5959
ext x
6060
induction k with
61-
| zero =>
62-
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
63-
erw [natLERec, Nat.leRecOn_self, Embedding.refl_apply, Nat.leRecOn_self]
61+
| zero => simp [natLERec, Nat.leRecOn_self]
6462
| succ k ih =>
6563
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
6664
erw [Nat.leRecOn_succ le_self_add, natLERec, Nat.leRecOn_succ le_self_add, ← natLERec,

0 commit comments

Comments
 (0)