Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YaelDillies committed Dec 10, 2024
1 parent 23d2618 commit 15f12bb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Algebra/BigOperators/Group/Multiset.lean
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ theorem prod_map_div : (m.map fun i => f i / g i).prod = (m.map f).prod / (m.map
@[to_additive]
theorem prod_map_zpow {n : ℤ} : (m.map fun i => f i ^ n).prod = (m.map f).prod ^ n := by
convert (m.map f).prod_hom (zpowGroupHom n : α →* α)
simp only [map_map, Function.comp_apply, zpowGroupHom_apply]
simp [map_map, Function.comp_apply]

end DivisionCommMonoid

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Submonoid/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ theorem restrict_mrange (f : M →* N) : mrange (f.restrict S) = S.map f := by
simp [SetLike.ext_iff]

/-- Restriction of a monoid hom to a submonoid of the codomain. -/
@[to_additive (attr := simps apply)
@[to_additive (attr := simps (config := .asFn))
"Restriction of an `AddMonoid` hom to an `AddSubmonoid` of the codomain."]
def codRestrict {S} [SetLike S N] [SubmonoidClass S N] (f : M →* N) (s : S) (h : ∀ x, f x ∈ s) :
M →* s where
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/WithOne/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ section
-- workaround: we make `WithOne`/`WithZero` irreducible for this definition, otherwise `simps`
-- will unfold it in the statement of the lemma it generates.
/-- `WithOne.coe` as a bundled morphism -/
@[to_additive (attr := simps apply) "`WithZero.coe` as a bundled morphism"]
@[to_additive (attr := simps) "`WithZero.coe` as a bundled morphism"]
def coeMulHom [Mul α] : α →ₙ* WithOne α where
toFun := coe
map_mul' _ _ := rfl
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/GroupWithZero/WithZero.lean
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ instance mulZeroOneClass [MulOneClass α] : MulZeroOneClass (WithZero α) where
mul_one := Option.map₂_right_identity mul_one

/-- Coercion as a monoid hom. -/
@[simps apply]
@[simps (config := .asFn)]
def coeMonoidHom : α →* WithZero α where
toFun := (↑)
map_one' := rfl
Expand All @@ -90,7 +90,7 @@ theorem monoidWithZeroHom_ext ⦃f g : WithZero α →*₀ β⦄
| (g : α) => DFunLike.congr_fun h g

/-- The (multiplicative) universal property of `WithZero`. -/
@[simps! symm_apply_apply]
@[simps! (config := .asFn)]
noncomputable nonrec def lift' : (α →* β) ≃ (WithZero α →*₀ β) where
toFun f :=
{ toFun := fun
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/End.lean
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ variable (R M)
/-- `(•)` as an `AddMonoidHom`.
This is a stronger version of `DistribMulAction.toAddMonoidEnd` -/
@[simps! apply_apply]
@[simps!]
def Module.toAddMonoidEnd : R →+* AddMonoid.End M :=
{ DistribMulAction.toAddMonoidEnd R M with
-- Porting note: the two `show`s weren't needed in mathlib3.
Expand Down
7 changes: 2 additions & 5 deletions Mathlib/GroupTheory/NoncommCoprod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ def noncommCoprod (comm : ∀ m n, Commute (f m) (g n)) : M × N →ₙ* P where
@[to_additive
"Variant of `AddHom.noncommCoprod_apply`, with the sum written in the other direction"]
theorem noncommCoprod_apply' (comm) (mn : M × N) :
(f.noncommCoprod g comm) mn = g mn.2 * f mn.1 := by
rw [← comm, noncommCoprod_apply]

(f.noncommCoprod g comm) mn = g mn.2 * f mn.1 := by simp [(comm _ _).eq]

@[to_additive]
theorem comp_noncommCoprod {Q : Type*} [Semigroup Q] (h : P →ₙ* Q)
Expand Down Expand Up @@ -86,8 +84,7 @@ def noncommCoprod : M × N →* P where
@[to_additive
"Variant of `AddMonoidHom.noncomCoprod_apply` with the sum written in the other direction"]
theorem noncommCoprod_apply' (comm) (mn : M × N) :
(f.noncommCoprod g comm) mn = g mn.2 * f mn.1 := by
rw [← comm, MonoidHom.noncommCoprod_apply]
(f.noncommCoprod g comm) mn = g mn.2 * f mn.1 := by simp [(comm _ _).eq]

@[to_additive (attr := simp)]
theorem noncommCoprod_comp_inl : (f.noncommCoprod g comm).comp (inl M N) = f :=
Expand Down

0 comments on commit 15f12bb

Please sign in to comment.