Units (i.e., invertible elements) of a monoid #
An element of a Monoid is a unit if it has a two-sided inverse.
Main declarations #
Units M: the group of units (i.e., invertible elements) of a monoid.IsUnit x: a predicate asserting thatxis a unit (i.e., invertible element) of a monoid.
For both declarations, there is an additive counterpart: AddUnits and IsAddUnit.
See also Prime, Associated, and Irreducible in
Mathlib/Algebra/GroupWithZero/Associated.lean.
Notation #
We provide Mˣ as notation for Units M,
resembling the notation $R^{\times}$ for the units of a ring, which is common in mathematics.
TODO #
The results here should be used to golf the basic Group lemmas.
Units of a Monoid, bundled version. Notation: αˣ.
An element of a Monoid is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see IsUnit.
- val : α
The underlying value in the base
Monoid. - inv : α
- val_inv : ↑self * self.inv = 1
- inv_val : self.inv * ↑self = 1
Instances For
Units of an AddMonoid, bundled version.
An element of an AddMonoid is a unit if it has a two-sided additive inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see isAddUnit.
- val : α
The underlying value in the base
AddMonoid. - neg : α
- val_neg : ↑self + self.neg = 0
- neg_val : self.neg + ↑self = 0
Instances For
A unit can be interpreted as a term in the base Monoid.
An additive unit can be interpreted as a term in the base AddMonoid.
The inverse of a unit in a Monoid.
The additive inverse of an additive unit in an AddMonoid.
See Note [custom simps projection]
Instances For
See Note [custom simps projection]
Instances For
Units have decidable equality if the base Monoid has decidable equality.
Additive units have decidable equality
if the base AddMonoid has decidable equality.
Units of a monoid have an induced multiplication.
Additive units of an additive monoid have an induced addition.
Units of a monoid have a unit
Additive units of an additive monoid have a zero.
Units of a monoid have a multiplication and multiplicative identity.
Additive units of an additive monoid have an addition and an additive identity.
Units of a monoid are inhabited because 1 is a unit.
Additive units of an additive monoid are inhabited because 0 is an additive unit.
Units of a monoid have a representation of the base value in the Monoid.
Additive units of an additive monoid have a representation of the base value in
the AddMonoid.
Units of a monoid have division
Additive units of an additive monoid have subtraction.
Units of a monoid form a DivInvMonoid.
Additive units of an additive monoid form a SubNegMonoid.
Units of a monoid form a group.
Additive units of an additive monoid form an additive group.
Units of a commutative monoid form a commutative group.
Additive units of an additive commutative monoid form an additive commutative group.
For a, b in a Dedekind-finite monoid such that a * b = 1, makes a unit out of a.
Instances For
For a, b in a Dedekind-finite additive monoid such that a + b = 0,
makes an addUnit out of a.
Instances For
Partial division, denoted a /ₚ u. It is defined when the
second argument is invertible, and unlike the division operator
in DivisionRing it is not totalized at zero.
Instances For
Partial division, denoted a /ₚ u. It is defined when the
second argument is invertible, and unlike the division operator
in DivisionRing it is not totalized at zero.
Instances For
See isUnit_iff_exists_and_exists for a similar lemma with two existentials.
See isAddUnit_iff_exists_and_exists for a similar lemma with two existentials.
See isUnit_iff_exists for a similar lemma with one existential.
See isAddUnit_iff_exists for a similar lemma with one existential.
Alias of IsUnit.of_mul_eq_one.
Alias of IsUnit.of_mul_eq_one_right.
Alias of Units.eq_one.
Multiplication by a u : Mˣ on the right doesn't affect IsUnit.
Multiplication by a u : Mˣ on the left doesn't affect IsUnit.
The element of the group of units, corresponding to an element of a monoid which is a unit. When
α is a DivisionMonoid, use IsUnit.unit' instead.
Instances For
The element of the additive group of additive units, corresponding to an element
of an additive monoid which is an additive unit. When α is a SubtractionMonoid, use
IsAddUnit.addUnit' instead.
Instances For
The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to IsUnit.unit, the inverse is computable and comes from the inversion on α. This is
useful to transfer properties of inversion in Units α to α. See also toUnits.
Instances For
The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to IsAddUnit.addUnit, the negation is
computable and comes from the negation on α. This is useful to transfer properties of negation
in AddUnits α to α. See also toAddUnits.
Instances For
Constructs an inv operation for a Monoid consisting only of units.
Instances For
Constructs a CommGroup structure on a CommMonoid consisting only of units.