Characteristic zero #
A ring R
is called of characteristic zero if every natural number n
is non-zero when considered
as an element of R
. Since this definition doesn't mention the multiplicative structure of R
except for the existence of 1
in this file characteristic zero is defined for additive monoids
with 1
.
Main definition #
CharZero
is the typeclass of an additive monoid with one such that the natural homomorphism
from the natural numbers into it is injective.
TODO #
- Unify with
CharP
(possibly using an out-parameter)
Typeclass for monoids with characteristic zero. (This is usually stated on fields but it makes sense for any additive monoid with 1.)
Warning: for a semiring R
, CharZero R
and CharP R 0
need not coincide.
CharZero R
requires an injectionℕ ↪ R
;CharP R 0
asks that only0 : ℕ
maps to0 : R
under the mapℕ → R
. For instance, endowing{0, 1}
with addition given bymax
(i.e.1
is absorbing), shows thatCharZero {0, 1}
does not hold and yetCharP {0, 1} 0
does. This example is formalized inCounterexamples/CharPZeroNeCharZero.lean
.
- cast_injective : Function.Injective Nat.cast
An additive monoid with one has characteristic zero if the canonical map
ℕ → R
is injective.
Instances
theorem
charZero_of_inj_zero
{R : Type u_1}
[AddGroupWithOne R]
(H : ∀ (n : ℕ), ↑n = 0 → n = 0)
:
CharZero R
theorem
Nat.cast_injective
{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
:
Function.Injective Nat.cast
@[simp]
@[simp]
@[simp]
@[simp]
theorem
OfNat.ofNat_ne_zero
{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
(n : ℕ)
[Nat.AtLeastTwo n]
:
OfNat.ofNat n ≠ 0
@[simp]
theorem
OfNat.zero_ne_ofNat
{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
(n : ℕ)
[Nat.AtLeastTwo n]
:
0 ≠ OfNat.ofNat n
@[simp]
theorem
OfNat.ofNat_ne_one
{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
(n : ℕ)
[Nat.AtLeastTwo n]
:
OfNat.ofNat n ≠ 1
@[simp]
theorem
OfNat.one_ne_ofNat
{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
(n : ℕ)
[Nat.AtLeastTwo n]
:
1 ≠ OfNat.ofNat n
@[simp]
theorem
OfNat.ofNat_eq_ofNat
{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
{m : ℕ}
{n : ℕ}
[Nat.AtLeastTwo m]
[Nat.AtLeastTwo n]
:
OfNat.ofNat m = OfNat.ofNat n ↔ OfNat.ofNat m = OfNat.ofNat n
instance
NeZero.charZero
{M : Type u_2}
{n : ℕ}
[NeZero n]
[AddMonoidWithOne M]
[CharZero M]
:
NeZero ↑n
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
instance
NeZero.charZero_ofNat
{M : Type u_2}
{n : ℕ}
[Nat.AtLeastTwo n]
[AddMonoidWithOne M]
[CharZero M]
:
NeZero (OfNat.ofNat n)
Equations
- ⋯ = ⋯