Units (i.e., invertible elements) of a monoid #
An element of a Monoid is a unit if it has a two-sided inverse.
This file contains the basic lemmas on units in a monoid, especially focusing on singleton types
and unique types.
TODO #
The results here should be used to golf the basic Group lemmas.
theorem
eq_one_of_mul_right
{α : Type u}
[Monoid α]
[IsDedekindFiniteMonoid α]
[Subsingleton αˣ]
{a b : α}
(h : a * b = 1)
:
theorem
eq_zero_of_add_right
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
(h : a + b = 0)
:
theorem
eq_one_of_mul_left
{α : Type u}
[Monoid α]
[IsDedekindFiniteMonoid α]
[Subsingleton αˣ]
{a b : α}
(h : a * b = 1)
:
theorem
eq_zero_of_add_left
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
(h : a + b = 0)
:
@[simp]
@[simp]
theorem
add_eq_zero
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
:
theorem
add_ne_zero
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
:
@[deprecated eq_one_of_mul_left (since := "2026-07-07")]
theorem
eq_one_of_mul_left'
{α : Type u}
[Monoid α]
[IsDedekindFiniteMonoid α]
[Subsingleton αˣ]
{a b : α}
(h : a * b = 1)
:
Alias of eq_one_of_mul_left.
@[deprecated eq_zero_of_add_left (since := "2026-07-07")]
theorem
eq_zero_of_add_left'
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
(h : a + b = 0)
:
Alias of eq_zero_of_add_left.
@[deprecated eq_one_of_mul_right (since := "2026-07-07")]
theorem
eq_one_of_mul_right'
{α : Type u}
[Monoid α]
[IsDedekindFiniteMonoid α]
[Subsingleton αˣ]
{a b : α}
(h : a * b = 1)
:
Alias of eq_one_of_mul_right.
@[deprecated eq_zero_of_add_right (since := "2026-07-07")]
theorem
eq_zero_of_add_right'
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
(h : a + b = 0)
:
Alias of eq_zero_of_add_right.
@[deprecated mul_eq_one (since := "2026-07-07")]
theorem
mul_eq_one'
{α : Type u}
[Monoid α]
[IsDedekindFiniteMonoid α]
[Subsingleton αˣ]
{a b : α}
:
Alias of mul_eq_one.
@[deprecated add_eq_zero (since := "2026-07-07")]
theorem
add_eq_zero'
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
:
Alias of add_eq_zero.
@[deprecated mul_ne_one (since := "2026-07-07")]
theorem
mul_ne_one'
{α : Type u}
[Monoid α]
[IsDedekindFiniteMonoid α]
[Subsingleton αˣ]
{a b : α}
:
Alias of mul_ne_one.
@[deprecated add_ne_zero (since := "2026-07-07")]
theorem
add_ne_zero'
{α : Type u}
[AddMonoid α]
[IsDedekindFiniteAddMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
:
Alias of add_ne_zero.
instance
instCanLiftAddUnitsValIsAddUnit
{M : Type u_1}
[AddMonoid M]
:
CanLift M (AddUnits M) AddUnits.val IsAddUnit
@[instance_reducible]
A subsingleton Monoid has a unique unit.
Equations
- instUniqueUnitsOfSubsingleton = { toInhabited := Units.instInhabited, uniq := ⋯ }
@[instance_reducible]
A subsingleton AddMonoid has a unique additive unit.
Equations
- instUniqueAddUnitsOfSubsingleton = { toInhabited := AddUnits.instInhabited, uniq := ⋯ }
theorem
IsUnit.mul_right_injective
{M : Type u_1}
[Monoid M]
{a : M}
(h : IsUnit a)
:
Function.Injective fun (x : M) => a * x
theorem
IsAddUnit.add_right_injective
{M : Type u_1}
[AddMonoid M]
{a : M}
(h : IsAddUnit a)
:
Function.Injective fun (x : M) => a + x
theorem
IsUnit.mul_left_injective
{M : Type u_1}
[Monoid M]
{b : M}
(h : IsUnit b)
:
Function.Injective fun (x : M) => x * b
theorem
IsAddUnit.add_left_injective
{M : Type u_1}
[AddMonoid M]
{b : M}
(h : IsAddUnit b)
:
Function.Injective fun (x : M) => x + b
@[simp]
theorem
IsUnit.mul_inv_cancel_right
{α : Type u}
[DivisionMonoid α]
{b : α}
(h : IsUnit b)
(a : α)
:
@[simp]
theorem
IsAddUnit.add_neg_cancel_right
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
@[simp]
theorem
IsUnit.inv_mul_cancel_right
{α : Type u}
[DivisionMonoid α]
{b : α}
(h : IsUnit b)
(a : α)
:
@[simp]
theorem
IsAddUnit.neg_add_cancel_right
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
theorem
IsAddUnit.add_eq_zero_iff_eq_neg
{α : Type u}
[SubtractionMonoid α]
{a b : α}
(h : IsAddUnit b)
:
theorem
IsAddUnit.add_eq_zero_iff_neg_eq
{α : Type u}
[SubtractionMonoid α]
{a b : α}
(h : IsAddUnit a)
:
@[simp]
@[simp]
theorem
IsAddUnit.sub_add_cancel
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
@[simp]
theorem
IsUnit.mul_div_cancel_right
{α : Type u}
[DivisionMonoid α]
{b : α}
(h : IsUnit b)
(a : α)
:
@[simp]
theorem
IsAddUnit.add_sub_cancel_right
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
theorem
IsAddUnit.add_zero_sub_cancel
{α : Type u}
[SubtractionMonoid α]
{a : α}
(h : IsAddUnit a)
:
theorem
IsAddUnit.zero_sub_add_cancel
{α : Type u}
[SubtractionMonoid α]
{a : α}
(h : IsAddUnit a)
:
theorem
IsAddUnit.sub_eq_of_eq_add
{α : Type u}
[SubtractionMonoid α]
{a b c : α}
(h : IsAddUnit b)
:
theorem
IsAddUnit.eq_sub_of_add_eq
{α : Type u}
[SubtractionMonoid α]
{a b c : α}
(h : IsAddUnit c)
:
theorem
IsAddUnit.sub_eq_zero_iff_eq
{α : Type u}
[SubtractionMonoid α]
{a b : α}
(h : IsAddUnit b)
:
theorem
IsAddUnit.add_add_sub
{α : Type u}
[SubtractionMonoid α]
{b : α}
(a : α)
(h : IsAddUnit b)
:
theorem
IsAddUnit.sub_add_right
{α : Type u}
[SubtractionCommMonoid α]
{a : α}
(h : IsAddUnit a)
(b : α)
:
theorem
IsUnit.mul_div_cancel_left
{α : Type u}
[DivisionCommMonoid α]
{a : α}
(h : IsUnit a)
(b : α)
:
theorem
IsAddUnit.add_sub_cancel_left
{α : Type u}
[SubtractionCommMonoid α]
{a : α}
(h : IsAddUnit a)
(b : α)
:
theorem
IsAddUnit.add_sub_cancel
{α : Type u}
[SubtractionCommMonoid α]
{a : α}
(h : IsAddUnit a)
(b : α)
:
theorem
IsAddUnit.sub_sub_cancel
{α : Type u}
[SubtractionCommMonoid α]
{a b : α}
(h : IsAddUnit a)
:
theorem
IsAddUnit.sub_sub_cancel_left
{α : Type u}
[SubtractionCommMonoid α]
{a b : α}
(h : IsAddUnit a)
: