Characteristic of semirings #
@[class]
The generator of the kernel of the unique homomorphism ℕ → R for a semiring R.
Warning: for a semiring R
, char_p R 0
and char_zero R
need not coincide.
char_p R 0
asks that only0 : ℕ
maps to0 : R
under the mapℕ → R
;char_zero R
requires an injectionℕ ↪ 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
.
@[simp]
theorem
char_p.cast_card_eq_zero
(R : Type u)
[add_group R]
[has_one R]
[fintype R] :
↑(fintype.card R) = 0
@[protected, instance]
theorem
char_p.congr
{R : Type u}
[add_monoid R]
[has_one R]
{p : ℕ}
(q : ℕ)
[hq : char_p R q]
(h : q = p) :
char_p R p
Noncomputable function that outputs the unique characteristic of a semiring.
Equations
- ring_char R = classical.some _
@[protected, instance]
theorem
ring_char.of_eq
{R : Type u}
[non_assoc_semiring R]
{p : ℕ}
(h : ring_char R = p) :
char_p R p
@[simp]
theorem
ring_hom.char_p_iff_char_p
{K : Type u_1}
{L : Type u_2}
[division_ring K]
[semiring L]
[nontrivial L]
(f : K →+* L)
(p : ℕ) :
theorem
multiset_sum_pow_char
{R : Type u}
[comm_semiring R]
(p : ℕ)
[fact (nat.prime p)]
[char_p R p]
(s : multiset R) :
theorem
frobenius_inj
(R : Type u)
[comm_ring R]
[is_reduced R]
(p : ℕ)
[fact (nat.prime p)]
[char_p R p] :
function.injective ⇑(frobenius R p)
theorem
char_p.char_p_to_char_zero
(R : Type u_1)
[add_left_cancel_monoid R]
[has_one R]
[char_p R 0] :
theorem
char_p.char_ne_one
(R : Type u)
[non_assoc_semiring R]
[nontrivial R]
(p : ℕ)
[hc : char_p R p] :
p ≠ 1
theorem
char_p.char_is_prime_of_two_le
(R : Type u)
[non_assoc_semiring R]
[no_zero_divisors R]
(p : ℕ)
[hc : char_p R p]
(hp : 2 ≤ p) :
theorem
char_p.char_is_prime_or_zero
(R : Type u)
[non_assoc_semiring R]
[no_zero_divisors R]
[nontrivial R]
(p : ℕ)
[hc : char_p R p] :
theorem
char_p.char_is_prime_of_pos
(R : Type u)
[non_assoc_semiring R]
[no_zero_divisors R]
[nontrivial R]
(p : ℕ)
[h : fact (0 < p)]
[char_p R p] :
theorem
char_p.char_is_prime
(R : Type u)
[ring R]
[no_zero_divisors R]
[nontrivial R]
[fintype R]
(p : ℕ)
[char_p R p] :
@[protected, instance]
theorem
char_p.false_of_nontrivial_of_char_one
{R : Type u}
[non_assoc_semiring R]
[nontrivial R]
[char_p R 1] :
theorem
char_p.nontrivial_of_char_ne_one
{R : Type u}
[non_assoc_semiring R]
{v : ℕ}
(hv : v ≠ 1)
[hr : char_p R v] :
theorem
char_p.ring_char_of_prime_eq_zero
{R : Type u}
[non_assoc_semiring R]
[nontrivial R]
{p : ℕ}
(hprime : nat.prime p)
(hp0 : ↑p = 0) :