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 focussing on singleton types
and unique types.
TODO #
The results here should be used to golf the basic Group
lemmas.
Used for field_simp
to deal with inverses of units. This form of the lemma
is essential since field_simp
likes to use inv_eq_one_div
to rewrite
↑u⁻¹ = ↑(1 / u)
.
theorem
AddLeftCancelMonoid.eq_zero_of_add_right
{α : Type u}
[AddLeftCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
a = 0
theorem
LeftCancelMonoid.eq_one_of_mul_right
{α : Type u}
[LeftCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
a = 1
theorem
AddLeftCancelMonoid.eq_zero_of_add_left
{α : Type u}
[AddLeftCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
b = 0
theorem
LeftCancelMonoid.eq_one_of_mul_left
{α : Type u}
[LeftCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
b = 1
@[simp]
theorem
AddLeftCancelMonoid.add_eq_zero
{α : Type u}
[AddLeftCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
:
@[simp]
theorem
LeftCancelMonoid.mul_eq_one
{α : Type u}
[LeftCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
:
theorem
AddLeftCancelMonoid.add_ne_zero
{α : Type u}
[AddLeftCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
:
theorem
LeftCancelMonoid.mul_ne_one
{α : Type u}
[LeftCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
:
theorem
AddRightCancelMonoid.eq_zero_of_add_right
{α : Type u}
[AddRightCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
a = 0
theorem
RightCancelMonoid.eq_one_of_mul_right
{α : Type u}
[RightCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
a = 1
theorem
AddRightCancelMonoid.eq_zero_of_add_left
{α : Type u}
[AddRightCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
b = 0
theorem
RightCancelMonoid.eq_one_of_mul_left
{α : Type u}
[RightCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
b = 1
@[simp]
theorem
AddRightCancelMonoid.add_eq_zero
{α : Type u}
[AddRightCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
:
@[simp]
theorem
RightCancelMonoid.mul_eq_one
{α : Type u}
[RightCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
:
theorem
AddRightCancelMonoid.add_ne_zero
{α : Type u}
[AddRightCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
:
theorem
RightCancelMonoid.mul_ne_one
{α : Type u}
[RightCancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
:
theorem
eq_zero_of_add_right'
{α : Type u}
[AddCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
a = 0
theorem
eq_one_of_mul_right'
{α : Type u}
[CancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
a = 1
theorem
eq_zero_of_add_left'
{α : Type u}
[AddCancelMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
b = 0
theorem
eq_one_of_mul_left'
{α : Type u}
[CancelMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
b = 1
theorem
eq_zero_of_add_right
{α : Type u}
[AddCommMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
a = 0
theorem
eq_one_of_mul_right
{α : Type u}
[CommMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
a = 1
theorem
eq_zero_of_add_left
{α : Type u}
[AddCommMonoid α]
[Subsingleton (AddUnits α)]
{a : α}
{b : α}
(h : a + b = 0)
:
b = 0
theorem
eq_one_of_mul_left
{α : Type u}
[CommMonoid α]
[Subsingleton αˣ]
{a : α}
{b : α}
(h : a * b = 1)
:
b = 1
@[simp]
@[simp]
A subsingleton AddMonoid
has a unique additive unit.
Equations
- instUniqueAddUnitsOfSubsingleton = { toInhabited := AddUnits.instInhabited, uniq := ⋯ }
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_right_injective
{M : Type u_1}
[Monoid M]
{a : M}
(h : IsUnit a)
:
Function.Injective fun (x : M) => a * x
theorem
IsAddUnit.add_left_injective
{M : Type u_1}
[AddMonoid M]
{b : M}
(h : IsAddUnit b)
:
Function.Injective fun (x : M) => x + b
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.isAddUnit_iff_addLeft_bijective
{M : Type u_1}
[AddMonoid M]
{a : M}
:
IsAddUnit a ↔ Function.Bijective fun (x : M) => a + x
theorem
IsUnit.isUnit_iff_mulLeft_bijective
{M : Type u_1}
[Monoid M]
{a : M}
:
IsUnit a ↔ Function.Bijective fun (x : M) => a * x
theorem
IsAddUnit.isAddUnit_iff_addRight_bijective
{M : Type u_1}
[AddMonoid M]
{a : M}
:
IsAddUnit a ↔ Function.Bijective fun (x : M) => x + a
theorem
IsUnit.isUnit_iff_mulRight_bijective
{M : Type u_1}
[Monoid M]
{a : M}
:
IsUnit a ↔ Function.Bijective fun (x : M) => x * a
@[simp]
theorem
IsAddUnit.add_neg_cancel_right
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
@[simp]
theorem
IsUnit.mul_inv_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 : α)
:
@[simp]
theorem
IsUnit.inv_mul_cancel_right
{α : Type u}
[DivisionMonoid α]
{b : α}
(h : IsUnit b)
(a : α)
:
theorem
IsAddUnit.add_neg_eq_zero
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
(h : IsAddUnit b)
:
theorem
IsAddUnit.neg_add_eq_zero
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
(h : IsAddUnit a)
:
theorem
IsAddUnit.add_eq_zero_iff_eq_neg
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
(h : IsAddUnit b)
:
theorem
IsUnit.mul_eq_one_iff_eq_inv
{α : Type u}
[DivisionMonoid α]
{a : α}
{b : α}
(h : IsUnit b)
:
theorem
IsAddUnit.add_eq_zero_iff_neg_eq
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
(h : IsAddUnit a)
:
theorem
IsUnit.mul_eq_one_iff_inv_eq
{α : Type u}
[DivisionMonoid α]
{a : α}
{b : α}
(h : IsUnit a)
:
@[simp]
theorem
IsAddUnit.sub_add_cancel
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
@[simp]
@[simp]
theorem
IsAddUnit.add_sub_cancel_right
{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)
:
@[simp]
theorem
IsUnit.mul_div_cancel_right
{α : Type u}
[DivisionMonoid α]
{b : α}
(h : IsUnit 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_left_inj
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsAddUnit c)
:
theorem
IsUnit.div_left_inj
{α : Type u}
[DivisionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsUnit c)
:
theorem
IsAddUnit.sub_eq_iff
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsAddUnit b)
:
theorem
IsAddUnit.eq_sub_iff
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsAddUnit c)
:
theorem
IsAddUnit.sub_eq_of_eq_add
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsAddUnit b)
:
theorem
IsUnit.div_eq_of_eq_mul
{α : Type u}
[DivisionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsUnit b)
:
theorem
IsAddUnit.eq_sub_of_add_eq
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsAddUnit c)
:
theorem
IsUnit.eq_div_of_mul_eq
{α : Type u}
[DivisionMonoid α]
{a : α}
{b : α}
{c : α}
(h : IsUnit c)
:
theorem
IsAddUnit.sub_eq_zero_iff_eq
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
(h : IsAddUnit b)
:
@[deprecated sub_add_cancel_right]
theorem
IsAddUnit.sub_add_left
{α : Type u}
[SubtractionMonoid α]
{a : α}
{b : α}
(h : IsAddUnit b)
:
@[deprecated div_mul_cancel_right]
theorem
IsAddUnit.add_add_sub
{α : Type u}
[SubtractionMonoid α]
{b : α}
(a : α)
(h : IsAddUnit b)
:
@[deprecated sub_add_cancel_left]
theorem
IsAddUnit.sub_add_right
{α : Type u}
[SubtractionCommMonoid α]
{a : α}
(h : IsAddUnit a)
(b : α)
:
@[deprecated div_mul_cancel_left]
theorem
IsAddUnit.add_sub_cancel_left
{α : 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
{α : 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)
:
theorem
IsUnit.div_div_cancel_left
{α : Type u}
[DivisionCommMonoid α]
{a : α}
{b : α}
(h : IsUnit a)
:
@[deprecated IsUnit.mul_div_cancel]
Alias of IsUnit.mul_div_cancel
.
@[deprecated IsAddUnit.add_sub_cancel]
theorem
IsAddUnit.add_sub_cancel'
{α : Type u}
[SubtractionCommMonoid α]
{a : α}
(h : IsAddUnit a)
(b : α)
:
Alias of IsAddUnit.add_sub_cancel
.