doc-next-gen

Mathlib.Algebra.GroupWithZero.Defs

Module docstring

{"# Typeclasses for groups with an adjoined zero element

This file provides just the typeclass definitions, and the projection lemmas that expose their members.

Main definitions

  • GroupWithZero
  • CommGroupWithZero "}
MulZeroClass structure
(M₀ : Type u) extends Mul M₀, Zero M₀
Full source
/-- Typeclass for expressing that a type `M₀` with multiplication and a zero satisfies
`0 * a = 0` and `a * 0 = 0` for all `a : M₀`. -/
class MulZeroClass (M₀ : Type u) extends Mul M₀, Zero M₀ where
  /-- Zero is a left absorbing element for multiplication -/
  zero_mul : ∀ a : M₀, 0 * a = 0
  /-- Zero is a right absorbing element for multiplication -/
  mul_zero : ∀ a : M₀, a * 0 = 0
Multiplication with zero class
Informal description
A structure `MulZeroClass M₀` consists of a type `M₀` equipped with a multiplication operation and a zero element, satisfying the properties that $0 \cdot a = 0$ and $a \cdot 0 = 0$ for all $a \in M₀$.
IsLeftCancelMulZero structure
(M₀ : Type u) [Mul M₀] [Zero M₀]
Full source
/-- A mixin for left cancellative multiplication by nonzero elements. -/
class IsLeftCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplication by a nonzero element is left cancellative. -/
  protected mul_left_cancel_of_ne_zero : ∀ {a b c : M₀}, a ≠ 0 → a * b = a * c → b = c
Left cancellation property for multiplication by nonzero elements
Informal description
A structure asserting that a type \( M_0 \) with multiplication and a zero element satisfies the left cancellation property for multiplication by nonzero elements: for any \( a \neq 0 \) in \( M_0 \), if \( a \cdot b = a \cdot c \), then \( b = c \). This is equivalent to saying that multiplication by any nonzero \( a \) is injective.
mul_left_cancel₀ theorem
(ha : a ≠ 0) (h : a * b = a * c) : b = c
Full source
theorem mul_left_cancel₀ (ha : a ≠ 0) (h : a * b = a * c) : b = c :=
  IsLeftCancelMulZero.mul_left_cancel_of_ne_zero ha h
Left Cancellation Property for Multiplication by Nonzero Elements
Informal description
For any nonzero element $a$ in a type $M_0$ with multiplication and a zero element, if $a \cdot b = a \cdot c$, then $b = c$.
mul_right_injective₀ theorem
(ha : a ≠ 0) : Function.Injective (a * ·)
Full source
theorem mul_right_injective₀ (ha : a ≠ 0) : Function.Injective (a * ·) :=
  fun _ _ => mul_left_cancel₀ ha
Right multiplication by a nonzero element is injective
Informal description
For any nonzero element $a$ in a type $M_0$ with multiplication and a zero element, the function $x \mapsto a \cdot x$ is injective.
IsRightCancelMulZero structure
(M₀ : Type u) [Mul M₀] [Zero M₀]
Full source
/-- A mixin for right cancellative multiplication by nonzero elements. -/
class IsRightCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplicatin by a nonzero element is right cancellative. -/
  protected mul_right_cancel_of_ne_zero : ∀ {a b c : M₀}, b ≠ 0 → a * b = c * b → a = c
Right cancellation property for multiplication by nonzero elements
Informal description
A structure `IsRightCancelMulZero` on a type `M₀` with multiplication and a zero element asserts that multiplication on the right by any nonzero element is injective. In other words, for any nonzero element `b` in `M₀`, the function `(a ↦ a * b)` is injective. This property ensures that if `a * b = c * b` and `b ≠ 0`, then `a = c`.
mul_right_cancel₀ theorem
(hb : b ≠ 0) (h : a * b = c * b) : a = c
Full source
theorem mul_right_cancel₀ (hb : b ≠ 0) (h : a * b = c * b) : a = c :=
  IsRightCancelMulZero.mul_right_cancel_of_ne_zero hb h
Right cancellation of multiplication by nonzero elements
Informal description
For any elements $a$, $b$, and $c$ in a type $M₀$ with multiplication and zero, if $b \neq 0$ and $a \cdot b = c \cdot b$, then $a = c$.
mul_left_injective₀ theorem
(hb : b ≠ 0) : Function.Injective fun a => a * b
Full source
theorem mul_left_injective₀ (hb : b ≠ 0) : Function.Injective fun a => a * b :=
  fun _ _ => mul_right_cancel₀ hb
Left multiplication by a nonzero element is injective
Informal description
For any nonzero element $b$ in a type $M₀$ with multiplication and zero, the function $a \mapsto a \cdot b$ is injective.
IsCancelMulZero structure
(M₀ : Type u) [Mul M₀] [Zero M₀] : Prop extends IsLeftCancelMulZero M₀, IsRightCancelMulZero M₀
Full source
/-- A mixin for cancellative multiplication by nonzero elements. -/
class IsCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop
  extends IsLeftCancelMulZero M₀, IsRightCancelMulZero M₀
Cancellative multiplication by nonzero elements
Informal description
A structure `IsCancelMulZero` on a type `M₀` with multiplication and zero element asserts that multiplication by any nonzero element is cancellative, meaning that for any nonzero element `b`, the functions `a ↦ a * b` and `a ↦ b * a` are injective. This is equivalent to requiring both left and right cancellation properties for multiplication by nonzero elements.
NoZeroDivisors structure
(M₀ : Type*) [Mul M₀] [Zero M₀]
Full source
/-- Predicate typeclass for expressing that `a * b = 0` implies `a = 0` or `b = 0`
for all `a` and `b` of type `G₀`. -/
class NoZeroDivisors (M₀ : Type*) [Mul M₀] [Zero M₀] : Prop where
  /-- For all `a` and `b` of `G₀`, `a * b = 0` implies `a = 0` or `b = 0`. -/
  eq_zero_or_eq_zero_of_mul_eq_zero : ∀ {a b : M₀}, a * b = 0 → a = 0 ∨ b = 0
No zero divisors property
Informal description
A type `M₀` equipped with multiplication and a zero element is said to have no zero divisors if for any elements `a` and `b` in `M₀`, the product `a * b = 0` implies either `a = 0` or `b = 0`.
SemigroupWithZero structure
(S₀ : Type u) extends Semigroup S₀, MulZeroClass S₀
Full source
/-- A type `S₀` is a "semigroup with zero” if it is a semigroup with zero element, and `0` is left
and right absorbing. -/
class SemigroupWithZero (S₀ : Type u) extends Semigroup S₀, MulZeroClass S₀
Semigroup with zero
Informal description
A type `S₀` is called a *semigroup with zero* if it is a semigroup equipped with a zero element `0` that is both left and right absorbing, meaning that for any element `x ∈ S₀`, we have `0 * x = 0` and `x * 0 = 0`.
MulZeroOneClass structure
(M₀ : Type u) extends MulOneClass M₀, MulZeroClass M₀
Full source
/-- A typeclass for non-associative monoids with zero elements. -/
class MulZeroOneClass (M₀ : Type u) extends MulOneClass M₀, MulZeroClass M₀
Monoid with Zero Multiplication
Informal description
A structure representing a type with both multiplicative and zero elements, where the multiplication is associative and has an identity element (forming a monoid), and where multiplication by zero yields zero. Specifically, it combines the properties of a `MulOneClass` (a type with an associative multiplication and a multiplicative identity) and a `MulZeroClass` (a type with a zero element and multiplication that annihilates zero).
MonoidWithZero structure
(M₀ : Type u) extends Monoid M₀, MulZeroOneClass M₀, SemigroupWithZero M₀
Full source
/-- A type `M₀` is a “monoid with zero” if it is a monoid with zero element, and `0` is left
and right absorbing. -/
class MonoidWithZero (M₀ : Type u) extends Monoid M₀, MulZeroOneClass M₀, SemigroupWithZero M₀
Monoid with zero
Informal description
A type `M₀` is called a *monoid with zero* if it is a monoid equipped with a zero element `0` that satisfies the following properties: 1. `0` is absorbing for multiplication (i.e., `0 * x = 0` and `x * 0 = 0` for all `x ∈ M₀`), 2. `M₀` has a multiplicative identity `1` (i.e., `1 * x = x * 1 = x` for all `x ∈ M₀`), 3. Multiplication is associative (i.e., `(x * y) * z = x * (y * z)` for all `x, y, z ∈ M₀`).
pow_mul_apply_eq_pow_mul theorem
{M : Type*} [Monoid M] (f : M₀ → M) {x : M₀} (hx : ∀ y : M₀, f (x * y) = f x * f y) (n : ℕ) : ∀ (y : M₀), f (x ^ n * y) = f x ^ n * f y
Full source
/-- If `x` is multiplicative with respect to `f`, then so is any `x^n`. -/
theorem pow_mul_apply_eq_pow_mul {M : Type*} [Monoid M] (f : M₀ → M) {x : M₀}
    (hx : ∀ y : M₀, f (x * y) = f x * f y) (n : ) :
    ∀ (y : M₀), f (x ^ n * y) = f x ^ n * f y := by
  induction n with
  | zero => intro y; rw [pow_zero, pow_zero, one_mul, one_mul]
  | succ n hn => intro y; rw [pow_succ', pow_succ', mul_assoc, mul_assoc, hx, hn]
Multiplicative Property of Powers: $f(x^n \cdot y) = f(x)^n \cdot f(y)$
Informal description
Let $M$ be a monoid and $M_0$ be a monoid with zero. Given a function $f \colon M_0 \to M$ that is multiplicative with respect to $x \in M_0$ (i.e., $f(x \cdot y) = f(x) \cdot f(y)$ for all $y \in M_0$), then for any natural number $n$ and any $y \in M_0$, we have $f(x^n \cdot y) = f(x)^n \cdot f(y)$.
CancelMonoidWithZero structure
(M₀ : Type*) extends MonoidWithZero M₀, IsCancelMulZero M₀
Full source
/-- A type `M` is a `CancelMonoidWithZero` if it is a monoid with zero element, `0` is left
and right absorbing, and left/right multiplication by a non-zero element is injective. -/
class CancelMonoidWithZero (M₀ : Type*) extends MonoidWithZero M₀, IsCancelMulZero M₀
Cancellative Monoid with Zero
Informal description
A type `M₀` is a `CancelMonoidWithZero` if it is a monoid with a zero element, where multiplication by zero absorbs any element (i.e., $0 \cdot x = 0$ and $x \cdot 0 = 0$ for all $x \in M₀$), and multiplication by a non-zero element is injective (i.e., for any $c \neq 0$, $a \cdot c = b \cdot c$ implies $a = b$, and similarly for left multiplication).
CommMonoidWithZero structure
(M₀ : Type*) extends CommMonoid M₀, MonoidWithZero M₀
Full source
/-- A type `M` is a commutative “monoid with zero” if it is a commutative monoid with zero
element, and `0` is left and right absorbing. -/
class CommMonoidWithZero (M₀ : Type*) extends CommMonoid M₀, MonoidWithZero M₀
Commutative monoid with zero
Informal description
A commutative monoid with zero is a commutative monoid $(M, \cdot, 1)$ equipped with an element $0 \in M$ that is both left and right absorbing (i.e., $0 \cdot a = a \cdot 0 = 0$ for all $a \in M$).
mul_left_inj' theorem
(hc : c ≠ 0) : a * c = b * c ↔ a = b
Full source
theorem mul_left_inj' (hc : c ≠ 0) : a * c = b * c ↔ a = b :=
  (mul_left_injective₀ hc).eq_iff
Left Cancellation Property in a Cancellative Monoid with Zero: $a \cdot c = b \cdot c \leftrightarrow a = b$ for $c \neq 0$
Informal description
For any nonzero element $c$ in a cancellative monoid with zero, the equality $a \cdot c = b \cdot c$ holds if and only if $a = b$.
mul_right_inj' theorem
(ha : a ≠ 0) : a * b = a * c ↔ b = c
Full source
theorem mul_right_inj' (ha : a ≠ 0) : a * b = a * c ↔ b = c :=
  (mul_right_injective₀ ha).eq_iff
Right Cancellation Property in a Cancellative Monoid with Zero: $a \cdot b = a \cdot c \leftrightarrow b = c$ for $a \neq 0$
Informal description
For any nonzero element $a$ in a cancellative monoid with zero, the equality $a \cdot b = a \cdot c$ holds if and only if $b = c$.
IsLeftCancelMulZero.to_isRightCancelMulZero theorem
[IsLeftCancelMulZero M₀] : IsRightCancelMulZero M₀
Full source
lemma IsLeftCancelMulZero.to_isRightCancelMulZero [IsLeftCancelMulZero M₀] :
    IsRightCancelMulZero M₀ :=
{ mul_right_cancel_of_ne_zero :=
    fun hb h => mul_left_cancel₀ hb <| (mul_comm _ _).trans (h.trans (mul_comm _ _)) }
Left Cancellation Implies Right Cancellation for Multiplication by Nonzero Elements
Informal description
If a type $M_0$ with multiplication and a zero element satisfies the left cancellation property for multiplication by nonzero elements, then it also satisfies the right cancellation property for multiplication by nonzero elements.
IsRightCancelMulZero.to_isLeftCancelMulZero theorem
[IsRightCancelMulZero M₀] : IsLeftCancelMulZero M₀
Full source
lemma IsRightCancelMulZero.to_isLeftCancelMulZero [IsRightCancelMulZero M₀] :
    IsLeftCancelMulZero M₀ :=
{ mul_left_cancel_of_ne_zero :=
    fun hb h => mul_right_cancel₀ hb <| (mul_comm _ _).trans (h.trans (mul_comm _ _)) }
Right Cancellation Implies Left Cancellation for Multiplication by Nonzero Elements
Informal description
If a type $M_0$ with multiplication and a zero element satisfies the right cancellation property for multiplication by nonzero elements, then it also satisfies the left cancellation property for multiplication by nonzero elements.
IsLeftCancelMulZero.to_isCancelMulZero theorem
[IsLeftCancelMulZero M₀] : IsCancelMulZero M₀
Full source
lemma IsLeftCancelMulZero.to_isCancelMulZero [IsLeftCancelMulZero M₀] :
    IsCancelMulZero M₀ :=
{ IsLeftCancelMulZero.to_isRightCancelMulZero with }
Left Cancellation Implies Full Cancellation for Multiplication by Nonzero Elements
Informal description
If a type $M_0$ with multiplication and a zero element satisfies the left cancellation property for multiplication by nonzero elements, then it satisfies both left and right cancellation properties for multiplication by nonzero elements (i.e., it is a cancellative multiplication structure with zero).
IsRightCancelMulZero.to_isCancelMulZero theorem
[IsRightCancelMulZero M₀] : IsCancelMulZero M₀
Full source
lemma IsRightCancelMulZero.to_isCancelMulZero [IsRightCancelMulZero M₀] :
    IsCancelMulZero M₀ :=
{ IsRightCancelMulZero.to_isLeftCancelMulZero with }
Right cancellation implies full cancellation for multiplication by nonzero elements
Informal description
If a type $M_0$ with multiplication and a zero element satisfies the right cancellation property for multiplication by nonzero elements, then it satisfies both left and right cancellation properties for multiplication by nonzero elements (i.e., it is cancellative for multiplication by nonzero elements).
CancelCommMonoidWithZero structure
(M₀ : Type*) extends CommMonoidWithZero M₀, IsLeftCancelMulZero M₀
Full source
/-- A type `M` is a `CancelCommMonoidWithZero` if it is a commutative monoid with zero element,
 `0` is left and right absorbing,
  and left/right multiplication by a non-zero element is injective. -/
class CancelCommMonoidWithZero (M₀ : Type*) extends CommMonoidWithZero M₀, IsLeftCancelMulZero M₀
Cancelative commutative monoid with zero
Informal description
A type $M_0$ is a *cancelative commutative monoid with zero* if it is a commutative monoid with a zero element $0$ that is both left and right absorbing (i.e., $0 \cdot x = 0$ and $x \cdot 0 = 0$ for all $x \in M_0$), and multiplication by any non-zero element is injective (i.e., $a \cdot x = a \cdot y$ or $x \cdot a = y \cdot a$ implies $x = y$ when $a \neq 0$).
CancelCommMonoidWithZero.toCancelMonoidWithZero instance
[CancelCommMonoidWithZero M₀] : CancelMonoidWithZero M₀
Full source
instance (priority := 100) CancelCommMonoidWithZero.toCancelMonoidWithZero
    [CancelCommMonoidWithZero M₀] : CancelMonoidWithZero M₀ :=
{ IsLeftCancelMulZero.to_isCancelMulZero (M₀ := M₀) with }
Cancellative Commutative Monoids with Zero are Cancellative Monoids with Zero
Informal description
Every cancellative commutative monoid with zero is also a cancellative monoid with zero.
MulDivCancelClass structure
(M₀ : Type*) [MonoidWithZero M₀] [Div M₀]
Full source
/-- Prop-valued mixin for a monoid with zero to be equipped with a cancelling division.

The obvious use case is groups with zero, but this condition is also satisfied by `ℕ`, `ℤ` and, more
generally, any euclidean domain. -/
class MulDivCancelClass (M₀ : Type*) [MonoidWithZero M₀] [Div M₀] : Prop where
  protected mul_div_cancel (a b : M₀) : b ≠ 0 → a * b / b = a
Multiplication-Division Cancellation Property
Informal description
A type `M₀` equipped with a monoid structure with zero and a division operation is said to satisfy the *multiplication-division cancellation property* if for any elements `a, b ∈ M₀` with `b ≠ 0`, the operations satisfy `a * b / b = a` and `a * b / a = b` when `a ≠ 0`. This property ensures that division behaves as the inverse operation to multiplication for non-zero elements.
mul_div_cancel_right₀ theorem
(a : M₀) {b : M₀} (hb : b ≠ 0) : a * b / b = a
Full source
@[simp] lemma mul_div_cancel_right₀ (a : M₀) {b : M₀} (hb : b ≠ 0) : a * b / b = a :=
  MulDivCancelClass.mul_div_cancel _ _ hb
Right Cancellation Property in Monoids with Zero: $(a \cdot b) / b = a$ for $b \neq 0$
Informal description
For any elements $a$ and $b$ in a monoid with zero $M₀$, if $b \neq 0$, then $(a \cdot b) / b = a$.
mul_div_cancel_left₀ theorem
(b : M₀) {a : M₀} (ha : a ≠ 0) : a * b / a = b
Full source
@[simp] lemma mul_div_cancel_left₀ (b : M₀) {a : M₀} (ha : a ≠ 0) : a * b / a = b := by
  rw [mul_comm, mul_div_cancel_right₀ _ ha]
Left Cancellation Property in Monoids with Zero: $(a \cdot b)/a = b$ for $a \neq 0$
Informal description
For any elements $a$ and $b$ in a monoid with zero $M_0$, if $a \neq 0$, then $(a \cdot b) / a = b$.
GroupWithZero structure
(G₀ : Type u) extends MonoidWithZero G₀, DivInvMonoid G₀, Nontrivial G₀
Full source
/-- A type `G₀` is a “group with zero” if it is a monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`.

Examples include division rings and the ordered monoids that are the
target of valuations in general valuation theory. -/
class GroupWithZero (G₀ : Type u) extends MonoidWithZero G₀, DivInvMonoid G₀, Nontrivial G₀ where
  /-- The inverse of `0` in a group with zero is `0`. -/
  protected inv_zero : (0 : G₀)⁻¹ = 0
  /-- Every nonzero element of a group with zero is invertible. -/
  protected mul_inv_cancel (a : G₀) : a ≠ 0 → a * a⁻¹ = 1
Group with Zero
Informal description
A *group with zero* is a monoid with a zero element (distinct from the multiplicative identity) where every nonzero element has a multiplicative inverse. The structure includes an inverse function that must satisfy $0^{-1} = 0$.
inv_zero theorem
: (0 : G₀)⁻¹ = 0
Full source
@[simp] lemma inv_zero : (0 : G₀)⁻¹ = 0 := GroupWithZero.inv_zero
Inverse of Zero in a Group with Zero
Informal description
In a group with zero $G₀$, the inverse of the zero element is itself zero, i.e., $0^{-1} = 0$.
mul_inv_cancel₀ theorem
(h : a ≠ 0) : a * a⁻¹ = 1
Full source
@[simp] lemma mul_inv_cancel₀ (h : a ≠ 0) : a * a⁻¹ = 1 := GroupWithZero.mul_inv_cancel a h
Inverse Property for Nonzero Elements in a Group with Zero
Informal description
For any nonzero element $a$ in a group with zero $G_0$, the product of $a$ and its multiplicative inverse equals the multiplicative identity, i.e., $a \cdot a^{-1} = 1$.
GroupWithZero.toMulDivCancelClass instance
: MulDivCancelClass G₀
Full source
instance (priority := 100) GroupWithZero.toMulDivCancelClass : MulDivCancelClass G₀ where
  mul_div_cancel a b hb := by rw [div_eq_mul_inv, mul_assoc, mul_inv_cancel₀ hb, mul_one]
Multiplication-Division Cancellation in Groups with Zero
Informal description
Every group with zero $G_0$ satisfies the multiplication-division cancellation property, meaning that for any elements $a, b \in G_0$ with $b \neq 0$, we have $a \cdot b / b = a$ and $a \cdot b / a = b$ when $a \neq 0$.
CommGroupWithZero structure
(G₀ : Type*) extends CommMonoidWithZero G₀, GroupWithZero G₀
Full source
/-- A type `G₀` is a commutative “group with zero”
if it is a commutative monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`. -/
class CommGroupWithZero (G₀ : Type*) extends CommMonoidWithZero G₀, GroupWithZero G₀
Commutative Group with Zero
Informal description
A commutative group with zero is a commutative monoid with zero element (distinct from the multiplicative identity) equipped with an inverse operation where every nonzero element is invertible and the inverse of zero is zero.
mul_inv_cancel_right₀ theorem
(h : b ≠ 0) (a : G₀) : a * b * b⁻¹ = a
Full source
@[simp]
theorem mul_inv_cancel_right₀ (h : b ≠ 0) (a : G₀) : a * b * b⁻¹ = a :=
  calc
    a * b * b⁻¹ = a * (b * b⁻¹) := mul_assoc _ _ _
    _ = a := by simp [h]
Right Cancellation Property for Nonzero Elements in a Group with Zero
Informal description
For any nonzero element $b$ in a group with zero $G_0$ and any element $a \in G_0$, the product $a \cdot b \cdot b^{-1}$ equals $a$.
mul_inv_cancel_left₀ theorem
(h : a ≠ 0) (b : G₀) : a * (a⁻¹ * b) = b
Full source
@[simp]
theorem mul_inv_cancel_left₀ (h : a ≠ 0) (b : G₀) : a * (a⁻¹ * b) = b :=
  calc
    a * (a⁻¹ * b) = a * a⁻¹ * b := (mul_assoc _ _ _).symm
    _ = b := by simp [h]
Left Cancellation Property via Inverse in Group with Zero
Informal description
For any nonzero element $a$ in a group with zero $G_0$ and any element $b \in G_0$, the equation $a \cdot (a^{-1} \cdot b) = b$ holds.
mul_eq_zero_of_left theorem
{a : M₀} (h : a = 0) (b : M₀) : a * b = 0
Full source
theorem mul_eq_zero_of_left {a : M₀} (h : a = 0) (b : M₀) : a * b = 0 := h.symmzero_mul b
Left Zero Multiplication Property: $0 \cdot b = 0$
Informal description
For any element $a$ in a type $M₀$ with a multiplication operation and a zero element, if $a = 0$, then for any element $b \in M₀$, the product $a \cdot b$ equals $0$.
mul_eq_zero_of_right theorem
(a : M₀) {b : M₀} (h : b = 0) : a * b = 0
Full source
theorem mul_eq_zero_of_right (a : M₀) {b : M₀} (h : b = 0) : a * b = 0 := h.symmmul_zero a
Right Zero Multiplication Property: $a \cdot 0 = 0$
Informal description
For any element $a$ in a type $M₀$ with a multiplication operation and a zero element, and for any element $b \in M₀$ such that $b = 0$, the product $a \cdot b$ equals $0$.
mul_eq_zero theorem
: a * b = 0 ↔ a = 0 ∨ b = 0
Full source
/-- If `α` has no zero divisors, then the product of two elements equals zero iff one of them
equals zero. -/
@[simp]
theorem mul_eq_zero : a * b = 0 ↔ a = 0 ∨ b = 0 :=
  ⟨eq_zero_or_eq_zero_of_mul_eq_zero,
    fun o => o.elim (fun h => mul_eq_zero_of_left h b) (mul_eq_zero_of_right a)⟩
Product Equals Zero iff One Factor is Zero
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and zero, the product $a \cdot b$ equals zero if and only if either $a$ is zero or $b$ is zero.
zero_eq_mul theorem
: 0 = a * b ↔ a = 0 ∨ b = 0
Full source
/-- If `α` has no zero divisors, then the product of two elements equals zero iff one of them
equals zero. -/
@[simp]
theorem zero_eq_mul : 0 = a * b ↔ a = 0 ∨ b = 0 := by rw [eq_comm, mul_eq_zero]
Zero Equals Product iff One Factor is Zero
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and zero, the equation $0 = a \cdot b$ holds if and only if either $a = 0$ or $b = 0$.
mul_ne_zero_iff theorem
: a * b ≠ 0 ↔ a ≠ 0 ∧ b ≠ 0
Full source
/-- If `α` has no zero divisors, then the product of two elements is nonzero iff both of them
are nonzero. -/
theorem mul_ne_zero_iff : a * b ≠ 0a * b ≠ 0 ↔ a ≠ 0 ∧ b ≠ 0 := mul_eq_zero.not.trans not_or
Product is Nonzero iff Both Factors are Nonzero
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and zero, the product $a \cdot b$ is nonzero if and only if both $a$ and $b$ are nonzero.
mul_eq_zero_comm theorem
: a * b = 0 ↔ b * a = 0
Full source
/-- If `α` has no zero divisors, then for elements `a, b : α`, `a * b` equals zero iff so is
`b * a`. -/
theorem mul_eq_zero_comm : a * b = 0 ↔ b * a = 0 :=
  mul_eq_zero.trans <| or_comm.trans mul_eq_zero.symm
Commutativity of Zero Product Condition: $ab = 0 \leftrightarrow ba = 0$
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and zero, the product $a \cdot b$ equals zero if and only if the product $b \cdot a$ equals zero.
mul_ne_zero_comm theorem
: a * b ≠ 0 ↔ b * a ≠ 0
Full source
/-- If `α` has no zero divisors, then for elements `a, b : α`, `a * b` is nonzero iff so is
`b * a`. -/
theorem mul_ne_zero_comm : a * b ≠ 0a * b ≠ 0 ↔ b * a ≠ 0 := mul_eq_zero_comm.not
Commutativity of Nonzero Product Condition: $ab \neq 0 \leftrightarrow ba \neq 0$
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and zero, the product $a \cdot b$ is nonzero if and only if the product $b \cdot a$ is nonzero.
mul_self_eq_zero theorem
: a * a = 0 ↔ a = 0
Full source
theorem mul_self_eq_zero : a * a = 0 ↔ a = 0 := by simp
Square Equals Zero iff Element is Zero
Informal description
For any element $a$ in a type with multiplication and zero, $a \cdot a = 0$ if and only if $a = 0$.
zero_eq_mul_self theorem
: 0 = a * a ↔ a = 0
Full source
theorem zero_eq_mul_self : 0 = a * a ↔ a = 0 := by simp
Square Equals Zero iff Element is Zero
Informal description
For any element $a$ in a type with multiplication and zero, $0 = a \cdot a$ if and only if $a = 0$.
mul_eq_zero_iff_left theorem
(ha : a ≠ 0) : a * b = 0 ↔ b = 0
Full source
theorem mul_eq_zero_iff_left (ha : a ≠ 0) : a * b = 0 ↔ b = 0 := by simp [ha]
Zero Product Condition: $a \cdot b = 0 \leftrightarrow b = 0$ when $a \neq 0$
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and a zero element, if $a \neq 0$, then $a \cdot b = 0$ if and only if $b = 0$.
mul_eq_zero_iff_right theorem
(hb : b ≠ 0) : a * b = 0 ↔ a = 0
Full source
theorem mul_eq_zero_iff_right (hb : b ≠ 0) : a * b = 0 ↔ a = 0 := by simp [hb]
Zero Product Condition: $a \cdot b = 0 \leftrightarrow a = 0$ when $b \neq 0$
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and a zero element, if $b \neq 0$, then $a \cdot b = 0$ if and only if $a = 0$.
mul_ne_zero_iff_left theorem
(ha : a ≠ 0) : a * b ≠ 0 ↔ b ≠ 0
Full source
theorem mul_ne_zero_iff_left (ha : a ≠ 0) : a * b ≠ 0a * b ≠ 0 ↔ b ≠ 0 := by simp [ha]
Nonzero Product Condition: $a \cdot b \neq 0 \leftrightarrow b \neq 0$ when $a \neq 0$
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and a zero element, if $a \neq 0$, then $a \cdot b \neq 0$ if and only if $b \neq 0$.
mul_ne_zero_iff_right theorem
(hb : b ≠ 0) : a * b ≠ 0 ↔ a ≠ 0
Full source
theorem mul_ne_zero_iff_right (hb : b ≠ 0) : a * b ≠ 0a * b ≠ 0 ↔ a ≠ 0 := by simp [hb]
Nonzero Product Condition: $a \cdot b \neq 0 \leftrightarrow a \neq 0$ when $b \neq 0$
Informal description
For any elements $a$ and $b$ in a type $M₀$ with multiplication and a zero element, if $b \neq 0$, then $a \cdot b \neq 0$ if and only if $a \neq 0$.