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
- add_units.has_coe = {coe := add_units.val _inst_1}
Equations
- units.has_coe = {coe := units.val _inst_1}
See Note [custom simps projection]
Equations
- units.simps.coe u = ↑u
See Note [custom simps projection]
Equations
See Note [custom simps projection]
Equations
See Note [custom simps projection]
Equations
Equations
- add_units.decidable_eq = λ (a b : add_units α), decidable_of_iff' (↑a = ↑b) add_units.ext_iff
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 := _, npow := div_inv_monoid.npow._default {val := 1, inv := 1, val_inv := _, inv_val := _} (λ (u₁ u₂ : units α), {val := (u₁.val) * u₂.val, inv := (u₂.inv) * u₁.inv, val_inv := _, inv_val := _}) units.group._proof_8 units.group._proof_9, npow_zero' := _, npow_succ' := _, inv := has_inv.inv units.has_inv, div := div_inv_monoid.div._default (λ (u₁ u₂ : units α), {val := (u₁.val) * u₂.val, inv := (u₂.inv) * u₁.inv, val_inv := _, inv_val := _}) units.group._proof_12 {val := 1, inv := 1, val_inv := _, inv_val := _} units.group._proof_13 units.group._proof_14 (div_inv_monoid.npow._default {val := 1, inv := 1, val_inv := _, inv_val := _} (λ (u₁ u₂ : units α), {val := (u₁.val) * u₂.val, inv := (u₂.inv) * u₁.inv, val_inv := _, inv_val := _}) units.group._proof_8 units.group._proof_9) units.group._proof_15 units.group._proof_16 has_inv.inv, div_eq_mul_inv := _, zpow := div_inv_monoid.zpow._default (λ (u₁ u₂ : units α), {val := (u₁.val) * u₂.val, inv := (u₂.inv) * u₁.inv, val_inv := _, inv_val := _}) units.group._proof_18 {val := 1, inv := 1, val_inv := _, inv_val := _} units.group._proof_19 units.group._proof_20 (div_inv_monoid.npow._default {val := 1, inv := 1, val_inv := _, inv_val := _} (λ (u₁ u₂ : units α), {val := (u₁.val) * u₂.val, inv := (u₂.inv) * u₁.inv, val_inv := _, inv_val := _}) units.group._proof_8 units.group._proof_9) units.group._proof_21 units.group._proof_22 has_inv.inv, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _}
Equations
- add_units.add_group = {add := λ (u₁ u₂ : add_units α), {val := u₁.val + u₂.val, neg := u₂.neg + u₁.neg, val_neg := _, neg_val := _}, add_assoc := _, zero := {val := 0, neg := 0, val_neg := _, neg_val := _}, zero_add := _, add_zero := _, nsmul := sub_neg_monoid.nsmul._default {val := 0, neg := 0, val_neg := _, neg_val := _} (λ (u₁ u₂ : add_units α), {val := u₁.val + u₂.val, neg := u₂.neg + u₁.neg, val_neg := _, neg_val := _}) add_units.add_group._proof_8 add_units.add_group._proof_9, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg add_units.has_neg, sub := sub_neg_monoid.sub._default (λ (u₁ u₂ : add_units α), {val := u₁.val + u₂.val, neg := u₂.neg + u₁.neg, val_neg := _, neg_val := _}) add_units.add_group._proof_12 {val := 0, neg := 0, val_neg := _, neg_val := _} add_units.add_group._proof_13 add_units.add_group._proof_14 (sub_neg_monoid.nsmul._default {val := 0, neg := 0, val_neg := _, neg_val := _} (λ (u₁ u₂ : add_units α), {val := u₁.val + u₂.val, neg := u₂.neg + u₁.neg, val_neg := _, neg_val := _}) add_units.add_group._proof_8 add_units.add_group._proof_9) add_units.add_group._proof_15 add_units.add_group._proof_16 has_neg.neg, sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul._default (λ (u₁ u₂ : add_units α), {val := u₁.val + u₂.val, neg := u₂.neg + u₁.neg, val_neg := _, neg_val := _}) add_units.add_group._proof_18 {val := 0, neg := 0, val_neg := _, neg_val := _} add_units.add_group._proof_19 add_units.add_group._proof_20 (sub_neg_monoid.nsmul._default {val := 0, neg := 0, val_neg := _, neg_val := _} (λ (u₁ u₂ : add_units α), {val := u₁.val + u₂.val, neg := u₂.neg + u₁.neg, val_neg := _, neg_val := _}) add_units.add_group._proof_8 add_units.add_group._proof_9) add_units.add_group._proof_21 add_units.add_group._proof_22 has_neg.neg, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _}
Equations
- units.inhabited = {default := 1}
Equations
- add_units.inhabited = {default := 0}
Equations
- add_units.add_comm_group = {add := add_group.add add_units.add_group, add_assoc := _, zero := add_group.zero add_units.add_group, zero_add := _, add_zero := _, nsmul := add_group.nsmul add_units.add_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_group.neg add_units.add_group, sub := add_group.sub add_units.add_group, sub_eq_add_neg := _, zsmul := add_group.zsmul add_units.add_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _}
Equations
- units.comm_group = {mul := group.mul units.group, mul_assoc := _, one := group.one units.group, one_mul := _, mul_one := _, npow := group.npow units.group, npow_zero' := _, npow_succ' := _, inv := group.inv units.group, div := group.div units.group, div_eq_mul_inv := _, zpow := group.zpow units.group, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _, mul_comm := _}
Equations
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
.
Equations
- is_add_unit a = ∃ (u : add_units M), ↑u = a
Equations
- units.unique = {to_inhabited := {default := 1}, uniq := _}
Addition of a u : add_units M
on the right doesn't
affect is_add_unit
.
Addition of a u : add_units M
on the left doesn't
affect is_add_unit
.
The element of the additive group of additive units, corresponding to an element of an additive monoid which is an additive unit.
Equations
- h.unit = (classical.some h).copy a _ (↑-classical.some h) _
The element of the group of units, corresponding to an element of a monoid which is a unit.
Equations
- h.unit = (classical.some h).copy a _ ↑(classical.some h)⁻¹ _
Constructs a group
structure on a monoid
consisting only of units.
Equations
- group_of_is_unit h = {mul := monoid.mul hM, mul_assoc := _, one := monoid.one hM, one_mul := _, mul_one := _, npow := monoid.npow hM, npow_zero' := _, npow_succ' := _, inv := λ (a : M), ↑(_.unit)⁻¹, div := div_inv_monoid.div._default monoid.mul monoid.mul_assoc monoid.one monoid.one_mul monoid.mul_one monoid.npow monoid.npow_zero' monoid.npow_succ' (λ (a : M), ↑(_.unit)⁻¹), div_eq_mul_inv := _, zpow := div_inv_monoid.zpow._default monoid.mul monoid.mul_assoc monoid.one monoid.one_mul monoid.mul_one monoid.npow monoid.npow_zero' monoid.npow_succ' (λ (a : M), ↑(_.unit)⁻¹), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _}
Constructs a comm_group
structure on a comm_monoid
consisting only of units.
Equations
- comm_group_of_is_unit h = {mul := comm_monoid.mul hM, mul_assoc := _, one := comm_monoid.one hM, one_mul := _, mul_one := _, npow := comm_monoid.npow hM, npow_zero' := _, npow_succ' := _, inv := λ (a : M), ↑(_.unit)⁻¹, div := group.div._default comm_monoid.mul comm_monoid.mul_assoc comm_monoid.one comm_monoid.one_mul comm_monoid.mul_one comm_monoid.npow comm_monoid.npow_zero' comm_monoid.npow_succ' (λ (a : M), ↑(_.unit)⁻¹), div_eq_mul_inv := _, zpow := group.zpow._default comm_monoid.mul comm_monoid.mul_assoc comm_monoid.one comm_monoid.one_mul comm_monoid.mul_one comm_monoid.npow comm_monoid.npow_zero' comm_monoid.npow_succ' (λ (a : M), ↑(_.unit)⁻¹), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _, mul_comm := _}