File: Mathlib/NumberTheory/Padics/Hensel.lean

full_name: padic_polynomial_dist
code: theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
    ‖F.eval x - F.eval y‖ ≤ ‖x - y‖ 
goal: ‖Polynomial.eval x F - Polynomial.eval y F‖ ≤ ‖x - y‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.comp_tendsto_lim
code: private theorem comp_tendsto_lim {p : ℕ} [Fact p.Prime] {F : Polynomial ℤ_[p]}
    (ncs : CauSeq ℤ_[p] norm) : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 (F.eval ncs.lim)) 
goal: Filter.Tendsto (fun i => Polynomial.eval (↑ncs i) F) Filter.atTop (𝓝 (Polynomial.eval ncs.lim F))

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.ncs_tendsto_const
code: private theorem ncs_tendsto_const :
    Tendsto (fun i => ‖F.derivative.eval (ncs i)‖) atTop (𝓝 ‖F.derivative.eval a‖) 
goal: Filter.Tendsto (fun i => ‖Polynomial.eval (↑ncs i) (Polynomial.derivative F)‖) Filter.atTop
  (𝓝 ‖Polynomial.eval a (Polynomial.derivative F)‖)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.ncs_tendsto_lim
code: private theorem ncs_tendsto_lim :
    Tendsto (fun i => ‖F.derivative.eval (ncs i)‖) atTop (𝓝 ‖F.derivative.eval ncs.lim‖) 
goal: Filter.Tendsto (fun i => ‖Polynomial.eval (↑ncs i) (Polynomial.derivative F)‖) Filter.atTop
  (𝓝 ‖Polynomial.eval ncs.lim (Polynomial.derivative F)‖)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.norm_deriv_eq
code: private theorem norm_deriv_eq : ‖F.derivative.eval ncs.lim‖ = ‖F.derivative.eval a‖ 
goal: ‖Polynomial.eval ncs.lim (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.tendsto_zero_of_norm_tendsto_zero
code: private theorem tendsto_zero_of_norm_tendsto_zero : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 0) 
goal: Filter.Tendsto (fun i => Polynomial.eval (↑ncs i) F) Filter.atTop (𝓝 0)

full_name: limit_zero_of_norm_tendsto_zero
code: theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.lim = 0 
goal: Polynomial.eval ncs.lim F = 0

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_gen
code: /-- `T` is an auxiliary value that is used to control the behavior of the polynomial `F`. -/
private def T_gen : ℝ 
goal: ℝ

full_name: _aux_Mathlib_NumberTheory_Padics_Hensel___macroRules_termT_1
code: local notation "T" => @T_gen p _ F a
goal: Lean.Macro

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.deriv_sq_norm_pos
code: private theorem deriv_sq_norm_pos : 0 < ‖F.derivative.eval a‖ ^ 2 
goal: 0 < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.deriv_sq_norm_ne_zero
code: private theorem deriv_sq_norm_ne_zero : ‖F.derivative.eval a‖ ^ 2 ≠ 0 
goal: ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2 ≠ 0

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.deriv_norm_ne_zero
code: private theorem deriv_norm_ne_zero : ‖F.derivative.eval a‖ ≠ 0 
goal: ‖Polynomial.eval a (Polynomial.derivative F)‖ ≠ 0

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.deriv_norm_pos
code: private theorem deriv_norm_pos : 0 < ‖F.derivative.eval a‖ 
goal: 0 < ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.deriv_ne_zero
code: private theorem deriv_ne_zero : F.derivative.eval a ≠ 0 
goal: Polynomial.eval a (Polynomial.derivative F) ≠ 0

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_def
code: private theorem T_def : T = ‖F.eval a‖ / ‖F.derivative.eval a‖ ^ 2 
goal: T_gen p F a = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_lt_one
code: private theorem T_lt_one : T < 1 
goal: T_gen p F a < 1

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_nonneg
code: private theorem T_nonneg : 0 ≤ T 
goal: 0 ≤ T_gen p F a

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_pow_nonneg
code: private theorem T_pow_nonneg (n : ℕ) : 0 ≤ T ^ n 
goal: 0 ≤ T_gen p F a ^ n

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_pow
code: private theorem T_pow {n : ℕ} (hn : n ≠ 0) : T ^ n < 1 
goal: T_gen p F a ^ n < 1

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_pow'
code: private theorem T_pow' (n : ℕ) : T ^ 2 ^ n < 1 
goal: T_gen p F a ^ 2 ^ n < 1

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.ih_gen
code: /-- We will construct a sequence of elements of ℤ_p satisfying successive values of `ih`. -/
private def ih_gen (n : ℕ) (z : ℤ_[p]) : Prop 
goal: Prop

full_name: _aux_Mathlib_NumberTheory_Padics_Hensel___macroRules_termIh_1
code: local notation "ih" => @ih_gen p _ F a
goal: Lean.Macro

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.ih_0
code: private theorem ih_0 : ih 0 a 
goal: ih_gen 0 a

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.calc_norm_le_one
code: private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
    ‖(↑(F.eval z) : ℚ_[p]) / ↑(F.derivative.eval z)‖ ≤ 1 
goal: ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (Polynomial.derivative F))‖ ≤ 1

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.calc_deriv_dist
code: private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
    (hz1 : ‖z1‖ = ‖F.eval z‖ / ‖F.derivative.eval a‖) {n} (hz : ih n z) :
    ‖F.derivative.eval z' - F.derivative.eval z‖ < ‖F.derivative.eval a‖ 
goal: ‖Polynomial.eval z' (Polynomial.derivative F) - Polynomial.eval z (Polynomial.derivative F)‖ <
  ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.calc_eval_z'
code: private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n z)
    (h1 : ‖(↑(F.eval z) : ℚ_[p]) / ↑(F.derivative.eval z)‖ ≤ 1) (hzeq : z1 = ⟨_, h1⟩) :
    { q : ℤ_[p] // F.eval z' = q * z1 ^ 2 } 
goal: { q // Polynomial.eval z' F = q * z1 ^ 2 }

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.calc_eval_z'_norm
code: private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F.eval z' = q * z1 ^ 2)
    (h1 : ‖(↑(F.eval z) : ℚ_[p]) / ↑(F.derivative.eval z)‖ ≤ 1) (hzeq : z1 = ⟨_, h1⟩) :
    ‖F.eval z'‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) 
goal: ‖Polynomial.eval z' F‖ ≤ ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ (n + 1)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.ih_n
code: /-- Given `z : ℤ_[p]` satisfying `ih n z`, construct `z' : ℤ_[p]` satisfying `ih (n+1) z'`. We need
the hypothesis `ih n z`, since otherwise `z'` is not necessarily an integer. -/
private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n + 1) z' } 
goal: { z' // ih_gen (n + 1) z' }

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_aux
code: private def newton_seq_aux : ∀ n : ℕ, { z : ℤ_[p] // ih n z }
  
goal: { z // ih_gen n z }

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_gen
code: private def newton_seq_gen (n : ℕ) : ℤ_[p] 
goal: ℤ_[p]

full_name: _aux_Mathlib_NumberTheory_Padics_Hensel___macroRules_termNewton_seq_1
code: local notation "newton_seq" => newton_seq_gen hnorm
goal: Lean.Macro

full_name: _aux_Mathlib_NumberTheory_Padics_Hensel___unexpand__private_Mathlib_NumberTheory_Padics_Hensel_0_newton_seq_gen_1
code: local notation "newton_seq" => newton_seq_gen hnorm
goal: Lean.PrettyPrinter.Unexpander

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_deriv_norm
code: private theorem newton_seq_deriv_norm (n : ℕ) :
    ‖F.derivative.eval (newton_seq n)‖ = ‖F.derivative.eval a‖ 
goal: ‖Polynomial.eval (newton_seq_gen hnorm n) (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_norm_le
code: private theorem newton_seq_norm_le (n : ℕ) :
    ‖F.eval (newton_seq n)‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n 
goal: ‖Polynomial.eval (newton_seq_gen hnorm n) F‖ ≤ ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_norm_eq
code: private theorem newton_seq_norm_eq (n : ℕ) :
    ‖newton_seq (n + 1) - newton_seq n‖ =
    ‖F.eval (newton_seq n)‖ / ‖F.derivative.eval (newton_seq n)‖ 
goal: ‖newton_seq_gen hnorm (n + 1) - newton_seq_gen hnorm n‖ =
  ‖Polynomial.eval (newton_seq_gen hnorm n) F‖ / ‖Polynomial.eval (newton_seq_gen hnorm n) (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_succ_dist
code: private theorem newton_seq_succ_dist (n : ℕ) :
    ‖newton_seq (n + 1) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n 
goal: ‖newton_seq_gen hnorm (n + 1) - newton_seq_gen hnorm n‖ ≤
  ‖Polynomial.eval a (Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.T_pos
code: private theorem T_pos : T > 0 
goal: T_gen p F a > 0

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_succ_dist_weak
code: private theorem newton_seq_succ_dist_weak (n : ℕ) :
    ‖newton_seq (n + 2) - newton_seq (n + 1)‖ < ‖F.eval a‖ / ‖F.derivative.eval a‖ 
goal: ‖newton_seq_gen hnorm (n + 2) - newton_seq_gen hnorm (n + 1)‖ <
  ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_dist_aux
code: private theorem newton_seq_dist_aux (n : ℕ) :
    ∀ k : ℕ, ‖newton_seq (n + k) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
  
goal: ‖newton_seq_gen hnorm (n + k) - newton_seq_gen hnorm n‖ ≤
  ‖Polynomial.eval a (Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_dist
code: private theorem newton_seq_dist {n k : ℕ} (hnk : n ≤ k) :
    ‖newton_seq k - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n 
goal: ‖newton_seq_gen hnorm k - newton_seq_gen hnorm n‖ ≤ ‖Polynomial.eval a (Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_dist_to_a
code: private theorem newton_seq_dist_to_a :
    ∀ n : ℕ, 0 < n → ‖newton_seq n - a‖ = ‖F.eval a‖ / ‖F.derivative.eval a‖
  
goal: 0 < n → ‖newton_seq_gen hnorm n - a‖ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.bound'
code: private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0) 
goal: Filter.Tendsto (fun n => ‖Polynomial.eval a (Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) Filter.atTop (𝓝 0)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.bound
code: private theorem bound :
    ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε 
goal: ε > 0 → ∃ N, ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.bound'_sq
code: private theorem bound'_sq :
    Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) atTop (𝓝 0) 
goal: Filter.Tendsto (fun n => ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n) Filter.atTop (𝓝 0)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_is_cauchy
code: private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq 
goal: IsCauSeq norm (newton_seq_gen hnorm)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_cau_seq
code: private def newton_cau_seq : CauSeq ℤ_[p] norm 
goal: CauSeq ℤ_[p] norm

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.soln_gen
code: private def soln_gen : ℤ_[p] 
goal: ℤ_[p]

full_name: _aux_Mathlib_NumberTheory_Padics_Hensel___macroRules_termSoln_1
code: local notation "soln" => soln_gen hnorm
goal: Lean.Macro

full_name: _aux_Mathlib_NumberTheory_Padics_Hensel___unexpand__private_Mathlib_NumberTheory_Padics_Hensel_0_soln_gen_1
code: local notation "soln" => soln_gen hnorm
goal: Lean.PrettyPrinter.Unexpander

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.soln_spec
code: private theorem soln_spec {ε : ℝ} (hε : ε > 0) :
    ∃ N : ℕ, ∀ {i : ℕ}, i ≥ N → ‖soln - newton_cau_seq hnorm i‖ < ε 
goal: ∃ N, ∀ {i : ℕ}, i ≥ N → ‖soln_gen hnorm - ↑(newton_cau_seq hnorm) i‖ < ε

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.soln_deriv_norm
code: private theorem soln_deriv_norm : ‖F.derivative.eval soln‖ = ‖F.derivative.eval a‖ 
goal: ‖Polynomial.eval (soln_gen hnorm) (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_norm_tendsto_zero
code: private theorem newton_seq_norm_tendsto_zero :
    Tendsto (fun i => ‖F.eval (newton_cau_seq hnorm i)‖) atTop (𝓝 0) 
goal: Filter.Tendsto (fun i => ‖Polynomial.eval (↑(newton_cau_seq hnorm) i) F‖) Filter.atTop (𝓝 0)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_dist_tendsto
code: private theorem newton_seq_dist_tendsto :
    Tendsto (fun n => ‖newton_cau_seq hnorm n - a‖)
    atTop (𝓝 (‖F.eval a‖ / ‖F.derivative.eval a‖)) 
goal: Filter.Tendsto (fun n => ‖↑(newton_cau_seq hnorm) n - a‖) Filter.atTop
  (𝓝 (‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖))

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.newton_seq_dist_tendsto'
code: private theorem newton_seq_dist_tendsto' :
    Tendsto (fun n => ‖newton_cau_seq hnorm n - a‖) atTop (𝓝 ‖soln - a‖) 
goal: Filter.Tendsto (fun n => ‖↑(newton_cau_seq hnorm) n - a‖) Filter.atTop (𝓝 ‖soln_gen hnorm - a‖)

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.soln_dist_to_a
code: private theorem soln_dist_to_a : ‖soln - a‖ = ‖F.eval a‖ / ‖F.derivative.eval a‖ 
goal: ‖soln_gen hnorm - a‖ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.soln_dist_to_a_lt_deriv
code: private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval a‖ 
goal: ‖soln_gen hnorm - a‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.eval_soln
code: private theorem eval_soln : F.eval soln = 0 
goal: Polynomial.eval (soln_gen hnorm) F = 0

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.soln_unique
code: private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
    (hnlt : ‖z - a‖ < ‖F.derivative.eval a‖) : z = soln 
goal: z = soln_gen hnorm

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.a_soln_is_unique
code: private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eval z' = 0)
    (hnormz' : ‖z' - a‖ < ‖F.derivative.eval a‖) : z' = a 
goal: z' = a

full_name: _private.Mathlib.NumberTheory.Padics.Hensel.0.a_is_soln
code: private theorem a_is_soln (ha : F.eval a = 0) :
    F.eval a = 0 ∧
      ‖a - a‖ < ‖F.derivative.eval a‖ ∧
        ‖F.derivative.eval a‖ = ‖F.derivative.eval a‖ ∧
          ∀ z', F.eval z' = 0 → ‖z' - a‖ < ‖F.derivative.eval a‖ → z' = a 
goal: Polynomial.eval a F = 0 ∧
  ‖a - a‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ∧
    ‖Polynomial.eval a (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖ ∧
      ∀ (z' : ℤ_[p]), Polynomial.eval z' F = 0 → ‖z' - a‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ → z' = a

full_name: hensels_lemma
code: theorem hensels_lemma :
    ∃ z : ℤ_[p],
      F.eval z = 0 ∧
        ‖z - a‖ < ‖F.derivative.eval a‖ ∧
          ‖F.derivative.eval z‖ = ‖F.derivative.eval a‖ ∧
            ∀ z', F.eval z' = 0 → ‖z' - a‖ < ‖F.derivative.eval a‖ → z' = z 
goal: ∃ z,
  Polynomial.eval z F = 0 ∧
    ‖z - a‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ∧
      ‖Polynomial.eval z (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖ ∧
        ∀ (z' : ℤ_[p]), Polynomial.eval z' F = 0 → ‖z' - a‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ → z' = z