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
Implementation details
As is usual in mathlib, we extend the inverse function to the zero element,
and require 0⁻¹ = 0.
Typeclass for expressing that a type M₀ with multiplication and a zero satisfies
0 * a = 0 and a * 0 = 0 for all a : M₀.
Pullback a mul_zero_class instance along an injective function.
Equations
- function.injective.mul_zero_class f hf zero mul = {mul := has_mul.mul _inst_2, zero := 0, zero_mul := _, mul_zero := _}
Pushforward a mul_zero_class instance along an surjective function.
Equations
- function.surjective.mul_zero_class f hf zero mul = {mul := has_mul.mul _inst_2, zero := 0, zero_mul := _, mul_zero := _}
Predicate typeclass for expressing that a * b = 0 implies a = 0 or b = 0
for all a and b of type G₀.
Pushforward a no_zero_divisors instance along an injective function.
If α has no zero divisors, then the product of two elements equals zero iff one of them
equals zero.
If α has no zero divisors, then the product of two elements equals zero iff one of them
equals zero.
If α has no zero divisors, then the product of two elements is nonzero iff both of them
are nonzero.
If α has no zero divisors, then for elements a, b : α, a * b equals zero iff so is
b * a.
If α has no zero divisors, then for elements a, b : α, a * b is nonzero iff so is
b * a.
- mul : M₀ → M₀ → M₀
- mul_assoc : ∀ (a b c_1 : M₀), a * b * c_1 = a * (b * c_1)
- one : M₀
- one_mul : ∀ (a : M₀), 1 * a = a
- mul_one : ∀ (a : M₀), a * 1 = a
- zero : M₀
- zero_mul : ∀ (a : M₀), 0 * a = 0
- mul_zero : ∀ (a : M₀), a * 0 = 0
A type M is a “monoid with zero” if it is a monoid with zero element, and 0 is left
and right absorbing.
- mul : M₀ → M₀ → M₀
- mul_assoc : ∀ (a b c_1 : M₀), a * b * c_1 = a * (b * c_1)
- one : M₀
- one_mul : ∀ (a : M₀), 1 * a = a
- mul_one : ∀ (a : M₀), a * 1 = a
- zero : M₀
- zero_mul : ∀ (a : M₀), 0 * a = 0
- mul_zero : ∀ (a : M₀), a * 0 = 0
- mul_left_cancel_of_ne_zero : ∀ {a b c_1 : M₀}, a ≠ 0 → a * b = a * c_1 → b = c_1
- mul_right_cancel_of_ne_zero : ∀ {a b c_1 : M₀}, b ≠ 0 → a * b = c_1 * b → a = c_1
A type M is a cancel_monoid_with_zero 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.
In a nontrivial monoid with zero, zero and one are different.
Pullback a nontrivial instance along a function sending 0 to 0 and 1 to 1.
- mul : M₀ → M₀ → M₀
- mul_assoc : ∀ (a b c_1 : M₀), a * b * c_1 = a * (b * c_1)
- one : M₀
- one_mul : ∀ (a : M₀), 1 * a = a
- mul_one : ∀ (a : M₀), a * 1 = a
- mul_comm : ∀ (a b : M₀), a * b = b * a
- zero : M₀
- zero_mul : ∀ (a : M₀), 0 * a = 0
- mul_zero : ∀ (a : M₀), a * 0 = 0
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.
- mul : M₀ → M₀ → M₀
- mul_assoc : ∀ (a b c_1 : M₀), a * b * c_1 = a * (b * c_1)
- one : M₀
- one_mul : ∀ (a : M₀), 1 * a = a
- mul_one : ∀ (a : M₀), a * 1 = a
- mul_comm : ∀ (a b : M₀), a * b = b * a
- zero : M₀
- zero_mul : ∀ (a : M₀), 0 * a = 0
- mul_zero : ∀ (a : M₀), a * 0 = 0
- mul_left_cancel_of_ne_zero : ∀ {a b c_1 : M₀}, a ≠ 0 → a * b = a * c_1 → b = c_1
- mul_right_cancel_of_ne_zero : ∀ {a b c_1 : M₀}, b ≠ 0 → a * b = c_1 * b → a = c_1
A type M is a comm_cancel_monoid_with_zero 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.
- mul : G₀ → G₀ → G₀
- mul_assoc : ∀ (a b c_1 : G₀), a * b * c_1 = a * (b * c_1)
- one : G₀
- one_mul : ∀ (a : G₀), 1 * a = a
- mul_one : ∀ (a : G₀), a * 1 = a
- zero : G₀
- zero_mul : ∀ (a : G₀), 0 * a = 0
- mul_zero : ∀ (a : G₀), a * 0 = 0
- inv : G₀ → G₀
- exists_pair_ne : ∃ (x y : G₀), x ≠ y
- inv_zero : 0⁻¹ = 0
- mul_inv_cancel : ∀ (a : G₀), a ≠ 0 → a * a⁻¹ = 1
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.
- mul : G₀ → G₀ → G₀
- mul_assoc : ∀ (a b c_1 : G₀), a * b * c_1 = a * (b * c_1)
- one : G₀
- one_mul : ∀ (a : G₀), 1 * a = a
- mul_one : ∀ (a : G₀), a * 1 = a
- mul_comm : ∀ (a b : G₀), a * b = b * a
- zero : G₀
- zero_mul : ∀ (a : G₀), 0 * a = 0
- mul_zero : ∀ (a : G₀), a * 0 = 0
- inv : G₀ → G₀
- exists_pair_ne : ∃ (x y : G₀), x ≠ y
- inv_zero : 0⁻¹ = 0
- mul_inv_cancel : ∀ (a : G₀), a ≠ 0 → a * a⁻¹ = 1
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.
The division operation on a group with zero element.
Pullback a monoid_with_zero class along an injective function.
Equations
- function.injective.monoid_with_zero f hf zero one mul = {mul := monoid.mul (function.injective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, zero := mul_zero_class.zero (function.injective.mul_zero_class f hf zero mul), zero_mul := _, mul_zero := _}
Pushforward a monoid_with_zero class along a surjective function.
Equations
- function.surjective.monoid_with_zero f hf zero one mul = {mul := monoid.mul (function.surjective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.surjective.monoid f hf one mul), one_mul := _, mul_one := _, zero := mul_zero_class.zero (function.surjective.mul_zero_class f hf zero mul), zero_mul := _, mul_zero := _}
Pullback a monoid_with_zero class along an injective function.
Equations
- function.injective.comm_monoid_with_zero f hf zero one mul = {mul := comm_monoid.mul (function.injective.comm_monoid f hf one mul), mul_assoc := _, one := comm_monoid.one (function.injective.comm_monoid f hf one mul), one_mul := _, mul_one := _, mul_comm := _, zero := mul_zero_class.zero (function.injective.mul_zero_class f hf zero mul), zero_mul := _, mul_zero := _}
Pushforward a monoid_with_zero class along a surjective function.
Equations
- function.surjective.comm_monoid_with_zero f hf zero one mul = {mul := comm_monoid.mul (function.surjective.comm_monoid f hf one mul), mul_assoc := _, one := comm_monoid.one (function.surjective.comm_monoid f hf one mul), one_mul := _, mul_one := _, mul_comm := _, zero := mul_zero_class.zero (function.surjective.mul_zero_class f hf zero mul), zero_mul := _, mul_zero := _}
An element of the unit group of a nonzero monoid with zero represented as an element of the monoid is nonzero.
In a monoid with zero, if zero equals one, then zero is the only element.
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.
Equations
- unique_of_zero_eq_one h = {to_inhabited := {default := 0}, uniq := _}
In a monoid with zero, if zero equals one, then all elements of that semiring are equal.
In a monoid with zero, either zero and one are nonequal, or zero is the only element.
Equations
Pullback a monoid_with_zero class along an injective function.
Equations
- function.injective.cancel_monoid_with_zero f hf zero one mul = {mul := monoid.mul (function.injective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, zero := mul_zero_class.zero (function.injective.mul_zero_class f hf zero mul), zero_mul := _, mul_zero := _, mul_left_cancel_of_ne_zero := _, mul_right_cancel_of_ne_zero := _}
An element of a cancel_monoid_with_zero fixed by right multiplication by an element other
than one must be zero.
An element of a cancel_monoid_with_zero fixed by left multiplication by an element other
than one must be zero.
Pullback a group_with_zero class along an injective function.
Equations
- function.injective.group_with_zero f hf zero one mul inv = {mul := monoid_with_zero.mul (function.injective.monoid_with_zero f hf zero one mul), mul_assoc := _, one := monoid_with_zero.one (function.injective.monoid_with_zero f hf zero one mul), one_mul := _, mul_one := _, zero := monoid_with_zero.zero (function.injective.monoid_with_zero f hf zero one mul), zero_mul := _, mul_zero := _, inv := has_inv.inv _inst_5, exists_pair_ne := _, inv_zero := _, mul_inv_cancel := _}
Pushforward a group_with_zero class along an surjective function.
Equations
- function.surjective.group_with_zero h01 f hf zero one mul inv = {mul := monoid_with_zero.mul (function.surjective.monoid_with_zero f hf zero one mul), mul_assoc := _, one := monoid_with_zero.one (function.surjective.monoid_with_zero f hf zero one mul), one_mul := _, mul_one := _, zero := monoid_with_zero.zero (function.surjective.monoid_with_zero f hf zero one mul), zero_mul := _, mul_zero := _, inv := has_inv.inv _inst_5, exists_pair_ne := _, inv_zero := _, mul_inv_cancel := _}
Multiplying a by itself and then by its inverse results in a
(whether or not a is zero).
Multiplying a by its inverse and then by itself results in a
(whether or not a is zero).
Multiplying a⁻¹ by a twice results in a (whether or not a
is zero).
Multiplying a by itself and then dividing by itself results in
a (whether or not a is zero).
Dividing a by itself and then multiplying by itself results in
a (whether or not a is zero).
Embed a non-zero element of a group_with_zero into the unit group.
By combining this function with the operations on units,
or the /ₚ operation, it is possible to write a division
as a partial function with three arguments.
Equations
Equations
- group_with_zero.cancel_monoid_with_zero = {mul := group_with_zero.mul _inst_1, mul_assoc := _, one := group_with_zero.one _inst_1, one_mul := _, mul_one := _, zero := group_with_zero.zero _inst_1, zero_mul := _, mul_zero := _, mul_left_cancel_of_ne_zero := _, mul_right_cancel_of_ne_zero := _}
Equations
- comm_group_with_zero.comm_cancel_monoid_with_zero = {mul := cancel_monoid_with_zero.mul group_with_zero.cancel_monoid_with_zero, mul_assoc := _, one := cancel_monoid_with_zero.one group_with_zero.cancel_monoid_with_zero, one_mul := _, mul_one := _, mul_comm := _, zero := cancel_monoid_with_zero.zero group_with_zero.cancel_monoid_with_zero, zero_mul := _, mul_zero := _, mul_left_cancel_of_ne_zero := _, mul_right_cancel_of_ne_zero := _}
Pullback a comm_group_with_zero class along an injective function.
Equations
- function.injective.comm_group_with_zero f hf zero one mul inv = {mul := group_with_zero.mul (function.injective.group_with_zero f hf zero one mul inv), mul_assoc := _, one := group_with_zero.one (function.injective.group_with_zero f hf zero one mul inv), one_mul := _, mul_one := _, mul_comm := _, zero := group_with_zero.zero (function.injective.group_with_zero f hf zero one mul inv), zero_mul := _, mul_zero := _, inv := group_with_zero.inv (function.injective.group_with_zero f hf zero one mul inv), exists_pair_ne := _, inv_zero := _, mul_inv_cancel := _}
Pushforward a comm_group_with_zero class along an surjective function.
Equations
- function.surjective.comm_group_with_zero h01 f hf zero one mul inv = {mul := group_with_zero.mul (function.surjective.group_with_zero h01 f hf zero one mul inv), mul_assoc := _, one := group_with_zero.one (function.surjective.group_with_zero h01 f hf zero one mul inv), one_mul := _, mul_one := _, mul_comm := _, zero := group_with_zero.zero (function.surjective.group_with_zero h01 f hf zero one mul inv), zero_mul := _, mul_zero := _, inv := group_with_zero.inv (function.surjective.group_with_zero h01 f hf zero one mul inv), exists_pair_ne := _, inv_zero := _, mul_inv_cancel := _}
Dividing a by the result of dividing a by itself results in
a (whether or not a is zero).
A monoid homomorphism between groups with zeros sending 0 to 0 sends a⁻¹ to (f a)⁻¹.