# mathlibdocumentation

algebra.star.basic

# 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 of star_ordered_ring could be defined for this case. Note that the current definition has the advantage of not requiring a topology.
@[class]
structure has_star (R : Type u) :
Type u
• star : R → R

Notation typeclass (with no default notation!) for an algebraic structure with a star operation.

Instances of this typeclass
Instances of other typeclasses for has_star
• has_star.has_sizeof_inst
@[class]
structure has_involutive_star (R : Type u) :
Type u
• to_has_star :
• star_involutive :

Typeclass for a star operation with is involutive.

Instances of this typeclass
Instances of other typeclasses for has_involutive_star
• has_involutive_star.has_sizeof_inst
@[simp]
theorem star_star {R : Type u} (r : R) :
theorem star_injective {R : Type u}  :
@[protected]
def equiv.star {R : Type u}  :

star as an equivalence when it is involutive.

Equations
theorem eq_star_of_eq_star {R : Type u} {r s : R} (h : r = ) :
theorem eq_star_iff_eq_star {R : Type u} {r s : R} :
theorem star_eq_iff_star_eq {R : Type u} {r s : R} :
@[class]
structure has_trivial_star (R : Type u) [has_star R] :
Prop
• star_trivial : ∀ (r : R),

Typeclass for a trivial star operation. This is mostly meant for ℝ.

Instances of this typeclass
@[class]
structure star_semigroup (R : Type u) [semigroup R] :
Type u
• to_has_involutive_star :
• star_mul : ∀ (r s : R), has_star.star (r * s) =

A *-semigroup is a semigroup R with an involutive operations star so star (r * s) = star s * star r.

Instances of this typeclass
Instances of other typeclasses for star_semigroup
• star_semigroup.has_sizeof_inst
@[simp]
theorem star_mul' {R : Type u} (x y : R) :

In a commutative ring, make simp prefer leaving the order unchanged.

def star_mul_equiv {R : Type u} [semigroup R]  :

star as an mul_equiv from R to Rᵐᵒᵖ

Equations
@[simp]
theorem star_mul_equiv_apply {R : Type u} [semigroup R] (x : R) :
@[simp]
theorem star_mul_aut_apply {R : Type u} (ᾰ : R) :
def star_mul_aut {R : Type u}  :

star as a mul_aut for commutative R.

Equations
@[simp]
theorem star_one (R : Type u) [monoid R]  :
@[simp]
theorem star_pow {R : Type u} [monoid R] (x : R) (n : ) :
@[simp]
theorem star_inv {R : Type u} [group R] (x : R) :
@[simp]
theorem star_zpow {R : Type u} [group R] (x : R) (z : ) :
@[simp]
theorem star_div {R : Type u} [comm_group R] (x y : R) :

When multiplication is commutative, star preserves division.

@[simp]
theorem star_prod {R : Type u} [comm_monoid R] {α : Type u_1} (s : finset α) (f : α → R) :
has_star.star (s.prod (λ (x : α), f x)) = s.prod (λ (x : α), has_star.star (f x))
@[reducible]
def star_semigroup_of_comm {R : Type u_1} [comm_monoid R] :

Any commutative monoid admits the trivial *-structure.

Equations
theorem star_id_of_comm {R : Type u_1} {x : R} :

Note that since star_semigroup_of_comm is reducible, simp can already prove this. -

@[class]
structure star_add_monoid (R : Type u) [add_monoid R] :
Type u
• to_has_involutive_star :
• star_add : ∀ (r s : R), has_star.star (r + s) =

A *-additive monoid R is an additive monoid with an involutive star operation which preserves addition.

Instances of this typeclass
Instances of other typeclasses for star_add_monoid
• star_add_monoid.has_sizeof_inst
@[simp]
theorem star_add_equiv_apply {R : Type u} [add_monoid R] (ᾰ : R) :
def star_add_equiv {R : Type u} [add_monoid R]  :
R ≃+ R

star as an add_equiv

Equations
@[simp]
theorem star_zero (R : Type u) [add_monoid R]  :
@[simp]
theorem star_eq_zero {R : Type u} [add_monoid R] {x : R} :
x = 0
theorem star_ne_zero {R : Type u} [add_monoid R] {x : R} :
x 0
@[simp]
theorem star_neg {R : Type u} [add_group R] (r : R) :
@[simp]
theorem star_sub {R : Type u} [add_group R] (r s : R) :
@[simp]
theorem star_nsmul {R : Type u} [add_monoid R] (x : R) (n : ) :
@[simp]
theorem star_zsmul {R : Type u} [add_group R] (x : R) (n : ) :
@[simp]
theorem star_sum {R : Type u} {α : Type u_1} (s : finset α) (f : α → R) :
has_star.star (s.sum (λ (x : α), f x)) = s.sum (λ (x : α), has_star.star (f x))
@[class]
structure star_ring (R : Type u)  :
Type u

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).

Instances of this typeclass
Instances of other typeclasses for star_ring
• star_ring.has_sizeof_inst
@[protected, instance]
def star_ring.to_star_add_monoid {R : Type u} [star_ring R] :
Equations
@[simp]
theorem star_ring_equiv_apply {R : Type u} [star_ring R] (x : R) :
def star_ring_equiv {R : Type u} [star_ring R] :

star as an ring_equiv from R to Rᵐᵒᵖ

Equations
@[simp, norm_cast]
theorem star_nat_cast {R : Type u} [semiring R] [star_ring R] (n : ) :
@[simp, norm_cast]
theorem star_int_cast {R : Type u} [ring R] [star_ring R] (z : ) :
@[simp, norm_cast]
theorem star_rat_cast {R : Type u} [star_ring R] (r : ) :
@[simp]
theorem star_ring_aut_apply {R : Type u} [star_ring R] (ᾰ : R) :
def star_ring_aut {R : Type u} [star_ring R] :

star as a ring automorphism, for commutative R.

Equations
def star_ring_end (R : Type u) [star_ring R] :
R →+* R

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
Instances for star_ring_end
theorem star_ring_end_apply {R : Type u} [star_ring R] {x : R} :
x =

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.

@[simp]
theorem star_ring_end_self_apply {R : Type u} [star_ring R] (x : R) :
( x) = x
theorem complex.conj_conj {R : Type u} [star_ring R] (x : R) :
( x) = x

Alias of star_ring_end_self_apply.

theorem is_R_or_C.conj_conj {R : Type u} [star_ring R] (x : R) :
( x) = x

Alias of star_ring_end_self_apply.

@[simp]
theorem star_inv' {R : Type u} [star_ring R] (x : R) :
@[simp]
theorem star_zpow₀ {R : Type u} [star_ring R] (x : R) (z : ) :
@[simp]
theorem star_div' {R : Type u} [field R] [star_ring R] (x y : R) :

When multiplication is commutative, star preserves division.

@[simp]
theorem star_bit0 {R : Type u} [add_monoid R] (r : R) :
=
@[simp]
theorem star_bit1 {R : Type u} [semiring R] [star_ring R] (r : R) :
=
@[reducible]
def star_ring_of_comm {R : Type u_1}  :

Any commutative semiring admits the trivial *-structure.

Equations
@[class]
structure star_ordered_ring (R : Type u)  :
Type u
• to_star_ring :
• add_le_add_left : ∀ (a b : R), a b∀ (c : R), c + a c + b
• nonneg_iff : ∀ (r : R), 0 r ∃ (s : R), r =

An ordered *-ring is a ring which is both an ordered_add_comm_group and a *-ring, and 0 ≤ r ↔ ∃ s, r = star s * s.

Instances of this typeclass
Instances of other typeclasses for star_ordered_ring
• star_ordered_ring.has_sizeof_inst
@[protected, instance]
Equations
theorem star_mul_self_nonneg {R : Type u} {r : R} :
0
theorem star_mul_self_nonneg' {R : Type u} {r : R} :
0
@[class]
structure star_module (R : Type u) (A : Type v) [has_star R] [has_star A] [ A] :
Prop

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_smul R A].

If used as [comm_ring R] [star_ring R] [semiring A] [star_ring A] [algebra R A], this represents a star algebra.

Instances of this typeclass
@[protected, instance]
def star_semigroup.to_star_module {R : Type u} [comm_monoid R]  :
R

A commutative star monoid is a star module over itself via monoid.to_mul_action.

@[protected, instance]

Instance needed to define star-linear maps over a commutative star ring (ex: conjugate-linear maps when R = ℂ).

@[class]
structure star_hom_class (F : Type u_1) (R : out_param (Type u_2)) (S : out_param (Type u_3)) [has_star R] [has_star S] :
Type (max u_1 u_2 u_3)
• coe : F → Π (a : R), (λ (_x : R), S) a
• coe_injective' :
• map_star : ∀ (f : F) (r : R), f = has_star.star (f r)

star_hom_class F R S states that F is a type of star-preserving maps from R to S.

Instances of this typeclass
Instances of other typeclasses for star_hom_class
• star_hom_class.has_sizeof_inst
@[instance]
def star_hom_class.to_fun_like (F : Type u_1) (R : out_param (Type u_2)) (S : out_param (Type u_3)) [has_star R] [has_star S] [self : S] :
R (λ (_x : R), S)

### Instances #

@[protected, instance]
def units.star_semigroup {R : Type u} [monoid R]  :
Equations
@[simp]
theorem units.coe_star {R : Type u} [monoid R] (u : Rˣ) :
@[simp]
theorem units.coe_star_inv {R : Type u} [monoid R] (u : Rˣ) :
@[protected, instance]
def units.star_module {R : Type u} [monoid R] {A : Type u_1} [has_star A] [ A] [ A] :
A
theorem is_unit.star {R : Type u} [monoid R] {a : R} :
@[simp]
theorem is_unit_star {R : Type u} [monoid R] {a : R} :
theorem ring.inverse_star {R : Type u} [semiring R] [star_ring R] (a : R) :
@[protected, instance]
def invertible.star {R : Type u_1} [monoid R] (r : R) [invertible r] :
Equations
theorem star_inv_of {R : Type u_1} [monoid R] (r : R) [invertible r] [invertible ] :
@[protected, instance]
def mul_opposite.has_star {R : Type u} [has_star R] :

The opposite type carries the same star operation.

Equations
@[simp]
theorem mul_opposite.unop_star {R : Type u} [has_star R] (r : Rᵐᵒᵖ) :
@[simp]
theorem mul_opposite.op_star {R : Type u} [has_star R] (r : R) :
@[protected, instance]
def mul_opposite.has_involutive_star {R : Type u}  :
Equations
@[protected, instance]
def mul_opposite.star_semigroup {R : Type u} [monoid R]  :
Equations
@[protected, instance]
def mul_opposite.star_add_monoid {R : Type u} [add_monoid R]  :
Equations
@[protected, instance]
def mul_opposite.star_ring {R : Type u} [semiring R] [star_ring R] :
Equations
@[protected, instance]

A commutative star monoid is a star module over its opposite via monoid.to_opposite_mul_action.