Lemmas about units in a MonoidWithZero or a GroupWithZero. #
We also define Ring.inverse, a globally defined function on any ring
(in fact any MonoidWithZero), which inverts units and sends non-units to zero.
An element of the unit group of a nonzero monoid with zero represented as an element of the monoid is nonzero.
Introduce a function inverse on a monoid with zero M₀, which sends x to x⁻¹ if x is
invertible and to 0 otherwise. This definition is somewhat ad hoc, but one needs a fully (rather
than partially) defined inverse function for some purposes, including for calculus.
Note that while this is in the Ring namespace for brevity, it requires the weaker assumption
MonoidWithZero M₀ instead of Ring M₀.
Equations
- Ring.inverse x = if h : IsUnit x then ↑h.unit⁻¹ else 0
Instances For
By definition, if x is invertible then inverse x = x⁻¹.
By definition, if x is not invertible then inverse x = 0.
Embed a non-zero element of a GroupWithZero 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.
Instances For
An alternative version of Units.exists0. This one is useful if Lean cannot
figure out p when using Units.exists0 from right to left.
Alias of the reverse direction of isUnit_iff_ne_zero.
Equations
- ⋯ = ⋯
A variant of eq_mul_inv_iff_mul_eq₀ that moves the nonzero hypothesis to another variable.
A variant of eq_inv_mul_iff_mul_eq₀ that moves the nonzero hypothesis to another variable.
A variant of inv_mul_eq_iff_eq_mul₀ that moves the nonzero hypothesis to another variable.
A variant of mul_inv_eq_iff_eq_mul₀ that moves the nonzero hypothesis to another variable.
Alias of zpow_ne_zero.
Alias of eq_zero_of_zpow_eq_zero.
In a GroupWithZero α, the unit group αˣ is equivalent to the subtype of nonzero
elements.
Equations
Instances For
Equations
- CommGroupWithZero.toCancelCommMonoidWithZero = let __src := GroupWithZero.toCancelMonoidWithZero; let __src_1 := CommGroupWithZero.toCommMonoidWithZero; CancelCommMonoidWithZero.mk
Equations
- CommGroupWithZero.toDivisionCommMonoid = let __spread.0 := inst; let __spread.1 := GroupWithZero.toDivisionMonoid; DivisionCommMonoid.mk ⋯
The CommGroupWithZero version of div_eq_div_iff_div_eq_div.
Constructs a GroupWithZero structure on a MonoidWithZero
consisting only of units and 0.
Equations
- groupWithZeroOfIsUnitOrEqZero h = GroupWithZero.mk ⋯ zpowRec ⋯ ⋯ ⋯ ⋯ ⋯
Instances For
Constructs a CommGroupWithZero structure on a CommMonoidWithZero
consisting only of units and 0.
Equations
- commGroupWithZeroOfIsUnitOrEqZero h = let __src := groupWithZeroOfIsUnitOrEqZero h; CommGroupWithZero.mk ⋯ GroupWithZero.zpow ⋯ ⋯ ⋯ ⋯ ⋯
Instances For
Alias of mul_div_cancel₀.