# mathlib3documentation

algebra.char_zero.defs

# Characteristic zero #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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 #

char_zero 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 char_p (possibly using an out-parameter)
@[class]
structure char_zero (R : Type u_1)  :
Prop
• cast_injective :

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, char_zero R and char_p R 0 need not coincide.

• char_zero R requires an injection ℕ ↪ R;
• char_p R 0 asks that only 0 : ℕ maps to 0 : R under the map ℕ → R.

For instance, endowing {0, 1} with addition given by max (i.e. 1 is absorbing), shows that char_zero {0, 1} does not hold and yet char_p {0, 1} 0 does. This example is formalized in counterexamples/char_p_zero_ne_char_zero.

Instances of this typeclass
theorem char_zero_of_inj_zero {R : Type u_1} (H : (n : ), n = 0 n = 0) :
theorem nat.cast_injective {R : Type u_1} [char_zero R] :
@[simp, norm_cast]
theorem nat.cast_inj {R : Type u_1} [char_zero R] {m n : } :
m = n m = n
@[simp, norm_cast]
theorem nat.cast_eq_zero {R : Type u_1} [char_zero R] {n : } :
n = 0 n = 0
@[norm_cast]
theorem nat.cast_ne_zero {R : Type u_1} [char_zero R] {n : } :
n 0 n 0
theorem nat.cast_add_one_ne_zero {R : Type u_1} [char_zero R] (n : ) :
n + 1 0
@[simp, norm_cast]
theorem nat.cast_eq_one {R : Type u_1} [char_zero R] {n : } :
n = 1 n = 1
@[norm_cast]
theorem nat.cast_ne_one {R : Type u_1} [char_zero R] {n : } :
n 1 n 1
@[protected, instance]
def ne_zero.char_zero {M : Type u_1} {n : } [ne_zero n] [char_zero M] :