File: Mathlib/FieldTheory/PerfectClosure.lean

full_name: PerfectClosure.r_iff
code: /-- `PerfectClosure.R` is the relation `(n, x) ∼ (n + 1, x ^ p)` for `n : ℕ` and `x : K`.
`PerfectClosure K p` is the quotient by this relation. -/
@[mk_iff]
inductive PerfectClosure.R : ℕ × K → ℕ × K → Prop
  | intro : ∀ n x, PerfectClosure.R (n, x) (n + 1, frobenius K p x)
goal: ∀ (a a_1 : ℕ × K), PerfectClosure.R K p a a_1 ↔ ∃ n x, a = (n, x) ∧ a_1 = (n + 1, (frobenius K p) x)

full_name: PerfectClosure.R
code: /-- `PerfectClosure.R` is the relation `(n, x) ∼ (n + 1, x ^ p)` for `n : ℕ` and `x : K`.
`PerfectClosure K p` is the quotient by this relation. -/
@[mk_iff]
inductive PerfectClosure.R : ℕ × K → ℕ × K → Prop
  | intro : ∀ n x, PerfectClosure.R (n, x) (n + 1, frobenius K p x)
goal: ℕ × K → ℕ × K → Prop

full_name: PerfectClosure.R.intro
code: /-- `PerfectClosure.R` is the relation `(n, x) ∼ (n + 1, x ^ p)` for `n : ℕ` and `x : K`.
`PerfectClosure K p` is the quotient by this relation. -/
@[mk_iff]
inductive PerfectClosure.R : ℕ × K → ℕ × K → Prop
  | intro : ∀ n x, PerfectClosure.R (n, x) (n + 1, frobenius K p x)
goal: PerfectClosure.R K p (n, x) (n + 1, (frobenius K p) x)

full_name: PerfectClosure
code: /-- The perfect closure is the smallest extension that makes frobenius surjective. -/
def PerfectClosure : Type u 
goal: Type u

full_name: PerfectClosure.mk
code: /-- `PerfectClosure.mk K p (n, x)` for `n : ℕ` and `x : K` is an element of `PerfectClosure K p`,
viewed as `x ^ (p ^ -n)`. Every element of `PerfectClosure K p` is of this form
(`PerfectClosure.mk_surjective`). -/
def mk (x : ℕ × K) : PerfectClosure K p 
goal: PerfectClosure K p

full_name: PerfectClosure.mk_surjective
code: theorem mk_surjective : Function.Surjective (mk K p) 
goal: Function.Surjective (PerfectClosure.mk K p)

full_name: PerfectClosure.mk_succ_pow
code: @[simp] theorem mk_succ_pow (m : ℕ) (x : K) : mk K p ⟨m + 1, x ^ p⟩ = mk K p ⟨m, x⟩ 
goal: PerfectClosure.mk K p (m + 1, x ^ p) = PerfectClosure.mk K p (m, x)

full_name: PerfectClosure.quot_mk_eq_mk
code: @[simp]
theorem quot_mk_eq_mk (x : ℕ × K) : (Quot.mk (R K p) x : PerfectClosure K p) = mk K p x 
goal: Quot.mk (PerfectClosure.R K p) x = PerfectClosure.mk K p x

full_name: PerfectClosure.liftOn
code: /-- Lift a function `ℕ × K → L` to a function on `PerfectClosure K p`. -/
-- Porting note: removed `@[elab_as_elim]` for "unexpected eliminator resulting type L"
def liftOn {L : Type*} (x : PerfectClosure K p) (f : ℕ × K → L)
    (hf : ∀ x y, R K p x y → f x = f y) : L 
goal: L

full_name: PerfectClosure.liftOn_mk
code: @[simp]
theorem liftOn_mk {L : Sort _} (f : ℕ × K → L) (hf : ∀ x y, R K p x y → f x = f y) (x : ℕ × K) :
    (mk K p x).liftOn f hf = f x 
goal: (PerfectClosure.mk K p x).liftOn f hf = f x

full_name: PerfectClosure.induction_on
code: @[elab_as_elim]
theorem induction_on (x : PerfectClosure K p) {q : PerfectClosure K p → Prop}
    (h : ∀ x, q (mk K p x)) : q x 
goal: q x

full_name: _private.Mathlib.FieldTheory.PerfectClosure.0.PerfectClosure.mul_aux_left
code: private theorem mul_aux_left (x1 x2 y : ℕ × K) (H : R K p x1 x2) :
    mk K p (x1.1 + y.1, (frobenius K p)^[y.1] x1.2 * (frobenius K p)^[x1.1] y.2) =
      mk K p (x2.1 + y.1, (frobenius K p)^[y.1] x2.2 * (frobenius K p)^[x2.1] y.2) 
goal: PerfectClosure.mk K p (x1.1 + y.1, (⇑(frobenius K p))^[y.1] x1.2 * (⇑(frobenius K p))^[x1.1] y.2) =
  PerfectClosure.mk K p (x2.1 + y.1, (⇑(frobenius K p))^[y.1] x2.2 * (⇑(frobenius K p))^[x2.1] y.2)

full_name: _private.Mathlib.FieldTheory.PerfectClosure.0.PerfectClosure.mul_aux_right
code: private theorem mul_aux_right (x y1 y2 : ℕ × K) (H : R K p y1 y2) :
    mk K p (x.1 + y1.1, (frobenius K p)^[y1.1] x.2 * (frobenius K p)^[x.1] y1.2) =
      mk K p (x.1 + y2.1, (frobenius K p)^[y2.1] x.2 * (frobenius K p)^[x.1] y2.2) 
goal: PerfectClosure.mk K p (x.1 + y1.1, (⇑(frobenius K p))^[y1.1] x.2 * (⇑(frobenius K p))^[x.1] y1.2) =
  PerfectClosure.mk K p (x.1 + y2.1, (⇑(frobenius K p))^[y2.1] x.2 * (⇑(frobenius K p))^[x.1] y2.2)

full_name: PerfectClosure.instMul
code: instance instMul : Mul (PerfectClosure K p) 
goal: Mul (PerfectClosure K p)

full_name: PerfectClosure.mk_mul_mk
code: @[simp]
theorem mk_mul_mk (x y : ℕ × K) :
    mk K p x * mk K p y =
      mk K p (x.1 + y.1, (frobenius K p)^[y.1] x.2 * (frobenius K p)^[x.1] y.2) 
goal: PerfectClosure.mk K p x * PerfectClosure.mk K p y =
  PerfectClosure.mk K p (x.1 + y.1, (⇑(frobenius K p))^[y.1] x.2 * (⇑(frobenius K p))^[x.1] y.2)

full_name: PerfectClosure.instCommMonoid
code: instance instCommMonoid : CommMonoid (PerfectClosure K p) 
goal: CommMonoid (PerfectClosure K p)

full_name: PerfectClosure.one_def
code: theorem one_def : (1 : PerfectClosure K p) = mk K p (0, 1) 
goal: 1 = PerfectClosure.mk K p (0, 1)

full_name: PerfectClosure.instInhabited
code: instance instInhabited : Inhabited (PerfectClosure K p) 
goal: Inhabited (PerfectClosure K p)

full_name: _private.Mathlib.FieldTheory.PerfectClosure.0.PerfectClosure.add_aux_left
code: private theorem add_aux_left (x1 x2 y : ℕ × K) (H : R K p x1 x2) :
    mk K p (x1.1 + y.1, (frobenius K p)^[y.1] x1.2 + (frobenius K p)^[x1.1] y.2) =
      mk K p (x2.1 + y.1, (frobenius K p)^[y.1] x2.2 + (frobenius K p)^[x2.1] y.2) 
goal: PerfectClosure.mk K p (x1.1 + y.1, (⇑(frobenius K p))^[y.1] x1.2 + (⇑(frobenius K p))^[x1.1] y.2) =
  PerfectClosure.mk K p (x2.1 + y.1, (⇑(frobenius K p))^[y.1] x2.2 + (⇑(frobenius K p))^[x2.1] y.2)

full_name: _private.Mathlib.FieldTheory.PerfectClosure.0.PerfectClosure.add_aux_right
code: private theorem add_aux_right (x y1 y2 : ℕ × K) (H : R K p y1 y2) :
    mk K p (x.1 + y1.1, (frobenius K p)^[y1.1] x.2 + (frobenius K p)^[x.1] y1.2) =
      mk K p (x.1 + y2.1, (frobenius K p)^[y2.1] x.2 + (frobenius K p)^[x.1] y2.2) 
goal: PerfectClosure.mk K p (x.1 + y1.1, (⇑(frobenius K p))^[y1.1] x.2 + (⇑(frobenius K p))^[x.1] y1.2) =
  PerfectClosure.mk K p (x.1 + y2.1, (⇑(frobenius K p))^[y2.1] x.2 + (⇑(frobenius K p))^[x.1] y2.2)

full_name: PerfectClosure.instAdd
code: instance instAdd : Add (PerfectClosure K p) 
goal: Add (PerfectClosure K p)

full_name: PerfectClosure.mk_add_mk
code: @[simp]
theorem mk_add_mk (x y : ℕ × K) :
    mk K p x + mk K p y =
      mk K p (x.1 + y.1, (frobenius K p)^[y.1] x.2 + (frobenius K p)^[x.1] y.2) 
goal: PerfectClosure.mk K p x + PerfectClosure.mk K p y =
  PerfectClosure.mk K p (x.1 + y.1, (⇑(frobenius K p))^[y.1] x.2 + (⇑(frobenius K p))^[x.1] y.2)

full_name: PerfectClosure.instNeg
code: instance instNeg : Neg (PerfectClosure K p) 
goal: Neg (PerfectClosure K p)

full_name: PerfectClosure.neg_mk
code: @[simp]
theorem neg_mk (x : ℕ × K) : -mk K p x = mk K p (x.1, -x.2) 
goal: -PerfectClosure.mk K p x = PerfectClosure.mk K p (x.1, -x.2)

full_name: PerfectClosure.instZero
code: instance instZero : Zero (PerfectClosure K p) 
goal: Zero (PerfectClosure K p)

full_name: PerfectClosure.zero_def
code: theorem zero_def : (0 : PerfectClosure K p) = mk K p (0, 0) 
goal: 0 = PerfectClosure.mk K p (0, 0)

full_name: PerfectClosure.mk_zero_zero
code: @[simp]
theorem mk_zero_zero : mk K p (0, 0) = 0 
goal: PerfectClosure.mk K p (0, 0) = 0

full_name: PerfectClosure.mk_zero
code: theorem mk_zero (n : ℕ) : mk K p (n, 0) = 0 
goal: PerfectClosure.mk K p (n, 0) = 0

full_name: PerfectClosure.R.sound
code: theorem R.sound (m n : ℕ) (x y : K) (H : (frobenius K p)^[m] x = y) :
    mk K p (n, x) = mk K p (m + n, y) 
goal: PerfectClosure.mk K p (n, x) = PerfectClosure.mk K p (m + n, y)

full_name: PerfectClosure.instAddCommGroup
code: instance instAddCommGroup : AddCommGroup (PerfectClosure K p) 
goal: AddCommGroup (PerfectClosure K p)

full_name: PerfectClosure.instCommRing
code: instance instCommRing : CommRing (PerfectClosure K p) 
goal: CommRing (PerfectClosure K p)

full_name: PerfectClosure.mk_eq_iff
code: theorem mk_eq_iff (x y : ℕ × K) :
    mk K p x = mk K p y ↔ ∃ z, (frobenius K p)^[y.1 + z] x.2 = (frobenius K p)^[x.1 + z] y.2 
goal: PerfectClosure.mk K p x = PerfectClosure.mk K p y ↔
  ∃ z, (⇑(frobenius K p))^[y.1 + z] x.2 = (⇑(frobenius K p))^[x.1 + z] y.2

full_name: PerfectClosure.mk_pow
code: @[simp]
theorem mk_pow (x : ℕ × K) (n : ℕ) : mk K p x ^ n = mk K p (x.1, x.2 ^ n) 
goal: PerfectClosure.mk K p x ^ n = PerfectClosure.mk K p (x.1, x.2 ^ n)

full_name: PerfectClosure.natCast
code: theorem natCast (n x : ℕ) : (x : PerfectClosure K p) = mk K p (n, x) 
goal: ↑x = PerfectClosure.mk K p (n, ↑x)

full_name: PerfectClosure.intCast
code: theorem intCast (x : ℤ) : (x : PerfectClosure K p) = mk K p (0, x) 
goal: ↑x = PerfectClosure.mk K p (0, ↑x)

full_name: PerfectClosure.natCast_eq_iff
code: theorem natCast_eq_iff (x y : ℕ) : (x : PerfectClosure K p) = y ↔ (x : K) = y 
goal: ↑x = ↑y ↔ ↑x = ↑y

full_name: PerfectClosure.instCharP
code: instance instCharP : CharP (PerfectClosure K p) p 
goal: CharP (PerfectClosure K p) p

full_name: PerfectClosure.frobenius_mk
code: theorem frobenius_mk (x : ℕ × K) :
    (frobenius (PerfectClosure K p) p : PerfectClosure K p → PerfectClosure K p) (mk K p x) =
      mk _ _ (x.1, x.2 ^ p) 
goal: (frobenius (PerfectClosure K p) p) (PerfectClosure.mk K p x) = PerfectClosure.mk K p (x.1, x.2 ^ p)

full_name: PerfectClosure.of
code: /-- Embedding of `K` into `PerfectClosure K p` -/
def of : K →+* PerfectClosure K p 
goal: K →+* PerfectClosure K p

full_name: PerfectClosure.of_apply
code: theorem of_apply (x : K) : of K p x = mk _ _ (0, x) 
goal: (PerfectClosure.of K p) x = PerfectClosure.mk K p (0, x)

full_name: PerfectClosure.instReduced
code: instance instReduced : IsReduced (PerfectClosure K p) 
goal: IsReduced (PerfectClosure K p)

full_name: PerfectClosure.instPerfectRing
code: instance instPerfectRing : PerfectRing (PerfectClosure K p) p 
goal: PerfectRing (PerfectClosure K p) p

full_name: PerfectClosure.iterate_frobenius_mk
code: @[simp]
theorem iterate_frobenius_mk (n : ℕ) (x : K) :
    (frobenius (PerfectClosure K p) p)^[n] (mk K p ⟨n, x⟩) = of K p x 
goal: (⇑(frobenius (PerfectClosure K p) p))^[n] (PerfectClosure.mk K p (n, x)) = (PerfectClosure.of K p) x

full_name: PerfectClosure.lift
code: /-- Given a ring `K` of characteristic `p` and a perfect ring `L` of the same characteristic,
any homomorphism `K →+* L` can be lifted to `PerfectClosure K p`. -/
noncomputable def lift (L : Type v) [CommSemiring L] [CharP L p] [PerfectRing L p] :
    (K →+* L) ≃ (PerfectClosure K p →+* L) 
goal: (K →+* L) ≃ (PerfectClosure K p →+* L)

full_name: PerfectClosure.eq_iff
code: theorem eq_iff [CommRing K] [IsReduced K] (p : ℕ) [Fact p.Prime] [CharP K p] (x y : ℕ × K) :
    mk K p x = mk K p y ↔ (frobenius K p)^[y.1] x.2 = (frobenius K p)^[x.1] y.2 
goal: PerfectClosure.mk K p x = PerfectClosure.mk K p y ↔ (⇑(frobenius K p))^[y.1] x.2 = (⇑(frobenius K p))^[x.1] y.2

full_name: PerfectClosure.instInv
code: instance instInv : Inv (PerfectClosure K p) 
goal: Inv (PerfectClosure K p)

full_name: PerfectClosure.mk_inv
code: @[simp]
theorem mk_inv (x : ℕ × K) : (mk K p x)⁻¹ = mk K p (x.1, x.2⁻¹) 
goal: (PerfectClosure.mk K p x)⁻¹ = PerfectClosure.mk K p (x.1, x.2⁻¹)

full_name: PerfectClosure.instDivisionRing
code: instance instDivisionRing : DivisionRing (PerfectClosure K p) 
goal: DivisionRing (PerfectClosure K p)

full_name: PerfectClosure.instField
code: instance instField : Field (PerfectClosure K p) 
goal: Field (PerfectClosure K p)

full_name: PerfectClosure.instPerfectField
code: instance instPerfectField : PerfectField (PerfectClosure K p) 
goal: PerfectField (PerfectClosure K p)