Skip to content

Commit 85c04e7

Browse files
mans0954eric-wieser
andcommitted
refactor(Algebra/Star/*): Allow for star operation on non-associative algebras (#6562)
Typically a * operation on a mathematical structure `R` equipped with a multiplication is an involutive anti-automorphism i.e. ``` ∀ r s : R, star (r * s) = star s * star r ``` Currently mathlib defines a class `StarSemigroup` to be a semigroup satisfying this property. However, the requirement for the multiplication to be associative is unnecessarily restrictive. There are important classes of star-algebra which are not associative (e.g. JB*-algebras). This PR removes the requirement for a `StarSemigroup` to be a semigroup, merely requiring it to have a multiplication. I've changed the name from `StarSemigroup` to `StarMul` since it's no longer a semigroup. [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/non-associative.20*-algebras) Previously opened as a mathlib PR leanprover-community/mathlib3#17949 Co-authored-by: Christopher Hoskin <mans0954@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
1 parent 404fef6 commit 85c04e7

19 files changed

Lines changed: 94 additions & 86 deletions

File tree

Mathlib/Algebra/Algebra/Unitization.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,9 @@ instance instStarModule [CommSemiring R] [StarRing R] [AddCommMonoid A] [StarAdd
578578
[Module R A] [StarModule R A] : StarModule R (Unitization R A) where
579579
star_smul r x := ext (by simp) (by simp)
580580

581-
instance instStarRing [CommSemiring R] [StarRing R] [NonUnitalSemiring A] [StarRing A] [Module R A]
582-
[IsScalarTower R A A] [SMulCommClass R A A] [StarModule R A] : StarRing (Unitization R A) :=
581+
instance instStarRing [CommSemiring R] [StarRing R] [NonUnitalNonAssocSemiring A] [StarRing A]
582+
[Module R A] [StarModule R A] :
583+
StarRing (Unitization R A) :=
583584
{ Unitization.instStarAddMonoid with
584585
star_mul := fun x y =>
585586
ext (by simp [-star_mul']) (by simp [-star_mul', add_comm (star x.fst • star y.snd)]) }

Mathlib/Algebra/Star/Basic.lean

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For now we simply do not introduce notations,
2525
as different users are expected to feel strongly about the relative merits of
2626
`r^*`, `r†`, `rᘁ`, and so on.
2727
28-
Our star rings are actually star semirings, but of course we can prove
28+
Our star rings are actually star non-unital, non-associative, semirings, but of course we can prove
2929
`star_neg : star (-r) = - star r` when the underlying semiring is a ring.
3030
-/
3131

@@ -121,21 +121,21 @@ export TrivialStar (star_trivial)
121121

122122
attribute [simp] star_trivial
123123

124-
/-- A `*`-semigroup is a semigroup `R` with an involutive operation `star`
124+
/-- A `*`-magma is a magma `R` with an involutive operation `star`
125125
such that `star (r * s) = star s * star r`.
126126
-/
127-
class StarSemigroup (R : Type u) [Semigroup R] extends InvolutiveStar R where
127+
class StarMul (R : Type u) [Mul R] extends InvolutiveStar R where
128128
/-- `star` skew-distributes over multiplication. -/
129129
star_mul : ∀ r s : R, star (r * s) = star s * star r
130-
#align star_semigroup StarSemigroup
130+
#align star_semigroup StarMul
131131

132-
export StarSemigroup (star_mul)
132+
export StarMul (star_mul)
133133

134134
attribute [simp 900] star_mul
135135

136-
section StarSemigroup
136+
section StarMul
137137

138-
variable [Semigroup R] [StarSemigroup R]
138+
variable [Mul R] [StarMul R]
139139

140140
theorem star_star_mul (x y : R) : star (star x * y) = star y * x := by rw [star_mul, star_star]
141141
#align star_star_mul star_star_mul
@@ -164,17 +164,17 @@ theorem commute_star_comm {x y : R} : Commute (star x) y ↔ Commute x (star y)
164164
rw [← commute_star_star, star_star]
165165
#align commute_star_comm commute_star_comm
166166

167-
end StarSemigroup
167+
end StarMul
168168

169169
/-- In a commutative ring, make `simp` prefer leaving the order unchanged. -/
170170
@[simp]
171-
theorem star_mul' [CommSemigroup R] [StarSemigroup R] (x y : R) : star (x * y) = star x * star y :=
171+
theorem star_mul' [CommSemigroup R] [StarMul R] (x y : R) : star (x * y) = star x * star y :=
172172
(star_mul x y).trans (mul_comm _ _)
173173
#align star_mul' star_mul'
174174

175175
/-- `star` as a `MulEquiv` from `R` to `Rᵐᵒᵖ` -/
176176
@[simps apply]
177-
def starMulEquiv [Semigroup R] [StarSemigroup R] : R ≃* Rᵐᵒᵖ :=
177+
def starMulEquiv [Mul R] [StarMul R] : R ≃* Rᵐᵒᵖ :=
178178
{ (InvolutiveStar.star_involutive.toPerm star).trans opEquiv with
179179
toFun := fun x => MulOpposite.op (star x)
180180
map_mul' := fun x y => by simp only [star_mul, op_mul] }
@@ -183,7 +183,7 @@ def starMulEquiv [Semigroup R] [StarSemigroup R] : R ≃* Rᵐᵒᵖ :=
183183

184184
/-- `star` as a `MulAut` for commutative `R`. -/
185185
@[simps apply]
186-
def starMulAut [CommSemigroup R] [StarSemigroup R] : MulAut R :=
186+
def starMulAut [CommSemigroup R] [StarMul R] : MulAut R :=
187187
{ InvolutiveStar.star_involutive.toPerm star with
188188
toFun := star
189189
map_mul' := star_mul' }
@@ -193,32 +193,32 @@ def starMulAut [CommSemigroup R] [StarSemigroup R] : MulAut R :=
193193
variable (R)
194194

195195
@[simp]
196-
theorem star_one [Monoid R] [StarSemigroup R] : star (1 : R) = 1 :=
196+
theorem star_one [MulOneClass R] [StarMul R] : star (1 : R) = 1 :=
197197
op_injective <| (starMulEquiv : R ≃* Rᵐᵒᵖ).map_one.trans (op_one _).symm
198198
#align star_one star_one
199199

200200
variable {R}
201201

202202
@[simp]
203-
theorem star_pow [Monoid R] [StarSemigroup R] (x : R) (n : ℕ) : star (x ^ n) = star x ^ n :=
203+
theorem star_pow [Monoid R] [StarMul R] (x : R) (n : ℕ) : star (x ^ n) = star x ^ n :=
204204
op_injective <|
205205
((starMulEquiv : R ≃* Rᵐᵒᵖ).toMonoidHom.map_pow x n).trans (op_pow (star x) n).symm
206206
#align star_pow star_pow
207207

208208
@[simp]
209-
theorem star_inv [Group R] [StarSemigroup R] (x : R) : star x⁻¹ = (star x)⁻¹ :=
209+
theorem star_inv [Group R] [StarMul R] (x : R) : star x⁻¹ = (star x)⁻¹ :=
210210
op_injective <| ((starMulEquiv : R ≃* Rᵐᵒᵖ).toMonoidHom.map_inv x).trans (op_inv (star x)).symm
211211
#align star_inv star_inv
212212

213213
@[simp]
214-
theorem star_zpow [Group R] [StarSemigroup R] (x : R) (z : ℤ) : star (x ^ z) = star x ^ z :=
214+
theorem star_zpow [Group R] [StarMul R] (x : R) (z : ℤ) : star (x ^ z) = star x ^ z :=
215215
op_injective <|
216216
((starMulEquiv : R ≃* Rᵐᵒᵖ).toMonoidHom.map_zpow x z).trans (op_zpow (star x) z).symm
217217
#align star_zpow star_zpow
218218

219219
/-- When multiplication is commutative, `star` preserves division. -/
220220
@[simp]
221-
theorem star_div [CommGroup R] [StarSemigroup R] (x y : R) : star (x / y) = star x / star y :=
221+
theorem star_div [CommGroup R] [StarMul R] (x y : R) : star (x / y) = star x / star y :=
222222
map_div (starMulAut : R ≃* R) _ _
223223
#align star_div star_div
224224

@@ -227,17 +227,17 @@ theorem star_div [CommGroup R] [StarSemigroup R] (x y : R) : star (x / y) = star
227227
See note [reducible non-instances].
228228
-/
229229
@[reducible]
230-
def starSemigroupOfComm {R : Type*} [CommMonoid R] : StarSemigroup R where
230+
def starMulOfComm {R : Type*} [CommMonoid R] : StarMul R where
231231
star := id
232232
star_involutive _ := rfl
233233
star_mul := mul_comm
234-
#align star_semigroup_of_comm starSemigroupOfComm
234+
#align star_semigroup_of_comm starMulOfComm
235235

236236
section
237237

238-
attribute [local instance] starSemigroupOfComm
238+
attribute [local instance] starMulOfComm
239239

240-
/-- Note that since `starSemigroupOfComm` is reducible, `simp` can already prove this. -/
240+
/-- Note that since `starMulOfComm` is reducible, `simp` can already prove this. -/
241241
theorem star_id_of_comm {R : Type*} [CommSemiring R] {x : R} : star x = x :=
242242
rfl
243243
#align star_id_of_comm star_id_of_comm
@@ -302,35 +302,35 @@ theorem star_zsmul [AddGroup R] [StarAddMonoid R] (x : R) (n : ℤ) : star (n
302302
(starAddEquiv : R ≃+ R).toAddMonoidHom.map_zsmul _ _
303303
#align star_zsmul star_zsmul
304304

305-
/-- A `*`-ring `R` is a (semi)ring with an involutive `star` operation which is additive
306-
which makes `R` with its multiplicative structure into a `*`-semigroup
305+
/-- A `*`-ring `R` is a non-unital, non-associative (semi)ring with an involutive `star` operation
306+
which is additive which makes `R` with its multiplicative structure into a `*`-multiplication
307307
(i.e. `star (r * s) = star s * star r`). -/
308-
class StarRing (R : Type u) [NonUnitalSemiring R] extends StarSemigroup R where
308+
class StarRing (R : Type u) [NonUnitalNonAssocSemiring R] extends StarMul R where
309309
/-- `star` commutes with addition -/
310310
star_add : ∀ r s : R, star (r + s) = star r + star s
311311
#align star_ring StarRing
312312

313-
instance (priority := 100) StarRing.toStarAddMonoid [NonUnitalSemiring R] [StarRing R] :
313+
instance (priority := 100) StarRing.toStarAddMonoid [NonUnitalNonAssocSemiring R] [StarRing R] :
314314
StarAddMonoid R where
315315
star_add := StarRing.star_add
316316
#align star_ring.to_star_add_monoid StarRing.toStarAddMonoid
317317

318318
/-- `star` as a `RingEquiv` from `R` to `Rᵐᵒᵖ` -/
319319
@[simps apply]
320-
def starRingEquiv [NonUnitalSemiring R] [StarRing R] : R ≃+* Rᵐᵒᵖ :=
320+
def starRingEquiv [NonUnitalNonAssocSemiring R] [StarRing R] : R ≃+* Rᵐᵒᵖ :=
321321
{ starAddEquiv.trans (MulOpposite.opAddEquiv : R ≃+ Rᵐᵒᵖ), starMulEquiv with
322322
toFun := fun x => MulOpposite.op (star x) }
323323
#align star_ring_equiv starRingEquiv
324324
#align star_ring_equiv_apply starRingEquiv_apply
325325

326326
@[simp, norm_cast]
327-
theorem star_natCast [Semiring R] [StarRing R] (n : ℕ) : star (n : R) = n :=
327+
theorem star_natCast [NonAssocSemiring R] [StarRing R] (n : ℕ) : star (n : R) = n :=
328328
(congr_arg unop (map_natCast (starRingEquiv : R ≃+* Rᵐᵒᵖ) n)).trans (unop_natCast _)
329329
#align star_nat_cast star_natCast
330330

331331
--Porting note: new theorem
332332
@[simp]
333-
theorem star_ofNat [Semiring R] [StarRing R] (n : ℕ) [n.AtLeastTwo] :
333+
theorem star_ofNat [NonAssocSemiring R] [StarRing R] (n : ℕ) [n.AtLeastTwo] :
334334
star (no_index (OfNat.ofNat n) : R) = OfNat.ofNat n :=
335335
star_natCast _
336336

@@ -459,7 +459,7 @@ See note [reducible non-instances].
459459
-/
460460
@[reducible]
461461
def starRingOfComm {R : Type*} [CommSemiring R] : StarRing R :=
462-
{ starSemigroupOfComm with
462+
{ starMulOfComm with
463463
star := id
464464
star_add := fun _ _ => rfl }
465465
#align star_ring_of_comm starRingOfComm
@@ -486,7 +486,7 @@ export StarModule (star_smul)
486486
attribute [simp] star_smul
487487

488488
/-- A commutative star monoid is a star module over itself via `Monoid.toMulAction`. -/
489-
instance StarSemigroup.to_starModule [CommMonoid R] [StarSemigroup R] : StarModule R R :=
489+
instance StarSemigroup.to_starModule [CommMonoid R] [StarMul R] : StarModule R R :=
490490
⟨star_mul'⟩
491491
#align star_semigroup.to_star_module StarSemigroup.to_starModule
492492

@@ -517,9 +517,9 @@ end
517517

518518
namespace Units
519519

520-
variable [Monoid R] [StarSemigroup R]
520+
variable [Monoid R] [StarMul R]
521521

522-
instance : StarSemigroupwhere
522+
instance : StarMulwhere
523523
star u :=
524524
{ val := star u
525525
inv := star ↑u⁻¹
@@ -543,12 +543,12 @@ instance {A : Type*} [Star A] [SMul R A] [StarModule R A] : StarModule Rˣ A :=
543543

544544
end Units
545545

546-
theorem IsUnit.star [Monoid R] [StarSemigroup R] {a : R} : IsUnit a → IsUnit (star a)
546+
theorem IsUnit.star [Monoid R] [StarMul R] {a : R} : IsUnit a → IsUnit (star a)
547547
| ⟨u, hu⟩ => ⟨Star.star u, hu ▸ rfl⟩
548548
#align is_unit.star IsUnit.star
549549

550550
@[simp]
551-
theorem isUnit_star [Monoid R] [StarSemigroup R] {a : R} : IsUnit (star a) ↔ IsUnit a :=
551+
theorem isUnit_star [Monoid R] [StarMul R] {a : R} : IsUnit (star a) ↔ IsUnit a :=
552552
fun h => star_star a ▸ h.star, IsUnit.star⟩
553553
#align is_unit_star isUnit_star
554554

@@ -560,14 +560,14 @@ theorem Ring.inverse_star [Semiring R] [StarRing R] (a : R) :
560560
rw [Ring.inverse_non_unit _ ha, Ring.inverse_non_unit _ (mt isUnit_star.mp ha), star_zero]
561561
#align ring.inverse_star Ring.inverse_star
562562

563-
instance Invertible.star {R : Type*} [Monoid R] [StarSemigroup R] (r : R) [Invertible r] :
563+
instance Invertible.star {R : Type*} [MulOneClass R] [StarMul R] (r : R) [Invertible r] :
564564
Invertible (star r) where
565565
invOf := Star.star (⅟ r)
566566
invOf_mul_self := by rw [← star_mul, mul_invOf_self, star_one]
567567
mul_invOf_self := by rw [← star_mul, invOf_mul_self, star_one]
568568
#align invertible.star Invertible.star
569569

570-
theorem star_invOf {R : Type*} [Monoid R] [StarSemigroup R] (r : R) [Invertible r]
570+
theorem star_invOf {R : Type*} [Monoid R] [StarMul R] (r : R) [Invertible r]
571571
[Invertible (star r)] : star (⅟ r) = ⅟ (star r) := by
572572
have : star (⅟ r) = star (⅟ r) * ((star r) * ⅟ (star r)) := by
573573
simp only [mul_invOf_self, mul_one]
@@ -594,7 +594,7 @@ theorem op_star [Star R] (r : R) : op (star r) = star (op r) :=
594594
instance [InvolutiveStar R] : InvolutiveStar Rᵐᵒᵖ where
595595
star_involutive r := unop_injective (star_star r.unop)
596596

597-
instance [Monoid R] [StarSemigroup R] : StarSemigroup Rᵐᵒᵖ where
597+
instance [Mul R] [StarMul R] : StarMul Rᵐᵒᵖ where
598598
star_mul x y := unop_injective (star_mul y.unop x.unop)
599599

600600
instance [AddMonoid R] [StarAddMonoid R] : StarAddMonoid Rᵐᵒᵖ where
@@ -607,7 +607,7 @@ end MulOpposite
607607

608608
/-- A commutative star monoid is a star module over its opposite via
609609
`Monoid.toOppositeMulAction`. -/
610-
instance StarSemigroup.toOpposite_starModule [CommMonoid R] [StarSemigroup R] :
610+
instance StarSemigroup.toOpposite_starModule [CommMonoid R] [StarMul R] :
611611
StarModule Rᵐᵒᵖ R :=
612612
fun r s => star_mul' s r.unop⟩
613613
#align star_semigroup.to_opposite_star_module StarSemigroup.toOpposite_starModule

Mathlib/Algebra/Star/BigOperators.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variable {R : Type*}
1919
open BigOperators
2020

2121
@[simp]
22-
theorem star_prod [CommMonoid R] [StarSemigroup R] {α : Type*} (s : Finset α) (f : α → R) :
22+
theorem star_prod [CommMonoid R] [StarMul R] {α : Type*} (s : Finset α) (f : α → R) :
2323
star (∏ x in s, f x) = ∏ x in s, star (f x) := map_prod (starMulAut : R ≃* R) _ _
2424
#align star_prod star_prod
2525

Mathlib/Algebra/Star/CHSH.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The physical interpretation is that `A₀` and `A₁` are a pair of boolean obse
8282
are spacelike separated from another pair `B₀` and `B₁` of boolean observables.
8383
-/
8484
--@[nolint has_nonempty_instance] Porting note: linter does not exist
85-
structure IsCHSHTuple {R} [Monoid R] [StarSemigroup R] (A₀ A₁ B₀ B₁ : R) : Prop where
85+
structure IsCHSHTuple {R} [Monoid R] [StarMul R] (A₀ A₁ B₀ B₁ : R) : Prop where
8686
A₀_inv : A₀ ^ 2 = 1
8787
A₁_inv : A₁ ^ 2 = 1
8888
B₀_inv : B₀ ^ 2 = 1

Mathlib/Algebra/Star/Center.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Mathlib.Algebra.Star.Pointwise
1010

1111
/-! # `Set.center`, `Set.centralizer` and the `star` operation -/
1212

13-
variable {R : Type*} [Semigroup R] [StarSemigroup R] {a : R} {s : Set R}
13+
variable {R : Type*} [Mul R] [StarMul R] {a : R} {s : Set R}
1414

1515
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R := by
1616
simpa only [star_mul, star_star] using fun g =>

Mathlib/Algebra/Star/Free.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace FreeMonoid
2323

2424
variable {α : Type*}
2525

26-
instance : StarSemigroup (FreeMonoid α) where
26+
instance : StarMul (FreeMonoid α) where
2727
star := List.reverse
2828
star_involutive := List.reverse_reverse
2929
star_mul := List.reverse_append

Mathlib/Algebra/Star/Module.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def starLinearEquiv (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [AddCo
8282
map_smul' := star_smul }
8383
#align star_linear_equiv starLinearEquiv
8484

85-
variable (R : Type*) (A : Type*) [Semiring R] [StarSemigroup R] [TrivialStar R] [AddCommGroup A]
85+
variable (R : Type*) (A : Type*) [Semiring R] [StarMul R] [TrivialStar R] [AddCommGroup A]
8686
[Module R A] [StarAddMonoid A] [StarModule R A]
8787

8888
/-- The self-adjoint elements of a star module, as a submodule. -/
@@ -184,7 +184,7 @@ def StarModule.decomposeProdAdjoint : A ≃ₗ[R] selfAdjoint A × skewAdjoint A
184184

185185
@[simp]
186186
theorem algebraMap_star_comm {R A : Type*} [CommSemiring R] [StarRing R] [Semiring A]
187-
[StarSemigroup A] [Algebra R A] [StarModule R A] (r : R) :
187+
[StarMul A] [Algebra R A] [StarModule R A] (r : R) :
188188
algebraMap R A (star r) = star (algebraMap R A r) := by
189189
simp only [Algebra.algebraMap_eq_smul_one, star_smul, star_one]
190190
#align algebra_map_star_comm algebraMap_star_comm

Mathlib/Algebra/Star/NonUnitalSubalgebra.lean

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ instance instInvolutiveStar {S R : Type*} [InvolutiveStar R] [SetLike S R] [Star
2626
(s : S) : InvolutiveStar s where
2727
star_involutive r := Subtype.ext <| star_star (r : R)
2828

29-
/-- In a star semigroup (i.e., a semigroup with an antimultiplicative involutive star operation),
30-
any star-closed subset which is also closed under multiplication is itself a star semigroup. -/
31-
instance instStarSemigroup {S R : Type*} [Semigroup R] [StarSemigroup R] [SetLike S R]
32-
[MulMemClass S R] [StarMemClass S R] (s : S) : StarSemigroup s where
29+
/-- In a star magma (i.e., a multiplication with an antimultiplicative involutive star
30+
operation), any star-closed subset which is also closed under multiplication is itself a star
31+
magma. -/
32+
instance instStarMul {S R : Type*} [Mul R] [StarMul R] [SetLike S R]
33+
[MulMemClass S R] [StarMemClass S R] (s : S) : StarMul s where
3334
star_mul _ _ := Subtype.ext <| star_mul _ _
3435

3536
/-- In a `StarAddMonoid` (i.e., an additive monoid with an additive involutive star operation), any
@@ -39,11 +40,12 @@ instance instStarAddMonoid {S R : Type*} [AddMonoid R] [StarAddMonoid R] [SetLik
3940
[AddSubmonoidClass S R] [StarMemClass S R] (s : S) : StarAddMonoid s where
4041
star_add _ _ := Subtype.ext <| star_add _ _
4142

42-
/-- In a star ring (i.e., a non-unital semiring with an additive, antimultiplicative, involutive
43-
star operation), an star-closed non-unital subsemiring is itself a star ring. -/
44-
instance instStarRing {S R : Type*} [NonUnitalSemiring R] [StarRing R] [SetLike S R]
43+
/-- In a star ring (i.e., a non-unital, non-associative, semiring with an additive,
44+
antimultiplicative, involutive star operation), a star-closed non-unital subsemiring is itself a
45+
star ring. -/
46+
instance instStarRing {S R : Type*} [NonUnitalNonAssocSemiring R] [StarRing R] [SetLike S R]
4547
[NonUnitalSubsemiringClass S R] [StarMemClass S R] (s : S) : StarRing s :=
46-
{ StarMemClass.instStarSemigroup s, StarMemClass.instStarAddMonoid s with }
48+
{ StarMemClass.instStarMul s, StarMemClass.instStarAddMonoid s with }
4749

4850
/-- In a star `R`-module (i.e., `star (r • m) = (star r) • m`) any star-closed subset which is also
4951
closed under the scalar action by `R` is itself a star `R`-module. -/

Mathlib/Algebra/Star/Pi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ instance [∀ i, Star (f i)] [∀ i, TrivialStar (f i)] : TrivialStar (∀ i, f
4343
instance [∀ i, InvolutiveStar (f i)] : InvolutiveStar (∀ i, f i)
4444
where star_involutive _ := funext fun _ => star_star _
4545

46-
instance [∀ i, Semigroup (f i)] [∀ i, StarSemigroup (f i)] : StarSemigroup (∀ i, f i)
46+
instance [∀ i, Mul (f i)] [∀ i, StarMul (f i)] : StarMul (∀ i, f i)
4747
where star_mul _ _ := funext fun _ => star_mul _ _
4848

4949
instance [∀ i, AddMonoid (f i)] [∀ i, StarAddMonoid (f i)] : StarAddMonoid (∀ i, f i)

Mathlib/Algebra/Star/Pointwise.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ theorem star_singleton {β : Type*} [InvolutiveStar β] (x : β) : ({x} : Set β
117117
rw [mem_star, mem_singleton_iff, mem_singleton_iff, star_eq_iff_star_eq, eq_comm]
118118
#align set.star_singleton Set.star_singleton
119119

120-
protected theorem star_mul [Monoid α] [StarSemigroup α] (s t : Set α) : (s * t)⋆ = t⋆ * s⋆ := by
120+
protected theorem star_mul [Mul α] [StarMul α] (s t : Set α) : (s * t)⋆ = t⋆ * s⋆ := by
121121
simp_rw [← image_star, ← image2_mul, image_image2, image2_image_left, image2_image_right,
122122
star_mul, image2_swap _ s t]
123123
#align set.star_mul Set.star_mul
@@ -134,7 +134,7 @@ instance [Star α] [TrivialStar α] : TrivialStar (Set α) where
134134
ext1
135135
simp [star_trivial]
136136

137-
protected theorem star_inv [Group α] [StarSemigroup α] (s : Set α) : s⁻¹⋆ = s⋆⁻¹ := by
137+
protected theorem star_inv [Group α] [StarMul α] (s : Set α) : s⁻¹⋆ = s⋆⁻¹ := by
138138
ext
139139
simp only [mem_star, mem_inv, star_inv]
140140
#align set.star_inv Set.star_inv

0 commit comments

Comments
 (0)