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] [star_ring R]
.
This avoids difficulties with diamond inheritance.
We also define the class star_ordered_ring R
, which says that the order on R
respects the
star operation, i.e. an element r
is nonnegative iff there exists an s
such that
r = star s * s
.
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 semirings, but of course we can prove
star_neg : star (-r) = - star r
when the underlying semiring is a ring.
TODO #
- In a Banach star algebra without a well-defined square root, the natural ordering is given by the
positive cone which is the closure of the sums of elements
star r * r
. A weaker version ofstar_ordered_ring
could be defined for this case. Note that the current definition has the advantage of not requiring a topology.
- star : R → R
Notation typeclass (with no default notation!) for an algebraic structure with a star operation.
- to_has_star : has_star R
- star_involutive : function.involutive star
Typeclass for a star operation with is involutive.
star
as an equivalence when it is involutive.
Typeclass for a trivial star operation. This is mostly meant for ℝ
.
Instances
In a commutative ring, make simp
prefer leaving the order unchanged.
star
as an mul_equiv
from R
to Rᵐᵒᵖ
Equations
- star_mul_equiv = {to_fun := λ (x : R), mul_opposite.op (star x), inv_fun := (equiv.trans (function.involutive.to_perm star star_mul_equiv._proof_1) mul_opposite.op_equiv).inv_fun, left_inv := _, right_inv := _, map_mul' := _}
star
as a mul_aut
for commutative R
.
Equations
- star_mul_aut = {to_fun := star has_involutive_star.to_has_star, inv_fun := (function.involutive.to_perm star star_mul_aut._proof_1).inv_fun, left_inv := _, right_inv := _, map_mul' := _}
When multiplication is commutative, star
preserves division.
Any commutative monoid admits the trivial *
-structure.
See note [reducible non-instances].
Equations
- star_semigroup_of_comm = {to_has_involutive_star := {to_has_star := {star := id R}, star_involutive := _}, star_mul := _}
Note that since star_semigroup_of_comm
is reducible, simp
can already prove this. -
star
as an add_equiv
Equations
- star_add_equiv = {to_fun := star has_involutive_star.to_has_star, inv_fun := (function.involutive.to_perm star star_add_equiv._proof_1).inv_fun, left_inv := _, right_inv := _, map_add' := _}
A *
-ring R
is a (semi)ring with an involutive star
operation which is additive
which makes R
with its multiplicative structure into a *
-semigroup
(i.e. star (r * s) = star s * star r
).
star
as an ring_equiv
from R
to Rᵐᵒᵖ
Equations
- star_ring_equiv = {to_fun := λ (x : R), mul_opposite.op (star x), inv_fun := (star_add_equiv.trans mul_opposite.op_add_equiv).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
star
as a ring automorphism, for commutative R
.
Equations
- star_ring_aut = {to_fun := star has_involutive_star.to_has_star, inv_fun := star_add_equiv.inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
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 complex_conjugate
.
Note that this is the preferred form (over star_ring_aut
, available under the same hypotheses)
because the notation E →ₗ⋆[R] F
for an R
-conjugate-linear map (short for
E →ₛₗ[star_ring_end R] F
) does not pretty-print if there is a coercion involved, as would be the
case for (↑star_ring_aut : R →* R)
.
Equations
This is not a simp lemma, since we usually want simp to keep star_ring_end
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
.
Alias of star_ring_end_self_apply
.
Alias of star_ring_end_self_apply
.
Any commutative semiring admits the trivial *
-structure.
See note [reducible non-instances].
Equations
- star_ring_of_comm = {to_star_semigroup := {to_has_involutive_star := {to_has_star := {star := id R}, star_involutive := _}, star_mul := _}, star_add := _}
Equations
- star_ordered_ring.ordered_add_comm_group = {add := ring.add (show ring R, from _inst_1), add_assoc := _, zero := ring.zero (show ring R, from _inst_1), zero_add := _, add_zero := _, nsmul := ring.nsmul (show ring R, from _inst_1), nsmul_zero' := _, nsmul_succ' := _, neg := ring.neg (show ring R, from _inst_1), sub := ring.sub (show ring R, from _inst_1), sub_eq_add_neg := _, zsmul := ring.zsmul (show ring R, from _inst_1), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, le := partial_order.le (show partial_order R, from _inst_2), lt := partial_order.lt (show partial_order R, from _inst_2), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _}
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] [star_ring R] [add_comm_monoid A] [star_add_monoid A] [module R A]
, and that
the statement only requires [has_star R] [has_star A] [has_scalar R A]
.
If used as [comm_ring R] [star_ring R] [semiring A] [star_ring A] [algebra R A]
, this represents a
star algebra.
A commutative star monoid is a star module over itself via monoid.to_mul_action
.
Instance needed to define star-linear maps over a commutative star ring (ex: conjugate-linear maps when R = ℂ).
Instances #
Equations
- invertible.star r = {inv_of := star (⅟ r), inv_of_mul_self := _, mul_inv_of_self := _}
The opposite type carries the same star operation.
Equations
- mul_opposite.has_star = {star := λ (r : Rᵐᵒᵖ), mul_opposite.op (star (mul_opposite.unop r))}
A commutative star monoid is a star module over its opposite via
monoid.to_opposite_mul_action
.