Units (i.e., invertible elements) of a multiplicative monoid
Units of an add_monoid, bundled version. An element of an add_monoid 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 is_add_unit
.
Equations
- units.has_coe = {coe := units.val _inst_1}
Equations
- units.decidable_eq = λ (a b : units α), decidable_of_iff' (↑a = ↑b) units.ext_iff
Units of a monoid form a group.
Equations
- units.group = {mul := λ (u₁ u₂ : units α), {val := u₁.val * u₂.val, inv := u₂.inv * u₁.inv, val_inv := _, inv_val := _}, mul_assoc := _, one := {val := 1, inv := 1, val_inv := _, inv_val := _}, one_mul := _, mul_one := _, inv := λ (u : units α), {val := u.inv, inv := u.val, val_inv := _, inv_val := _}, mul_left_inv := _}
Equations
- units.inhabited = {default := 1}
Equations
- units.comm_group = {mul := group.mul units.group, mul_assoc := _, one := group.one units.group, one_mul := _, mul_one := _, inv := group.inv units.group, mul_left_inv := _, mul_comm := _}
For a, b
in an add_comm_monoid
such that a + b = 0
, makes an add_unit
out of a
.
For a, b
in a comm_monoid
such that a * b = 1
, makes a unit out of a
.
is_unit
predicate
In this file we define the is_unit
predicate on a monoid
, and
prove a few basic properties. For the bundled version see units
. See
also prime
, associated
, and irreducible
in algebra/associated
.
An element a : M
of an add_monoid is an add_unit
if it has
a two-sided additive inverse. The actual definition says that a
is equal to some
u : add_units M
, where add_units M
is a bundled version of is_add_unit
.
Addition of a u : add_units M
doesn't affect
is_add_unit
.
The element of the group of units, corresponding to an element of a monoid which is a unit.
Equations
- h.unit = classical.some h