mathlib3 documentation

algebra.star.basic

Star monoids, rings, and modules #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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.

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.

@[class]
structure has_star (R : 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 star_mem_class (S : Type u_1) (R : Type u_2) [has_star R] [set_like S R] :

star_mem_class S G states S is a type of subsets s ⊆ G closed under star.

Instances of this typeclass
Instances of other typeclasses for star_mem_class
  • star_mem_class.has_sizeof_inst
@[protected, instance]
def star_mem_class.has_star {R S : Type u} [has_star R] [set_like S R] [hS : star_mem_class S R] (s : S) :
Equations
@[simp]
theorem star_star {R : Type u} [has_involutive_star R] (r : R) :
@[simp]
theorem star_inj {R : Type u} [has_involutive_star R] {x y : R} :
@[protected]

star as an equivalence when it is involutive.

Equations
theorem eq_star_of_eq_star {R : Type u} [has_involutive_star R] {r s : R} (h : r = has_star.star s) :
@[class]
structure has_trivial_star (R : Type u) [has_star R] :
Prop

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

Instances of this typeclass
@[class]
structure star_semigroup (R : Type u) [semigroup R] :

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
theorem star_star_mul {R : Type u} [semigroup R] [star_semigroup R] (x y : R) :
theorem star_mul_star {R : Type u} [semigroup R] [star_semigroup R] (x y : R) :

Alias of the reverse direction of semiconj_by_star_star_star.

@[simp]
theorem commute_star_star {R : Type u} [semigroup R] [star_semigroup R] {x y : R} :
theorem commute.star_star {R : Type u} [semigroup R] [star_semigroup R] {x y : R} :

Alias of the reverse direction of commute_star_star.

@[simp]
theorem star_mul' {R : Type u} [comm_semigroup R] [star_semigroup R] (x y : R) :

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

star as an mul_equiv from R to Rᵐᵒᵖ

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

When multiplication is commutative, star preserves division.

@[reducible]

Any commutative monoid admits the trivial *-structure.

See note [reducible non-instances].

Equations
theorem star_id_of_comm {R : Type u_1} [comm_semiring R] {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] :

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]
@[simp]
theorem star_zero (R : Type u) [add_monoid R] [star_add_monoid R] :
@[simp]
theorem star_eq_zero {R : Type u} [add_monoid R] [star_add_monoid R] {x : R} :
theorem star_ne_zero {R : Type u} [add_monoid R] [star_add_monoid R] {x : R} :
@[simp]
theorem star_neg {R : Type u} [add_group R] [star_add_monoid R] (r : R) :
@[simp]
theorem star_sub {R : Type u} [add_group R] [star_add_monoid R] (r s : R) :
@[simp]
theorem star_nsmul {R : Type u} [add_monoid R] [star_add_monoid R] (x : R) (n : ) :
@[simp]
theorem star_zsmul {R : Type u} [add_group R] [star_add_monoid R] (x : R) (n : ) :
@[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} [division_ring R] [star_ring R] (r : ) :
@[simp]
theorem star_ring_aut_apply {R : Type u} [comm_semiring R] [star_ring R] (ᾰ : R) :

star as a ring automorphism, for commutative R.

Equations
def star_ring_end (R : Type u) [comm_semiring R] [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} [comm_semiring R] [star_ring R] {x : R} :

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} [comm_semiring R] [star_ring R] (x : R) :
@[protected, instance]
Equations
theorem ring_hom.star_def {R : Type u} {S : Type u_1} [non_assoc_semiring S] [comm_semiring R] [star_ring R] (f : S →+* R) :
theorem ring_hom.star_apply {R : Type u} {S : Type u_1} [non_assoc_semiring S] [comm_semiring R] [star_ring R] (f : S →+* R) (s : S) :
@[simp]
@[simp]
theorem star_zpow₀ {R : Type u} [division_semiring R] [star_ring R] (x : R) (z : ) :
@[simp]
theorem star_div' {R : Type u} [semifield R] [star_ring R] (x y : R) :

When multiplication is commutative, star preserves division.

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

Any commutative semiring admits the trivial *-structure.

See note [reducible non-instances].

Equations
@[class]
structure star_module (R : Type u) (A : Type v) [has_star R] [has_star A] [has_smul R 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]

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)

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 : star_hom_class F R S] :
fun_like F R (λ (_x : R), S)

Instances #

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

The opposite type carries the same star operation.

Equations
@[protected, instance]

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