number_theory.padics.henselMathlib.NumberTheory.Padics.Hensel

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Robert Y. Lewis
 -/
 import Analysis.SpecificLimits.Basic
-import Data.Polynomial.Identities
+import Algebra.Polynomial.Identities
 import NumberTheory.Padics.PadicIntegers
 import Topology.Algebra.Polynomial
 import Topology.MetricSpace.CauSeqFilter
Diff
@@ -144,7 +144,7 @@ private def ih (n : ℕ) (z : ℤ_[p]) : Prop :=
   ‖F.derivative.eval z‖ = ‖F.derivative.eval a‖ ∧ ‖F.eval z‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n
 
 private theorem ih_0 : ih 0 a :=
-  ⟨rfl, by simp [T_def, mul_div_cancel' _ (ne_of_gt (deriv_sq_norm_pos hnorm))]⟩
+  ⟨rfl, by simp [T_def, mul_div_cancel₀ _ (ne_of_gt (deriv_sq_norm_pos hnorm))]⟩
 
 private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
     ‖(↑(F.eval z) : ℚ_[p]) / ↑(F.derivative.eval z)‖ ≤ 1 :=
@@ -188,7 +188,7 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
       _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := (mul_neg _ _)
       _ = -⟨↑(F.derivative.eval z) * (↑(F.eval z) / ↑(F.derivative.eval z)), this⟩ :=
         (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])
-      _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]
+      _ = -F.eval z := by simp only [mul_div_cancel₀ _ hdzne', Subtype.coe_eta]
   exact ⟨q, by simpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq⟩
 
 private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F.eval z' = q * z1 ^ 2)
@@ -204,9 +204,9 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
     _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
       simp only [mul_pow]
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
-    _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ' 2]
+    _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ 2]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option eqn_compiler.zeta -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:340:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta true
 
 /-- Given `z : ℤ_[p]` satisfying `ih n z`, construct `z' : ℤ_[p]` satisfying `ih (n+1) z'`. We need
@@ -228,7 +228,7 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
       calc_eval_z'_norm hz HEq h1 rfl
     ⟨hfeq, hnle⟩⟩
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option eqn_compiler.zeta -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:340:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta false
 
 -- why doesn't "noncomputable theory" stick here?
Diff
@@ -220,9 +220,9 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
       calc_deriv_dist rfl (by simp [z1, hz.1]) hz
     have hfeq : ‖F.derivative.eval z'‖ = ‖F.derivative.eval a‖ :=
       by
-      rw [sub_eq_add_neg, ← hz.1, ← norm_neg (F.derivative.eval z)] at hdist 
+      rw [sub_eq_add_neg, ← hz.1, ← norm_neg (F.derivative.eval z)] at hdist
       have := PadicInt.norm_eq_of_norm_add_lt_right hdist
-      rwa [norm_neg, hz.1] at this 
+      rwa [norm_neg, hz.1] at this
     let ⟨q, HEq⟩ := calc_eval_z' rfl hz h1 rfl
     have hnle : ‖F.eval z'‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) :=
       calc_eval_z'_norm hz HEq h1 rfl
@@ -344,7 +344,7 @@ private theorem bound :
     ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε :=
   by
   have := bound' hnorm hnsol
-  simp [tendsto, nhds] at this 
+  simp [tendsto, nhds] at this
   intro ε hε
   cases' this (ball 0 ε) (mem_ball_self hε) is_open_ball with N hN
   exists N; intro n hn
@@ -400,7 +400,7 @@ private theorem soln_dist_to_a : ‖soln - a‖ = ‖F.eval a‖ / ‖F.derivati
 private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval a‖ :=
   by
   rw [soln_dist_to_a, div_lt_iff]
-  · rwa [sq] at hnorm 
+  · rwa [sq] at hnorm
   · apply deriv_norm_pos; assumption
 
 private theorem eval_soln : F.eval soln = 0 :=
Diff
@@ -337,7 +337,7 @@ private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^
   rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖]
   exact
     tendsto_const_nhds.mul
-      (tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))
+      (tendsto.comp (tendsto_pow_atTop_nhds_zero_of_lt_one (norm_nonneg _) (T_lt_one hnorm))
         (Nat.tendsto_pow_atTop_atTop_of_one_lt (by norm_num)))
 
 private theorem bound :
Diff
@@ -200,7 +200,7 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
       (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (pow_nonneg (norm_nonneg _) _))
     _ = ‖F.eval z‖ ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by simp [hzeq, hz.1, div_pow]
     _ ≤ (‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 :=
-      ((div_le_div_right deriv_sq_norm_pos).2 (pow_le_pow_of_le_left (norm_nonneg _) hz.2 _))
+      ((div_le_div_right deriv_sq_norm_pos).2 (pow_le_pow_left (norm_nonneg _) hz.2 _))
     _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
       simp only [mul_pow]
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
@@ -271,7 +271,7 @@ private theorem newton_seq_succ_dist_weak (n : ℕ) :
     ‖newton_seq (n + 2) - newton_seq (n + 1)‖ < ‖F.eval a‖ / ‖F.derivative.eval a‖ :=
   have : 2 ≤ 2 ^ (n + 1) :=
     by
-    have := pow_le_pow (by norm_num : 1 ≤ 2) (Nat.le_add_left _ _ : 1 ≤ n + 1)
+    have := pow_le_pow_right (by norm_num : 1 ≤ 2) (Nat.le_add_left _ _ : 1 ≤ n + 1)
     simpa using this
   calc
     ‖newton_seq (n + 2) - newton_seq (n + 1)‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ (n + 1) :=
@@ -280,7 +280,8 @@ private theorem newton_seq_succ_dist_weak (n : ℕ) :
       (mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _) (le_of_lt T_lt_one) this)
         (norm_nonneg _))
     _ < ‖F.derivative.eval a‖ * T ^ 1 :=
-      (mul_lt_mul_of_pos_left (pow_lt_pow_of_lt_one T_pos T_lt_one (by norm_num)) deriv_norm_pos)
+      (mul_lt_mul_of_pos_left (pow_lt_pow_right_of_lt_one T_pos T_lt_one (by norm_num))
+        deriv_norm_pos)
     _ = ‖F.eval a‖ / ‖F.derivative.eval a‖ :=
       by
       rw [T, sq, pow_one, norm_div, ← mul_div_assoc, padicNormE.mul]
@@ -291,7 +292,7 @@ private theorem newton_seq_dist_aux (n : ℕ) :
     ∀ k : ℕ, ‖newton_seq (n + k) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
   | 0 => by simp [T_pow_nonneg hnorm, mul_nonneg]
   | k + 1 =>
-    have : 2 ^ n ≤ 2 ^ (n + k) := by apply pow_le_pow; norm_num; apply Nat.le_add_right
+    have : 2 ^ n ≤ 2 ^ (n + k) := by apply pow_le_pow_right; norm_num; apply Nat.le_add_right
     calc
       ‖newton_seq (n + (k + 1)) - newton_seq n‖ = ‖newton_seq (n + k + 1) - newton_seq n‖ := by
         rw [add_assoc]
Diff
@@ -3,11 +3,11 @@ Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Robert Y. Lewis
 -/
-import Mathbin.Analysis.SpecificLimits.Basic
-import Mathbin.Data.Polynomial.Identities
-import Mathbin.NumberTheory.Padics.PadicIntegers
-import Mathbin.Topology.Algebra.Polynomial
-import Mathbin.Topology.MetricSpace.CauSeqFilter
+import Analysis.SpecificLimits.Basic
+import Data.Polynomial.Identities
+import NumberTheory.Padics.PadicIntegers
+import Topology.Algebra.Polynomial
+import Topology.MetricSpace.CauSeqFilter
 
 #align_import number_theory.padics.hensel from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
 
@@ -206,7 +206,7 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
     _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ' 2]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option eqn_compiler.zeta -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta true
 
 /-- Given `z : ℤ_[p]` satisfying `ih n z`, construct `z' : ℤ_[p]` satisfying `ih (n+1) z'`. We need
@@ -228,7 +228,7 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
       calc_eval_z'_norm hz HEq h1 rfl
     ⟨hfeq, hnle⟩⟩
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option eqn_compiler.zeta -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta false
 
 -- why doesn't "noncomputable theory" stick here?
Diff
@@ -83,7 +83,7 @@ parameter {p : ℕ} [Fact p.Prime] {ncs : CauSeq ℤ_[p] norm} {F : Polynomial 
   (hnorm : Tendsto (fun i => ‖F.eval (ncs i)‖) atTop (𝓝 0))
 
 private theorem tendsto_zero_of_norm_tendsto_zero : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 0) :=
-  tendsto_iff_norm_tendsto_zero.2 (by simpa using hnorm)
+  tendsto_iff_norm_sub_tendsto_zero.2 (by simpa using hnorm)
 
 #print limit_zero_of_norm_tendsto_zero /-
 theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.limUnder = 0 :=
Diff
@@ -423,7 +423,7 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
   have : h = 0 :=
     by_contradiction fun hne =>
       have : F.derivative.eval soln + q * h = 0 :=
-        (eq_zero_or_eq_zero_of_mul_eq_zero this).resolve_right hne
+        (eq_zero_or_eq_zero_of_hMul_eq_zero this).resolve_right hne
       have : F.derivative.eval soln = -q * h := by simpa using eq_neg_of_add_eq_zero_left this
       lt_irrefl ‖F.derivative.eval soln‖
         (calc
@@ -452,7 +452,7 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
   have : h = 0 :=
     by_contradiction fun hne =>
       have : F.derivative.eval a + q * h = 0 :=
-        (eq_zero_or_eq_zero_of_mul_eq_zero this).resolve_right hne
+        (eq_zero_or_eq_zero_of_hMul_eq_zero this).resolve_right hne
       have : F.derivative.eval a = -q * h := by simpa using eq_neg_of_add_eq_zero_left this
       lt_irrefl ‖F.derivative.eval a‖
         (calc
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Robert Y. Lewis
-
-! This file was ported from Lean 3 source module number_theory.padics.hensel
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecificLimits.Basic
 import Mathbin.Data.Polynomial.Identities
@@ -14,6 +9,8 @@ import Mathbin.NumberTheory.Padics.PadicIntegers
 import Mathbin.Topology.Algebra.Polynomial
 import Mathbin.Topology.MetricSpace.CauSeqFilter
 
+#align_import number_theory.padics.hensel from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
 /-!
 # Hensel's lemma on ℤ_p
 
Diff
@@ -44,6 +44,7 @@ noncomputable section
 
 open scoped Classical Topology
 
+#print padic_polynomial_dist /-
 -- We begin with some general lemmas that are used below in the computation.
 theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
     ‖F.eval x - F.eval y‖ ≤ ‖x - y‖ :=
@@ -53,6 +54,7 @@ theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p])
     _ ≤ 1 * ‖x - y‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
     _ = ‖x - y‖ := by simp
 #align padic_polynomial_dist padic_polynomial_dist
+-/
 
 open Filter Metric
 
@@ -65,8 +67,6 @@ section
 parameter {p : ℕ} [Fact p.Prime] {ncs : CauSeq ℤ_[p] norm} {F : Polynomial ℤ_[p]} {a : ℤ_[p]}
   (ncs_der_val : ∀ n, ‖F.derivative.eval (ncs n)‖ = ‖F.derivative.eval a‖)
 
-include ncs_der_val
-
 private theorem ncs_tendsto_const :
     Tendsto (fun i => ‖F.derivative.eval (ncs i)‖) atTop (𝓝 ‖F.derivative.eval a‖) := by
   convert tendsto_const_nhds <;> ext <;> rw [ncs_der_val]
@@ -85,14 +85,14 @@ section
 parameter {p : ℕ} [Fact p.Prime] {ncs : CauSeq ℤ_[p] norm} {F : Polynomial ℤ_[p]}
   (hnorm : Tendsto (fun i => ‖F.eval (ncs i)‖) atTop (𝓝 0))
 
-include hnorm
-
 private theorem tendsto_zero_of_norm_tendsto_zero : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 0) :=
   tendsto_iff_norm_tendsto_zero.2 (by simpa using hnorm)
 
+#print limit_zero_of_norm_tendsto_zero /-
 theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.limUnder = 0 :=
   tendsto_nhds_unique (comp_tendsto_lim _) tendsto_zero_of_norm_tendsto_zero
 #align limit_zero_of_norm_tendsto_zero limit_zero_of_norm_tendsto_zero
+-/
 
 end
 
@@ -103,8 +103,6 @@ open Nat
 parameter {p : ℕ} [Fact p.Prime] {F : Polynomial ℤ_[p]} {a : ℤ_[p]}
   (hnorm : ‖F.eval a‖ < ‖F.derivative.eval a‖ ^ 2) (hnsol : F.eval a ≠ 0)
 
-include hnorm
-
 /-- `T` is an auxiliary value that is used to control the behavior of the polynomial `F`. -/
 private def T : ℝ :=
   ‖(F.eval a / F.derivative.eval a ^ 2 : ℚ_[p])‖
@@ -268,8 +266,6 @@ private theorem newton_seq_succ_dist (n : ℕ) :
       ((div_le_div_right deriv_norm_pos).2 (newton_seq_norm_le _))
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
 
-include hnsol
-
 private theorem T_pos : T > 0 := by
   rw [T_def]
   exact div_pos (norm_pos_iff.2 hnsol) (deriv_sq_norm_pos hnorm)
@@ -470,8 +466,6 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
 
 variable (hnorm : ‖F.eval a‖ < ‖F.derivative.eval a‖ ^ 2)
 
-include hnorm
-
 private theorem a_is_soln (ha : F.eval a = 0) :
     F.eval a = 0 ∧
       ‖a - a‖ < ‖F.derivative.eval a‖ ∧
@@ -479,6 +473,7 @@ private theorem a_is_soln (ha : F.eval a = 0) :
           ∀ z', F.eval z' = 0 → ‖z' - a‖ < ‖F.derivative.eval a‖ → z' = a :=
   ⟨ha, by simp [deriv_ne_zero hnorm], rfl, a_soln_is_unique ha⟩
 
+#print hensels_lemma /-
 theorem hensels_lemma :
     ∃ z : ℤ_[p],
       F.eval z = 0 ∧
@@ -492,4 +487,5 @@ theorem hensels_lemma :
           soln_unique _ _⟩ <;>
       assumption
 #align hensels_lemma hensels_lemma
+-/
 
Diff
@@ -52,7 +52,6 @@ theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p])
     ‖F.eval x - F.eval y‖ = ‖z‖ * ‖x - y‖ := by simp [hz]
     _ ≤ 1 * ‖x - y‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
     _ = ‖x - y‖ := by simp
-    
 #align padic_polynomial_dist padic_polynomial_dist
 
 open Filter Metric
@@ -163,7 +162,6 @@ private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
       ((div_le_div_right deriv_norm_pos).2 hz.2)
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ ≤ 1 := mul_le_one (PadicInt.norm_le_one _) (T_pow_nonneg _) (le_of_lt (T_pow' _))
-    
 
 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) :
@@ -176,7 +174,6 @@ private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
       ((div_le_div_right deriv_norm_pos).2 hz.2)
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ < ‖F.derivative.eval a‖ := (mul_lt_iff_lt_one_right deriv_norm_pos).2 (T_pow' _)
-    
 
 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⟩) :
@@ -197,7 +194,6 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
       _ = -⟨↑(F.derivative.eval z) * (↑(F.eval z) / ↑(F.derivative.eval z)), this⟩ :=
         (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])
       _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]
-      
   exact ⟨q, by simpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq⟩
 
 private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F.eval z' = q * z1 ^ 2)
@@ -214,7 +210,6 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
       simp only [mul_pow]
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
     _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ' 2]
-    
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta true
@@ -272,7 +267,6 @@ private theorem newton_seq_succ_dist (n : ℕ) :
     _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ :=
       ((div_le_div_right deriv_norm_pos).2 (newton_seq_norm_le _))
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
-    
 
 include hnsol
 
@@ -299,7 +293,6 @@ private theorem newton_seq_succ_dist_weak (n : ℕ) :
       rw [T, sq, pow_one, norm_div, ← mul_div_assoc, padicNormE.mul]
       apply mul_div_mul_left
       apply deriv_norm_ne_zero <;> assumption
-    
 
 private theorem newton_seq_dist_aux (n : ℕ) :
     ∀ k : ℕ, ‖newton_seq (n + k) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
@@ -319,7 +312,6 @@ private theorem newton_seq_dist_aux (n : ℕ) :
         max_eq_right <|
           mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _) (le_of_lt T_lt_one) this)
             (norm_nonneg _)
-      
 
 private theorem newton_seq_dist {n k : ℕ} (hnk : n ≤ k) :
     ‖newton_seq k - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n :=
@@ -345,7 +337,6 @@ private theorem newton_seq_dist_to_a :
       _ = ‖newton_seq (k + 1) - a‖ := (max_eq_right_of_lt hlt)
       _ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖ :=
         newton_seq_dist_to_a (k + 1) (succ_pos _)
-      
 
 private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0) :=
   by
@@ -428,7 +419,6 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
       ‖z - soln‖ = ‖z - a + (a - soln)‖ := by rw [sub_add_sub_cancel]
       _ ≤ max ‖z - a‖ ‖a - soln‖ := (PadicInt.nonarchimedean _ _)
       _ < ‖F.derivative.eval a‖ := max_lt hnlt (norm_sub_rev soln a ▸ soln_dist_to_a_lt_deriv)
-      
   let h := z - soln
   let ⟨q, hq⟩ := F.binomExpansion soln h
   have : (F.derivative.eval soln + q * h) * h = 0 :=
@@ -436,8 +426,7 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
       (calc
         0 = F.eval (soln + h) := by simp [hev, h]
         _ = F.derivative.eval soln * h + q * h ^ 2 := by rw [hq, eval_soln, zero_add]
-        _ = (F.derivative.eval soln + q * h) * h := by rw [sq, right_distrib, mul_assoc]
-        )
+        _ = (F.derivative.eval soln + q * h) * h := by rw [sq, right_distrib, mul_assoc])
   have : h = 0 :=
     by_contradiction fun hne =>
       have : F.derivative.eval soln + q * h = 0 :=
@@ -450,8 +439,7 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
             rw [PadicInt.norm_mul]
             exact mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _)
           _ = ‖z - soln‖ := by simp [h]
-          _ < ‖F.derivative.eval soln‖ := by rw [soln_deriv_norm] <;> apply soln_dist
-          )
+          _ < ‖F.derivative.eval soln‖ := by rw [soln_deriv_norm] <;> apply soln_dist)
   eq_of_sub_eq_zero (by rw [← this] <;> rfl)
 
 end Hensel
@@ -467,8 +455,7 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
       (calc
         0 = F.eval (a + h) := show 0 = F.eval (a + (z' - a)) by rw [add_comm] <;> simp [hz']
         _ = F.derivative.eval a * h + q * h ^ 2 := by rw [hq, ha, zero_add]
-        _ = (F.derivative.eval a + q * h) * h := by rw [sq, right_distrib, mul_assoc]
-        )
+        _ = (F.derivative.eval a + q * h) * h := by rw [sq, right_distrib, mul_assoc])
   have : h = 0 :=
     by_contradiction fun hne =>
       have : F.derivative.eval a + q * h = 0 :=
@@ -478,8 +465,7 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
         (calc
           ‖F.derivative.eval a‖ = ‖q‖ * ‖h‖ := by simp [this]
           _ ≤ 1 * ‖h‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
-          _ < ‖F.derivative.eval a‖ := by simpa [h]
-          )
+          _ < ‖F.derivative.eval a‖ := by simpa [h])
   eq_of_sub_eq_zero (by rw [← this] <;> rfl)
 
 variable (hnorm : ‖F.eval a‖ < ‖F.derivative.eval a‖ ^ 2)
Diff
@@ -63,14 +63,8 @@ private theorem comp_tendsto_lim {p : ℕ} [Fact p.Prime] {F : Polynomial ℤ_[p
 
 section
 
-parameter
-  {p :
-    ℕ}[Fact
-      p.Prime]{ncs :
-    CauSeq ℤ_[p]
-      norm}{F :
-    Polynomial
-      ℤ_[p]}{a : ℤ_[p]}(ncs_der_val : ∀ n, ‖F.derivative.eval (ncs n)‖ = ‖F.derivative.eval a‖)
+parameter {p : ℕ} [Fact p.Prime] {ncs : CauSeq ℤ_[p] norm} {F : Polynomial ℤ_[p]} {a : ℤ_[p]}
+  (ncs_der_val : ∀ n, ‖F.derivative.eval (ncs n)‖ = ‖F.derivative.eval a‖)
 
 include ncs_der_val
 
@@ -89,12 +83,8 @@ end
 
 section
 
-parameter
-  {p :
-    ℕ}[Fact
-      p.Prime]{ncs :
-    CauSeq ℤ_[p]
-      norm}{F : Polynomial ℤ_[p]}(hnorm : Tendsto (fun i => ‖F.eval (ncs i)‖) atTop (𝓝 0))
+parameter {p : ℕ} [Fact p.Prime] {ncs : CauSeq ℤ_[p] norm} {F : Polynomial ℤ_[p]}
+  (hnorm : Tendsto (fun i => ‖F.eval (ncs i)‖) atTop (𝓝 0))
 
 include hnorm
 
@@ -111,12 +101,8 @@ section Hensel
 
 open Nat
 
-parameter
-  {p :
-    ℕ}[Fact
-      p.Prime]{F :
-    Polynomial
-      ℤ_[p]}{a : ℤ_[p]}(hnorm : ‖F.eval a‖ < ‖F.derivative.eval a‖ ^ 2)(hnsol : F.eval a ≠ 0)
+parameter {p : ℕ} [Fact p.Prime] {F : Polynomial ℤ_[p]} {a : ℤ_[p]}
+  (hnorm : ‖F.eval a‖ < ‖F.derivative.eval a‖ ^ 2) (hnsol : F.eval a ≠ 0)
 
 include hnorm
 
Diff
@@ -244,9 +244,9 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
       calc_deriv_dist rfl (by simp [z1, hz.1]) hz
     have hfeq : ‖F.derivative.eval z'‖ = ‖F.derivative.eval a‖ :=
       by
-      rw [sub_eq_add_neg, ← hz.1, ← norm_neg (F.derivative.eval z)] at hdist
+      rw [sub_eq_add_neg, ← hz.1, ← norm_neg (F.derivative.eval z)] at hdist 
       have := PadicInt.norm_eq_of_norm_add_lt_right hdist
-      rwa [norm_neg, hz.1] at this
+      rwa [norm_neg, hz.1] at this 
     let ⟨q, HEq⟩ := calc_eval_z' rfl hz h1 rfl
     have hnle : ‖F.eval z'‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) :=
       calc_eval_z'_norm hz HEq h1 rfl
@@ -373,7 +373,7 @@ private theorem bound :
     ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε :=
   by
   have := bound' hnorm hnsol
-  simp [tendsto, nhds] at this
+  simp [tendsto, nhds] at this 
   intro ε hε
   cases' this (ball 0 ε) (mem_ball_self hε) is_open_ball with N hN
   exists N; intro n hn
@@ -429,7 +429,7 @@ private theorem soln_dist_to_a : ‖soln - a‖ = ‖F.eval a‖ / ‖F.derivati
 private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval a‖ :=
   by
   rw [soln_dist_to_a, div_lt_iff]
-  · rwa [sq] at hnorm
+  · rwa [sq] at hnorm 
   · apply deriv_norm_pos; assumption
 
 private theorem eval_soln : F.eval soln = 0 :=
Diff
@@ -42,7 +42,7 @@ p-adic, p adic, padic, p-adic integer
 
 noncomputable section
 
-open Classical Topology
+open scoped Classical Topology
 
 -- We begin with some general lemmas that are used below in the computation.
 theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
Diff
@@ -44,12 +44,6 @@ noncomputable section
 
 open Classical Topology
 
-/- warning: padic_polynomial_dist -> padic_polynomial_dist is a dubious translation:
-lean 3 declaration is
-  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] (F : Polynomial.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))))) (x : PadicInt p _inst_1) (y : PadicInt p _inst_1), LE.le.{0} Real Real.hasLe (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.hasSub p _inst_1)) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) x F) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) y F))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.hasSub p _inst_1)) x y))
-but is expected to have type
-  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] (F : Polynomial.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1)))) (x : PadicInt p _inst_1) (y : PadicInt p _inst_1), LE.le.{0} Real Real.instLEReal (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.instSubPadicInt p _inst_1)) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) x F) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) y F))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.instSubPadicInt p _inst_1)) x y))
-Case conversion may be inaccurate. Consider using '#align padic_polynomial_dist padic_polynomial_distₓ'. -/
 -- We begin with some general lemmas that are used below in the computation.
 theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
     ‖F.eval x - F.eval y‖ ≤ ‖x - y‖ :=
@@ -107,12 +101,6 @@ include hnorm
 private theorem tendsto_zero_of_norm_tendsto_zero : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 0) :=
   tendsto_iff_norm_tendsto_zero.2 (by simpa using hnorm)
 
-/- warning: limit_zero_of_norm_tendsto_zero -> limit_zero_of_norm_tendsto_zero is a dubious translation:
-lean 3 declaration is
-  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] {ncs : CauSeq.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))} {F : Polynomial.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))))}, (Filter.Tendsto.{0, 0} Nat Real (fun (i : Nat) => Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) (coeFn.{1, 1} (CauSeq.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))) (fun (_x : CauSeq.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))) => Nat -> (PadicInt p _inst_1)) (CauSeq.hasCoeToFun.{0, 0} Real (PadicInt p _inst_1) Real.linearOrderedField (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))) ncs i) F)) (Filter.atTop.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring)))) (nhds.{0} Real (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))) -> (Eq.{1} (PadicInt p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) (CauSeq.lim.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1)) (PadicInt.isAbsoluteValue p _inst_1) (PadicInt.complete p _inst_1) ncs) F) (OfNat.ofNat.{0} (PadicInt p _inst_1) 0 (OfNat.mk.{0} (PadicInt p _inst_1) 0 (Zero.zero.{0} (PadicInt p _inst_1) (PadicInt.hasZero p _inst_1)))))
-but is expected to have type
-  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] {ncs : CauSeq.{0, 0} Real Real.instLinearOrderedFieldReal (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.instNormedCommRingPadicInt p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1))} {F : Polynomial.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1)))}, (Filter.Tendsto.{0, 0} Nat Real (fun (i : Nat) => Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) (Subtype.val.{1} (Nat -> (PadicInt p _inst_1)) (fun (f : Nat -> (PadicInt p _inst_1)) => IsCauSeq.{0, 0} Real Real.instLinearOrderedFieldReal (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.instNormedCommRingPadicInt p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1)) f) ncs i) F)) (Filter.atTop.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring))) (nhds.{0} Real (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))) -> (Eq.{1} (PadicInt p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) (CauSeq.lim.{0, 0} Real Real.instLinearOrderedFieldReal (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.instNormedCommRingPadicInt p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1)) (PadicInt.isAbsoluteValue p _inst_1) (PadicInt.complete p _inst_1) ncs) F) (OfNat.ofNat.{0} (PadicInt p _inst_1) 0 (Zero.toOfNat0.{0} (PadicInt p _inst_1) (PadicInt.instZeroPadicInt p _inst_1))))
-Case conversion may be inaccurate. Consider using '#align limit_zero_of_norm_tendsto_zero limit_zero_of_norm_tendsto_zeroₓ'. -/
 theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.limUnder = 0 :=
   tendsto_nhds_unique (comp_tendsto_lim _) tendsto_zero_of_norm_tendsto_zero
 #align limit_zero_of_norm_tendsto_zero limit_zero_of_norm_tendsto_zero
@@ -519,9 +507,6 @@ private theorem a_is_soln (ha : F.eval a = 0) :
           ∀ z', F.eval z' = 0 → ‖z' - a‖ < ‖F.derivative.eval a‖ → z' = a :=
   ⟨ha, by simp [deriv_ne_zero hnorm], rfl, a_soln_is_unique ha⟩
 
-/- warning: hensels_lemma -> hensels_lemma is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align hensels_lemma hensels_lemmaₓ'. -/
 theorem hensels_lemma :
     ∃ z : ℤ_[p],
       F.eval z = 0 ∧
Diff
@@ -212,10 +212,8 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
     mt norm_eq_zero.2 (by rw [hz.1] <;> apply deriv_norm_ne_zero <;> assumption)
   have hdzne' : (↑(F.derivative.eval z) : ℚ_[p]) ≠ 0 := fun h => hdzne (Subtype.ext_iff_val.2 h)
   obtain ⟨q, hq⟩ := F.binom_expansion z (-z1)
-  have : ‖(↑(F.derivative.eval z) * (↑(F.eval z) / ↑(F.derivative.eval z)) : ℚ_[p])‖ ≤ 1 :=
-    by
-    rw [padicNormE.mul]
-    exact mul_le_one (PadicInt.norm_le_one _) (norm_nonneg _) h1
+  have : ‖(↑(F.derivative.eval z) * (↑(F.eval z) / ↑(F.derivative.eval z)) : ℚ_[p])‖ ≤ 1 := by
+    rw [padicNormE.mul]; exact mul_le_one (PadicInt.norm_le_one _) (norm_nonneg _) h1
   have : F.derivative.eval z * -z1 = -F.eval z := by
     calc
       F.derivative.eval z * -z1 =
@@ -333,10 +331,7 @@ private theorem newton_seq_dist_aux (n : ℕ) :
     ∀ k : ℕ, ‖newton_seq (n + k) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
   | 0 => by simp [T_pow_nonneg hnorm, mul_nonneg]
   | k + 1 =>
-    have : 2 ^ n ≤ 2 ^ (n + k) := by
-      apply pow_le_pow
-      norm_num
-      apply Nat.le_add_right
+    have : 2 ^ n ≤ 2 ^ (n + k) := by apply pow_le_pow; norm_num; apply Nat.le_add_right
     calc
       ‖newton_seq (n + (k + 1)) - newton_seq n‖ = ‖newton_seq (n + k + 1) - newton_seq n‖ := by
         rw [add_assoc]
@@ -403,8 +398,7 @@ private theorem bound'_sq :
   simp only [mul_assoc]
   apply tendsto.mul
   · apply tendsto_const_nhds
-  · apply bound'
-    assumption
+  · apply bound'; assumption
 
 private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq :=
   by
@@ -413,10 +407,8 @@ private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq :=
   exists N
   intro j hj
   apply lt_of_le_of_lt
-  · apply newton_seq_dist _ _ hj
-    assumption
-  · apply hN
-    exact le_rfl
+  · apply newton_seq_dist _ _ hj; assumption
+  · apply hN; exact le_rfl
 
 private def newton_cau_seq : CauSeq ℤ_[p] norm :=
   ⟨_, newton_seq_is_cauchy⟩
@@ -450,8 +442,7 @@ private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval
   by
   rw [soln_dist_to_a, div_lt_iff]
   · rwa [sq] at hnorm
-  · apply deriv_norm_pos
-    assumption
+  · apply deriv_norm_pos; assumption
 
 private theorem eval_soln : F.eval soln = 0 :=
   limit_zero_of_norm_tendsto_zero newton_seq_norm_tendsto_zero
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Robert Y. Lewis
 
 ! This file was ported from Lean 3 source module number_theory.padics.hensel
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -17,6 +17,9 @@ import Mathbin.Topology.MetricSpace.CauSeqFilter
 /-!
 # Hensel's lemma on ℤ_p
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file proves Hensel's lemma on ℤ_p, roughly following Keith Conrad's writeup:
 <http://www.math.uconn.edu/~kconrad/blurbs/gradnumthy/hensel.pdf>
 
@@ -41,6 +44,12 @@ noncomputable section
 
 open Classical Topology
 
+/- warning: padic_polynomial_dist -> padic_polynomial_dist is a dubious translation:
+lean 3 declaration is
+  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] (F : Polynomial.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))))) (x : PadicInt p _inst_1) (y : PadicInt p _inst_1), LE.le.{0} Real Real.hasLe (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.hasSub p _inst_1)) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) x F) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) y F))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.hasSub p _inst_1)) x y))
+but is expected to have type
+  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] (F : Polynomial.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1)))) (x : PadicInt p _inst_1) (y : PadicInt p _inst_1), LE.le.{0} Real Real.instLEReal (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.instSubPadicInt p _inst_1)) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) x F) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) y F))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1) (HSub.hSub.{0, 0, 0} (PadicInt p _inst_1) (PadicInt p _inst_1) (PadicInt p _inst_1) (instHSub.{0} (PadicInt p _inst_1) (PadicInt.instSubPadicInt p _inst_1)) x y))
+Case conversion may be inaccurate. Consider using '#align padic_polynomial_dist padic_polynomial_distₓ'. -/
 -- We begin with some general lemmas that are used below in the computation.
 theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
     ‖F.eval x - F.eval y‖ ≤ ‖x - y‖ :=
@@ -57,7 +66,6 @@ open Filter Metric
 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.limUnder)) :=
   F.ContinuousAt.Tendsto.comp ncs.tendsto_limit
-#align comp_tendsto_lim comp_tendsto_lim
 
 section
 
@@ -75,16 +83,13 @@ include ncs_der_val
 private theorem ncs_tendsto_const :
     Tendsto (fun i => ‖F.derivative.eval (ncs i)‖) atTop (𝓝 ‖F.derivative.eval a‖) := by
   convert tendsto_const_nhds <;> ext <;> rw [ncs_der_val]
-#align ncs_tendsto_const ncs_tendsto_const
 
 private theorem ncs_tendsto_lim :
     Tendsto (fun i => ‖F.derivative.eval (ncs i)‖) atTop (𝓝 ‖F.derivative.eval ncs.limUnder‖) :=
   Tendsto.comp (continuous_iff_continuousAt.1 continuous_norm _) (comp_tendsto_lim _)
-#align ncs_tendsto_lim ncs_tendsto_lim
 
 private theorem norm_deriv_eq : ‖F.derivative.eval ncs.limUnder‖ = ‖F.derivative.eval a‖ :=
   tendsto_nhds_unique ncs_tendsto_lim ncs_tendsto_const
-#align norm_deriv_eq norm_deriv_eq
 
 end
 
@@ -101,8 +106,13 @@ include hnorm
 
 private theorem tendsto_zero_of_norm_tendsto_zero : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 0) :=
   tendsto_iff_norm_tendsto_zero.2 (by simpa using hnorm)
-#align tendsto_zero_of_norm_tendsto_zero tendsto_zero_of_norm_tendsto_zero
 
+/- warning: limit_zero_of_norm_tendsto_zero -> limit_zero_of_norm_tendsto_zero is a dubious translation:
+lean 3 declaration is
+  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] {ncs : CauSeq.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))} {F : Polynomial.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))))}, (Filter.Tendsto.{0, 0} Nat Real (fun (i : Nat) => Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) (coeFn.{1, 1} (CauSeq.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))) (fun (_x : CauSeq.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))) => Nat -> (PadicInt p _inst_1)) (CauSeq.hasCoeToFun.{0, 0} Real (PadicInt p _inst_1) Real.linearOrderedField (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1))) ncs i) F)) (Filter.atTop.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring)))) (nhds.{0} Real (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))) -> (Eq.{1} (PadicInt p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (Ring.toSemiring.{0} (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1)))) (CauSeq.lim.{0, 0} Real Real.linearOrderedField (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.normedCommRing p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.hasNorm p _inst_1)) (PadicInt.isAbsoluteValue p _inst_1) (PadicInt.complete p _inst_1) ncs) F) (OfNat.ofNat.{0} (PadicInt p _inst_1) 0 (OfNat.mk.{0} (PadicInt p _inst_1) 0 (Zero.zero.{0} (PadicInt p _inst_1) (PadicInt.hasZero p _inst_1)))))
+but is expected to have type
+  forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)] {ncs : CauSeq.{0, 0} Real Real.instLinearOrderedFieldReal (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.instNormedCommRingPadicInt p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1))} {F : Polynomial.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1)))}, (Filter.Tendsto.{0, 0} Nat Real (fun (i : Nat) => Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) (Subtype.val.{1} (Nat -> (PadicInt p _inst_1)) (fun (f : Nat -> (PadicInt p _inst_1)) => IsCauSeq.{0, 0} Real Real.instLinearOrderedFieldReal (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.instNormedCommRingPadicInt p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1)) f) ncs i) F)) (Filter.atTop.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring))) (nhds.{0} Real (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))) -> (Eq.{1} (PadicInt p _inst_1) (Polynomial.eval.{0} (PadicInt p _inst_1) (CommSemiring.toSemiring.{0} (PadicInt p _inst_1) (CommRing.toCommSemiring.{0} (PadicInt p _inst_1) (PadicInt.instCommRingPadicInt p _inst_1))) (CauSeq.lim.{0, 0} Real Real.instLinearOrderedFieldReal (PadicInt p _inst_1) (NormedRing.toRing.{0} (PadicInt p _inst_1) (NormedCommRing.toNormedRing.{0} (PadicInt p _inst_1) (PadicInt.instNormedCommRingPadicInt p _inst_1))) (Norm.norm.{0} (PadicInt p _inst_1) (PadicInt.instNormPadicInt p _inst_1)) (PadicInt.isAbsoluteValue p _inst_1) (PadicInt.complete p _inst_1) ncs) F) (OfNat.ofNat.{0} (PadicInt p _inst_1) 0 (Zero.toOfNat0.{0} (PadicInt p _inst_1) (PadicInt.instZeroPadicInt p _inst_1))))
+Case conversion may be inaccurate. Consider using '#align limit_zero_of_norm_tendsto_zero limit_zero_of_norm_tendsto_zeroₓ'. -/
 theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.limUnder = 0 :=
   tendsto_nhds_unique (comp_tendsto_lim _) tendsto_zero_of_norm_tendsto_zero
 #align limit_zero_of_norm_tendsto_zero limit_zero_of_norm_tendsto_zero
@@ -125,62 +135,48 @@ include hnorm
 /-- `T` is an auxiliary value that is used to control the behavior of the polynomial `F`. -/
 private def T : ℝ :=
   ‖(F.eval a / F.derivative.eval a ^ 2 : ℚ_[p])‖
-#align T T
 
 private theorem deriv_sq_norm_pos : 0 < ‖F.derivative.eval a‖ ^ 2 :=
   lt_of_le_of_lt (norm_nonneg _) hnorm
-#align deriv_sq_norm_pos deriv_sq_norm_pos
 
 private theorem deriv_sq_norm_ne_zero : ‖F.derivative.eval a‖ ^ 2 ≠ 0 :=
   ne_of_gt deriv_sq_norm_pos
-#align deriv_sq_norm_ne_zero deriv_sq_norm_ne_zero
 
 private theorem deriv_norm_ne_zero : ‖F.derivative.eval a‖ ≠ 0 := fun h =>
   deriv_sq_norm_ne_zero (by simp [*, sq])
-#align deriv_norm_ne_zero deriv_norm_ne_zero
 
 private theorem deriv_norm_pos : 0 < ‖F.derivative.eval a‖ :=
   lt_of_le_of_ne (norm_nonneg _) (Ne.symm deriv_norm_ne_zero)
-#align deriv_norm_pos deriv_norm_pos
 
 private theorem deriv_ne_zero : F.derivative.eval a ≠ 0 :=
   mt norm_eq_zero.2 deriv_norm_ne_zero
-#align deriv_ne_zero deriv_ne_zero
 
 private theorem T_def : T = ‖F.eval a‖ / ‖F.derivative.eval a‖ ^ 2 := by
   simp [T, ← PadicInt.norm_def]
-#align T_def T_def
 
 private theorem T_lt_one : T < 1 :=
   by
   let h := (div_lt_one deriv_sq_norm_pos).2 hnorm
   rw [T_def] <;> apply h
-#align T_lt_one T_lt_one
 
 private theorem T_nonneg : 0 ≤ T :=
   norm_nonneg _
-#align T_nonneg T_nonneg
 
 private theorem T_pow_nonneg (n : ℕ) : 0 ≤ T ^ n :=
   pow_nonneg T_nonneg _
-#align T_pow_nonneg T_pow_nonneg
 
 private theorem T_pow {n : ℕ} (hn : n ≠ 0) : T ^ n < 1 :=
   pow_lt_one T_nonneg T_lt_one hn
-#align T_pow T_pow
 
 private theorem T_pow' (n : ℕ) : T ^ 2 ^ n < 1 :=
   T_pow (pow_ne_zero _ two_ne_zero)
-#align T_pow' T_pow'
 
 /-- We will construct a sequence of elements of ℤ_p satisfying successive values of `ih`. -/
 private def ih (n : ℕ) (z : ℤ_[p]) : Prop :=
   ‖F.derivative.eval z‖ = ‖F.derivative.eval a‖ ∧ ‖F.eval z‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n
-#align ih ih
 
 private theorem ih_0 : ih 0 a :=
   ⟨rfl, by simp [T_def, mul_div_cancel' _ (ne_of_gt (deriv_sq_norm_pos hnorm))]⟩
-#align ih_0 ih_0
 
 private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
     ‖(↑(F.eval z) : ℚ_[p]) / ↑(F.derivative.eval z)‖ ≤ 1 :=
@@ -194,7 +190,6 @@ private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ ≤ 1 := mul_le_one (PadicInt.norm_le_one _) (T_pow_nonneg _) (le_of_lt (T_pow' _))
     
-#align calc_norm_le_one calc_norm_le_one
 
 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) :
@@ -208,7 +203,6 @@ private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ < ‖F.derivative.eval a‖ := (mul_lt_iff_lt_one_right deriv_norm_pos).2 (T_pow' _)
     
-#align calc_deriv_dist calc_deriv_dist
 
 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⟩) :
@@ -233,7 +227,6 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
       _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]
       
   exact ⟨q, by simpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq⟩
-#align calc_eval_z' calc_eval_z'
 
 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⟩) :
@@ -250,7 +243,6 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
     _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ' 2]
     
-#align calc_eval_z'_norm calc_eval_z'_norm
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta true
@@ -273,7 +265,6 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
     have hnle : ‖F.eval z'‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) :=
       calc_eval_z'_norm hz HEq h1 rfl
     ⟨hfeq, hnle⟩⟩
-#align ih_n ih_n
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option eqn_compiler.zeta -/
 set_option eqn_compiler.zeta false
@@ -282,27 +273,22 @@ set_option eqn_compiler.zeta false
 private noncomputable def newton_seq_aux : ∀ n : ℕ, { z : ℤ_[p] // ih n z }
   | 0 => ⟨a, ih_0⟩
   | k + 1 => ih_n (newton_seq_aux k).2
-#align newton_seq_aux newton_seq_aux
 
 private def newton_seq (n : ℕ) : ℤ_[p] :=
   (newton_seq_aux n).1
-#align newton_seq newton_seq
 
 private theorem newton_seq_deriv_norm (n : ℕ) :
     ‖F.derivative.eval (newton_seq n)‖ = ‖F.derivative.eval a‖ :=
   (newton_seq_aux n).2.1
-#align newton_seq_deriv_norm newton_seq_deriv_norm
 
 private theorem newton_seq_norm_le (n : ℕ) :
     ‖F.eval (newton_seq n)‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n :=
   (newton_seq_aux n).2.2
-#align newton_seq_norm_le newton_seq_norm_le
 
 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)‖ :=
   by simp [newton_seq, newton_seq_aux, ih_n, sub_eq_add_neg, add_comm]
-#align newton_seq_norm_eq newton_seq_norm_eq
 
 private theorem newton_seq_succ_dist (n : ℕ) :
     ‖newton_seq (n + 1) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n :=
@@ -315,14 +301,12 @@ private theorem newton_seq_succ_dist (n : ℕ) :
       ((div_le_div_right deriv_norm_pos).2 (newton_seq_norm_le _))
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
     
-#align newton_seq_succ_dist newton_seq_succ_dist
 
 include hnsol
 
 private theorem T_pos : T > 0 := by
   rw [T_def]
   exact div_pos (norm_pos_iff.2 hnsol) (deriv_sq_norm_pos hnorm)
-#align T_pos T_pos
 
 private theorem newton_seq_succ_dist_weak (n : ℕ) :
     ‖newton_seq (n + 2) - newton_seq (n + 1)‖ < ‖F.eval a‖ / ‖F.derivative.eval a‖ :=
@@ -344,7 +328,6 @@ private theorem newton_seq_succ_dist_weak (n : ℕ) :
       apply mul_div_mul_left
       apply deriv_norm_ne_zero <;> assumption
     
-#align newton_seq_succ_dist_weak newton_seq_succ_dist_weak
 
 private theorem newton_seq_dist_aux (n : ℕ) :
     ∀ k : ℕ, ‖newton_seq (n + k) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
@@ -368,7 +351,6 @@ private theorem newton_seq_dist_aux (n : ℕ) :
           mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _) (le_of_lt T_lt_one) this)
             (norm_nonneg _)
       
-#align newton_seq_dist_aux newton_seq_dist_aux
 
 private theorem newton_seq_dist {n k : ℕ} (hnk : n ≤ k) :
     ‖newton_seq k - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n :=
@@ -376,7 +358,6 @@ private theorem newton_seq_dist {n k : ℕ} (hnk : n ≤ k) :
   have hex : ∃ m, k = n + m := exists_eq_add_of_le hnk
   let ⟨_, hex'⟩ := hex
   rw [hex'] <;> apply newton_seq_dist_aux <;> assumption
-#align newton_seq_dist newton_seq_dist
 
 private theorem newton_seq_dist_to_a :
     ∀ n : ℕ, 0 < n → ‖newton_seq n - a‖ = ‖F.eval a‖ / ‖F.derivative.eval a‖
@@ -396,7 +377,6 @@ private theorem newton_seq_dist_to_a :
       _ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖ :=
         newton_seq_dist_to_a (k + 1) (succ_pos _)
       
-#align newton_seq_dist_to_a newton_seq_dist_to_a
 
 private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0) :=
   by
@@ -405,7 +385,6 @@ private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^
     tendsto_const_nhds.mul
       (tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))
         (Nat.tendsto_pow_atTop_atTop_of_one_lt (by norm_num)))
-#align bound' bound'
 
 private theorem bound :
     ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε :=
@@ -416,7 +395,6 @@ private theorem bound :
   cases' this (ball 0 ε) (mem_ball_self hε) is_open_ball with N hN
   exists N; intro n hn
   simpa [abs_of_nonneg (T_nonneg _)] using hN _ hn
-#align bound bound
 
 private theorem bound'_sq :
     Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) atTop (𝓝 0) :=
@@ -427,7 +405,6 @@ private theorem bound'_sq :
   · apply tendsto_const_nhds
   · apply bound'
     assumption
-#align bound'_sq bound'_sq
 
 private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq :=
   by
@@ -440,43 +417,34 @@ private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq :=
     assumption
   · apply hN
     exact le_rfl
-#align newton_seq_is_cauchy newton_seq_is_cauchy
 
 private def newton_cau_seq : CauSeq ℤ_[p] norm :=
   ⟨_, newton_seq_is_cauchy⟩
-#align newton_cau_seq newton_cau_seq
 
 private def soln : ℤ_[p] :=
   newton_cau_seq.limUnder
-#align soln soln
 
 private theorem soln_spec {ε : ℝ} (hε : ε > 0) :
     ∃ N : ℕ, ∀ {i : ℕ}, i ≥ N → ‖soln - newton_cau_seq i‖ < ε :=
   Setoid.symm (CauSeq.equiv_lim newton_cau_seq) _ hε
-#align soln_spec soln_spec
 
 private theorem soln_deriv_norm : ‖F.derivative.eval soln‖ = ‖F.derivative.eval a‖ :=
   norm_deriv_eq newton_seq_deriv_norm
-#align soln_deriv_norm soln_deriv_norm
 
 private theorem newton_seq_norm_tendsto_zero :
     Tendsto (fun i => ‖F.eval (newton_cau_seq i)‖) atTop (𝓝 0) :=
   squeeze_zero (fun _ => norm_nonneg _) newton_seq_norm_le bound'_sq
-#align newton_seq_norm_tendsto_zero newton_seq_norm_tendsto_zero
 
 private theorem newton_seq_dist_tendsto :
     Tendsto (fun n => ‖newton_cau_seq n - a‖) atTop (𝓝 (‖F.eval a‖ / ‖F.derivative.eval a‖)) :=
   tendsto_const_nhds.congr' <| eventually_atTop.2 ⟨1, fun _ hx => (newton_seq_dist_to_a _ hx).symm⟩
-#align newton_seq_dist_tendsto newton_seq_dist_tendsto
 
 private theorem newton_seq_dist_tendsto' :
     Tendsto (fun n => ‖newton_cau_seq n - a‖) atTop (𝓝 ‖soln - a‖) :=
   (continuous_norm.Tendsto _).comp (newton_cau_seq.tendsto_limit.sub tendsto_const_nhds)
-#align newton_seq_dist_tendsto' newton_seq_dist_tendsto'
 
 private theorem soln_dist_to_a : ‖soln - a‖ = ‖F.eval a‖ / ‖F.derivative.eval a‖ :=
   tendsto_nhds_unique newton_seq_dist_tendsto' newton_seq_dist_tendsto
-#align soln_dist_to_a soln_dist_to_a
 
 private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval a‖ :=
   by
@@ -484,11 +452,9 @@ private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval
   · rwa [sq] at hnorm
   · apply deriv_norm_pos
     assumption
-#align soln_dist_to_a_lt_deriv soln_dist_to_a_lt_deriv
 
 private theorem eval_soln : F.eval soln = 0 :=
   limit_zero_of_norm_tendsto_zero newton_seq_norm_tendsto_zero
-#align eval_soln eval_soln
 
 private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
     (hnlt : ‖z - a‖ < ‖F.derivative.eval a‖) : z = soln :=
@@ -522,7 +488,6 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
           _ < ‖F.derivative.eval soln‖ := by rw [soln_deriv_norm] <;> apply soln_dist
           )
   eq_of_sub_eq_zero (by rw [← this] <;> rfl)
-#align soln_unique soln_unique
 
 end Hensel
 
@@ -551,7 +516,6 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
           _ < ‖F.derivative.eval a‖ := by simpa [h]
           )
   eq_of_sub_eq_zero (by rw [← this] <;> rfl)
-#align a_soln_is_unique a_soln_is_unique
 
 variable (hnorm : ‖F.eval a‖ < ‖F.derivative.eval a‖ ^ 2)
 
@@ -563,8 +527,10 @@ private theorem a_is_soln (ha : F.eval a = 0) :
         ‖F.derivative.eval a‖ = ‖F.derivative.eval a‖ ∧
           ∀ z', F.eval z' = 0 → ‖z' - a‖ < ‖F.derivative.eval a‖ → z' = a :=
   ⟨ha, by simp [deriv_ne_zero hnorm], rfl, a_soln_is_unique ha⟩
-#align a_is_soln a_is_soln
 
+/- warning: hensels_lemma -> hensels_lemma is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align hensels_lemma hensels_lemmaₓ'. -/
 theorem hensels_lemma :
     ∃ z : ℤ_[p],
       F.eval z = 0 ∧
Diff
@@ -400,7 +400,7 @@ private theorem newton_seq_dist_to_a :
 
 private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0) :=
   by
-  rw [← mul_zero ‖F.derivative.eval a‖]
+  rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖]
   exact
     tendsto_const_nhds.mul
       (tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))
@@ -421,7 +421,7 @@ private theorem bound :
 private theorem bound'_sq :
     Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) atTop (𝓝 0) :=
   by
-  rw [← mul_zero ‖F.derivative.eval a‖, sq]
+  rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖, sq]
   simp only [mul_assoc]
   apply tendsto.mul
   · apply tendsto_const_nhds
Diff
@@ -47,7 +47,7 @@ theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p])
   let ⟨z, hz⟩ := F.evalSubFactor x y
   calc
     ‖F.eval x - F.eval y‖ = ‖z‖ * ‖x - y‖ := by simp [hz]
-    _ ≤ 1 * ‖x - y‖ := mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _)
+    _ ≤ 1 * ‖x - y‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
     _ = ‖x - y‖ := by simp
     
 #align padic_polynomial_dist padic_polynomial_dist
@@ -190,8 +190,8 @@ private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
       norm_div _ _
     _ = ‖F.eval z‖ / ‖F.derivative.eval a‖ := by simp [hz.1]
     _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ :=
-      (div_le_div_right deriv_norm_pos).2 hz.2
-    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
+      ((div_le_div_right deriv_norm_pos).2 hz.2)
+    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ ≤ 1 := mul_le_one (PadicInt.norm_le_one _) (T_pow_nonneg _) (le_of_lt (T_pow' _))
     
 #align calc_norm_le_one calc_norm_le_one
@@ -204,8 +204,8 @@ private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
     _ = ‖z1‖ := by simp only [sub_eq_add_neg, add_assoc, hz', add_add_neg_cancel'_right, norm_neg]
     _ = ‖F.eval z‖ / ‖F.derivative.eval a‖ := hz1
     _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ :=
-      (div_le_div_right deriv_norm_pos).2 hz.2
-    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
+      ((div_le_div_right deriv_norm_pos).2 hz.2)
+    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ < ‖F.derivative.eval a‖ := (mul_lt_iff_lt_one_right deriv_norm_pos).2 (T_pow' _)
     
 #align calc_deriv_dist calc_deriv_dist
@@ -227,9 +227,9 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
       F.derivative.eval z * -z1 =
           F.derivative.eval z * -⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩ :=
         by rw [hzeq]
-      _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := mul_neg _ _
+      _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := (mul_neg _ _)
       _ = -⟨↑(F.derivative.eval z) * (↑(F.eval z) / ↑(F.derivative.eval z)), this⟩ :=
-        Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk]
+        (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])
       _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]
       
   exact ⟨q, by simpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq⟩
@@ -241,13 +241,13 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
   calc
     ‖F.eval z'‖ = ‖q‖ * ‖z1‖ ^ 2 := by simp [HEq]
     _ ≤ 1 * ‖z1‖ ^ 2 :=
-      mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (pow_nonneg (norm_nonneg _) _)
+      (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (pow_nonneg (norm_nonneg _) _))
     _ = ‖F.eval z‖ ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by simp [hzeq, hz.1, div_pow]
     _ ≤ (‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 :=
-      (div_le_div_right deriv_sq_norm_pos).2 (pow_le_pow_of_le_left (norm_nonneg _) hz.2 _)
+      ((div_le_div_right deriv_sq_norm_pos).2 (pow_le_pow_of_le_left (norm_nonneg _) hz.2 _))
     _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
       simp only [mul_pow]
-    _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := div_sq_cancel _ _
+    _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
     _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ' 2]
     
 #align calc_eval_z'_norm calc_eval_z'_norm
@@ -312,7 +312,7 @@ private theorem newton_seq_succ_dist (n : ℕ) :
       newton_seq_norm_eq _
     _ = ‖F.eval (newton_seq n)‖ / ‖F.derivative.eval a‖ := by rw [newton_seq_deriv_norm]
     _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ :=
-      (div_le_div_right deriv_norm_pos).2 (newton_seq_norm_le _)
+      ((div_le_div_right deriv_norm_pos).2 (newton_seq_norm_le _))
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
     
 #align newton_seq_succ_dist newton_seq_succ_dist
@@ -334,10 +334,10 @@ private theorem newton_seq_succ_dist_weak (n : ℕ) :
     ‖newton_seq (n + 2) - newton_seq (n + 1)‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ (n + 1) :=
       newton_seq_succ_dist _
     _ ≤ ‖F.derivative.eval a‖ * T ^ 2 :=
-      mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _) (le_of_lt T_lt_one) this)
-        (norm_nonneg _)
+      (mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _) (le_of_lt T_lt_one) this)
+        (norm_nonneg _))
     _ < ‖F.derivative.eval a‖ * T ^ 1 :=
-      mul_lt_mul_of_pos_left (pow_lt_pow_of_lt_one T_pos T_lt_one (by norm_num)) deriv_norm_pos
+      (mul_lt_mul_of_pos_left (pow_lt_pow_of_lt_one T_pos T_lt_one (by norm_num)) deriv_norm_pos)
     _ = ‖F.eval a‖ / ‖F.derivative.eval a‖ :=
       by
       rw [T, sq, pow_one, norm_div, ← mul_div_assoc, padicNormE.mul]
@@ -360,9 +360,9 @@ private theorem newton_seq_dist_aux (n : ℕ) :
       _ = ‖newton_seq (n + k + 1) - newton_seq (n + k) + (newton_seq (n + k) - newton_seq n)‖ := by
         rw [← sub_add_sub_cancel]
       _ ≤ max ‖newton_seq (n + k + 1) - newton_seq (n + k)‖ ‖newton_seq (n + k) - newton_seq n‖ :=
-        PadicInt.nonarchimedean _ _
+        (PadicInt.nonarchimedean _ _)
       _ ≤ max (‖F.derivative.eval a‖ * T ^ 2 ^ (n + k)) (‖F.derivative.eval a‖ * T ^ 2 ^ n) :=
-        max_le_max (newton_seq_succ_dist _) (newton_seq_dist_aux _)
+        (max_le_max (newton_seq_succ_dist _) (newton_seq_dist_aux _))
       _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n :=
         max_eq_right <|
           mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _) (le_of_lt T_lt_one) this)
@@ -391,8 +391,8 @@ private theorem newton_seq_dist_to_a :
           ‖newton_seq (k + 2) - newton_seq (k + 1) + (newton_seq (k + 1) - a)‖ :=
         by rw [← sub_add_sub_cancel]
       _ = max ‖newton_seq (k + 2) - newton_seq (k + 1)‖ ‖newton_seq (k + 1) - a‖ :=
-        PadicInt.norm_add_eq_max_of_ne hne'
-      _ = ‖newton_seq (k + 1) - a‖ := max_eq_right_of_lt hlt
+        (PadicInt.norm_add_eq_max_of_ne hne')
+      _ = ‖newton_seq (k + 1) - a‖ := (max_eq_right_of_lt hlt)
       _ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖ :=
         newton_seq_dist_to_a (k + 1) (succ_pos _)
       
@@ -495,7 +495,7 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
   have soln_dist : ‖z - soln‖ < ‖F.derivative.eval a‖ :=
     calc
       ‖z - soln‖ = ‖z - a + (a - soln)‖ := by rw [sub_add_sub_cancel]
-      _ ≤ max ‖z - a‖ ‖a - soln‖ := PadicInt.nonarchimedean _ _
+      _ ≤ max ‖z - a‖ ‖a - soln‖ := (PadicInt.nonarchimedean _ _)
       _ < ‖F.derivative.eval a‖ := max_lt hnlt (norm_sub_rev soln a ▸ soln_dist_to_a_lt_deriv)
       
   let h := z - soln
@@ -547,7 +547,7 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
       lt_irrefl ‖F.derivative.eval a‖
         (calc
           ‖F.derivative.eval a‖ = ‖q‖ * ‖h‖ := by simp [this]
-          _ ≤ 1 * ‖h‖ := mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _)
+          _ ≤ 1 * ‖h‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
           _ < ‖F.derivative.eval a‖ := by simpa [h]
           )
   eq_of_sub_eq_zero (by rw [← this] <;> rfl)

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -156,7 +156,7 @@ private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
     _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ := by
       gcongr
       apply hz.2
-    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
+    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
     _ ≤ 1 := mul_le_one (PadicInt.norm_le_one _) (T_pow_nonneg _) (le_of_lt (T_pow' hnorm _))
 
 
@@ -170,7 +170,7 @@ private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
     _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ := by
       gcongr
       apply hz.2
-    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
+    _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := div_sq_cancel _ _
     _ < ‖F.derivative.eval a‖ := (mul_lt_iff_lt_one_right (deriv_norm_pos hnorm)).2
       (T_pow' hnorm _)
 
@@ -190,7 +190,7 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
       F.derivative.eval z * -z1 =
           F.derivative.eval z * -⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩ :=
         by rw [hzeq]
-      _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := (mul_neg _ _)
+      _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := mul_neg _ _
       _ = -⟨F.derivative.eval z * (F.eval z / (F.derivative.eval z : ℤ_[p]) : ℚ_[p]), this⟩ :=
         (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])
       _ = -F.eval z := by simp only [mul_div_cancel₀ _ hdzne', Subtype.coe_eta]
@@ -210,7 +210,7 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
       exact hz.2
     _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
       simp only [mul_pow]
-    _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
+    _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := div_sq_cancel _ _
     _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ 2]
 
 
@@ -340,7 +340,7 @@ private theorem newton_seq_dist_to_a :
         by rw [← sub_add_sub_cancel]
       _ = max ‖newton_seq (k + 2) - newton_seq (k + 1)‖ ‖newton_seq (k + 1) - a‖ :=
         (PadicInt.norm_add_eq_max_of_ne hne')
-      _ = ‖newton_seq (k + 1) - a‖ := (max_eq_right_of_lt hlt)
+      _ = ‖newton_seq (k + 1) - a‖ := max_eq_right_of_lt hlt
       _ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖ :=
         newton_seq_dist_to_a (k + 1) (succ_pos _)
 
@@ -409,7 +409,7 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
   have soln_dist : ‖z - soln‖ < ‖F.derivative.eval a‖ :=
     calc
       ‖z - soln‖ = ‖z - a + (a - soln)‖ := by rw [sub_add_sub_cancel]
-      _ ≤ max ‖z - a‖ ‖a - soln‖ := (PadicInt.nonarchimedean _ _)
+      _ ≤ max ‖z - a‖ ‖a - soln‖ := PadicInt.nonarchimedean _ _
       _ < ‖F.derivative.eval a‖ :=
         max_lt hnlt ((norm_sub_rev soln a ▸ (soln_dist_to_a_lt_deriv hnorm)) hnsol)
 
move(Polynomial): Move out of Data (#11751)

Polynomial and MvPolynomial are algebraic objects, hence should be under Algebra (or at least not under Data)

Diff
@@ -3,8 +3,8 @@ Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Robert Y. Lewis
 -/
+import Mathlib.Algebra.Polynomial.Identities
 import Mathlib.Analysis.SpecificLimits.Basic
-import Mathlib.Data.Polynomial.Identities
 import Mathlib.NumberTheory.Padics.PadicIntegers
 import Mathlib.Topology.Algebra.Polynomial
 import Mathlib.Topology.MetricSpace.CauSeqFilter
change the order of operation in zsmulRec and nsmulRec (#11451)

We change the following field in the definition of an additive commutative monoid:

 nsmul_succ : ∀ (n : ℕ) (x : G),
-  AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+  AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x

where the latter is more natural

We adjust the definitions of ^ in monoids, groups, etc. Originally there was a warning comment about why this natural order was preferred

use x * npowRec n x and not npowRec n x * x in the definition to make sure that definitional unfolding of npowRec is blocked, to avoid deep recursion issues.

but it seems to no longer apply.

Remarks on the PR :

  • pow_succ and pow_succ' have switched their meanings.
  • Most of the time, the proofs were adjusted by priming/unpriming one lemma, or exchanging left and right; a few proofs were more complicated to adjust.
  • In particular, [Mathlib/NumberTheory/RamificationInertia.lean] used Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.
  • the docstring for Cauchy condensation test in [Mathlib/Analysis/PSeries.lean] was mathematically incorrect, I added the mention that the function is antitone.
Diff
@@ -211,7 +211,7 @@ private def calc_eval_z'_norm {z z' z1 : ℤ_[p]} {n} (hz : ih n z) {q} (heq : F
     _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
       simp only [mul_pow]
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
-    _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ' 2]
+    _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by rw [← pow_mul, pow_succ 2]
 
 
 -- Porting note: unsupported option eqn_compiler.zeta
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -144,7 +144,7 @@ private def ih_gen (n : ℕ) (z : ℤ_[p]) : Prop :=
 local notation "ih" => @ih_gen p _ F a
 
 private theorem ih_0 : ih 0 a :=
-  ⟨rfl, by simp [T_def, mul_div_cancel' _ (ne_of_gt (deriv_sq_norm_pos hnorm))]⟩
+  ⟨rfl, by simp [T_def, mul_div_cancel₀ _ (ne_of_gt (deriv_sq_norm_pos hnorm))]⟩
 
 private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
     ‖(↑(F.eval z) : ℚ_[p]) / ↑(F.derivative.eval z)‖ ≤ 1 :=
@@ -193,7 +193,7 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
       _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := (mul_neg _ _)
       _ = -⟨F.derivative.eval z * (F.eval z / (F.derivative.eval z : ℤ_[p]) : ℚ_[p]), this⟩ :=
         (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])
-      _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]
+      _ = -F.eval z := by simp only [mul_div_cancel₀ _ hdzne', Subtype.coe_eta]
 
   exact ⟨q, by simpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq⟩
 
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -36,7 +36,8 @@ p-adic, p adic, padic, p-adic integer
 
 noncomputable section
 
-open Classical Topology
+open scoped Classical
+open Topology
 
 -- We begin with some general lemmas that are used below in the computation.
 theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
chore: more backporting of simp changes from #10995 (#11001)

Co-authored-by: Patrick Massot <patrickmassot@free.fr> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -224,7 +224,7 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
   let z' : ℤ_[p] := z - z1
   ⟨z',
     have hdist : ‖F.derivative.eval z' - F.derivative.eval z‖ < ‖F.derivative.eval a‖ :=
-      calc_deriv_dist hnorm rfl (by simp [hz.1]) hz
+      calc_deriv_dist hnorm rfl (by simp [z1, hz.1]) hz
     have hfeq : ‖F.derivative.eval z'‖ = ‖F.derivative.eval a‖ := by
       rw [sub_eq_add_neg, ← hz.1, ← norm_neg (F.derivative.eval z)] at hdist
       have := PadicInt.norm_eq_of_norm_add_lt_right hdist
@@ -417,7 +417,7 @@ private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
   have : (F.derivative.eval soln + q * h) * h = 0 :=
     Eq.symm
       (calc
-        0 = F.eval (soln + h) := by simp [hev]
+        0 = F.eval (soln + h) := by simp [h, hev]
         _ = F.derivative.eval soln * h + q * h ^ 2 := by rw [hq, eval_soln, zero_add]
         _ = (F.derivative.eval soln + q * h) * h := by rw [sq, right_distrib, mul_assoc]
         )
chore: bump Std (#10482)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -321,7 +321,7 @@ private theorem newton_seq_dist_aux (n : ℕ) :
 
 private theorem newton_seq_dist {n k : ℕ} (hnk : n ≤ k) :
     ‖newton_seq k - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n := by
-  have hex : ∃ m, k = n + m := exists_eq_add_of_le hnk
+  have hex : ∃ m, k = n + m := Nat.exists_eq_add_of_le hnk
   let ⟨_, hex'⟩ := hex
   rw [hex']; apply newton_seq_dist_aux
 
chore(Analysis/SpecificLimits/* and others): rename _0 -> _zero, _1 -> _one (#10077)

See here on Zulip.

This PR changes a bunch of names containing nhds_0 or/and lt_1 to nhds_zero or/and lt_one.

Diff
@@ -347,7 +347,7 @@ private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^
   rw [← mul_zero ‖F.derivative.eval a‖]
   exact
     tendsto_const_nhds.mul
-      (Tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))
+      (Tendsto.comp (tendsto_pow_atTop_nhds_zero_of_lt_one (norm_nonneg _) (T_lt_one hnorm))
         (Nat.tendsto_pow_atTop_atTop_of_one_lt (by norm_num)))
 
 private theorem bound :
chore(Padics/Hensel): golf (#9932)

Motivated by @Ruben-VandeVelde's leanprover-community/mathlib#15206

Diff
@@ -351,15 +351,8 @@ private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^
         (Nat.tendsto_pow_atTop_atTop_of_one_lt (by norm_num)))
 
 private theorem bound :
-    ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε := by
-  have := bound' hnorm
-  simp? [Tendsto, nhds] at this says
-    simp only [Tendsto, nhds_def, Set.mem_setOf_eq, le_iInf_iff, le_principal_iff, mem_map,
-      mem_atTop_sets, ge_iff_le, Set.mem_preimage, and_imp] at this
-  intro ε hε
-  cases' this (ball 0 ε) (mem_ball_self hε) isOpen_ball with N hN
-  exists N; intro n hn
-  simpa [abs_of_nonneg T_nonneg] using hN _ hn
+    ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε := fun hε ↦
+  eventually_atTop.1 <| (bound' hnorm).eventually <| gt_mem_nhds hε
 
 private theorem bound'_sq :
     Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) atTop (𝓝 0) := by
@@ -370,15 +363,8 @@ private theorem bound'_sq :
   · apply bound'
     assumption
 
-private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq := by
-  intro ε hε
-  cases' bound hnorm hε with N hN
-  exists N
-  intro j hj
-  apply lt_of_le_of_lt
-  · apply newton_seq_dist hnorm hj
-  · apply hN
-    exact le_rfl
+private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq := fun _ε hε ↦
+  (bound hnorm hε).imp fun _N hN _j hj ↦ (newton_seq_dist hnorm hj).trans_lt <| hN le_rfl
 
 private def newton_cau_seq : CauSeq ℤ_[p] norm := ⟨_, newton_seq_is_cauchy hnorm⟩
 
@@ -412,11 +398,7 @@ private theorem soln_dist_to_a : ‖soln - a‖ = ‖F.eval a‖ / ‖F.derivati
   tendsto_nhds_unique (newton_seq_dist_tendsto' hnorm) (newton_seq_dist_tendsto hnorm hnsol)
 
 private theorem soln_dist_to_a_lt_deriv : ‖soln - a‖ < ‖F.derivative.eval a‖ := by
-  rw [soln_dist_to_a, div_lt_iff]
-  · rwa [sq] at hnorm
-  · apply deriv_norm_pos
-    assumption
-  · exact hnsol
+  rw [soln_dist_to_a, div_lt_iff (deriv_norm_pos _), ← sq] <;> assumption
 
 private theorem eval_soln : F.eval soln = 0 :=
   limit_zero_of_norm_tendsto_zero (newton_seq_norm_tendsto_zero hnorm)
chore: move to v4.5.0-rc1, and merge changes from bump/v4.5.0 branch. (#9188)

This PR:

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -354,7 +354,7 @@ private theorem bound :
     ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε := by
   have := bound' hnorm
   simp? [Tendsto, nhds] at this says
-    simp only [Tendsto, nhds_def, Set.mem_setOf_eq, not_and, le_iInf_iff, le_principal_iff, mem_map,
+    simp only [Tendsto, nhds_def, Set.mem_setOf_eq, le_iInf_iff, le_principal_iff, mem_map,
       mem_atTop_sets, ge_iff_le, Set.mem_preimage, and_imp] at this
   intro ε hε
   cases' this (ball 0 ε) (mem_ball_self hε) isOpen_ball with N hN
chore: Rename pow monotonicity lemmas (#9095)

The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

Renames

Algebra.GroupPower.Order

  • pow_monopow_right_mono
  • pow_le_powpow_le_pow_right
  • pow_le_pow_of_le_leftpow_le_pow_left
  • pow_lt_pow_of_lt_leftpow_lt_pow_left
  • strictMonoOn_powpow_left_strictMonoOn
  • pow_strictMono_rightpow_right_strictMono
  • pow_lt_powpow_lt_pow_right
  • pow_lt_pow_iffpow_lt_pow_iff_right
  • pow_le_pow_iffpow_le_pow_iff_right
  • self_lt_powlt_self_pow
  • strictAnti_powpow_right_strictAnti
  • pow_lt_pow_iff_of_lt_onepow_lt_pow_iff_right_of_lt_one
  • pow_lt_pow_of_lt_onepow_lt_pow_right_of_lt_one
  • lt_of_pow_lt_powlt_of_pow_lt_pow_left
  • le_of_pow_le_powle_of_pow_le_pow_left
  • pow_lt_pow₀pow_lt_pow_right₀

Algebra.GroupPower.CovariantClass

  • pow_le_pow_of_le_left'pow_le_pow_left'
  • nsmul_le_nsmul_of_le_rightnsmul_le_nsmul_right
  • pow_lt_pow'pow_lt_pow_right'
  • nsmul_lt_nsmulnsmul_lt_nsmul_left
  • pow_strictMono_leftpow_right_strictMono'
  • nsmul_strictMono_rightnsmul_left_strictMono
  • StrictMono.pow_right'StrictMono.pow_const
  • StrictMono.nsmul_leftStrictMono.const_nsmul
  • pow_strictMono_right'pow_left_strictMono
  • nsmul_strictMono_leftnsmul_right_strictMono
  • Monotone.pow_rightMonotone.pow_const
  • Monotone.nsmul_leftMonotone.const_nsmul
  • lt_of_pow_lt_pow'lt_of_pow_lt_pow_left'
  • lt_of_nsmul_lt_nsmullt_of_nsmul_lt_nsmul_right
  • pow_le_pow'pow_le_pow_right'
  • nsmul_le_nsmulnsmul_le_nsmul_left
  • pow_le_pow_of_le_one'pow_le_pow_right_of_le_one'
  • nsmul_le_nsmul_of_nonposnsmul_le_nsmul_left_of_nonpos
  • le_of_pow_le_pow'le_of_pow_le_pow_left'
  • le_of_nsmul_le_nsmul'le_of_nsmul_le_nsmul_right'
  • pow_le_pow_iff'pow_le_pow_iff_right'
  • nsmul_le_nsmul_iffnsmul_le_nsmul_iff_left
  • pow_lt_pow_iff'pow_lt_pow_iff_right'
  • nsmul_lt_nsmul_iffnsmul_lt_nsmul_iff_left

Data.Nat.Pow

  • Nat.pow_lt_pow_of_lt_leftNat.pow_lt_pow_left
  • Nat.pow_le_iff_le_leftNat.pow_le_pow_iff_left
  • Nat.pow_lt_iff_lt_leftNat.pow_lt_pow_iff_left

Lemmas added

  • pow_le_pow_iff_left
  • pow_lt_pow_iff_left
  • pow_right_injective
  • pow_right_inj
  • Nat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.
  • Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.

Lemmas removed

  • self_le_pow was a duplicate of le_self_pow.
  • Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.
  • Nat.pow_right_strictMono is defeq to pow_right_strictMono.
  • Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.
  • Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.

Other changes

  • A bunch of proofs have been golfed.
  • Some lemma assumptions have been turned from 0 < n or 1 ≤ n to n ≠ 0.
  • A few Nat lemmas have been protected.
  • One docstring has been fixed.
Diff
@@ -279,7 +279,7 @@ private theorem T_pos : T > 0 := by
 private theorem newton_seq_succ_dist_weak (n : ℕ) :
     ‖newton_seq (n + 2) - newton_seq (n + 1)‖ < ‖F.eval a‖ / ‖F.derivative.eval a‖ :=
   have : 2 ≤ 2 ^ (n + 1) := by
-    have := pow_le_pow (by norm_num : 1 ≤ 2) (Nat.le_add_left _ _ : 1 ≤ n + 1)
+    have := pow_le_pow_right (by norm_num : 1 ≤ 2) (Nat.le_add_left _ _ : 1 ≤ n + 1)
     simpa using this
   calc
     ‖newton_seq (n + 2) - newton_seq (n + 1)‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ (n + 1) :=
@@ -288,7 +288,7 @@ private theorem newton_seq_succ_dist_weak (n : ℕ) :
       (mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (norm_nonneg _)
         (le_of_lt (T_lt_one hnorm)) this) (norm_nonneg _))
     _ < ‖F.derivative.eval a‖ * T ^ 1 :=
-      (mul_lt_mul_of_pos_left (pow_lt_pow_of_lt_one (T_pos hnorm hnsol)
+      (mul_lt_mul_of_pos_left (pow_lt_pow_right_of_lt_one (T_pos hnorm hnsol)
         (T_lt_one hnorm) (by norm_num)) (deriv_norm_pos hnorm))
     _ = ‖F.eval a‖ / ‖F.derivative.eval a‖ := by
       rw [T_gen, sq, pow_one, norm_div, ← mul_div_assoc, PadicInt.padic_norm_e_of_padicInt,
@@ -301,7 +301,7 @@ private theorem newton_seq_dist_aux (n : ℕ) :
   | 0 => by simp [T_pow_nonneg, mul_nonneg]
   | k + 1 =>
     have : 2 ^ n ≤ 2 ^ (n + k) := by
-      apply pow_le_pow
+      apply pow_le_pow_right
       norm_num
       apply Nat.le_add_right
     calc
chore: Remove nonterminal simp at (#7795)

Removes nonterminal uses of simp at. Replaces most of these with instances of simp? ... says.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -353,7 +353,9 @@ private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^
 private theorem bound :
     ∀ {ε}, ε > 0 → ∃ N : ℕ, ∀ {n}, n ≥ N → ‖F.derivative.eval a‖ * T ^ 2 ^ n < ε := by
   have := bound' hnorm
-  simp [Tendsto, nhds] at this
+  simp? [Tendsto, nhds] at this says
+    simp only [Tendsto, nhds_def, Set.mem_setOf_eq, not_and, le_iInf_iff, le_principal_iff, mem_map,
+      mem_atTop_sets, ge_iff_le, Set.mem_preimage, and_imp] at this
   intro ε hε
   cases' this (ball 0 ε) (mem_ball_self hε) isOpen_ball with N hN
   exists N; intro n hn
fix(Analysis,Topology): fix names (#6938)

Rename:

  • tendsto_iff_norm_tendsto_onetendsto_iff_norm_div_tendsto_zero;
  • tendsto_iff_norm_tendsto_zerotendsto_iff_norm_sub_tendsto_zero;
  • tendsto_one_iff_norm_tendsto_onetendsto_one_iff_norm_tendsto_zero;
  • Filter.Tendsto.continuous_of_equicontinuous_atFilter.Tendsto.continuous_of_equicontinuousAt.
Diff
@@ -81,7 +81,7 @@ variable {p : ℕ} [Fact p.Prime] {ncs : CauSeq ℤ_[p] norm} {F : Polynomial 
   (hnorm : Tendsto (fun i => ‖F.eval (ncs i)‖) atTop (𝓝 0))
 
 private theorem tendsto_zero_of_norm_tendsto_zero : Tendsto (fun i => F.eval (ncs i)) atTop (𝓝 0) :=
-  tendsto_iff_norm_tendsto_zero.2 (by simpa using hnorm)
+  tendsto_iff_norm_sub_tendsto_zero.2 (by simpa using hnorm)
 
 theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.lim = 0 :=
   tendsto_nhds_unique (comp_tendsto_lim _) (tendsto_zero_of_norm_tendsto_zero hnorm)
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -344,7 +344,7 @@ private theorem newton_seq_dist_to_a :
         newton_seq_dist_to_a (k + 1) (succ_pos _)
 
 private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0) := by
-  rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖]
+  rw [← mul_zero ‖F.derivative.eval a‖]
   exact
     tendsto_const_nhds.mul
       (Tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))
@@ -361,7 +361,7 @@ private theorem bound :
 
 private theorem bound'_sq :
     Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) atTop (𝓝 0) := by
-  rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖, sq]
+  rw [← mul_zero ‖F.derivative.eval a‖, sq]
   simp only [mul_assoc]
   apply Tendsto.mul
   · apply tendsto_const_nhds
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Robert Y. Lewis
-
-! This file was ported from Lean 3 source module number_theory.padics.hensel
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecificLimits.Basic
 import Mathlib.Data.Polynomial.Identities
@@ -14,6 +9,8 @@ import Mathlib.NumberTheory.Padics.PadicIntegers
 import Mathlib.Topology.Algebra.Polynomial
 import Mathlib.Topology.MetricSpace.CauSeqFilter
 
+#align_import number_theory.padics.hensel from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 # Hensel's lemma on ℤ_p
 
feat: golf using gcongr throughout the library (#4784)

Following on from #4702, another hundred sample uses of the gcongr tactic.

Diff
@@ -47,7 +47,7 @@ theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p])
   let ⟨z, hz⟩ := F.evalSubFactor x y
   calc
     ‖F.eval x - F.eval y‖ = ‖z‖ * ‖x - y‖ := by simp [hz]
-    _ ≤ 1 * ‖x - y‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
+    _ ≤ 1 * ‖x - y‖ := by gcongr; apply PadicInt.norm_le_one
     _ = ‖x - y‖ := by simp
 
 #align padic_polynomial_dist padic_polynomial_dist
@@ -155,8 +155,9 @@ private theorem calc_norm_le_one {n : ℕ} {z : ℤ_[p]} (hz : ih n z) :
         ‖(↑(F.eval z) : ℚ_[p])‖ / ‖(↑(F.derivative.eval z) : ℚ_[p])‖ :=
       norm_div _ _
     _ = ‖F.eval z‖ / ‖F.derivative.eval a‖ := by simp [hz.1]
-    _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ :=
-      ((div_le_div_right (deriv_norm_pos hnorm)).2 hz.2)
+    _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ := by
+      gcongr
+      apply hz.2
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ ≤ 1 := mul_le_one (PadicInt.norm_le_one _) (T_pow_nonneg _) (le_of_lt (T_pow' hnorm _))
 
@@ -168,8 +169,9 @@ private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
     ‖F.derivative.eval z' - F.derivative.eval z‖ ≤ ‖z' - z‖ := padic_polynomial_dist _ _ _
     _ = ‖z1‖ := by simp only [sub_eq_add_neg, add_assoc, hz', add_add_neg_cancel'_right, norm_neg]
     _ = ‖F.eval z‖ / ‖F.derivative.eval a‖ := hz1
-    _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ :=
-      ((div_le_div_right (deriv_norm_pos hnorm)).2 hz.2)
+    _ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n / ‖F.derivative.eval a‖ := by
+      gcongr
+      apply hz.2
     _ = ‖F.derivative.eval a‖ * T ^ 2 ^ n := (div_sq_cancel _ _)
     _ < ‖F.derivative.eval a‖ := (mul_lt_iff_lt_one_right (deriv_norm_pos hnorm)).2
       (T_pow' hnorm _)
@@ -200,15 +202,14 @@ private def calc_eval_z' {z z' z1 : ℤ_[p]} (hz' : z' = z - z1) {n} (hz : ih n
 
 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) :=
+    ‖F.eval z'‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by
   calc
     ‖F.eval z'‖ = ‖q‖ * ‖z1‖ ^ 2 := by simp [heq]
-    _ ≤ 1 * ‖z1‖ ^ 2 :=
-      (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (pow_nonneg (norm_nonneg _) _))
+    _ ≤ 1 * ‖z1‖ ^ 2 := by gcongr; apply PadicInt.norm_le_one
     _ = ‖F.eval z‖ ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by simp [hzeq, hz.1, div_pow]
-    _ ≤ (‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 :=
-      ((div_le_div_right (deriv_sq_norm_pos hnorm)).2
-      (pow_le_pow_of_le_left (norm_nonneg _) hz.2 _))
+    _ ≤ (‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
+      gcongr
+      exact hz.2
     _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by
       simp only [mul_pow]
     _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)
@@ -233,7 +234,7 @@ private def ih_n {n : ℕ} {z : ℤ_[p]} (hz : ih n z) : { z' : ℤ_[p] // ih (n
       rwa [norm_neg, hz.1] at this
     let ⟨q, heq⟩ := calc_eval_z' hnorm rfl hz h1 rfl
     have hnle : ‖F.eval z'‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) :=
-      calc_eval_z'_norm hnorm hz heq h1 rfl
+      calc_eval_z'_norm hz heq h1 rfl
     ⟨hfeq, hnle⟩⟩
 
 -- Porting note: unsupported option eqn_compiler.zeta
@@ -478,7 +479,7 @@ private theorem a_soln_is_unique (ha : F.eval a = 0) (z' : ℤ_[p]) (hz' : F.eva
       lt_irrefl ‖F.derivative.eval a‖
         (calc
           ‖F.derivative.eval a‖ = ‖q‖ * ‖h‖ := by simp [this]
-          _ ≤ 1 * ‖h‖ := (mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _))
+          _ ≤ 1 * ‖h‖ := by gcongr; apply PadicInt.norm_le_one
           _ < ‖F.derivative.eval a‖ := by simpa
           )
   eq_of_sub_eq_zero (by rw [← this])
feat: port NumberTheory.Padics.Hensel (#4344)

This file makes heavy use of parameter and include that do not exist in Lean4 thus many arguments have to provided explicitly. In some cases where this would have been too heavy, I used local notation instead, see this Zulip thread.

Dependencies 10 + 701

702 files ported (98.6%)
307045 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file