The areas / V06. Rings, fields and ordered algebra
Mathlib.Algebra.CharP.Defs
65 declarations. Mathlib docs · Source
Characteristic of semirings
Main definitions
CharP R pexpresses that the ring (additive monoid with one)Rhas characteristicpringChar: the characteristic of a ringExpChar R pexpresses that the ring (additive monoid with one)Rhas exponential characteristicp(which is1ifRhas characteristic 0, andpif it has prime characteristicp)
Exponential characteristic
This section defines the exponential characteristic, which is defined to be 1 for a ring with characteristic 0 and the same as the ordinary characteristic, if the ordinary characteristic is prime. This concept is useful to simplify some theorem statements. This file establishes a few basic results relating it to the (ordinary characteristic). The definition is stated for a semiring, but the actual results are for nontrivial rings (as far as exponential characteristic one is concerned), respectively a ring without zero-divisors (for prime characteristic).
class CharP E3 #
(R : Type u_2) → [AddMonoidWithOne R] → outParam ℕ → Prop
The generator of the kernel of the unique homomorphism ℕ → R for a semiring R.
Warning: for a semiring R, CharP R 0 and CharZero R need not coincide.
CharP R 0asks that only0 : ℕmaps to0 : Runder the mapℕ → R;CharZero Rrequires an injectionℕ ↪ R.
For instance, endowing {0, 1} with addition given by max (i.e. 1 is absorbing), shows that
CharZero {0, 1} does not hold and yet CharP {0, 1} 0 does.
This example is formalized in Counterexamples/CharPZeroNeCharZero.lean.
theorem charP_iff E0 #
∀ (R : Type u_2) [inst : AddMonoidWithOne R] (p : outParam ℕ), CharP R p ↔ ∀ (x : ℕ), ↑x = 0 ↔ p ∣ x
ctor CharP.mk E0 #
∀ {R : Type u_2} [inst : AddMonoidWithOne R] {p : outParam ℕ}, (∀ (x : ℕ), ↑x = 0 ↔ p ∣ x) → CharP R p
theorem CharP.cast_eq_zero_iff E0 #
∀ (R : Type u_2) {inst : AddMonoidWithOne R} (p : outParam ℕ) [self : CharP R p] (x : ℕ), ↑x = 0 ↔ p ∣ x
theorem CharP.ofNat_eq_zero' E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] (a : ℕ) [inst_2 : a.AtLeastTwo],
p ∣ a → OfNat.ofNat a = 0
theorem CharP.congr E1 #
∀ {R : Type u_1} [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] {q : ℕ}, p = q → CharP R q
theorem CharP.cast_eq_zero E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p], ↑p = 0
theorem CharP.cast_eq_mod E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] (k : ℕ), ↑k = ↑(k % p)
theorem CharP.cast_eq_iff_mod_eq E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] {a b : ℕ} [IsLeftCancelAdd R], ↑a = ↑b ↔ a % p = b % p
theorem CharP.ofNat_eq_zero E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] [inst_2 : p.AtLeastTwo], OfNat.ofNat p = 0
theorem CharP.eq E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] {p q : ℕ}, CharP R p → CharP R q → p = q
instance CharP.ofCharZero E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] [CharZero R], CharP R 0
theorem CharP.intCast_eq_zero_iff E0 #
∀ (R : Type u_1) [inst : AddGroupWithOne R] (p : ℕ) [CharP R p] (a : ℤ), ↑a = 0 ↔ ↑p ∣ a
theorem CharP.charP_to_charZero E1 #
∀ (R : Type u_1) [inst : AddGroupWithOne R] [CharP R 0], CharZero R
theorem CharP.charP_zero_iff_charZero E1 #
∀ (R : Type u_1) [inst : AddGroupWithOne R], CharP R 0 ↔ CharZero R
theorem CharP.exists E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R], ∃ p, CharP R p
theorem CharP.existsUnique E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R], ∃! p, CharP R p
def ringChar E3 #
(R : Type u_1) → [NonAssocSemiring R] → ℕ
Noncomputable function that outputs the unique characteristic of a semiring.
theorem ringChar.spec E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] (x : ℕ), ↑x = 0 ↔ ringChar R ∣ x
theorem ringChar.eq E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] (p : ℕ) [C : CharP R p], ringChar R = p
instance ringChar.charP E0 #
∀ (R : Type u_1) [inst : NonAssocSemiring R], CharP R (ringChar R)
theorem ringChar.of_eq E0 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] {p : ℕ}, ringChar R = p → CharP R p
theorem ringChar.dvd E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] {x : ℕ}, ↑x = 0 → ringChar R ∣ x
theorem ringChar.Nat.cast_ringChar E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R], ↑(ringChar R) = 0
theorem ringChar.ringChar_eq_one E0 #
∀ {R : Type u_1} [inst : NonAssocSemiring R], ringChar R = 1 ↔ Subsingleton R
theorem ringChar.ringChar_subsingleton E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] [Subsingleton R], ringChar R = 1
theorem CharP.neg_one_ne_one E1 #
∀ (R : Type u_1) [inst : AddGroupWithOne R] (p : ℕ) [CharP R p] [Fact (2 < p)], -1 ≠ 1
theorem CharP.ringChar_zero_iff_CharZero E1 #
∀ (R : Type u_1) [inst : NonAssocRing R], ringChar R = 0 ↔ CharZero R
theorem CharP.char_ne_one E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] [Nontrivial R] (p : ℕ) [hc : CharP R p], p ≠ 1
theorem CharP.char_is_prime_of_two_le E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] [NoZeroDivisors R] (p : ℕ) [CharP R p], 2 ≤ p → Nat.Prime p
theorem CharP.char_is_prime_or_zero E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] [NoZeroDivisors R] [Nontrivial R] (p : ℕ) [hc : CharP R p],
Nat.Prime p ∨ p = 0
theorem CharP.char_prime_of_ne_zero E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] [NoZeroDivisors R] [Nontrivial R] {p : ℕ} [CharP R p], p ≠ 0 → Nat.Prime p
The characteristic is prime if it is non-zero.
theorem CharP.exists' E1 #
∀ (R : Type u_2) [inst : NonAssocRing R] [NoZeroDivisors R] [Nontrivial R],
CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p
theorem CharP.char_is_prime_of_pos E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] [NoZeroDivisors R] [Nontrivial R] (p : ℕ) [NeZero p] [CharP R p],
Fact (Nat.Prime p)
theorem CharP.CharOne.subsingleton E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] [CharP R 1], Subsingleton R
theorem CharP.false_of_nontrivial_of_char_one E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] [Nontrivial R] [CharP R 1], False
theorem CharP.ringChar_ne_one E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] [Nontrivial R], ringChar R ≠ 1
theorem CharP.nontrivial_of_char_ne_one E1 #
∀ {R : Type u_1} [inst : NonAssocSemiring R] {v : ℕ}, v ≠ 1 → ∀ [hr : CharP R v], Nontrivial R
theorem NeZero.of_not_dvd E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] {n p : ℕ} [CharP R p], ¬p ∣ n → NeZero ↑n
theorem NeZero.not_char_dvd E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] (k : ℕ) [h : NeZero ↑k], ¬p ∣ k
class ExpChar E3 #
(R : Type u_1) → [AddMonoidWithOne R] → ℕ → Prop
The definition of the exponential characteristic of a semiring.
theorem expChar_iff E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (a : ℕ), ExpChar R a ↔ CharZero R ∧ a = 1 ∨ Nat.Prime a ∧ CharP R a
ctor ExpChar.zero E0 #
∀ {R : Type u_1} [inst : AddMonoidWithOne R] [CharZero R], ExpChar R 1
ctor ExpChar.prime E0 #
∀ {R : Type u_1} [inst : AddMonoidWithOne R] {q : ℕ}, Nat.Prime q → ∀ [hchar : CharP R q], ExpChar R q
instance expChar_prime E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [CharP R p] [Fact (Nat.Prime p)], ExpChar R p
instance expChar_one E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] [CharZero R], ExpChar R 1
theorem expChar_one_iff E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R], ExpChar R 1 ↔ CharZero R
theorem expChar_prime_iff E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] {p : ℕ}, Nat.Prime p → (ExpChar R p ↔ CharP R p)
theorem expChar_ne_zero E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [hR : ExpChar R p], p ≠ 0
theorem ExpChar.eq E1 #
∀ {R : Type u_1} [inst : AddMonoidWithOne R] {p q : ℕ}, ExpChar R p → ExpChar R q → p = q
The exponential characteristic is unique.
theorem ExpChar.congr E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] {p : ℕ} (q : ℕ) [hq : ExpChar R q], q = p → ExpChar R p
theorem expChar_one_of_char_zero E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (q : ℕ) [hp : CharP R 0] [hq : ExpChar R q], q = 1
The exponential characteristic is one if the characteristic is zero.
theorem char_eq_expChar_iff E0 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p q : ℕ) [hp : CharP R p] [hq : ExpChar R q], p = q ↔ Nat.Prime p
The characteristic equals the exponential characteristic iff the former is prime.
theorem expChar_is_prime_or_one E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (q : ℕ) [hq : ExpChar R q], Nat.Prime q ∨ q = 1
The exponential characteristic is a prime number or one.
See also CharP.char_is_prime_or_zero.
theorem expChar_pos E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (q : ℕ) [ExpChar R q], 0 < q
The exponential characteristic is positive.
theorem expChar_pow_pos E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (q : ℕ) [ExpChar R q] (n : ℕ), 0 < q ^ n
Any power of the exponential characteristic is positive.
theorem charZero_of_expChar_one' E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] [ExpChar R 1], CharZero R
The characteristic is zero if the exponential characteristic is one.
theorem char_zero_of_expChar_one E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p : ℕ) [hp : CharP R p] [hq : ExpChar R 1], p = 0
The exponential characteristic is one if the characteristic is zero.
theorem expChar_one_iff_char_zero E1 #
∀ (R : Type u_1) [inst : AddMonoidWithOne R] (p q : ℕ) [CharP R p] [ExpChar R q], q = 1 ↔ p = 0
The exponential characteristic is one iff the characteristic is zero.
def ringExpChar E1 #
(R : Type u_1) → [NonAssocSemiring R] → ℕ
Noncomputable function that outputs the unique exponential characteristic of a semiring.
theorem ringExpChar.eq E1 #
∀ (R : Type u_1) [inst : NonAssocSemiring R] (q : ℕ) [h : ExpChar R q], ringExpChar R = q
theorem ExpChar.exists E1 #
∀ (R : Type u_1) [inst : Ring R] [IsDomain R], ∃ q, ExpChar R q
theorem ExpChar.exists_unique E1 #
∀ (R : Type u_1) [inst : Ring R] [IsDomain R], ∃! q, ExpChar R q
instance ringExpChar.expChar E0 #
∀ (R : Type u_1) [inst : Ring R] [IsDomain R], ExpChar R (ringExpChar R)
theorem ringExpChar.of_eq E0 #
∀ {R : Type u_1} [inst : Ring R] [IsDomain R] {q : ℕ}, ringExpChar R = q → ExpChar R q