# Documentation

Mathlib.Algebra.Regular.Basic

# Regular elements #

We introduce left-regular, right-regular and regular elements, along with their to_additive analogues add-left-regular, add-right-regular and add-regular elements.

By definition, a regular element in a commutative ring is a non-zero divisor. Lemma isRegular_of_ne_zero implies that every non-zero element of an integral domain is regular. Since it assumes that the ring is a CancelMonoidWithZero it applies also, for instance, to ℕ.

The lemmas in Section MulZeroClass show that the 0 element is (left/right-)regular if and only if the MulZeroClass is trivial. This is useful when figuring out stopping conditions for regular sequences: if 0 is ever an element of a regular sequence, then we can extend the sequence by adding one further 0.

The final goal is to develop part of the API to prove, eventually, results about non-zero-divisors.

def IsAddLeftRegular {R : Type u_1} [Add R] (c : R) :

An add-left-regular element is an element c such that addition on the left by c is injective.

Instances For
def IsLeftRegular {R : Type u_1} [Mul R] (c : R) :

A left-regular element is an element c such that multiplication on the left by c is injective.

Instances For
def IsAddRightRegular {R : Type u_1} [Add R] (c : R) :

An add-right-regular element is an element c such that addition on the right by c is injective.

Instances For
def IsRightRegular {R : Type u_1} [Mul R] (c : R) :

A right-regular element is an element c such that multiplication on the right by c is injective.

Instances For
structure IsAddRegular {R : Type u_2} [Add R] (c : R) :
• left :

An add-regular element c is left-regular

• right :

An add-regular element c is right-regular

An add-regular element is an element c such that addition by c both on the left and on the right is injective.

Instances For
structure IsRegular {R : Type u_1} [Mul R] (c : R) :
• left :

A regular element c is left-regular

• right :

A regular element c is right-regular

A regular element is an element c such that multiplication by c both on the left and on the right is injective.

Instances For
theorem MulLECancellable.isLeftRegular {R : Type u_1} [Mul R] [] {a : R} (ha : ) :
theorem IsLeftRegular.right_of_commute {R : Type u_1} [Mul R] {a : R} (ca : ∀ (b : R), Commute a b) (h : ) :
theorem Commute.isRegular_iff {R : Type u_1} [Mul R] {a : R} (ca : ∀ (b : R), Commute a b) :
theorem IsAddLeftRegular.add {R : Type u_1} [] {a : R} {b : R} (lra : ) (lrb : ) :

theorem IsLeftRegular.mul {R : Type u_1} [] {a : R} {b : R} (lra : ) (lrb : ) :

In a semigroup, the product of left-regular elements is left-regular.

theorem IsAddRightRegular.add {R : Type u_1} [] {a : R} {b : R} (rra : ) (rrb : ) :

theorem IsRightRegular.mul {R : Type u_1} [] {a : R} {b : R} (rra : ) (rrb : ) :

In a semigroup, the product of right-regular elements is right-regular.

theorem IsAddLeftRegular.of_add {R : Type u_1} [] {a : R} {b : R} (ab : IsAddLeftRegular (a + b)) :

If an element b becomes add-left-regular after adding to it on the left an add-left-regular element, then b is add-left-regular.

theorem IsLeftRegular.of_mul {R : Type u_1} [] {a : R} {b : R} (ab : IsLeftRegular (a * b)) :

If an element b becomes left-regular after multiplying it on the left by a left-regular element, then b is left-regular.

@[simp]
theorem add_isAddLeftRegular_iff {R : Type u_1} [] {a : R} (b : R) (ha : ) :

@[simp]
theorem mul_isLeftRegular_iff {R : Type u_1} [] {a : R} (b : R) (ha : ) :

An element is left-regular if and only if multiplying it on the left by a left-regular element is left-regular.

theorem IsAddRightRegular.of_add {R : Type u_1} [] {a : R} {b : R} (ab : IsAddRightRegular (b + a)) :

If an element b becomes add-right-regular after adding to it on the right an add-right-regular element, then b is add-right-regular.

theorem IsRightRegular.of_mul {R : Type u_1} [] {a : R} {b : R} (ab : IsRightRegular (b * a)) :

If an element b becomes right-regular after multiplying it on the right by a right-regular element, then b is right-regular.

@[simp]
theorem add_isAddRightRegular_iff {R : Type u_1} [] {a : R} (b : R) (ha : ) :

@[simp]
theorem mul_isRightRegular_iff {R : Type u_1} [] {a : R} (b : R) (ha : ) :

An element is right-regular if and only if multiplying it on the right with a right-regular element is right-regular.

Two elements a and b are add-regular if and only if both sums a + b and b + a are add-regular.

theorem isRegular_mul_and_mul_iff {R : Type u_1} [] {a : R} {b : R} :
IsRegular (a * b) IsRegular (b * a)

Two elements a and b are regular if and only if both products a * b and b * a are regular.

The "most used" implication of add_and_add_iff, with split hypotheses, instead of ∧.

theorem IsRegular.and_of_mul_of_mul {R : Type u_1} [] {a : R} {b : R} (ab : IsRegular (a * b)) (ba : IsRegular (b * a)) :

The "most used" implication of mul_and_mul_iff, with split hypotheses, instead of ∧.

theorem IsLeftRegular.subsingleton {R : Type u_1} [] (h : ) :

The element 0 is left-regular if and only if R is trivial.

theorem IsRightRegular.subsingleton {R : Type u_1} [] (h : ) :

The element 0 is right-regular if and only if R is trivial.

theorem IsRegular.subsingleton {R : Type u_1} [] (h : ) :

The element 0 is regular if and only if R is trivial.

The element 0 is left-regular if and only if R is trivial.

theorem not_isLeftRegular_zero_iff {R : Type u_1} [] :

In a non-trivial MulZeroClass, the 0 element is not left-regular.

The element 0 is right-regular if and only if R is trivial.

theorem not_isRightRegular_zero_iff {R : Type u_1} [] :

In a non-trivial MulZeroClass, the 0 element is not right-regular.

theorem isRegular_iff_subsingleton {R : Type u_1} [] :

The element 0 is regular if and only if R is trivial.

theorem IsLeftRegular.ne_zero {R : Type u_1} [] {a : R} [] (la : ) :
a 0

A left-regular element of a Nontrivial MulZeroClass is non-zero.

theorem IsRightRegular.ne_zero {R : Type u_1} [] {a : R} [] (ra : ) :
a 0

A right-regular element of a Nontrivial MulZeroClass is non-zero.

theorem IsRegular.ne_zero {R : Type u_1} [] {a : R} [] (la : ) :
a 0

A regular element of a Nontrivial MulZeroClass is non-zero.

theorem not_isLeftRegular_zero {R : Type u_1} [] [nR : ] :

In a non-trivial ring, the element 0 is not left-regular -- with typeclasses.

theorem not_isRightRegular_zero {R : Type u_1} [] [nR : ] :

In a non-trivial ring, the element 0 is not right-regular -- with typeclasses.

theorem not_isRegular_zero {R : Type u_1} [] [] :

In a non-trivial ring, the element 0 is not regular -- with typeclasses.

@[simp]
theorem IsLeftRegular.mul_left_eq_zero_iff {R : Type u_1} [] {a : R} {b : R} (hb : ) :
b * a = 0 a = 0
@[simp]
theorem IsRightRegular.mul_right_eq_zero_iff {R : Type u_1} [] {a : R} {b : R} (hb : ) :
a * b = 0 a = 0
theorem isAddRegular_zero {R : Type u_1} [] :

If adding 0 on either side is the identity, 0 is regular.

theorem isRegular_one {R : Type u_1} [] :

If multiplying by 1 on either side is the identity, 1 is regular.

theorem isAddRegular_add_iff {R : Type u_1} [] {a : R} {b : R} :

A sum is add-regular if and only if the summands are.

theorem isRegular_mul_iff {R : Type u_1} [] {a : R} {b : R} :
IsRegular (a * b)

A product is regular if and only if the factors are.

theorem isAddLeftRegular_of_add_eq_zero {R : Type u_1} [] {a : R} {b : R} (h : b + a = 0) :

theorem isLeftRegular_of_mul_eq_one {R : Type u_1} [] {a : R} {b : R} (h : b * a = 1) :

An element admitting a left inverse is left-regular.

theorem isAddRightRegular_of_add_eq_zero {R : Type u_1} [] {a : R} {b : R} (h : a + b = 0) :

theorem isRightRegular_of_mul_eq_one {R : Type u_1} [] {a : R} {b : R} (h : a * b = 1) :

An element admitting a right inverse is right-regular.

If R is an additive monoid, an element in add_units R is add-regular.

theorem Units.isRegular {R : Type u_1} [] (a : Rˣ) :

If R is a monoid, an element in Rˣ is regular.

theorem IsAddUnit.isAddRegular {R : Type u_1} [] {a : R} (ua : ) :

theorem IsUnit.isRegular {R : Type u_1} [] {a : R} (ua : ) :

A unit in a monoid is regular.

theorem isLeftRegular_of_leftCancelSemigroup {R : Type u_1} (g : R) :

Elements of a left cancel semigroup are left regular.

theorem isRightRegular_of_rightCancelSemigroup {R : Type u_1} (g : R) :

Elements of a right cancel semigroup are right regular.

Elements of an add cancel monoid are regular. Add cancel semigroups do not appear to exist.

theorem isRegular_of_cancelMonoid {R : Type u_1} [] (g : R) :

Elements of a cancel monoid are regular. Cancel semigroups do not appear to exist.

theorem isRegular_of_ne_zero {R : Type u_1} {a : R} (a0 : a 0) :

Non-zero elements of an integral domain are regular.

theorem isRegular_iff_ne_zero {R : Type u_1} {a : R} [] :
a 0

In a non-trivial integral domain, an element is regular iff it is non-zero.