File: Mathlib/Algebra/CharP/ExpChar.lean

full_name: ExpChar.prime
code: /-- The definition of the exponential characteristic of a semiring. -/
class inductive ExpChar (R : Type u) [Semiring R] : ℕ → Prop
  | zero [CharZero R] : ExpChar R 1
  | prime {q : ℕ} (hprime : q.Prime) [hchar : CharP R q] : ExpChar R q
goal: ExpChar R q

full_name: ExpChar.zero
code: /-- The definition of the exponential characteristic of a semiring. -/
class inductive ExpChar (R : Type u) [Semiring R] : ℕ → Prop
  | zero [CharZero R] : ExpChar R 1
  | prime {q : ℕ} (hprime : q.Prime) [hchar : CharP R q] : ExpChar R q
goal: ExpChar R 1

full_name: ExpChar
code: /-- The definition of the exponential characteristic of a semiring. -/
class inductive ExpChar (R : Type u) [Semiring R] : ℕ → Prop
  | zero [CharZero R] : ExpChar R 1
  | prime {q : ℕ} (hprime : q.Prime) [hchar : CharP R q] : ExpChar R q
goal: ℕ → Prop

full_name: expChar_prime
code: instance expChar_prime (p) [CharP R p] [Fact p.Prime] : ExpChar R p 
goal: ExpChar R p

full_name: expChar_zero
code: instance expChar_zero [CharZero R] : ExpChar R 1 
goal: ExpChar R 1

full_name: instExpCharProd
code: instance (S : Type*) [Semiring S] (p) [ExpChar R p] [ExpChar S p] : ExpChar (R × S) p 
goal: ExpChar (R × S) p

full_name: ExpChar.eq
code: /-- The exponential characteristic is unique. -/
theorem ExpChar.eq {p q : ℕ} (hp : ExpChar R p) (hq : ExpChar R q) : p = q 
goal: p = q

full_name: ExpChar.congr
code: theorem ExpChar.congr {p : ℕ} (q : ℕ) [hq : ExpChar R q] (h : q = p) : ExpChar R p 
goal: ExpChar R p

full_name: ringExpChar
code: /-- Noncomputable function that outputs the unique exponential characteristic of a semiring. -/
noncomputable def ringExpChar (R : Type*) [NonAssocSemiring R] : ℕ 
goal: ℕ

full_name: ringExpChar.eq
code: theorem ringExpChar.eq (q : ℕ) [h : ExpChar R q] : ringExpChar R = q 
goal: ringExpChar R = q

full_name: ringExpChar.eq_one
code: @[simp]
theorem ringExpChar.eq_one (R : Type*) [NonAssocSemiring R] [CharZero R] : ringExpChar R = 1 
goal: ringExpChar R = 1

full_name: expChar_one_of_char_zero
code: /-- The exponential characteristic is one if the characteristic is zero. -/
theorem expChar_one_of_char_zero (q : ℕ) [hp : CharP R 0] [hq : ExpChar R q] : q = 1 
goal: q = 1

full_name: char_eq_expChar_iff
code: /-- The characteristic equals the exponential characteristic iff the former is prime. -/
theorem char_eq_expChar_iff (p q : ℕ) [hp : CharP R p] [hq : ExpChar R q] : p = q ↔ p.Prime 
goal: p = q ↔ Nat.Prime p

full_name: char_zero_of_expChar_one
code: /-- The exponential characteristic is one if the characteristic is zero. -/
theorem char_zero_of_expChar_one (p : ℕ) [hp : CharP R p] [hq : ExpChar R 1] : p = 0 
goal: p = 0

full_name: charZero_of_expChar_one'
code: /-- The characteristic is zero if the exponential characteristic is one. -/
theorem charZero_of_expChar_one' [hq : ExpChar R 1] : CharZero R 
goal: CharZero R

full_name: expChar_one_iff_char_zero
code: /-- The exponential characteristic is one iff the characteristic is zero. -/
theorem expChar_one_iff_char_zero (p q : ℕ) [CharP R p] [ExpChar R q] : q = 1 ↔ p = 0 
goal: q = 1 ↔ p = 0

full_name: char_prime_of_ne_zero
code: /-- A helper lemma: the characteristic is prime if it is non-zero. -/
theorem char_prime_of_ne_zero {p : ℕ} [hp : CharP R p] (p_ne_zero : p ≠ 0) : Nat.Prime p 
goal: Nat.Prime p

full_name: expChar_is_prime_or_one
code: /-- The exponential characteristic is a prime number or one.
See also `CharP.char_is_prime_or_zero`. -/
theorem expChar_is_prime_or_one (q : ℕ) [hq : ExpChar R q] : Nat.Prime q ∨ q = 1 
goal: Nat.Prime q ∨ q = 1

full_name: expChar_pos
code: /-- The exponential characteristic is positive. -/
theorem expChar_pos (q : ℕ) [ExpChar R q] : 0 < q 
goal: 0 < q

full_name: expChar_pow_pos
code: /-- Any power of the exponential characteristic is positive. -/
theorem expChar_pow_pos (q : ℕ) [ExpChar R q] (n : ℕ) : 0 < q ^ n 
goal: 0 < q ^ n

full_name: ExpChar.exists
code: theorem ExpChar.exists [Ring R] [IsDomain R] : ∃ q, ExpChar R q 
goal: ∃ q, ExpChar R q

full_name: ExpChar.exists_unique
code: theorem ExpChar.exists_unique [Ring R] [IsDomain R] : ∃! q, ExpChar R q 
goal: ∃! q, ExpChar R q

full_name: ringExpChar.expChar
code: instance ringExpChar.expChar [Ring R] [IsDomain R] : ExpChar R (ringExpChar R) 
goal: ExpChar R (ringExpChar R)

full_name: ringExpChar.of_eq
code: theorem ringExpChar.of_eq [Ring R] [IsDomain R] {q : ℕ} (h : ringExpChar R = q) : ExpChar R q 
goal: ExpChar R q

full_name: ringExpChar.eq_iff
code: theorem ringExpChar.eq_iff [Ring R] [IsDomain R] {q : ℕ} : ringExpChar R = q ↔ ExpChar R q 
goal: ringExpChar R = q ↔ ExpChar R q

full_name: expChar_of_injective_ringHom
code: /-- If a ring homomorphism `R →+* A` is injective then `A` has the same exponential characteristic
as `R`. -/
theorem expChar_of_injective_ringHom {R A : Type*}
    [Semiring R] [Semiring A] {f : R →+* A} (h : Function.Injective f)
    (q : ℕ) [hR : ExpChar R q] : ExpChar A q 
goal: ExpChar A q

full_name: RingHom.expChar
code: /-- If `R →+* A` is injective, and `A` is of exponential characteristic `p`, then `R` is also of
exponential characteristic `p`. Similar to `RingHom.charZero`. -/
theorem RingHom.expChar {R A : Type*} [Semiring R] [Semiring A] (f : R →+* A)
    (H : Function.Injective f) (p : ℕ) [ExpChar A p] : ExpChar R p 
goal: ExpChar R p

full_name: RingHom.expChar_iff
code: /-- If `R →+* A` is injective, then `R` is of exponential characteristic `p` if and only if `A` is
also of exponential characteristic `p`. Similar to `RingHom.charZero_iff`. -/
theorem RingHom.expChar_iff {R A : Type*} [Semiring R] [Semiring A] (f : R →+* A)
    (H : Function.Injective f) (p : ℕ) : ExpChar R p ↔ ExpChar A p 
goal: ExpChar R p ↔ ExpChar A p

full_name: expChar_of_injective_algebraMap
code: /-- If the algebra map `R →+* A` is injective then `A` has the same exponential characteristic
as `R`. -/
theorem expChar_of_injective_algebraMap {R A : Type*}
    [CommSemiring R] [Semiring A] [Algebra R A] (h : Function.Injective (algebraMap R A))
    (q : ℕ) [ExpChar R q] : ExpChar A q 
goal: ExpChar A q

full_name: add_pow_expChar_of_commute
code: theorem add_pow_expChar_of_commute [Semiring R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) (h : Commute x y) : (x + y) ^ q = x ^ q + y ^ q 
goal: (x + y) ^ q = x ^ q + y ^ q

full_name: add_pow_expChar_pow_of_commute
code: theorem add_pow_expChar_pow_of_commute [Semiring R] {q : ℕ} [hR : ExpChar R q]
    {n : ℕ} (x y : R) (h : Commute x y) : (x + y) ^ q ^ n = x ^ q ^ n + y ^ q ^ n 
goal: (x + y) ^ q ^ n = x ^ q ^ n + y ^ q ^ n

full_name: sub_pow_expChar_of_commute
code: theorem sub_pow_expChar_of_commute [Ring R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) (h : Commute x y) : (x - y) ^ q = x ^ q - y ^ q 
goal: (x - y) ^ q = x ^ q - y ^ q

full_name: sub_pow_expChar_pow_of_commute
code: theorem sub_pow_expChar_pow_of_commute [Ring R] {q : ℕ} [hR : ExpChar R q]
    {n : ℕ} (x y : R) (h : Commute x y) : (x - y) ^ q ^ n = x ^ q ^ n - y ^ q ^ n 
goal: (x - y) ^ q ^ n = x ^ q ^ n - y ^ q ^ n

full_name: add_pow_expChar
code: theorem add_pow_expChar [CommSemiring R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) : (x + y) ^ q = x ^ q + y ^ q 
goal: (x + y) ^ q = x ^ q + y ^ q

full_name: add_pow_expChar_pow
code: theorem add_pow_expChar_pow [CommSemiring R] {q : ℕ} [hR : ExpChar R q]
    {n : ℕ} (x y : R) : (x + y) ^ q ^ n = x ^ q ^ n + y ^ q ^ n 
goal: (x + y) ^ q ^ n = x ^ q ^ n + y ^ q ^ n

full_name: sub_pow_expChar
code: theorem sub_pow_expChar [CommRing R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) : (x - y) ^ q = x ^ q - y ^ q 
goal: (x - y) ^ q = x ^ q - y ^ q

full_name: sub_pow_expChar_pow
code: theorem sub_pow_expChar_pow [CommRing R] {q : ℕ} [hR : ExpChar R q]
    {n : ℕ} (x y : R) : (x - y) ^ q ^ n = x ^ q ^ n - y ^ q ^ n 
goal: (x - y) ^ q ^ n = x ^ q ^ n - y ^ q ^ n

full_name: ExpChar.neg_one_pow_expChar
code: theorem ExpChar.neg_one_pow_expChar [Ring R] (q : ℕ) [hR : ExpChar R q] :
    (-1 : R) ^ q = -1 
goal: (-1) ^ q = -1

full_name: ExpChar.neg_one_pow_expChar_pow
code: theorem ExpChar.neg_one_pow_expChar_pow [Ring R] (q n : ℕ) [hR : ExpChar R q] :
    (-1 : R) ^ q ^ n = -1 
goal: (-1) ^ q ^ n = -1

full_name: frobenius
code: /-- The frobenius map that sends x to x^p -/
def frobenius : R →+* R 
goal: R →+* R

full_name: iterateFrobenius
code: /-- The iterated frobenius map sending x to x^p^n -/
def iterateFrobenius : R →+* R 
goal: R →+* R

full_name: frobenius_def
code: theorem frobenius_def : frobenius R p x = x ^ p 
goal: (frobenius R p) x = x ^ p

full_name: iterateFrobenius_def
code: theorem iterateFrobenius_def : iterateFrobenius R p n x = x ^ p ^ n 
goal: (iterateFrobenius R p n) x = x ^ p ^ n

full_name: iterate_frobenius
code: theorem iterate_frobenius : (frobenius R p)^[n] x = x ^ p ^ n 
goal: (⇑(frobenius R p))^[n] x = x ^ p ^ n

full_name: coe_iterateFrobenius
code: theorem coe_iterateFrobenius : iterateFrobenius R p n = (frobenius R p)^[n] 
goal: ⇑(iterateFrobenius R p n) = (⇑(frobenius R p))^[n]

full_name: iterateFrobenius_one_apply
code: theorem iterateFrobenius_one_apply : iterateFrobenius R p 1 x = x ^ p 
goal: (iterateFrobenius R p 1) x = x ^ p

full_name: iterateFrobenius_one
code: @[simp]
theorem iterateFrobenius_one : iterateFrobenius R p 1 = frobenius R p 
goal: iterateFrobenius R p 1 = frobenius R p

full_name: iterateFrobenius_zero_apply
code: theorem iterateFrobenius_zero_apply : iterateFrobenius R p 0 x = x 
goal: (iterateFrobenius R p 0) x = x

full_name: iterateFrobenius_zero
code: @[simp]
theorem iterateFrobenius_zero : iterateFrobenius R p 0 = RingHom.id R 
goal: iterateFrobenius R p 0 = RingHom.id R

full_name: iterateFrobenius_add_apply
code: theorem iterateFrobenius_add_apply :
    iterateFrobenius R p (m + n) x = iterateFrobenius R p m (iterateFrobenius R p n x) 
goal: (iterateFrobenius R p (m + n)) x = (iterateFrobenius R p m) ((iterateFrobenius R p n) x)

full_name: iterateFrobenius_add
code: theorem iterateFrobenius_add :
    iterateFrobenius R p (m + n) = (iterateFrobenius R p m).comp (iterateFrobenius R p n) 
goal: iterateFrobenius R p (m + n) = (iterateFrobenius R p m).comp (iterateFrobenius R p n)

full_name: iterateFrobenius_mul_apply
code: theorem iterateFrobenius_mul_apply :
    iterateFrobenius R p (m * n) x = (iterateFrobenius R p m)^[n] x 
goal: (iterateFrobenius R p (m * n)) x = (⇑(iterateFrobenius R p m))^[n] x

full_name: coe_iterateFrobenius_mul
code: theorem coe_iterateFrobenius_mul : iterateFrobenius R p (m * n) = (iterateFrobenius R p m)^[n] 
goal: ⇑(iterateFrobenius R p (m * n)) = (⇑(iterateFrobenius R p m))^[n]

full_name: frobenius_mul
code: theorem frobenius_mul : frobenius R p (x * y) = frobenius R p x * frobenius R p y 
goal: (frobenius R p) (x * y) = (frobenius R p) x * (frobenius R p) y

full_name: frobenius_one
code: theorem frobenius_one : frobenius R p 1 = 1 
goal: (frobenius R p) 1 = 1

full_name: MonoidHom.map_frobenius
code: theorem MonoidHom.map_frobenius : f (frobenius R p x) = frobenius S p (f x) 
goal: f ((frobenius R p) x) = (frobenius S p) (f x)

full_name: RingHom.map_frobenius
code: theorem RingHom.map_frobenius : g (frobenius R p x) = frobenius S p (g x) 
goal: g ((frobenius R p) x) = (frobenius S p) (g x)

full_name: MonoidHom.map_iterate_frobenius
code: theorem MonoidHom.map_iterate_frobenius (n : ℕ) :
    f ((frobenius R p)^[n] x) = (frobenius S p)^[n] (f x) 
goal: f ((⇑(frobenius R p))^[n] x) = (⇑(frobenius S p))^[n] (f x)

full_name: RingHom.map_iterate_frobenius
code: theorem RingHom.map_iterate_frobenius (n : ℕ) :
    g ((frobenius R p)^[n] x) = (frobenius S p)^[n] (g x) 
goal: g ((⇑(frobenius R p))^[n] x) = (⇑(frobenius S p))^[n] (g x)

full_name: MonoidHom.iterate_map_frobenius
code: theorem MonoidHom.iterate_map_frobenius (f : R →* R) (p : ℕ) [ExpChar R p] (n : ℕ) :
    f^[n] (frobenius R p x) = frobenius R p (f^[n] x) 
goal: (⇑f)^[n] ((frobenius R p) x) = (frobenius R p) ((⇑f)^[n] x)

full_name: RingHom.iterate_map_frobenius
code: theorem RingHom.iterate_map_frobenius (f : R →+* R) (p : ℕ) [ExpChar R p] (n : ℕ) :
    f^[n] (frobenius R p x) = frobenius R p (f^[n] x) 
goal: (⇑f)^[n] ((frobenius R p) x) = (frobenius R p) ((⇑f)^[n] x)

full_name: LinearMap.frobenius
code: /-- The frobenius map of an algebra as a frobenius-semilinear map. -/
nonrec def LinearMap.frobenius [Algebra R S] : S →ₛₗ[frobenius R p] S 
goal: S →ₛₗ[frobenius R p] S

full_name: LinearMap.iterateFrobenius
code: /-- The iterated frobenius map of an algebra as a iterated-frobenius-semilinear map. -/
nonrec def LinearMap.iterateFrobenius [Algebra R S] : S →ₛₗ[iterateFrobenius R p n] S 
goal: S →ₛₗ[iterateFrobenius R p n] S

full_name: LinearMap.frobenius_def
code: theorem LinearMap.frobenius_def [Algebra R S] (x : S) : frobenius R S p x = x ^ p 
goal: (LinearMap.frobenius R S p) x = x ^ p

full_name: LinearMap.iterateFrobenius_def
code: theorem LinearMap.iterateFrobenius_def [Algebra R S] (n : ℕ) (x : S) :
    iterateFrobenius R S p n x = x ^ p ^ n 
goal: (LinearMap.iterateFrobenius R S p n) x = x ^ p ^ n

full_name: frobenius_zero
code: theorem frobenius_zero : frobenius R p 0 = 0 
goal: (frobenius R p) 0 = 0

full_name: frobenius_add
code: theorem frobenius_add : frobenius R p (x + y) = frobenius R p x + frobenius R p y 
goal: (frobenius R p) (x + y) = (frobenius R p) x + (frobenius R p) y

full_name: frobenius_natCast
code: theorem frobenius_natCast (n : ℕ) : frobenius R p n = n 
goal: (frobenius R p) ↑n = ↑n

full_name: list_sum_pow_char
code: theorem list_sum_pow_char (l : List R) : l.sum ^ p = (l.map (· ^ p : R → R)).sum 
goal: l.sum ^ p = (List.map (fun x => x ^ p) l).sum

full_name: multiset_sum_pow_char
code: theorem multiset_sum_pow_char (s : Multiset R) : s.sum ^ p = (s.map (· ^ p : R → R)).sum 
goal: s.sum ^ p = (Multiset.map (fun x => x ^ p) s).sum

full_name: sum_pow_char
code: theorem sum_pow_char {ι : Type*} (s : Finset ι) (f : ι → R) :
    (∑ i ∈ s, f i) ^ p = ∑ i ∈ s, f i ^ p 
goal: (∑ i ∈ s, f i) ^ p = ∑ i ∈ s, f i ^ p

full_name: list_sum_pow_char_pow
code: theorem list_sum_pow_char_pow (l : List R) : l.sum ^ p ^ n = (l.map (· ^ p ^ n : R → R)).sum 
goal: l.sum ^ p ^ n = (List.map (fun x => x ^ p ^ n) l).sum

full_name: multiset_sum_pow_char_pow
code: theorem multiset_sum_pow_char_pow (s : Multiset R) :
    s.sum ^ p ^ n = (s.map (· ^ p ^ n : R → R)).sum 
goal: s.sum ^ p ^ n = (Multiset.map (fun x => x ^ p ^ n) s).sum

full_name: sum_pow_char_pow
code: theorem sum_pow_char_pow {ι : Type*} (s : Finset ι) (f : ι → R) :
    (∑ i ∈ s, f i) ^ p ^ n = ∑ i ∈ s, f i ^ p ^ n 
goal: (∑ i ∈ s, f i) ^ p ^ n = ∑ i ∈ s, f i ^ p ^ n

full_name: frobenius_neg
code: theorem frobenius_neg : frobenius R p (-x) = -frobenius R p x 
goal: (frobenius R p) (-x) = -(frobenius R p) x

full_name: frobenius_sub
code: theorem frobenius_sub : frobenius R p (x - y) = frobenius R p x - frobenius R p y 
goal: (frobenius R p) (x - y) = (frobenius R p) x - (frobenius R p) y