Skip to content

Commit 3ca13cc

Browse files
committed
chore: add grind annotations for homomorphisms
1 parent e931189 commit 3ca13cc

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Mathlib/Algebra/Group/Hom/Defs.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ is the behavior we desire.
226226
variable [FunLike F M N]
227227

228228
/-- See note [hom simp lemma priority] -/
229-
@[to_additive (attr := simp mid)]
229+
@[to_additive (attr := simp mid, grind =)]
230230
theorem map_one [OneHomClass F M N] (f : F) : f 1 = 1 :=
231231
OneHomClass.map_one f
232232

@@ -318,7 +318,7 @@ instance MulHom.mulHomClass : MulHomClass (M →ₙ* N) M N where
318318
variable [FunLike F M N]
319319

320320
/-- See note [hom simp lemma priority] -/
321-
@[to_additive (attr := simp mid)]
321+
@[to_additive (attr := simp mid, grind =)]
322322
theorem map_mul [MulHomClass F M N] (f : F) (x y : M) : f (x * y) = f x * f y :=
323323
MulHomClass.map_mul f x y
324324

@@ -422,7 +422,7 @@ variable [FunLike F G H]
422422
@[to_additive]
423423
theorem map_div' [DivInvMonoid G] [DivInvMonoid H] [MulHomClass F G H]
424424
(f : F) (hf : ∀ a, f a⁻¹ = (f a)⁻¹) (a b : G) : f (a / b) = f a / f b := by
425-
rw [div_eq_mul_inv, div_eq_mul_inv, map_mul, hf]
425+
grind [div_eq_mul_inv]
426426

427427
@[to_additive]
428428
lemma map_comp_div' [DivInvMonoid G] [DivInvMonoid H] [MulHomClass F G H] (f : F)
@@ -432,7 +432,7 @@ lemma map_comp_div' [DivInvMonoid G] [DivInvMonoid H] [MulHomClass F G H] (f : F
432432
/-- Group homomorphisms preserve inverse.
433433
434434
See note [hom simp lemma priority] -/
435-
@[to_additive (attr := simp mid) /-- Additive group homomorphisms preserve negation. -/]
435+
@[to_additive (attr := simp mid, grind =) /-- Additive group homomorphisms preserve negation. -/]
436436
theorem map_inv [Group G] [DivisionMonoid H] [MonoidHomClass F G H]
437437
(f : F) (a : G) : f a⁻¹ = (f a)⁻¹ :=
438438
eq_inv_of_mul_eq_one_left <| map_mul_eq_one f <| inv_mul_cancel _
@@ -453,7 +453,7 @@ lemma map_comp_mul_inv [Group G] [DivisionMonoid H] [MonoidHomClass F G H] (f :
453453
/-- Group homomorphisms preserve division.
454454
455455
See note [hom simp lemma priority] -/
456-
@[to_additive (attr := simp mid) /-- Additive group homomorphisms preserve subtraction. -/]
456+
@[to_additive (attr := simp mid, grind =) /-- Additive group homomorphisms preserve subtraction. -/]
457457
theorem map_div [Group G] [DivisionMonoid H] [MonoidHomClass F G H] (f : F) :
458458
∀ a b, f (a / b) = f a / f b := map_div' _ <| map_inv f
459459

@@ -462,7 +462,7 @@ lemma map_comp_div [Group G] [DivisionMonoid H] [MonoidHomClass F G H] (f : F) (
462462
f ∘ (g / h) = f ∘ g / f ∘ h := by ext; simp
463463

464464
/-- See note [hom simp lemma priority] -/
465-
@[to_additive (attr := simp mid) (reorder := 9 10)]
465+
@[to_additive (attr := simp mid, grind =) (reorder := 9 10)]
466466
theorem map_pow [Monoid G] [Monoid H] [MonoidHomClass F G H] (f : F) (a : G) :
467467
∀ n : ℕ, f (a ^ n) = f a ^ n
468468
| 0 => by rw [pow_zero, pow_zero, map_one]
@@ -486,7 +486,7 @@ lemma map_comp_zpow' [DivInvMonoid G] [DivInvMonoid H] [MonoidHomClass F G H] (f
486486
/-- Group homomorphisms preserve integer power.
487487
488488
See note [hom simp lemma priority] -/
489-
@[to_additive (attr := simp mid) (reorder := 9 10)
489+
@[to_additive (attr := simp mid, grind =) (reorder := 9 10)
490490
/-- Additive group homomorphisms preserve integer scaling. -/]
491491
theorem map_zpow [Group G] [DivisionMonoid H] [MonoidHomClass F G H]
492492
(f : F) (g : G) (n : ℤ) : f (g ^ n) = f g ^ n := map_zpow' f (map_inv f) g n

0 commit comments

Comments
 (0)