Star monoids, rings, and modules #
We introduce the basic algebraic notions of star monoids, star rings, and star modules. A star algebra is simply a star ring that is also a star module.
These are implemented as "mixin" typeclasses, so to summon a star ring (for example)
one needs to write (R : Type*) [Ring R] [StarRing R]
.
This avoids difficulties with diamond inheritance.
For now we simply do not introduce notations,
as different users are expected to feel strongly about the relative merits of
r^*
, r†
, rᘁ
, and so on.
Our star rings are actually star non-unital, non-associative, semirings, but of course we can prove
star_neg : star (-r) = - star r
when the underlying semiring is a ring.
Notation typeclass (with no default notation!) for an algebraic structure with a star operation.
- star : R → R
A star operation (e.g. complex conjugate).
Instances
- ContinuousMap.instStarContinuousMap
- Matrix.instStarMatrix
- MulOpposite.instStarMulOpposite
- Pi.instStarForAll
- Prod.instStarProd
- StarMemClass.instStar
- ZeroAtInftyContinuousMap.instStar
- lp.instStarSubtypePreLpMemAddSubgroupToAddGroupInstAddCommGroupPreLpInstMembershipInstSetLikeAddSubgroupLp
- unitary.instStarSubtypeMemSubmonoidToMulOneClassInstMembershipInstSetLikeSubmonoidUnitary
Equations
- StarMemClass.instStar s = { star := fun (r : ↥s) => { val := star ↑r, property := ⋯ } }
Typeclass for a star operation with is involutive.
- star : R → R
- star_involutive : Function.Involutive star
Involutive condition.
Instances
- ContinuousMap.instInvolutiveStarContinuousMap
- Matrix.instInvolutiveStarMatrix
- MulOpposite.instInvolutiveStarMulOpposite
- Pi.instInvolutiveStarForAll
- Prod.instInvolutiveStarProd
- RingHom.involutiveStar
- Set.instInvolutiveStarSet
- Subalgebra.involutiveStar
- lp.instInvolutiveStar
- unitary.instInvolutiveStarSubtypeMemSubmonoidToMulOneClassInstMembershipInstSetLikeSubmonoidUnitary
star
as an equivalence when it is involutive.
Equations
- Equiv.star = Function.Involutive.toPerm star ⋯
Typeclass for a trivial star operation. This is mostly meant for ℝ
.
Condition that star is trivial
Instances
- ContinuousMap.instTrivialStar
- Int.instTrivialStar
- NNRat.instTrivialStar
- NNReal.instTrivialStarNNRealToStarToInvolutiveStarToAddMonoidToAddMonoidWithOneToAddCommMonoidWithOneToNonAssocSemiringInstNNRealSemiringToStarAddMonoidToNonUnitalNonAssocSemiringInstStarRingNNRealToNonUnitalNonAssocSemiringToNonAssocSemiringInstNNRealSemiring
- Nat.instTrivialStar
- Pi.instTrivialStarForAllInstStarForAll
- Prod.instTrivialStarProdInstStarProd
- Rat.instTrivialStar
- Real.instTrivialStarRealToStarToInvolutiveStarInstAddMonoidRealToStarAddMonoidToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRingInstStarRingRealToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRing
- Set.instTrivialStarSetStar
Alias of the reverse direction of semiconjBy_star_star_star
.
Alias of the reverse direction of commute_star_star
.
star
as a MulAut
for commutative R
.
Equations
- starMulAut = let __src := Function.Involutive.toPerm star ⋯; { toEquiv := { toFun := star, invFun := __src.invFun, left_inv := ⋯, right_inv := ⋯ }, map_mul' := ⋯ }
Any commutative monoid admits the trivial *
-structure.
See note [reducible non-instances].
Equations
- starMulOfComm = StarMul.mk ⋯
Note that since starMulOfComm
is reducible, simp
can already prove this.
A *
-additive monoid R
is an additive monoid with an involutive star
operation which
preserves addition.
- star : R → R
- star_involutive : Function.Involutive star
star
commutes with addition
Instances
- BoundedContinuousFunction.instStarAddMonoid
- ContinuousMap.starAddMonoid
- Matrix.instStarAddMonoidMatrixAddMonoid
- MulOpposite.instStarAddMonoidMulOppositeAddMonoid
- Pi.instStarAddMonoidForAllAddMonoid
- Prod.instStarAddMonoidProdInstAddMonoid
- StarRing.toStarAddMonoid
- ZeroAtInftyContinuousMap.instStarAddMonoid
- lp.instStarAddMonoid
Equations
- starAddEquiv = let __src := Function.Involutive.toPerm star ⋯; { toEquiv := { toFun := star, invFun := __src.invFun, left_inv := ⋯, right_inv := ⋯ }, map_add' := ⋯ }
A *
-ring R
is a non-unital, non-associative (semi)ring with an involutive star
operation
which is additive which makes R
with its multiplicative structure into a *
-multiplication
(i.e. star (r * s) = star s * star r
).
- star : R → R
- star_involutive : Function.Involutive star
star
commutes with addition
Instances
- BoundedContinuousFunction.instStarRing
- Complex.instStarRingComplexToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRing
- ContinuousMap.instStarRingContinuousMapInstNonUnitalNonAssocSemiringContinuousMap
- Int.instStarRing
- Matrix.instStarRingMatrixNonUnitalNonAssocSemiringToNonUnitalNonAssocSemiring
- MulOpposite.instStarRingMulOppositeInstNonUnitalNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiring
- NNRat.instStarRing
- NNReal.instStarRingNNRealToNonUnitalNonAssocSemiringToNonAssocSemiringInstNNRealSemiring
- Nat.instStarRing
- Pi.instStarRingForAllNonUnitalNonAssocSemiringToNonUnitalNonAssocSemiring
- Pi.starRing'
- Prod.instStarRingProdInstNonUnitalNonAssocSemiring
- Rat.instStarRing
- Real.instStarRingRealToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRing
- StarSubalgebra.starRing
- ZeroAtInftyContinuousMap.instStarRing
- lp.inftyStarRing
Equations
- StarRing.toStarAddMonoid = StarAddMonoid.mk ⋯
star
as a ring endomorphism, for commutative R
. This is used to denote complex
conjugation, and is available under the notation conj
in the locale ComplexConjugate
.
Note that this is the preferred form (over starRingAut
, available under the same hypotheses)
because the notation E →ₗ⋆[R] F
for an R
-conjugate-linear map (short for
E →ₛₗ[starRingEnd R] F
) does not pretty-print if there is a coercion involved, as would be the
case for (↑starRingAut : R →* R)
.
Equations
- starRingEnd R = ↑starRingAut
star
as a ring endomorphism, for commutative R
. This is used to denote complex
conjugation, and is available under the notation conj
in the locale ComplexConjugate
.
Note that this is the preferred form (over starRingAut
, available under the same hypotheses)
because the notation E →ₗ⋆[R] F
for an R
-conjugate-linear map (short for
E →ₛₗ[starRingEnd R] F
) does not pretty-print if there is a coercion involved, as would be the
case for (↑starRingAut : R →* R)
.
Equations
- ComplexConjugate.termConj = Lean.ParserDescr.node `ComplexConjugate.termConj 1024 (Lean.ParserDescr.symbol "conj")
This is not a simp lemma, since we usually want simp to keep starRingEnd
bundled.
For example, for complex conjugation, we don't want simp to turn conj x
into the bare function star x
automatically since most lemmas are about conj x
.
Equations
- RingHom.involutiveStar = InvolutiveStar.mk ⋯
Alias of starRingEnd_self_apply
.
Alias of starRingEnd_self_apply
.
Any commutative semiring admits the trivial *
-structure.
See note [reducible non-instances].
Equations
- starRingOfComm = let __src := starMulOfComm; StarRing.mk ⋯
A star module A
over a star ring R
is a module which is a star add monoid,
and the two star structures are compatible in the sense
star (r • a) = star r • star a
.
Note that it is up to the user of this typeclass to enforce
[Semiring R] [StarRing R] [AddCommMonoid A] [StarAddMonoid A] [Module R A]
, and that
the statement only requires [Star R] [Star A] [SMul R A]
.
If used as [CommRing R] [StarRing R] [Semiring A] [StarRing A] [Algebra R A]
, this represents a
star algebra.
star
commutes with scalar multiplication
Instances
- BoundedContinuousFunction.instStarModule
- Complex.instStarModuleRealComplexToStarToInvolutiveStarInstAddMonoidRealToStarAddMonoidToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRingInstStarRingRealToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRingToAddMonoidToAddMonoidWithOneAddGroupWithOneCommRingInstStarRingComplexToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRingInstSMulRealComplexToSMulInstCommSemiringRealSemiringId
- ContinuousMap.instStarModuleContinuousMapInstStarContinuousMapInstSMul
- Matrix.instStarModuleMatrixInstStarMatrixSmul
- NNReal.instStarModuleNNRealRealToStarToInvolutiveStarToAddMonoidToAddMonoidWithOneToAddCommMonoidWithOneToNonAssocSemiringInstNNRealSemiringToStarAddMonoidToNonUnitalNonAssocSemiringInstStarRingNNRealToNonUnitalNonAssocSemiringToNonAssocSemiringInstNNRealSemiringInstAddMonoidRealToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRingInstStarRingRealToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingCommRingToSMulInstNNRealCommSemiringSemiringInstAlgebraNNRealInstNNRealCommSemiringIdInstCommSemiringReal
- Pi.instStarModuleForAllInstStarForAllInstSMul
- Prod.instStarModuleProdInstStarProdSmul
- StarAddMonoid.toStarModuleNat
- StarModule.complexToReal
- StarMul.toStarModule
- StarSemigroup.toOpposite_starModule
- StarSubalgebra.starModule
- Units.instStarModuleUnitsToStarToInvolutiveStarInstMulUnitsInstStarMulUnitsInstMulUnitsInstSMulUnits
- ZeroAtInftyContinuousMap.instStarModule
- lp.instStarModuleSubtypePreLpMemAddSubgroupToAddGroupInstAddCommGroupPreLpInstMembershipInstSetLikeAddSubgroupLpInstStarSubtypePreLpMemAddSubgroupToAddGroupInstAddCommGroupPreLpInstMembershipInstSetLikeAddSubgroupLpToSMulZeroToSMulZeroClassToZeroToMonoidWithZeroToSemiringToRingToSMulWithZeroToMulActionWithZeroToAddCommMonoidToAddCommMonoidToAddSubmonoidInstModuleSubtypePreLpMemAddSubgroupToAddGroupInstAddCommGroupPreLpInstMembershipInstSetLikeAddSubgroupLpToSemiringToRingToAddCommMonoidToAddCommMonoidToAddSubmonoid
A commutative star monoid is a star module over itself via Monoid.toMulAction
.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Instance needed to define star-linear maps over a commutative star ring (ex: conjugate-linear maps when R = ℂ).
Equations
- ⋯ = ⋯
Instances #
Equations
- Units.instStarMulUnitsInstMulUnits = StarMul.mk ⋯
Equations
- ⋯ = ⋯
Equations
- Invertible.star r = { invOf := star ⅟r, invOf_mul_self := ⋯, mul_invOf_self := ⋯ }
The opposite type carries the same star operation.
Equations
- MulOpposite.instStarMulOpposite = { star := fun (r : Rᵐᵒᵖ) => MulOpposite.op (star (MulOpposite.unop r)) }
Equations
- MulOpposite.instInvolutiveStarMulOpposite = InvolutiveStar.mk ⋯
Equations
- MulOpposite.instStarMulMulOppositeMul = StarMul.mk ⋯
Equations
- MulOpposite.instStarAddMonoidMulOppositeAddMonoid = StarAddMonoid.mk ⋯
Equations
- MulOpposite.instStarRingMulOppositeInstNonUnitalNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiring = StarRing.mk ⋯
A commutative star monoid is a star module over its opposite via
Monoid.toOppositeMulAction
.
Equations
- ⋯ = ⋯