Mathlib.Algebra.GroupWithZero.Basic
84 declarations. Mathlib docs · Source
Groups with an adjoined zero element
This file describes structures that are not usually studied on their own right in mathematics, namely a special sort of monoid: apart from a distinguished “zero element” they form a group, or in other words, they are groups with an adjoined zero element.
Examples are:
- division rings;
- the value monoid of a multiplicative valuation;
- in particular, the non-negative real numbers.
Main definitions
Various lemmas about GroupWithZero and CommGroupWithZero.
To reduce import dependencies, the type-classes themselves are in
Algebra.GroupWithZero.Defs.
Implementation notes
As is usual in mathlib, we extend the inverse function to the zero element,
and require 0⁻¹ = 0.
theorem left_ne_zero_of_mul E1 #
∀ {M₀ : Type u_1} [inst : MulZeroClass M₀] {a b : M₀}, a * b ≠ 0 → a ≠ 0
theorem right_ne_zero_of_mul E1 #
∀ {M₀ : Type u_1} [inst : MulZeroClass M₀] {a b : M₀}, a * b ≠ 0 → b ≠ 0
theorem ne_zero_and_ne_zero_of_mul E1 #
∀ {M₀ : Type u_1} [inst : MulZeroClass M₀] {a b : M₀}, a * b ≠ 0 → a ≠ 0 ∧ b ≠ 0
theorem mul_eq_zero_of_ne_zero_imp_eq_zero E1 #
∀ {M₀ : Type u_1} [inst : MulZeroClass M₀] {a b : M₀}, (a ≠ 0 → b = 0) → a * b = 0
theorem zero_mul_eq_const E1 #
∀ {M₀ : Type u_1} [inst : MulZeroClass M₀], (fun x ↦ 0 * x) = Function.const M₀ 0
To match one_mul_eq_id.
theorem mul_zero_eq_const E1 #
∀ {M₀ : Type u_1} [inst : MulZeroClass M₀], (fun x ↦ x * 0) = Function.const M₀ 0
To match mul_one_eq_id.
theorem mul_ne_zero E1 #
∀ {M₀ : Type u_1} [inst : Mul M₀] [inst_1 : Zero M₀] [NoZeroDivisors M₀] {a b : M₀}, a ≠ 0 → b ≠ 0 → a * b ≠ 0
instance NeZero.mul E0 #
∀ {M₀ : Type u_1} [inst : Zero M₀] [inst_1 : Mul M₀] [NoZeroDivisors M₀] {x y : M₀} [NeZero x] [NeZero y],
NeZero (x * y)
def uniqueOfZeroEqOne E1 #
{M₀ : Type u_1} → [inst : MulZeroOneClass M₀] → 0 = 1 → Unique M₀
In a monoid with zero, if zero equals one, then zero is the unique element.
Somewhat arbitrarily, we define the default element to be 0.
All other elements will be provably equal to it, but not necessarily definitionally equal.
theorem subsingleton_iff_zero_eq_one E1 #
∀ {M₀ : Type u_1} [inst : MulZeroOneClass M₀], 0 = 1 ↔ Subsingleton M₀
In a monoid with zero, zero equals one if and only if all elements of that semiring are equal.
theorem subsingleton_of_zero_eq_one E1 #
∀ {M₀ : Type u_1} [inst : MulZeroOneClass M₀], 0 = 1 → Subsingleton M₀
Alias of the forward direction of subsingleton_iff_zero_eq_one.
In a monoid with zero, zero equals one if and only if all elements of that semiring are equal.
theorem zero_ne_one_or_forall_eq_0 E1 #
∀ {M₀ : Type u_1} [inst : MulZeroOneClass M₀], 0 ≠ 1 ∨ ∀ (a : M₀), a = 0
In a monoid with zero, either zero and one are nonequal, or zero is the only element.
theorem left_ne_zero_of_mul_eq_one E1 #
∀ {M₀ : Type u_1} [inst : MulZeroOneClass M₀] [Nontrivial M₀] {a b : M₀}, a * b = 1 → a ≠ 0
theorem right_ne_zero_of_mul_eq_one E1 #
∀ {M₀ : Type u_1} [inst : MulZeroOneClass M₀] [Nontrivial M₀] {a b : M₀}, a * b = 1 → b ≠ 0
def IsNilpotent E3 #
{R : Type u_3} → [Zero R] → [Pow R ℕ] → R → Prop
An element is said to be nilpotent if some natural-number-power of it equals zero.
Note that we require only the bare minimum assumptions for the definition to make sense. Even
MonoidWithZero is too strong since nilpotency is important in the study of rings that are only
power-associative.
theorem IsNilpotent.mk E1 #
∀ {R : Type u_3} [inst : Zero R] [inst_1 : Pow R ℕ] (x : R) (n : ℕ), x ^ n = 0 → IsNilpotent x
theorem isNilpotent_of_subsingleton E0 #
∀ {R : Type u_3} {x : R} [inst : Zero R] [inst_1 : Pow R ℕ] [Subsingleton R], IsNilpotent x
theorem IsNilpotent.zero E0 #
∀ {R : Type u_3} [inst : MonoidWithZero R], IsNilpotent 0
theorem not_isNilpotent_one E1 #
∀ {R : Type u_3} [inst : MonoidWithZero R] [Nontrivial R], ¬IsNilpotent 1
theorem IsNilpotent.pow_succ E1 #
∀ (n : ℕ) {S : Type u_5} [inst : MonoidWithZero S] {x : S}, IsNilpotent x → IsNilpotent (x ^ n.succ)
theorem IsNilpotent.of_pow E1 #
∀ {R : Type u_3} [inst : MonoidWithZero R] {x : R} {m : ℕ}, IsNilpotent (x ^ m) → IsNilpotent x
theorem IsNilpotent.pow_of_pos E1 #
∀ {n : ℕ} {S : Type u_5} [inst : MonoidWithZero S] {x : S}, IsNilpotent x → n ≠ 0 → IsNilpotent (x ^ n)
theorem IsNilpotent.pow_iff_pos E0 #
∀ {n : ℕ} {S : Type u_5} [inst : MonoidWithZero S] {x : S}, n ≠ 0 → (IsNilpotent (x ^ n) ↔ IsNilpotent x)
class IsReduced E3 #
(R : Type u_5) → [Zero R] → [Pow R ℕ] → Prop
A structure that has zero and pow is reduced if it has no nonzero nilpotent elements.
theorem isReduced_iff E0 #
∀ (R : Type u_5) [inst : Zero R] [inst_1 : Pow R ℕ], IsReduced R ↔ ∀ (x : R), IsNilpotent x → x = 0
ctor IsReduced.mk E0 #
∀ {R : Type u_5} [inst : Zero R] [inst_1 : Pow R ℕ], (∀ (x : R), IsNilpotent x → x = 0) → IsReduced R
instance isReduced_of_subsingleton E0 #
∀ {R : Type u_3} [inst : Zero R] [inst_1 : Pow R ℕ] [Subsingleton R], IsReduced R
theorem isNilpotent_iff_eq_zero E0 #
∀ {R : Type u_3} {x : R} [inst : MonoidWithZero R] [IsReduced R], IsNilpotent x ↔ x = 0
theorem exists_isNilpotent_of_not_isReduced E1 #
∀ {R : Type u_5} [inst : Zero R] [inst_1 : Pow R ℕ], ¬IsReduced R → ∃ x, x ≠ 0 ∧ IsNilpotent x
theorem zero_pow E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {n : ℕ}, n ≠ 0 → 0 ^ n = 0
theorem zero_pow_eq E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] (n : ℕ), 0 ^ n = if n = 0 then 1 else 0
theorem zero_pow_eq_one₀ E1 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {n : ℕ} [Nontrivial M₀], 0 ^ n = 1 ↔ n = 0
theorem pow_eq_zero_of_le E1 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} {m n : ℕ}, m ≤ n → a ^ m = 0 → a ^ n = 0
theorem ne_zero_pow E1 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} {n : ℕ}, n ≠ 0 → a ^ n ≠ 0 → a ≠ 0
theorem zero_pow_eq_zero E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {n : ℕ} [Nontrivial M₀], 0 ^ n = 0 ↔ n ≠ 0
theorem pow_mul_eq_zero_of_le E1 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a b : M₀} {m n : ℕ}, m ≤ n → a ^ m * b = 0 → a ^ n * b = 0
instance isReduced_of_noZeroDivisors E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] [NoZeroDivisors M₀], IsReduced M₀
theorem pow_eq_zero_iff E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} {n : ℕ} [IsReduced M₀], n ≠ 0 → (a ^ n = 0 ↔ a = 0)
theorem pow_ne_zero_iff E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} {n : ℕ} [IsReduced M₀], n ≠ 0 → (a ^ n ≠ 0 ↔ a ≠ 0)
theorem pow_ne_zero E2 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} [IsReduced M₀] (n : ℕ), a ≠ 0 → a ^ n ≠ 0
instance NeZero.pow E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} {n : ℕ} [IsReduced M₀] [NeZero a], NeZero (a ^ n)
theorem sq_eq_zero_iff E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} [IsReduced M₀], a ^ 2 = 0 ↔ a = 0
theorem pow_eq_zero_iff' E0 #
∀ {M₀ : Type u_1} [inst : MonoidWithZero M₀] {a : M₀} {n : ℕ} [IsReduced M₀] [Nontrivial M₀], a ^ n = 0 ↔ a = 0 ∧ n ≠ 0
A variant of pow_eq_zero_iff assuming M₀ is not trivial.
theorem exists_right_inv_of_exists_left_inv E1 #
∀ {α : Type u_3} [inst : MonoidWithZero α], (∀ (a : α), a ≠ 0 → ∃ b, b * a = 1) → ∀ {a : α}, a ≠ 0 → ∃ b, a * b = 1
theorem mul_right_eq_self₀ E1 #
∀ {M₀ : Type u_1} {a b : M₀} [inst : MulZeroOneClass M₀] [IsLeftCancelMulZero M₀], a * b = a ↔ b = 1 ∨ a = 0
theorem mul_left_eq_self₀ E1 #
∀ {M₀ : Type u_1} {a b : M₀} [inst : MulZeroOneClass M₀] [IsRightCancelMulZero M₀], a * b = b ↔ a = 1 ∨ b = 0
theorem mul_eq_left₀ E0 #
∀ {M₀ : Type u_1} {a b : M₀} [inst : MulZeroOneClass M₀] [IsLeftCancelMulZero M₀], a ≠ 0 → (a * b = a ↔ b = 1)
theorem mul_eq_right₀ E0 #
∀ {M₀ : Type u_1} {a b : M₀} [inst : MulZeroOneClass M₀] [IsRightCancelMulZero M₀], b ≠ 0 → (a * b = b ↔ a = 1)
theorem left_eq_mul₀ E0 #
∀ {M₀ : Type u_1} {a b : M₀} [inst : MulZeroOneClass M₀] [IsLeftCancelMulZero M₀], a ≠ 0 → (a = a * b ↔ b = 1)
theorem right_eq_mul₀ E0 #
∀ {M₀ : Type u_1} {a b : M₀} [inst : MulZeroOneClass M₀] [IsRightCancelMulZero M₀], b ≠ 0 → (b = a * b ↔ a = 1)
instance instIsDedekindFiniteMonoidOfIsLeftCancelMulZero E0 #
∀ {M₀ : Type u_3} [inst : MonoidWithZero M₀] [IsLeftCancelMulZero M₀], IsDedekindFiniteMonoid M₀
instance instIsDedekindFiniteMonoidOfIsRightCancelMulZero E0 #
∀ {M₀ : Type u_3} [inst : MonoidWithZero M₀] [IsRightCancelMulZero M₀], IsDedekindFiniteMonoid M₀
theorem GroupWithZero.mul_right_injective E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {x : G₀}, x ≠ 0 → Function.Injective fun y ↦ x * y
theorem GroupWithZero.mul_left_injective E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {x : G₀}, x ≠ 0 → Function.Injective fun y ↦ y * x
theorem inv_mul_cancel_right₀ E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {b : G₀}, b ≠ 0 → ∀ (a : G₀), a * b⁻¹ * b = a
theorem inv_mul_cancel_left₀ E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → ∀ (b : G₀), a⁻¹ * (a * b) = b
instance GroupWithZero.toDivisionMonoid E0 #
{G₀ : Type u_2} → [GroupWithZero G₀] → DivisionMonoid G₀
instance instIsCancelMulZero E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀], IsCancelMulZero G₀
theorem zero_div E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), 0 / a = 0
theorem div_zero E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a / 0 = 0
theorem IsSelfInv.zero E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀], IsSelfInv 0
theorem mul_self_mul_inv E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a * a * a⁻¹ = a
Multiplying a by itself and then by its inverse results in a
(whether or not a is zero).
theorem mul_inv_mul_cancel E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a * a⁻¹ * a = a
Multiplying a by its inverse and then by itself results in a
(whether or not a is zero).
theorem inv_mul_mul_self E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a⁻¹ * a * a = a
Multiplying a⁻¹ by a twice results in a (whether or not a
is zero).
theorem mul_self_div_self E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a * a / a = a
Multiplying a by itself and then dividing by itself results in a, whether or not a is
zero.
theorem div_self_mul_self E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a / a * a = a
Dividing a by itself and then multiplying by itself results in a, whether or not a is
zero.
theorem div_self_mul_self' E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a / (a * a) = a⁻¹
theorem one_div_ne_zero E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → 1 / a ≠ 0
theorem inv_eq_zero E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a⁻¹ = 0 ↔ a = 0
theorem zero_eq_inv E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, 0 = a⁻¹ ↔ 0 = a
theorem div_div_self E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (a : G₀), a / (a / a) = a
Dividing a by the result of dividing a by itself results in
a (whether or not a is zero).
theorem ne_zero_of_one_div_ne_zero E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, 1 / a ≠ 0 → a ≠ 0
theorem mul_left_surjective₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → Function.Surjective fun g ↦ a * g
theorem mul_right_surjective₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → Function.Surjective fun g ↦ g * a
theorem zero_zpow E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (n : ℤ), n ≠ 0 → 0 ^ n = 0
theorem zero_zpow_eq E0 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] (n : ℤ), 0 ^ n = if n = 0 then 1 else 0
theorem zero_zpow_eq_one₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {n : ℤ}, 0 ^ n = 1 ↔ n = 0
theorem zpow_add_one₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → ∀ (n : ℤ), a ^ (n + 1) = a ^ n * a
theorem zpow_sub_one₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → ∀ (n : ℤ), a ^ (n - 1) = a ^ n * a⁻¹
theorem zpow_add₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → ∀ (m n : ℤ), a ^ (m + n) = a ^ m * a ^ n
theorem zpow_add' E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀} {m n : ℤ},
a ≠ 0 ∨ m + n ≠ 0 ∨ m = 0 ∧ n = 0 → a ^ (m + n) = a ^ m * a ^ n
theorem zpow_one_add₀ E1 #
∀ {G₀ : Type u_2} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → ∀ (i : ℤ), a ^ (1 + i) = a * a ^ i
theorem div_mul_eq_mul_div₀ E1 #
∀ {G₀ : Type u_2} [inst : CommGroupWithZero G₀] (a b c : G₀), a / c * b = a * b / c
theorem div_sq_cancel E1 #
∀ {G₀ : Type u_2} [inst : CommGroupWithZero G₀] (a b : G₀), a ^ 2 * b / a = a * b