Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Mathlib/Algebra/Group/Pi/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ instance mulOneClass [∀ i, MulOneClass (f i)] : MulOneClass (∀ i, f i) where
one_mul := by intros; ext; exact one_mul _
mul_one := by intros; ext; exact mul_one _

@[to_additive]
instance [∀ i, MulOneClass (f i)] [∀ i, IsDedekindFiniteMonoid (f i)] :
IsDedekindFiniteMonoid (∀ i, f i) where
mul_eq_one_symm := by simp [funext_iff, mul_eq_one_comm]

@[to_additive]
instance invOneClass [∀ i, InvOneClass (f i)] : InvOneClass (∀ i, f i) where
inv_one := by ext; exact inv_one
Expand Down
5 changes: 5 additions & 0 deletions Mathlib/Algebra/Group/Prod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ instance instMulOneClass [MulOneClass M] [MulOneClass N] : MulOneClass (M × N)
one_mul _ := by ext <;> exact one_mul _
mul_one _ := by ext <;> exact mul_one _

@[to_additive]
instance [MulOneClass M] [MulOneClass N] [IsDedekindFiniteMonoid M] [IsDedekindFiniteMonoid N] :
IsDedekindFiniteMonoid (M × N) where
mul_eq_one_symm := by simp [mul_eq_one_comm]

@[to_additive]
instance instMonoid [Monoid M] [Monoid N] : Monoid (M × N) :=
{ npow := fun z a => ⟨NPow.npow z a.1, NPow.npow z a.2⟩,
Expand Down
Loading