Skip to content

Commit cbd09a2

Browse files
committed
chore: golf using simp, and don't squeeze terminal simp calls (#35148)
1 parent bc819b7 commit cbd09a2

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Mathlib/Algebra/Group/Basic.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,8 +899,7 @@ theorem div_eq_of_eq_mul' {a b c : G} (h : a = b * c) : a / b = c := by
899899

900900
@[to_additive (attr := simp)]
901901
theorem mul_div_mul_left_eq_div (a b c : G) : c * a / (c * b) = a / b := by
902-
rw [div_eq_mul_inv, mul_inv_rev, mul_comm b⁻¹ c⁻¹, mul_comm c a, mul_assoc, ← mul_assoc c,
903-
mul_inv_cancel, one_mul, div_eq_mul_inv]
902+
simp
904903

905904
@[to_additive eq_sub_of_add_eq']
906905
theorem eq_div_of_mul_eq'' (h : c * a = b) : a = b / c := by simp [h.symm]

Mathlib/Algebra/Group/Hom/Basic.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ theorem mul_comp [Mul M] [Mul N] [CommSemigroup P] (g₁ g₂ : N →ₙ* P) (f
164164
theorem comp_mul [Mul M] [CommSemigroup N] [CommSemigroup P] (g : N →ₙ* P) (f₁ f₂ : M →ₙ* N) :
165165
g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂ := by
166166
ext
167-
simp only [mul_apply, Function.comp_apply, map_mul, coe_comp]
167+
simp
168168

169169
end MulHom
170170

@@ -256,7 +256,8 @@ lemma mul_comp [MulOneClass P] (g₁ g₂ : M →* N) (f : P →* M) :
256256
@[to_additive]
257257
lemma comp_mul [CommMonoid P] (g : N →* P) (f₁ f₂ : M →* N) :
258258
g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂ := by
259-
ext; simp only [mul_apply, Function.comp_apply, map_mul, coe_comp]
259+
ext
260+
simp
260261

261262
end Mul
262263

@@ -278,7 +279,7 @@ theorem inv_comp (φ : N →* G) (ψ : M →* N) : φ⁻¹.comp ψ = (φ.comp ψ
278279
@[to_additive (attr := simp)]
279280
theorem comp_inv (φ : G →* H) (ψ : M →* G) : φ.comp ψ⁻¹ = (φ.comp ψ)⁻¹ := by
280281
ext
281-
simp only [Function.comp_apply, inv_apply, map_inv, coe_comp]
282+
simp
282283

283284
/-- If `f` and `g` are monoid homomorphisms to a commutative group, then `f / g` is the homomorphism
284285
sending `x` to `(f x) / (g x)`. -/
@@ -295,7 +296,8 @@ lemma div_comp (f g : N →* G) (h : M →* N) : (f / g).comp h = f.comp h / g.c
295296

296297
@[to_additive (attr := simp)]
297298
lemma comp_div (f : G →* H) (g h : M →* G) : f.comp (g / h) = f.comp g / f.comp h := by
298-
ext; simp only [Function.comp_apply, div_apply, map_div, coe_comp]
299+
ext
300+
simp
299301

300302
end InvDiv
301303

Mathlib/Algebra/Group/Prod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ theorem snd_comp_prod (f : M →* N) (g : M →* P) : (snd N P).comp (f.prod g)
409409

410410
@[to_additive (attr := simp) prod_unique]
411411
theorem prod_unique (f : M →* N × P) : ((fst N P).comp f).prod ((snd N P).comp f) = f :=
412-
ext fun x => by simp only [prod_apply, coe_fst, coe_snd, comp_apply]
412+
ext fun _ => by simp
413413

414414
end Prod
415415

0 commit comments

Comments
 (0)