diff --git a/LeanPool/ReadL1.lean b/LeanPool/ReadL1.lean new file mode 100644 index 0000000000..56c15c7307 --- /dev/null +++ b/LeanPool/ReadL1.lean @@ -0,0 +1,23 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Main + +/-! +# Read's invariant-subspace counterexample on complex ℓ¹ + +Source: doi:10.1216/RMJ-2010-40-2-627, url:https://github.com/zblore/fc-read-l1/tree/e8f632e26409119168b0b57c3e20ab0510c1a914 +Authors: Zayn Blore +Status: verified +Main declarations: `ReadL1.invariant_subspace_problem_l1`, `ReadL1.norm_readOp_le`, + `ReadL1.theorem7Hyp_dRead` +Tags: banach-spaces, operator-theory, invariant-subspaces +MSC: 47A15, 46B45 +-/ diff --git a/LeanPool/ReadL1/Basis.lean b/LeanPool/ReadL1/Basis.lean new file mode 100644 index 0000000000..d7f4e1423a --- /dev/null +++ b/LeanPool/ReadL1/Basis.lean @@ -0,0 +1,163 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Partition +public import Mathlib.Analysis.Complex.Norm +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.LinearAlgebra.Finsupp.LinearCombination +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Abel + +/-! +# Śliwa's basis and the operator on finite sequences + +Śliwa (p. 629) works in the polynomials `ℂ[x]` with the basis + +* `f₀ = 1`, +* `fᵢ = α^{((2r - 1)aₙ - 2i)/√(4aₙ)} xⁱ` on `Jₙ,ᵣ`, and the same with `bₙ` on `Lₙ,ᵣ`, +* `fᵢ = aₙ₋ᵣ (xⁱ - x^{i - aₙ})` on `Iₙ,ᵣ`, +* `fᵢ = xⁱ - bₙ x^{i - bₙ}` on `Kₙ,ᵣ`, + +puts `‖∑ cᵢ fᵢ‖ = ∑ |cᵢ|`, and lets `T` multiply by `x`. + +We work directly with coordinates in the basis `(fᵢ)`, as finitely supported sequences +`ℕ →₀ ℂ`, so `fᵢ` is the unit vector `δᵢ`. Solving each line above for `xⁱ` gives `xⁱ` in +coordinates by a recursion that only looks at smaller indices (`ReadL1.xPow`): + +* `x⁰ = δ₀`; `xⁱ = δᵢ / cᵢ` on `J` and `L` blocks (`cᵢ` the weight); +* `xⁱ = δᵢ / aₙ₋ᵣ + x^{i - aₙ}` on `Iₙ,ᵣ`; `xⁱ = δᵢ + bₙ x^{i - bₙ}` on `Kₙ,ᵣ`. + +Multiplying each `fᵢ` by `x` gives where the operator sends `δᵢ` (`ReadL1.shiftImage`), and the +operator on finite sequences is the linear extension (`ReadL1.T₀`). The point of the file is +`ReadL1.T₀_xPow`: the operator sends `xⁱ` to `xⁱ⁺¹`, i.e. it really is multiplication by `x`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-- Śliwa's constant `α`. He allows any `α ≥ 8` (p. 628, "Let α ≥ 8"); we fix `α = 8`. -/ +def alpha : ℝ := 8 + +lemma alpha_pos : 0 < alpha := by norm_num [alpha] + +/-- The weight `α^{((2r - 1)c - 2i)/√(4c)}` of `xⁱ` in `fᵢ`, on a `J` block (`c = aₙ`) or an `L` +block (`c = bₙ`). -/ +noncomputable def weight (c r i : ℕ) : ℝ := + alpha ^ (((2 * (r : ℝ) - 1) * c - 2 * i) / Real.sqrt (4 * c)) + +lemma weight_pos (c r i : ℕ) : 0 < weight c r i := Real.rpow_pos_of_pos alpha_pos _ + +lemma weight_ne_zero (c r i : ℕ) : (weight c r i : ℂ) ≠ 0 := by + exact_mod_cast (weight_pos c r i).ne' + +open Classical in +/-- The block containing `i` (an arbitrary block if there is none, which only happens at `0`). -/ +noncomputable def block (d : ℕ → ℕ) (i : ℕ) : Block := + if h : ∃ B : Block, B.Mem d i then h.choose else ⟨0, 0, .J⟩ + +lemma Block.one_le_of_mem (h : PartitionHyp d) {B : Block} {i : ℕ} (hB : B.Mem d i) : 1 ≤ i := by + have := (B.mem_level h hB).1; omega + +lemma block_mem (h : PartitionHyp d) {i : ℕ} (hi : 1 ≤ i) : (block d i).Mem d i := by + have hex := exists_block h hi + rw [block, dite_eq_left hex] + exact hex.choose_spec + +/-- Any block containing `i` is `block d i`. -/ +lemma block_eq (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) : block d i = B := + block_unique h (block_mem h (Block.one_le_of_mem h hB)) hB + +/-- **`xⁱ` in the coordinates of Śliwa's basis.** -/ +noncomputable def xPow (d : ℕ → ℕ) : ℕ → (ℕ →₀ ℂ) + | 0 => single 0 1 + | i + 1 => + match (block d (i + 1)).kind with + | .J => (weight (seqA d (block d (i + 1)).n) (block d (i + 1)).r (i + 1) : ℂ)⁻¹ • + single (i + 1) 1 + | .I => (seqA d ((block d (i + 1)).n - (block d (i + 1)).r) : ℂ)⁻¹ • single (i + 1) 1 + + if _h : seqA d (block d (i + 1)).n ≠ 0 then xPow d (i + 1 - seqA d (block d (i + 1)).n) + else 0 + | .L => (weight (seqB d (block d (i + 1)).n) (block d (i + 1)).r (i + 1) : ℂ)⁻¹ • + single (i + 1) 1 + | .K => single (i + 1) 1 + + if _h : seqB d (block d (i + 1)).n ≠ 0 then + (seqB d (block d (i + 1)).n : ℂ) • xPow d (i + 1 - seqB d (block d (i + 1)).n) + else 0 + termination_by i => i + decreasing_by all_goals omega + +/-- **Where the operator sends `δᵢ = fᵢ`**: the coordinates of `x fᵢ`. -/ +noncomputable def shiftImage (d : ℕ → ℕ) (i : ℕ) : ℕ →₀ ℂ := + if i = 0 then xPow d 1 else + match (block d i).kind with + | .J => (weight (seqA d (block d i).n) (block d i).r i : ℂ) • xPow d (i + 1) + | .I => (seqA d ((block d i).n - (block d i).r) : ℂ) • + (xPow d (i + 1) - xPow d (i + 1 - seqA d (block d i).n)) + | .L => (weight (seqB d (block d i).n) (block d i).r i : ℂ) • xPow d (i + 1) + | .K => xPow d (i + 1) - (seqB d (block d i).n : ℂ) • xPow d (i + 1 - seqB d (block d i).n) + +/-- The operator on finitely supported sequences: the linear extension of `δᵢ ↦ shiftImage i`. -/ +noncomputable def T₀ (d : ℕ → ℕ) : (ℕ →₀ ℂ) →ₗ[ℂ] (ℕ →₀ ℂ) := + linearCombination ℂ (shiftImage d) + +lemma T₀_single (i : ℕ) (c : ℂ) : T₀ d (single i c) = c • shiftImage d i := by + simp [T₀] + +/-- **The operator multiplies by `x`: it sends `xⁱ` to `xⁱ⁺¹`.** Each case undoes the recursion +defining `xⁱ`, using the claim for the smaller power it refers to. -/ +theorem T₀_xPow (h : PartitionHyp d) (i : ℕ) : T₀ d (xPow d i) = xPow d (i + 1) := by + induction i using Nat.strong_induction_on with + | _ i ih => + rcases i with _ | i + · simp [xPow, T₀_single, shiftImage] + · have hB := block_mem h (i := i + 1) (by omega) + obtain ⟨hr1, hrn, hk⟩ := hB + have ha := h.one_le_a (block d (i + 1)).n + have hb : 0 < seqB d (block d (i + 1)).n := + lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b _) + rw [xPow] + rcases hkind : (block d (i + 1)).kind with _ | _ | _ | _ <;> + simp only [hkind] at hk ⊢ + · -- `J`: `xⁱ = δᵢ / cᵢ` and `δᵢ ↦ cᵢ xⁱ⁺¹`. + rw [map_smul, T₀_single] + simp only [shiftImage, Nat.add_one_ne_zero, ite_false, hkind] + rw [one_smul, smul_smul, inv_mul_cancel₀ (weight_ne_zero _ _ _), one_smul] + · -- `I`: `xⁱ = δᵢ / aₙ₋ᵣ + x^{i - aₙ}` and `δᵢ ↦ aₙ₋ᵣ (xⁱ⁺¹ - x^{i + 1 - aₙ})`. + have ha' : (seqA d ((block d (i + 1)).n - (block d (i + 1)).r) : ℂ) ≠ 0 := by + exact Nat.cast_ne_zero.2 (Nat.one_le_iff_ne_zero.1 (h.one_le_a _)) + have hle : seqA d (block d (i + 1)).n ≤ i + 1 := by + have := Nat.le_mul_of_pos_left (seqA d (block d (i + 1)).n) hr1; omega + rw [dite_eq_left (by omega), map_add, map_smul, T₀_single, ih _ (by omega)] + simp only [shiftImage, Nat.add_one_ne_zero, ite_false, hkind] + rw [one_smul, smul_smul, inv_mul_cancel₀ ha', one_smul] + rw [show i + 1 - seqA d (block d (i + 1)).n + 1 = i + 1 + 1 - seqA d (block d (i + 1)).n + by omega] + abel + · -- `L`: as for `J`, with `bₙ`. + rw [map_smul, T₀_single] + simp only [shiftImage, Nat.add_one_ne_zero, ite_false, hkind] + rw [one_smul, smul_smul, inv_mul_cancel₀ (weight_ne_zero _ _ _), one_smul] + · -- `K`: `xⁱ = δᵢ + bₙ x^{i - bₙ}` and `δᵢ ↦ xⁱ⁺¹ - bₙ x^{i + 1 - bₙ}`. + have hle : seqB d (block d (i + 1)).n ≤ i + 1 := by + have := Nat.le_mul_of_pos_left (seqA d (block d (i + 1)).n + seqB d (block d (i + 1)).n) + hr1 + omega + rw [dite_eq_left (by omega), map_add, map_smul, T₀_single, one_smul, ih _ (by omega)] + simp only [shiftImage, Nat.add_one_ne_zero, ite_false, hkind] + rw [show i + 1 - seqB d (block d (i + 1)).n + 1 = i + 1 + 1 - seqB d (block d (i + 1)).n + by omega] + abel + +end ReadL1 diff --git a/LeanPool/ReadL1/Coord.lean b/LeanPool/ReadL1/Coord.lean new file mode 100644 index 0000000000..8126bd6924 --- /dev/null +++ b/LeanPool/ReadL1/Coord.lean @@ -0,0 +1,232 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Poly +public import LeanPool.ReadL1.Projection +import Mathlib.Algebra.Polynomial.BigOperators + +/-! +# From coordinates back to polynomials + +Śliwa's basis polynomials `fᵢ` (`ReadL1.fPoly`) give the inverse of `ReadL1.toCoord`: a +finitely supported sequence `g` goes to `∑ gᵢ fᵢ` (`ReadL1.fromCoord`), with +`toCoord (fromCoord g) = g` (`ReadL1.toCoord_fromCoord`) and `fromCoord (xⁱ) = xⁱ` +(`ReadL1.fromCoord_xPow`). + +Two support facts about the coordinates of `xⁱ`, used in Lemma 5: + +* they vanish above `i` (`ReadL1.xPow_apply_eq_zero`), so `Fₙ` is spanned by `f₀, …, fₙ`; +* for `vₙ₋₁ < j ≤ (n - 1)aₙ` they vanish on `(vₙ₋₂, vₙ₋₁]` (`ReadL1.xPow_apply_gap`): the + recursion on an `I` block steps down by `aₙ` and jumps from `Iₙ,₁` straight below `vₙ₋₂`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/- ### The basis polynomials -/ + +/-- Śliwa's basis polynomial `fᵢ`. -/ +noncomputable def fPoly (d : ℕ → ℕ) (i : ℕ) : ℂ[X] := + if i = 0 then 1 else + match (block d i).kind with + | .J => C (weight (seqA d (block d i).n) (block d i).r i : ℂ) * X ^ i + | .I => C (seqA d ((block d i).n - (block d i).r) : ℂ) * + (X ^ i - X ^ (i - seqA d (block d i).n)) + | .L => C (weight (seqB d (block d i).n) (block d i).r i : ℂ) * X ^ i + | .K => X ^ i - C (seqB d (block d i).n : ℂ) * X ^ (i - seqB d (block d i).n) + +lemma fPoly_zero : fPoly d 0 = 1 := by simp [fPoly] + +lemma fPoly_of_J (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .J) : + fPoly d i = C (weight (seqA d B.n) B.r i : ℂ) * X ^ i := by + have hi := Block.one_le_of_mem h hB + rw [fPoly, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma fPoly_of_I (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .I) : + fPoly d i = C (seqA d (B.n - B.r) : ℂ) * (X ^ i - X ^ (i - seqA d B.n)) := by + have hi := Block.one_le_of_mem h hB + rw [fPoly, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma fPoly_of_L (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .L) : + fPoly d i = C (weight (seqB d B.n) B.r i : ℂ) * X ^ i := by + have hi := Block.one_le_of_mem h hB + rw [fPoly, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma fPoly_of_K (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .K) : + fPoly d i = X ^ i - C (seqB d B.n : ℂ) * X ^ (i - seqB d B.n) := by + have hi := Block.one_le_of_mem h hB + rw [fPoly, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma toCoord_C_mul (c : ℂ) (p : ℂ[X]) : toCoord d (C c * p) = c • toCoord d p := by + rw [← smul_eq_C_mul, map_smul] + +/-- **The coordinates of `fᵢ` are `δᵢ`.** -/ +lemma toCoord_fPoly (h : PartitionHyp d) (i : ℕ) : toCoord d (fPoly d i) = single i 1 := by + rcases Nat.eq_zero_or_pos i with rfl | hi + · rw [fPoly_zero, ← pow_zero X, toCoord_X_pow]; simp [xPow] + have hB := block_mem h hi + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB + cases k with + | J => rw [fPoly_of_J h hB rfl, toCoord_C_mul, toCoord_X_pow, ← single_eq_of_J h hB rfl] + | I => rw [fPoly_of_I h hB rfl, toCoord_C_mul, map_sub, toCoord_X_pow, toCoord_X_pow, + ← single_eq_of_I h hB rfl] + | L => rw [fPoly_of_L h hB rfl, toCoord_C_mul, toCoord_X_pow, ← single_eq_of_L h hB rfl] + | K => rw [fPoly_of_K h hB rfl, map_sub, toCoord_C_mul, toCoord_X_pow, toCoord_X_pow, + ← single_eq_of_K h hB rfl] + +lemma natDegree_fPoly_le (h : PartitionHyp d) (i : ℕ) : (fPoly d i).natDegree ≤ i := by + rcases Nat.eq_zero_or_pos i with rfl | hi + · rw [fPoly_zero, natDegree_one] + have hB := block_mem h hi + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB + have hXs : ∀ j, (X ^ i - X ^ (i - j) : ℂ[X]).natDegree ≤ i := fun j ↦ + (natDegree_sub_le _ _).trans (max_le (natDegree_X_pow_le _) + ((natDegree_X_pow_le _).trans (Nat.sub_le _ _))) + cases k with + | J => rw [fPoly_of_J h hB rfl]; exact natDegree_C_mul_X_pow_le _ _ + | I => rw [fPoly_of_I h hB rfl]; exact (natDegree_C_mul_le _ _).trans (hXs _) + | L => rw [fPoly_of_L h hB rfl]; exact natDegree_C_mul_X_pow_le _ _ + | K => + rw [fPoly_of_K h hB rfl] + exact (natDegree_sub_le _ _).trans (max_le (natDegree_X_pow_le _) + ((natDegree_C_mul_X_pow_le _ _).trans (Nat.sub_le _ _))) + +/- ### The inverse map -/ + +/-- A finitely supported sequence of coordinates, as a polynomial: `g ↦ ∑ gᵢ fᵢ`. -/ +noncomputable def fromCoord (d : ℕ → ℕ) : (ℕ →₀ ℂ) →ₗ[ℂ] ℂ[X] := linearCombination ℂ (fPoly d) + +lemma fromCoord_single (i : ℕ) (c : ℂ) : fromCoord d (single i c) = c • fPoly d i := by + simp [fromCoord] + +lemma toCoord_fromCoord (h : PartitionHyp d) (g : ℕ →₀ ℂ) : toCoord d (fromCoord d g) = g := by + induction g using Finsupp.induction_linear with + | zero => simp + | add g k hg hk => rw [map_add, map_add, hg, hk] + | single i c => rw [fromCoord_single, map_smul, toCoord_fPoly h, smul_single, smul_eq_mul, + mul_one] + +/-- `xⁱ`, written in coordinates and read back, is `xⁱ`. -/ +lemma fromCoord_xPow (h : PartitionHyp d) (i : ℕ) : fromCoord d (xPow d i) = X ^ i := by + induction i using Nat.strong_induction_on with + | _ i ih => + rcases Nat.eq_zero_or_pos i with rfl | hi + · simp [xPow, fromCoord_single, fPoly_zero] + have hB := block_mem h hi + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB + have ha : 1 ≤ seqA d n := h.one_le_a n + have hb : 0 < seqB d n := lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b n) + cases k with + | J => + rw [xPow_of_J h hB rfl, map_smul, fromCoord_single, one_smul, fPoly_of_J h hB rfl, + smul_eq_C_mul, ← mul_assoc, ← C_mul, inv_mul_cancel₀ (weight_ne_zero _ _ _), C_1, one_mul] + | I => + have ha' : (seqA d (n - r) : ℂ) ≠ 0 := + Nat.cast_ne_zero.2 (Nat.one_le_iff_ne_zero.1 (h.one_le_a _)) + rw [xPow_of_I h hB rfl, map_add, map_smul, fromCoord_single, one_smul, fPoly_of_I h hB rfl, + ih (i - seqA d n) (by omega), smul_eq_C_mul, ← mul_assoc, ← C_mul, inv_mul_cancel₀ ha', C_1, + one_mul, + sub_add_cancel] + | L => + rw [xPow_of_L h hB rfl, map_smul, fromCoord_single, one_smul, fPoly_of_L h hB rfl, + smul_eq_C_mul, ← mul_assoc, ← C_mul, inv_mul_cancel₀ (weight_ne_zero _ _ _), C_1, one_mul] + | K => + rw [xPow_of_K h hB rfl, map_add, map_smul, fromCoord_single, one_smul, fPoly_of_K h hB rfl, + ih (i - seqB d n) (by omega), smul_eq_C_mul, sub_add_cancel] + +lemma natDegree_fromCoord_le (h : PartitionHyp d) {g : ℕ →₀ ℂ} {N : ℕ} + (hg : ∀ j ∈ g.support, j ≤ N) : (fromCoord d g).natDegree ≤ N := by + rw [fromCoord, linearCombination_apply, Finsupp.sum] + exact natDegree_sum_le_of_forall_le _ _ fun j hj ↦ + (natDegree_smul_le _ _).trans ((natDegree_fPoly_le h j).trans (hg j hj)) + +/- ### Where the coordinates of `xⁱ` vanish -/ + +/-- **The coordinates of `xⁱ` vanish above `i`.** -/ +lemma xPow_apply_eq_zero (h : PartitionHyp d) {i j : ℕ} (hij : i < j) : xPow d i j = 0 := by + induction i using Nat.strong_induction_on generalizing j with + | _ i ih => + rcases Nat.eq_zero_or_pos i with rfl | hi + · simp [xPow, show (0 : ℕ) ≠ j by omega] + have hB := block_mem h hi + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB + have ha : 1 ≤ seqA d n := h.one_le_a n + have hb : 0 < seqB d n := lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b n) + cases k with + | J => simp [xPow_of_J h hB rfl, show i ≠ j by omega] + | I => + rw [xPow_of_I h hB rfl] + simp [show i ≠ j by omega, ih _ (show i - seqA d n < i by omega) + (show i - seqA d n < j by omega)] + | L => simp [xPow_of_L h hB rfl, show i ≠ j by omega] + | K => + rw [xPow_of_K h hB rfl] + simp [show i ≠ j by omega, ih _ (show i - seqB d n < i by omega) + (show i - seqB d n < j by omega)] + +/-- **The gap**: for `vₙ₋₁ < j ≤ (n - 1)aₙ`, the coordinates of `xʲ` vanish on `(vₙ₋₂, vₙ₋₁]`. -/ +lemma xPow_apply_gap (h : PartitionHyp d) {n : ℕ} (hn : 2 ≤ n) {i : ℕ} + (hi1 : seqV d (n - 2) < i) (hi2 : i ≤ seqV d (n - 1)) : + ∀ j, seqV d (n - 1) < j → j ≤ (n - 1) * seqA d n → xPow d j i = 0 := by + intro j + induction j using Nat.strong_induction_on with + | _ j ih => + intro hj1 hj2 + have hvn : (n - 1) * seqA d n ≤ seqV d n := by + unfold seqV; exact Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + have hlev := block_level h (m := n - 1) (i := j) (by omega) hj1 + (by rw [show n - 1 + 1 = n by omega]; omega) + have hB := block_mem h (i := j) (by omega) + rcases hbl : block d j with ⟨n', r, k⟩ + rw [hbl] at hB hlev + dsimp only at hlev + rw [show n' = n by omega] at hB + have ha : 1 ≤ seqA d n := h.one_le_a n + have hab := h.a_lt_b n + have hn1 : (n - 1) * seqA d n = (n - 2) * seqA d n + seqA d n := by + rw [show n - 1 = n - 2 + 1 by omega, add_one_mul] + cases k with + | J => simp [xPow_of_J h hB rfl, show j ≠ i by omega] + | I => + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + rw [xPow_of_I h hB rfl] + simp only [Finsupp.add_apply, Finsupp.smul_apply, Finsupp.single_apply, + ite_eq_right (show ¬ j = i by omega), smul_zero, zero_add] + obtain ⟨r', rfl⟩ : ∃ r', r = r' + 1 := ⟨r - 1, by omega⟩ + have hr' : (r' + 1) * seqA d n = r' * seqA d n + seqA d n := add_one_mul _ _ + rcases Nat.eq_zero_or_pos r' with rfl | hr'0 + · -- `j ∈ Iₙ,₁`: `j - aₙ ≤ vₙ₋₂ < i`. + rw [show n - (0 + 1) - 1 = n - 2 by omega] at hhi + exact xPow_apply_eq_zero h (by omega) + · -- `j ∈ Iₙ,ᵣ` with `r ≥ 2`: `j - aₙ` is still in `(vₙ₋₁, (n - 1)aₙ]`. + have hva := h.v_lt_a n (n - 1) (by omega) + have hle : seqA d n ≤ r' * seqA d n := Nat.le_mul_of_pos_left _ hr'0 + exact ih _ (by omega) (by omega) (by omega) + | L => + obtain ⟨-, -, hlo, -⟩ := hB + dsimp only at hlo + omega + | K => + obtain ⟨hr1, -, hlo, -⟩ := hB + dsimp only at hr1 hlo + have : seqA d n + seqB d n ≤ r * (seqA d n + seqB d n) := Nat.le_mul_of_pos_left _ hr1 + omega + +end ReadL1 diff --git a/LeanPool/ReadL1/Cyclic.lean b/LeanPool/ReadL1/Cyclic.lean new file mode 100644 index 0000000000..570304b862 --- /dev/null +++ b/LeanPool/ReadL1/Cyclic.lean @@ -0,0 +1,71 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Defs + +/-! +# From cyclic vectors to no invariant subspace + +A closed subspace `W` that `T` maps into itself, and that contains a vector `x`, contains every +`Tⁿ x`, hence their span, hence (being closed) the closure of that span. So if some vector `x₀` +has a dense orbit span, and `x₀` lies in the closed orbit span of every nonzero vector, then any +nonzero closed invariant subspace contains `x₀` and therefore everything: there is no nontrivial +one. + +This is the last step of Read's argument as Śliwa writes it (W. Śliwa, Rocky Mountain J. Math. 40 +(2010), proof of Theorem 7, p. 640), and Noel's Corollary 2.2.7 (J. A. Noel, *The Invariant +Subspace Problem*, BSc thesis, Thompson Rivers University, 2011). +-/ + +@[expose] public section + +namespace ReadL1 + +open InvariantSubspaceProblem + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + +/-- The span of the orbit `x, T x, T² x, …`. -/ +def orbitSpan (T : E →L[ℂ] E) (x : E) : Submodule ℂ E := + Submodule.span ℂ (Set.range fun n : ℕ ↦ (T ^ n) x) + +/-- A subspace that `T` maps into itself contains `Tⁿ x` whenever it contains `x`. -/ +lemma pow_apply_mem {T : E →L[ℂ] E} {W : Submodule ℂ E} (hW : W.map T.toLinearMap ≤ W) + {x : E} (hx : x ∈ W) (n : ℕ) : (T ^ n) x ∈ W := by + induction n with + | zero => simpa using hx + | succ n ih => + rw [pow_succ', mul_apply_eq_comp] + exact hW ⟨_, ih, rfl⟩ + +/-- A closed invariant subspace containing `x` contains the closure of its orbit span. -/ +lemma topologicalClosure_orbitSpan_le {T : E →L[ℂ] E} {W : Submodule ℂ E} + (hW : W.map T.toLinearMap ≤ W) (hWc : IsClosed (W : Set E)) {x : E} (hx : x ∈ W) : + (orbitSpan T x).topologicalClosure ≤ W := + Submodule.topologicalClosure_minimal _ + (Submodule.span_le.2 (Set.range_subset_iff.2 fun n ↦ pow_apply_mem hW hx n)) hWc + +/-- **No invariant subspace from one universally reachable cyclic vector.** If `x₀` has a dense +orbit span, and lies in the closed orbit span of every nonzero vector, then `T` has no nontrivial +closed invariant subspace. -/ +theorem isEmpty_closedInvariantSubspace_of_cyclic (T : E →L[ℂ] E) (x₀ : E) + (hdense : (orbitSpan T x₀).topologicalClosure = ⊤) + (hreach : ∀ x : E, x ≠ 0 → x₀ ∈ (orbitSpan T x).topologicalClosure) : + IsEmpty (ClosedInvariantSubspace T) := by + refine ⟨fun W ↦ W.ne_top ?_⟩ + -- `W` contains a nonzero vector `x`. + obtain ⟨x, hxW, hx0⟩ := (Submodule.ne_bot_iff _).1 W.ne_bot + -- So it contains the closed orbit span of `x`, hence `x₀`, hence the closed orbit span of + -- `x₀`, which is everything. + have hx₀ : x₀ ∈ W.toSubspace := + topologicalClosure_orbitSpan_le W.is_fixed W.is_closed hxW (hreach x hx0) + exact eq_top_iff.2 (hdense ▸ topologicalClosure_orbitSpan_le W.is_fixed W.is_closed hx₀) + +end ReadL1 diff --git a/LeanPool/ReadL1/Defs.lean b/LeanPool/ReadL1/Defs.lean new file mode 100644 index 0000000000..ae3503320d --- /dev/null +++ b/LeanPool/ReadL1/Defs.lean @@ -0,0 +1,38 @@ +/- +Copyright (c) 2025 The Formal Conjectures Authors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: The Formal Conjectures Authors +-/ + +-- Modified for Lean Pool. + +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Normed.Operator.ContinuousLinearMap + +/-! +# Formal Conjectures' closed invariant subspaces + +Formal Conjectures' structure `ClosedInvariantSubspace`, copied verbatim from +`FormalConjectures/Wikipedia/InvariantSubspaceProblem.lean` at commit +`40a8592cb6f7e96cb9a8275d96bb3e013feeb1dc`. The imports and file header were adapted for Lean Pool. +-/ + +@[expose] public section + +namespace InvariantSubspaceProblem + +variable {H : Type*} [NormedAddCommGroup H] + +/-- `ClosedInvariantSubspace T` is the type of non-trivial (different from `H` and `{0}`) closed +subspaces of a complex vector space `H` that are invariant under the action of linear map `T`. -/ +structure ClosedInvariantSubspace [Module ℂ H] (T : H →L[ℂ] H) where + /-- The closed, nontrivial subspace carried by this witness. -/ + toSubspace : Submodule ℂ H + ne_bot : toSubspace ≠ ⊥ + ne_top : toSubspace ≠ ⊤ + is_closed : IsClosed (toSubspace : Set H) + is_fixed : toSubspace.map T.toLinearMap ≤ toSubspace + +end InvariantSubspaceProblem diff --git a/LeanPool/ReadL1/Explicit.lean b/LeanPool/ReadL1/Explicit.lean new file mode 100644 index 0000000000..e421381a2c --- /dev/null +++ b/LeanPool/ReadL1/Explicit.lean @@ -0,0 +1,424 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Theorem7 +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.GCongr + +/-! +# An explicit sequence satisfying every growth fact + +Śliwa takes `d₀ = 2`, `d₁ ≥ α⁴` and `dₙ₊₁ ≥ α^{(n dₙ)!}`. We take every `dⱼ` (`j ≥ 1`) to be a +power `8^{2s}`, so that `√dⱼ = 8ˢ` exactly and every growth fact becomes an inequality between +natural-number exponents. With `aₙ = 8^{2xₙ₋₁}` and `bₙ = 8^{2yₙ₋₁}` (`ReadL1.xs`, `ReadL1.ys`): + +* `x₀ = 2`, so `a₁ = 8⁴ = α⁴`; +* `yᵢ ≥ (2xᵢ + 8^{xᵢ}) (1 + (2(i + 1) 8^{2xᵢ})!) + 8^{2xᵢ} + 4xᵢ + i + 5`, which carries + Theorem 7's `α aₘ Aₘ Rₘ < bₘ`; +* `xᵢ₊₁ = 8^{2yᵢ} + 2yᵢ + i + 4`, which carries `aₘ₊₁ ≥ α^{2bₘ}`. + +`ReadL1.theorem7Hyp_dRead` proves `Theorem7Hyp` for this sequence. +-/ + +@[expose] public section + +namespace ReadL1 + +/- ### Natural-number inequalities -/ + +lemma sixteen_mul_add_lt_pow {x : ℕ} (hx : 2 ≤ x) : 16 * x + 4 < 8 ^ x := by + induction x, hx using Nat.le_induction with + | base => norm_num + | succ x _ ih => rw [pow_succ]; omega + +lemma thirtytwo_sq_lt_pow {y : ℕ} (hy : 4 ≤ y) : 32 * y ^ 2 < 8 ^ y := by + induction y, hy using Nat.le_induction with + | base => norm_num + | succ y hy ih => + have h1 : 4 * y ≤ y * y := Nat.mul_le_mul_right y hy + rw [pow_succ 8 y]; nlinarith + +lemma lt_eight_pow (n : ℕ) : n < 8 ^ n := Nat.lt_pow_self (by norm_num) + +lemma le_eight_pow_two_mul (x : ℕ) : 8 ^ x ≤ 8 ^ (2 * x) := + Nat.pow_le_pow_right (by norm_num) (by omega) + +/- ### The sequence -/ + +/-- `yᵢ` as a function of `i` and `xᵢ`. -/ +def yOf (i x : ℕ) : ℕ := + (2 * x + 8 ^ x) * (1 + (2 * (i + 1) * 8 ^ (2 * x)).factorial) + 8 ^ (2 * x) + 4 * x + i + 5 + +/-- `xᵢ`, with `aᵢ₊₁ = 8^{2xᵢ}`. -/ +def xs : ℕ → ℕ + | 0 => 2 + | i + 1 => 8 ^ (2 * yOf i (xs i)) + 2 * yOf i (xs i) + i + 4 + +/-- `yᵢ`, with `bᵢ₊₁ = 8^{2yᵢ}`. -/ +def ys (i : ℕ) : ℕ := yOf i (xs i) + +/-- **The explicit sequence**: `d₀ = 2`, `d₂ᵢ₊₁ = 8^{2xᵢ}`, `d₂ᵢ₊₂ = 8^{2yᵢ}`. -/ +def dRead (j : ℕ) : ℕ := + if j = 0 then 2 else if j % 2 = 1 then 8 ^ (2 * xs (j / 2)) else 8 ^ (2 * ys (j / 2 - 1)) + +lemma seqA_dRead {n : ℕ} (hn : 1 ≤ n) : seqA dRead n = 8 ^ (2 * xs (n - 1)) := by + unfold seqA dRead + rw [ite_eq_right (by omega), ite_eq_left (by omega), show (2 * n - 1) / 2 = n - 1 by omega] + +lemma seqB_dRead {n : ℕ} (hn : 1 ≤ n) : seqB dRead n = 8 ^ (2 * ys (n - 1)) := by + unfold seqB dRead + rw [ite_eq_right (by omega), ite_eq_right (by omega), show 2 * n / 2 - 1 = n - 1 by omega] + +lemma seqA_dRead_zero : seqA dRead 0 = 2 := by simp [seqA, dRead] + +lemma seqB_dRead_zero : seqB dRead 0 = 2 := by simp [seqB, dRead] + +lemma two_le_xs (i : ℕ) : 2 ≤ xs i := by + rcases i with _ | i + · simp [xs] + · simp only [xs]; have := lt_eight_pow (2 * yOf i (xs i)); omega + +lemma ys_ge (i : ℕ) : 8 ^ (2 * xs i) + 4 * xs i + i + 5 ≤ ys i := by + unfold ys yOf + generalize (2 * xs i + 8 ^ xs i) * (1 + (2 * (i + 1) * 8 ^ (2 * xs i)).factorial) = P + generalize 8 ^ (2 * xs i) = Q + omega + +lemma ys_ge_r (i : ℕ) : + (2 * xs i + 8 ^ xs i) * (1 + (2 * (i + 1) * 8 ^ (2 * xs i)).factorial) + 1 ≤ ys i := by + unfold ys yOf + generalize (2 * xs i + 8 ^ xs i) * (1 + (2 * (i + 1) * 8 ^ (2 * xs i)).factorial) = P + generalize 8 ^ (2 * xs i) = Q + omega + +lemma xs_succ (i : ℕ) : xs (i + 1) = 8 ^ (2 * ys i) + 2 * ys i + i + 4 := rfl + +lemma xs_lt_ys (i : ℕ) : xs i < ys i := by + have := ys_ge i; have := lt_eight_pow (2 * xs i); omega + +lemma xs_lt_succ (i : ℕ) : xs i < xs (i + 1) := by + have := xs_lt_ys i; have := lt_eight_pow (2 * ys i); rw [xs_succ]; omega + +lemma xs_mono {i j : ℕ} (hij : i ≤ j) : xs i ≤ xs j := + (strictMono_nat_of_lt_succ xs_lt_succ).monotone hij + +lemma eight_pow_le_ys (i : ℕ) : 8 ^ xs i ≤ ys i := + (le_eight_pow_two_mul _).trans (by have := ys_ge i; omega) + +/- ### Real powers of `8` -/ + +lemma sqrt_eight_pow (x : ℕ) : Real.sqrt (((8 ^ (2 * x) : ℕ)) : ℝ) = (8 : ℝ) ^ x := by + rw [Nat.cast_pow, Nat.cast_ofNat, mul_comm, pow_mul, Real.sqrt_sq (by positivity)] + +lemma alpha_rpow_natCast (N : ℕ) : alpha ^ (N : ℝ) = (8 : ℝ) ^ N := by + rw [alpha, Real.rpow_natCast] + +lemma alpha_rpow_eight_pow (x : ℕ) : alpha ^ ((8 : ℝ) ^ x) = (8 : ℝ) ^ (8 ^ x) := by + have : ((8 : ℝ) ^ x) = ((8 ^ x : ℕ) : ℝ) := by push_cast; rfl + rw [this, alpha_rpow_natCast] + +lemma eight_pow_lt_alpha_rpow {N : ℕ} {r : ℝ} (h : (N : ℝ) < r) : (8 : ℝ) ^ N < alpha ^ r := by + rw [← alpha_rpow_natCast] + exact Real.rpow_lt_rpow_of_exponent_lt (by norm_num [alpha]) h + +lemma eight_pow_le_alpha_rpow {N : ℕ} {r : ℝ} (h : (N : ℝ) ≤ r) : (8 : ℝ) ^ N ≤ alpha ^ r := by + rw [← alpha_rpow_natCast] + exact alpha_rpow_le h + +lemma capA_dRead {n : ℕ} (hn : 1 ≤ n) : capA dRead n = (8 : ℝ) ^ (8 ^ xs (n - 1)) := by + rw [capA, seqA_dRead hn, sqrt_eight_pow, alpha_rpow_eight_pow] + +lemma eight_pow_mono {M N : ℕ} (h : M ≤ N) : (8 : ℝ) ^ M ≤ (8 : ℝ) ^ N := + pow_le_pow_right₀ (by norm_num) h + +lemma eight_pow_strictMono {M N : ℕ} (h : M < N) : (8 : ℝ) ^ M < (8 : ℝ) ^ N := + pow_lt_pow_right₀ (by norm_num) h + +/- ### The growth facts -/ + +lemma dRead_a_small {n : ℕ} (hn : 1 ≤ n) : 8 * n * seqA dRead n < seqB dRead n := by + rw [seqA_dRead hn, seqB_dRead hn] + have hy := ys_ge (n - 1) + have := lt_eight_pow (2 * xs (n - 1)) + have h1 : 8 * n < 8 ^ (n + 2) := by + have := lt_eight_pow (n + 1); rw [pow_succ]; omega + calc 8 * n * 8 ^ (2 * xs (n - 1)) < 8 ^ (n + 2) * 8 ^ (2 * xs (n - 1)) := + Nat.mul_lt_mul_of_pos_right h1 (by positivity) + _ = 8 ^ (n + 2 + 2 * xs (n - 1)) := by rw [← pow_add] + _ ≤ 8 ^ (2 * ys (n - 1)) := Nat.pow_le_pow_right (by norm_num) (by omega) + +lemma dRead_b_small {n : ℕ} (hn : 1 ≤ n) : 8 * n * seqB dRead n < seqA dRead (n + 1) := by + rw [seqB_dRead hn, seqA_dRead (by omega), Nat.add_sub_cancel] + have hx : 8 ^ (2 * ys (n - 1)) + 2 * ys (n - 1) + (n - 1) + 4 ≤ xs n := by + rw [show n = n - 1 + 1 by omega, xs_succ, Nat.add_sub_cancel] + have := lt_eight_pow (2 * ys (n - 1)) + have h1 : 8 * n < 8 ^ (n + 2) := by + have := lt_eight_pow (n + 1); rw [pow_succ]; omega + calc 8 * n * 8 ^ (2 * ys (n - 1)) < 8 ^ (n + 2) * 8 ^ (2 * ys (n - 1)) := + Nat.mul_lt_mul_of_pos_right h1 (by positivity) + _ = 8 ^ (n + 2 + 2 * ys (n - 1)) := by rw [← pow_add] + _ ≤ 8 ^ (2 * xs n) := Nat.pow_le_pow_right (by norm_num) (by omega) + +lemma dRead_one_le_a (n : ℕ) : 1 ≤ seqA dRead n := by + rcases Nat.eq_zero_or_pos n with rfl | hn + · rw [seqA_dRead_zero]; norm_num + · rw [seqA_dRead hn]; exact Nat.one_le_pow _ _ (by norm_num) + +lemma dRead_a_big {n : ℕ} (hn : 1 ≤ n) : 4096 ≤ seqA dRead n := by + rw [seqA_dRead hn] + have := two_le_xs (n - 1) + calc 4096 = 8 ^ 4 := by norm_num + _ ≤ 8 ^ (2 * xs (n - 1)) := Nat.pow_le_pow_right (by norm_num) (by omega) + +lemma dRead_seqA_mono {k n : ℕ} (hk : 1 ≤ k) (hkn : k ≤ n) : seqA dRead k ≤ seqA dRead n := by + rw [seqA_dRead hk, seqA_dRead (by omega)] + exact Nat.pow_le_pow_right (by norm_num) (by have := xs_mono (show k - 1 ≤ n - 1 by omega); omega) + +lemma dRead_v_small (n k : ℕ) (hkn : k < n) : 8 * (seqV dRead k + 1) < seqA dRead n := by + have ha := dRead_a_big (n := n) (by omega) + rcases Nat.lt_or_ge k 2 with hk | hk + · have : seqV dRead k = 0 := by unfold seqV; rw [show k - 1 = 0 by omega, zero_mul] + omega + -- `vₖ ≤ 2(k - 1)bₖ` and `aₖ₊₁ ≥ bₖ 8^{2k+6}`. + have hab : seqA dRead k ≤ seqB dRead k := by + rw [seqA_dRead (by omega), seqB_dRead (by omega)] + exact Nat.pow_le_pow_right (by norm_num) (by have := xs_lt_ys (k - 1); omega) + have hv : seqV dRead k ≤ (k - 1) * (2 * seqB dRead k) := by + unfold seqV; exact Nat.mul_le_mul_left _ (by omega) + have hak : seqA dRead (k + 1) ≤ seqA dRead n := dRead_seqA_mono (by omega) (by omega) + have hx : seqA dRead (k + 1) = 8 ^ (2 * xs k) := by rw [seqA_dRead (by omega), Nat.add_sub_cancel] + have hxk : 8 ^ (2 * ys (k - 1)) + 2 * ys (k - 1) + (k - 1) + 4 ≤ xs k := by + rw [show k = k - 1 + 1 by omega, xs_succ, Nat.add_sub_cancel] + have hb : seqB dRead k = 8 ^ (2 * ys (k - 1)) := seqB_dRead (by omega) + have hpow : 8 ^ (2 * ys (k - 1)) * 8 ^ (2 * k + 6) ≤ 8 ^ (2 * xs k) := by + rw [← pow_add]; exact Nat.pow_le_pow_right (by norm_num) (by omega) + have hk8 : 16 * k + 8 < 8 ^ (2 * k + 6) := by + have h1 := lt_eight_pow k + have h2 : 8 ^ (k + 6) ≤ 8 ^ (2 * k + 6) := Nat.pow_le_pow_right (by norm_num) (by omega) + rw [pow_add] at h2 + omega + have hb1 : 1 ≤ seqB dRead k := by rw [hb]; exact Nat.one_le_pow _ _ (by norm_num) + have : 8 * ((k - 1) * (2 * seqB dRead k) + 1) < seqB dRead k * 8 ^ (2 * k + 6) := by + have h3 : 8 * ((k - 1) * (2 * seqB dRead k) + 1) ≤ (16 * k + 8) * seqB dRead k := by + have : (k - 1) * (2 * seqB dRead k) ≤ k * (2 * seqB dRead k) := + Nat.mul_le_mul_right _ (by omega) + nlinarith + exact h3.trans_lt (by rw [mul_comm]; exact Nat.mul_lt_mul_of_pos_left hk8 (by omega)) + rw [hb] at this hv + rw [hx] at hak + omega + +lemma dRead_a_double {m : ℕ} (hm : 1 ≤ m) : 2 * seqA dRead m ≤ seqA dRead (m + 1) := by + rw [seqA_dRead hm, seqA_dRead (by omega), Nat.add_sub_cancel] + have h1 := xs_lt_succ (m - 1) + rw [show m - 1 + 1 = m by omega] at h1 + calc 2 * 8 ^ (2 * xs (m - 1)) ≤ 8 ^ 1 * 8 ^ (2 * xs (m - 1)) := by norm_num + _ = 8 ^ (1 + 2 * xs (m - 1)) := by rw [← pow_add] + _ ≤ 8 ^ (2 * xs m) := Nat.pow_le_pow_right (by norm_num) (by omega) + +lemma dRead_two_le_b (m : ℕ) : 2 ≤ seqB dRead m := by + rcases Nat.eq_zero_or_pos m with rfl | hm + · rw [seqB_dRead_zero] + · rw [seqB_dRead hm] + have := xs_lt_ys (m - 1) + calc 2 ≤ 8 ^ 1 := by norm_num + _ ≤ 8 ^ (2 * ys (m - 1)) := Nat.pow_le_pow_right (by norm_num) (by omega) + +lemma dRead_a_sq {n : ℕ} (hn : 1 ≤ n) : n ^ 2 * seqA dRead n ^ 2 < seqB dRead n := by + rw [seqA_dRead hn, seqB_dRead hn, ← pow_mul] + have hy := ys_ge (n - 1) + have := lt_eight_pow (2 * xs (n - 1)) + have h1 : n ^ 2 < 8 ^ (2 * n) := by + rw [pow_mul']; exact Nat.pow_lt_pow_left (lt_eight_pow n) (by norm_num) + calc n ^ 2 * 8 ^ (2 * xs (n - 1) * 2) < 8 ^ (2 * n) * 8 ^ (2 * xs (n - 1) * 2) := + Nat.mul_lt_mul_of_pos_right h1 (by positivity) + _ = 8 ^ (2 * n + 2 * xs (n - 1) * 2) := by rw [← pow_add] + _ ≤ 8 ^ (2 * ys (n - 1)) := Nat.pow_le_pow_right (by norm_num) (by omega) + +lemma dRead_four_sq_b_lt_a {m : ℕ} (hm : 1 ≤ m) : 4 * seqB dRead m ^ 2 < seqA dRead (m + 1) := by + rw [seqB_dRead hm, seqA_dRead (by omega), Nat.add_sub_cancel, ← pow_mul] + have hx : 8 ^ (2 * ys (m - 1)) + 2 * ys (m - 1) + (m - 1) + 4 ≤ xs m := by + rw [show m = m - 1 + 1 by omega, xs_succ, Nat.add_sub_cancel] + have := lt_eight_pow (2 * ys (m - 1)) + calc 4 * 8 ^ (2 * ys (m - 1) * 2) < 8 ^ 1 * 8 ^ (2 * ys (m - 1) * 2) := + Nat.mul_lt_mul_of_pos_right (by norm_num) (by positivity) + _ = 8 ^ (1 + 2 * ys (m - 1) * 2) := by rw [← pow_add] + _ ≤ 8 ^ (2 * xs m) := Nat.pow_le_pow_right (by norm_num) (by omega) + +/-- `α x² < α^{√x/4}` for `x = 8^{2s}`, `s ≥ 2`. -/ +lemma rpow_of_eight_pow {s : ℕ} (hs : 2 ≤ s) : + alpha * (((8 ^ (2 * s) : ℕ) : ℝ)) ^ 2 < alpha ^ (Real.sqrt ((8 ^ (2 * s) : ℕ) : ℝ) / 4) := by + rw [sqrt_eight_pow] + have h1 : alpha * (((8 ^ (2 * s) : ℕ) : ℝ)) ^ 2 = (8 : ℝ) ^ (4 * s + 1) := by + rw [alpha]; push_cast; ring + rw [h1] + refine eight_pow_lt_alpha_rpow ?_ + have h2 := sixteen_mul_add_lt_pow hs + have h3 : ((16 * s + 4 : ℕ) : ℝ) < ((8 ^ s : ℕ) : ℝ) := by exact_mod_cast h2 + push_cast at h3 ⊢ + linarith + +lemma dRead_rpow_a {n : ℕ} (hn : 1 ≤ n) : + alpha * (seqA dRead n : ℝ) ^ 2 < alpha ^ (Real.sqrt (seqA dRead n) / 4) := by + rw [seqA_dRead hn]; exact rpow_of_eight_pow (two_le_xs _) + +lemma dRead_rpow_b {n : ℕ} (hn : 1 ≤ n) : + alpha * (seqB dRead n : ℝ) ^ 2 < alpha ^ (Real.sqrt (seqB dRead n) / 4) := by + rw [seqB_dRead hn] + exact rpow_of_eight_pow ((two_le_xs _).trans (xs_lt_ys _).le) + +lemma dRead_pow_b {n : ℕ} (hn : 1 ≤ n) : + (seqB dRead n : ℝ) ^ (4 * n) < alpha ^ (Real.sqrt (seqB dRead n) / 4) := by + rw [seqB_dRead hn, sqrt_eight_pow] + have hy := ys_ge (n - 1) + have := lt_eight_pow (2 * xs (n - 1)) + set y := ys (n - 1) + have hy4 : 4 ≤ y := by omega + have hny : n ≤ y := by omega + rw [show (((8 ^ (2 * y) : ℕ) : ℝ)) ^ (4 * n) = (8 : ℝ) ^ (2 * y * (4 * n)) by push_cast; ring] + refine eight_pow_lt_alpha_rpow ?_ + have h1 := thirtytwo_sq_lt_pow hy4 + have h2 : 32 * (y * n) ≤ 32 * y ^ 2 := by + rw [sq]; exact Nat.mul_le_mul_left _ (Nat.mul_le_mul_left _ hny) + have h3 : ((2 * y * (4 * n) : ℕ) : ℝ) * 4 < ((8 ^ y : ℕ) : ℝ) := by + exact_mod_cast (show 2 * y * (4 * n) * 4 < 8 ^ y by nlinarith) + push_cast at h3 ⊢ + linarith + +lemma dRead_rpow_b_add_two_le {m : ℕ} (hm : 1 ≤ m) : + alpha ^ Real.sqrt (seqB dRead m) + 2 ≤ alpha ^ Real.sqrt (seqA dRead (m + 1)) := by + rw [seqB_dRead hm, seqA_dRead (by omega), Nat.add_sub_cancel, sqrt_eight_pow, sqrt_eight_pow, + alpha_rpow_eight_pow, alpha_rpow_eight_pow] + have h1 := xs_lt_ys (m - 1) + have h2 : ys (m - 1) + 1 ≤ xs m := by + have := xs_succ (m - 1); rw [show m - 1 + 1 = m by omega] at this + have := lt_eight_pow (2 * ys (m - 1)); omega + have h3 : 8 ^ ys (m - 1) + 1 ≤ 8 ^ xs m := by + have : 8 ^ (ys (m - 1) + 1) ≤ 8 ^ xs m := Nat.pow_le_pow_right (by norm_num) h2 + rw [pow_succ] at this + have := Nat.one_le_pow (ys (m - 1)) 8 (by norm_num) + omega + have h4 : (1 : ℝ) ≤ (8 : ℝ) ^ (8 ^ ys (m - 1)) := one_le_pow₀ (by norm_num) + calc (8 : ℝ) ^ (8 ^ ys (m - 1)) + 2 ≤ (8 : ℝ) ^ (8 ^ ys (m - 1) + 1) := by + rw [pow_succ]; linarith + _ ≤ (8 : ℝ) ^ (8 ^ xs m) := eight_pow_mono h3 + +lemma dRead_three_pow_rpow_a_le {n : ℕ} (hn : 1 ≤ n) : + 3 * (seqB dRead n : ℝ) ^ n * alpha ^ Real.sqrt (seqA dRead n) ≤ + alpha ^ Real.sqrt (seqB dRead n) := by + rw [seqB_dRead hn, seqA_dRead hn, sqrt_eight_pow, sqrt_eight_pow, alpha_rpow_eight_pow, + alpha_rpow_eight_pow] + have hy := ys_ge (n - 1) + have h8x := eight_pow_le_ys (n - 1) + have := lt_eight_pow (2 * xs (n - 1)) + set x := xs (n - 1) + set y := ys (n - 1) + have hy4 : 4 ≤ y := by omega + have hny : n ≤ y := by omega + have h1 := thirtytwo_sq_lt_pow hy4 + have hexp : 1 + 2 * y * n + 8 ^ x ≤ 8 ^ y := by + have : 2 * y * n ≤ 2 * y ^ 2 := by + rw [sq, mul_assoc]; exact Nat.mul_le_mul_left _ (Nat.mul_le_mul_left _ hny) + nlinarith + calc 3 * (((8 ^ (2 * y) : ℕ) : ℝ)) ^ n * (8 : ℝ) ^ (8 ^ x) + ≤ 8 * (((8 ^ (2 * y) : ℕ) : ℝ)) ^ n * (8 : ℝ) ^ (8 ^ x) := by gcongr; norm_num + _ = (8 : ℝ) ^ (1 + 2 * y * n + 8 ^ x) := by push_cast; ring + _ ≤ (8 : ℝ) ^ (8 ^ y) := eight_pow_mono hexp + +lemma dRead_q_bound {m : ℕ} (hm : 2 ≤ m) : + (seqA dRead m : ℝ) * alpha ^ Real.sqrt (seqB dRead (m - 1)) ≤ + alpha ^ (Real.sqrt (seqA dRead m) / 2) := by + rw [seqA_dRead (by omega), seqB_dRead (by omega), sqrt_eight_pow, sqrt_eight_pow, + alpha_rpow_eight_pow] + have hx : 8 ^ (2 * ys (m - 1 - 1)) ≤ xs (m - 1) := by + have := xs_succ (m - 1 - 1); rw [show m - 1 - 1 + 1 = m - 1 by omega] at this; omega + have hy := le_eight_pow_two_mul (ys (m - 1 - 1)) + have h16 := sixteen_mul_add_lt_pow (two_le_xs (m - 1)) + set x := xs (m - 1) + set y := ys (m - 1 - 1) + rw [show (((8 ^ (2 * x) : ℕ) : ℝ)) * (8 : ℝ) ^ (8 ^ y) = (8 : ℝ) ^ (2 * x + 8 ^ y) by + push_cast; ring] + refine eight_pow_le_alpha_rpow ?_ + have h2 : ((2 * x + 8 ^ y : ℕ) : ℝ) * 2 ≤ ((8 ^ x : ℕ) : ℝ) := by + exact_mod_cast (show (2 * x + 8 ^ y) * 2 ≤ 8 ^ x by omega) + push_cast at h2 ⊢ + linarith + +lemma dRead_alpha_pow_two_b_le {m : ℕ} (hm : 1 ≤ m) : + alpha ^ (2 * seqB dRead m) ≤ seqA dRead (m + 1) := by + rw [seqB_dRead hm, seqA_dRead (by omega), Nat.add_sub_cancel, alpha] + have hx : 8 ^ (2 * ys (m - 1)) ≤ xs m := by + have := xs_succ (m - 1); rw [show m - 1 + 1 = m by omega] at this; omega + push_cast + exact eight_pow_mono (by omega) + +lemma dRead_rpow_a_le_b {n : ℕ} (hn : 1 ≤ n) : alpha ^ Real.sqrt (seqA dRead n) ≤ seqB dRead n := by + rw [seqA_dRead hn, seqB_dRead hn, sqrt_eight_pow, alpha_rpow_eight_pow] + have := eight_pow_le_ys (n - 1) + push_cast + exact eight_pow_mono (by omega) + +lemma dRead_r_bound {m : ℕ} (hm : 3 ≤ m) : + alpha * seqA dRead m * capA dRead m * + (seqA dRead m * capA dRead m) ^ (2 * ((m - 2) * seqA dRead m)).factorial < + seqB dRead m := by + rw [capA_dRead (by omega), seqA_dRead (by omega), seqB_dRead (by omega), alpha] + have hy := ys_ge_r (m - 1) + set x := xs (m - 1) + set y := ys (m - 1) + set F := (2 * ((m - 2) * 8 ^ (2 * x))).factorial + have hF : F ≤ (2 * (m - 1 + 1) * 8 ^ (2 * x)).factorial := by + refine Nat.factorial_le ?_ + have : (m - 2) * 8 ^ (2 * x) ≤ (m - 1 + 1) * 8 ^ (2 * x) := Nat.mul_le_mul_right _ (by omega) + calc 2 * ((m - 2) * 8 ^ (2 * x)) ≤ 2 * ((m - 1 + 1) * 8 ^ (2 * x)) := Nat.mul_le_mul_left _ this + _ = 2 * (m - 1 + 1) * 8 ^ (2 * x) := by ring + have hexp : 1 + 2 * x + 8 ^ x + (2 * x + 8 ^ x) * F < 2 * y := by + have : (2 * x + 8 ^ x) * F ≤ (2 * x + 8 ^ x) * (2 * (m - 1 + 1) * 8 ^ (2 * x)).factorial := + Nat.mul_le_mul_left _ hF + have hy1 : 1 ≤ y := le_trans (Nat.le_add_left 1 _) hy + nlinarith + calc (8 : ℝ) * (((8 ^ (2 * x) : ℕ) : ℝ)) * (8 : ℝ) ^ (8 ^ x) * + ((((8 ^ (2 * x) : ℕ) : ℝ)) * (8 : ℝ) ^ (8 ^ x)) ^ F + = (8 : ℝ) ^ (1 + 2 * x + 8 ^ x + (2 * x + 8 ^ x) * F) := by push_cast; ring + _ < (8 : ℝ) ^ (2 * y) := eight_pow_strictMono hexp + _ = (((8 ^ (2 * y) : ℕ) : ℝ)) := by push_cast; ring + +/-- **The explicit sequence satisfies every growth fact.** -/ +theorem theorem7Hyp_dRead : Theorem7Hyp dRead where + one_le_a := dRead_one_le_a + v_lt_a n k hkn := by have := dRead_v_small n k hkn; omega + a_lt_b n := by + rcases Nat.lt_or_ge n 1 with hn | hn + · rw [show n = 0 by omega, seqB_dRead_zero]; simp + · have h1 := dRead_a_small hn + have : (n - 2) * seqA dRead n ≤ 8 * n * seqA dRead n := Nat.mul_le_mul_right _ (by omega) + omega + a_double _ hm := dRead_a_double hm + two_le_b := dRead_two_le_b + v_small := dRead_v_small + a_small _ hn := dRead_a_small hn + b_small _ hn := dRead_b_small hn + a_sq _ hn := dRead_a_sq hn + a_big _ hn := dRead_a_big hn + rpow_a _ hn := dRead_rpow_a hn + rpow_b _ hn := dRead_rpow_b hn + pow_b _ hn := dRead_pow_b hn + rpow_b_add_two_le _ hm := dRead_rpow_b_add_two_le hm + three_pow_rpow_a_le _ hn := dRead_three_pow_rpow_a_le hn + q_bound _ hm := dRead_q_bound hm + four_sq_b_lt_a _ hm := dRead_four_sq_b_lt_a hm + alpha_pow_two_b_le _ hm := dRead_alpha_pow_two_b_le hm + rpow_a_le_b _ hn := dRead_rpow_a_le_b hn + r_bound _ hm := dRead_r_bound hm + +end ReadL1 diff --git a/LeanPool/ReadL1/Growth.lean b/LeanPool/ReadL1/Growth.lean new file mode 100644 index 0000000000..2194b28665 --- /dev/null +++ b/LeanPool/ReadL1/Growth.lean @@ -0,0 +1,120 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Basis +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FieldSimp + +/-! +# The growth facts + +Śliwa (p. 628) fixes a growth condition on `d` and derives a list of inequalities between the +`aₙ`, `bₙ` and `vₙ`. The proofs only ever use those inequalities, so they are collected here as +hypotheses (`ReadL1.GrowthHyp`), extending the three the partition needs. They are proved for an +explicit sequence at the end. +-/ + +@[expose] public section + +namespace ReadL1 + +/-- The growth facts used in the proofs (Śliwa p. 628, and consequences). -/ +structure GrowthHyp (d : ℕ → ℕ) : Prop extends PartitionHyp d where + /-- `aₘ₊₁ ≥ 2aₘ` (Śliwa: `8m bₘ < aₘ₊₁` and `aₘ < bₘ`). -/ + a_double : ∀ m, 1 ≤ m → 2 * seqA d m ≤ seqA d (m + 1) + /-- `bₘ ≥ 2` (`d` is increasing from `d₀ = 2`). -/ + two_le_b : ∀ m, 2 ≤ seqB d m + /-- `8(vₖ + 1) < aₙ` for `k < n` (Śliwa: `8(vₙ₋₁ + 1) < aₙ`, and `v` increases). -/ + v_small : ∀ n k, k < n → 8 * (seqV d k + 1) < seqA d n + /-- `8n aₙ < bₙ`. -/ + a_small : ∀ n, 1 ≤ n → 8 * n * seqA d n < seqB d n + /-- `8n bₙ < aₙ₊₁`. -/ + b_small : ∀ n, 1 ≤ n → 8 * n * seqB d n < seqA d (n + 1) + /-- `n² aₙ² < bₙ`. -/ + a_sq : ∀ n, 1 ≤ n → n ^ 2 * seqA d n ^ 2 < seqB d n + /-- `aₙ ≥ α⁴ = 4096`. -/ + a_big : ∀ n, 1 ≤ n → 4096 ≤ seqA d n + /-- `α aₙ² < α^{√aₙ / 4}`. -/ + rpow_a : ∀ n, 1 ≤ n → alpha * (seqA d n : ℝ) ^ 2 < alpha ^ (Real.sqrt (seqA d n) / 4) + /-- `α bₙ² < α^{√bₙ / 4}`. -/ + rpow_b : ∀ n, 1 ≤ n → alpha * (seqB d n : ℝ) ^ 2 < alpha ^ (Real.sqrt (seqB d n) / 4) + /-- `bₙ^{4n} < α^{√bₙ / 4}`. -/ + pow_b : ∀ n, 1 ≤ n → (seqB d n : ℝ) ^ (4 * n) < alpha ^ (Real.sqrt (seqB d n) / 4) + /-- `α^{√bₘ} + 2 ≤ α^{√aₘ₊₁}` (implicit in Śliwa's Lemma 1 (a); `aₘ₊₁ ≥ α^{2bₘ}`). -/ + rpow_b_add_two_le : ∀ m, 1 ≤ m → + alpha ^ Real.sqrt (seqB d m) + 2 ≤ alpha ^ Real.sqrt (seqA d (m + 1)) + /-- `3 bₙⁿ α^{√aₙ} ≤ α^{√bₙ}` (implicit in Śliwa's Lemma 1 (a); `bₙ ≥ α^{2aₙ}`). -/ + three_pow_rpow_a_le : ∀ n, 1 ≤ n → + 3 * (seqB d n : ℝ) ^ n * alpha ^ Real.sqrt (seqA d n) ≤ alpha ^ Real.sqrt (seqB d n) + /-- `aₘ Bₘ₋₁ ≤ √Aₘ`, i.e. `aₘ α^{√bₘ₋₁} ≤ α^{√aₘ/2}` (Śliwa p. 632, the bound on `Qₘ`). -/ + q_bound : ∀ m, 2 ≤ m → + (seqA d m : ℝ) * alpha ^ Real.sqrt (seqB d (m - 1)) ≤ alpha ^ (Real.sqrt (seqA d m) / 2) + /-- `4bₘ² < aₘ₊₁` (Śliwa p. 633: `s < 2bₘ < √aₙ`). -/ + four_sq_b_lt_a : ∀ m, 1 ≤ m → 4 * seqB d m ^ 2 < seqA d (m + 1) + /-- `α^{2bₘ} ≤ aₘ₊₁`: Śliwa's growth condition `dₙ ≥ α^{2dₙ₋₁}` itself, at `n = 2m + 1`. -/ + alpha_pow_two_b_le : ∀ m, 1 ≤ m → alpha ^ (2 * seqB d m) ≤ seqA d (m + 1) + /-- `Aₙ = α^{√aₙ} ≤ bₙ` (Śliwa p. 634; `bₙ ≥ α^{2aₙ}`). -/ + rpow_a_le_b : ∀ n, 1 ≤ n → alpha ^ Real.sqrt (seqA d n) ≤ seqB d n + +variable {d : ℕ → ℕ} + +/-- `a` grows at least geometrically: `aₘ₊ⱼ ≥ 2ʲ aₘ`. -/ +lemma pow_two_mul_le_seqA (h : GrowthHyp d) {m : ℕ} (hm : 1 ≤ m) (j : ℕ) : + 2 ^ j * seqA d m ≤ seqA d (m + j) := by + induction j with + | zero => simp + | succ j ih => + calc 2 ^ (j + 1) * seqA d m = 2 * (2 ^ j * seqA d m) := by ring + _ ≤ 2 * seqA d (m + j) := Nat.mul_le_mul_left _ ih + _ ≤ seqA d (m + j + 1) := h.a_double _ (by omega) + +/-! ### Powers of `α` -/ + +lemma one_le_alpha : 1 ≤ alpha := by norm_num [alpha] + +lemma alpha_rpow_le {x y : ℝ} (hxy : x ≤ y) : alpha ^ x ≤ alpha ^ y := + Real.rpow_le_rpow_of_exponent_le one_le_alpha hxy + +lemma sqrt_four_mul (c : ℝ) : Real.sqrt (4 * c) = 2 * Real.sqrt c := by + rw [Real.sqrt_mul (by norm_num), show (4 : ℝ) = 2 ^ 2 by norm_num, Real.sqrt_sq (by norm_num)] + +/-! ### The weights -/ + +/-- The inverse weight is `α^{-((2r - 1)c - 2i)/√(4c)}`. -/ +lemma inv_weight (c r i : ℕ) : + (weight c r i)⁻¹ = alpha ^ (-(((2 * (r : ℝ) - 1) * c - 2 * i) / Real.sqrt (4 * c))) := by + rw [weight, Real.rpow_neg alpha_pos.le] + +/-- **If the numerator of the exponent is at least `c / 2`, the inverse weight is at most +`α^{-√c/4}`.** This is how every "`≤ α^{-√aₙ/4}`" in Śliwa's case analysis arises. -/ +lemma inv_weight_le {c r i : ℕ} (hc : 0 < c) + (hE : (c : ℝ) / 2 ≤ (2 * (r : ℝ) - 1) * c - 2 * i) : + (weight c r i)⁻¹ ≤ alpha ^ (-(Real.sqrt c / 4)) := by + rw [inv_weight] + refine alpha_rpow_le (neg_le_neg ?_) + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + rw [sqrt_four_mul, le_div_iff₀ (by positivity)] + have hsq : Real.sqrt c * Real.sqrt c = c := Real.mul_self_sqrt (by positivity) + nlinarith + +/-- Consecutive weights differ by `α^{1/√c}`: `weight i = α^{1/√c} · weight (i + 1)`. -/ +lemma weight_eq_mul_succ {c : ℕ} (hc : 0 < c) (r i : ℕ) : + weight c r i = alpha ^ (1 / Real.sqrt c) * weight c r (i + 1) := by + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + rw [weight, weight, ← Real.rpow_add alpha_pos, sqrt_four_mul] + congr 1 + push_cast + field_simp + ring + +end ReadL1 diff --git a/LeanPool/ReadL1/Imports.lean b/LeanPool/ReadL1/Imports.lean new file mode 100644 index 0000000000..21bf02c7b0 --- /dev/null +++ b/LeanPool/ReadL1/Imports.lean @@ -0,0 +1,38 @@ +/- +Copyright (c) 2026 Lean Pool contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Lean Pool contributors +-/ +module -- shake: keep-all --deprecated_module: ignore + +-- Generated project imports; run `lake exe mk_all`. +public import LeanPool.ReadL1 +public import LeanPool.ReadL1.Basis +public import LeanPool.ReadL1.Coord +public import LeanPool.ReadL1.Cyclic +public import LeanPool.ReadL1.Defs +public import LeanPool.ReadL1.Explicit +public import LeanPool.ReadL1.Growth +public import LeanPool.ReadL1.Inverse +public import LeanPool.ReadL1.L1Lift +public import LeanPool.ReadL1.Lemma1 +public import LeanPool.ReadL1.Lemma2 +public import LeanPool.ReadL1.Lemma4 +public import LeanPool.ReadL1.Lemma4I +public import LeanPool.ReadL1.Lemma4J +public import LeanPool.ReadL1.Lemma4K +public import LeanPool.ReadL1.Lemma4L +public import LeanPool.ReadL1.Lemma5 +public import LeanPool.ReadL1.Lemma5Coeff +public import LeanPool.ReadL1.Lemma5Window +public import LeanPool.ReadL1.Lemma6 +public import LeanPool.ReadL1.Main +public import LeanPool.ReadL1.Norm +public import LeanPool.ReadL1.Operator +public import LeanPool.ReadL1.Partition +public import LeanPool.ReadL1.Poly +public import LeanPool.ReadL1.PolyNorm +public import LeanPool.ReadL1.Projection +public import LeanPool.ReadL1.QPoly +public import LeanPool.ReadL1.Theorem7 +public import LeanPool.ReadL1.Theorem7Prep diff --git a/LeanPool/ReadL1/Inverse.lean b/LeanPool/ReadL1/Inverse.lean new file mode 100644 index 0000000000..f06c760ed2 --- /dev/null +++ b/LeanPool/ReadL1/Inverse.lean @@ -0,0 +1,193 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.PolyNorm +import Mathlib.Tactic.Ring +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.GCongr +import Mathlib.Tactic.SplitIfs + +/-! +# Exact inverses of a polynomial, up to a given degree + +The construction inside Śliwa's Lemma 6 (p. 639): if `y₀ ≠ 0`, put `qᵢ = 0` for `i < m`, +`qₘ = y₀⁻¹` and `q_{m+t} = -y₀⁻¹ ∑_{j=1}^{t} yⱼ q_{m+t-j}`. Then `q y` agrees with `xᵐ` in every +degree up to any `n ≥ m` (`ReadL1.ptrunc_invPoly_mul`), and `|q_{m+t}| ≤ (M/|y₀|)ᵗ / |y₀|` when +`|y| ≤ M` (`ReadL1.norm_invCoeff_le`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial + +/-- The coefficients `qᵢ` of the inverse of `y` from degree `m`. -/ +noncomputable def invCoeff (y : ℂ[X]) (m : ℕ) : ℕ → ℂ + | i => + if _h1 : i < m then 0 + else if _h2 : i = m then (y.coeff 0)⁻¹ + else -(y.coeff 0)⁻¹ * ∑ j ∈ (Finset.Icc 1 (i - m)).attach, + y.coeff j.1 * invCoeff y m (i - j.1) + termination_by i => i + decreasing_by + have := (Finset.mem_Icc.1 j.2).1 + omega + +lemma invCoeff_of_lt {y : ℂ[X]} {m i : ℕ} (hi : i < m) : invCoeff y m i = 0 := by + rw [invCoeff, dite_eq_left hi] + +lemma invCoeff_self (y : ℂ[X]) (m : ℕ) : invCoeff y m m = (y.coeff 0)⁻¹ := by + rw [invCoeff, dite_eq_right (lt_irrefl m), dite_eq_left rfl] + +lemma invCoeff_of_gt {y : ℂ[X]} {m i : ℕ} (hi : m < i) : + invCoeff y m i = -(y.coeff 0)⁻¹ * + ∑ j ∈ Finset.Icc 1 (i - m), y.coeff j * invCoeff y m (i - j) := by + rw [invCoeff, dite_eq_right (by omega), dite_eq_right (by omega)] + congr 1 + exact Finset.sum_attach (Finset.Icc 1 (i - m)) fun j ↦ y.coeff j * invCoeff y m (i - j) + +/-- **The convolution identity**: `∑_{a ≤ l} qₐ y_{l - a}` is `1` at `l = m` and `0` elsewhere. -/ +lemma sum_invCoeff_mul {y : ℂ[X]} (hy : y.coeff 0 ≠ 0) (m l : ℕ) : + ∑ a ∈ Finset.range (l + 1), invCoeff y m a * y.coeff (l - a) = if l = m then 1 else 0 := by + rcases lt_trichotomy l m with hlt | rfl | hgt + · rw [ite_eq_right hlt.ne] + exact Finset.sum_eq_zero fun a ha ↦ by + rw [invCoeff_of_lt (by have := Finset.mem_range.1 ha; omega), zero_mul] + · rw [ite_eq_left rfl, Finset.sum_range_succ, Finset.sum_eq_zero fun a ha ↦ by + rw [invCoeff_of_lt (Finset.mem_range.1 ha), zero_mul], zero_add, Nat.sub_self, + invCoeff_self, inv_mul_cancel₀ hy] + · rw [ite_eq_right hgt.ne', Finset.sum_range_succ, Nat.sub_self, invCoeff_of_gt hgt] + -- `∑_{a < l} qₐ y_{l-a}` is the sum in the definition of `q_l`: drop `a < m`, then `a ↦ l - a`. + have h1 : ∑ a ∈ Finset.range l, invCoeff y m a * y.coeff (l - a) = + ∑ a ∈ Finset.Ico m l, invCoeff y m a * y.coeff (l - a) := by + rw [Finset.range_eq_Ico, ← Finset.sum_Ico_consecutive _ (Nat.zero_le m) hgt.le, + Finset.sum_eq_zero fun a ha ↦ by + rw [invCoeff_of_lt (Finset.mem_Ico.1 ha).2, zero_mul], zero_add] + have h2 : ∑ a ∈ Finset.Ico m l, invCoeff y m a * y.coeff (l - a) = + ∑ j ∈ Finset.Icc 1 (l - m), y.coeff j * invCoeff y m (l - j) := by + refine Finset.sum_nbij' (fun a ↦ l - a) (fun j ↦ l - j) (fun a ha ↦ ?_) (fun j hj ↦ ?_) + (fun a ha ↦ ?_) (fun j hj ↦ ?_) (fun a ha ↦ ?_) + · simp only [Finset.mem_Ico, Finset.mem_Icc] at ha ⊢; omega + · simp only [Finset.mem_Ico, Finset.mem_Icc] at hj ⊢; omega + · simp only [Finset.mem_Ico] at ha; omega + · simp only [Finset.mem_Icc] at hj; omega + · simp only [Finset.mem_Ico] at ha + rw [show l - (l - a) = a by omega, mul_comm] + rw [h1, h2] + field_simp + ring + +/-- The inverse polynomial `q = ∑_{i ≤ n} qᵢ xⁱ`. -/ +noncomputable def invPoly (y : ℂ[X]) (m n : ℕ) : ℂ[X] := + ∑ i ∈ Finset.range (n + 1), monomial i (invCoeff y m i) + +lemma coeff_invPoly (y : ℂ[X]) (m n i : ℕ) : + (invPoly y m n).coeff i = if i ≤ n then invCoeff y m i else 0 := by + classical + rw [invPoly, finsetSum_coeff] + simp [coeff_monomial, Finsupp.single_apply, Finset.sum_ite_eq'] + +lemma natDegree_invPoly_le (y : ℂ[X]) (m n : ℕ) : (invPoly y m n).natDegree ≤ n := by + rw [natDegree_le_iff_coeff_eq_zero] + intro i hi + rw [coeff_invPoly, ite_eq_right (by exact_mod_cast not_le.2 hi)] + +/-- **`Pₙ (q y) = xᵐ`** for `m ≤ n`, when `y₀ ≠ 0`. -/ +lemma ptrunc_invPoly_mul {y : ℂ[X]} (hy : y.coeff 0 ≠ 0) {m n : ℕ} (hmn : m ≤ n) : + ptrunc n (invPoly y m n * y) = X ^ m := by + ext l + rw [coeff_ptrunc, coeff_X_pow] + split_ifs with hl hlm hlm + · rw [coeff_mul, Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk] + simp only [coeff_invPoly] + rw [Finset.sum_congr rfl fun a ha ↦ by + rw [ite_eq_left (by have := Finset.mem_range.1 ha; omega)], sum_invCoeff_mul hy m l, + ite_eq_left hlm] + · rw [coeff_mul, Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk] + simp only [coeff_invPoly] + rw [Finset.sum_congr rfl fun a ha ↦ by + rw [ite_eq_left (by have := Finset.mem_range.1 ha; omega)], sum_invCoeff_mul hy m l, + ite_eq_right hlm] + · omega + · rfl + +/-- Any finite part of `|y|` is at most `|y|`. -/ +lemma sum_norm_coeff_le_pnorm (y : ℂ[X]) (s : Finset ℕ) : + ∑ j ∈ s, ‖y.coeff j‖ ≤ pnorm y := by + classical + rw [pnorm_eq_sum_of_subset y (Finset.subset_union_right (s₁ := s))] + exact Finset.sum_le_sum_of_subset_of_nonneg Finset.subset_union_left fun _ _ _ ↦ norm_nonneg _ + +/-- **`|q_{m+t}| ≤ (M/|y₀|)ᵗ / |y₀|`** when `|y| ≤ M`. -/ +lemma norm_invCoeff_le {y : ℂ[X]} {M : ℝ} (hy0 : 0 < ‖y.coeff 0‖) (hM : pnorm y ≤ M) (m t : ℕ) : + ‖invCoeff y m (m + t)‖ ≤ (M / ‖y.coeff 0‖) ^ t / ‖y.coeff 0‖ := by + have hy0M : ‖y.coeff 0‖ ≤ M := (sum_norm_coeff_le_pnorm y {0}).trans hM |>.trans_eq' (by simp) + have hr : 1 ≤ M / ‖y.coeff 0‖ := (one_le_div hy0).2 hy0M + induction t using Nat.strong_induction_on with + | _ t ih => + rcases Nat.eq_zero_or_pos t with rfl | ht + · rw [add_zero, invCoeff_self, norm_inv, pow_zero, one_div] + · rw [invCoeff_of_gt (by omega), norm_mul, norm_neg, norm_inv, show m + t - m = t by omega] + have hsum : ‖∑ j ∈ Finset.Icc 1 t, y.coeff j * invCoeff y m (m + t - j)‖ ≤ + (M / ‖y.coeff 0‖) ^ (t - 1) / ‖y.coeff 0‖ * M := by + refine (norm_sum_le _ _).trans ?_ + calc ∑ j ∈ Finset.Icc 1 t, ‖y.coeff j * invCoeff y m (m + t - j)‖ + ≤ ∑ j ∈ Finset.Icc 1 t, ‖y.coeff j‖ * ((M / ‖y.coeff 0‖) ^ (t - 1) / ‖y.coeff 0‖) := by + refine Finset.sum_le_sum fun j hj ↦ ?_ + simp only [Finset.mem_Icc] at hj + rw [norm_mul, show m + t - j = m + (t - j) by omega] + gcongr + refine (ih (t - j) (by omega)).trans ?_ + gcongr + omega + _ = (∑ j ∈ Finset.Icc 1 t, ‖y.coeff j‖) * ((M / ‖y.coeff 0‖) ^ (t - 1) / ‖y.coeff 0‖) := by + rw [Finset.sum_mul] + _ ≤ M * ((M / ‖y.coeff 0‖) ^ (t - 1) / ‖y.coeff 0‖) := by + gcongr; exact (sum_norm_coeff_le_pnorm y _).trans hM + _ = (M / ‖y.coeff 0‖) ^ (t - 1) / ‖y.coeff 0‖ * M := by ring + calc ‖y.coeff 0‖⁻¹ * ‖∑ j ∈ Finset.Icc 1 t, y.coeff j * invCoeff y m (m + t - j)‖ + ≤ ‖y.coeff 0‖⁻¹ * ((M / ‖y.coeff 0‖) ^ (t - 1) / ‖y.coeff 0‖ * M) := by gcongr + _ = (M / ‖y.coeff 0‖) ^ (t - 1 + 1) / ‖y.coeff 0‖ := by + rw [pow_succ]; field_simp + _ = (M / ‖y.coeff 0‖) ^ t / ‖y.coeff 0‖ := by rw [Nat.sub_add_cancel ht] + +/-- `|q| ≤ (n - m + 1) (M/|y₀|)^{n-m} / |y₀|`. -/ +lemma pnorm_invPoly_le {y : ℂ[X]} {M : ℝ} (hy0 : 0 < ‖y.coeff 0‖) (hM : pnorm y ≤ M) + {m n : ℕ} (hmn : m ≤ n) : + pnorm (invPoly y m n) ≤ (n - m + 1 : ℕ) * ((M / ‖y.coeff 0‖) ^ (n - m) / ‖y.coeff 0‖) := by + have hy0M : ‖y.coeff 0‖ ≤ M := (sum_norm_coeff_le_pnorm y {0}).trans hM |>.trans_eq' (by simp) + have hr : 1 ≤ M / ‖y.coeff 0‖ := (one_le_div hy0).2 hy0M + refine (pnorm_sum_le _ _).trans ?_ + simp only [pnorm_monomial] + -- Only `i = m + t` with `t ≤ n - m` contribute. + rw [show Finset.range (n + 1) = Finset.range m ∪ (Finset.range (n - m + 1)).map + ⟨(m + ·), add_right_injective m⟩ by + ext i; simp only [Finset.mem_union, Finset.mem_range, Finset.mem_map, + Function.Embedding.coeFn_mk] + constructor + · intro hi; by_cases him : i < m + · exact Or.inl him + · exact Or.inr ⟨i - m, by omega, by omega⟩ + · rintro (hi | ⟨t, ht, rfl⟩) <;> omega] + rw [Finset.sum_union (Finset.disjoint_left.2 fun i h1 h2 ↦ by + simp only [Finset.mem_range, Finset.mem_map, Function.Embedding.coeFn_mk] at h1 h2 + obtain ⟨t, -, rfl⟩ := h2; omega), Finset.sum_map, + Finset.sum_eq_zero fun i hi ↦ by rw [invCoeff_of_lt (Finset.mem_range.1 hi), norm_zero], + zero_add] + calc ∑ t ∈ Finset.range (n - m + 1), ‖invCoeff y m (m + t)‖ + ≤ ∑ t ∈ Finset.range (n - m + 1), (M / ‖y.coeff 0‖) ^ (n - m) / ‖y.coeff 0‖ := by + refine Finset.sum_le_sum fun t ht ↦ (norm_invCoeff_le hy0 hM m t).trans ?_ + gcongr + exact Nat.lt_succ_iff.1 (Finset.mem_range.1 ht) + _ = (n - m + 1 : ℕ) * ((M / ‖y.coeff 0‖) ^ (n - m) / ‖y.coeff 0‖) := by + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + +end ReadL1 diff --git a/LeanPool/ReadL1/L1Lift.lean b/LeanPool/ReadL1/L1Lift.lean new file mode 100644 index 0000000000..2f6a673a17 --- /dev/null +++ b/LeanPool/ReadL1/L1Lift.lean @@ -0,0 +1,126 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Defs +public import Mathlib.Analysis.Normed.Lp.lpSpace +public import Mathlib.Analysis.Normed.Operator.Basic +import Mathlib.Tactic.NormNum + +/-! +# Bounded operators on ℓ¹ from the images of the basis vectors + +On ℓ¹ an operator is determined by where it sends the standard basis vectors `δᵢ`, and any +bounded family of images gives an operator: send `x = ∑ xᵢ δᵢ` to `∑ xᵢ uᵢ`. The series converges +because `‖xᵢ uᵢ‖ ≤ C ‖xᵢ‖` and `∑ ‖xᵢ‖ = ‖x‖`, which also gives the norm bound `C`. + +Two consequences are used throughout the construction of Read's operator: + +* `ReadL1.l1Lift`: an operator from bounded images of the basis vectors, with norm at most the + bound (`ReadL1.norm_l1Lift_le`); +* `ReadL1.opNorm_le_of_forall_single`: the norm of an operator on ℓ¹ is at most any bound on the + norms of the images of the basis vectors. (It is in fact equal to their supremum.) + +We did not find either in Mathlib at the pinned version (searched `Mathlib/Analysis/Normed/Lp` +and `Mathlib/Analysis/InnerProductSpace/l2Space.lean`, which have `lp.evalCLM` and +`lp.singleContinuousLinearMap` but no operator built from images of the basis vectors). +-/ + +@[expose] public section + +namespace ReadL1 + +open scoped ENNReal + +/-- The space ℓ¹(ℕ, ℂ) of absolutely summable complex sequences, written as in Formal +Conjectures. -/ +abbrev L1 : Type := lp (fun _ : ℕ => ℂ) 1 + +/-- The standard basis vector `δᵢ` of ℓ¹. -/ +noncomputable abbrev δ (i : ℕ) : L1 := lp.single 1 i (1 : ℂ) + +/-- The coordinates of an element of ℓ¹ are absolutely summable. -/ +lemma summable_norm (x : L1) : Summable fun i => ‖x i‖ := by + simpa using (memℓp_gen_iff (p := 1) (by norm_num)).1 (lp.memℓp x) + +/-- The ℓ¹ norm is the sum of the absolute values of the coordinates. -/ +lemma norm_eq_tsum (x : L1) : ‖x‖ = ∑' i, ‖x i‖ := by + simpa using lp.norm_eq_tsum_rpow (p := 1) (by norm_num) x + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℂ X] [CompleteSpace X] + +omit [CompleteSpace X] in +/-- The series `∑ xᵢ uᵢ` converges absolutely when the `uᵢ` are bounded. -/ +lemma summable_norm_smul {u : ℕ → X} {C : ℝ} (hu : ∀ i, ‖u i‖ ≤ C) (x : L1) : + Summable fun i => ‖x i • u i‖ := + ((summable_norm x).mul_right C).of_nonneg_of_le (fun _ ↦ norm_nonneg _) + fun i ↦ by rw [norm_smul]; exact mul_le_mul_of_nonneg_left (hu i) (norm_nonneg _) + +lemma summable_smul {u : ℕ → X} {C : ℝ} (hu : ∀ i, ‖u i‖ ≤ C) (x : L1) : + Summable fun i => x i • u i := + (summable_norm_smul hu x).of_norm + +/-- The linear map `x ↦ ∑ xᵢ uᵢ`. -/ +noncomputable def l1LiftLinear (u : ℕ → X) (C : ℝ) (hu : ∀ i, ‖u i‖ ≤ C) : L1 →ₗ[ℂ] X where + toFun x := ∑' i, x i • u i + map_add' x y := by + simp only [lp.coeFn_add, Pi.add_apply, add_smul] + exact (summable_smul hu x).tsum_add (summable_smul hu y) + map_smul' c x := by + simp only [lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, mul_smul, RingHom.id_apply] + exact (summable_smul hu x).tsum_const_smul c + +/-- The bound: `‖∑ xᵢ uᵢ‖ ≤ ∑ ‖xᵢ‖ C = C ‖x‖`. -/ +lemma norm_l1LiftLinear_le (u : ℕ → X) (C : ℝ) (hu : ∀ i, ‖u i‖ ≤ C) (x : L1) : + ‖l1LiftLinear u C hu x‖ ≤ C * ‖x‖ := by + have hterm : ∀ i, ‖x i • u i‖ ≤ C * ‖x i‖ := fun i ↦ by + rw [norm_smul, mul_comm] + exact mul_le_mul_of_nonneg_right (hu i) (norm_nonneg _) + change ‖∑' i, x i • u i‖ ≤ C * ‖x‖ + calc ‖∑' i, x i • u i‖ ≤ ∑' i, ‖x i • u i‖ := norm_tsum_le_tsum_norm (summable_norm_smul hu x) + _ ≤ ∑' i, C * ‖x i‖ := + Summable.tsum_le_tsum hterm (summable_norm_smul hu x) ((summable_norm x).mul_left C) + _ = C * ‖x‖ := by rw [tsum_mul_left, norm_eq_tsum] + +/-- **The operator on ℓ¹ with prescribed bounded images `uᵢ` of the basis vectors.** -/ +noncomputable def l1Lift (u : ℕ → X) (C : ℝ) (hu : ∀ i, ‖u i‖ ≤ C) : L1 →L[ℂ] X := + (l1LiftLinear u C hu).mkContinuous C (norm_l1LiftLinear_le u C hu) + +lemma l1Lift_apply (u : ℕ → X) (C : ℝ) (hu : ∀ i, ‖u i‖ ≤ C) (x : L1) : + l1Lift u C hu x = ∑' i, x i • u i := rfl + +/-- `l1Lift` sends `δᵢ` to `uᵢ`. -/ +@[simp] +lemma l1Lift_single (u : ℕ → X) (C : ℝ) (hu : ∀ i, ‖u i‖ ≤ C) (i : ℕ) : + l1Lift u C hu (δ i) = u i := by + rw [l1Lift_apply, tsum_eq_single i] + · simp + · intro j hj + simp [lp.single_apply, hj] + +/-- `l1Lift` has norm at most the bound on the images. -/ +lemma norm_l1Lift_le (u : ℕ → X) (C : ℝ) (hu : ∀ i, ‖u i‖ ≤ C) : ‖l1Lift u C hu‖ ≤ C := + (l1LiftLinear u C hu).mkContinuous_norm_le ((norm_nonneg _).trans (hu 0)) + (norm_l1LiftLinear_le u C hu) + +/-- Every operator on ℓ¹ is the lift of its images of the basis vectors. -/ +lemma eq_l1Lift (A : L1 →L[ℂ] X) (C : ℝ) (hA : ∀ i, ‖A (δ i)‖ ≤ C) : + A = l1Lift (fun i ↦ A (δ i)) C hA := by + refine lp.ext_continuousLinearMap ENNReal.one_ne_top fun i ↦ ?_ + -- Maps out of `ℂ` agree once they agree at `1`, and `1` goes to `δ i`. + ext + exact (l1Lift_single _ C hA i).symm + +/-- **The norm of an operator on ℓ¹ is at most any bound on the images of the basis vectors.** -/ +lemma opNorm_le_of_forall_single (A : L1 →L[ℂ] X) (C : ℝ) (hA : ∀ i, ‖A (δ i)‖ ≤ C) : + ‖A‖ ≤ C := by + rw [eq_l1Lift A C hA] + exact norm_l1Lift_le _ C hA + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma1.lean b/LeanPool/ReadL1/Lemma1.lean new file mode 100644 index 0000000000..b7392a7319 --- /dev/null +++ b/LeanPool/ReadL1/Lemma1.lean @@ -0,0 +1,256 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma2 +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.GCongr + +/-! +# Śliwa's Lemma 1 (a): the size of `xⁱ` + +With `Aₘ = α^{√aₘ}` and `Bₘ = α^{√bₘ}`, Śliwa (pp. 629–630) shows for `m ≥ 2` + +* `‖xⁱ‖ ≤ Aₘ` for `i ≤ (m - 1)aₘ`, and +* `‖xⁱ‖ ≤ Bₘ` for `i ≤ vₘ`, + +by induction on `m`: going from `vₘ` up to `m aₘ₊₁` crosses the `J` and `I` blocks of level +`m + 1`, and from there up to `vₘ₊₁` the `L` and `K` blocks. On a `J` block `‖xⁱ‖` is at most +`α^{√c/2}` and on an `L` block at most `α^{√c}`; on an `I` block Lemma 1 (b) compares `xⁱ` with +a power at most `vₘ`; on a `K` block with a power at most `m aₘ₊₁`. (The statement holds for +`m = 1` too, where both ranges are `{0}`.) +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-- `Aₘ = α^{√aₘ}`. -/ +noncomputable def capA (d : ℕ → ℕ) (m : ℕ) : ℝ := alpha ^ Real.sqrt (seqA d m) + +/-- `Bₘ = α^{√bₘ}`. -/ +noncomputable def capB (d : ℕ → ℕ) (m : ℕ) : ℝ := alpha ^ Real.sqrt (seqB d m) + +lemma one_le_alpha_rpow {x : ℝ} (hx : 0 ≤ x) : 1 ≤ alpha ^ x := + Real.one_le_rpow one_le_alpha hx + +lemma one_le_capA (m : ℕ) : 1 ≤ capA d m := one_le_alpha_rpow (Real.sqrt_nonneg _) + +lemma one_le_capB (m : ℕ) : 1 ≤ capB d m := one_le_alpha_rpow (Real.sqrt_nonneg _) + +/-- If the numerator `N` of the weight exponent is at least `-c`, then `-N/√(4c) ≤ √c/2`. -/ +lemma neg_exponent_le_half {c : ℕ} (hc : 0 < c) {N : ℝ} (hN : -(c : ℝ) ≤ N) : + -(N / Real.sqrt (4 * c)) ≤ Real.sqrt c / 2 := by + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + have hsq : Real.sqrt c * Real.sqrt c = c := Real.mul_self_sqrt (by positivity) + rw [sqrt_four_mul] + calc -(N / (2 * Real.sqrt c)) = -N / (2 * Real.sqrt c) := by ring + _ ≤ c / (2 * Real.sqrt c) := by gcongr; linarith + _ = Real.sqrt c / 2 := by + rw [div_eq_div_iff (by positivity) (by norm_num)]; nlinarith [hsq] + +/-- If the numerator `N` of the weight exponent is at least `-2c`, then `-N/√(4c) ≤ √c`. -/ +lemma neg_exponent_le_sqrt {c : ℕ} (hc : 0 < c) {N : ℝ} (hN : -(2 * c : ℝ) ≤ N) : + -(N / Real.sqrt (4 * c)) ≤ Real.sqrt c := by + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + have hsq : Real.sqrt c * Real.sqrt c = c := Real.mul_self_sqrt (by positivity) + rw [sqrt_four_mul] + calc -(N / (2 * Real.sqrt c)) = -N / (2 * Real.sqrt c) := by ring + _ ≤ (2 * c) / (2 * Real.sqrt c) := by gcongr; linarith + _ = Real.sqrt c := by + rw [div_eq_iff (by positivity)]; nlinarith [hsq] + +/-- On a `J` block, `‖xⁱ‖ ≤ α^{√aₙ/2}`: the exponent's numerator is at least `2 - aₙ`. -/ +lemma nrm_xPow_J_le_half (h : PartitionHyp d) {n r i : ℕ} (hB : (⟨n, r, .J⟩ : Block).Mem d i) : + nrm (xPow d i) ≤ alpha ^ (Real.sqrt (seqA d n) / 2) := by + have hhi : i < r * seqA d n := hB.2.2.2 + have ha : 0 < seqA d n := h.one_le_a n + rw [nrm_xPow_of_J h hB rfl, inv_weight] + refine alpha_rpow_le (neg_exponent_le_half ha ?_) + have hi : (i : ℝ) + 1 ≤ r * seqA d n := by exact_mod_cast hhi + dsimp only + nlinarith + +/-- On an `L` block, `‖xⁱ‖ ≤ α^{√bₙ}`: the exponent's numerator is at least `-bₙ - 2r aₙ`, and +`2r aₙ < bₙ`. -/ +lemma nrm_xPow_L_le_sqrt (h : GrowthHyp d) {n r i : ℕ} (hB : (⟨n, r, .L⟩ : Block).Mem d i) : + nrm (xPow d i) ≤ alpha ^ Real.sqrt (seqB d n) := by + have hhi : i < r * (seqA d n + seqB d n) := hB.2.2.2 + have hlo : (n - 1) * seqA d n + (r - 1) * seqB d n < i := hB.2.2.1 + have hr1 : 1 ≤ r := hB.1 + have hrn : r < n := hB.2.1 + have hb : 0 < seqB d n := lt_of_lt_of_le two_pos (h.two_le_b n) + rw [nrm_xPow_of_L h.toPartitionHyp hB rfl, inv_weight] + refine alpha_rpow_le (neg_exponent_le_sqrt hb ?_) + dsimp only + -- `i + 1 ≤ r aₙ + r bₙ` and `2r aₙ ≤ 2(n - 1)aₙ < bₙ`. + have hi : (i : ℝ) + 1 ≤ r * seqA d n + r * seqB d n := by + have : i + 1 ≤ r * seqA d n + r * seqB d n := by nlinarith + exact_mod_cast this + have hra : 2 * r * seqA d n < seqB d n := by + have := h.a_small n (by omega) + have : r * seqA d n ≤ n * seqA d n := Nat.mul_le_mul_right _ (by omega) + nlinarith + have hraR : (2 * r * seqA d n : ℝ) < seqB d n := by exact_mod_cast hra + nlinarith + +/-- On an `I` block, `‖xⁱ‖ ≤ 2 + ‖x^{i - r aₙ}‖` (Lemma 1 (b)). -/ +lemma nrm_xPow_I_le (h : GrowthHyp d) {n r i : ℕ} (hB : (⟨n, r, .I⟩ : Block).Mem d i) : + nrm (xPow d i) ≤ 2 + nrm (xPow d (i - r * seqA d n)) := by + have h1 := nrm_xPow_sub_of_I h hB + have ha : (1 : ℝ) ≤ seqA d (n - r) := by exact_mod_cast h.one_le_a _ + have h2 : 2 / (seqA d (n - r) : ℝ) ≤ 2 := by + rw [div_le_iff₀ (by linarith)]; nlinarith + calc nrm (xPow d i) + = nrm ((xPow d i - xPow d (i - r * seqA d n)) + xPow d (i - r * seqA d n)) := by + rw [sub_add_cancel] + _ ≤ nrm (xPow d i - xPow d (i - r * seqA d n)) + nrm (xPow d (i - r * seqA d n)) := + nrm_add_le _ _ + _ ≤ 2 + nrm (xPow d (i - r * seqA d n)) := by linarith + +/-- On a `K` block, `‖xⁱ‖ ≤ 2bₙ^{r-1} + bₙʳ ‖x^{i - r bₙ}‖` (Lemma 1 (b)). -/ +lemma nrm_xPow_K_le (h : GrowthHyp d) {n r i : ℕ} (hB : (⟨n, r, .K⟩ : Block).Mem d i) : + nrm (xPow d i) ≤ + 2 * (seqB d n : ℝ) ^ (r - 1) + (seqB d n : ℝ) ^ r * nrm (xPow d (i - r * seqB d n)) := by + have h1 := nrm_xPow_sub_of_K h hB + calc nrm (xPow d i) + = nrm ((xPow d i - (seqB d n : ℂ) ^ r • xPow d (i - r * seqB d n)) + + (seqB d n : ℂ) ^ r • xPow d (i - r * seqB d n)) := by rw [sub_add_cancel] + _ ≤ nrm (xPow d i - (seqB d n : ℂ) ^ r • xPow d (i - r * seqB d n)) + + nrm ((seqB d n : ℂ) ^ r • xPow d (i - r * seqB d n)) := nrm_add_le _ _ + _ ≤ 2 * (seqB d n : ℝ) ^ (r - 1) + + (seqB d n : ℝ) ^ r * nrm (xPow d (i - r * seqB d n)) := by + rw [nrm_smul, norm_pow, Complex.norm_natCast]; linarith + +/-- An index in `(vₘ, vₘ₊₁]` lies in a block of level `m + 1`. -/ +lemma block_level (h : PartitionHyp d) {m i : ℕ} (hm : 1 ≤ m) (hlo : seqV d m < i) + (hhi : i ≤ seqV d (m + 1)) : (block d i).n = m + 1 := by + have hB := block_mem h (i := i) (by omega) + obtain ⟨hBlo, hBhi, -⟩ := (block d i).mem_level h hB + exact level_unique h (Block.two_le_n hB) (by omega) ⟨hBlo, hBhi⟩ + ⟨by simpa using hlo, hhi⟩ + +/-- **Śliwa's Lemma 1 (a).** -/ +theorem nrm_xPow_le_cap (h : GrowthHyp d) (m : ℕ) (hm : 1 ≤ m) : + (∀ i ≤ (m - 1) * seqA d m, nrm (xPow d i) ≤ capA d m) ∧ + (∀ i ≤ seqV d m, nrm (xPow d i) ≤ capB d m) := by + have hP := h.toPartitionHyp + induction m, hm using Nat.le_induction with + | base => + -- Both ranges are `{0}`, and `‖x⁰‖ = 1`. + have h0 : nrm (xPow d 0) = 1 := by rw [xPow, nrm_single, norm_one] + refine ⟨fun i hi ↦ ?_, fun i hi ↦ ?_⟩ + · rw [show i = 0 by simpa using hi, h0]; exact one_le_capA 1 + · rw [show i = 0 by simpa [seqV_one] using hi, h0]; exact one_le_capB 1 + | succ m hm ih => + obtain ⟨-, ihB⟩ := ih + -- Below `vₘ`, use `Bₘ ≤ Aₘ₊₁ ≤ Bₘ₊₁`. + have hBA : capB d m ≤ capA d (m + 1) := by + have := h.rpow_b_add_two_le m hm; unfold capB capA; linarith + have hAB : capA d (m + 1) ≤ capB d (m + 1) := by + refine alpha_rpow_le (Real.sqrt_le_sqrt ?_) + have := h.a_small (m + 1) (by omega) + have : seqA d (m + 1) ≤ seqB d (m + 1) := by nlinarith + exact_mod_cast this + -- The `X` side of level `m + 1`. + have hA : ∀ i ≤ m * seqA d (m + 1), nrm (xPow d i) ≤ capA d (m + 1) := by + intro i hi + rcases le_or_gt i (seqV d m) with hv | hv + · exact (ihB i hv).trans hBA + have hvn : i ≤ seqV d (m + 1) := by + have : m * seqA d (m + 1) ≤ seqV d (m + 1) := by + unfold seqV; simp only [Nat.add_sub_cancel]; nlinarith + omega + have hn := block_level hP hm hv hvn + have hB := block_mem hP (i := i) (by omega) + have hside := ((block d i).mem_level hP hB).2.2 + rw [hn, Nat.add_sub_cancel] at hside + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB hn hside + dsimp only at hn hside + subst hn + cases k with + | J => + refine (nrm_xPow_J_le_half hP hB).trans (alpha_rpow_le ?_) + have := Real.sqrt_nonneg (seqA d (m + 1) : ℝ); linarith + | I => + -- `i - r aₘ₊₁ ≤ vₘ₊₁₋ᵣ₋₁ ≤ vₘ`. + have hdown : i - r * seqA d (m + 1) ≤ seqV d m := by + obtain ⟨hr1, hrn, hlo', hhi'⟩ := hB + dsimp only at hr1 hrn hlo' hhi' + have := seqV_mono hP (show m + 1 - r - 1 ≤ m by omega) + omega + refine (nrm_xPow_I_le h hB).trans ?_ + have := ihB _ hdown + have := h.rpow_b_add_two_le m hm + unfold capB at *; unfold capA; linarith + | L => simp at hside; omega + | K => simp at hside; omega + refine ⟨fun i hi ↦ hA i (by simpa using hi), fun i hi ↦ ?_⟩ + rcases le_or_gt i (m * seqA d (m + 1)) with hX | hX + · exact (hA i hX).trans hAB + -- The `Y` side of level `m + 1`. + have hvm : seqV d m < i := by + have := hP.v_lt_a (m + 1) m (by omega) + have : seqA d (m + 1) ≤ m * seqA d (m + 1) := Nat.le_mul_of_pos_left _ hm + omega + have hn := block_level hP hm hvm hi + have hB := block_mem hP (i := i) (by omega) + have hside := ((block d i).mem_level hP hB).2.2 + rw [hn, Nat.add_sub_cancel] at hside + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB hn hside + dsimp only at hn hside + subst hn + cases k with + | J => simp at hside; omega + | I => simp at hside; omega + | L => + exact nrm_xPow_L_le_sqrt h hB + | K => + -- `i - r bₘ₊₁ ∈ [r aₘ₊₁, m aₘ₊₁]`, where `‖·‖ ≤ Aₘ₊₁`. + obtain ⟨hr1, hrn, hlo', hhi'⟩ := id hB + dsimp only at hr1 hrn hlo' hhi' + have hdown : i - r * seqB d (m + 1) ≤ m * seqA d (m + 1) := by + rw [Nat.add_sub_cancel] at hhi'; omega + have hxA := hA _ hdown + have hb : (1 : ℝ) ≤ seqB d (m + 1) := by + exact_mod_cast (show 1 ≤ seqB d (m + 1) by have := h.two_le_b (m + 1); omega) + have hbpow : (seqB d (m + 1) : ℝ) ^ (r - 1) ≤ (seqB d (m + 1) : ℝ) ^ (m + 1) := + pow_le_pow_right₀ hb (by omega) + have hbpow' : (seqB d (m + 1) : ℝ) ^ r ≤ (seqB d (m + 1) : ℝ) ^ (m + 1) := + pow_le_pow_right₀ hb (by omega) + have h3 := h.three_pow_rpow_a_le (m + 1) (by omega) + have hA1 := one_le_capA (d := d) (m + 1) + refine (nrm_xPow_K_le h hB).trans ?_ + unfold capB + unfold capA at hxA hA1 + have hpos : (0 : ℝ) ≤ (seqB d (m + 1) : ℝ) ^ r := by positivity + calc 2 * (seqB d (m + 1) : ℝ) ^ (r - 1) + (seqB d (m + 1) : ℝ) ^ r * + nrm (xPow d (i - r * seqB d (m + 1))) + ≤ 2 * (seqB d (m + 1) : ℝ) ^ (m + 1) * alpha ^ Real.sqrt (seqA d (m + 1)) + + (seqB d (m + 1) : ℝ) ^ (m + 1) * alpha ^ Real.sqrt (seqA d (m + 1)) := by + have h1 : (seqB d (m + 1) : ℝ) ^ (r - 1) ≤ + (seqB d (m + 1) : ℝ) ^ (m + 1) * alpha ^ Real.sqrt (seqA d (m + 1)) := + hbpow.trans (le_mul_of_one_le_right (by positivity) hA1) + have h2 : (seqB d (m + 1) : ℝ) ^ r * nrm (xPow d (i - r * seqB d (m + 1))) ≤ + (seqB d (m + 1) : ℝ) ^ (m + 1) * alpha ^ Real.sqrt (seqA d (m + 1)) := + mul_le_mul hbpow' hxA (nrm_nonneg _) (by positivity) + linarith + _ = 3 * (seqB d (m + 1) : ℝ) ^ (m + 1) * alpha ^ Real.sqrt (seqA d (m + 1)) := by ring + _ ≤ alpha ^ Real.sqrt (seqB d (m + 1)) := h3 + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma2.lean b/LeanPool/ReadL1/Lemma2.lean new file mode 100644 index 0000000000..cfa4db933d --- /dev/null +++ b/LeanPool/ReadL1/Lemma2.lean @@ -0,0 +1,623 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Norm +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.GCongr + +/-! +# Śliwa's Lemma 2: the operator is bounded + +Śliwa (pp. 630–632) shows `‖T fᵢ‖ ≤ α` for every `i`, by four cases (the block of `i`), each split +in two: `i` inside its block, where `T fᵢ` is a multiple of `fᵢ₊₁`, and `i` at the right end of its +block, where `x fᵢ` crosses into the next block. The boundary subcases are where the growth facts +are used, and give the sharper bounds of his Remark 3 (p. 632), which Lemma 4 needs later. + +In coordinates `fᵢ = δᵢ` and `T fᵢ = shiftImage i`, so the statement is +`nrm (shiftImage d i) ≤ α`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-! ### `T fᵢ` block by block -/ + +lemma shiftImage_of_J (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .J) : shiftImage d i = (weight (seqA d B.n) B.r i : ℂ) • xPow d (i + 1) := by + have hi := Block.one_le_of_mem h hB + rw [shiftImage, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma shiftImage_of_L (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .L) : shiftImage d i = (weight (seqB d B.n) B.r i : ℂ) • xPow d (i + 1) := by + have hi := Block.one_le_of_mem h hB + rw [shiftImage, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma shiftImage_of_I (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .I) : shiftImage d i = + (seqA d (B.n - B.r) : ℂ) • (xPow d (i + 1) - xPow d (i + 1 - seqA d B.n)) := by + have hi := Block.one_le_of_mem h hB + rw [shiftImage, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +lemma shiftImage_of_K (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .K) : shiftImage d i = + xPow d (i + 1) - (seqB d B.n : ℂ) • xPow d (i + 1 - seqB d B.n) := by + have hi := Block.one_le_of_mem h hB + rw [shiftImage, ite_eq_right (by omega), block_eq h hB]; simp [hk] + +/-! ### Inside a block -/ + +/-- **Case 1.1°:** inside `Jₙ,ᵣ`, `T fᵢ = α^{1/√aₙ} fᵢ₊₁`. -/ +lemma nrm_shiftImage_J_inner (h : PartitionHyp d) {n r i : ℕ} + (hB : (⟨n, r, .J⟩ : Block).Mem d i) (hi : i + 1 < r * seqA d n) : + nrm (shiftImage d i) ≤ alpha := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hB' : (⟨n, r, .J⟩ : Block).Mem d (i + 1) := ⟨hr1, hrn, by dsimp; omega, hi⟩ + have ha : 0 < seqA d n := h.one_le_a n + rw [shiftImage_of_J h hB rfl, nrm_smul, nrm_xPow_of_J h hB' rfl] + dsimp only + rw [Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le, + weight_eq_mul_succ ha, mul_assoc, mul_inv_cancel₀ (weight_pos _ _ _).ne', mul_one] + -- `α^{1/√aₙ} ≤ α` as `aₙ ≥ 1`. + calc alpha ^ (1 / Real.sqrt (seqA d n)) ≤ alpha ^ (1 : ℝ) := by + refine alpha_rpow_le ?_ + rw [div_le_one (Real.sqrt_pos.2 (by exact_mod_cast ha))] + exact Real.one_le_sqrt.2 (by exact_mod_cast ha) + _ = alpha := Real.rpow_one _ + +/-- **Case 3.1°:** inside `Lₙ,ᵣ`, `T fᵢ = α^{1/√bₙ} fᵢ₊₁`. -/ +lemma nrm_shiftImage_L_inner (h : GrowthHyp d) {n r i : ℕ} + (hB : (⟨n, r, .L⟩ : Block).Mem d i) (hi : i + 1 < r * (seqA d n + seqB d n)) : + nrm (shiftImage d i) ≤ alpha := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hB' : (⟨n, r, .L⟩ : Block).Mem d (i + 1) := ⟨hr1, hrn, by dsimp; omega, hi⟩ + have hb : 0 < seqB d n := by have := h.two_le_b n; omega + rw [shiftImage_of_L h.toPartitionHyp hB rfl, nrm_smul, + nrm_xPow_of_L h.toPartitionHyp hB' rfl] + dsimp only + rw [Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le, + weight_eq_mul_succ hb, mul_assoc, mul_inv_cancel₀ (weight_pos _ _ _).ne', mul_one] + calc alpha ^ (1 / Real.sqrt (seqB d n)) ≤ alpha ^ (1 : ℝ) := by + refine alpha_rpow_le ?_ + rw [div_le_one (Real.sqrt_pos.2 (by exact_mod_cast hb))] + exact Real.one_le_sqrt.2 (by exact_mod_cast hb) + _ = alpha := Real.rpow_one _ + +/-- **Case 2.1°:** inside `Iₙ,ᵣ`, `T fᵢ = fᵢ₊₁`. -/ +lemma shiftImage_I_inner (h : PartitionHyp d) {n r i : ℕ} + (hB : (⟨n, r, .I⟩ : Block).Mem d i) (hi : i < r * seqA d n + seqV d (n - r - 1)) : + shiftImage d i = single (i + 1) 1 := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hB' : (⟨n, r, .I⟩ : Block).Mem d (i + 1) := ⟨hr1, hrn, by dsimp; omega, by dsimp; omega⟩ + have ha' : (seqA d (n - r) : ℂ) ≠ 0 := + Nat.cast_ne_zero.2 (Nat.one_le_iff_ne_zero.1 (h.one_le_a _)) + rw [shiftImage_of_I h hB rfl, xPow_of_I h hB' rfl] + dsimp only + rw [add_sub_cancel_right, smul_smul, mul_inv_cancel₀ ha', one_smul] + +/-- **Case 4.1°:** inside `Kₙ,ᵣ`, `T fᵢ = fᵢ₊₁`. -/ +lemma shiftImage_K_inner (h : PartitionHyp d) {n r i : ℕ} + (hB : (⟨n, r, .K⟩ : Block).Mem d i) (hi : i < (n - 1) * seqA d n + r * seqB d n) : + shiftImage d i = single (i + 1) 1 := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hB' : (⟨n, r, .K⟩ : Block).Mem d (i + 1) := ⟨hr1, hrn, by dsimp; omega, by dsimp; omega⟩ + rw [shiftImage_of_K h hB rfl, xPow_of_K h hB' rfl] + dsimp only + rw [add_sub_cancel_right] + +/-! ### Facts about powers of `α` used at the block boundaries -/ + +/-- `α^{-√c/4}` decreases as `c` grows. -/ +lemma rpow_neg_sqrt_anti {c c' : ℝ} (hcc : c ≤ c') : + alpha ^ (-(Real.sqrt c' / 4)) ≤ alpha ^ (-(Real.sqrt c / 4)) := + alpha_rpow_le (neg_le_neg (div_le_div_of_nonneg_right (Real.sqrt_le_sqrt hcc) (by norm_num))) + +/-- Śliwa's `α c² < α^{√c/4}`, rearranged: `c² α^{-√c/4} < 1/α`. -/ +lemma sq_mul_rpow_lt {c : ℝ} (hc : alpha * c ^ 2 < alpha ^ (Real.sqrt c / 4)) : + c ^ 2 * alpha ^ (-(Real.sqrt c / 4)) < 1 / alpha := by + have hp : 0 < alpha ^ (Real.sqrt c / 4) := Real.rpow_pos_of_pos alpha_pos _ + rw [Real.rpow_neg alpha_pos.le, ← div_eq_mul_inv, div_lt_div_iff₀ hp alpha_pos] + linarith + +/-- `α^{1 - √c/2} = α (α^{-√c/4})²`. -/ +lemma rpow_one_sub_half (c : ℝ) : + alpha ^ (1 - Real.sqrt c / 2) = alpha * (alpha ^ (-(Real.sqrt c / 4)) * + alpha ^ (-(Real.sqrt c / 4))) := by + rw [show 1 - Real.sqrt c / 2 = 1 + (-(Real.sqrt c / 4)) + (-(Real.sqrt c / 4)) by ring, + Real.rpow_add alpha_pos, Real.rpow_add alpha_pos, Real.rpow_one, mul_assoc] + +/-- The weight at an index past `r c - 1` is at most `α^{1 - √c/2}`. -/ +lemma weight_le_of_ge {c r i : ℕ} (hc : 1 ≤ c) (hi : (r : ℝ) * c ≤ i + 1) : + weight c r i ≤ alpha ^ (1 - Real.sqrt c / 2) := by + have hs : 1 ≤ Real.sqrt c := Real.one_le_sqrt.2 (by exact_mod_cast hc) + refine alpha_rpow_le ?_ + rw [sqrt_four_mul, div_le_iff₀ (by positivity)] + have hsq : Real.sqrt c * Real.sqrt c = c := Real.mul_self_sqrt (by positivity) + nlinarith only [hi, hs, hsq] + +/-- On a `J` or `L` block, at its last index `i = r c - 1` the weight is at most `α^{1 - √c/2}`. -/ +lemma weight_last_le {c r i : ℕ} (hc : 1 ≤ c) (hi : (i : ℝ) + 1 = r * c) : + weight c r i ≤ alpha ^ (1 - Real.sqrt c / 2) := + weight_le_of_ge hc hi.ge + +/-- `‖x^{r aₙ}‖ ≤ 2`: `r aₙ` is the first point of `Iₙ,ᵣ`, and Lemma 1 (b) compares `x^{r aₙ}` +with `x⁰`. -/ +lemma nrm_xPow_mul_a_le (h : GrowthHyp d) {n r : ℕ} (hr1 : 1 ≤ r) (hrn : r < n) : + nrm (xPow d (r * seqA d n)) ≤ 2 := by + have hB : (⟨n, r, .I⟩ : Block).Mem d (r * seqA d n) := + ⟨hr1, hrn, le_rfl, by dsimp; omega⟩ + have h1 := nrm_xPow_sub_of_I h hB + rw [Nat.sub_self, show xPow d 0 = single 0 1 by rw [xPow]] at h1 + have ha : (2 : ℝ) ≤ seqA d (n - r) := by + have := h.a_big (n - r) (by omega); exact_mod_cast (show 2 ≤ seqA d (n - r) by omega) + have h2 : 2 / (seqA d (n - r) : ℝ) ≤ 1 := by rw [div_le_one (by linarith)]; exact ha + calc nrm (xPow d (r * seqA d n)) + = nrm ((xPow d (r * seqA d n) - single 0 1) + single 0 1) := by rw [sub_add_cancel] + _ ≤ nrm (xPow d (r * seqA d n) - single 0 1) + nrm (single 0 1) := nrm_add_le _ _ + _ ≤ 2 / seqA d (n - r) + 1 := by rw [nrm_single, norm_one]; linarith + _ ≤ 2 := by linarith + +/-! ### At the end of a block -/ + +/-- **Case 1.2° (Remark 3):** at the last index of `Jₙ,ᵣ`, `‖T fᵢ‖ ≤ 1/aₙ`. -/ +lemma nrm_shiftImage_J_last (h : GrowthHyp d) {n r i : ℕ} + (hB : (⟨n, r, .J⟩ : Block).Mem d i) (hi : i + 1 = r * seqA d n) : + nrm (shiftImage d i) ≤ 1 / seqA d n := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have ha1 : 1 ≤ seqA d n := h.one_le_a n + have ha : (1 : ℝ) ≤ seqA d n := by exact_mod_cast ha1 + rw [shiftImage_of_J h.toPartitionHyp hB rfl, nrm_smul, hi] + dsimp only + rw [Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le] + have hw := weight_last_le (c := seqA d n) (r := r) (i := i) ha1 (by exact_mod_cast hi) + rw [rpow_one_sub_half] at hw + have hx := nrm_xPow_mul_a_le h hr1 hrn + have hx0 := nrm_nonneg (xPow d (r * seqA d n)) + have hsmall := sq_mul_rpow_lt (h.rpow_a n (by omega)) + set s := alpha ^ (-(Real.sqrt (seqA d n) / 4)) with hs + have hs0 : 0 < s := Real.rpow_pos_of_pos alpha_pos _ + -- `‖T fᵢ‖ ≤ 2 α s²`, and `aₙ² s < 1/α` makes `2 α s² aₙ ≤ 1`. + have hα : alpha = 8 := rfl + have hαs : 0 ≤ alpha * (s * s) := by rw [hα]; positivity + rw [hα] at hsmall + rw [le_div_iff₀ (by linarith)] + have ha4 : (seqA d n : ℝ) ≤ (seqA d n : ℝ) ^ 4 := by + have : (1 : ℝ) ≤ (seqA d n : ℝ) ^ 3 := one_le_pow₀ ha + nlinarith + have hsq : ((seqA d n : ℝ) ^ 2 * s) ^ 2 < (1 / 8) ^ 2 := by + have : 0 ≤ (seqA d n : ℝ) ^ 2 * s := by positivity + exact pow_lt_pow_left₀ hsmall this (by norm_num) + calc weight (seqA d n) r i * nrm (xPow d (r * seqA d n)) * seqA d n + ≤ (alpha * (s * s)) * 2 * seqA d n := by gcongr + _ = (8 * (s * s)) * 2 * seqA d n := by rw [hα] + _ ≤ 16 * ((seqA d n : ℝ) ^ 4 * (s * s)) := by nlinarith + _ = 16 * (((seqA d n : ℝ) ^ 2 * s) ^ 2) := by ring + _ ≤ 1 := by nlinarith + +/-- On a `J` block, `‖xᵐ‖ ≤ α^{-√aₙ/4}` once the exponent's numerator is at least `aₙ / 2`. -/ +lemma nrm_xPow_J_le (h : PartitionHyp d) {N R m : ℕ} (hB : (⟨N, R, .J⟩ : Block).Mem d m) + (hE : (seqA d N : ℝ) / 2 ≤ (2 * (R : ℝ) - 1) * seqA d N - 2 * m) : + nrm (xPow d m) ≤ alpha ^ (-(Real.sqrt (seqA d N) / 4)) := by + rw [nrm_xPow_of_J h hB rfl] + exact inv_weight_le (h.one_le_a N) hE + +/-- On an `L` block, `‖xᵐ‖ ≤ α^{-√bₙ/4}` once the exponent's numerator is at least `bₙ / 2`. -/ +lemma nrm_xPow_L_le (h : GrowthHyp d) {N R m : ℕ} (hB : (⟨N, R, .L⟩ : Block).Mem d m) + (hE : (seqB d N : ℝ) / 2 ≤ (2 * (R : ℝ) - 1) * seqB d N - 2 * m) : + nrm (xPow d m) ≤ alpha ^ (-(Real.sqrt (seqB d N) / 4)) := by + rw [nrm_xPow_of_L h.toPartitionHyp hB rfl] + exact inv_weight_le (lt_of_lt_of_le two_pos (h.two_le_b N)) hE + +/-- **Case 4.2°:** at the last index of `Kₙ,ᵣ`, `‖T fᵢ‖ ≤ 1`. Here +`T fᵢ = xⁱ⁺¹ - bₙ xʲ` with `j = i + 1 - bₙ` in `Lₙ,ᵣ`, and `i + 1` in `Lₙ,ᵣ₊₁` (or, for +`r = n - 1`, in `Jₙ₊₁,₁`); both powers have norm at most `α^{-√bₙ/4}`. -/ +lemma nrm_shiftImage_K_last (h : GrowthHyp d) {n r i : ℕ} + (hB : (⟨n, r, .K⟩ : Block).Mem d i) (hi : i = (n - 1) * seqA d n + r * seqB d n) : + nrm (shiftImage d i) ≤ 1 := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have ha := h.one_le_a n + have hb2 := h.two_le_b n + have hab := h.a_small n (by omega) + -- Linear facts for `omega`. + have e1 : (r - 1) * seqB d n + seqB d n = r * seqB d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + have e2 : (n - 1) * seqA d n + seqA d n = n * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel (by omega)] + have e3 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have e4 : r * (seqA d n + seqB d n) = r * seqA d n + r * seqB d n := by ring + have e5 : seqA d n ≤ r * seqA d n := Nat.le_mul_of_pos_left _ hr1 + set j := i + 1 - seqB d n with hj + have hjv : j = (n - 1) * seqA d n + (r - 1) * seqB d n + 1 := by omega + -- `j ∈ Lₙ,ᵣ`, with numerator `bₙ - 2(n - 1)aₙ - 2 ≥ bₙ / 2`. + have hjL : (⟨n, r, .L⟩ : Block).Mem d j := ⟨hr1, hrn, by dsimp; omega, by dsimp; omega⟩ + have hnumR : (2 * ((n : ℝ) - 1)) * seqA d n + 2 ≤ seqB d n / 2 := by + have : (8 * (n * seqA d n) : ℝ) < seqB d n := by exact_mod_cast (e3 ▸ hab) + have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast (show 1 ≤ n by omega) + have ha1 : (1 : ℝ) ≤ seqA d n := by exact_mod_cast ha + nlinarith + have hjb : nrm (xPow d j) ≤ alpha ^ (-(Real.sqrt (seqB d n) / 4)) := by + refine nrm_xPow_L_le h hjL ?_ + rw [hjv]; push_cast + rw [Nat.cast_sub (by omega), Nat.cast_sub hr1]; push_cast + nlinarith + -- `i + 1`: in `Lₙ,ᵣ₊₁` if `r < n - 1`, in `Jₙ₊₁,₁` if `r = n - 1`. + have hib : nrm (xPow d (i + 1)) ≤ alpha ^ (-(Real.sqrt (seqB d n) / 4)) := by + rcases Nat.lt_or_ge r (n - 1) with hr | hr + · have e6 : (r + 1) * (seqA d n + seqB d n) = r * seqA d n + seqA d n + r * seqB d n + + seqB d n := by ring + have hL : (⟨n, r + 1, .L⟩ : Block).Mem d (i + 1) := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.add_sub_cancel]; omega + · omega + refine nrm_xPow_L_le h hL ?_ + rw [hi]; push_cast + rw [Nat.cast_sub (by omega)]; push_cast + nlinarith + · have hrn1 : r = n - 1 := by omega + have hvn : seqV d n = (n - 1) * seqA d n + r * seqB d n := by + rw [seqV, hrn1]; ring + have hv := h.v_small (n + 1) n (by omega) + have hJ : (⟨n + 1, 1, .J⟩ : Block).Mem d (i + 1) := + ⟨le_rfl, by dsimp; omega, by dsimp; simp only [zero_mul, zero_add]; omega, + by dsimp; omega⟩ + refine (nrm_xPow_J_le h.toPartitionHyp hJ ?_).trans ?_ + · have : (8 * (seqV d n + 1) : ℝ) < seqA d (n + 1) := by exact_mod_cast hv + rw [hi, ← hvn]; push_cast; nlinarith + · refine rpow_neg_sqrt_anti ?_ + have := h.b_small n (by omega) + have : seqB d n ≤ seqA d (n + 1) := by nlinarith + exact_mod_cast this + -- Total: `‖xⁱ⁺¹‖ + bₙ ‖xʲ‖ ≤ (1 + bₙ) s ≤ 2 bₙ s ≤ 1`, as `bₙ² s < 1/8`. + have hsmall := sq_mul_rpow_lt (h.rpow_b n (by omega)) + set sb := alpha ^ (-(Real.sqrt (seqB d n) / 4)) + have hsb0 : 0 < sb := Real.rpow_pos_of_pos alpha_pos _ + have hb1 : (1 : ℝ) ≤ seqB d n := by exact_mod_cast (show 1 ≤ seqB d n by omega) + rw [shiftImage_of_K h.toPartitionHyp hB rfl] + dsimp only + calc nrm (xPow d (i + 1) - (seqB d n : ℂ) • xPow d j) + ≤ nrm (xPow d (i + 1)) + nrm ((seqB d n : ℂ) • xPow d j) := nrm_sub_le _ _ + _ = nrm (xPow d (i + 1)) + seqB d n * nrm (xPow d j) := by + rw [nrm_smul, Complex.norm_natCast] + _ ≤ sb + seqB d n * sb := by gcongr + _ ≤ 1 := by + have hα : alpha = 8 := rfl + rw [hα] at hsmall + nlinarith + +/-- `a` is monotone from index `1`. -/ +lemma seqA_mono (h : GrowthHyp d) {m m' : ℕ} (hm : 1 ≤ m) (hmm : m ≤ m') : + seqA d m ≤ seqA d m' := by + obtain ⟨j, rfl⟩ := Nat.exists_eq_add_of_le hmm + have := pow_two_mul_le_seqA h hm j + have : seqA d m ≤ 2 ^ j * seqA d m := Nat.le_mul_of_pos_left _ (by positivity) + omega + +/-- `aₖ₊₁ ≥ 8aₖ²`: from `k² aₖ² < bₖ` and `8k bₖ < aₖ₊₁`. -/ +lemma eight_sq_le_seqA_succ (h : GrowthHyp d) {k : ℕ} (hk : 1 ≤ k) : + 8 * seqA d k ^ 2 ≤ seqA d (k + 1) := by + have h1 := h.a_sq k hk + have h2 := h.b_small k hk + have : seqA d k ^ 2 ≤ k ^ 2 * seqA d k ^ 2 := Nat.le_mul_of_pos_left _ (by positivity) + have : seqB d k ≤ k * seqB d k := Nat.le_mul_of_pos_left _ hk + nlinarith + +private theorem nrm_xPow_succ_I_last (h : GrowthHyp d) {n r i : ℕ} + (hr1 : 1 ≤ r) (hrn : r < n) (hi : i = r * seqA d n + seqV d (n - r - 1)) : + nrm (xPow d (i + 1)) ≤ alpha ^ (-(Real.sqrt (seqA d (n - r)) / 4)) := by + have hP := h.toPartitionHyp + have ha := h.one_le_a n + have hab := h.a_small n (by omega) + have hvs := h.v_small n (n - r - 1) (by omega) + have e3 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have e2 : (n - 1) * seqA d n + seqA d n = n * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel (by omega)] + have ha'n : seqA d (n - r) ≤ seqA d n := seqA_mono h (by omega) (by omega) + rcases Nat.lt_or_ge r (n - 1) with hr | hr + · -- `i + 1 ∈ Jₙ,ᵣ₊₁`. + have hJ : (⟨n, r + 1, .J⟩ : Block).Mem d (i + 1) := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.add_sub_cancel, show n - (r + 1) = n - r - 1 by omega]; omega + · rw [Nat.add_mul, one_mul]; omega + refine (nrm_xPow_J_le hP hJ ?_).trans (rpow_neg_sqrt_anti (by exact_mod_cast ha'n)) + have : (8 * (seqV d (n - r - 1) + 1) : ℝ) < seqA d n := by exact_mod_cast hvs + rw [hi]; push_cast; nlinarith + · -- `r = n - 1`: `i + 1 = (n - 1)aₙ + 1 ∈ Lₙ,₁`. + have hrn1 : r = n - 1 := by omega + have hv0 : seqV d (n - r - 1) = 0 := by rw [show n - r - 1 = 0 by omega, seqV_zero] + have hL : (⟨n, 1, .L⟩ : Block).Mem d (i + 1) := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.sub_self, zero_mul, add_zero]; rw [hi, hv0, hrn1]; omega + · rw [one_mul, hi, hv0, hrn1]; omega + refine (nrm_xPow_L_le h hL ?_).trans (rpow_neg_sqrt_anti ?_) + · have : (8 * (n * seqA d n) : ℝ) < seqB d n := by exact_mod_cast (e3 ▸ hab) + have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast (show 1 ≤ n by omega) + have ha1 : (1 : ℝ) ≤ seqA d n := by exact_mod_cast ha + rw [hi, hv0, hrn1]; push_cast + rw [Nat.cast_sub (by omega)]; push_cast + nlinarith + · have : seqA d (n - r) ≤ seqB d n := by + have : seqA d n ≤ n * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + omega + exact_mod_cast this + +/-- **Case 2.2° (Remark 3):** at the last index of `Iₙ,ᵣ`, `‖T fᵢ‖ ≤ 1/aₙ₋ᵣ`. Here +`T fᵢ = aₙ₋ᵣ (xⁱ⁺¹ - xʲ)` with `j = i + 1 - aₙ`; both powers are tiny, and `aₙ₋ᵣ₊₁ ≥ 8aₙ₋ᵣ²`. -/ +lemma nrm_shiftImage_I_last (h : GrowthHyp d) {n r i : ℕ} + (hB : (⟨n, r, .I⟩ : Block).Mem d i) (hi : i = r * seqA d n + seqV d (n - r - 1)) : + nrm (shiftImage d i) ≤ 1 / seqA d (n - r) := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hP := h.toPartitionHyp + have ha := h.one_le_a n + have hab := h.a_small n (by omega) + have hvs := h.v_small n (n - r - 1) (by omega) + have e3 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have e2 : (n - 1) * seqA d n + seqA d n = n * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel (by omega)] + have ersucc : (r - 1) * seqA d n + seqA d n = r * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + set a' := seqA d (n - r) with ha' + have ha'1 : 1 ≤ n - r := by omega + have ha'n : a' ≤ seqA d n := seqA_mono h ha'1 (by omega) + set s' := alpha ^ (-(Real.sqrt a' / 4)) with hs' + have hA : nrm (xPow d (i + 1)) ≤ s' := nrm_xPow_succ_I_last h hr1 hrn hi + -- (B) `‖xʲ‖ ≤ 2/aₙ₋ᵣ₊₁ + s'`, `j = i + 1 - aₙ = (r - 1)aₙ + vₙ₋ᵣ₋₁ + 1`. + set j := i + 1 - seqA d n with hj + have hjv : j = (r - 1) * seqA d n + seqV d (n - r - 1) + 1 := by omega + have hB2 : nrm (xPow d j) ≤ 2 / seqA d (n - r + 1) + s' := by + have h2pos : (0 : ℝ) ≤ 2 / seqA d (n - r + 1) := by positivity + suffices hJ : nrm (xPow d j) ≤ s' ∨ + nrm (xPow d j) ≤ 2 / seqA d (n - r + 1) + s' by + rcases hJ with hJ | hJ <;> linarith + rcases Nat.lt_or_ge 1 r with hr1' | hr1' + · rcases Nat.lt_or_ge r (n - 1) with hr | hr + · -- `1 < r < n - 1`: `j ∈ Iₙ,ᵣ₋₁`, and Lemma 1 (b) brings it down to `vₙ₋ᵣ₋₁ + 1`. + right + have hvlt : seqV d (n - r - 1) < seqV d (n - r) := by + have := seqV_lt_succ hP (n := n - r - 1) (by omega) + rwa [show n - r - 1 + 1 = n - r by omega] at this + have hI : (⟨n, r - 1, .I⟩ : Block).Mem d j := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [hjv]; omega + · rw [hjv, show n - (r - 1) - 1 = n - r by omega]; omega + have h1b := nrm_xPow_sub_of_I h hI + rw [show n - (r - 1) = n - r + 1 by omega] at h1b + have hbot : j - (r - 1) * seqA d n = seqV d (n - r - 1) + 1 := by omega + rw [hbot] at h1b + have hv2 := h.v_small (n - r) (n - r - 1) (by omega) + have hJ : (⟨n - r, 1, .J⟩ : Block).Mem d (seqV d (n - r - 1) + 1) := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.sub_self, zero_mul, zero_add] + omega + · rw [one_mul]; omega + have hlow : nrm (xPow d (seqV d (n - r - 1) + 1)) ≤ s' := by + refine nrm_xPow_J_le hP hJ ?_ + have : (8 * (seqV d (n - r - 1) + 1) : ℝ) < seqA d (n - r) := by exact_mod_cast hv2 + push_cast; nlinarith + calc nrm (xPow d j) + = nrm ((xPow d j - xPow d (seqV d (n - r - 1) + 1)) + + xPow d (seqV d (n - r - 1) + 1)) := by rw [sub_add_cancel] + _ ≤ nrm (xPow d j - xPow d (seqV d (n - r - 1) + 1)) + + nrm (xPow d (seqV d (n - r - 1) + 1)) := nrm_add_le _ _ + _ ≤ 2 / seqA d (n - r + 1) + s' := add_le_add h1b hlow + · -- `r = n - 1 > 1`: `j = (n - 2)aₙ + 1 ∈ Jₙ,ₙ₋₁`. + left + have hrn1 : r = n - 1 := by omega + have hv0 : seqV d (n - r - 1) = 0 := by rw [show n - r - 1 = 0 by omega, seqV_zero] + have ha4 := h.a_big n (by omega) + obtain ⟨k, rfl⟩ : ∃ k, n = k + 2 := ⟨n - 2, by omega⟩ + have hjk : j = k * seqA d (k + 2) + 1 := by + rw [hjv, hv0, hrn1]; simp + have hJ : (⟨k + 2, k + 1, .J⟩ : Block).Mem d j := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [show k + 2 - (k + 1) = 1 by omega, show k + 1 - 1 = k by omega, seqV_one] + omega + · have : k * seqA d (k + 2) + seqA d (k + 2) = (k + 1) * seqA d (k + 2) := by ring + omega + refine (nrm_xPow_J_le hP hJ ?_).trans (rpow_neg_sqrt_anti (by exact_mod_cast ha'n)) + rw [hjk]; push_cast + have : (4096 : ℝ) ≤ seqA d (k + 2) := by exact_mod_cast ha4 + nlinarith + · -- `r = 1`: `j = vₙ₋₂ + 1`. + left + have hr1e : r = 1 := by omega + rcases Nat.lt_or_ge 2 n with hn | hn + · -- `n > 2`: `j ∈ Jₙ₋₁,₁`, and `aₙ₋₁ = aₙ₋ᵣ`. + have hv2 := h.v_small (n - 1) (n - 2) (by omega) + have hJ : (⟨n - 1, 1, .J⟩ : Block).Mem d j := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [hjv, hr1e, show n - 1 - 1 = n - 2 by omega]; simp + · rw [hjv, hr1e, one_mul, show n - 1 - 1 = n - 2 by omega]; simp; omega + refine (nrm_xPow_J_le hP hJ ?_).trans (le_of_eq ?_) + · have : (8 * (seqV d (n - 2) + 1) : ℝ) < seqA d (n - 1) := by exact_mod_cast hv2 + rw [hjv, hr1e, show n - 1 - 1 = n - 2 by omega]; push_cast; simp; nlinarith + · rw [hs', ha', hr1e] + · -- `n = 2`: `j = 1 ∈ J₂,₁`. + have hn2 : n = 2 := by omega + have hJ : (⟨2, 1, .J⟩ : Block).Mem d j := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [hjv, hr1e, hn2]; simp [seqV_one, seqV_zero] + · rw [hjv, hr1e, hn2]; simp [seqV_zero]; have := h.a_big 2 (by omega); omega + have ha4 := h.a_big 2 (by omega) + refine (nrm_xPow_J_le hP hJ ?_).trans (rpow_neg_sqrt_anti ?_) + · rw [hjv, hr1e, hn2]; simp [seqV_zero] + have : (4096 : ℝ) ≤ seqA d 2 := by exact_mod_cast ha4 + nlinarith + · rw [ha', hr1e, hn2]; exact_mod_cast seqA_mono h (le_refl 1) (by norm_num) + -- (C) `aₙ₋ᵣ (‖xⁱ⁺¹‖ + ‖xʲ‖) ≤ aₙ₋ᵣ (2s' + 2/aₙ₋ᵣ₊₁) ≤ 1/aₙ₋ᵣ`. + have hsmall := sq_mul_rpow_lt (h.rpow_a (n - r) ha'1) + rw [← hs', ← ha'] at hsmall + have hs0 : 0 < s' := Real.rpow_pos_of_pos alpha_pos _ + have ha'R : (1 : ℝ) ≤ a' := by exact_mod_cast h.one_le_a (n - r) + have h8 : 8 * (a' : ℝ) ^ 2 ≤ seqA d (n - r + 1) := by + exact_mod_cast eight_sq_le_seqA_succ h ha'1 + have hnext : (0 : ℝ) < seqA d (n - r + 1) := by exact_mod_cast h.one_le_a _ + rw [shiftImage_of_I hP hB rfl] + dsimp only + rw [nrm_smul, Complex.norm_natCast, le_div_iff₀ (by linarith)] + have hdiff := nrm_sub_le (xPow d (i + 1)) (xPow d j) + have hα : alpha = 8 := rfl + rw [hα] at hsmall + have hfrac : (a' : ℝ) ^ 2 * (2 / seqA d (n - r + 1)) ≤ 1 / 4 := by + rw [mul_div_assoc', div_le_div_iff₀ hnext (by norm_num)]; nlinarith + calc (a' : ℝ) * nrm (xPow d (i + 1) - xPow d j) * a' + ≤ (a' : ℝ) * (s' + (2 / seqA d (n - r + 1) + s')) * a' := by gcongr; linarith + _ = 2 * ((a' : ℝ) ^ 2 * s') + (a' : ℝ) ^ 2 * (2 / seqA d (n - r + 1)) := by ring + _ ≤ 1 := by linarith + + +/-- **Case 3.2° (Remark 3):** at the last index of `Lₙ,ᵣ`, `‖T fᵢ‖ ≤ 1/bₙ`. Here +`i + 1 = r(aₙ + bₙ)` starts `Kₙ,ᵣ`, so Lemma 1 (b) and `‖x^{r aₙ}‖ ≤ 2` give `‖xⁱ⁺¹‖ ≤ 3bₙʳ`, +against a weight of at most `α^{1 - √bₙ/2}`; Śliwa's `bₙ^{4n} < α^{√bₙ/4}` finishes. -/ +lemma nrm_shiftImage_L_last (h : GrowthHyp d) {n r i : ℕ} + (hB : (⟨n, r, .L⟩ : Block).Mem d i) (hi : i + 1 = r * (seqA d n + seqB d n)) : + nrm (shiftImage d i) ≤ 1 / seqB d n := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hP := h.toPartitionHyp + have hb2 := h.two_le_b n + have hbR : (2 : ℝ) ≤ seqB d n := by exact_mod_cast hb2 + -- `‖xⁱ⁺¹‖ ≤ 3 bₙʳ`. + have hK : (⟨n, r, .K⟩ : Block).Mem d (i + 1) := by + refine ⟨hr1, hrn, ?_, ?_⟩ <;> dsimp only <;> rw [hi] + have : r * seqA d n ≤ (n - 1) * seqA d n := Nat.mul_le_mul_right _ (by omega) + nlinarith + have h1b := nrm_xPow_sub_of_K h hK + have hdown : i + 1 - r * seqB d n = r * seqA d n := by rw [hi]; ring_nf; omega + rw [hdown] at h1b + have hra := nrm_xPow_mul_a_le h hr1 hrn + have hx : nrm (xPow d (i + 1)) ≤ 3 * (seqB d n : ℝ) ^ r := by + have hpow : 2 * (seqB d n : ℝ) ^ (r - 1) ≤ (seqB d n : ℝ) ^ r := by + have hsplit : (seqB d n : ℝ) ^ r = (seqB d n : ℝ) ^ (r - 1) * seqB d n := by + rw [← pow_succ, Nat.sub_add_cancel hr1] + rw [hsplit] + nlinarith [pow_nonneg (show (0 : ℝ) ≤ seqB d n by linarith) (r - 1)] + calc nrm (xPow d (i + 1)) + = nrm ((xPow d (i + 1) - (seqB d n : ℂ) ^ r • xPow d (r * seqA d n)) + + (seqB d n : ℂ) ^ r • xPow d (r * seqA d n)) := by rw [sub_add_cancel] + _ ≤ nrm (xPow d (i + 1) - (seqB d n : ℂ) ^ r • xPow d (r * seqA d n)) + + nrm ((seqB d n : ℂ) ^ r • xPow d (r * seqA d n)) := nrm_add_le _ _ + _ ≤ 2 * (seqB d n : ℝ) ^ (r - 1) + (seqB d n : ℝ) ^ r * 2 := by + rw [nrm_smul, norm_pow, Complex.norm_natCast] + gcongr + _ ≤ 3 * (seqB d n : ℝ) ^ r := by linarith + -- The weight is at most `α^{1 - √bₙ/2} = α s²`, and `bₙ^{4n} s < 1`. + have hw := weight_le_of_ge (c := seqB d n) (r := r) (i := i) (by omega) + (by have : (r : ℝ) * seqB d n ≤ r * (seqA d n + seqB d n) := by + have : (0 : ℝ) ≤ r * seqA d n := by positivity + nlinarith + exact_mod_cast (show ((r * seqB d n : ℕ) : ℝ) ≤ ((i + 1 : ℕ) : ℝ) by + push_cast; rw [show ((i : ℝ) + 1) = ((i + 1 : ℕ) : ℝ) by push_cast; ring, hi]; + push_cast; nlinarith [show (0 : ℝ) ≤ r * seqA d n by positivity])) + rw [rpow_one_sub_half] at hw + set s := alpha ^ (-(Real.sqrt (seqB d n) / 4)) with hs + have hs0 : 0 < s := Real.rpow_pos_of_pos alpha_pos _ + have hpb := h.pow_b n (by omega) + have hbs : (seqB d n : ℝ) ^ (4 * n) * s < 1 := by + have hp : 0 < alpha ^ (Real.sqrt (seqB d n) / 4) := Real.rpow_pos_of_pos alpha_pos _ + rw [hs, Real.rpow_neg alpha_pos.le, ← div_eq_mul_inv, div_lt_one hp]; exact hpb + -- `24 bₙ^{r+1} ≤ bₙ^{8n}`, as `8n - (r + 1) ≥ 5` and `bₙ ≥ 2`. + have h24 : 24 * (seqB d n : ℝ) ^ (r + 1) ≤ (seqB d n : ℝ) ^ (8 * n) := by + have hsplit : (seqB d n : ℝ) ^ (8 * n) = + (seqB d n : ℝ) ^ (r + 1) * (seqB d n : ℝ) ^ (8 * n - (r + 1)) := by + rw [← pow_add, Nat.add_sub_cancel' (by omega)] + have h32 : (32 : ℝ) ≤ (seqB d n : ℝ) ^ (8 * n - (r + 1)) := by + calc (32 : ℝ) = 2 ^ 5 := by norm_num + _ ≤ 2 ^ (8 * n - (r + 1)) := pow_le_pow_right₀ (by norm_num) (by omega) + _ ≤ (seqB d n : ℝ) ^ (8 * n - (r + 1)) := pow_le_pow_left₀ (by norm_num) hbR _ + rw [hsplit] + have : (0 : ℝ) ≤ (seqB d n : ℝ) ^ (r + 1) := by positivity + nlinarith + rw [shiftImage_of_L hP hB rfl] + dsimp only + rw [nrm_smul, Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le, + le_div_iff₀ (by linarith)] + have hα : alpha = 8 := rfl + have hx0 := nrm_nonneg (xPow d (i + 1)) + have hαs : 0 ≤ alpha * (s * s) := by rw [hα]; positivity + have hsq : ((seqB d n : ℝ) ^ (4 * n) * s) ^ 2 < 1 := by + have : 0 ≤ (seqB d n : ℝ) ^ (4 * n) * s := by positivity + nlinarith + calc weight (seqB d n) r i * nrm (xPow d (i + 1)) * seqB d n + ≤ (alpha * (s * s)) * (3 * (seqB d n : ℝ) ^ r) * seqB d n := by gcongr + _ = (s * s) * (24 * (seqB d n : ℝ) ^ (r + 1)) := by rw [hα, pow_succ]; ring + _ ≤ (s * s) * (seqB d n : ℝ) ^ (8 * n) := by gcongr + _ = ((seqB d n : ℝ) ^ (4 * n) * s) ^ 2 := by + rw [show 8 * n = 4 * n + 4 * n by ring, pow_add]; ring + _ ≤ 1 := hsq.le + +/-- **`i = 0`:** `T f₀ = x = α^{-(a₂ - 2)/√(4a₂)} f₁`, of norm at most `1`. -/ +lemma nrm_shiftImage_zero (h : GrowthHyp d) : nrm (shiftImage d 0) ≤ 1 := by + have hP := h.toPartitionHyp + have ha := h.a_big 2 (by norm_num) + have hJ : (⟨2, 1, .J⟩ : Block).Mem d 1 := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp [seqV_one] + · omega + rw [shiftImage, ite_eq_left rfl] + refine (nrm_xPow_J_le hP hJ ?_).trans ?_ + · have : (4096 : ℝ) ≤ seqA d 2 := by exact_mod_cast ha + push_cast; nlinarith + · calc alpha ^ (-(Real.sqrt (seqA d 2) / 4)) ≤ alpha ^ (0 : ℝ) := + alpha_rpow_le (by have := Real.sqrt_nonneg (seqA d 2 : ℝ); linarith) + _ = 1 := Real.rpow_zero _ + +/-- **Śliwa's Lemma 2: `‖T fᵢ‖ ≤ α` for every `i`.** -/ +theorem nrm_shiftImage_le (h : GrowthHyp d) (i : ℕ) : nrm (shiftImage d i) ≤ alpha := by + have hP := h.toPartitionHyp + have h1α : (1 : ℝ) ≤ alpha := one_le_alpha + rcases Nat.eq_zero_or_pos i with rfl | hi + · linarith [nrm_shiftImage_zero h] + have hB := block_mem hP hi + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB + -- A bound `≤ 1/c` with `c ≥ 1` is at most `α`. + have inv_le : ∀ c : ℕ, 1 ≤ c → (1 : ℝ) / c ≤ alpha := fun c hc ↦ by + have : (1 : ℝ) ≤ c := by exact_mod_cast hc + exact (div_le_one (by linarith)).2 this |>.trans h1α + obtain ⟨hr1, hrn, hk⟩ := id hB + dsimp only at hr1 hrn hk + cases k with + | J => + obtain ⟨hlo, hhi⟩ := hk + rcases Nat.lt_or_ge (i + 1) (r * seqA d n) with hin | hin + · exact nrm_shiftImage_J_inner hP hB hin + · exact (nrm_shiftImage_J_last h hB (by omega)).trans (inv_le _ (h.one_le_a n)) + | I => + obtain ⟨hlo, hhi⟩ := hk + rcases Nat.lt_or_ge i (r * seqA d n + seqV d (n - r - 1)) with hin | hin + · rw [shiftImage_I_inner hP hB hin, nrm_single, norm_one]; exact h1α + · exact (nrm_shiftImage_I_last h hB (by omega)).trans (inv_le _ (h.one_le_a _)) + | L => + obtain ⟨hlo, hhi⟩ := hk + rcases Nat.lt_or_ge (i + 1) (r * (seqA d n + seqB d n)) with hin | hin + · exact nrm_shiftImage_L_inner h hB hin + · exact (nrm_shiftImage_L_last h hB (by omega)).trans + (inv_le _ (by have := h.two_le_b n; omega)) + | K => + obtain ⟨hlo, hhi⟩ := hk + rcases Nat.lt_or_ge i ((n - 1) * seqA d n + r * seqB d n) with hin | hin + · rw [shiftImage_K_inner hP hB hin, nrm_single, norm_one]; exact h1α + · exact (nrm_shiftImage_K_last h hB (by omega)).trans h1α + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma4.lean b/LeanPool/ReadL1/Lemma4.lean new file mode 100644 index 0000000000..58adbd50f8 --- /dev/null +++ b/LeanPool/ReadL1/Lemma4.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma4K + +/-! +# Śliwa's Lemma 4: `‖Tˢ - Tˢ Qₘ‖ ≤ α` + +For `m > 2` and `s ∈ Kₘ,₁` (Śliwa pp. 632–635). In coordinates it is the bound +`‖Tˢ (fᵢ - Qₘ fᵢ)‖ ≤ α` for every `i` (`ReadL1.lemma4_coord`), proved block by block in the +previous files; on ℓ¹ it is an operator-norm bound (`ReadL1.lemma4`), with `Qₘ` extended to ℓ¹ by +`l1Lift` (`ReadL1.readQ`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-- **Lemma 4 in coordinates:** `‖Tˢ (fᵢ - Qₘ fᵢ)‖ ≤ α` for every `i`. Below `(m - 1)aₘ` the +difference is `0`; above, the four cases. -/ +theorem lemma4_coord (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) (i : ℕ) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + rcases le_or_gt i ((m - 1) * seqA d m) with hi | hi + · rw [qImage, ite_eq_left hi, sub_self, map_zero, nrm_zero]; exact alpha_pos.le + · have hB := block_mem hP (i := i) (by omega) + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB + cases k with + | J => exact lemma4_J h hm hs hB hi + | I => exact lemma4_I h hm hs hB hi + | L => exact lemma4_L h hm hs hB hi + | K => exact lemma4_K h hm hs hB hi + +/-- **`Qₘ` on ℓ¹**, for `m ≥ 2`, of norm at most `√Aₘ`. -/ +noncomputable def readQ (h : GrowthHyp d) {m : ℕ} (hm : 2 ≤ m) : L1 →L[ℂ] L1 := + l1Lift (fun i ↦ toL1 (qImage d m i)) (alpha ^ (Real.sqrt (seqA d m) / 2)) + (fun i ↦ by rw [norm_toL1]; exact nrm_qImage_le h hm i) + +lemma readQ_single (h : GrowthHyp d) {m : ℕ} (hm : 2 ≤ m) (i : ℕ) : + readQ h hm (δ i) = toL1 (qImage d m i) := + l1Lift_single _ _ _ i + +/-- **Śliwa's Lemma 4.** For `m > 2` and `s ∈ Kₘ,₁`, `‖Tˢ - Tˢ Qₘ‖ ≤ α`. -/ +theorem lemma4 (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) : + ‖readOp h ^ s - readOp h ^ s * readQ h hm.le‖ ≤ alpha := by + refine opNorm_le_of_forall_single _ _ fun i ↦ ?_ + have hδ : δ i = toL1 (single i 1) := by rw [toL1_single, one_smul] + rw [_root_.sub_apply, mul_apply_eq_comp, readQ_single, hδ, + readOp_pow_toL1, readOp_pow_toL1, ← map_sub, ← map_sub, norm_toL1] + exact lemma4_coord h hm hs i + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma4I.lean b/LeanPool/ReadL1/Lemma4I.lean new file mode 100644 index 0000000000..2f5e5811e2 --- /dev/null +++ b/LeanPool/ReadL1/Lemma4I.lean @@ -0,0 +1,330 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma4J +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.GCongr +import Mathlib.Tactic.Abel + +/-! +# Śliwa's Lemma 4, Case 2 (`I` blocks) + +For `i ∈ Iₙ,ᵣ` above `(m - 1)aₘ` (so `n > m`), `Tˢ fᵢ = aₙ₋ᵣ (xⁱ⁺ˢ - x^{i + s - aₙ})` +(Śliwa pp. 633–634): + +* **2.1°** `r = n - m`: here `Qₘ fᵢ = -aₘ xʲ` with `i = r aₙ + j`, and + `Tˢ (fᵢ - Qₘ fᵢ) = aₘ (xⁱ⁺ˢ - (x^{i + s - aₙ} - x^{j + s}))`; `xⁱ⁺ˢ` is tiny and Lemma 1 (b) + makes the bracket at most `2/aₘ₊₁`; +* **2.2° (a)** `r > n - m`: both powers are tiny; +* **2.2° (b)** `r < n - m`: either `Tˢ fᵢ = fᵢ₊ₛ`, or `Tˢ fᵢ = T^k (T f_p)` for the last index `p` + of the block, and Remark 3 gives `‖T f_p‖ ≤ 1/aₙ₋ᵣ` with `aₙ₋ᵣ ≥ aₘ₊₁ ≥ αˢ`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-- `α^{-√c/4} ≤ 1/c` (from `α c² < α^{√c/4}`). -/ +lemma rpow_neg_le_inv {c : ℝ} (hc : 1 ≤ c) (hrp : alpha * c ^ 2 < alpha ^ (Real.sqrt c / 4)) : + alpha ^ (-(Real.sqrt c / 4)) ≤ 1 / c := by + have hs := sq_mul_rpow_lt hrp + have hinv : 1 / alpha ≤ 1 := by rw [div_le_one alpha_pos]; exact one_le_alpha + have hp : 0 ≤ alpha ^ (-(Real.sqrt c / 4)) := (Real.rpow_pos_of_pos alpha_pos _).le + rw [le_div_iff₀ (by linarith)] + have hcc : c ≤ c ^ 2 := by nlinarith + calc alpha ^ (-(Real.sqrt c / 4)) * c ≤ alpha ^ (-(Real.sqrt c / 4)) * c ^ 2 := + mul_le_mul_of_nonneg_left hcc hp + _ = c ^ 2 * alpha ^ (-(Real.sqrt c / 4)) := by ring + _ ≤ 1 := by linarith + +private lemma four_add_seqV_le (h : GrowthHyp d) {m s n k : ℕ} + (hm : 2 < m) (hs : InK1 d m s) (hmn : m < n) (hkn : k < n) : + 4 * (seqV d k + s) ≤ seqA d n := by + have hShift := eight_mul_le_seqA h hm hs hmn + have hLevel := h.v_small n k hkn + omega + +/-- Lemma 4, Case 2.2° (b): `r < n - m`. -/ +lemma lemma4_I_lt (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .I⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) + (hlt : r + m < n) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hnm : m < n := lt_level_of_JI h (by omega) hB (Or.inr rfl) hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have ha := h.one_le_a n + have haR : (1 : ℝ) ≤ seqA d n := by exact_mod_cast ha + have hsa := hs.le_sqrt_a h (by omega) hnm + have hsmall := four_add_seqV_le h hm hs hnm (show n - r - 1 < n by omega) + have hsmallR : (4 * (seqV d (n - r - 1) + s) : ℝ) ≤ seqA d n := by exact_mod_cast hsmall + have hrpa := rpow_neg_le_inv haR (h.rpow_a n (by omega)) + have hαs := hs.alpha_pow_le h (by omega) + have hone : (1 : ℝ) ≤ alpha := one_le_alpha + -- 2.2° (b): `r < n - m`, `Qₘ fᵢ = 0`. + have hq : qImage d m i = 0 := + qImage_eq_zero hi (by rw [block_eq hP hB]; simp; omega) + rw [hq, sub_zero, single_eq_of_I hP hB rfl, map_smul, map_sub, T₀_pow_xPow hP, + T₀_pow_xPow hP] + dsimp only + set V := seqV d (n - r - 1) with hV + rcases le_or_gt (i + s) (r * seqA d n + V) with hin | hout + · -- `i + s ∈ Iₙ,ᵣ`: `Tˢ fᵢ = fᵢ₊ₛ`. + have hB' : (⟨n, r, .I⟩ : Block).Mem d (i + s) := ⟨hr1, hrn, by dsimp; omega, hin⟩ + rw [show i - seqA d n + s = i + s - seqA d n by + have : seqA d n ≤ i := (Nat.le_mul_of_pos_left _ hr1).trans hlo; omega, + ← single_eq_of_I hP hB' rfl, nrm_single, norm_one] + exact hone + · -- Through `T f_p`, `p = r aₙ + V`. + set p := r * seqA d n + V with hp + have hpB : (⟨n, r, .I⟩ : Block).Mem d p := ⟨hr1, hrn, by dsimp; omega, le_rfl⟩ + set k := i + s - (p + 1) with hk + have hsI := shiftImage_of_I hP hpB rfl + have hiden : (seqA d (n - r) : ℂ) • (xPow d (i + s) - xPow d (i - seqA d n + s)) = + (T₀ d ^ k) (shiftImage d p) := by + have hai : seqA d n ≤ i := (Nat.le_mul_of_pos_left _ hr1).trans hlo + have hap : seqA d n ≤ p + 1 := by omega + rw [hsI, map_smul, map_sub, T₀_pow_xPow hP, T₀_pow_xPow hP] + dsimp only + rw [show p + 1 + k = i + s by omega, + show p + 1 - seqA d n + k = i - seqA d n + s by omega] + rw [hiden] + have hrem := nrm_shiftImage_I_last h hpB rfl + have hTk := nrm_T₀_pow_le h k (shiftImage d p) + have hnr : (seqA d (m + 1) : ℝ) ≤ seqA d (n - r) := by + exact_mod_cast seqA_mono h (by omega) (by omega) + have hnr0 : (0 : ℝ) < seqA d (n - r) := by exact_mod_cast h.one_le_a _ + have hks : k ≤ s := by omega + calc nrm ((T₀ d ^ k) (shiftImage d p)) + ≤ alpha ^ k * (1 / seqA d (n - r)) := + hTk.trans (mul_le_mul_of_nonneg_left hrem (pow_nonneg alpha_pos.le _)) + _ ≤ alpha ^ s * (1 / seqA d (n - r)) := by + gcongr + _ ≤ seqA d (n - r) * (1 / seqA d (n - r)) := by gcongr; linarith + _ = 1 := by field_simp + _ ≤ alpha := hone + +/-- Lemma 4, Case 2.1°: `r = n - m`. -/ +lemma lemma4_I_eq (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .I⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) + (heq : r + m = n) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hnm : m < n := lt_level_of_JI h (by omega) hB (Or.inr rfl) hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have ha := h.one_le_a n + have haR : (1 : ℝ) ≤ seqA d n := by exact_mod_cast ha + have hsa := hs.le_sqrt_a h (by omega) hnm + have hsmall := four_add_seqV_le h hm hs hnm (show n - r - 1 < n by omega) + have hsmallR : (4 * (seqV d (n - r - 1) + s) : ℝ) ≤ seqA d n := by exact_mod_cast hsmall + have hrpa := rpow_neg_le_inv haR (h.rpow_a n (by omega)) + have hαs := hs.alpha_pow_le h (by omega) + have hone : (1 : ℝ) ≤ alpha := one_le_alpha + -- 2.1°: `r = n - m`, `Qₘ fᵢ = -aₘ xʲ`, `j = i - r aₙ`. + have hq : qImage d m i = -(seqA d m : ℂ) • xPow d (i - r * seqA d n) := by + rw [qImage, ite_eq_right (by omega), block_eq hP hB, ite_eq_left ⟨rfl, heq⟩] + dsimp only; rw [show n - m = r by omega] + have hnrm : n - r = m := by omega + set j := i - r * seqA d n with hj + have hjV : j ≤ seqV d (m - 1) := by rw [show m - 1 = n - r - 1 by omega]; omega + rw [hq, single_eq_of_I hP hB rfl] + dsimp only + rw [hnrm, neg_smul, sub_neg_eq_add, map_add, map_smul, map_smul, + map_sub, T₀_pow_xPow hP, T₀_pow_xPow hP, T₀_pow_xPow hP, ← smul_add] + rw [show i - seqA d n + s = i + s - seqA d n by + have : seqA d n ≤ i := (Nat.le_mul_of_pos_left _ hr1).trans hlo; omega] + -- `xⁱ⁺ˢ ∈ Jₙ,ᵣ₊₁`, tiny. + have hJ : (⟨n, r + 1, .J⟩ : Block).Mem d (i + s) := by + have hvm := h.v_small m (m - 1) (by omega) + have hsv : seqV d (m - 1) < s := by have := hs.1; omega + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [Nat.add_sub_cancel, show n - (r + 1) = n - r - 1 by omega, + show n - r - 1 = m - 1 by omega]; omega + · rw [Nat.add_mul, one_mul] + rw [show m - 1 = n - r - 1 by omega] at hjV; omega + have hxJ : nrm (xPow d (i + s)) ≤ 1 / seqA d n := by + refine (nrm_xPow_J_le hP hJ ?_).trans hrpa + have hij : i = r * seqA d n + j := by omega + rw [hij]; push_cast + have : (4 * (j + s) : ℝ) ≤ seqA d n := by + have : 4 * (j + s) ≤ seqA d n := by + rw [show m - 1 = n - r - 1 by omega] at hjV; omega + exact_mod_cast this + nlinarith + -- `‖x^{i + s - aₙ} - x^{j + s}‖ ≤ 2/aₘ₊₁` (Lemma 1 (b) on `Iₙ,ᵣ₋₁`, or `0` if `r = 1`). + have hdiff : nrm (xPow d (i + s - seqA d n) - xPow d (j + s)) ≤ 2 / seqA d (m + 1) := by + rcases Nat.eq_or_lt_of_le hr1 with hr1' | hr1' + · subst hr1' + rw [show i + s - seqA d n = j + s by omega, sub_self, nrm_zero] + positivity + · have hI : (⟨n, r - 1, .I⟩ : Block).Mem d (i + s - seqA d n) := by + have hvm : seqV d (m - 1) + s ≤ seqV d m := by + have := hs.2 + have hvlt := h.v_small m (m - 1) (by omega) + have hab : seqA d m ≤ seqB d m := by + have := h.a_small m (by omega); nlinarith + have hvm_eq : seqV d m = (m - 1) * seqA d m + (m - 1) * seqB d m := by + unfold seqV; ring + have e : (m - 1) * seqB d m = seqB d m + (m - 2) * seqB d m := by + rw [show m - 1 = 1 + (m - 2) by omega]; ring + have : seqA d m ≤ (m - 2) * seqB d m := + le_trans hab (Nat.le_mul_of_pos_left _ (by omega)) + omega + have hrsucc : (r - 1) * seqA d n + seqA d n = r * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · omega + · rw [show n - (r - 1) - 1 = n - r by omega, hnrm] + have hvv : seqV d (n - r - 1) = seqV d (m - 1) := by + rw [show n - r - 1 = m - 1 by omega] + omega + have h1b := nrm_xPow_sub_of_I h hI + rw [show n - (r - 1) = m + 1 by omega, + show i + s - seqA d n - (r - 1) * seqA d n = j + s by + have hrsucc : (r - 1) * seqA d n + seqA d n = r * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + omega] at h1b + exact h1b + -- Total: `aₘ (1/aₙ + 2/aₘ₊₁) ≤ 3aₘ/aₘ₊₁ ≤ 1`. + have hm1 : (seqA d (m + 1) : ℝ) ≤ seqA d n := by + exact_mod_cast seqA_mono h (by omega) (by omega) + have h8 : 8 * (seqA d m : ℝ) ^ 2 ≤ seqA d (m + 1) := by + exact_mod_cast eight_sq_le_seqA_succ h (by omega) + have hamR : (1 : ℝ) ≤ seqA d m := by exact_mod_cast h.one_le_a m + have hm10 : (0 : ℝ) < seqA d (m + 1) := by nlinarith + rw [nrm_smul, Complex.norm_natCast] + have hsub := nrm_sub_le (xPow d (i + s)) (xPow d (i + s - seqA d n) - xPow d (j + s)) + rw [show xPow d (i + s) - xPow d (i + s - seqA d n) + xPow d (j + s) = + xPow d (i + s) - (xPow d (i + s - seqA d n) - xPow d (j + s)) by abel] + have hinv : 1 / (seqA d n : ℝ) ≤ 1 / seqA d (m + 1) := by gcongr + calc (seqA d m : ℝ) * nrm (xPow d (i + s) - (xPow d (i + s - seqA d n) - xPow d (j + s))) + ≤ seqA d m * (1 / seqA d (m + 1) + 2 / seqA d (m + 1)) := by gcongr; linarith + _ = 3 * seqA d m / seqA d (m + 1) := by ring + _ ≤ 1 := by rw [div_le_one hm10]; nlinarith + _ ≤ alpha := hone + +/-- Lemma 4, Case 2.2° (a): `r > n - m`. -/ +lemma lemma4_I_gt (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .I⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) + (hgt : n < r + m) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hnm : m < n := lt_level_of_JI h (by omega) hB (Or.inr rfl) hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have ha := h.one_le_a n + have haR : (1 : ℝ) ≤ seqA d n := by exact_mod_cast ha + have hsa := hs.le_sqrt_a h (by omega) hnm + have hsmall := four_add_seqV_le h hm hs hnm (show n - r - 1 < n by omega) + have hsmallR : (4 * (seqV d (n - r - 1) + s) : ℝ) ≤ seqA d n := by exact_mod_cast hsmall + have hrpa := rpow_neg_le_inv haR (h.rpow_a n (by omega)) + have hαs := hs.alpha_pow_le h (by omega) + have hone : (1 : ℝ) ≤ alpha := one_le_alpha + -- 2.2° (a): `r > n - m`, `Qₘ fᵢ = 0`. + have hq : qImage d m i = 0 := + qImage_eq_zero hi (by rw [block_eq hP hB]; simp; omega) + rw [hq, sub_zero, single_eq_of_I hP hB rfl, map_smul, map_sub, T₀_pow_xPow hP, + T₀_pow_xPow hP] + dsimp only + have hai : seqA d n ≤ i := (Nat.le_mul_of_pos_left _ hr1).trans hlo + rw [show i - seqA d n + s = i + s - seqA d n by omega] + have hv1 : seqV d (n - r) < s := by + have hvm := seqV_mono hP (show n - r ≤ m - 1 by omega) + have := h.v_small m (m - 1) (by omega) + have := hs.1; omega + have hrsucc : (r - 1) * seqA d n + seqA d n = r * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + -- `x^{i + s - aₙ} ∈ Jₙ,ᵣ`. + have hJ1 : (⟨n, r, .J⟩ : Block).Mem d (i + s - seqA d n) := + ⟨hr1, hrn, by dsimp; omega, by dsimp; omega⟩ + have hx1 : nrm (xPow d (i + s - seqA d n)) ≤ alpha ^ (-(Real.sqrt (seqA d n) / 4)) := by + refine nrm_xPow_J_le hP hJ1 ?_ + have : ((i + s - seqA d n : ℕ) : ℝ) = i + s - seqA d n := by + rw [Nat.cast_sub (by omega)]; push_cast; ring + rw [this] + have : (4 * (i + s) : ℝ) ≤ (4 * r + 1) * seqA d n := by + have : 4 * (i + s) ≤ (4 * r + 1) * seqA d n := by + have := Nat.mul_le_mul_left 4 hhi; nlinarith + exact_mod_cast this + nlinarith + -- `xⁱ⁺ˢ` in `Jₙ,ᵣ₊₁` or `Lₙ,₁`. + have hx2 : nrm (xPow d (i + s)) ≤ alpha ^ (-(Real.sqrt (seqA d n) / 4)) := by + rcases Nat.lt_or_ge (r + 1) n with hr' | hr' + · have hJ2 : (⟨n, r + 1, .J⟩ : Block).Mem d (i + s) := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [Nat.add_sub_cancel, show n - (r + 1) = n - r - 1 by omega] + have := seqV_mono hP (show n - r - 1 ≤ n - r by omega); omega + · rw [Nat.add_mul, one_mul]; omega + refine nrm_xPow_J_le hP hJ2 ?_ + push_cast + have : (4 * (i + s) : ℝ) ≤ (4 * r + 1) * seqA d n := by + have : 4 * (i + s) ≤ (4 * r + 1) * seqA d n := by nlinarith + exact_mod_cast this + nlinarith + · have hrn1 : r + 1 = n := by omega + have hv0 : seqV d (n - r - 1) = 0 := by rw [show n - r - 1 = 0 by omega, seqV_zero] + -- Linear facts: `i ≤ r aₙ`, `r aₙ + aₙ = n aₙ`, `8n aₙ < bₙ`, `4s ≤ aₙ`. + have hab := h.a_small n (by omega) + have e3 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have er : r * seqA d n + seqA d n = n * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, hrn1] + rw [hv0] at hsmall hhi + have h4b : 4 * (i + s) ≤ seqB d n := by omega + have hL : (⟨n, 1, .L⟩ : Block).Mem d (i + s) := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [Nat.sub_self, zero_mul, add_zero, show n - 1 = r by omega]; omega + · rw [one_mul]; omega + refine (nrm_xPow_L_le h hL ?_).trans (rpow_neg_sqrt_anti ?_) + · push_cast + have : (4 * (i + s) : ℝ) ≤ seqB d n := by exact_mod_cast h4b + linarith + · have : seqA d n ≤ seqB d n := by omega + exact_mod_cast this + -- Total: `aₙ₋ᵣ (2α^{-√aₙ/4}) ≤ 2aₙ/aₙ ... ≤ 1`. + have hnr : (seqA d (n - r) : ℝ) ≤ seqA d n := by + exact_mod_cast seqA_mono h (by omega) (by omega) + have hsm := sq_mul_rpow_lt (h.rpow_a n (by omega)) + obtain ⟨sa, hsa⟩ : ∃ x, x = alpha ^ (-(Real.sqrt (seqA d n) / 4)) := ⟨_, rfl⟩ + rw [← hsa] at hx1 hx2 hsm + have hsa0 : 0 < sa := hsa ▸ Real.rpow_pos_of_pos alpha_pos _ + have hinv : 1 / alpha ≤ 1 / 2 := by + rw [div_le_div_iff₀ alpha_pos (by norm_num)]; norm_num [alpha] + have haa : (seqA d n : ℝ) * sa ≤ (seqA d n : ℝ) ^ 2 * sa := + mul_le_mul_of_nonneg_right (le_self_pow₀ haR (by norm_num)) hsa0.le + rw [nrm_smul, Complex.norm_natCast] + have hsub := nrm_sub_le (xPow d (i + s)) (xPow d (i + s - seqA d n)) + have hsum : nrm (xPow d (i + s) - xPow d (i + s - seqA d n)) ≤ sa + sa := + hsub.trans (add_le_add hx2 hx1) + calc (seqA d (n - r) : ℝ) * nrm (xPow d (i + s) - xPow d (i + s - seqA d n)) + ≤ seqA d n * (sa + sa) := + mul_le_mul hnr hsum (nrm_nonneg _) (by positivity) + _ = 2 * ((seqA d n : ℝ) * sa) := by ring + _ ≤ 1 := by linarith only [haa, hsm, hinv] + _ ≤ alpha := hone + +/-- **Lemma 4, Case 2.** -/ +lemma lemma4_I (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .I⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + rcases Nat.lt_trichotomy (r + m) n with hlt | heq | hgt + · exact lemma4_I_lt h hm hs hB hi hlt + · exact lemma4_I_eq h hm hs hB hi heq + · exact lemma4_I_gt h hm hs hB hi hgt + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma4J.lean b/LeanPool/ReadL1/Lemma4J.lean new file mode 100644 index 0000000000..ac3f31296a --- /dev/null +++ b/LeanPool/ReadL1/Lemma4J.lean @@ -0,0 +1,170 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Projection +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.GCongr + +/-! +# Śliwa's Lemma 4, setup and Case 1 (`J` blocks) + +Lemma 4 (Śliwa pp. 632–635): for `m > 2` and `s ∈ Kₘ,₁`, `‖Tˢ - Tˢ Qₘ‖ ≤ α`. It suffices to bound +`‖Tˢ (fᵢ - Qₘ fᵢ)‖` for each `i`. For `i ≤ (m - 1)aₘ` this is `0`. Otherwise `Qₘ fᵢ = 0` unless +`i ∈ Iₙ,ₙ₋ₘ`, and the four cases follow the block of `i`. + +This file: the general facts every case uses (`s < 2bₘ`, `s` is small against `√aₙ` for `n > m`, +`αˢ ≤ aₘ₊₁`), when `Qₘ fᵢ = 0`, and **Case 1** (`i ∈ Jₙ,ᵣ`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-- `s ∈ Kₘ,₁` means `aₘ + bₘ ≤ s ≤ (m - 1)aₘ + bₘ`. -/ +def InK1 (d : ℕ → ℕ) (m s : ℕ) : Prop := + seqA d m + seqB d m ≤ s ∧ s ≤ (m - 1) * seqA d m + seqB d m + +/-- `Qₘ fᵢ = 0` above `(m - 1)aₘ`, unless `i ∈ Iₙ,ₙ₋ₘ`. -/ +lemma qImage_eq_zero {m i : ℕ} (hi : (m - 1) * seqA d m < i) + (hk : ¬ ((block d i).kind = .I ∧ (block d i).r + m = (block d i).n)) : qImage d m i = 0 := by + rw [qImage, ite_eq_right (by omega), ite_eq_right hk] + +/-- Consecutive weights `k` apart differ by `α^{k/√c}`. -/ +lemma weight_eq_mul_add {c : ℕ} (hc : 0 < c) (r i k : ℕ) : + weight c r i = alpha ^ ((k : ℝ) / Real.sqrt c) * weight c r (i + k) := by + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + rw [weight, weight, ← Real.rpow_add alpha_pos, sqrt_four_mul] + congr 1 + push_cast + field_simp + ring + +/-- Above `(m - 1)aₘ`, a block has level `n > m` unless it is an `L` or `K` block of level `m`: +`J` and `I` blocks of level `n` end by `(n - 1)aₙ`. -/ +lemma lt_level_of_JI (h : GrowthHyp d) {m i : ℕ} (hm : 1 ≤ m) {B : Block} (hB : B.Mem d i) + (hk : B.kind = .J ∨ B.kind = .I) (hi : (m - 1) * seqA d m < i) : m < B.n := by + have hX := ((B.mem_level h.toPartitionHyp hB).2.2).2 hk + by_contra hnm + have h2 := Block.two_le_n hB + have : (B.n - 1) * seqA d B.n ≤ (m - 1) * seqA d m := + Nat.mul_le_mul (by omega) (seqA_mono h (by omega) (by omega)) + omega + +/-- `s ≤ 2bₘ`. -/ +lemma InK1.le_two_b (h : GrowthHyp d) {m s : ℕ} (hm : 1 ≤ m) (hs : InK1 d m s) : + s ≤ 2 * seqB d m := by + have := h.a_small m hm + have : (m - 1) * seqA d m ≤ m * seqA d m := Nat.mul_le_mul_right _ (by omega) + have := hs.2 + nlinarith + +/-- For `s ∈ Kₘ,₁` and `n > m`, the growth inequalities give `8s ≤ aₙ`. -/ +lemma eight_mul_le_seqA (h : GrowthHyp d) {m s n : ℕ} (hm : 2 < m) (hs : InK1 d m s) + (hmn : m < n) : 8 * s ≤ seqA d n := by + have hmpos : 1 ≤ m := by omega + have haPos : 0 < seqA d m := h.one_le_a m + have hb8 : 8 ≤ seqB d m := + (Nat.le_mul_of_pos_right 8 (by omega : 0 < m)).trans + ((Nat.le_mul_of_pos_right (8 * m) haPos).trans (h.a_small m hmpos).le) + calc + 8 * s ≤ 8 * (2 * seqB d m) := Nat.mul_le_mul_left _ (hs.le_two_b h hmpos) + _ = 16 * seqB d m := by rw [← Nat.mul_assoc] + _ ≤ (4 * seqB d m) * seqB d m := Nat.mul_le_mul_right _ (by omega) + _ = 4 * seqB d m ^ 2 := by rw [pow_two, Nat.mul_assoc] + _ ≤ seqA d (m + 1) := (h.four_sq_b_lt_a m hmpos).le + _ ≤ seqA d n := seqA_mono h (by omega) (by omega) + +/-- For `n > m`, `s ≤ √aₙ`: `s ≤ 2bₘ` and `4bₘ² < aₘ₊₁ ≤ aₙ`. -/ +lemma InK1.le_sqrt_a (h : GrowthHyp d) {m s n : ℕ} (hm : 1 ≤ m) (hs : InK1 d m s) + (hnm : m < n) : (s : ℝ) ≤ Real.sqrt (seqA d n) := by + have h2 := hs.le_two_b h hm + have h4 := h.four_sq_b_lt_a m hm + have hmono := seqA_mono h (show 1 ≤ m + 1 by omega) (show m + 1 ≤ n by omega) + refine Real.le_sqrt_of_sq_le ?_ + have : s ^ 2 ≤ seqA d n := by nlinarith + exact_mod_cast this + +/-- `αˢ ≤ aₘ₊₁`: `s ≤ 2bₘ` and Śliwa's growth condition `aₘ₊₁ ≥ α^{2bₘ}`. -/ +lemma InK1.alpha_pow_le (h : GrowthHyp d) {m s : ℕ} (hm : 1 ≤ m) (hs : InK1 d m s) : + alpha ^ s ≤ seqA d (m + 1) := + (pow_le_pow_right₀ one_le_alpha (hs.le_two_b h hm)).trans (h.alpha_pow_two_b_le m hm) + +/-- **Lemma 4, Case 1:** `i ∈ Jₙ,ᵣ` above `(m - 1)aₘ`. Then `Qₘ fᵢ = 0` and +`Tˢ fᵢ = cᵢ xⁱ⁺ˢ`. If `i + s` is still in `Jₙ,ᵣ` this is `α^{s/√aₙ} fᵢ₊ₛ` (1.1°). Otherwise it is +`(cᵢ / c_p) T^{i + s - r aₙ} (T f_p)` with `p = r aₙ - 1` the last index of the block, and Remark 3 +gives `‖T f_p‖ ≤ 1/aₙ` (1.2°). -/ +lemma lemma4_J (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .J⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hq : qImage d m i = 0 := qImage_eq_zero hi (by rw [block_eq hP hB]; simp) + have hnm : m < n := lt_level_of_JI h (by omega) hB (Or.inl rfl) hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have ha : 0 < seqA d n := h.one_le_a n + have hsa := hs.le_sqrt_a h (by omega) hnm + have hsqa : 0 < Real.sqrt (seqA d n) := Real.sqrt_pos.2 (by exact_mod_cast ha) + rw [hq, sub_zero, single_eq_of_J hP hB rfl, map_smul, T₀_pow_xPow hP, nrm_smul, + Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le] + dsimp only + rcases lt_or_ge (i + s) (r * seqA d n) with h11 | h12 + · -- 1.1°: `i + s ∈ Jₙ,ᵣ`, and `cᵢ / cᵢ₊ₛ = α^{s/√aₙ} ≤ α`. + have hB' : (⟨n, r, .J⟩ : Block).Mem d (i + s) := ⟨hr1, hrn, by dsimp; omega, h11⟩ + rw [nrm_xPow_of_J hP hB' rfl, weight_eq_mul_add ha r i s, mul_assoc, + mul_inv_cancel₀ (weight_pos _ _ _).ne', mul_one] + calc alpha ^ ((s : ℝ) / Real.sqrt (seqA d n)) ≤ alpha ^ (1 : ℝ) := + alpha_rpow_le ((div_le_one hsqa).2 hsa) + _ = alpha := Real.rpow_one _ + · -- 1.2°: through `T f_p`, `p = r aₙ - 1`. + set p := r * seqA d n - 1 with hp + have hpB : (⟨n, r, .J⟩ : Block).Mem d p := ⟨hr1, hrn, by dsimp; omega, by dsimp; omega⟩ + have hpi : i ≤ p := by omega + have hpow : xPow d (i + s) = + (weight (seqA d n) r p : ℂ)⁻¹ • (T₀ d ^ (i + s - r * seqA d n)) (shiftImage d p) := by + rw [shiftImage_of_J hP hpB rfl, map_smul, T₀_pow_xPow hP, smul_smul, + inv_mul_cancel₀ (weight_ne_zero _ _ _), one_smul] + congr 1; omega + have hrem := nrm_shiftImage_J_last h hpB (by omega) + have hTk := nrm_T₀_pow_le h (i + s - r * seqA d n) (shiftImage d p) + rw [hpow, nrm_smul, norm_inv, Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le, + weight_eq_mul_add ha r i (p - i), show i + (p - i) = p by omega, ← mul_assoc, + mul_assoc _ _ (weight _ _ _)⁻¹, mul_inv_cancel₀ (weight_pos _ _ _).ne', mul_one] + -- `α^{(p - i)/√aₙ} ≤ α`, `α · α^{i + s - r aₙ} ≤ αˢ ≤ aₘ₊₁ ≤ aₙ`. + have hexp : alpha ^ (((p - i : ℕ) : ℝ) / Real.sqrt (seqA d n)) ≤ alpha := by + calc alpha ^ (((p - i : ℕ) : ℝ) / Real.sqrt (seqA d n)) ≤ alpha ^ (1 : ℝ) := by + refine alpha_rpow_le ((div_le_one hsqa).2 (le_trans ?_ hsa)) + exact_mod_cast (show p - i ≤ s by omega) + _ = alpha := Real.rpow_one _ + have hαs : alpha * alpha ^ (i + s - r * seqA d n) ≤ alpha ^ s := by + rw [← pow_succ']; exact pow_le_pow_right₀ one_le_alpha (by omega) + have hsA := hs.alpha_pow_le h (by omega) + have hAn : (seqA d (m + 1) : ℝ) ≤ seqA d n := by + exact_mod_cast seqA_mono h (by omega) (by omega) + have haR : (0 : ℝ) < seqA d n := by exact_mod_cast ha + have hx0 := nrm_nonneg (shiftImage d p) + have hpow0 : 0 ≤ alpha ^ (i + s - r * seqA d n) := pow_nonneg alpha_pos.le _ + calc alpha ^ (((p - i : ℕ) : ℝ) / Real.sqrt (seqA d n)) * + nrm ((T₀ d ^ (i + s - r * seqA d n)) (shiftImage d p)) + ≤ alpha * (alpha ^ (i + s - r * seqA d n) * (1 / seqA d n)) := + mul_le_mul hexp (hTk.trans (mul_le_mul_of_nonneg_left hrem hpow0)) (nrm_nonneg _) + (by norm_num [alpha]) + _ ≤ alpha ^ s * (1 / seqA d n) := by rw [← mul_assoc]; gcongr + _ ≤ seqA d n * (1 / seqA d n) := by gcongr; linarith + _ = 1 := by field_simp + _ ≤ alpha := one_le_alpha + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma4K.lean b/LeanPool/ReadL1/Lemma4K.lean new file mode 100644 index 0000000000..d268e70d5e --- /dev/null +++ b/LeanPool/ReadL1/Lemma4K.lean @@ -0,0 +1,306 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma4L +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.GCongr + +/-! +# Śliwa's Lemma 4, Case 4 (`K` blocks) + +For `i ∈ Kₙ,ᵣ` above `(m - 1)aₘ` (so `n ≥ m`), `Qₘ fᵢ = 0` and `Tˢ fᵢ = xʲ - bₙ x^{j - bₙ}` with +`j = i + s` (Śliwa p. 635). Either `j` stays in a `K` block and `Tˢ fᵢ = fⱼ` (4.1°, 4.3°), or +`‖xʲ‖ ≤ 1` and `‖x^{j - bₙ}‖ ≤ 1/bₙ`, so `‖Tˢ fᵢ‖ ≤ 2` (4.2°, 4.4°). +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +private theorem nrm_K_difference_le {n j : ℕ} (hb : 0 < seqB d n) + (hOne : nrm (xPow d j) ≤ 1) (hInv : nrm (xPow d (j - seqB d n)) ≤ 1 / seqB d n) : + nrm (xPow d j - (seqB d n : ℂ) • xPow d (j - seqB d n)) ≤ alpha := by + have hbReal : (0 : ℝ) < seqB d n := by exact_mod_cast hb + have hDifference := nrm_sub_le (xPow d j) ((seqB d n : ℂ) • xPow d (j - seqB d n)) + rw [nrm_smul, Complex.norm_natCast] at hDifference + have hProduct := mul_le_mul_of_nonneg_left hInv hbReal.le + rw [mul_one_div_cancel hbReal.ne'] at hProduct + exact hDifference.trans ((add_le_add hOne hProduct).trans (by norm_num [alpha])) + +private theorem nrm_K_difference_le_of_mem {n r j : ℕ} (h : PartitionHyp d) + (hK : (⟨n, r, .K⟩ : Block).Mem d j) : + nrm (xPow d j - (seqB d n : ℂ) • xPow d (j - seqB d n)) ≤ alpha := by + rw [← single_eq_of_K h hK rfl, nrm_single, norm_one] + exact one_le_alpha + +private theorem nrm_K_eq_predecessor_le (h : GrowthHyp d) {m r j : ℕ} + (hr1 : 1 ≤ r) (hrn : r < m) + (hjLower : (m - 1) * seqA d m + (r + 1) * seqB d m < j) + (hjUpper : j ≤ 2 * ((m - 1) * seqA d m) + (r + 1) * seqB d m) + (hLength : 8 * ((m - 1) * seqA d m) ≤ seqB d m) + (hjNext : 4 * j < seqA d (m + 1)) : + nrm (xPow d (j - seqB d m)) ≤ 1 / seqB d m := by + have hm : 1 ≤ m := by omega + have hP := h.toPartitionHyp + have hb2 := h.two_le_b m + have hbR : (1 : ℝ) ≤ seqB d m := by exact_mod_cast (show 1 ≤ seqB d m by omega) + have hbJ : seqB d m ≤ j := by + have := Nat.le_mul_of_pos_left (seqB d m) (by omega : 0 < r + 1) + omega + have hrb : (r + 1) * seqB d m = r * seqB d m + seqB d m := by + rw [Nat.add_mul, one_mul] + rcases Nat.lt_or_ge (r + 1) m with hr | hr + · have hL : (⟨m, r + 1, .L⟩ : Block).Mem d (j - seqB d m) := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [Nat.add_sub_cancel] + omega + · rw [Nat.mul_add, hrb] + omega + refine (nrm_xPow_L_le h hL ?_).trans (rpow_neg_le_inv hbR (h.rpow_b m hm)) + have hjR : (j : ℝ) ≤ ((2 * ((m - 1) * seqA d m) + (r + 1) * seqB d m : ℕ) : ℝ) := + by exact_mod_cast hjUpper + have hLenR : ((8 * ((m - 1) * seqA d m) : ℕ) : ℝ) ≤ seqB d m := + by exact_mod_cast hLength + rw [Nat.cast_sub hbJ] + push_cast at hjR hLenR ⊢ + linarith only [hjR, hLenR] + · have hrEq : r + 1 = m := by omega + have hv : seqV d m = (m - 1) * seqA d m + r * seqB d m := by + unfold seqV + rw [Nat.mul_add, show m - 1 = r by omega] + have hJ : (⟨m + 1, 1, .J⟩ : Block).Mem d (j - seqB d m) := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.sub_self, zero_mul, zero_add, Nat.add_sub_cancel] + omega + · rw [one_mul] + omega + have haR : (1 : ℝ) ≤ seqA d (m + 1) := by exact_mod_cast h.one_le_a (m + 1) + have hbA : seqB d m ≤ seqA d (m + 1) := by + have hSmall := h.b_small m hm + have := Nat.le_mul_of_pos_left (seqB d m) (by omega : 0 < m) + omega + refine ((nrm_xPow_J_le hP hJ ?_).trans + (rpow_neg_le_inv haR (h.rpow_a (m + 1) (by omega)))).trans ?_ + · have hjR : (4 * j : ℝ) < seqA d (m + 1) := by exact_mod_cast hjNext + rw [Nat.cast_sub hbJ] + push_cast + linarith only [hjR, hbR] + · gcongr + +/-- Lemma 4, Case 4 with `n = m`. -/ +lemma lemma4_K_eq (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .K⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) + (hmn : m = n) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hq : qImage d m i = 0 := qImage_eq_zero hi (by rw [block_eq hP hB]; simp) + have hnm : m ≤ n := le_level h (by omega) hB hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hb2 := h.two_le_b n + have hb0 : 0 < seqB d n := by omega + have hbR : (2 : ℝ) ≤ seqB d n := by exact_mod_cast hb2 + have ha := h.one_le_a n + have hab := h.a_small n (by omega) + have e3 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have hna : (n - 1) * seqA d n + seqA d n = n * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel (by omega)] + have hrb : (r - 1) * seqB d n + seqB d n = r * seqB d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + have hrab : r * (seqA d n + seqB d n) = r * seqA d n + r * seqB d n := by ring + have hran : r * seqA d n ≤ (n - 1) * seqA d n := Nat.mul_le_mul_right _ (by omega) + have hvn : seqV d n = (n - 1) * seqA d n + (n - 1) * seqB d n := by unfold seqV; ring + have hrbn : r * seqB d n ≤ (n - 1) * seqB d n := Nat.mul_le_mul_right _ (by omega) + have hiv : i ≤ seqV d n := by omega + have hr1b : (r + 1) * seqB d n = r * seqB d n + seqB d n := by ring + have hman : (n - 1) * seqA d n ≤ n * seqA d n := Nat.mul_le_mul_right _ (by omega) + have h4j := four_add_lt h (by omega) hs hnm hiv + have h2b := hs.le_two_b h (by omega) + have hs1 := hs.1 + have hs2 := hs.2 + rw [hq, sub_zero, single_eq_of_K hP hB rfl, map_sub, map_smul, T₀_pow_xPow hP, + T₀_pow_xPow hP] + dsimp only + have hbi : seqB d n ≤ i := by + have : seqB d n ≤ r * seqB d n := Nat.le_mul_of_pos_left _ hr1 + omega + rw [show i - seqB d n + s = i + s - seqB d n by omega] + set j := i + s with hj + have two_bound := nrm_K_difference_le (d := d) (n := n) (j := j) hb0 + have one_bound := fun r' => nrm_K_difference_le_of_mem (n := n) (j := j) (r := r') hP + -- `n = m`. + subst hmn + rcases le_or_gt j ((m - 1) * seqA d m + (r + 1) * seqB d m) with h41 | h42 + · -- 4.1°: `j ∈ Kₘ,ᵣ₊₁`. + have hK : (⟨m, r + 1, .K⟩ : Block).Mem d j := by + refine ⟨by dsimp; omega, ?_, ?_, h41⟩ + · dsimp only + by_contra hc + have : (m - 1) * seqA d m < (r + 1) * seqA d m := Nat.mul_lt_mul_of_pos_right + (by omega) (by omega) + have : (r + 1) * (seqA d m + seqB d m) ≤ j := by + have : (r + 1) * (seqA d m + seqB d m) = r * seqA d m + r * seqB d m + + seqA d m + seqB d m := by ring + omega + rw [Nat.add_mul] at h41; nlinarith + · dsimp only + have : (r + 1) * (seqA d m + seqB d m) = r * seqA d m + r * seqB d m + + seqA d m + seqB d m := by ring + omega + exact one_bound _ hK + · -- 4.2°. + have h1 : nrm (xPow d j) ≤ 1 := by + rcases Nat.lt_or_ge (r + 2) m with hr2 | hr2 + · have hL : (⟨m, r + 2, .L⟩ : Block).Mem d j := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [show r + 2 - 1 = r + 1 by omega]; omega + · have : (r + 2) * (seqA d m + seqB d m) = + r * seqA d m + r * seqB d m + 2 * seqA d m + 2 * seqB d m := by ring + omega + refine nrm_xPow_L_le_one hP hL ?_ + have hjN : j ≤ 2 * ((m - 1) * seqA d m) + (r + 1) * seqB d m := by omega + have hjb : (j : ℝ) ≤ ((2 * ((m - 1) * seqA d m) + (r + 1) * seqB d m : ℕ) : ℝ) := by + exact_mod_cast hjN + push_cast at hjb + have h4N : 4 * ((m - 1) * seqA d m) ≤ seqB d m := by omega + have h4 : ((4 * ((m - 1) * seqA d m) : ℕ) : ℝ) ≤ seqB d m := by exact_mod_cast h4N + push_cast at h4 + push_cast; linarith + · have hJ : (⟨m + 1, 1, .J⟩ : Block).Mem d j := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.sub_self, zero_mul, zero_add, Nat.add_sub_cancel] + have : (m - 1) * seqB d m ≤ (r + 1) * seqB d m := Nat.mul_le_mul_right _ (by omega) + omega + · rw [one_mul]; omega + refine nrm_xPow_J_le_one hP hJ ?_ + have : (4 * j : ℝ) < seqA d (m + 1) := by exact_mod_cast h4j + push_cast; linarith + have hjUpper : j ≤ 2 * ((m - 1) * seqA d m) + (r + 1) * seqB d m := by omega + have hLength : 8 * ((m - 1) * seqA d m) ≤ seqB d m := by omega + have h2 := nrm_K_eq_predecessor_le h hr1 hrn h42 hjUpper hLength h4j + exact two_bound h1 h2 + +/-- Lemma 4, Case 4 with `n > m`. -/ +lemma lemma4_K_gt (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .K⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) + (hmn : m < n) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hq : qImage d m i = 0 := qImage_eq_zero hi (by rw [block_eq hP hB]; simp) + have hnm : m ≤ n := le_level h (by omega) hB hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hb2 := h.two_le_b n + have hb0 : 0 < seqB d n := by omega + have hbR : (2 : ℝ) ≤ seqB d n := by exact_mod_cast hb2 + have ha := h.one_le_a n + have hab := h.a_small n (by omega) + have e3 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have hna : (n - 1) * seqA d n + seqA d n = n * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel (by omega)] + have hrb : (r - 1) * seqB d n + seqB d n = r * seqB d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + have hrab : r * (seqA d n + seqB d n) = r * seqA d n + r * seqB d n := by ring + have hran : r * seqA d n ≤ (n - 1) * seqA d n := Nat.mul_le_mul_right _ (by omega) + have hvn : seqV d n = (n - 1) * seqA d n + (n - 1) * seqB d n := by unfold seqV; ring + have hrbn : r * seqB d n ≤ (n - 1) * seqB d n := Nat.mul_le_mul_right _ (by omega) + have hiv : i ≤ seqV d n := by omega + have hr1b : (r + 1) * seqB d n = r * seqB d n + seqB d n := by ring + have hman : (n - 1) * seqA d n ≤ n * seqA d n := Nat.mul_le_mul_right _ (by omega) + have h4j := four_add_lt h (by omega) hs hnm hiv + have h2b := hs.le_two_b h (by omega) + have hs1 := hs.1 + have hs2 := hs.2 + rw [hq, sub_zero, single_eq_of_K hP hB rfl, map_sub, map_smul, T₀_pow_xPow hP, + T₀_pow_xPow hP] + dsimp only + have hbi : seqB d n ≤ i := by + have : seqB d n ≤ r * seqB d n := Nat.le_mul_of_pos_left _ hr1 + omega + rw [show i - seqB d n + s = i + s - seqB d n by omega] + set j := i + s with hj + have two_bound := nrm_K_difference_le (d := d) (n := n) (j := j) hb0 + have one_bound := fun r' => nrm_K_difference_le_of_mem (n := n) (j := j) (r := r') hP + -- `α^{-√c/4} ≤ 1/c` for `c = bₙ` and `c = aₙ₊₁ ≥ bₙ`. + have hrpb := rpow_neg_le_inv (show (1 : ℝ) ≤ seqB d n by linarith) (h.rpow_b n (by omega)) + have hbA : seqB d n ≤ seqA d (n + 1) := by + have := h.b_small n (by omega) + have : seqB d n ≤ n * seqB d n := Nat.le_mul_of_pos_left _ (by omega) + omega + have hrpa := rpow_neg_le_inv (show (1 : ℝ) ≤ seqA d (n + 1) by + exact_mod_cast h.one_le_a (n + 1)) (h.rpow_a (n + 1) (by omega)) + have hAinv : 1 / (seqA d (n + 1) : ℝ) ≤ 1 / seqB d n := by + gcongr + -- `n > m`. + have hsa := hs.le_sqrt_a h (by omega) hmn + have hsmall : 8 * s ≤ seqA d n := eight_mul_le_seqA h hm hs hmn + rcases le_or_gt j ((n - 1) * seqA d n + r * seqB d n) with h43 | h44 + · -- 4.3°: `j ∈ Kₙ,ᵣ`. + exact one_bound r ⟨hr1, hrn, by dsimp; omega, h43⟩ + · -- 4.4°. + have h1 : nrm (xPow d j) ≤ 1 := by + rcases Nat.lt_or_ge (r + 1) n with hr' | hr' + · have hL : (⟨n, r + 1, .L⟩ : Block).Mem d j := by + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · rw [Nat.add_sub_cancel]; omega + · have : (r + 1) * (seqA d n + seqB d n) = + r * seqA d n + r * seqB d n + seqA d n + seqB d n := by ring + omega + refine nrm_xPow_L_le_one hP hL ?_ + have hjb : (j : ℝ) ≤ ((n - 1 : ℕ) : ℝ) * seqA d n + r * seqB d n + s := by + have : j ≤ (n - 1) * seqA d n + r * seqB d n + s := by omega + exact_mod_cast this + have h4N : 2 * ((n - 1) * seqA d n) + 2 * s ≤ seqB d n := by omega + have h4 : ((2 * ((n - 1) * seqA d n) + 2 * s : ℕ) : ℝ) ≤ seqB d n := by + exact_mod_cast h4N + push_cast at h4 + push_cast; linarith + · have hJ : (⟨n + 1, 1, .J⟩ : Block).Mem d j := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.sub_self, zero_mul, zero_add, Nat.add_sub_cancel] + have : (n - 1) * seqB d n ≤ r * seqB d n := Nat.mul_le_mul_right _ (by omega) + omega + · rw [one_mul]; omega + refine nrm_xPow_J_le_one hP hJ ?_ + have : (4 * j : ℝ) < seqA d (n + 1) := by exact_mod_cast h4j + push_cast; linarith + have h2 : nrm (xPow d (j - seqB d n)) ≤ 1 / seqB d n := by + have hL : (⟨n, r, .L⟩ : Block).Mem d (j - seqB d n) := by + refine ⟨hr1, hrn, ?_, ?_⟩ <;> dsimp only + · omega + · omega + refine (nrm_xPow_L_le h hL ?_).trans hrpb + have hjb : (j : ℝ) ≤ ((n - 1 : ℕ) : ℝ) * seqA d n + r * seqB d n + s := by + have : j ≤ (n - 1) * seqA d n + r * seqB d n + s := by omega + exact_mod_cast this + have h4N : 4 * ((n - 1) * seqA d n) + 4 * s ≤ seqB d n := by omega + have h4 : ((4 * ((n - 1) * seqA d n) + 4 * s : ℕ) : ℝ) ≤ seqB d n := by + exact_mod_cast h4N + push_cast at h4 + rw [Nat.cast_sub (by omega)] + linarith + exact two_bound h1 h2 + +/-- **Lemma 4, Case 4.** -/ +lemma lemma4_K (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .K⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hnm : m ≤ n := le_level h (by omega) hB hi + rcases Nat.eq_or_lt_of_le hnm with hmn | hmn + · exact lemma4_K_eq h hm hs hB hi hmn + · exact lemma4_K_gt h hm hs hB hi hmn + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma4L.lean b/LeanPool/ReadL1/Lemma4L.lean new file mode 100644 index 0000000000..e2a05a2a4f --- /dev/null +++ b/LeanPool/ReadL1/Lemma4L.lean @@ -0,0 +1,404 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma4I +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.GCongr + +/-! +# Śliwa's Lemma 4, Case 3 (`L` blocks) + +For `i ∈ Lₙ,ᵣ` above `(m - 1)aₘ` (so `n ≥ m`), `Qₘ fᵢ = 0` and `Tˢ fᵢ = cᵢ xʲ` with `j = i + s` +(Śliwa p. 634). With `n = m`: `j` lies in `Jₙ₊₁,₁` (3.1°), `Lₙ,ᵣ₊₁`, `Kₙ,ᵣ₊₁` or `Lₙ,ᵣ₊₂` (3.2°). +With `n > m`: `j` is still in `Lₙ,ᵣ` (3.3°), or `Tˢ fᵢ` passes through `T f_{r(aₙ + bₙ) - 1}`, which +Remark 3 bounds by `1/bₙ` (3.4°). +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/- ### Weights and small powers -/ + +/-- The ratio of two weights of the same `c` is a power of `α`. -/ +lemma weight_mul_inv_weight (c r i r' j : ℕ) : + weight c r i * (weight c r' j)⁻¹ = + alpha ^ ((((2 * (r : ℝ) - 1) * c - 2 * i) - ((2 * (r' : ℝ) - 1) * c - 2 * j)) / + Real.sqrt (4 * c)) := by + rw [weight, weight, ← Real.rpow_neg alpha_pos.le, ← Real.rpow_add alpha_pos] + congr 1; ring + +/-- A weight is at most `α^{√c/2}` when its numerator is at most `c`. -/ +lemma weight_le_half {c r i : ℕ} (hc : 0 < c) (hE : (2 * (r : ℝ) - 1) * c - 2 * i ≤ c) : + weight c r i ≤ alpha ^ (Real.sqrt c / 2) := by + refine alpha_rpow_le ?_ + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + have hsq : Real.sqrt c * Real.sqrt c = c := Real.mul_self_sqrt (by positivity) + rw [sqrt_four_mul, div_le_iff₀ (by positivity)] + nlinarith + +/-- A weight is at most `α^{-√c/4}` when its numerator is at most `-c/2`. -/ +lemma weight_le_neg {c r i : ℕ} (hc : 0 < c) (hE : (2 * (r : ℝ) - 1) * c - 2 * i ≤ -(c / 2)) : + weight c r i ≤ alpha ^ (-(Real.sqrt c / 4)) := by + refine alpha_rpow_le ?_ + have hs : 0 < Real.sqrt c := Real.sqrt_pos.2 (by exact_mod_cast hc) + have hsq : Real.sqrt c * Real.sqrt c = c := Real.mul_self_sqrt (by positivity) + rw [sqrt_four_mul, div_le_iff₀ (by positivity)] + nlinarith + +/-- `‖xʲ‖ ≤ 1` on a `J` block whose numerator is nonnegative. -/ +lemma nrm_xPow_J_le_one (h : PartitionHyp d) {N R j : ℕ} (hB : (⟨N, R, .J⟩ : Block).Mem d j) + (hE : 0 ≤ (2 * (R : ℝ) - 1) * seqA d N - 2 * j) : nrm (xPow d j) ≤ 1 := by + rw [nrm_xPow_of_J h hB rfl, inv_weight] + calc _ ≤ alpha ^ (0 : ℝ) := + alpha_rpow_le (by have := div_nonneg hE (Real.sqrt_nonneg (4 * (seqA d N : ℝ))) + dsimp only at this ⊢; linarith) + _ = 1 := Real.rpow_zero _ + +/-- `‖xʲ‖ ≤ 1` on an `L` block whose numerator is nonnegative. -/ +lemma nrm_xPow_L_le_one (h : PartitionHyp d) {N R j : ℕ} (hB : (⟨N, R, .L⟩ : Block).Mem d j) + (hE : 0 ≤ (2 * (R : ℝ) - 1) * seqB d N - 2 * j) : nrm (xPow d j) ≤ 1 := by + rw [nrm_xPow_of_L h hB rfl, inv_weight] + calc _ ≤ alpha ^ (0 : ℝ) := + alpha_rpow_le (by have := div_nonneg hE (Real.sqrt_nonneg (4 * (seqB d N : ℝ))) + dsimp only at this ⊢; linarith) + _ = 1 := Real.rpow_zero _ + +/-- Above `(m - 1)aₘ`, every block has level at least `m`: lower levels end by `vₘ₋₁ < aₘ`. -/ +lemma le_level (h : GrowthHyp d) {m i : ℕ} (hm : 2 ≤ m) {B : Block} (hB : B.Mem d i) + (hi : (m - 1) * seqA d m < i) : m ≤ B.n := by + have hP := h.toPartitionHyp + have hhi := ((B.mem_level hP hB).2.1) + by_contra hnm + have hv := seqV_mono hP (show B.n ≤ m - 1 by omega) + have hva := hP.v_lt_a m (m - 1) (by omega) + have : seqA d m ≤ (m - 1) * seqA d m := Nat.le_mul_of_pos_left _ (by omega) + omega + +/-- `4j < aₙ₊₁` for `j = i + s` with `i ≤ vₙ`, `n ≥ m`. -/ +lemma four_add_lt (h : GrowthHyp d) {m s n i : ℕ} (hm : 2 ≤ m) (hs : InK1 d m s) (hnm : m ≤ n) + (hi : i ≤ seqV d n) : 4 * (i + s) < seqA d (n + 1) := by + have h2b := hs.le_two_b h (by omega) + have hv := h.v_small (n + 1) n (by omega) + have hb := h.b_small n (by omega) + have hbm : seqB d m ≤ seqB d n := by + rcases Nat.eq_or_lt_of_le hnm with rfl | hlt + · exact le_rfl + · have h1 := h.b_small m (by omega) + have h2 := seqA_mono h (show 1 ≤ m + 1 by omega) (show m + 1 ≤ n by omega) + have h3 := h.a_small n (by omega) + have : seqA d n ≤ n * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + have : seqB d m ≤ m * seqB d m := Nat.le_mul_of_pos_left _ (by omega) + nlinarith + -- `4i ≤ 4vₙ < aₙ₊₁/2` and `4s ≤ 8bₘ ≤ 8bₙ ≤ 4n bₙ < aₙ₊₁/2`. + have e8 : 8 * n * seqB d n = 8 * (n * seqB d n) := by ring + have hnb : 2 * seqB d n ≤ n * seqB d n := Nat.mul_le_mul_right _ (by omega) + omega + +/- ### The subcases of Case 3 + +Each states the bound on `cᵢ ‖xʲ‖` (`cᵢ` the weight of `i ∈ Lₙ,ᵣ`, `j = i + s`) from the facts it +uses, to keep every proof short. -/ + +/-- **3.1°** `n = m`, `j > vₘ`: `j ∈ Jₘ₊₁,₁` and `cᵢ ≤ α^{√bₘ/2}`, while `‖xʲ‖ ≤ α^{-√aₘ₊₁/4}` and +`2√bₘ ≤ √aₘ₊₁`. -/ +lemma lemma4_L_31 (h : GrowthHyp d) {m r i j : ℕ} (hm : 2 < m) + (hB : (⟨m, r, .L⟩ : Block).Mem d i) (hjv : seqV d m < j) + (h4j : 4 * j < seqA d (m + 1)) : + weight (seqB d m) r i * nrm (xPow d j) ≤ 1 := by + have hP := h.toPartitionHyp + obtain ⟨hr1, hrn, hlo, -⟩ := hB + dsimp only at hr1 hrn hlo + have hb0 : 0 < seqB d m := lt_of_lt_of_le two_pos (h.two_le_b m) + have hJ : (⟨m + 1, 1, .J⟩ : Block).Mem d j := by + refine ⟨le_rfl, by dsimp; omega, ?_, ?_⟩ <;> dsimp only + · simp only [Nat.sub_self, zero_mul, zero_add, Nat.add_sub_cancel]; omega + · rw [one_mul]; omega + have hxj : nrm (xPow d j) ≤ alpha ^ (-(Real.sqrt (seqA d (m + 1)) / 4)) := by + refine nrm_xPow_J_le hP hJ ?_ + have : (4 * j : ℝ) < seqA d (m + 1) := by exact_mod_cast h4j + push_cast; linarith only [this] + have hw : weight (seqB d m) r i ≤ alpha ^ (Real.sqrt (seqB d m) / 2) := by + refine weight_le_half hb0 ?_ + have h1 : (r - 1) * seqB d m < i := by omega + have h2 : (((r - 1 : ℕ) : ℝ)) * seqB d m < i := by exact_mod_cast h1 + rw [Nat.cast_sub hr1] at h2; push_cast at h2; linarith only [h2] + have h4 : 2 * Real.sqrt (seqB d m) ≤ Real.sqrt (seqA d (m + 1)) := by + have hbs := h.b_small m (by omega) + have hmb : seqB d m ≤ m * seqB d m := Nat.le_mul_of_pos_left _ (by omega) + have e8 : 8 * m * seqB d m = 8 * (m * seqB d m) := by ring + have h4n : 4 * seqB d m ≤ seqA d (m + 1) := by omega + have h4R : (4 * seqB d m : ℝ) ≤ seqA d (m + 1) := by exact_mod_cast h4n + calc 2 * Real.sqrt (seqB d m) = Real.sqrt (4 * seqB d m) := by rw [sqrt_four_mul] + _ ≤ Real.sqrt (seqA d (m + 1)) := Real.sqrt_le_sqrt h4R + calc weight (seqB d m) r i * nrm (xPow d j) + ≤ alpha ^ (Real.sqrt (seqB d m) / 2) * alpha ^ (-(Real.sqrt (seqA d (m + 1)) / 4)) := + mul_le_mul hw hxj (nrm_nonneg _) (Real.rpow_pos_of_pos alpha_pos _).le + _ = alpha ^ (Real.sqrt (seqB d m) / 2 + -(Real.sqrt (seqA d (m + 1)) / 4)) := + (Real.rpow_add alpha_pos _ _).symm + _ ≤ alpha ^ (0 : ℝ) := alpha_rpow_le (by linarith only [h4]) + _ = 1 := Real.rpow_zero _ + +/-- **3.2° (a)** `n = m`, `j ∈ Lₘ,ᵣ₊₁`: `cᵢ / cⱼ = α^{(s - bₘ)/√bₘ}` with `s - bₘ ≤ √bₘ`. -/ +lemma lemma4_L_32a (h : GrowthHyp d) {m s r i : ℕ} (hm : 2 < m) (hs : InK1 d m s) + (hL : (⟨m, r + 1, .L⟩ : Block).Mem d (i + s)) : + weight (seqB d m) r i * nrm (xPow d (i + s)) ≤ alpha := by + have hP := h.toPartitionHyp + have hb0 : 0 < seqB d m := lt_of_lt_of_le two_pos (h.two_le_b m) + rw [nrm_xPow_of_L hP hL rfl, weight_mul_inv_weight] + dsimp only + have hsb : (s : ℝ) - seqB d m ≤ Real.sqrt (seqB d m) := by + have hsq := h.a_sq m (by omega) + have hma : (m - 1) * seqA d m ≤ m * seqA d m := Nat.mul_le_mul_right _ (by omega) + have hsq' : ((m - 1) * seqA d m) ^ 2 ≤ seqB d m := + le_of_lt (lt_of_le_of_lt (Nat.pow_le_pow_left hma 2) (by rw [mul_pow]; exact hsq)) + have h1 : (((m - 1) * seqA d m : ℕ) : ℝ) ≤ Real.sqrt (seqB d m) := + Real.le_sqrt_of_sq_le (by exact_mod_cast hsq') + have h2 : (s : ℝ) ≤ (((m - 1) * seqA d m : ℕ) : ℝ) + seqB d m := by exact_mod_cast hs.2 + linarith only [h1, h2] + calc alpha ^ (((2 * (r : ℝ) - 1) * seqB d m - 2 * i - + ((2 * ((r + 1 : ℕ) : ℝ) - 1) * seqB d m - 2 * ((i + s : ℕ) : ℝ))) / + Real.sqrt (4 * seqB d m)) + ≤ alpha ^ (1 : ℝ) := by + refine alpha_rpow_le ?_ + rw [sqrt_four_mul, div_le_one (by positivity)] + push_cast; linarith only [hsb] + _ = alpha := Real.rpow_one _ + +/-- **3.2° (b)** `n = m`, `j ∈ Kₘ,ᵣ₊₁`: `‖xʲ‖ ≤ 3bₘᵐ` (Lemma 1, and `Aₘ ≤ bₘ`), while +`cᵢ ≤ α^{-√bₘ/4}` because `4i ≥ (4r - 1)bₘ`; Śliwa's `bₘ^{4m} < α^{√bₘ/4}` finishes. -/ +lemma lemma4_L_32b (h : GrowthHyp d) {m s r i : ℕ} (hm : 2 < m) (hs : InK1 d m s) (hr1 : 1 ≤ r) + (hK : (⟨m, r + 1, .K⟩ : Block).Mem d (i + s)) : + weight (seqB d m) r i * nrm (xPow d (i + s)) ≤ 1 := by + have hP := h.toPartitionHyp + obtain ⟨-, hrm, hKlo, hKhi⟩ := id hK + dsimp only at hrm hKlo hKhi + have hb2 := h.two_le_b m + have hb0 : 0 < seqB d m := by omega + have hbR : (2 : ℝ) ≤ seqB d m := by exact_mod_cast hb2 + have hb1 : (1 : ℝ) ≤ seqB d m := by linarith only [hbR] + -- `‖xʲ‖ ≤ 2bₘʳ + bₘ^{r+1} Aₘ ≤ 3bₘᵐ`. + have h1b := nrm_xPow_K_le h hK + have hdown : i + s - (r + 1) * seqB d m ≤ (m - 1) * seqA d m := by omega + have hcap := (nrm_xPow_le_cap h m (by omega)).1 _ hdown + have hAb := h.rpow_a_le_b m (by omega) + unfold capA at hcap + have hxj : nrm (xPow d (i + s)) ≤ 3 * (seqB d m : ℝ) ^ m := by + have hp1 : (seqB d m : ℝ) ^ (r + 1 - 1) ≤ (seqB d m : ℝ) ^ m := + pow_le_pow_right₀ hb1 (by omega) + have hp2 : (seqB d m : ℝ) ^ (r + 1) * seqB d m ≤ (seqB d m : ℝ) ^ m := by + rw [← pow_succ]; exact pow_le_pow_right₀ hb1 (by omega) + have h3 : (seqB d m : ℝ) ^ (r + 1) * nrm (xPow d (i + s - (r + 1) * seqB d m)) ≤ + (seqB d m : ℝ) ^ (r + 1) * seqB d m := + mul_le_mul_of_nonneg_left (hcap.trans hAb) (by positivity) + linarith only [h1b, hp1, hp2, h3] + -- `cᵢ ≤ α^{-√bₘ/4}`. + have hw : weight (seqB d m) r i ≤ alpha ^ (-(Real.sqrt (seqB d m) / 4)) := by + refine weight_le_neg hb0 ?_ + have hab := h.a_small m (by omega) + have h8 : 4 * ((m - 2 - r) * seqA d m) ≤ seqB d m := by + have : (m - 2 - r) * seqA d m ≤ m * seqA d m := Nat.mul_le_mul_right _ (by omega) + have e8 : 8 * m * seqA d m = 8 * (m * seqA d m) := by ring + omega + have hexp : (r + 1) * (seqA d m + seqB d m) = + (r + 1) * seqA d m + r * seqB d m + seqB d m := by ring + have hm2 : (m - 1) * seqA d m = (r + 1) * seqA d m + (m - 2 - r) * seqA d m := by + rw [← Nat.add_mul]; congr 1; omega + have h4r : (4 * r - 1) * seqB d m + seqB d m = 4 * (r * seqB d m) := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, show 4 * r - 1 + 1 = 4 * r by omega]; ring + have hs2 := hs.2 + have hi4 : (4 * r - 1) * seqB d m ≤ 4 * i := by omega + have h4R : ((4 * r - 1 : ℕ) : ℝ) * seqB d m ≤ 4 * i := by exact_mod_cast hi4 + rw [Nat.cast_sub (by omega)] at h4R; push_cast at h4R; linarith only [h4R] + have hpb := h.pow_b m (by omega) + have hp : 0 < alpha ^ (Real.sqrt (seqB d m) / 4) := Real.rpow_pos_of_pos alpha_pos _ + have h3 : 3 * (seqB d m : ℝ) ^ m ≤ (seqB d m : ℝ) ^ (4 * m) := by + have hsplit : (seqB d m : ℝ) ^ (4 * m) = (seqB d m : ℝ) ^ m * (seqB d m : ℝ) ^ (3 * m) := by + rw [← pow_add]; ring_nf + rw [hsplit] + have h3' : (3 : ℝ) ≤ (seqB d m : ℝ) ^ (3 * m) := + le_trans (by norm_num) (le_trans (pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) + (show 2 ≤ 3 * m by omega)) (pow_le_pow_left₀ (by norm_num) hbR _)) + have hp0 : (0 : ℝ) ≤ (seqB d m : ℝ) ^ m := pow_nonneg (by linarith only [hbR]) m + nlinarith only [h3', hp0] + calc weight (seqB d m) r i * nrm (xPow d (i + s)) + ≤ alpha ^ (-(Real.sqrt (seqB d m) / 4)) * (3 * (seqB d m : ℝ) ^ m) := + mul_le_mul hw hxj (nrm_nonneg _) (Real.rpow_pos_of_pos alpha_pos _).le + _ ≤ alpha ^ (-(Real.sqrt (seqB d m) / 4)) * (seqB d m : ℝ) ^ (4 * m) := + mul_le_mul_of_nonneg_left h3 (Real.rpow_pos_of_pos alpha_pos _).le + _ ≤ 1 := by rw [Real.rpow_neg alpha_pos.le, inv_mul_le_iff₀ hp, mul_one]; exact hpb.le + +/-- **3.2° (c)** `n = m`, `j ∈ Lₘ,ᵣ₊₂`: `cᵢ / cⱼ = α^{(s - 2bₘ)/√bₘ} ≤ 1`. -/ +lemma lemma4_L_32c (h : GrowthHyp d) {m s r i : ℕ} (hm : 2 < m) (hs : InK1 d m s) + (hL : (⟨m, r + 2, .L⟩ : Block).Mem d (i + s)) : + weight (seqB d m) r i * nrm (xPow d (i + s)) ≤ 1 := by + have hP := h.toPartitionHyp + have h2b := hs.le_two_b h (by omega) + rw [nrm_xPow_of_L hP hL rfl, weight_mul_inv_weight] + dsimp only + calc alpha ^ (((2 * (r : ℝ) - 1) * seqB d m - 2 * i - + ((2 * ((r + 2 : ℕ) : ℝ) - 1) * seqB d m - 2 * ((i + s : ℕ) : ℝ))) / + Real.sqrt (4 * seqB d m)) + ≤ alpha ^ (0 : ℝ) := by + refine alpha_rpow_le (div_nonpos_of_nonpos_of_nonneg ?_ (Real.sqrt_nonneg _)) + have : (s : ℝ) ≤ 2 * seqB d m := by exact_mod_cast h2b + push_cast; linarith only [this] + _ = 1 := Real.rpow_zero _ + +/-- **3.3°** `n > m`, `j ∈ Lₙ,ᵣ`: `cᵢ / cⱼ = α^{s/√bₙ} ≤ α`. -/ +lemma lemma4_L_33 (h : GrowthHyp d) {m s n r i : ℕ} (hm : 2 < m) (hs : InK1 d m s) + (hmn : m < n) (hL : (⟨n, r, .L⟩ : Block).Mem d (i + s)) : + weight (seqB d n) r i * nrm (xPow d (i + s)) ≤ alpha := by + have hP := h.toPartitionHyp + have hb0 : 0 < seqB d n := lt_of_lt_of_le two_pos (h.two_le_b n) + have hsa := hs.le_sqrt_a h (by omega) hmn + have hab' : (seqA d n : ℝ) ≤ seqB d n := by + have hab := h.a_small n (by omega) + have : seqA d n ≤ n * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + have e8 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have : seqA d n ≤ seqB d n := by omega + exact_mod_cast this + have hsb : (s : ℝ) ≤ Real.sqrt (seqB d n) := hsa.trans (Real.sqrt_le_sqrt hab') + rw [nrm_xPow_of_L hP hL rfl, weight_mul_inv_weight] + dsimp only + calc alpha ^ (((2 * (r : ℝ) - 1) * seqB d n - 2 * i - + ((2 * (r : ℝ) - 1) * seqB d n - 2 * ((i + s : ℕ) : ℝ))) / Real.sqrt (4 * seqB d n)) + ≤ alpha ^ (1 : ℝ) := by + refine alpha_rpow_le ?_ + rw [sqrt_four_mul, div_le_one (by positivity)] + push_cast; linarith only [hsb] + _ = alpha := Real.rpow_one _ + +/-- **3.4°** `n > m`, `j ≥ r(aₙ + bₙ)`: through `T f_p` with `p = r(aₙ + bₙ) - 1`, Remark 3 gives +`‖T f_p‖ ≤ 1/bₙ`, and `αˢ ≤ aₘ₊₁ ≤ bₙ`. -/ +lemma lemma4_L_34 (h : GrowthHyp d) {m s n r i : ℕ} (hm : 2 < m) (hs : InK1 d m s) + (hmn : m < n) (hB : (⟨n, r, .L⟩ : Block).Mem d i) + (h34 : r * (seqA d n + seqB d n) ≤ i + s) : + weight (seqB d n) r i * nrm (xPow d (i + s)) ≤ 1 := by + have hP := h.toPartitionHyp + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hb0 : 0 < seqB d n := lt_of_lt_of_le two_pos (h.two_le_b n) + have hsqb : 0 < Real.sqrt (seqB d n) := Real.sqrt_pos.2 (by exact_mod_cast hb0) + have hsa := hs.le_sqrt_a h (by omega) hmn + have hab := h.a_small n (by omega) + have hna : seqA d n ≤ n * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + have e8 : 8 * n * seqA d n = 8 * (n * seqA d n) := by ring + have hab' : (seqA d n : ℝ) ≤ seqB d n := by + have : seqA d n ≤ seqB d n := by omega + exact_mod_cast this + have hsb : (s : ℝ) ≤ Real.sqrt (seqB d n) := hsa.trans (Real.sqrt_le_sqrt hab') + set k := r * (seqA d n + seqB d n) with hk + set p := k - 1 with hp + have hpL : (⟨n, r, .L⟩ : Block).Mem d p := ⟨hr1, hrn, by dsimp; omega, by dsimp; omega⟩ + have hsL := shiftImage_of_L hP hpL rfl + have hpow : xPow d (i + s) = + (weight (seqB d n) r p : ℂ)⁻¹ • (T₀ d ^ (i + s - k)) (shiftImage d p) := by + rw [hsL, map_smul, T₀_pow_xPow hP, smul_smul, inv_mul_cancel₀ (weight_ne_zero _ _ _), + one_smul] + congr 1; omega + have hrem := nrm_shiftImage_L_last h hpL (by omega) + have hTk := nrm_T₀_pow_le h (i + s - k) (shiftImage d p) + have hpi : i ≤ p := by omega + rw [hpow, nrm_smul, norm_inv, Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le, + weight_eq_mul_add hb0 r i (p - i), show i + (p - i) = p by omega, ← mul_assoc, + mul_assoc _ _ (weight _ _ _)⁻¹, mul_inv_cancel₀ (weight_pos _ _ _).ne', mul_one] + have hone : (1 : ℝ) ≤ alpha := one_le_alpha + have hexp : alpha ^ (((p - i : ℕ) : ℝ) / Real.sqrt (seqB d n)) ≤ alpha := by + calc alpha ^ (((p - i : ℕ) : ℝ) / Real.sqrt (seqB d n)) ≤ alpha ^ (1 : ℝ) := by + refine alpha_rpow_le ((div_le_one hsqb).2 (le_trans ?_ hsb)) + exact_mod_cast (show p - i ≤ s by omega) + _ = alpha := Real.rpow_one _ + have hαs : alpha * alpha ^ (i + s - k) ≤ alpha ^ s := by + rw [← pow_succ']; exact pow_le_pow_right₀ hone (by omega) + have hsA := hs.alpha_pow_le h (by omega) + have hAb : (seqA d (m + 1) : ℝ) ≤ seqB d n := by + have := seqA_mono h (show 1 ≤ m + 1 by omega) (show m + 1 ≤ n by omega) + have : seqA d (m + 1) ≤ seqB d n := by omega + exact_mod_cast this + have hpow0 : 0 ≤ alpha ^ (i + s - k) := pow_nonneg alpha_pos.le _ + have hbpos : (0 : ℝ) < seqB d n := by exact_mod_cast hb0 + calc alpha ^ (((p - i : ℕ) : ℝ) / Real.sqrt (seqB d n)) * + nrm ((T₀ d ^ (i + s - k)) (shiftImage d p)) + ≤ alpha * (alpha ^ (i + s - k) * (1 / seqB d n)) := + mul_le_mul hexp (hTk.trans (mul_le_mul_of_nonneg_left hrem hpow0)) (nrm_nonneg _) + (by norm_num [alpha]) + _ = (alpha * alpha ^ (i + s - k)) * (1 / seqB d n) := by ring + _ ≤ alpha ^ s * (1 / seqB d n) := by gcongr + _ ≤ seqB d n * (1 / seqB d n) := by gcongr; linarith only [hsA, hAb] + _ = 1 := by field_simp + +/-- **Lemma 4, Case 3** (`i ∈ Lₙ,ᵣ`). -/ +lemma lemma4_L (h : GrowthHyp d) {m s : ℕ} (hm : 2 < m) (hs : InK1 d m s) {n r i : ℕ} + (hB : (⟨n, r, .L⟩ : Block).Mem d i) (hi : (m - 1) * seqA d m < i) : + nrm ((T₀ d ^ s) (single i 1 - qImage d m i)) ≤ alpha := by + have hP := h.toPartitionHyp + have hq : qImage d m i = 0 := qImage_eq_zero hi (by rw [block_eq hP hB]; simp) + have hnm : m ≤ n := le_level h (by omega) hB hi + obtain ⟨hr1, hrn, hlo, hhi⟩ := id hB + dsimp only at hr1 hrn hlo hhi + have hone : (1 : ℝ) ≤ alpha := one_le_alpha + rw [hq, sub_zero, single_eq_of_L hP hB rfl, map_smul, T₀_pow_xPow hP, nrm_smul, + Complex.norm_real, Real.norm_of_nonneg (weight_pos _ _ _).le] + dsimp only + have hiv : i ≤ seqV d n := ((⟨n, r, .L⟩ : Block).mem_level hP hB).2.1 + have h4j := four_add_lt h (by omega) hs hnm hiv + have hs1 := hs.1 + have hs2 := hs.2 + rcases Nat.eq_or_lt_of_le hnm with rfl | hmn + · -- `n = m`. + have hvn : seqV d m = (m - 1) * seqA d m + (m - 1) * seqB d m := by unfold seqV; ring + have hrab : r * (seqA d m + seqB d m) = r * seqA d m + r * seqB d m := by ring + have hrb : (r - 1) * seqB d m + seqB d m = r * seqB d m := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + have hna : (m - 1) * seqA d m + seqA d m = m * seqA d m := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel (by omega)] + rcases lt_or_ge (seqV d m) (i + s) with hjv | hjv + · exact (lemma4_L_31 h hm hB hjv h4j).trans hone + · have hjlo : m * seqA d m + r * seqB d m < i + s := by omega + have hrm : r + 1 < m := by + by_contra hc + have : (m - 1) * seqB d m ≤ r * seqB d m := Nat.mul_le_mul_right _ (by omega) + omega + have hr1ab : (r + 1) * (seqA d m + seqB d m) = + r * seqA d m + r * seqB d m + seqA d m + seqB d m := by ring + rcases lt_or_ge (i + s) ((r + 1) * (seqA d m + seqB d m)) with ha' | ha' + · refine lemma4_L_32a h hm hs ⟨by dsimp; omega, by dsimp; omega, ?_, ha'⟩ + dsimp only; rw [Nat.add_sub_cancel]; omega + · rcases le_or_gt (i + s) ((m - 1) * seqA d m + (r + 1) * seqB d m) with hb' | hb' + · exact (lemma4_L_32b h hm hs hr1 + ⟨by dsimp; omega, by dsimp; omega, ha', hb'⟩).trans hone + · have hrm2 : r + 2 < m := by + by_contra hc + have : (m - 1) * seqB d m ≤ (r + 1) * seqB d m := Nat.mul_le_mul_right _ (by omega) + omega + refine (lemma4_L_32c h hm hs ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩).trans hone + · dsimp only; rw [show r + 2 - 1 = r + 1 by omega]; omega + · dsimp only + have : (r + 2) * (seqA d m + seqB d m) = + r * seqA d m + r * seqB d m + 2 * seqA d m + 2 * seqB d m := by ring + have hab := h.a_small m (by omega) + have hma : (m - 1) * seqA d m ≤ m * seqA d m := Nat.mul_le_mul_right _ (by omega) + have e8 : 8 * m * seqA d m = 8 * (m * seqA d m) := by ring + omega + · -- `n > m`. + rcases lt_or_ge (i + s) (r * (seqA d n + seqB d n)) with h33 | h34 + · exact lemma4_L_33 h hm hs hmn ⟨hr1, hrn, by dsimp; omega, h33⟩ + · exact (lemma4_L_34 h hm hs hmn hB h34).trans hone + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma5.lean b/LeanPool/ReadL1/Lemma5.lean new file mode 100644 index 0000000000..f4d52604b4 --- /dev/null +++ b/LeanPool/ReadL1/Lemma5.lean @@ -0,0 +1,395 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma5Window +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.GCongr + +/-! +# Śliwa's Lemma 5 + +For `e ≠ 0` and `k > 2` there is `m > k` with `|P_{(m-k)aₘ} (Qₘ e)| ≥ aₘ⁻¹` (`ReadL1.lemma5`). + +Śliwa (pp. 636–638) argues by contradiction from (1): `|P_{(m-k)aₘ} (Qₘ e)| < aₘ⁻¹` for every +`m > k` (`ReadL1.Hyp1`). In the notation of `ReadL1.Lemma5Coeff`, with `Wₙ = (vₙ₋₂, vₙ₋₁]`: + +* (4) `∑_{vₘ₋₁ < i ≤ (m-k)aₘ} |y_{m,i}| < aₘ⁻¹` (`ReadL1.step_four`); +* (5) `∑_{Wₙ} |z_{n,j}| ≤ aₙ⁻¹` (`ReadL1.step_five`), through `y_{m,j} = aₙ eⱼ` on `M_{m,n}`; +* (6), (7) `∑_{Wₙ} |y_{n,j}| < 2aₙ⁻¹`, so `∑_{Wₙ} |eⱼ| < 2aₙ⁻¹ Bₙ₋₁` (`ReadL1.step_window`); +* p. 638: `∑_{j ≤ vₙ₋₁} |z_{n,j}| ≤ aₙ₊₁⁻¹`, `|P_{vₙ₋₁} ∑_{l ≤ vₙ₋₁} eₗ fₗ| < aₙ⁻¹ + aₙ₊₁⁻¹ + + aₙ₋₁ aₙ⁻¹`, and finally `∑_{j ≤ vₙ₋₁} |eⱼ| < aₙ₋₁⁻¹` (`ReadL1.step_final`) for every `n > k`, + which forces `e = 0`. + +Śliwa's constants are slightly rounded here and there (e.g. `2aₙ⁻¹aₙ₋₁` for +`aₙ⁻¹ + aₙ₊₁⁻¹ + aₙ₋₁aₙ⁻¹`); the growth facts used are `aₘ₊₁ ≥ 2aₘ` and `4aₘ² Bₘ ≤ aₘ₊₁`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/-- Śliwa's assumption (1), to be refuted. -/ +def Hyp1 (h : GrowthHyp d) (e : L1) (k : ℕ) : Prop := + ∀ m, k < m → + pnorm (ptrunc ((m - k) * seqA d m) (qPoly h.toPartitionHyp m e)) < (seqA d m : ℝ)⁻¹ + +section + +variable {h : GrowthHyp d} {e : L1} {k : ℕ} + +lemma seqA_pos (h : GrowthHyp d) (m : ℕ) : (0 : ℝ) < seqA d m := by + exact_mod_cast h.one_le_a m + +lemma seqV_lt_mul (h : GrowthHyp d) {k n : ℕ} (hkn : k < n) : + seqV d (n - 1) < (n - k) * seqA d n := by + have h1 := h.v_lt_a n (n - 1) (by omega) + have h2 : seqA d n ≤ (n - k) * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + omega + +/-- Coefficients of `Qₘ e` below `(m - k)aₘ` sum to less than `aₘ⁻¹`. -/ +lemma sum_norm_qCoeff_lt (hk : 2 < k) (H : Hyp1 h e k) {m : ℕ} (hkm : k < m) {s : Finset ℕ} + (hs : s ⊆ Finset.range ((m - k) * seqA d m + 1)) : + ∑ j ∈ s, ‖qCoeffCLM h.toPartitionHyp m j e‖ < (seqA d m : ℝ)⁻¹ := by + refine lt_of_le_of_lt ?_ (H m hkm) + rw [pnorm_ptrunc_eq_sum] + refine (Finset.sum_le_sum_of_subset_of_nonneg hs fun _ _ _ ↦ norm_nonneg _).trans_eq ?_ + exact Finset.sum_congr rfl fun j _ ↦ by rw [coeff_qPoly _ (by omega)] + +/-- **(4)**: `∑_{vₘ₋₁ < i ≤ (m-k)aₘ} |y_{m,i}| < aₘ⁻¹`. -/ +lemma step_four (hk : 2 < k) (H : Hyp1 h e k) {m : ℕ} (hkm : k < m) : + ∑ i ∈ Finset.Ioc (seqV d (m - 1)) ((m - k) * seqA d m), ‖yCoeff d m i e‖ < + (seqA d m : ℝ)⁻¹ := by + have hP := h.toPartitionHyp + have hyq : ∀ i ∈ Finset.Ioc (seqV d (m - 1)) ((m - k) * seqA d m), + yCoeff d m i e = qCoeffCLM hP m i e := fun i hi ↦ by + rw [Finset.mem_Ioc] at hi + rw [qCoeffCLM_eq_add, zCoeff_eq_zero hP (n := m) (j := i) hi.1 e, add_zero] + rw [Finset.sum_congr rfl fun i hi ↦ by rw [hyq i hi]] + exact sum_norm_qCoeff_lt hk H hkm fun i hi ↦ by + rw [Finset.mem_Ioc] at hi; exact Finset.mem_range.2 (by omega) + +/-- Bounding `∑ |z_{n,j}|` through Śliwa's (2), one level `m = n + t + 1` at a time. -/ +lemma sum_norm_zCoeff_le (h : GrowthHyp d) {n : ℕ} (hn : 2 ≤ n) (s : Finset ℕ) + (hs : ∀ j ∈ s, j ≤ seqV d (n - 1)) (e : L1) {g : ℕ → ℝ} (hg : Summable g) + (hbound : ∀ t, ∑ j ∈ s, (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ ≤ g t) : + ∑ j ∈ s, ‖zCoeff d n j e‖ ≤ ∑' t, g t := by + have hP := h.toPartitionHyp + have hsum : ∀ j ∈ s, Summable fun t ↦ (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ := fun j hj ↦ + ((summable_norm e).comp_injective (zIdx_injective hP (by omega) (hs j hj))).mul_left _ + have hz : ∀ j ∈ s, ‖zCoeff d n j e‖ ≤ ∑' t, (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ := by + intro j hj + have hnorm : ∀ t, ‖-(seqA d n : ℂ) * e (zIdx d n j t)‖ = + (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ := fun t ↦ by + rw [norm_mul, norm_neg, Complex.norm_natCast] + rw [← (hasSum_zCoeff h hn (hs j hj) e).tsum_eq] + refine (norm_tsum_le_tsum_norm ?_).trans_eq ?_ + · simpa only [hnorm] using hsum j hj + · exact tsum_congr hnorm + calc ∑ j ∈ s, ‖zCoeff d n j e‖ ≤ ∑ j ∈ s, ∑' t, (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ := + Finset.sum_le_sum hz + _ = ∑' t, ∑ j ∈ s, (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ := + (Summable.tsum_finsetSum hsum).symm + _ ≤ ∑' t, g t := Summable.tsum_le_tsum hbound (summable_sum hsum) hg + +/-- `aₘ⁻¹ ≤ aₙ⁻¹ / 2 / 2ᵗ` for `m = n + t + 1`. -/ +lemma inv_seqA_le_geom (h : GrowthHyp d) {n : ℕ} (hn : 1 ≤ n) (t : ℕ) : + (seqA d (n + t + 1) : ℝ)⁻¹ ≤ (seqA d n : ℝ)⁻¹ / 2 / 2 ^ t := by + have h1 := pow_two_mul_le_seqA h hn (t + 1) + rw [← add_assoc] at h1 + have h2 : (2 : ℝ) ^ (t + 1) * seqA d n ≤ seqA d (n + t + 1) := by exact_mod_cast h1 + have ha := seqA_pos h n + calc (seqA d (n + t + 1) : ℝ)⁻¹ ≤ ((2 : ℝ) ^ (t + 1) * seqA d n)⁻¹ := + inv_anti₀ (by positivity) h2 + _ = (seqA d n : ℝ)⁻¹ / 2 / 2 ^ t := by rw [pow_succ]; field_simp + +/-- **(5)**: `∑_{vₙ₋₂ < j ≤ vₙ₋₁} |z_{n,j}| ≤ aₙ⁻¹`. -/ +lemma step_five (hk : 2 < k) (H : Hyp1 h e k) {n : ℕ} (hkn : k < n) : + ∑ j ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), ‖zCoeff d n j e‖ ≤ (seqA d n : ℝ)⁻¹ := by + have hP := h.toPartitionHyp + rw [← tsum_geometric_two' (seqA d n : ℝ)⁻¹] + refine sum_norm_zCoeff_le h (by omega) _ (fun j hj ↦ (Finset.mem_Ioc.1 hj).2) e + (summable_geometric_two' _) fun t ↦ ?_ + have hva := h.v_lt_a (n + t + 1) (n - 1) (by omega) + have hmul : (t + 1 + 1) * seqA d (n + t + 1) ≤ (n + t + 1 - k) * seqA d (n + t + 1) := + Nat.mul_le_mul_right _ (by omega) + have hinj : Set.InjOn (fun j ↦ zIdx d n j t) + (Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)) : Set ℕ) := fun j _ j' _ hjj ↦ by + simp only [zIdx] at hjj; omega + have hsub : (Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1))).image (fun j ↦ zIdx d n j t) ⊆ + Finset.Ioc (seqV d (n + t + 1 - 1)) ((n + t + 1 - k) * seqA d (n + t + 1)) := by + intro i hi + obtain ⟨j, hj, rfl⟩ := Finset.mem_image.1 hi + rw [Finset.mem_Ioc] at hj ⊢ + refine ⟨(zIdx_mem_level hP (by omega) hj.2 t).1, ?_⟩ + simp only [zIdx] + rw [add_one_mul] at hmul + omega + calc ∑ j ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ + = ∑ j ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), + ‖yCoeff d (n + t + 1) (zIdx d n j t) e‖ := by + refine Finset.sum_congr rfl fun j hj ↦ ?_ + rw [Finset.mem_Ioc] at hj + obtain ⟨hw1, hw2⟩ := zIdx_mem_window (d := d) hj.1 hj.2 t + rw [yCoeff_of_window hP (by omega) (by omega) hw1 hw2, norm_mul, Complex.norm_natCast] + _ = ∑ i ∈ (Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1))).image (fun j ↦ zIdx d n j t), + ‖yCoeff d (n + t + 1) i e‖ := + (Finset.sum_image (f := fun i ↦ ‖yCoeff d (n + t + 1) i e‖) hinj).symm + _ ≤ ∑ i ∈ Finset.Ioc (seqV d (n + t + 1 - 1)) ((n + t + 1 - k) * seqA d (n + t + 1)), + ‖yCoeff d (n + t + 1) i e‖ := + Finset.sum_le_sum_of_subset_of_nonneg hsub fun _ _ _ ↦ norm_nonneg _ + _ ≤ (seqA d (n + t + 1) : ℝ)⁻¹ := (step_four hk H (by omega)).le + _ ≤ (seqA d n : ℝ)⁻¹ / 2 / 2 ^ t := inv_seqA_le_geom h (by omega) t + +/-- `‖y‖ ≤ ‖Qₙ e‖ + ‖z‖`, coefficientwise. -/ +lemma norm_yCoeff_le (h : GrowthHyp d) (n j : ℕ) (e : L1) : + ‖yCoeff d n j e‖ ≤ ‖qCoeffCLM h.toPartitionHyp n j e‖ + ‖zCoeff d n j e‖ := by + rw [show yCoeff d n j e = qCoeffCLM h.toPartitionHyp n j e - zCoeff d n j e by + rw [qCoeffCLM_eq_add]; ring] + exact norm_sub_le _ _ + +/-- **(6), (7)** and Śliwa's estimate for `∑_{Wₙ} |eⱼ|`: below `2aₙ⁻¹ Bₙ₋₁`. -/ +lemma step_window (hk : 2 < k) (H : Hyp1 h e k) {n : ℕ} (hkn : k < n) : + ∑ i ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), ‖e i‖ < + 2 * (seqA d n : ℝ)⁻¹ * capB d (n - 1) := by + have hy : ∑ j ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), ‖yCoeff d n j e‖ < + 2 * (seqA d n : ℝ)⁻¹ := by + have hq := sum_norm_qCoeff_lt hk H hkn (s := Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1))) + fun j hj ↦ by + have := seqV_lt_mul h hkn + rw [Finset.mem_Ioc] at hj; exact Finset.mem_range.2 (by omega) + have hz := step_five hk H hkn + calc _ ≤ ∑ j ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), + (‖qCoeffCLM h.toPartitionHyp n j e‖ + ‖zCoeff d n j e‖) := + Finset.sum_le_sum fun j _ ↦ norm_yCoeff_le h n j e + _ < 2 * (seqA d n : ℝ)⁻¹ := by rw [Finset.sum_add_distrib]; linarith + have hB : 0 < capB d (n - 1) := zero_lt_one.trans_le (one_le_capB _) + exact (sum_norm_window_le h (by omega) e).trans_lt (mul_lt_mul_of_pos_right hy hB) + +/-- The window one level up: `∑_{vₘ₋₁ < i ≤ vₘ} |eᵢ| < 2aₘ₊₁⁻¹ Bₘ` for `m ≥ k`. -/ +lemma step_level (hk : 2 < k) (H : Hyp1 h e k) {m : ℕ} (hkm : k ≤ m) : + ∑ i ∈ Finset.Ioc (seqV d (m - 1)) (seqV d m), ‖e i‖ < + 2 * (seqA d (m + 1) : ℝ)⁻¹ * capB d m := by + have := step_window hk H (n := m + 1) (by omega) + rwa [show m + 1 - 2 = m - 1 by omega, show m + 1 - 1 = m by omega] at this + +/-- `2aₘ₊₁⁻¹ Bₘ ≤ aₘ⁻¹`. -/ +lemma two_inv_mul_capB_le (h : GrowthHyp d) {m : ℕ} (hm : 1 ≤ m) : + 2 * (seqA d (m + 1) : ℝ)⁻¹ * capB d m ≤ (seqA d m : ℝ)⁻¹ := by + have hf := four_sq_mul_capB_le h hm + have ha := seqA_pos h m + have ha1 := seqA_pos h (m + 1) + have ha2 : (1 : ℝ) ≤ seqA d m := by exact_mod_cast h.one_le_a m + have hB : 0 ≤ capB d m := zero_le_one.trans (one_le_capB m) + have key : 2 * capB d m * seqA d m ≤ seqA d (m + 1) := by nlinarith + calc 2 * (seqA d (m + 1) : ℝ)⁻¹ * capB d m + = (2 * capB d m * seqA d m) * ((seqA d (m + 1) : ℝ)⁻¹ * (seqA d m : ℝ)⁻¹) := by + field_simp + _ ≤ seqA d (m + 1) * ((seqA d (m + 1) : ℝ)⁻¹ * (seqA d m : ℝ)⁻¹) := by gcongr + _ = (seqA d m : ℝ)⁻¹ := by field_simp + +/-- Śliwa p. 637 (end): `∑_{vₘ₋₁ < i ≤ cₘ} |eᵢ| < aₘ⁻¹` for `m ≥ k`. -/ +lemma step_tail (hk : 2 < k) (H : Hyp1 h e k) {m : ℕ} (hkm : k ≤ m) : + ∑ i ∈ Finset.Ioc (seqV d (m - 1)) ((m - 1) * seqA d m), ‖e i‖ < (seqA d m : ℝ)⁻¹ := by + have hvm : (m - 1) * seqA d m ≤ seqV d m := by + unfold seqV; exact Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + refine lt_of_le_of_lt (Finset.sum_le_sum_of_subset_of_nonneg + (Finset.Ioc_subset_Ioc_right hvm) fun _ _ _ ↦ norm_nonneg _) ?_ + exact (step_level hk H hkm).trans_le (two_inv_mul_capB_le h (by omega)) + +/-- `aₙ (2aₘ₊₁⁻¹ Bₘ) ≤ aₙ₊₁⁻¹ / 2 / 2ᵗ` for `m = n + t + 1`. -/ +lemma seqA_mul_le_geom (h : GrowthHyp d) {n : ℕ} (hn : 1 ≤ n) (t : ℕ) : + (seqA d n : ℝ) * (2 * (seqA d (n + t + 1 + 1) : ℝ)⁻¹ * capB d (n + t + 1)) ≤ + (seqA d (n + 1) : ℝ)⁻¹ / 2 / 2 ^ t := by + have hf := four_sq_mul_capB_le h (m := n + t + 1) (by omega) + have hT : (2 : ℝ) ^ t * seqA d (n + 1) ≤ seqA d (n + t + 1) := by + have := pow_two_mul_le_seqA h (m := n + 1) (by omega) t + rw [show n + 1 + t = n + t + 1 by omega] at this + exact_mod_cast this + have hAm : (seqA d n : ℝ) ≤ seqA d (n + t + 1) := by + exact_mod_cast seqA_mono h (m' := n + t + 1) hn (by omega) + set A := (seqA d n : ℝ) + set Am := (seqA d (n + t + 1) : ℝ) + set Am1 := (seqA d (n + t + 1 + 1) : ℝ) + set A1 := (seqA d (n + 1) : ℝ) + set B := capB d (n + t + 1) + have hA := seqA_pos h n + have hA1 := seqA_pos h (n + 1) + have hAm1 := seqA_pos h (n + t + 1 + 1) + have hB : 0 ≤ B := zero_le_one.trans (one_le_capB _) + have h2t : (0 : ℝ) < 2 ^ t := by positivity + have hprod : A * (2 ^ t * A1) ≤ Am * Am := mul_le_mul hAm hT (by positivity) (by linarith) + rw [show A * (2 * Am1⁻¹ * B) = (2 * A * B) / Am1 by field_simp, + show A1⁻¹ / 2 / 2 ^ t = 1 / (2 * 2 ^ t * A1) by field_simp, + div_le_div_iff₀ hAm1 (by positivity)] + calc 2 * A * B * (2 * 2 ^ t * A1) = 4 * B * (A * (2 ^ t * A1)) := by ring + _ ≤ 4 * B * (Am * Am) := by gcongr + _ = 4 * Am ^ 2 * B := by ring + _ ≤ 1 * Am1 := by linarith + +/-- Śliwa p. 638 (top): `∑_{j ≤ vₙ₋₁} |z_{n,j}| ≤ aₙ₊₁⁻¹` for `n ≥ k`. -/ +lemma step_z_all (hk : 2 < k) (H : Hyp1 h e k) {n : ℕ} (hkn : k ≤ n) : + ∑ j ∈ Finset.range (seqV d (n - 1) + 1), ‖zCoeff d n j e‖ ≤ (seqA d (n + 1) : ℝ)⁻¹ := by + have hP := h.toPartitionHyp + rw [← tsum_geometric_two' (seqA d (n + 1) : ℝ)⁻¹] + refine sum_norm_zCoeff_le h (by omega) _ + (fun j hj ↦ Nat.lt_succ_iff.1 (Finset.mem_range.1 hj)) e (summable_geometric_two' _) + fun t ↦ ?_ + have hinj : Set.InjOn (fun j ↦ zIdx d n j t) + (Finset.range (seqV d (n - 1) + 1) : Set ℕ) := fun j _ j' _ hjj ↦ by + simp only [zIdx] at hjj; omega + have hsub : (Finset.range (seqV d (n - 1) + 1)).image (fun j ↦ zIdx d n j t) ⊆ + Finset.Ioc (seqV d (n + t + 1 - 1)) (seqV d (n + t + 1)) := by + intro i hi + obtain ⟨j, hj, rfl⟩ := Finset.mem_image.1 hi + exact Finset.mem_Ioc.2 (zIdx_mem_level hP (by omega) + (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj)) t) + calc ∑ j ∈ Finset.range (seqV d (n - 1) + 1), (seqA d n : ℝ) * ‖e (zIdx d n j t)‖ + = (seqA d n : ℝ) * ∑ i ∈ (Finset.range (seqV d (n - 1) + 1)).image + (fun j ↦ zIdx d n j t), ‖e i‖ := by + rw [Finset.sum_image hinj, Finset.mul_sum] + _ ≤ (seqA d n : ℝ) * ∑ i ∈ Finset.Ioc (seqV d (n + t + 1 - 1)) (seqV d (n + t + 1)), + ‖e i‖ := + mul_le_mul_of_nonneg_left + (Finset.sum_le_sum_of_subset_of_nonneg hsub fun _ _ _ ↦ norm_nonneg _) (seqA_pos h n).le + _ ≤ (seqA d n : ℝ) * (2 * (seqA d (n + t + 1 + 1) : ℝ)⁻¹ * capB d (n + t + 1)) := + mul_le_mul_of_nonneg_left (step_level hk H (by omega)).le (seqA_pos h n).le + _ ≤ (seqA d (n + 1) : ℝ)⁻¹ / 2 / 2 ^ t := seqA_mul_le_geom h (by omega) t + +/-- Śliwa p. 638: `∑_{j ≤ vₙ₋₁} |y_{n,j}| < aₙ⁻¹ + aₙ₊₁⁻¹`. -/ +lemma step_y_all (hk : 2 < k) (H : Hyp1 h e k) {n : ℕ} (hkn : k < n) : + ∑ j ∈ Finset.range (seqV d (n - 1) + 1), ‖yCoeff d n j e‖ < + (seqA d n : ℝ)⁻¹ + (seqA d (n + 1) : ℝ)⁻¹ := by + have hq := sum_norm_qCoeff_lt hk H hkn (s := Finset.range (seqV d (n - 1) + 1)) + fun j hj ↦ by + have := seqV_lt_mul h hkn + rw [Finset.mem_range] at hj ⊢; omega + have hz := step_z_all hk H hkn.le + calc _ ≤ ∑ j ∈ Finset.range (seqV d (n - 1) + 1), + (‖qCoeffCLM h.toPartitionHyp n j e‖ + ‖zCoeff d n j e‖) := + Finset.sum_le_sum fun j _ ↦ norm_yCoeff_le h n j e + _ < _ := by rw [Finset.sum_add_distrib]; linarith + +/-- Śliwa p. 638: `|∑_{l ≤ vₙ₋₁} eₗ fₗ| < aₙ⁻¹ + aₙ₊₁⁻¹ + aₙ₋₁ aₙ⁻¹`. -/ +lemma step_S (hk : 2 < k) (H : Hyp1 h e k) {n : ℕ} (hkn : k < n) : + pnorm (fromCoord d (truncL1 (seqV d (n - 1)) e)) < + (seqA d n : ℝ)⁻¹ + (seqA d (n + 1) : ℝ)⁻¹ + seqA d (n - 1) * (seqA d n : ℝ)⁻¹ := by + have hP := h.toPartitionHyp + set v := seqV d (n - 1) with hv + set c := (n - 1) * seqA d n with hc + have hvc : v + 1 ≤ c + 1 := by + have h1 := hP.v_lt_a n (n - 1) (by omega) + have h2 : seqA d n ≤ (n - 1) * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + omega + set S := fromCoord d (truncL1 v e) with hS + set R : ℕ →₀ ℂ := ∑ l ∈ Finset.Ico (v + 1) (c + 1), single l (e l) with hR + have hsplit : truncL1 c e = truncL1 v e + R := by + rw [truncL1, truncL1, hR, Finset.sum_range_add_sum_Ico _ hvc] + have hSP : ptrunc v S = S := ptrunc_of_natDegree_le (natDegree_fromCoord_truncL1_le hP v e) + have hSeq : S = ptrunc v (fromCoord d (truncL1 c e)) - ptrunc v (fromCoord d R) := by + rw [hsplit, map_add, ptrunc_add, hSP, add_sub_cancel_right] + have h1 : pnorm (ptrunc v (fromCoord d (truncL1 c e))) < + (seqA d n : ℝ)⁻¹ + (seqA d (n + 1) : ℝ)⁻¹ := by + rw [pnorm_ptrunc_eq_sum] + refine lt_of_eq_of_lt ?_ (step_y_all hk H hkn) + exact Finset.sum_congr rfl fun j _ ↦ by rw [yCoeff_eq_coeff] + have hRpoly : fromCoord d R = ∑ l ∈ Finset.Ico (v + 1) (c + 1), e l • fPoly d l := by + rw [hR, map_sum]; simp only [fromCoord_single] + have htail : ∑ l ∈ Finset.Ico (v + 1) (c + 1), ‖e l‖ < (seqA d n : ℝ)⁻¹ := by + rw [Finset.Ico_add_one_add_one_eq_Ioc]; exact step_tail hk H hkn.le + have h2 : pnorm (ptrunc v (fromCoord d R)) ≤ + seqA d (n - 1) * ∑ l ∈ Finset.Ico (v + 1) (c + 1), ‖e l‖ := by + rw [hRpoly, ptrunc_sum_smul, Finset.mul_sum] + refine (pnorm_sum_le _ _).trans (Finset.sum_le_sum fun l hl ↦ ?_) + rw [Finset.mem_Ico] at hl + rw [smul_eq_C_mul, pnorm_C_mul, mul_comm] + exact mul_le_mul_of_nonneg_right + (pnorm_ptrunc_fPoly_le h (by omega) (by omega) (by omega)) (norm_nonneg _) + have ha := seqA_pos h (n - 1) + rw [hSeq] + refine (pnorm_sub_le _ _).trans_lt ?_ + have h3 : (seqA d (n - 1) : ℝ) * ∑ l ∈ Finset.Ico (v + 1) (c + 1), ‖e l‖ < + seqA d (n - 1) * (seqA d n : ℝ)⁻¹ := mul_lt_mul_of_pos_left htail ha + linarith + +/-- `Bₙ₋₁ (aₙ⁻¹ + aₙ₊₁⁻¹ + aₙ₋₁ aₙ⁻¹) ≤ aₙ₋₁⁻¹`. -/ +lemma capB_mul_le (h : GrowthHyp d) {n : ℕ} (hn : 2 ≤ n) : + capB d (n - 1) * ((seqA d n : ℝ)⁻¹ + (seqA d (n + 1) : ℝ)⁻¹ + + seqA d (n - 1) * (seqA d n : ℝ)⁻¹) ≤ (seqA d (n - 1) : ℝ)⁻¹ := by + have hf := four_sq_mul_capB_le h (m := n - 1) (by omega) + rw [show n - 1 + 1 = n by omega] at hf + have ha := seqA_pos h n + have ha1 := seqA_pos h (n + 1) + have ha' := seqA_pos h (n - 1) + have ha'1 : (1 : ℝ) ≤ seqA d (n - 1) := by exact_mod_cast h.one_le_a _ + have hmono : (seqA d n : ℝ) ≤ seqA d (n + 1) := by + exact_mod_cast seqA_mono h (by omega) (by omega) + have hB : 0 ≤ capB d (n - 1) := zero_le_one.trans (one_le_capB _) + have hinv : (seqA d (n + 1) : ℝ)⁻¹ ≤ (seqA d n : ℝ)⁻¹ := inv_anti₀ ha hmono + set a' := (seqA d (n - 1) : ℝ) + set A := (seqA d n : ℝ) + set B := capB d (n - 1) + calc B * (A⁻¹ + (seqA d (n + 1) : ℝ)⁻¹ + a' * A⁻¹) ≤ B * ((2 + a') * A⁻¹) := by + gcongr; linarith + _ = (B * (2 + a') * a') * (A⁻¹ * a'⁻¹) := by field_simp + _ ≤ A * (A⁻¹ * a'⁻¹) := by + gcongr + nlinarith + _ = a'⁻¹ := by field_simp + +/-- **Śliwa p. 638 (end)**: `∑_{j ≤ vₙ₋₁} |eⱼ| < aₙ₋₁⁻¹` for every `n > k`. -/ +lemma step_final (hk : 2 < k) (H : Hyp1 h e k) {n : ℕ} (hkn : k < n) : + ∑ j ∈ Finset.range (seqV d (n - 1) + 1), ‖e j‖ < (seqA d (n - 1) : ℝ)⁻¹ := by + have hP := h.toPartitionHyp + have hB : 0 < capB d (n - 1) := zero_lt_one.trans_le (one_le_capB _) + rw [← nrm_truncL1, ← toCoord_fromCoord hP (truncL1 (seqV d (n - 1)) e)] + refine (nrm_toCoord_le (natDegree_fromCoord_truncL1_le hP _ e) + (nrm_xPow_le_cap h (n - 1) (by omega)).2).trans_lt ?_ + exact (mul_lt_mul_of_pos_left (step_S hk H hkn) hB).trans_le (capB_mul_le h (by omega)) + +end + +/-- **Śliwa's Lemma 5.** For `e ≠ 0` and `k > 2` there is `m > k` with +`|P_{(m-k)aₘ} (Qₘ e)| ≥ aₘ⁻¹`. -/ +theorem lemma5 (h : GrowthHyp d) {e : L1} (he : e ≠ 0) {k : ℕ} (hk : 2 < k) : + ∃ m, k < m ∧ + (seqA d m : ℝ)⁻¹ ≤ pnorm (ptrunc ((m - k) * seqA d m) (qPoly h.toPartitionHyp m e)) := by + by_contra hcon + push Not at hcon + have H : Hyp1 h e k := hcon + apply he + refine lp.ext (funext fun i ↦ ?_) + rw [lp.coeFn_zero, Pi.zero_apply] + by_contra hi + have hpos : 0 < ‖e i‖ := norm_pos_iff.2 hi + obtain ⟨N, hN⟩ := exists_nat_gt (‖e i‖)⁻¹ + set n := k + i + N + 2 with hn + have hfin := step_final hk H (n := n) (by omega) + have hiv : i ≤ seqV d (n - 1) := + (le_seqV_succ h.toPartitionHyp i).trans (seqV_mono h.toPartitionHyp (by omega)) + have hle : ‖e i‖ ≤ ∑ j ∈ Finset.range (seqV d (n - 1) + 1), ‖e j‖ := + Finset.single_le_sum (fun j _ ↦ norm_nonneg (e j)) (Finset.mem_range.2 (by omega)) + have hNa : (N : ℝ) ≤ seqA d (n - 1) := by + exact_mod_cast (show N ≤ n - 1 by omega).trans (le_seqA h (by omega)) + have ha := seqA_pos h (n - 1) + have h1 : 1 < ‖e i‖ * N := by + rw [inv_lt_iff_one_lt_mul₀ hpos] at hN; linarith + have h2 : ‖e i‖ * seqA d (n - 1) < 1 := by + have := mul_lt_mul_of_pos_right (hle.trans_lt hfin) ha + rwa [inv_mul_cancel₀ ha.ne'] at this + nlinarith [mul_le_mul_of_nonneg_left hNa hpos.le] + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma5Coeff.lean b/LeanPool/ReadL1/Lemma5Coeff.lean new file mode 100644 index 0000000000..26084e7eca --- /dev/null +++ b/LeanPool/ReadL1/Lemma5Coeff.lean @@ -0,0 +1,279 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.QPoly +import Mathlib.Tactic.Ring +import Mathlib.Tactic.SplitIfs + +/-! +# The coefficients of `Qₙ e` (Śliwa's (2), (3) and the identity `y_{m,j} = aₙ eⱼ`) + +Śliwa (p. 636) splits `Qₙ e = ∑_{j ≤ cₙ} y_{n,j} xʲ + ∑_{j ≤ vₙ₋₁} z_{n,j} xʲ`, with +`cₙ = (n - 1)aₙ`: the first sum is `∑_{l ≤ cₙ} eₗ fₗ` (`ReadL1.yCoeff`), the second comes from the +`Iₘ,ₘ₋ₙ` blocks above `cₙ` (`ReadL1.zCoeff`). Here: + +* `ReadL1.qCoeffCLM_eq_add`: the `j`-th coefficient of `Qₙ e` is `y_{n,j} + z_{n,j}`; +* `ReadL1.zCoeff_eq_zero`: `z_{n,j} = 0` above `vₙ₋₁`; +* `ReadL1.hasSum_zCoeff`: Śliwa's (2), `z_{n,j} = -aₙ ∑_{m > n} e_{j + (m - n)aₘ}`; +* `ReadL1.yCoeff_of_window`: `y_{m,j} = aₙ eⱼ` on `M_{m,n} = ((m - n)aₘ + vₙ₋₂, (m - n)aₘ + vₙ₋₁]` + (Śliwa p. 637). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/-- Śliwa's `y_{n,j}`: the `j`-th coefficient of `∑_{l ≤ (n - 1)aₙ} eₗ fₗ`. -/ +noncomputable def yCoeff (d : ℕ → ℕ) (n j : ℕ) (e : L1) : ℂ := + ∑ l ∈ Finset.range ((n - 1) * seqA d n + 1), e l * (fPoly d l).coeff j + +/-- Śliwa's `z_{n,j}`: the part of the `j`-th coefficient of `Qₙ e` from indices above +`(n - 1)aₙ`. -/ +noncomputable def zCoeff (d : ℕ → ℕ) (n j : ℕ) (e : L1) : ℂ := + ∑' l, if (n - 1) * seqA d n < l then e l * (qPolyBasis d n l).coeff j else 0 + +/-- The index `j + (m - n)aₘ` with `m = n + t + 1`. -/ +def zIdx (d : ℕ → ℕ) (n j t : ℕ) : ℕ := j + (t + 1) * seqA d (n + t + 1) + +lemma summable_norm_qTerm (h : PartitionHyp d) (n j : ℕ) (e : L1) : + Summable fun l ↦ ‖e l * (qPolyBasis d n l).coeff j‖ := + summable_norm_smul (fun l ↦ (norm_coeff_le_pnorm _ _).trans (pnorm_qPolyBasis_le h n l)) e + +lemma summable_ite_of_norm {f : ℕ → ℂ} (hf : Summable fun l ↦ ‖f l‖) (p : ℕ → Prop) + [DecidablePred p] : Summable fun l ↦ if p l then f l else 0 := by + refine Summable.of_norm (hf.of_nonneg_of_le (fun _ ↦ norm_nonneg _) fun l ↦ ?_) + split_ifs + · exact le_rfl + · rw [norm_zero]; exact norm_nonneg _ + +/-- **Śliwa's (3)**: the `j`-th coefficient of `Qₙ e` is `y_{n,j} + z_{n,j}`. -/ +theorem qCoeffCLM_eq_add (h : PartitionHyp d) (n j : ℕ) (e : L1) : + qCoeffCLM h n j e = yCoeff d n j e + zCoeff d n j e := by + unfold yCoeff zCoeff + set c := (n - 1) * seqA d n + have hsplit : ∀ l, e l * (qPolyBasis d n l).coeff j = + (if l ≤ c then e l * (fPoly d l).coeff j else 0) + + (if c < l then e l * (qPolyBasis d n l).coeff j else 0) := fun l ↦ by + by_cases hl : l ≤ c + · rw [ite_eq_left hl, ite_eq_right (by omega), add_zero, qPolyBasis_of_le hl] + · rw [ite_eq_right hl, ite_eq_left (by omega), zero_add] + have hs1 : Summable fun l ↦ if l ≤ c then e l * (fPoly d l).coeff j else 0 := + summable_of_ne_finset_zero (s := Finset.range (c + 1)) fun l hl ↦ by + rw [ite_eq_right (by simp at hl; omega)] + rw [qCoeffCLM_apply, tsum_congr hsplit, + Summable.tsum_add hs1 (summable_ite_of_norm (summable_norm_qTerm h n j e) _), + tsum_eq_sum (s := Finset.range (c + 1)) + (fun l hl ↦ by rw [ite_eq_right (by simp at hl; omega)])] + congr 1 + exact Finset.sum_congr rfl fun l hl ↦ by rw [ite_eq_left (by simp at hl; omega)] + +/-- `z_{n,j} = 0` above `vₙ₋₁`. -/ +lemma zCoeff_eq_zero (h : PartitionHyp d) {n j : ℕ} (hj : seqV d (n - 1) < j) + (e : L1) : zCoeff d n j e = 0 := by + unfold zCoeff + refine (tsum_congr fun l ↦ ?_).trans tsum_zero + split_ifs with hl + · rw [qPolyBasis_of_gt h hl] + split_ifs with hc + · have := exponent_le_of_I h hc.1 hc.2 (by omega) + rw [smul_eq_C_mul, coeff_C_mul, coeff_X_pow, ite_eq_right (by omega), mul_zero, mul_zero] + · simp + · rfl + +/-- `zIdx n j t` lies in `Iₘ,ₜ₊₁` with `m = n + t + 1`, when `j ≤ vₙ₋₁`. -/ +lemma zIdx_mem {n j : ℕ} (hn : 1 ≤ n) (hj : j ≤ seqV d (n - 1)) (t : ℕ) : + (⟨n + t + 1, t + 1, .I⟩ : Block).Mem d (zIdx d n j t) := by + refine ⟨by dsimp only; omega, by dsimp only; omega, ?_, ?_⟩ + · dsimp only [zIdx]; omega + · dsimp only [zIdx] + rw [show n + t + 1 - (t + 1) - 1 = n - 1 by omega] + omega + +lemma zIdx_injective (h : PartitionHyp d) {n j : ℕ} (hn : 1 ≤ n) (hj : j ≤ seqV d (n - 1)) : + Function.Injective (zIdx d n j) := fun t t' htt ↦ by + have hB1 := zIdx_mem (d := d) hn hj t + rw [htt] at hB1 + have := congrArg Block.r (block_unique h hB1 (zIdx_mem hn hj t')) + dsimp only at this + omega + +/-- **Śliwa's (2)**: `z_{n,j} = -aₙ ∑_{m > n} e_{j + (m - n)aₘ}` for `j ≤ vₙ₋₁`. -/ +theorem hasSum_zCoeff (h : GrowthHyp d) {n j : ℕ} (hn : 2 ≤ n) (hj : j ≤ seqV d (n - 1)) + (e : L1) : + HasSum (fun t ↦ -(seqA d n : ℂ) * e (zIdx d n j t)) (zCoeff d n j e) := by + have hP := h.toPartitionHyp + set c := (n - 1) * seqA d n with hc + set F : ℕ → ℂ := fun l ↦ if c < l then e l * (qPolyBasis d n l).coeff j else 0 with hF + have hcg : ∀ t, c < zIdx d n j t := fun t ↦ by + have h1 := hP.v_lt_a (n + 1) n (by omega) + have h2 : c ≤ seqV d n := by + rw [hc]; unfold seqV; exact Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + have h3 : seqA d (n + 1) ≤ seqA d (n + t + 1) := seqA_mono h (by omega) (by omega) + have h4 : seqA d (n + t + 1) ≤ (t + 1) * seqA d (n + t + 1) := + Nat.le_mul_of_pos_left _ (by omega) + simp only [zIdx] + omega + have hFg : ∀ t, F (zIdx d n j t) = -(seqA d n : ℂ) * e (zIdx d n j t) := fun t ↦ by + simp only [hF, ite_eq_left (hcg t)] + rw [qPolyBasis_of_gt hP (hcg t), block_eq hP (zIdx_mem (by omega) hj t)] + dsimp only + rw [ite_eq_left ⟨rfl, by omega⟩, show n + t + 1 - n = t + 1 by omega, + show zIdx d n j t - (t + 1) * seqA d (n + t + 1) = j by simp [zIdx], + smul_eq_C_mul, coeff_C_mul, coeff_X_pow, ite_eq_left rfl, mul_one] + ring + have hFoff : ∀ l, l ∉ Set.range (zIdx d n j) → F l = 0 := fun l hl ↦ by + simp only [hF] + split_ifs with hcl + · rw [qPolyBasis_of_gt hP hcl] + split_ifs with hk + · rw [smul_eq_C_mul, coeff_C_mul, coeff_X_pow] + split_ifs with hje + · exfalso + apply hl + have hB := block_mem hP (i := l) (by omega) + rcases hbl : block d l with ⟨n', r, k⟩ + rw [hbl] at hB hk hje + dsimp only at hk hje + obtain ⟨hk, hr⟩ := hk + subst hk + obtain ⟨hr1, hrn, hlo, hhi⟩ := hB + dsimp only at hr1 hrn hlo hhi + refine ⟨r - 1, ?_⟩ + simp only [zIdx] + rw [show n + (r - 1) + 1 = n' by omega, show r - 1 + 1 = r by omega] + rw [show n' - n = r by omega] at hje + omega + · simp + · simp + · rfl + have hsF : Summable F := summable_ite_of_norm (summable_norm_qTerm hP n j e) _ + have key := ((zIdx_injective hP (by omega) hj).hasSum_iff hFoff).2 hsF.hasSum + have hz : zCoeff d n j e = ∑' l, F l := rfl + rw [hz] + convert key using 1 + funext t + exact (hFg t).symm + +/-- The windows of the `zIdx`: `j ∈ (vₙ₋₂, vₙ₋₁]` lands in `M_{m,n}`. -/ +lemma zIdx_mem_window {n j : ℕ} (hj1 : seqV d (n - 2) < j) (hj2 : j ≤ seqV d (n - 1)) (t : ℕ) : + (n + t + 1 - n) * seqA d (n + t + 1) + seqV d (n - 2) < zIdx d n j t ∧ + zIdx d n j t ≤ (n + t + 1 - n) * seqA d (n + t + 1) + seqV d (n - 1) := by + simp only [zIdx, show n + t + 1 - n = t + 1 by omega] + omega + +/-- And `j ≤ vₙ₋₁` lands in the level `(vₘ₋₁, vₘ]`, `m = n + t + 1`. -/ +lemma zIdx_mem_level (h : PartitionHyp d) {n j : ℕ} (hn : 2 ≤ n) (hj : j ≤ seqV d (n - 1)) + (t : ℕ) : + seqV d (n + t + 1 - 1) < zIdx d n j t ∧ zIdx d n j t ≤ seqV d (n + t + 1) := by + have h1 := h.v_lt_a (n + t + 1) (n + t + 1 - 1) (by omega) + have h2 := h.v_lt_a (n + t + 1) (n - 1) (by omega) + have h3 : seqA d (n + t + 1) ≤ (t + 1) * seqA d (n + t + 1) := + Nat.le_mul_of_pos_left _ (by omega) + have h4 : (t + 1) * seqA d (n + t + 1) + seqA d (n + t + 1) ≤ seqV d (n + t + 1) := + calc (t + 1) * seqA d (n + t + 1) + seqA d (n + t + 1) = (t + 2) * seqA d (n + t + 1) := by + ring + _ ≤ (n + t) * seqA d (n + t + 1) := Nat.mul_le_mul_right _ (by omega) + _ ≤ (n + t) * (seqA d (n + t + 1) + seqB d (n + t + 1)) := + Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + _ = seqV d (n + t + 1) := by unfold seqV; rw [show n + t + 1 - 1 = n + t by omega] + simp only [zIdx] + omega + +/- ### `y_{m,j} = aₙ eⱼ` on `M_{m,n}` -/ + +/-- On `M_{m,n}`, among `l ≤ (m - 1)aₘ` only `fⱼ` itself has an `xʲ` term, with coefficient +`aₙ` (`j ∈ Iₘ,ₘ₋ₙ`; the only other candidate `j + aₘ` lies in `Jₘ,ₘ₋ₙ₊₂`, needing `n > 2`). -/ +lemma coeff_fPoly_of_window (h : PartitionHyp d) {m n j l : ℕ} (hn : 2 < n) (hnm : n < m) + (hj1 : (m - n) * seqA d m + seqV d (n - 2) < j) + (hj2 : j ≤ (m - n) * seqA d m + seqV d (n - 1)) (hl : l ≤ (m - 1) * seqA d m) : + (fPoly d l).coeff j = if l = j then (seqA d n : ℂ) else 0 := by + have ha := h.one_le_a m + have hvn := h.v_lt_a m (n - 1) (by omega) + have hvm := h.v_lt_a m (m - 1) (by omega) + have hamn : seqA d m ≤ (m - n) * seqA d m := Nat.le_mul_of_pos_left _ (by omega) + have hjI : (⟨m, m - n, .I⟩ : Block).Mem d j := by + refine ⟨by dsimp only; omega, by dsimp only; omega, by dsimp only; omega, ?_⟩ + dsimp only + rw [show m - (m - n) - 1 = n - 1 by omega] + omega + have hvmm : (m - 1) * seqA d m ≤ seqV d m := by + unfold seqV; exact Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + split_ifs with hlj + · subst hlj + rw [fPoly_of_I h hjI rfl] + dsimp only + rw [show m - (m - n) = n by omega, coeff_C_mul, coeff_sub, coeff_X_pow, coeff_X_pow, + ite_eq_left rfl, ite_eq_right (by omega), sub_zero, mul_one] + · rcases Nat.eq_zero_or_pos l with rfl | hl0 + · rw [fPoly_zero, coeff_one, ite_eq_right (by omega)] + have hB := block_mem h hl0 + rcases hbl : block d l with ⟨n', r, k⟩ + rw [hbl] at hB + -- If `l` has an `xʲ` term below itself, `l > j`, so `l` is in level `m`. + have hlev : j < l → n' = m := fun hjl ↦ by + obtain ⟨hlo, hhi, -⟩ := Block.mem_level h hB + have hr := hB.1 + have hrn := hB.2.1 + dsimp only at hlo hhi hr hrn + exact level_unique h (by omega) (by omega) ⟨hlo, hhi⟩ + ⟨by omega, by omega⟩ + cases k with + | J => rw [fPoly_of_J h hB rfl, coeff_C_mul_X_pow, ite_eq_right (fun h' ↦ hlj h'.symm)] + | L => rw [fPoly_of_L h hB rfl, coeff_C_mul_X_pow, ite_eq_right (fun h' ↦ hlj h'.symm)] + | I => + rw [fPoly_of_I h hB rfl, coeff_C_mul, coeff_sub, coeff_X_pow, coeff_X_pow, + ite_eq_right (fun h' ↦ hlj h'.symm)] + dsimp only + rw [ite_eq_right, sub_zero, mul_zero] + intro hje + have ha' := h.one_le_a n' + obtain rfl : m = n' := (hlev (by omega)).symm + -- `l = j + aₘ` lies in `Jₘ,ₘ₋ₙ₊₂`, not in an `I` block. + have hJ : (⟨m, m - n + 2, .J⟩ : Block).Mem d l := by + refine ⟨by dsimp only; omega, by dsimp only; omega, ?_, ?_⟩ + · dsimp only + rw [show m - (m - n + 2) = n - 2 by omega, show m - n + 2 - 1 = m - n + 1 by omega, + add_one_mul] + omega + · dsimp only + rw [show m - n + 2 = m - n + 1 + 1 by omega, add_one_mul, add_one_mul] + omega + exact absurd (congrArg Block.kind (block_unique h hB hJ)) (by simp) + | K => + rw [fPoly_of_K h hB rfl, coeff_sub, coeff_X_pow, coeff_C_mul, coeff_X_pow, + ite_eq_right (fun h' ↦ hlj h'.symm)] + dsimp only + rw [ite_eq_right, mul_zero, sub_zero] + intro hje + have hb : 0 < seqB d n' := lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b n') + obtain rfl : m = n' := (hlev (by omega)).symm + obtain ⟨-, -, hX⟩ := Block.mem_level h hB + dsimp only at hX + rcases hX.1 hl with h' | h' <;> exact absurd h' (by decide) + +/-- **`y_{m,j} = aₙ eⱼ` on `M_{m,n}`** (Śliwa p. 637), for `2 < n < m`. -/ +theorem yCoeff_of_window (h : PartitionHyp d) {m n j : ℕ} (hn : 2 < n) (hnm : n < m) + (hj1 : (m - n) * seqA d m + seqV d (n - 2) < j) + (hj2 : j ≤ (m - n) * seqA d m + seqV d (n - 1)) (e : L1) : + yCoeff d m j e = seqA d n * e j := by + have hvn := h.v_lt_a m (n - 1) (by omega) + have hle : (m - n + 1) * seqA d m ≤ (m - 1) * seqA d m := Nat.mul_le_mul_right _ (by omega) + have hjc : j ≤ (m - 1) * seqA d m := by rw [add_one_mul] at hle; omega + unfold yCoeff + rw [Finset.sum_congr rfl fun l hl ↦ by + rw [coeff_fPoly_of_window h hn hnm hj1 hj2 (by simp at hl; omega)]] + simp only [mul_ite, mul_zero] + rw [Finset.sum_ite_eq', ite_eq_left (by simp; omega), mul_comm] + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma5Window.lean b/LeanPool/ReadL1/Lemma5Window.lean new file mode 100644 index 0000000000..c816ac698a --- /dev/null +++ b/LeanPool/ReadL1/Lemma5Window.lean @@ -0,0 +1,254 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma5Coeff +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.GCongr +import Mathlib.Tactic.SplitIfs + +/-! +# Tools for Lemma 5: growth facts, truncations, and the coordinate window + +* `ReadL1.four_sq_mul_capB_le`: `4aₘ² Bₘ ≤ aₘ₊₁`, the one growth fact Lemma 5 needs beyond + `aₘ₊₁ ≥ 2aₘ`; +* `ReadL1.truncL1`: the finite sequence `∑_{l ≤ N} eₗ δₗ`, whose polynomial has coefficients + `y_{n,j}` when `N = (n - 1)aₙ`; +* `ReadL1.sum_norm_window_le`: Śliwa's estimate (p. 637) `∑_{vₙ₋₂ < i ≤ vₙ₋₁} |eᵢ| ≤ + (∑_{vₙ₋₂ < j ≤ vₙ₋₁} |y_{n,j}|) Bₙ₋₁`, from the support facts of `ReadL1.Coord`; +* `ReadL1.pnorm_ptrunc_fPoly_le`: `|P_{vₙ₋₁} fₗ| ≤ aₙ₋₁` for `vₙ₋₁ < l ≤ (n - 1)aₙ` (p. 638). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/- ### Growth facts -/ + +/-- **`4aₘ² Bₘ ≤ aₘ₊₁`**: from `aₘ₊₁ ≥ α^{2bₘ}`, `α bₘ² < α^{√bₘ/4}` and `aₘ < bₘ`. -/ +lemma four_sq_mul_capB_le (h : GrowthHyp d) {m : ℕ} (hm : 1 ≤ m) : + 4 * (seqA d m : ℝ) ^ 2 * capB d m ≤ seqA d (m + 1) := by + have hb := h.rpow_b m hm + have hab : (seqA d m : ℝ) < seqB d m := by + have h1 := h.a_small m hm + have h2 : seqA d m ≤ 8 * m * seqA d m := Nat.le_mul_of_pos_left _ (by omega) + exact_mod_cast (by omega : seqA d m < seqB d m) + have hb1 : (1 : ℝ) ≤ seqB d m := by exact_mod_cast (h.two_le_b m).trans' (by norm_num) + have hsq : Real.sqrt (seqB d m) ≤ seqB d m := + calc Real.sqrt (seqB d m) ≤ Real.sqrt ((seqB d m : ℝ) ^ 2) := Real.sqrt_le_sqrt (by nlinarith) + _ = seqB d m := Real.sqrt_sq (by positivity) + have hαpos : ∀ x : ℝ, 0 < alpha ^ x := fun x ↦ Real.rpow_pos_of_pos alpha_pos x + have h1 : alpha ^ (Real.sqrt (seqB d m) / 4) ≤ alpha ^ (seqB d m : ℝ) := + alpha_rpow_le (by linarith [Real.sqrt_nonneg (seqB d m : ℝ)]) + have h2 : capB d m ≤ alpha ^ (seqB d m : ℝ) := alpha_rpow_le hsq + have h3 : alpha ^ (2 * seqB d m) = alpha ^ (seqB d m : ℝ) * alpha ^ (seqB d m : ℝ) := by + rw [Real.rpow_natCast, ← pow_add, two_mul] + have h4 := h.alpha_pow_two_b_le m hm + have hcap : 0 ≤ capB d m := zero_le_one.trans (one_le_capB m) + have ha0 : (0 : ℝ) ≤ seqA d m := Nat.cast_nonneg _ + have h5 : 4 * (seqA d m : ℝ) ^ 2 ≤ alpha * (seqB d m : ℝ) ^ 2 := by + rw [alpha]; nlinarith + calc 4 * (seqA d m : ℝ) ^ 2 * capB d m ≤ (alpha * (seqB d m : ℝ) ^ 2) * capB d m := by gcongr + _ ≤ alpha ^ (seqB d m : ℝ) * alpha ^ (seqB d m : ℝ) := + mul_le_mul (by linarith) h2 hcap (hαpos _).le + _ = alpha ^ (2 * seqB d m) := h3.symm + _ ≤ seqA d (m + 1) := h4 + +/-- `aₘ ≥ m`. -/ +lemma le_seqA (h : GrowthHyp d) {m : ℕ} (hm : 1 ≤ m) : m ≤ seqA d m := by + have h1 := pow_two_mul_le_seqA h (le_refl 1) (m - 1) + rw [show 1 + (m - 1) = m by omega] at h1 + have h2 : m - 1 < 2 ^ (m - 1) := Nat.lt_two_pow_self + have h3 : 2 ^ (m - 1) ≤ 2 ^ (m - 1) * seqA d 1 := Nat.le_mul_of_pos_right _ (h.one_le_a 1) + omega + +/- ### Truncations -/ + +/-- The finite sequence `∑_{l ≤ N} eₗ δₗ`. -/ +noncomputable def truncL1 (N : ℕ) (e : L1) : ℕ →₀ ℂ := + ∑ l ∈ Finset.range (N + 1), single l (e l) + +lemma truncL1_apply (N : ℕ) (e : L1) (i : ℕ) : truncL1 N e i = if i ≤ N then e i else 0 := by + simp [truncL1, Finsupp.finsetSum_apply, Finsupp.single_apply] + +lemma mem_support_truncL1 {N : ℕ} {e : L1} {j : ℕ} (hj : j ∈ (truncL1 N e).support) : j ≤ N := by + rw [Finsupp.mem_support_iff, truncL1_apply] at hj + by_contra hjN + exact hj (ite_eq_right hjN) + +lemma nrm_truncL1 (N : ℕ) (e : L1) : nrm (truncL1 N e) = ∑ l ∈ Finset.range (N + 1), ‖e l‖ := by + rw [nrm_eq_sum_of_subset _ (s := Finset.range (N + 1)) + (fun j hj ↦ Finset.mem_range.2 (Nat.lt_succ_of_le (mem_support_truncL1 hj)))] + exact Finset.sum_congr rfl fun l hl ↦ by + rw [truncL1_apply, ite_eq_left (Nat.lt_succ_iff.1 (Finset.mem_range.1 hl))] + +lemma coeff_fromCoord_truncL1 (N : ℕ) (e : L1) (j : ℕ) : + (fromCoord d (truncL1 N e)).coeff j = + ∑ l ∈ Finset.range (N + 1), e l * (fPoly d l).coeff j := by + simp [truncL1, map_sum, fromCoord_single] + +lemma yCoeff_eq_coeff (n j : ℕ) (e : L1) : + yCoeff d n j e = (fromCoord d (truncL1 ((n - 1) * seqA d n) e)).coeff j := + (coeff_fromCoord_truncL1 _ e j).symm + +lemma natDegree_fromCoord_truncL1_le (h : PartitionHyp d) (N : ℕ) (e : L1) : + (fromCoord d (truncL1 N e)).natDegree ≤ N := + natDegree_fromCoord_le h fun _ hj ↦ mem_support_truncL1 hj + +/- ### Norms through coordinates -/ + +lemma sum_norm_le_nrm (g : ℕ →₀ ℂ) (s : Finset ℕ) : ∑ i ∈ s, ‖g i‖ ≤ nrm g := by + classical + rw [nrm_eq_sum_of_subset g (Finset.subset_union_right (s₁ := s))] + exact Finset.sum_le_sum_of_subset_of_nonneg Finset.subset_union_left fun _ _ _ ↦ norm_nonneg _ + +lemma toCoord_apply_eq_sum {p : ℂ[X]} {N : ℕ} (hp : p.natDegree ≤ N) (i : ℕ) : + toCoord d p i = ∑ j ∈ Finset.range (N + 1), p.coeff j * xPow d j i := by + rw [toCoord_apply, Polynomial.sum_over_range' p (f := fun i c ↦ c • xPow d i) + (fun n ↦ zero_smul ℂ _) (N + 1) (by omega), Finsupp.finsetSum_apply] + simp [Finsupp.smul_apply] + +lemma support_subset_range {p : ℂ[X]} {N : ℕ} (hp : p.natDegree ≤ N) : + p.support ⊆ Finset.range (N + 1) := fun k hk ↦ + Finset.mem_range.2 (Nat.lt_succ_of_le ((le_natDegree_of_mem_supp k hk).trans hp)) + +/-- `‖y‖ ≤ B |y|` when every `‖xʲ‖` involved is at most `B`. -/ +lemma nrm_toCoord_le {p : ℂ[X]} {N : ℕ} {B : ℝ} (hp : p.natDegree ≤ N) + (hB : ∀ j ≤ N, nrm (xPow d j) ≤ B) : nrm (toCoord d p) ≤ B * pnorm p := by + rw [toCoord_apply, Polynomial.sum_over_range' p (f := fun i c ↦ c • xPow d i) + (fun n ↦ zero_smul ℂ _) (N + 1) (by omega)] + refine (nrm_sum_le _ _).trans ?_ + rw [pnorm_eq_sum_of_subset p (support_subset_range hp), Finset.mul_sum] + refine Finset.sum_le_sum fun j hj ↦ ?_ + rw [nrm_smul, mul_comm] + exact mul_le_mul_of_nonneg_right (hB j (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj))) + (norm_nonneg _) + +lemma pnorm_ptrunc_eq_sum (N : ℕ) (p : ℂ[X]) : + pnorm (ptrunc N p) = ∑ i ∈ Finset.range (N + 1), ‖p.coeff i‖ := by + rw [pnorm_eq_sum_of_subset _ (support_subset_range (natDegree_ptrunc_le N p))] + exact Finset.sum_congr rfl fun i hi ↦ by + rw [coeff_ptrunc, ite_eq_left (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi))] + +/- ### The window `(vₙ₋₂, vₙ₋₁]` -/ + +/-- **Śliwa p. 637**: `∑_{vₙ₋₂ < i ≤ vₙ₋₁} |eᵢ| ≤ (∑_{vₙ₋₂ < j ≤ vₙ₋₁} |y_{n,j}|) Bₙ₋₁`. On the +window, `eᵢ` is the `i`-th coordinate of `∑_{j ≤ cₙ} y_{n,j} xʲ`, and only `j` in the window +contribute: lower `j` by triangularity, higher `j` by the gap. -/ +theorem sum_norm_window_le (h : GrowthHyp d) {n : ℕ} (hn : 2 < n) (e : L1) : + ∑ i ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), ‖e i‖ ≤ + (∑ j ∈ Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)), ‖yCoeff d n j e‖) * capB d (n - 1) := by + have hP := h.toPartitionHyp + set W := Finset.Ioc (seqV d (n - 2)) (seqV d (n - 1)) with hW + set c := (n - 1) * seqA d n with hc + set Y := fromCoord d (truncL1 c e) with hYdef + have hY : toCoord d Y = truncL1 c e := toCoord_fromCoord hP _ + have hYdeg : Y.natDegree ≤ c := natDegree_fromCoord_truncL1_le hP c e + have hvc : seqV d (n - 1) ≤ c := by + have h1 := hP.v_lt_a n (n - 1) (by omega) + have h2 : seqA d n ≤ (n - 1) * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + omega + have hWc : W ⊆ Finset.range (c + 1) := fun j hj ↦ by + rw [hW, Finset.mem_Ioc] at hj; exact Finset.mem_range.2 (by omega) + have hei : ∀ i ∈ W, e i = ∑ j ∈ W, yCoeff d n j e * xPow d j i := by + intro i hi + rw [hW, Finset.mem_Ioc] at hi + calc e i = truncL1 c e i := by rw [truncL1_apply, ite_eq_left (by omega)] + _ = toCoord d Y i := by rw [hY] + _ = ∑ j ∈ Finset.range (c + 1), Y.coeff j * xPow d j i := toCoord_apply_eq_sum hYdeg i + _ = ∑ j ∈ W, yCoeff d n j e * xPow d j i := by + rw [← Finset.sum_subset hWc fun j hj hjW ↦ ?_] + · exact Finset.sum_congr rfl fun j _ ↦ by rw [yCoeff_eq_coeff] + · rw [hW, Finset.mem_Ioc] at hjW + rw [Finset.mem_range] at hj + by_cases hjlo : j ≤ seqV d (n - 2) + · rw [xPow_apply_eq_zero hP (by omega), mul_zero] + · rw [xPow_apply_gap hP (by omega) hi.1 hi.2 j (by omega) (by omega), mul_zero] + calc ∑ i ∈ W, ‖e i‖ = ∑ i ∈ W, ‖∑ j ∈ W, yCoeff d n j e * xPow d j i‖ := + Finset.sum_congr rfl fun i hi ↦ by rw [hei i hi] + _ ≤ ∑ i ∈ W, ∑ j ∈ W, ‖yCoeff d n j e‖ * ‖xPow d j i‖ := + Finset.sum_le_sum fun i _ ↦ (norm_sum_le _ _).trans_eq (by simp) + _ = ∑ j ∈ W, ‖yCoeff d n j e‖ * ∑ i ∈ W, ‖xPow d j i‖ := by + rw [Finset.sum_comm]; simp [Finset.mul_sum] + _ ≤ ∑ j ∈ W, ‖yCoeff d n j e‖ * capB d (n - 1) := by + refine Finset.sum_le_sum fun j hj ↦ mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) + rw [hW, Finset.mem_Ioc] at hj + exact (sum_norm_le_nrm _ W).trans ((nrm_xPow_le_cap h (n - 1) (by omega)).2 j hj.2) + _ = (∑ j ∈ W, ‖yCoeff d n j e‖) * capB d (n - 1) := Finset.sum_mul _ _ _ |>.symm + +/- ### `|P_{vₙ₋₁} fₗ| ≤ aₙ₋₁` above `vₙ₋₁` -/ + +lemma ptrunc_X_pow_eq_zero {N l : ℕ} (hl : N < l) : ptrunc N (X ^ l : ℂ[X]) = 0 := by + ext k + rw [coeff_ptrunc, coeff_X_pow, coeff_zero] + split_ifs <;> first | rfl | omega + +lemma ptrunc_sum_smul (N : ℕ) (s : Finset ℕ) (c : ℕ → ℂ) (p : ℕ → ℂ[X]) : + ptrunc N (∑ l ∈ s, c l • p l) = ∑ l ∈ s, c l • ptrunc N (p l) := by + ext k + simp only [coeff_ptrunc, finsetSum_coeff, AddMonoidAlgebra.coeff_smul_apply, smul_eq_mul] + split_ifs <;> simp + +/-- **`|P_{vₙ₋₁} fₗ| ≤ aₙ₋₁`** for `vₙ₋₁ < l ≤ (n - 1)aₙ` (Śliwa p. 638): such `l` lie in `J` or +`I` blocks of level `n`; `P_{vₙ₋₁}` kills `xˡ` and leaves at most `aₙ₋ᵣ x^{l - aₙ}`. -/ +lemma pnorm_ptrunc_fPoly_le (h : GrowthHyp d) {n l : ℕ} (hn : 2 ≤ n) (hl1 : seqV d (n - 1) < l) + (hl2 : l ≤ (n - 1) * seqA d n) : + pnorm (ptrunc (seqV d (n - 1)) (fPoly d l)) ≤ seqA d (n - 1) := by + have hP := h.toPartitionHyp + have hvn : (n - 1) * seqA d n ≤ seqV d n := by + unfold seqV; exact Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + have hlev := block_level hP (m := n - 1) (i := l) (by omega) hl1 + (by rw [show n - 1 + 1 = n by omega]; omega) + have hB := block_mem hP (i := l) (by omega) + rcases hbl : block d l with ⟨n', r, k⟩ + rw [hbl] at hB hlev + dsimp only at hlev + rw [show n' = n by omega] at hB + have ha0 : (0 : ℝ) ≤ seqA d (n - 1) := Nat.cast_nonneg _ + cases k with + | J => + rw [fPoly_of_J hP hB rfl, ptrunc_C_mul, ptrunc_X_pow_eq_zero hl1, mul_zero, pnorm_zero] + exact ha0 + | I => + rw [fPoly_of_I hP hB rfl, ptrunc_C_mul, ptrunc_sub, ptrunc_X_pow_eq_zero hl1, zero_sub, + pnorm_C_mul, Complex.norm_natCast] + dsimp only + have hr := hB.1 + have hrn := hB.2.1 + dsimp only at hr hrn + have hneg : pnorm (-ptrunc (seqV d (n - 1)) (X ^ (l - seqA d n)) : ℂ[X]) ≤ 1 := by + rw [← zero_sub] + refine (pnorm_sub_le _ _).trans ?_ + rw [pnorm_zero, zero_add] + exact (pnorm_ptrunc_le _ _).trans (pnorm_X_pow _).le + have hmono : (seqA d (n - r) : ℝ) ≤ seqA d (n - 1) := by + exact_mod_cast seqA_mono h (by omega) (by omega) + calc (seqA d (n - r) : ℝ) * pnorm (-ptrunc (seqV d (n - 1)) (X ^ (l - seqA d n))) + ≤ seqA d (n - r) * 1 := by gcongr + _ ≤ seqA d (n - 1) := by rw [mul_one]; exact hmono + | L => + obtain ⟨-, -, hlo, -⟩ := hB + dsimp only at hlo + omega + | K => + obtain ⟨hr1, -, hlo, -⟩ := hB + dsimp only at hr1 hlo + have hab := hP.a_lt_b n + have : seqA d n + seqB d n ≤ r * (seqA d n + seqB d n) := Nat.le_mul_of_pos_left _ hr1 + have hn1 : (n - 1) * seqA d n = (n - 2) * seqA d n + seqA d n := by + rw [show n - 1 = n - 2 + 1 by omega, add_one_mul] + omega + +end ReadL1 diff --git a/LeanPool/ReadL1/Lemma6.lean b/LeanPool/ReadL1/Lemma6.lean new file mode 100644 index 0000000000..bf59ae92cf --- /dev/null +++ b/LeanPool/ReadL1/Lemma6.lean @@ -0,0 +1,294 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Inverse +import Mathlib.Algebra.Polynomial.Div +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Nat.Factorial.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.GCongr +import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.SplitIfs + +/-! +# Śliwa's Lemma 6: an approximate inverse with a bounded norm + +Śliwa (p. 638): let `0 < ε < 1/2`, `2 < M < ε⁻¹`, `m ≤ n` and `|y| ≤ M` with `|Pₘ y| ≥ M ε`. Then +there is `q` of degree at most `n` with `|q| ≤ ε^{-(2n)!}` and `|Pₙ (q y) - xᵐ| < ε` +(`ReadL1.lemma6`; for `y` of degree at most `n`, `ReadL1.lemma6_of_natDegree_le`). + +The proof is by induction on `n`. With `τ = (ε/2)^{(2n-2)!+1}`: if `|y₀| ≥ τ`, the exact inverse +of `ReadL1.invPoly` works; if `|y₀| < τ`, apply the inductive hypothesis at `ε/2` to `y / x` and +`m - 1`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial + +/- ### Polynomial facts -/ + +lemma ptrunc_ptrunc {m n : ℕ} (h : m ≤ n) (p : ℂ[X]) : ptrunc m (ptrunc n p) = ptrunc m p := by + ext k; simp only [coeff_ptrunc]; split_ifs <;> first | rfl | omega + +lemma natDegree_ptrunc_le (n : ℕ) (p : ℂ[X]) : (ptrunc n p).natDegree ≤ n := by + rw [natDegree_le_iff_coeff_eq_zero] + intro k hk + rw [coeff_ptrunc, ite_eq_right (by exact_mod_cast not_le.2 hk)] + +/-- `Pₙ (q y)` only sees `Pₙ y`. -/ +lemma ptrunc_mul_ptrunc (n : ℕ) (q y : ℂ[X]) : ptrunc n (q * ptrunc n y) = ptrunc n (q * y) := by + ext l + rw [coeff_ptrunc, coeff_ptrunc] + split_ifs with hl + · rw [coeff_mul, coeff_mul] + refine Finset.sum_congr rfl fun x hx ↦ ?_ + rw [coeff_ptrunc, ite_eq_left (by have := Finset.HasAntidiagonal.mem_antidiagonal.1 hx; omega)] + · rfl + +lemma natDegree_divX_le_of {p : ℂ[X]} {k : ℕ} (h : p.natDegree ≤ k + 1) : + (divX p).natDegree ≤ k := by + rw [natDegree_le_iff_coeff_eq_zero] + intro j hj + have hj' : k < j := by exact_mod_cast hj + rw [coeff_divX] + exact coeff_eq_zero_of_natDegree_lt (by omega) + +lemma pnorm_C (c : ℂ) : pnorm (C c) = ‖c‖ := by + rw [← monomial_zero_left, pnorm_monomial] + +/-- `P₁ (y₁⁻¹ y) - x = y₁⁻¹ y₀`. -/ +lemma ptrunc_one_C_inv_mul {y : ℂ[X]} (hb : y.coeff 1 ≠ 0) : + ptrunc 1 (C (y.coeff 1)⁻¹ * y) - X ^ 1 = C ((y.coeff 1)⁻¹ * y.coeff 0) := by + ext k + rcases k with _ | _ | k + · simp [coeff_ptrunc, coeff_C] + · simp [coeff_ptrunc, coeff_C_mul, inv_mul_cancel₀ hb] + · simp [coeff_ptrunc, coeff_X] + +/- ### The numerical bounds -/ + +lemma two_lt_inv {ε : ℝ} (hε : 0 < ε) (hε2 : ε < 1 / 2) : 2 < ε⁻¹ := by + rw [lt_inv_comm₀ (by norm_num) hε]; linarith + +lemma inv_half_le {ε : ℝ} (hε : 0 < ε) (hε2 : ε < 1 / 2) : (ε / 2)⁻¹ ≤ ε⁻¹ ^ 2 := by + have h := two_lt_inv hε hε2 + rw [inv_div, div_eq_mul_inv, sq] + exact mul_le_mul_of_nonneg_right h.le (by positivity) + +lemma factorial_two_mul_succ (k : ℕ) : + (2 * (k + 1)).factorial = (2 * k + 2) * ((2 * k + 1) * (2 * k).factorial) := by + rw [show 2 * (k + 1) = 2 * k + 1 + 1 by ring, Nat.factorial_succ, Nat.factorial_succ] + +lemma two_mul_factorial_le (k : ℕ) : 2 * (2 * k).factorial ≤ (2 * (k + 1)).factorial := by + rw [factorial_two_mul_succ] + calc 2 * (2 * k).factorial ≤ ((2 * k + 2) * (2 * k + 1)) * (2 * k).factorial := + Nat.mul_le_mul_right _ (by nlinarith) + _ = (2 * k + 2) * ((2 * k + 1) * (2 * k).factorial) := by ring + +/-- The exponent count of the second case. -/ +lemma exponent_le (k : ℕ) (hk : 1 ≤ k) : + (k + 1) + ((2 * ((2 * k).factorial + 1) + 1) * (k + 1) + 2 * ((2 * k).factorial + 1)) ≤ + (2 * (k + 1)).factorial := by + have hF : 2 ≤ (2 * k).factorial := by + simpa using Nat.factorial_le (show 2 ≤ 2 * k by omega) + rw [factorial_two_mul_succ] + set F := (2 * k).factorial + have h1 : 1 * (k * F) ≤ k * (k * F) := Nat.mul_le_mul_right _ hk + have h2 : 1 * F ≤ k * F := Nat.mul_le_mul_right F hk + have h3 : k * 2 ≤ k * F := Nat.mul_le_mul_left k hF + nlinarith + +/-- `|q| ≤ (n + 1) (M/τ)ⁿ / τ` for the exact inverse when `|y₀| ≥ τ`. -/ +lemma pnorm_invPoly_le_of {y : ℂ[X]} {M τ : ℝ} (hτ : 0 < τ) (hy0 : τ ≤ ‖y.coeff 0‖) + (hM : pnorm y ≤ M) {m n : ℕ} (hmn : m ≤ n) : + pnorm (invPoly y m n) ≤ ((n + 1 : ℕ) : ℝ) * ((M / τ) ^ n / τ) := by + have hy0' : 0 < ‖y.coeff 0‖ := hτ.trans_le hy0 + have hy0M : ‖y.coeff 0‖ ≤ M := (sum_norm_coeff_le_pnorm y {0}).trans hM |>.trans_eq' (by simp) + have hr : 1 ≤ M / ‖y.coeff 0‖ := (one_le_div hy0').2 hy0M + have hM0 : 0 ≤ M := (pnorm_nonneg y).trans hM + refine (pnorm_invPoly_le hy0' hM hmn).trans ?_ + have hc : ((n - m + 1 : ℕ) : ℝ) ≤ ((n + 1 : ℕ) : ℝ) := by exact_mod_cast (by omega) + have hpow : (M / ‖y.coeff 0‖) ^ (n - m) ≤ (M / τ) ^ n := + (pow_le_pow_right₀ hr (Nat.sub_le n m)).trans + (pow_le_pow_left₀ (by positivity) (div_le_div_of_nonneg_left hM0 hτ hy0) n) + have hdiv : (M / ‖y.coeff 0‖) ^ (n - m) / ‖y.coeff 0‖ ≤ (M / τ) ^ n / τ := + div_le_div₀ (by positivity) hpow hτ hy0 + exact mul_le_mul hc hdiv (by positivity) (by positivity) + +/-- The second case's norm count: `(k + 2) (M/τ)^{k+1} / τ ≤ ε^{-(2k+2)!}`. -/ +lemma case2_bound {ε M : ℝ} {k : ℕ} (hk : 1 ≤ k) (hε : 0 < ε) (hε2 : ε < 1 / 2) (hM0 : 0 ≤ M) + (hME : M < ε⁻¹) : + ((k + 1 + 1 : ℕ) : ℝ) * ((M / (ε / 2) ^ ((2 * k).factorial + 1)) ^ (k + 1) / + (ε / 2) ^ ((2 * k).factorial + 1)) ≤ ε⁻¹ ^ (2 * (k + 1)).factorial := by + set F := (2 * k).factorial + set E := ε⁻¹ with hE + have hE2 : 2 < E := two_lt_inv hε hε2 + have hE1 : 1 ≤ E := by linarith + set τ := (ε / 2) ^ (F + 1) + have hτ0 : 0 < τ := by positivity + have hτinv : τ⁻¹ ≤ E ^ (2 * (F + 1)) := by + rw [← inv_pow, pow_mul] + exact pow_le_pow_left₀ (by positivity) (inv_half_le hε hε2) _ + have hc : ((k + 1 + 1 : ℕ) : ℝ) ≤ E ^ (k + 1) := by + have h2 : ((k + 1 + 1 : ℕ) : ℝ) ≤ (2 : ℝ) ^ (k + 1) := by + exact_mod_cast Nat.lt_two_pow_self + exact h2.trans (pow_le_pow_left₀ (by norm_num) hE2.le _) + have hMτ : M * τ⁻¹ ≤ E * E ^ (2 * (F + 1)) := + mul_le_mul hME.le hτinv (by positivity) (by positivity) + calc ((k + 1 + 1 : ℕ) : ℝ) * ((M / τ) ^ (k + 1) / τ) + = ((k + 1 + 1 : ℕ) : ℝ) * ((M * τ⁻¹) ^ (k + 1) * τ⁻¹) := by + rw [div_eq_mul_inv, div_eq_mul_inv] + _ ≤ E ^ (k + 1) * ((E * E ^ (2 * (F + 1))) ^ (k + 1) * E ^ (2 * (F + 1))) := by + refine mul_le_mul hc (mul_le_mul (pow_le_pow_left₀ (by positivity) hMτ _) hτinv + (by positivity) (by positivity)) (by positivity) (by positivity) + _ = E ^ ((k + 1) + ((2 * (F + 1) + 1) * (k + 1) + 2 * (F + 1))) := by + rw [← pow_succ', ← pow_mul, ← pow_add, ← pow_add] + _ ≤ E ^ (2 * (k + 1)).factorial := pow_le_pow_right₀ hE1 (exponent_le k hk) + +/- ### The lemma -/ + +/-- The case `n = 1`. -/ +lemma lemma6_one {m : ℕ} (hm : m ≤ 1) {ε M : ℝ} (hε : 0 < ε) (hε2 : ε < 1 / 2) (hM2 : 2 < M) + (hME : M < ε⁻¹) {y : ℂ[X]} (hyM : pnorm y ≤ M) (hPm : M * ε ≤ pnorm (ptrunc m y)) : + ∃ q : ℂ[X], q.natDegree ≤ 1 ∧ pnorm q ≤ ε⁻¹ ^ 2 ∧ pnorm (ptrunc 1 (q * y) - X ^ m) < ε := by + have hMε : 0 < M * ε := by positivity + interval_cases m + · -- `|y₀| ≥ M ε`: the exact inverse. + rw [pnorm_ptrunc_zero] at hPm + have hy0 : y.coeff 0 ≠ 0 := norm_pos_iff.1 (hMε.trans_le hPm) + refine ⟨invPoly y 0 1, natDegree_invPoly_le _ _ _, ?_, ?_⟩ + · refine (pnorm_invPoly_le_of hMε hPm hyM (Nat.zero_le 1)).trans ?_ + have hM0 : M ≠ 0 := by positivity + have hε0 : ε ≠ 0 := hε.ne' + have : 2 / M ≤ 1 := (div_le_one (by positivity)).2 hM2.le + calc _ = 2 / M * ε⁻¹ ^ 2 := by push_cast; field_simp + _ ≤ 1 * ε⁻¹ ^ 2 := by gcongr + _ = ε⁻¹ ^ 2 := one_mul _ + · rw [ptrunc_invPoly_mul hy0 (Nat.zero_le 1), sub_self, pnorm_zero]; exact hε + · rw [pnorm_ptrunc_succ, pnorm_ptrunc_zero, coeff_divX] at hPm + by_cases h0 : ε ^ 2 ≤ ‖y.coeff 0‖ + · -- `|y₀| ≥ ε²`: `q = y₀⁻¹ x`. + have hy0' : 0 < ‖y.coeff 0‖ := (by positivity : (0 : ℝ) < ε ^ 2).trans_le h0 + have hy0 : y.coeff 0 ≠ 0 := norm_pos_iff.1 hy0' + refine ⟨invPoly y 1 1, natDegree_invPoly_le _ _ _, ?_, ?_⟩ + · have hq := pnorm_invPoly_le hy0' hyM (le_refl 1) + simp only [Nat.sub_self, zero_add, Nat.cast_one, one_mul, pow_zero, one_div] at hq + refine hq.trans ?_ + rw [inv_pow] + exact inv_anti₀ (by positivity) h0 + · rw [ptrunc_invPoly_mul hy0 (le_refl 1), sub_self, pnorm_zero]; exact hε + · -- `|y₀| < ε²`, so `|y₁| > ε`: `q = y₁⁻¹`. + push Not at h0 + have hε1 : ε ^ 2 < ε := by nlinarith + have h2ε : 2 * ε < M * ε := by nlinarith + have hy1 : ε < ‖y.coeff (0 + 1)‖ := by linarith + have hy1' : 0 < ‖y.coeff 1‖ := hε.trans hy1 + have hb : y.coeff 1 ≠ 0 := norm_pos_iff.1 hy1' + refine ⟨C (y.coeff 1)⁻¹, by rw [natDegree_C]; omega, ?_, ?_⟩ + · rw [pnorm_C, norm_inv] + have h1 : ‖y.coeff 1‖⁻¹ ≤ ε⁻¹ := inv_anti₀ hε hy1.le + have h2 : ε⁻¹ ≤ ε⁻¹ ^ 2 := by + have := two_lt_inv hε hε2 + nlinarith + exact h1.trans h2 + · rw [ptrunc_one_C_inv_mul hb, pnorm_C, norm_mul, norm_inv, inv_mul_lt_iff₀ hy1'] + nlinarith [mul_lt_mul_of_pos_left hy1 hε] + +/-- **Śliwa's Lemma 6**, for `y` of degree at most `n`. -/ +theorem lemma6_of_natDegree_le : ∀ n : ℕ, 1 ≤ n → ∀ m ≤ n, ∀ ε M : ℝ, 0 < ε → ε < 1 / 2 → + 2 < M → M < ε⁻¹ → ∀ y : ℂ[X], y.natDegree ≤ n → pnorm y ≤ M → M * ε ≤ pnorm (ptrunc m y) → + ∃ q : ℂ[X], q.natDegree ≤ n ∧ pnorm q ≤ ε⁻¹ ^ (2 * n).factorial ∧ + pnorm (ptrunc n (q * y) - X ^ m) < ε := by + intro n hn + induction n, hn using Nat.le_induction with + | base => + intro m hm ε M hε hε2 hM2 hME y _ hyM hPm + rw [show Nat.factorial (2 * 1) = 2 by decide] + exact lemma6_one hm hε hε2 hM2 hME hyM hPm + | succ k hk ih => + intro m hm ε M hε hε2 hM2 hME y hy hyM hPm + obtain ⟨τ, hτ⟩ : ∃ τ : ℝ, τ = (ε / 2) ^ ((2 * k).factorial + 1) := ⟨_, rfl⟩ + have hτ0 : 0 < τ := by rw [hτ]; positivity + have hτε : τ ≤ ε / 2 := by + rw [hτ] + exact pow_le_of_le_one (by positivity) (by linarith) (by omega) + have h2ε : 2 * ε < M * ε := by nlinarith + by_cases hy0 : τ ≤ ‖y.coeff 0‖ + · -- `|y₀| ≥ τ`: the exact inverse. + have hy0' : y.coeff 0 ≠ 0 := norm_pos_iff.1 (hτ0.trans_le hy0) + refine ⟨invPoly y m (k + 1), natDegree_invPoly_le _ _ _, ?_, ?_⟩ + · refine (pnorm_invPoly_le_of hτ0 hy0 hyM hm).trans ?_ + rw [hτ] + exact case2_bound hk hε hε2 (by linarith) hME + · rw [ptrunc_invPoly_mul hy0' hm, sub_self, pnorm_zero]; exact hε + · -- `|y₀| < τ`: apply the inductive hypothesis to `y / x`. + push Not at hy0 + rcases m with _ | m + · rw [pnorm_ptrunc_zero] at hPm + linarith + rw [pnorm_ptrunc_succ] at hPm + have hME' : M < (ε / 2)⁻¹ := by + rw [inv_div] + have : ε⁻¹ ≤ 2 / ε := by rw [div_eq_mul_inv]; linarith [inv_pos.2 hε] + linarith + have hPm' : M * (ε / 2) ≤ pnorm (ptrunc m (divX y)) := by + have : M * (ε / 2) = M * ε / 2 := by ring + linarith + obtain ⟨q, hqd, hqn, hqe⟩ := ih m (by omega) (ε / 2) M (by positivity) (by linarith) hM2 + hME' (divX y) (natDegree_divX_le_of hy) ((pnorm_divX_le y).trans hyM) hPm' + refine ⟨q, hqd.trans (by omega), ?_, ?_⟩ + · -- `|q| ≤ (2/ε)^{(2k)!} ≤ ε^{-2 (2k)!}`. + refine hqn.trans ?_ + calc (ε / 2)⁻¹ ^ (2 * k).factorial ≤ (ε⁻¹ ^ 2) ^ (2 * k).factorial := + pow_le_pow_left₀ (by positivity) (inv_half_le hε hε2) _ + _ = ε⁻¹ ^ (2 * (2 * k).factorial) := by rw [← pow_mul] + _ ≤ ε⁻¹ ^ (2 * (k + 1)).factorial := + pow_le_pow_right₀ (by linarith [two_lt_inv hε hε2]) (two_mul_factorial_le k) + · -- `Pₖ₊₁ (q y) - x^{m+1} = x (Pₖ (q (y/x)) - xᵐ) + y₀ Pₖ₊₁ q`. + have hdec : y = X * divX y + C (y.coeff 0) := by + conv_lhs => rw [← divX_mul_X_add y] + ring + have key : ptrunc (k + 1) (q * y) - X ^ (m + 1) = + X * (ptrunc k (q * divX y) - X ^ m) + C (y.coeff 0) * ptrunc (k + 1) q := by + conv_lhs => rw [hdec] + rw [mul_add, ptrunc_add, show q * (X * divX y) = X * (q * divX y) by ring, + ← X_mul_ptrunc, show q * C (y.coeff 0) = C (y.coeff 0) * q by ring, ptrunc_C_mul] + ring + rw [key] + have h2 : ‖y.coeff 0‖ * pnorm (ptrunc (k + 1) q) ≤ τ * (ε / 2)⁻¹ ^ (2 * k).factorial := + mul_le_mul hy0.le ((pnorm_ptrunc_le _ _).trans hqn) (pnorm_nonneg _) hτ0.le + have h3 : τ * (ε / 2)⁻¹ ^ (2 * k).factorial = ε / 2 := by + rw [hτ, inv_pow, pow_succ] + field_simp + calc pnorm (X * (ptrunc k (q * divX y) - X ^ m) + C (y.coeff 0) * ptrunc (k + 1) q) + ≤ pnorm (X * (ptrunc k (q * divX y) - X ^ m)) + + pnorm (C (y.coeff 0) * ptrunc (k + 1) q) := pnorm_add_le _ _ + _ = pnorm (ptrunc k (q * divX y) - X ^ m) + + ‖y.coeff 0‖ * pnorm (ptrunc (k + 1) q) := by rw [pnorm_X_mul, pnorm_C_mul] + _ < ε := by linarith + +/-- **Śliwa's Lemma 6**, with his remark (p. 639): any `y`, since `Pₙ (q y) = Pₙ (q Pₙ y)`. -/ +theorem lemma6 {n : ℕ} (hn : 1 ≤ n) {m : ℕ} (hm : m ≤ n) {ε M : ℝ} (hε : 0 < ε) + (hε2 : ε < 1 / 2) (hM2 : 2 < M) (hME : M < ε⁻¹) {y : ℂ[X]} (hyM : pnorm y ≤ M) + (hPm : M * ε ≤ pnorm (ptrunc m y)) : + ∃ q : ℂ[X], q.natDegree ≤ n ∧ pnorm q ≤ ε⁻¹ ^ (2 * n).factorial ∧ + pnorm (ptrunc n (q * y) - X ^ m) < ε := by + obtain ⟨q, hqd, hqn, hqe⟩ := lemma6_of_natDegree_le n hn m hm ε M hε hε2 hM2 hME (ptrunc n y) + (natDegree_ptrunc_le n y) ((pnorm_ptrunc_le n y).trans hyM) (by rwa [ptrunc_ptrunc hm]) + exact ⟨q, hqd, hqn, by rwa [ptrunc_mul_ptrunc] at hqe⟩ + +end ReadL1 diff --git a/LeanPool/ReadL1/Main.lean b/LeanPool/ReadL1/Main.lean new file mode 100644 index 0000000000..193368801c --- /dev/null +++ b/LeanPool/ReadL1/Main.lean @@ -0,0 +1,36 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Explicit + +/-! +# Read's theorem on ℓ¹, in the form of Formal Conjectures + +`InvariantSubspaceProblem.Invariant_subspace_problem_l1` asks for a bounded operator on +`lp (fun _ : ℕ => ℂ) 1` with no nontrivial closed invariant subspace. Śliwa's version of Read's +operator (`ReadL1.readOp`), built from the explicit sequence `ReadL1.dRead`, is one +(`ReadL1.theorem7`, `ReadL1.theorem7Hyp_dRead`). +-/ + +@[expose] public section + +namespace ReadL1 + +open InvariantSubspaceProblem + +/-- **Read's theorem on ℓ¹** (Read 1985; Śliwa 2010): there is a bounded operator on ℓ¹ with no +nontrivial closed invariant subspace. The statement is Formal Conjectures' +`Invariant_subspace_problem_l1`, verbatim. -/ +theorem invariant_subspace_problem_l1 : + ∃ (T : (lp (fun (_ : ℕ) => ℂ) 1) →L[ℂ] (lp (fun (_ : ℕ) => ℂ) 1)), + IsEmpty (ClosedInvariantSubspace T) := + ⟨readOp theorem7Hyp_dRead.toGrowthHyp, theorem7 theorem7Hyp_dRead⟩ + +end ReadL1 diff --git a/LeanPool/ReadL1/Norm.lean b/LeanPool/ReadL1/Norm.lean new file mode 100644 index 0000000000..e9b4a158b7 --- /dev/null +++ b/LeanPool/ReadL1/Norm.lean @@ -0,0 +1,247 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Basis +public import LeanPool.ReadL1.Growth +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Abel + +/-! +# The norm, and Śliwa's Lemma 1 (b) + +Śliwa puts `‖∑ cᵢ fᵢ‖ = ∑ |cᵢ|`, so in coordinates in the basis `(fᵢ)` the norm is +`‖g‖ = ∑ⱼ |gⱼ|` (`ReadL1.nrm`). + +This file proves the facts about `xⁱ` that the boundedness proof (Lemma 2) uses: + +* the recursion defining `xⁱ`, one block kind at a time (`ReadL1.xPow_of_J` and friends); +* on a `J` or `L` block, `xⁱ` is a multiple of one basis vector, so its norm is the inverse + weight (`ReadL1.nrm_xPow_of_J`, `ReadL1.nrm_xPow_of_L`); +* **Lemma 1 (b)** (Śliwa p. 630): `‖xⁱ - x^{i - r aₙ}‖ ≤ 2 / aₙ₋ᵣ` on `Iₙ,ᵣ`, and + `‖xⁱ - bₙʳ x^{i - r bₙ}‖ ≤ 2 bₙ^{r - 1}` on `Kₙ,ᵣ`. Both differences telescope: stepping down + by `aₙ` (or `bₙ`) moves `i` to the block `Iₙ,ᵣ₋₁` (or `Kₙ,ᵣ₋₁`), and each step contributes + one basis vector. +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-! ### The coordinate norm -/ + +/-- Śliwa's norm in coordinates: `‖g‖ = ∑ⱼ |gⱼ|`. -/ +noncomputable def nrm (g : ℕ →₀ ℂ) : ℝ := ∑ j ∈ g.support, ‖g j‖ + +lemma nrm_eq_sum_of_subset (g : ℕ →₀ ℂ) {s : Finset ℕ} (hs : g.support ⊆ s) : + nrm g = ∑ j ∈ s, ‖g j‖ := + Finset.sum_subset hs fun j _ hj ↦ by simp [Finsupp.notMem_support_iff.1 hj] + +lemma nrm_nonneg (g : ℕ →₀ ℂ) : 0 ≤ nrm g := Finset.sum_nonneg fun _ _ ↦ norm_nonneg _ + +@[simp] lemma nrm_zero : nrm 0 = 0 := by simp [nrm] + +lemma nrm_single (i : ℕ) (c : ℂ) : nrm (single i c) = ‖c‖ := by + rw [nrm_eq_sum_of_subset _ (support_single_subset)] + simp + +lemma nrm_add_le (g h : ℕ →₀ ℂ) : nrm (g + h) ≤ nrm g + nrm h := by + classical + have hs : (g + h).support ⊆ g.support ∪ h.support := support_add + rw [nrm_eq_sum_of_subset _ hs, nrm_eq_sum_of_subset g Finset.subset_union_left, + nrm_eq_sum_of_subset h Finset.subset_union_right, ← Finset.sum_add_distrib] + exact Finset.sum_le_sum fun j _ ↦ by simpa using norm_add_le (g j) (h j) + +lemma nrm_smul (c : ℂ) (g : ℕ →₀ ℂ) : nrm (c • g) = ‖c‖ * nrm g := by + rw [nrm_eq_sum_of_subset _ (support_smul), nrm, Finset.mul_sum] + simp + +lemma nrm_neg (g : ℕ →₀ ℂ) : nrm (-g) = nrm g := by + simpa using nrm_smul (-1) g + +lemma nrm_sub_le (g h : ℕ →₀ ℂ) : nrm (g - h) ≤ nrm g + nrm h := by + simpa [sub_eq_add_neg, nrm_neg] using nrm_add_le g (-h) + +lemma nrm_sum_le {ι : Type*} (s : Finset ι) (g : ι → ℕ →₀ ℂ) : + nrm (∑ k ∈ s, g k) ≤ ∑ k ∈ s, nrm (g k) := by + classical + induction s using Finset.induction_on with + | empty => simp + | insert k s hk ih => + rw [Finset.sum_insert hk, Finset.sum_insert hk] + exact (nrm_add_le _ _).trans (by linarith) + +/-! ### The recursion for `xⁱ`, block by block -/ + +private lemma xPow_unfold (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) : + ∃ i', i = i' + 1 ∧ block d (i' + 1) = B := by + obtain ⟨i', rfl⟩ := Nat.exists_eq_add_of_le (Block.one_le_of_mem h hB) + exact ⟨i', by ring, by rw [show 1 + i' = i' + 1 by ring] at hB; exact block_eq h hB⟩ + +lemma xPow_of_J (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .J) : + xPow d i = (weight (seqA d B.n) B.r i : ℂ)⁻¹ • single i 1 := by + obtain ⟨i', rfl, hb⟩ := xPow_unfold h hB + rw [xPow, hb]; simp [hk] + +lemma xPow_of_L (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .L) : + xPow d i = (weight (seqB d B.n) B.r i : ℂ)⁻¹ • single i 1 := by + obtain ⟨i', rfl, hb⟩ := xPow_unfold h hB + rw [xPow, hb]; simp [hk] + +lemma xPow_of_I (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .I) : + xPow d i = (seqA d (B.n - B.r) : ℂ)⁻¹ • single i 1 + xPow d (i - seqA d B.n) := by + obtain ⟨i', rfl, hb⟩ := xPow_unfold h hB + rw [xPow, hb] + simp only [hk] + rw [dite_eq_left (Nat.one_le_iff_ne_zero.1 (h.one_le_a _))] + +lemma xPow_of_K (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) (hk : B.kind = .K) : + xPow d i = single i 1 + (seqB d B.n : ℂ) • xPow d (i - seqB d B.n) := by + obtain ⟨i', rfl, hb⟩ := xPow_unfold h hB + rw [xPow, hb] + simp only [hk] + rw [dite_eq_left (lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b _)).ne'] + +/-! ### Exact norms on `J` and `L` blocks -/ + +lemma nrm_xPow_of_J (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .J) : nrm (xPow d i) = (weight (seqA d B.n) B.r i)⁻¹ := by + rw [xPow_of_J h hB hk, nrm_smul, nrm_single, norm_one, mul_one, norm_inv, Complex.norm_real, + Real.norm_of_nonneg (weight_pos _ _ _).le] + +lemma nrm_xPow_of_L (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .L) : nrm (xPow d i) = (weight (seqB d B.n) B.r i)⁻¹ := by + rw [xPow_of_L h hB hk, nrm_smul, nrm_single, norm_one, mul_one, norm_inv, Complex.norm_real, + Real.norm_of_nonneg (weight_pos _ _ _).le] + +/-! ### Lemma 1 (b): telescoping on `I` and `K` blocks -/ + +/-- `v` is monotone. -/ +lemma seqV_mono (h : PartitionHyp d) : Monotone (seqV d) := by + refine monotone_nat_of_le_succ fun n ↦ ?_ + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [seqV_zero] + · exact (seqV_lt_succ h hn).le + +/-- Stepping down by `j aₙ` from `Iₙ,ᵣ` lands in `Iₙ,ᵣ₋ⱼ`. -/ +lemma mem_I_sub (h : PartitionHyp d) {n r i j : ℕ} (hB : (⟨n, r, .I⟩ : Block).Mem d i) + (hj : j < r) : (⟨n, r - j, .I⟩ : Block).Mem d (i - j * seqA d n) := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := hB + dsimp only at hr1 hrn hlo hhi + have hmul : (r - j) * seqA d n + j * seqA d n = r * seqA d n := by + rw [← Nat.add_mul, Nat.sub_add_cancel hj.le] + have hv : seqV d (n - r - 1) ≤ seqV d (n - (r - j) - 1) := seqV_mono h (by omega) + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only <;> omega + +/-- **Lemma 1 (b), `I` blocks, as an identity:** on `Iₙ,ᵣ`, +`xⁱ - x^{i - r aₙ} = ∑_{j < r} a_{n-r+j}⁻¹ δ_{i - j aₙ}`. -/ +lemma xPow_sub_of_I (h : PartitionHyp d) {n r i : ℕ} (hB : (⟨n, r, .I⟩ : Block).Mem d i) : + ∀ k ≤ r, xPow d i - xPow d (i - k * seqA d n) = + ∑ j ∈ Finset.range k, (seqA d (n - (r - j)) : ℂ)⁻¹ • single (i - j * seqA d n) 1 := by + intro k + induction k with + | zero => intro; simp + | succ k ih => + intro hk + have hmem := mem_I_sub h hB (j := k) (by omega) + have hstep := xPow_of_I h hmem rfl + dsimp only at hstep + rw [Finset.sum_range_succ, ← ih (by omega), hstep, + show i - k * seqA d n - seqA d n = i - (k + 1) * seqA d n by rw [Nat.sub_sub]; ring_nf] + abel + +/-- **Lemma 1 (b), `I` blocks:** `‖xⁱ - x^{i - r aₙ}‖ ≤ 2 / aₙ₋ᵣ` on `Iₙ,ᵣ`. The `j`-th term of the +telescoped sum has size `1 / aₙ₋ᵣ₊ⱼ ≤ 1 / (2ʲ aₙ₋ᵣ)`. -/ +lemma nrm_xPow_sub_of_I (h : GrowthHyp d) {n r i : ℕ} (hB : (⟨n, r, .I⟩ : Block).Mem d i) : + nrm (xPow d i - xPow d (i - r * seqA d n)) ≤ 2 / seqA d (n - r) := by + have hrn : r < n := hB.2.1 + have ha : (0 : ℝ) < seqA d (n - r) := by exact_mod_cast h.one_le_a _ + rw [xPow_sub_of_I h.toPartitionHyp hB r le_rfl] + refine (nrm_sum_le _ _).trans ?_ + calc ∑ j ∈ Finset.range r, nrm ((seqA d (n - (r - j)) : ℂ)⁻¹ • single (i - j * seqA d n) 1) + ≤ ∑ j ∈ Finset.range r, (1 / 2 : ℝ) ^ j / seqA d (n - r) := by + refine Finset.sum_le_sum fun j hj ↦ ?_ + have hjr : j < r := Finset.mem_range.1 hj + rw [nrm_smul, nrm_single, norm_one, mul_one, norm_inv, Complex.norm_natCast] + -- `aₙ₋ᵣ₊ⱼ ≥ 2ʲ aₙ₋ᵣ`. + have hle := pow_two_mul_le_seqA h (m := n - r) (by omega) j + rw [show n - r + j = n - (r - j) by omega] at hle + have hle' : (2 : ℝ) ^ j * seqA d (n - r) ≤ seqA d (n - (r - j)) := by exact_mod_cast hle + rw [div_eq_mul_inv, one_div_pow, one_div, ← mul_inv] + exact inv_anti₀ (by positivity) hle' + _ = (∑ j ∈ Finset.range r, (1 / 2 : ℝ) ^ j) / seqA d (n - r) := by + simp only [div_eq_mul_inv, Finset.sum_mul] + _ ≤ 2 / seqA d (n - r) := div_le_div_of_nonneg_right (sum_geometric_two_le r) ha.le + +/-- Stepping down by `j bₙ` from `Kₙ,ᵣ` lands in `Kₙ,ᵣ₋ⱼ`. -/ +lemma mem_K_sub {n r i j : ℕ} (hB : (⟨n, r, .K⟩ : Block).Mem d i) (hj : j < r) : + (⟨n, r - j, .K⟩ : Block).Mem d (i - j * seqB d n) := by + obtain ⟨hr1, hrn, hlo, hhi⟩ := hB + dsimp only at hr1 hrn hlo hhi + have hmul : (r - j) * seqB d n + j * seqB d n = r * seqB d n := by + rw [← Nat.add_mul, Nat.sub_add_cancel hj.le] + have hmulA : (r - j) * seqA d n ≤ r * seqA d n := Nat.mul_le_mul_right _ (by omega) + have hexp : (r - j) * (seqA d n + seqB d n) = (r - j) * seqA d n + (r - j) * seqB d n := by + ring + have hexp' : r * (seqA d n + seqB d n) = r * seqA d n + r * seqB d n := by ring + refine ⟨by dsimp; omega, by dsimp; omega, ?_, ?_⟩ <;> dsimp only <;> omega + +/-- **Lemma 1 (b), `K` blocks, as an identity:** on `Kₙ,ᵣ`, +`xⁱ - bₙᵏ x^{i - k bₙ} = ∑_{j < k} bₙʲ δ_{i - j bₙ}` for `k ≤ r`. -/ +lemma xPow_sub_of_K (h : PartitionHyp d) {n r i : ℕ} (hB : (⟨n, r, .K⟩ : Block).Mem d i) : + ∀ k ≤ r, xPow d i - (seqB d n : ℂ) ^ k • xPow d (i - k * seqB d n) = + ∑ j ∈ Finset.range k, (seqB d n : ℂ) ^ j • single (i - j * seqB d n) 1 := by + intro k + induction k with + | zero => intro; simp + | succ k ih => + intro hk + have hstep := xPow_of_K h (mem_K_sub hB (j := k) (by omega)) rfl + dsimp only at hstep + rw [Finset.sum_range_succ, ← ih (by omega), hstep, + show i - k * seqB d n - seqB d n = i - (k + 1) * seqB d n by rw [Nat.sub_sub]; ring_nf, + smul_add, smul_smul, ← pow_succ] + abel + +/-- `∑_{j < r} bʲ ≤ 2 b^{r - 1}` for `b ≥ 2` and `r ≥ 1`. -/ +lemma sum_pow_le_two_mul_pow {b : ℝ} (hb : 2 ≤ b) {r : ℕ} (hr : 1 ≤ r) : + ∑ j ∈ Finset.range r, b ^ j ≤ 2 * b ^ (r - 1) := by + induction r with + | zero => omega + | succ r ih => + rcases Nat.eq_zero_or_pos r with rfl | hr0 + · simp + · rw [Finset.sum_range_succ] + have := ih hr0 + have hpow : b ^ r = b * b ^ (r - 1) := by rw [← pow_succ', Nat.sub_add_cancel hr0] + have hb0 : 0 ≤ b ^ (r - 1) := pow_nonneg (by linarith) _ + rw [show r + 1 - 1 = r by omega, hpow] at * + nlinarith + +/-- **Lemma 1 (b), `K` blocks:** `‖xⁱ - bₙʳ x^{i - r bₙ}‖ ≤ 2 bₙ^{r - 1}` on `Kₙ,ᵣ`. -/ +lemma nrm_xPow_sub_of_K (h : GrowthHyp d) {n r i : ℕ} (hB : (⟨n, r, .K⟩ : Block).Mem d i) : + nrm (xPow d i - (seqB d n : ℂ) ^ r • xPow d (i - r * seqB d n)) ≤ + 2 * (seqB d n : ℝ) ^ (r - 1) := by + have hr1 : 1 ≤ r := hB.1 + rw [xPow_sub_of_K h.toPartitionHyp hB r le_rfl] + refine (nrm_sum_le _ _).trans ?_ + calc ∑ j ∈ Finset.range r, nrm ((seqB d n : ℂ) ^ j • single (i - j * seqB d n) 1) + = ∑ j ∈ Finset.range r, (seqB d n : ℝ) ^ j := by + refine Finset.sum_congr rfl fun j _ ↦ ?_ + rw [nrm_smul, nrm_single, norm_one, mul_one, norm_pow, Complex.norm_natCast] + _ ≤ 2 * (seqB d n : ℝ) ^ (r - 1) := + sum_pow_le_two_mul_pow (by exact_mod_cast h.two_le_b n) hr1 + +end ReadL1 diff --git a/LeanPool/ReadL1/Operator.lean b/LeanPool/ReadL1/Operator.lean new file mode 100644 index 0000000000..3a2fdd87f4 --- /dev/null +++ b/LeanPool/ReadL1/Operator.lean @@ -0,0 +1,78 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.L1Lift +public import LeanPool.ReadL1.Lemma2 + +/-! +# Read's operator on ℓ¹ + +Finitely supported sequences sit inside ℓ¹ (`ReadL1.toL1`), with Śliwa's coordinate norm becoming +the ℓ¹ norm (`ReadL1.norm_toL1`). By Lemma 2 the images `T fᵢ` are bounded by `α`, so `l1Lift` +gives an operator on all of ℓ¹ with those images (`ReadL1.readOp`), of norm at most `α` +(`ReadL1.norm_readOp_le`). On finite sequences it agrees with `T₀` (`ReadL1.readOp_toL1`), so it +is still multiplication by `x`. +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/-- A finitely supported sequence, as an element of ℓ¹: `g ↦ ∑ⱼ gⱼ δⱼ`. -/ +noncomputable def toL1 : (ℕ →₀ ℂ) →ₗ[ℂ] L1 := linearCombination ℂ δ + +lemma toL1_single (j : ℕ) (c : ℂ) : toL1 (single j c) = c • δ j := by + simp [toL1] + +/-- The coordinates of `toL1 g` are those of `g`. -/ +lemma toL1_apply (g : ℕ →₀ ℂ) (k : ℕ) : toL1 g k = g k := by + induction g using Finsupp.induction_linear with + | zero => simp + | add g h hg hh => simp [hg, hh] + | single j c => + rw [toL1_single, lp.coeFn_smul, Pi.smul_apply, lp.single_apply, Finsupp.single_apply] + by_cases hjk : j = k + · subst hjk; simp + · simp [hjk, Ne.symm hjk] + +/-- **Śliwa's coordinate norm is the ℓ¹ norm.** -/ +lemma norm_toL1 (g : ℕ →₀ ℂ) : ‖toL1 g‖ = nrm g := by + rw [norm_eq_tsum, nrm] + simp only [toL1_apply] + exact tsum_eq_sum fun k hk ↦ by simp [Finsupp.notMem_support_iff.1 hk] + +/-- The images of the basis vectors are bounded by `α` (Lemma 2). -/ +lemma norm_toL1_shiftImage_le (h : GrowthHyp d) (i : ℕ) : ‖toL1 (shiftImage d i)‖ ≤ alpha := by + rw [norm_toL1]; exact nrm_shiftImage_le h i + +/-- **Read's operator on ℓ¹** (Śliwa's variant): `δᵢ ↦ T fᵢ`. -/ +noncomputable def readOp (h : GrowthHyp d) : L1 →L[ℂ] L1 := + l1Lift (fun i ↦ toL1 (shiftImage d i)) alpha (norm_toL1_shiftImage_le h) + +/-- **`‖T‖ ≤ α`** (Śliwa, Lemma 2). -/ +theorem norm_readOp_le (h : GrowthHyp d) : ‖readOp h‖ ≤ alpha := + norm_l1Lift_le _ _ _ + +lemma readOp_single (h : GrowthHyp d) (i : ℕ) : readOp h (δ i) = toL1 (shiftImage d i) := + l1Lift_single _ _ _ i + +/-- On finite sequences, the operator is `T₀`. -/ +theorem readOp_toL1 (h : GrowthHyp d) (g : ℕ →₀ ℂ) : readOp h (toL1 g) = toL1 (T₀ d g) := by + induction g using Finsupp.induction_linear with + | zero => simp + | add g k hg hk => simp only [map_add, hg, hk] + | single j c => + rw [toL1_single, map_smul, readOp_single, T₀_single, map_smul] + +end ReadL1 diff --git a/LeanPool/ReadL1/Partition.lean b/LeanPool/ReadL1/Partition.lean new file mode 100644 index 0000000000..3c5bb30e00 --- /dev/null +++ b/LeanPool/ReadL1/Partition.lean @@ -0,0 +1,332 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import Mathlib.Data.Nat.Basic +public import Mathlib.Order.Monotone.Defs +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Śliwa's partition of the indices + +W. Śliwa (Rocky Mountain J. Math. 40 (2010), p. 628–629) builds Read's operator from a fast +growing integer sequence `d`. Put `aₙ = d₂ₙ₋₁`, `bₙ = d₂ₙ` and `vₙ = (n - 1)(aₙ + bₙ)`. For +`n > r ≥ 1` the positive integers are cut into consecutive blocks + +* `Jₙ,ᵣ = ((r - 1)aₙ + vₙ₋ᵣ, r aₙ)` and `Iₙ,ᵣ = [r aₙ, r aₙ + vₙ₋ᵣ₋₁]`, which fill + `(vₙ₋₁, (n - 1)aₙ]`; +* `Lₙ,ᵣ = ((n - 1)aₙ + (r - 1)bₙ, r(aₙ + bₙ))` and `Kₙ,ᵣ = [r(aₙ + bₙ), (n - 1)aₙ + r bₙ]`, + which fill `((n - 1)aₙ, vₙ]`. + +This file proves that every positive integer lies in exactly one block (`ReadL1.exists_block`, +`ReadL1.block_unique`). Only three growth facts are used, collected in `ReadL1.PartitionHyp`; +Śliwa derives them (and more) on p. 628 from his growth condition. +-/ + +@[expose] public section + +namespace ReadL1 + +/-- `aₙ = d₂ₙ₋₁`. (At `n = 0`, natural-number subtraction gives `2 * 0 - 1 = 0`, so `a₀ = d₀`; +Śliwa only uses `aₙ` for `n ≥ 1`; the only conditions here that mention `a₀` are +`PartitionHyp.one_le_a` and `PartitionHyp.a_lt_b` at `n = 0`, which the explicit sequence meets +trivially.) -/ +def seqA (d : ℕ → ℕ) (n : ℕ) : ℕ := d (2 * n - 1) + +/-- `bₙ = d₂ₙ`. -/ +def seqB (d : ℕ → ℕ) (n : ℕ) : ℕ := d (2 * n) + +/-- `vₙ = (n - 1)(aₙ + bₙ)`, so `v₀ = v₁ = 0`. -/ +def seqV (d : ℕ → ℕ) (n : ℕ) : ℕ := (n - 1) * (seqA d n + seqB d n) + +/-- The growth facts the partition needs. -/ +structure PartitionHyp (d : ℕ → ℕ) : Prop where + one_le_a : ∀ n, 1 ≤ seqA d n + /-- Every earlier `vₖ` is below `aₙ` (Śliwa: `8(vₙ₋₁ + 1) < aₙ`). -/ + v_lt_a : ∀ n k, k < n → seqV d k < seqA d n + /-- `bₙ` beats `(n - 2)aₙ` (Śliwa: `8n aₙ < bₙ`). -/ + a_lt_b : ∀ n, (n - 2) * seqA d n < seqB d n + +/-- The four kinds of block. -/ +inductive Kind + | J | I | L | K + deriving DecidableEq + +/-- A block `Jₙ,ᵣ`, `Iₙ,ᵣ`, `Lₙ,ᵣ` or `Kₙ,ᵣ`. -/ +@[ext] +structure Block where + /-- The level `n`. -/ + n : ℕ + /-- The position `r` within the level, `1 ≤ r < n`. -/ + r : ℕ + /-- Which of `J`, `I`, `L`, `K` the block is. -/ + kind : Kind + +/-- `i` lies in the block `B` (with `n > r ≥ 1`). -/ +def Block.Mem (d : ℕ → ℕ) (B : Block) (i : ℕ) : Prop := + 1 ≤ B.r ∧ B.r < B.n ∧ + match B.kind with + | .J => (B.r - 1) * seqA d B.n + seqV d (B.n - B.r) < i ∧ i < B.r * seqA d B.n + | .I => B.r * seqA d B.n ≤ i ∧ i ≤ B.r * seqA d B.n + seqV d (B.n - B.r - 1) + | .L => (B.n - 1) * seqA d B.n + (B.r - 1) * seqB d B.n < i ∧ + i < B.r * (seqA d B.n + seqB d B.n) + | .K => B.r * (seqA d B.n + seqB d B.n) ≤ i ∧ + i ≤ (B.n - 1) * seqA d B.n + B.r * seqB d B.n + +/-! ### Locating an index in a chain of intervals -/ + +/-- If `e` is strictly increasing and `e 0 < i ≤ e m`, then `i` lies in some `(e (r - 1), e r]` +with `1 ≤ r ≤ m`. -/ +lemma exists_mem_chain {e : ℕ → ℕ} {i m : ℕ} (h0 : e 0 < i) (hm : i ≤ e m) : + ∃ r, 1 ≤ r ∧ r ≤ m ∧ e (r - 1) < i ∧ i ≤ e r := by + classical + have hex : ∃ r, i ≤ e r := ⟨m, hm⟩ + set r := Nat.find hex with hr + have hri : i ≤ e r := Nat.find_spec hex + have hr0 : r ≠ 0 := fun h ↦ by rw [h] at hri; omega + refine ⟨r, Nat.one_le_iff_ne_zero.2 hr0, Nat.find_min' hex hm, ?_, hri⟩ + exact lt_of_not_ge (Nat.find_min hex (by omega)) + +/-- The interval of a strictly increasing chain containing `i` is unique. -/ +lemma chain_index_unique {e : ℕ → ℕ} (he : StrictMono e) {i r s : ℕ} (hr : 1 ≤ r) (hs : 1 ≤ s) + (hri : e (r - 1) < i ∧ i ≤ e r) (hsi : e (s - 1) < i ∧ i ≤ e s) : r = s := by + by_contra hne + rcases Nat.lt_or_gt_of_ne hne with h | h + · have := he.monotone (show r ≤ s - 1 by omega); omega + · have := he.monotone (show s ≤ r - 1 by omega); omega + +variable {d : ℕ → ℕ} + +/-! ### The levels `(vₙ₋₁, vₙ]` -/ + +lemma seqV_zero : seqV d 0 = 0 := by simp [seqV] + +lemma seqV_one : seqV d 1 = 0 := by simp [seqV] + +/-- From `n = 1` on, `v` strictly increases: `vₙ < aₙ₊₁ ≤ n aₙ₊₁ ≤ vₙ₊₁`. -/ +lemma seqV_lt_succ (h : PartitionHyp d) {n : ℕ} (hn : 1 ≤ n) : seqV d n < seqV d (n + 1) := by + have h1 := h.v_lt_a (n + 1) n (by omega) + have h2 : seqA d (n + 1) ≤ n * seqA d (n + 1) := Nat.le_mul_of_pos_left _ hn + have h3 : n * seqA d (n + 1) ≤ seqV d (n + 1) := by + unfold seqV; simp only [Nat.add_sub_cancel]; exact Nat.mul_le_mul_left _ (by omega) + omega + +/-- Every `i` is at most `vᵢ₊₁ = i(aᵢ₊₁ + bᵢ₊₁)`. -/ +lemma le_seqV_succ (h : PartitionHyp d) (i : ℕ) : i ≤ seqV d (i + 1) := by + unfold seqV + simp only [Nat.add_sub_cancel] + exact Nat.le_mul_of_pos_right _ (by have := h.one_le_a (i + 1); omega) + +/-- The shifted sequence `n ↦ vₙ₊₁` is strictly increasing. -/ +lemma strictMono_seqV_succ (h : PartitionHyp d) : StrictMono fun n ↦ seqV d (n + 1) := + strictMono_nat_of_lt_succ fun n ↦ seqV_lt_succ h (by omega) + +/-- Each positive `i` lies in exactly one level `(vₙ₋₁, vₙ]`, and then `n ≥ 2`. -/ +lemma exists_level (h : PartitionHyp d) {i : ℕ} (hi : 1 ≤ i) : + ∃ n, 2 ≤ n ∧ seqV d (n - 1) < i ∧ i ≤ seqV d n := by + -- Apply the chain lemma to `e k = vₖ₊₁`, which starts at `v₁ = 0`. + obtain ⟨r, hr1, -, hlo, hhi⟩ := + exists_mem_chain (e := fun k ↦ seqV d (k + 1)) (m := i) + (by simp only [zero_add, seqV_one]; omega) (le_seqV_succ h i) + refine ⟨r + 1, by omega, ?_, hhi⟩ + simpa [show r - 1 + 1 = r by omega] using hlo + +lemma level_unique (h : PartitionHyp d) {i n m : ℕ} (hn : 2 ≤ n) (hm : 2 ≤ m) + (hni : seqV d (n - 1) < i ∧ i ≤ seqV d n) (hmi : seqV d (m - 1) < i ∧ i ≤ seqV d m) : + n = m := by + have := chain_index_unique (e := fun k ↦ seqV d (k + 1)) (strictMono_seqV_succ h) + (r := n - 1) (s := m - 1) (i := i) (by omega) (by omega) + (by simpa [show n - 1 - 1 + 1 = n - 1 by omega, show n - 1 + 1 = n by omega] using hni) + (by simpa [show m - 1 - 1 + 1 = m - 1 by omega, show m - 1 + 1 = m by omega] using hmi) + omega + +/-! ### Inside a level -/ + +/-- The right ends `r aₙ + vₙ₋ᵣ₋₁` of the blocks `Iₙ,ᵣ` increase with `r`. -/ +lemma strictMono_chainX (h : PartitionHyp d) (n : ℕ) : + StrictMono fun r ↦ r * seqA d n + seqV d (n - r - 1) := by + refine strictMono_nat_of_lt_succ fun r ↦ ?_ + have hv : seqV d (n - r - 1) < seqA d n ∨ n - r - 1 = 0 := by + rcases Nat.eq_zero_or_pos (n - r - 1) with h0 | h0 + · exact Or.inr h0 + · exact Or.inl (h.v_lt_a n _ (by omega)) + have hsucc : (r + 1) * seqA d n = r * seqA d n + seqA d n := by ring + rcases hv with hv | hv + · rw [hsucc]; omega + · rw [hsucc, hv, show n - (r + 1) - 1 = 0 by omega, seqV_zero] + have := h.one_le_a n; omega + +/-- The right ends `(n - 1)aₙ + r bₙ` of the blocks `Kₙ,ᵣ` increase with `r`. -/ +lemma strictMono_chainY (h : PartitionHyp d) (n : ℕ) : + StrictMono fun r ↦ (n - 1) * seqA d n + r * seqB d n := by + have hb : 0 < seqB d n := lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b n) + exact strictMono_nat_of_lt_succ fun r ↦ by nlinarith + +/-- **Every positive integer lies in a block.** -/ +theorem exists_block (h : PartitionHyp d) {i : ℕ} (hi : 1 ≤ i) : ∃ B : Block, B.Mem d i := by + obtain ⟨n, hn, hlo, hhi⟩ := exists_level h hi + have hva : seqV d (n - 1) < seqA d n := h.v_lt_a n (n - 1) (by omega) + by_cases hX : i ≤ (n - 1) * seqA d n + · -- `i` is in `(vₙ₋₁, (n - 1)aₙ]`: find `r` with `i ∈ Jₙ,ᵣ ∪ Iₙ,ᵣ`. + obtain ⟨r, hr1, hrm, hrlo, hrhi⟩ := + exists_mem_chain (e := fun r ↦ r * seqA d n + seqV d (n - r - 1)) (m := n - 1) + (by simpa using hlo) (by simpa [show n - (n - 1) - 1 = 0 by omega, seqV_zero] using hX) + have hlo' : (r - 1) * seqA d n + seqV d (n - r) < i := by + simpa [show n - (r - 1) - 1 = n - r by omega] using hrlo + by_cases hJ : i < r * seqA d n + · exact ⟨⟨n, r, .J⟩, hr1, (show r < n by omega), hlo', hJ⟩ + · exact ⟨⟨n, r, .I⟩, hr1, (show r < n by omega), (show r * seqA d n ≤ i by omega), hrhi⟩ + · -- `i` is in `((n - 1)aₙ, vₙ]`: find `r` with `i ∈ Lₙ,ᵣ ∪ Kₙ,ᵣ`. + have hvn : seqV d n = (n - 1) * seqA d n + (n - 1) * seqB d n := by unfold seqV; ring + obtain ⟨r, hr1, hrm, hrlo, hrhi⟩ := + exists_mem_chain (e := fun r ↦ (n - 1) * seqA d n + r * seqB d n) (m := n - 1) + (by simpa using lt_of_not_ge hX) (by simpa [← hvn] using hhi) + by_cases hL : i < r * (seqA d n + seqB d n) + · exact ⟨⟨n, r, .L⟩, hr1, (show r < n by omega), hrlo, hL⟩ + · exact ⟨⟨n, r, .K⟩, hr1, (show r < n by omega), + (show r * (seqA d n + seqB d n) ≤ i by omega), hrhi⟩ + +/-- A block lies inside its level `(vₙ₋₁, vₙ]`, on the `X` side `(vₙ₋₁, (n - 1)aₙ]` for `J, I` +and the `Y` side `((n - 1)aₙ, vₙ]` for `L, K`. -/ +lemma Block.mem_level (h : PartitionHyp d) {B : Block} {i : ℕ} (hB : B.Mem d i) : + seqV d (B.n - 1) < i ∧ i ≤ seqV d B.n ∧ + (i ≤ (B.n - 1) * seqA d B.n ↔ B.kind = .J ∨ B.kind = .I) := by + obtain ⟨n, r, k⟩ := B + obtain ⟨hr1, hrn, hk⟩ := hB + dsimp only at hr1 hrn hk ⊢ + have hva : seqV d (n - 1) < seqA d n := h.v_lt_a n (n - 1) (by omega) + have ha := h.one_le_a n + have hab := h.a_lt_b n + have hvn : seqV d n = (n - 1) * seqA d n + (n - 1) * seqB d n := by unfold seqV; ring + have hra : r * seqA d n ≤ (n - 1) * seqA d n := Nat.mul_le_mul_right _ (by omega) + have hrb : r * seqB d n ≤ (n - 1) * seqB d n := Nat.mul_le_mul_right _ (by omega) + have hrsucc : (r - 1) * seqA d n + seqA d n = r * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + cases k with + | J => + obtain ⟨h1, h2⟩ := hk + -- `(r - 1)aₙ + vₙ₋ᵣ ≥ vₙ₋₁`: equality at `r = 1`, and `aₙ > vₙ₋₁` beyond. + have hge : seqV d (n - 1) ≤ (r - 1) * seqA d n + seqV d (n - r) := by + rcases Nat.eq_or_lt_of_le hr1 with hr | hr + · subst hr; simp + · have : seqA d n ≤ (r - 1) * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + omega + refine ⟨by omega, by omega, by simp; omega⟩ + | I => + obtain ⟨h1, h2⟩ := hk + have hra1 : seqA d n ≤ r * seqA d n := Nat.le_mul_of_pos_left _ hr1 + -- `r aₙ + vₙ₋ᵣ₋₁ ≤ (n - 1)aₙ`: at `r = n - 1` because `v₀ = 0`, below because `v < aₙ`. + have hend : r * seqA d n + seqV d (n - r - 1) ≤ (n - 1) * seqA d n := by + rcases Nat.eq_or_lt_of_le (show r ≤ n - 1 by omega) with hr | hr + · rw [hr, show n - (n - 1) - 1 = 0 by omega, seqV_zero]; simp + · have hv := h.v_lt_a n (n - r - 1) (by omega) + have : (r + 1) * seqA d n ≤ (n - 1) * seqA d n := Nat.mul_le_mul_right _ (by omega) + nlinarith + refine ⟨by omega, by omega, by simp; omega⟩ + | L => + obtain ⟨h1, h2⟩ := hk + have : seqA d n ≤ (n - 1) * seqA d n := Nat.le_mul_of_pos_left _ (by omega) + have hlt : r * (seqA d n + seqB d n) ≤ seqV d n := by rw [hvn]; nlinarith + refine ⟨by omega, by omega, by simp; omega⟩ + | K => + obtain ⟨h1, h2⟩ := hk + have : seqA d n ≤ r * seqA d n := Nat.le_mul_of_pos_left _ hr1 + have hb0 : 0 < seqB d n := lt_of_le_of_lt (Nat.zero_le _) hab + -- `(n - 1)aₙ = aₙ + (n - 2)aₙ < aₙ + bₙ ≤ r(aₙ + bₙ)`. + have hsplit : (n - 1) * seqA d n = seqA d n + (n - 2) * seqA d n := by + rw [show n - 1 = 1 + (n - 2) by omega, Nat.add_mul, one_mul] + have hr' : seqA d n + seqB d n ≤ r * (seqA d n + seqB d n) := Nat.le_mul_of_pos_left _ hr1 + have : (n - 1) * seqA d n < r * (seqA d n + seqB d n) := by omega + refine ⟨by nlinarith, by omega, by simp; omega⟩ + +lemma Block.two_le_n {B : Block} {i : ℕ} (hB : B.Mem d i) : 2 ≤ B.n := by + obtain ⟨h1, h2, -⟩ := hB; omega + +/-- A `J` or `I` block sits in the interval `(e (r - 1), e r]` of the chain +`e r = r aₙ + vₙ₋ᵣ₋₁`. -/ +lemma Block.chainX (h : PartitionHyp d) {B : Block} {i : ℕ} (hB : B.Mem d i) + (hk : B.kind = .J ∨ B.kind = .I) : + (B.r - 1) * seqA d B.n + seqV d (B.n - (B.r - 1) - 1) < i ∧ + i ≤ B.r * seqA d B.n + seqV d (B.n - B.r - 1) := by + obtain ⟨n, r, k⟩ := B + obtain ⟨hr1, hrn, hk'⟩ := hB + dsimp only at * + rw [show n - (r - 1) - 1 = n - r by omega] + have hv := h.v_lt_a n (n - r) (by omega) + have hrsucc : (r - 1) * seqA d n + seqA d n = r * seqA d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + rcases hk with rfl | rfl + · obtain ⟨h1, h2⟩ := hk'; exact ⟨h1, by omega⟩ + · obtain ⟨h1, h2⟩ := hk'; exact ⟨by omega, h2⟩ + +/-- An `L` or `K` block sits in the interval `(g (r - 1), g r]` of the chain +`g r = (n - 1)aₙ + r bₙ`. -/ +lemma Block.chainY (h : PartitionHyp d) {B : Block} {i : ℕ} (hB : B.Mem d i) + (hk : B.kind = .L ∨ B.kind = .K) : + (B.n - 1) * seqA d B.n + (B.r - 1) * seqB d B.n < i ∧ + i ≤ (B.n - 1) * seqA d B.n + B.r * seqB d B.n := by + obtain ⟨n, r, k⟩ := B + obtain ⟨hr1, hrn, hk'⟩ := hB + dsimp only at * + have hab := h.a_lt_b n + have hrsucc : (r - 1) * seqB d n + seqB d n = r * seqB d n := by + rw [← Nat.succ_mul, Nat.succ_eq_add_one, Nat.sub_add_cancel hr1] + rcases hk with rfl | rfl + · obtain ⟨h1, h2⟩ := hk' + refine ⟨h1, ?_⟩ + have : r * seqA d n ≤ (n - 1) * seqA d n := Nat.mul_le_mul_right _ (by omega) + nlinarith + · obtain ⟨h1, h2⟩ := hk' + refine ⟨?_, h2⟩ + -- `(n - 1)aₙ + (r - 1)bₙ < r aₙ + r bₙ`, as `(n - 1 - r)aₙ ≤ (n - 2)aₙ < bₙ`. + have : (n - 1) * seqA d n ≤ (n - 2) * seqA d n + r * seqA d n := by + rw [← Nat.add_mul]; exact Nat.mul_le_mul_right _ (by omega) + nlinarith + +/-- **The block containing a positive integer is unique.** -/ +theorem block_unique (h : PartitionHyp d) {i : ℕ} {B C : Block} (hB : B.Mem d i) + (hC : C.Mem d i) : B = C := by + obtain ⟨hBlo, hBhi, hBX⟩ := B.mem_level h hB + obtain ⟨hClo, hChi, hCX⟩ := C.mem_level h hC + have hnm : B.n = C.n := + level_unique h (Block.two_le_n hB) (Block.two_le_n hC) ⟨hBlo, hBhi⟩ ⟨hClo, hChi⟩ + have hXB := Block.chainX h hB + have hXC := Block.chainX h hC + have hYB := Block.chainY h hB + have hYC := Block.chainY h hC + obtain ⟨n, r, k⟩ := B + obtain ⟨m, s, l⟩ := C + obtain ⟨hr1, hrn, hk⟩ := hB + obtain ⟨hs1, hsm, hl⟩ := hC + dsimp only at * + subst hnm + -- The same `r` on the `X` side, and on the `Y` side. + have hrsX : (k = .J ∨ k = .I) → (l = .J ∨ l = .I) → r = s := fun hk hl ↦ + chain_index_unique (e := fun r ↦ r * seqA d n + seqV d (n - r - 1)) (strictMono_chainX h n) + hr1 hs1 (hXB hk) (hXC hl) + have hrsY : (k = .L ∨ k = .K) → (l = .L ∨ l = .K) → r = s := fun hk hl ↦ + chain_index_unique (e := fun r ↦ (n - 1) * seqA d n + r * seqB d n) (strictMono_chainY h n) + hr1 hs1 (hYB hk) (hYC hl) + cases k <;> cases l <;> simp only [Block.mk.injEq, true_and, and_true] + -- Same kind: the chain gives `r = s`. Different kinds on one side: with `r = s` the two blocks' + -- bounds clash at the split point. Different sides: the side test `i ≤ (n - 1)aₙ` clashes. + all_goals first + | exact hrsX (Or.inl rfl) (Or.inl rfl) + | exact hrsX (Or.inr rfl) (Or.inr rfl) + | exact hrsY (Or.inl rfl) (Or.inl rfl) + | exact hrsY (Or.inr rfl) (Or.inr rfl) + | (obtain rfl := hrsX (Or.inl rfl) (Or.inr rfl); omega) + | (obtain rfl := hrsX (Or.inr rfl) (Or.inl rfl); omega) + | (obtain rfl := hrsY (Or.inl rfl) (Or.inr rfl); omega) + | (obtain rfl := hrsY (Or.inr rfl) (Or.inl rfl); omega) + | (simp at hBX hCX; omega) + +end ReadL1 diff --git a/LeanPool/ReadL1/Poly.lean b/LeanPool/ReadL1/Poly.lean new file mode 100644 index 0000000000..390fec4df0 --- /dev/null +++ b/LeanPool/ReadL1/Poly.lean @@ -0,0 +1,69 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Basis +public import LeanPool.ReadL1.PolyNorm +public import Mathlib.Algebra.Polynomial.AlgebraMap + +/-! +# Polynomials in Śliwa's coordinates + +A polynomial's coordinates in the basis `(fᵢ)`: `∑ cᵢ xⁱ ↦ ∑ cᵢ xPow i` (`ReadL1.toCoord`), so that +Śliwa's `‖f‖` is `nrm (toCoord f)`; the operator multiplies by `x` (`ReadL1.T₀_toCoord`), and +`q(T)` multiplies by `q` (`ReadL1.aeval_T₀_toCoord`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/- ### Coordinates of a polynomial -/ + +/-- The coordinates of a polynomial in Śliwa's basis: `xⁱ ↦ xPow i`. -/ +noncomputable def toCoord (d : ℕ → ℕ) : ℂ[X] →ₗ[ℂ] (ℕ →₀ ℂ) := + Polynomial.lsum fun n ↦ LinearMap.toSpanSingleton ℂ (ℕ →₀ ℂ) (xPow d n) + +lemma toCoord_apply (p : ℂ[X]) : toCoord d p = p.sum fun i c ↦ c • xPow d i := by + simp [toCoord, Polynomial.lsum_apply] + +lemma toCoord_monomial (n : ℕ) (c : ℂ) : toCoord d (monomial n c) = c • xPow d n := by + rw [toCoord_apply, Polynomial.sum_monomial_index] + simp + +lemma toCoord_X_pow (n : ℕ) : toCoord d (X ^ n) = xPow d n := by + rw [← monomial_one_right_eq_X_pow, toCoord_monomial, one_smul] + +/-- **The operator multiplies by `x`**, on polynomials. -/ +lemma T₀_toCoord (h : PartitionHyp d) (p : ℂ[X]) : T₀ d (toCoord d p) = toCoord d (X * p) := by + induction p using Polynomial.induction_on' with + | add p q hp hq => rw [map_add, map_add, hp, hq, mul_add, map_add] + | monomial n c => rw [toCoord_monomial, map_smul, T₀_xPow h, X_mul_monomial, toCoord_monomial] + +lemma T₀_pow_toCoord (h : PartitionHyp d) (k : ℕ) (p : ℂ[X]) : + (T₀ d ^ k) (toCoord d p) = toCoord d (X ^ k * p) := by + induction k with + | zero => simp + | succ k ih => rw [pow_succ', mul_apply_eq_comp, ih, T₀_toCoord h, ← mul_assoc, pow_succ'] + +/-- **`q(T)` multiplies by `q`**: `q(T) (toCoord y) = toCoord (q y)`. -/ +lemma aeval_T₀_toCoord (h : PartitionHyp d) (q y : ℂ[X]) : + (aeval (T₀ d) q) (toCoord d y) = toCoord d (q * y) := by + induction q using Polynomial.induction_on' with + | add p q hp hq => rw [map_add, LinearMap.add_apply, hp, hq, add_mul, map_add] + | monomial n c => + rw [aeval_monomial, mul_apply_eq_comp, T₀_pow_toCoord h, Module.algebraMap_end_apply, + ← C_mul_X_pow_eq_monomial, mul_assoc, ← smul_eq_C_mul] + simp [map_smul] + +end ReadL1 diff --git a/LeanPool/ReadL1/PolyNorm.lean b/LeanPool/ReadL1/PolyNorm.lean new file mode 100644 index 0000000000..e4f227afa4 --- /dev/null +++ b/LeanPool/ReadL1/PolyNorm.lean @@ -0,0 +1,174 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import Mathlib.Algebra.Polynomial.Inductions +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.SplitIfs + +/-! +# Śliwa's coefficient norm and truncation + +For a polynomial `f = ∑ cᵢ xⁱ`, Śliwa (p. 636) uses the coefficient norm `|f| = ∑ |cᵢ|` +(`ReadL1.pnorm`), which is submultiplicative (`ReadL1.pnorm_mul_le`), and the truncation `Pₙ` +keeping the powers up to `xⁿ` (`ReadL1.ptrunc`), with `x (Pₙ v) = Pₙ₊₁ (x v)` +(`ReadL1.X_mul_ptrunc`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial + +/- ### The coefficient norm `|f|` -/ + +/-- Śliwa's coefficient norm `|∑ cᵢ xⁱ| = ∑ |cᵢ|`. -/ +noncomputable def pnorm (p : ℂ[X]) : ℝ := p.sum fun _ c ↦ ‖c‖ + +lemma pnorm_eq_sum_of_subset (p : ℂ[X]) {s : Finset ℕ} (hs : p.support ⊆ s) : + pnorm p = ∑ n ∈ s, ‖p.coeff n‖ := by + rw [pnorm, Polynomial.sum_def] + exact Finset.sum_subset hs fun n _ hn ↦ by simp [Polynomial.notMem_support_iff.1 hn] + +lemma pnorm_nonneg (p : ℂ[X]) : 0 ≤ pnorm p := Finset.sum_nonneg fun _ _ ↦ norm_nonneg _ + +@[simp] lemma pnorm_zero : pnorm 0 = 0 := by simp [pnorm] + +lemma pnorm_monomial (n : ℕ) (c : ℂ) : pnorm (monomial n c) = ‖c‖ := by + simp [pnorm, Polynomial.sum_monomial_index] + +lemma pnorm_add_le (p q : ℂ[X]) : pnorm (p + q) ≤ pnorm p + pnorm q := by + classical + rw [pnorm_eq_sum_of_subset _ support_add, pnorm_eq_sum_of_subset p Finset.subset_union_left, + pnorm_eq_sum_of_subset q Finset.subset_union_right, ← Finset.sum_add_distrib] + exact Finset.sum_le_sum fun n _ ↦ by simpa using norm_add_le (p.coeff n) (q.coeff n) + +lemma pnorm_sum_le {ι : Type*} (s : Finset ι) (g : ι → ℂ[X]) : + pnorm (∑ k ∈ s, g k) ≤ ∑ k ∈ s, pnorm (g k) := by + classical + induction s using Finset.induction_on with + | empty => simp + | insert k s hk ih => + rw [Finset.sum_insert hk, Finset.sum_insert hk] + exact (pnorm_add_le _ _).trans (by linarith) + +/-- **`|f g| ≤ |f| |g|`.** -/ +lemma pnorm_mul_le (p q : ℂ[X]) : pnorm (p * q) ≤ pnorm p * pnorm q := by + rw [Polynomial.mul_eq_sum_sum] + refine (pnorm_sum_le _ _).trans ?_ + rw [pnorm, Polynomial.sum_def, Finset.sum_mul] + refine Finset.sum_le_sum fun i _ ↦ (pnorm_sum_le _ _).trans ?_ + rw [pnorm, Polynomial.sum_def, Finset.mul_sum] + exact Finset.sum_le_sum fun j _ ↦ by rw [pnorm_monomial, norm_mul] + +/- ### Truncation -/ + +/-- `Pₙ`: keep the powers `x⁰, …, xⁿ`. -/ +noncomputable def ptrunc (n : ℕ) (p : ℂ[X]) : ℂ[X] := + ∑ i ∈ Finset.range (n + 1), monomial i (p.coeff i) + +lemma coeff_ptrunc (n : ℕ) (p : ℂ[X]) (k : ℕ) : + (ptrunc n p).coeff k = if k ≤ n then p.coeff k else 0 := by + classical + rw [ptrunc, finsetSum_coeff] + simp [coeff_monomial, Finsupp.single_apply, Finset.sum_ite_eq'] + +/-- `x (Pₙ v) = Pₙ₊₁ (x v)`. -/ +lemma X_mul_ptrunc (n : ℕ) (v : ℂ[X]) : X * ptrunc n v = ptrunc (n + 1) (X * v) := by + ext k + rcases k with _ | k + · simp [coeff_ptrunc] + · rw [coeff_X_mul, coeff_ptrunc, coeff_ptrunc, coeff_X_mul] + by_cases hk : k ≤ n + · rw [ite_eq_left hk, ite_eq_left (by omega)] + · rw [ite_eq_right hk, ite_eq_right (by omega)] + +lemma pnorm_ptrunc_le (n : ℕ) (p : ℂ[X]) : pnorm (ptrunc n p) ≤ pnorm p := by + classical + have hs : (ptrunc n p).support ⊆ p.support := fun k hk ↦ by + rw [Polynomial.mem_support_iff, coeff_ptrunc] at hk + rw [Polynomial.mem_support_iff] + split_ifs at hk with h + · exact hk + · exact absurd rfl hk + rw [pnorm_eq_sum_of_subset _ hs, pnorm_eq_sum_of_subset p le_rfl] + exact Finset.sum_le_sum fun k _ ↦ by + rw [coeff_ptrunc]; split_ifs <;> simp + +/- ### More on truncation and the coefficient norm -/ + +lemma ptrunc_add (n : ℕ) (p q : ℂ[X]) : ptrunc n (p + q) = ptrunc n p + ptrunc n q := by + ext k; simp only [coeff_ptrunc, coeff_add]; split_ifs <;> simp + +lemma ptrunc_sub (n : ℕ) (p q : ℂ[X]) : ptrunc n (p - q) = ptrunc n p - ptrunc n q := by + ext k; simp only [coeff_ptrunc, coeff_sub]; split_ifs <;> simp + +lemma ptrunc_C_mul (n : ℕ) (c : ℂ) (p : ℂ[X]) : ptrunc n (C c * p) = C c * ptrunc n p := by + ext k; simp only [coeff_ptrunc, coeff_C_mul]; split_ifs <;> simp + +/-- Truncating above the degree changes nothing. -/ +lemma ptrunc_of_natDegree_le {n : ℕ} {p : ℂ[X]} (h : p.natDegree ≤ n) : ptrunc n p = p := by + ext k; rw [coeff_ptrunc] + split_ifs with hk + · rfl + · exact (coeff_eq_zero_of_natDegree_lt (by omega)).symm + +lemma pnorm_sub_le (p q : ℂ[X]) : pnorm (p - q) ≤ pnorm p + pnorm q := by + have h := pnorm_add_le p (-q) + have hneg : pnorm (-q) = pnorm q := by + rw [pnorm_eq_sum_of_subset (-q) (s := q.support) (by rw [support_neg]), + pnorm_eq_sum_of_subset q le_rfl] + simp + rwa [← sub_eq_add_neg, hneg] at h + +lemma pnorm_X_pow (m : ℕ) : pnorm (X ^ m : ℂ[X]) = 1 := by + rw [← monomial_one_right_eq_X_pow, pnorm_monomial, norm_one] + +lemma pnorm_C_mul (c : ℂ) (p : ℂ[X]) : pnorm (C c * p) = ‖c‖ * pnorm p := by + have hs : (C c * p).support ⊆ p.support := fun k hk ↦ by + rw [Polynomial.mem_support_iff, coeff_C_mul] at hk + exact Polynomial.mem_support_iff.2 (right_ne_zero_of_mul hk) + rw [pnorm_eq_sum_of_subset _ hs, pnorm_eq_sum_of_subset p le_rfl, Finset.mul_sum] + simp [coeff_C_mul] + +/-- `|p| = |p₀| + |divX p|`: the constant term and the rest. -/ +lemma pnorm_eq_add_divX (p : ℂ[X]) : pnorm p = ‖p.coeff 0‖ + pnorm (divX p) := by + have h1 : p.support ⊆ Finset.range (p.natDegree + 1) := supp_subset_range_natDegree_succ + have h2 : (divX p).support ⊆ Finset.range p.natDegree := fun k hk ↦ by + rw [Polynomial.mem_support_iff, coeff_divX] at hk + have := le_natDegree_of_ne_zero hk + exact Finset.mem_range.2 (by omega) + rw [pnorm_eq_sum_of_subset p h1, pnorm_eq_sum_of_subset _ h2, Finset.sum_range_succ', add_comm] + simp [coeff_divX] + +lemma pnorm_divX_le (p : ℂ[X]) : pnorm (divX p) ≤ pnorm p := by + rw [pnorm_eq_add_divX p]; linarith [norm_nonneg (p.coeff 0)] + +/-- `|x f| = |f|`. -/ +lemma pnorm_X_mul (p : ℂ[X]) : pnorm (X * p) = pnorm p := by + have h : divX (X * p) = p := by ext k; simp [coeff_divX, coeff_X_mul] + rw [pnorm_eq_add_divX (X * p), h] + simp + +lemma divX_ptrunc (m : ℕ) (p : ℂ[X]) : divX (ptrunc (m + 1) p) = ptrunc m (divX p) := by + ext k + rw [coeff_divX, coeff_ptrunc, coeff_ptrunc, coeff_divX] + split_ifs <;> first | rfl | omega + +/-- `|Pₘ₊₁ y| = |y₀| + |Pₘ (divX y)|`. -/ +lemma pnorm_ptrunc_succ (m : ℕ) (p : ℂ[X]) : + pnorm (ptrunc (m + 1) p) = ‖p.coeff 0‖ + pnorm (ptrunc m (divX p)) := by + rw [pnorm_eq_add_divX, divX_ptrunc, coeff_ptrunc, ite_eq_left (Nat.zero_le _)] + +lemma pnorm_ptrunc_zero (p : ℂ[X]) : pnorm (ptrunc 0 p) = ‖p.coeff 0‖ := by + rw [ptrunc, Finset.sum_range_one, pnorm_monomial] + +end ReadL1 diff --git a/LeanPool/ReadL1/Projection.lean b/LeanPool/ReadL1/Projection.lean new file mode 100644 index 0000000000..c257b4133a --- /dev/null +++ b/LeanPool/ReadL1/Projection.lean @@ -0,0 +1,129 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Lemma1 +public import LeanPool.ReadL1.Operator +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.GCongr +import Mathlib.Tactic.SplitIfs + +/-! +# Powers of the operator, and Śliwa's projection `Qₘ` + +Lemma 4 compares `Tˢ` with `Tˢ Qₘ`. This file prepares it: + +* `Tᵏ` sends `xⁱ` to `xⁱ⁺ᵏ` (`ReadL1.T₀_pow_xPow`), and `‖Tᵏ g‖ ≤ αᵏ ‖g‖` + (`ReadL1.nrm_T₀_pow_le`), from `‖T‖ ≤ α`; +* each basis vector `fᵢ = δᵢ` written through powers of `x` (`ReadL1.single_eq_of_J` and friends), + so that `Tˢ fᵢ` is a combination of shifted powers; +* **`Qₘ`** (Śliwa p. 632): `Qₘ fᵢ = fᵢ` for `i ≤ (m - 1)aₘ`, `Qₘ fᵢ = -aₘ x^{i - (n - m)aₙ}` for + `i ∈ Iₙ,ₙ₋ₘ` with `n > m`, and `0` otherwise (`ReadL1.qImage`), with + `‖Qₘ fᵢ‖ ≤ √Aₘ` (`ReadL1.nrm_qImage_le`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Finsupp + +variable {d : ℕ → ℕ} + +/- ### Powers of the operator -/ + +/-- `Tᵏ xⁱ = xⁱ⁺ᵏ`. -/ +lemma T₀_pow_xPow (h : PartitionHyp d) (k i : ℕ) : (T₀ d ^ k) (xPow d i) = xPow d (i + k) := by + induction k with + | zero => simp + | succ k ih => rw [pow_succ', mul_apply_eq_comp, ih, T₀_xPow h, add_assoc] + +/-- The operator on ℓ¹ and on finite sequences agree, power by power. -/ +lemma readOp_pow_toL1 (h : GrowthHyp d) (k : ℕ) (g : ℕ →₀ ℂ) : + (readOp h ^ k) (toL1 g) = toL1 ((T₀ d ^ k) g) := by + induction k with + | zero => simp + | succ k ih => + rw [pow_succ', mul_apply_eq_comp, ih, readOp_toL1, pow_succ', + mul_apply_eq_comp] + +/-- **`‖Tᵏ g‖ ≤ αᵏ ‖g‖`.** -/ +lemma nrm_T₀_pow_le (h : GrowthHyp d) (k : ℕ) (g : ℕ →₀ ℂ) : + nrm ((T₀ d ^ k) g) ≤ alpha ^ k * nrm g := by + rw [← norm_toL1, ← norm_toL1, ← readOp_pow_toL1 h] + induction k with + | zero => simp + | succ k ih => + rw [pow_succ', mul_apply_eq_comp, pow_succ', mul_assoc] + exact ((readOp h).le_opNorm _).trans + (mul_le_mul (norm_readOp_le h) ih (norm_nonneg _) (by norm_num [alpha])) + +/- ### Basis vectors through powers of `x` -/ + +lemma single_eq_of_J (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .J) : single i (1 : ℂ) = (weight (seqA d B.n) B.r i : ℂ) • xPow d i := by + rw [xPow_of_J h hB hk, smul_smul, mul_inv_cancel₀ (weight_ne_zero _ _ _), one_smul] + +lemma single_eq_of_L (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .L) : single i (1 : ℂ) = (weight (seqB d B.n) B.r i : ℂ) • xPow d i := by + rw [xPow_of_L h hB hk, smul_smul, mul_inv_cancel₀ (weight_ne_zero _ _ _), one_smul] + +lemma single_eq_of_I (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .I) : single i (1 : ℂ) = + (seqA d (B.n - B.r) : ℂ) • (xPow d i - xPow d (i - seqA d B.n)) := by + have ha' : (seqA d (B.n - B.r) : ℂ) ≠ 0 := + Nat.cast_ne_zero.2 (Nat.one_le_iff_ne_zero.1 (h.one_le_a _)) + rw [xPow_of_I h hB hk, add_sub_cancel_right, smul_smul, mul_inv_cancel₀ ha', one_smul] + +lemma single_eq_of_K (h : PartitionHyp d) {i : ℕ} {B : Block} (hB : B.Mem d i) + (hk : B.kind = .K) : single i (1 : ℂ) = + xPow d i - (seqB d B.n : ℂ) • xPow d (i - seqB d B.n) := by + rw [xPow_of_K h hB hk, add_sub_cancel_right] + +/- ### The projection `Qₘ` -/ + +/-- `Qₘ fᵢ` in coordinates. -/ +noncomputable def qImage (d : ℕ → ℕ) (m i : ℕ) : ℕ →₀ ℂ := + if i ≤ (m - 1) * seqA d m then single i 1 + else if (block d i).kind = .I ∧ (block d i).r + m = (block d i).n then + -(seqA d m : ℂ) • xPow d (i - ((block d i).n - m) * seqA d (block d i).n) + else 0 + +/-- **`‖Qₘ fᵢ‖ ≤ √Aₘ = α^{√aₘ/2}`** for `m ≥ 2`: on `Iₙ,ₙ₋ₘ` the power has exponent at most +`vₘ₋₁`, so Lemma 1 (a) bounds it by `Bₘ₋₁`, and `aₘ Bₘ₋₁ ≤ √Aₘ`. -/ +lemma nrm_qImage_le (h : GrowthHyp d) {m : ℕ} (hm : 2 ≤ m) (i : ℕ) : + nrm (qImage d m i) ≤ alpha ^ (Real.sqrt (seqA d m) / 2) := by + have hone : (1 : ℝ) ≤ alpha ^ (Real.sqrt (seqA d m) / 2) := + one_le_alpha_rpow (by positivity) + unfold qImage + split_ifs with h1 h2 + · rw [nrm_single, norm_one]; exact hone + · obtain ⟨hk, hr⟩ := h2 + have hi : 1 ≤ i := by omega + have hB := block_mem h.toPartitionHyp hi + rcases hbl : block d i with ⟨n, r, k⟩ + rw [hbl] at hB hk hr + dsimp only at hk hr ⊢ + subst hk + obtain ⟨hr1, hrn, hlo, hhi⟩ := hB + dsimp only at hr1 hrn hlo hhi + -- `i - (n - m)aₙ = i - r aₙ ≤ vₙ₋ᵣ₋₁ = vₘ₋₁`. + have hrm : n - m = r := by omega + have hidx : i - (n - m) * seqA d n ≤ seqV d (m - 1) := by + rw [hrm]; rw [show n - r - 1 = m - 1 by omega] at hhi; omega + have hcap := (nrm_xPow_le_cap h (m - 1) (by omega)).2 _ hidx + rw [nrm_smul, norm_neg, Complex.norm_natCast] + calc (seqA d m : ℝ) * nrm (xPow d (i - (n - m) * seqA d n)) + ≤ seqA d m * capB d (m - 1) := by gcongr + _ ≤ alpha ^ (Real.sqrt (seqA d m) / 2) := h.q_bound m hm + · rw [nrm_zero]; linarith + +end ReadL1 diff --git a/LeanPool/ReadL1/QPoly.lean b/LeanPool/ReadL1/QPoly.lean new file mode 100644 index 0000000000..72aa345129 --- /dev/null +++ b/LeanPool/ReadL1/QPoly.lean @@ -0,0 +1,169 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Coord +public import LeanPool.ReadL1.Lemma4 +public import LeanPool.ReadL1.Lemma6 +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.SplitIfs +import Mathlib.Algebra.Polynomial.BigOperators + +/-! +# `Qₘ e` as a polynomial + +Śliwa treats `Qₘ e` as a polynomial of degree at most `(m - 1)aₘ` and takes its coefficient +norm. Here: `Qₘ fₗ` as a polynomial (`ReadL1.qPolyBasis`); its `j`-th coefficient, extended to ℓ¹ +as the functional `e ↦ ∑ₗ eₗ (Qₘ fₗ)ⱼ` (`ReadL1.qCoeffCLM`); and the polynomial with those +coefficients (`ReadL1.qPoly`), whose coordinates are `Qₘ e` (`ReadL1.toL1_toCoord_qPoly`). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +lemma norm_coeff_le_pnorm (p : ℂ[X]) (j : ℕ) : ‖p.coeff j‖ ≤ pnorm p := by + simpa using sum_norm_coeff_le_pnorm p {j} + +/- ### `Qₘ fₗ` as a polynomial -/ + +/-- The polynomial `Qₘ fₗ`. -/ +noncomputable def qPolyBasis (d : ℕ → ℕ) (m l : ℕ) : ℂ[X] := fromCoord d (qImage d m l) + +lemma qPolyBasis_of_le {m l : ℕ} (hl : l ≤ (m - 1) * seqA d m) : qPolyBasis d m l = fPoly d l := by + rw [qPolyBasis, qImage, ite_eq_left hl, fromCoord_single, one_smul] + +lemma qPolyBasis_of_gt (h : PartitionHyp d) {m l : ℕ} (hl : (m - 1) * seqA d m < l) : + qPolyBasis d m l = + if (block d l).kind = .I ∧ (block d l).r + m = (block d l).n then + -(seqA d m : ℂ) • X ^ (l - ((block d l).n - m) * seqA d (block d l).n) + else 0 := by + rw [qPolyBasis, qImage, ite_eq_right (by omega)] + split_ifs + · rw [map_smul, fromCoord_xPow h] + · rw [map_zero] + +/-- On `Iₙ,ₙ₋ₘ` the exponent `l - (n - m)aₙ` is at most `vₘ₋₁`. -/ +lemma exponent_le_of_I (h : PartitionHyp d) {m l : ℕ} (hk : (block d l).kind = .I) + (hr : (block d l).r + m = (block d l).n) (hl : 1 ≤ l) : + l - ((block d l).n - m) * seqA d (block d l).n ≤ seqV d (m - 1) := by + have hB := block_mem h hl + rcases hbl : block d l with ⟨n, r, k⟩ + rw [hbl] at hB hk hr + dsimp only at hk hr ⊢ + subst hk + obtain ⟨hr1, hrn, hlo, hhi⟩ := hB + dsimp only at hr1 hrn hlo hhi + rw [show n - m = r by omega] + rw [show n - r - 1 = m - 1 by omega] at hhi + omega + +lemma natDegree_qPolyBasis_le (h : PartitionHyp d) {m : ℕ} (hm : 2 ≤ m) (l : ℕ) : + (qPolyBasis d m l).natDegree ≤ (m - 1) * seqA d m := by + rcases le_or_gt l ((m - 1) * seqA d m) with hl | hl + · rw [qPolyBasis_of_le hl]; exact (natDegree_fPoly_le h l).trans hl + · rw [qPolyBasis_of_gt h hl] + split_ifs with hc + · refine (natDegree_smul_le _ _).trans ((natDegree_X_pow_le _).trans ?_) + have := exponent_le_of_I h hc.1 hc.2 (by omega) + have hva := h.v_lt_a m (m - 1) (by omega) + have : seqA d m ≤ (m - 1) * seqA d m := Nat.le_mul_of_pos_left _ (by omega) + omega + · simp + +/-- A bound for all `|Qₘ fₗ|`: the finitely many `|fₗ|` with `l ≤ (m - 1)aₘ`, plus `aₘ`. -/ +noncomputable def qBound (d : ℕ → ℕ) (m : ℕ) : ℝ := + ∑ l ∈ Finset.range ((m - 1) * seqA d m + 1), pnorm (fPoly d l) + seqA d m + +lemma pnorm_qPolyBasis_le (h : PartitionHyp d) (m l : ℕ) : + pnorm (qPolyBasis d m l) ≤ qBound d m := by + have hsum : 0 ≤ ∑ l ∈ Finset.range ((m - 1) * seqA d m + 1), pnorm (fPoly d l) := + Finset.sum_nonneg fun _ _ ↦ pnorm_nonneg _ + have ha : (0 : ℝ) ≤ seqA d m := Nat.cast_nonneg _ + rcases le_or_gt l ((m - 1) * seqA d m) with hl | hl + · rw [qPolyBasis_of_le hl, qBound] + have := Finset.single_le_sum (fun l _ ↦ pnorm_nonneg (fPoly d l)) + (Finset.mem_range.2 (Nat.lt_succ_of_le hl)) + linarith + · rw [qPolyBasis_of_gt h hl, qBound] + split_ifs + · rw [smul_eq_C_mul, pnorm_C_mul, pnorm_X_pow, mul_one, norm_neg, Complex.norm_natCast] + linarith + · rw [pnorm_zero]; linarith + +/- ### The coefficients of `Qₘ e` -/ + +/-- The `j`-th coefficient of `Qₘ e`, as a functional on ℓ¹: `e ↦ ∑ₗ eₗ (Qₘ fₗ)ⱼ`. -/ +noncomputable def qCoeffCLM (h : PartitionHyp d) (m j : ℕ) : L1 →L[ℂ] ℂ := + l1Lift (fun l ↦ (qPolyBasis d m l).coeff j) (qBound d m) + (fun l ↦ (norm_coeff_le_pnorm _ _).trans (pnorm_qPolyBasis_le h m l)) + +lemma qCoeffCLM_apply (h : PartitionHyp d) (m j : ℕ) (e : L1) : + qCoeffCLM h m j e = ∑' l, e l * (qPolyBasis d m l).coeff j := by + rw [qCoeffCLM, l1Lift_apply]; rfl + +lemma qCoeffCLM_single (h : PartitionHyp d) (m j l : ℕ) : + qCoeffCLM h m j (δ l) = (qPolyBasis d m l).coeff j := + l1Lift_single _ _ _ l + +/-- Above degree `(m - 1)aₘ` every coefficient vanishes. -/ +lemma qCoeffCLM_eq_zero (h : PartitionHyp d) {m : ℕ} (hm : 2 ≤ m) {j : ℕ} + (hj : (m - 1) * seqA d m < j) (e : L1) : qCoeffCLM h m j e = 0 := by + rw [qCoeffCLM_apply] + convert tsum_zero with l + rw [coeff_eq_zero_of_natDegree_lt ((natDegree_qPolyBasis_le h hm l).trans_lt hj), mul_zero] + +/-- **`Qₘ e` as a polynomial.** -/ +noncomputable def qPoly (h : PartitionHyp d) (m : ℕ) (e : L1) : ℂ[X] := + ∑ j ∈ Finset.range ((m - 1) * seqA d m + 1), C (qCoeffCLM h m j e) * X ^ j + +lemma coeff_qPoly (h : PartitionHyp d) {m : ℕ} (hm : 2 ≤ m) (e : L1) (j : ℕ) : + (qPoly h m e).coeff j = qCoeffCLM h m j e := by + rw [qPoly, finsetSum_coeff] + simp only [coeff_C_mul, coeff_X_pow, mul_ite, mul_one, mul_zero] + rw [Finset.sum_ite_eq] + split_ifs with hj + · rfl + · rw [qCoeffCLM_eq_zero h hm (by simp at hj; omega)] + +lemma natDegree_qPoly_le (h : PartitionHyp d) (m : ℕ) (e : L1) : + (qPoly h m e).natDegree ≤ (m - 1) * seqA d m := by + rw [qPoly] + exact natDegree_sum_le_of_forall_le _ _ fun j hj ↦ + (natDegree_C_mul_X_pow_le _ _).trans (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj)) + +/-- **The coordinates of the polynomial `Qₘ e` are `Qₘ e`.** Both sides are continuous and +linear in `e`, and they agree on each `δₗ`. -/ +theorem toL1_toCoord_qPoly (h : GrowthHyp d) {m : ℕ} (hm : 2 ≤ m) (e : L1) : + toL1 (toCoord d (qPoly h.toPartitionHyp m e)) = readQ h hm e := by + have hP := h.toPartitionHyp + set N := (m - 1) * seqA d m + let A : L1 →L[ℂ] L1 := ∑ j ∈ Finset.range (N + 1), + (qCoeffCLM hP m j).smulRight (toL1 (xPow d j)) + have hA : ∀ e, toL1 (toCoord d (qPoly hP m e)) = A e := fun e ↦ by + simp only [qPoly, map_sum, toCoord_C_mul, toCoord_X_pow, map_smul, A, + _root_.sum_apply, ContinuousLinearMap.smulRight_apply] + rfl + rw [hA] + congr 1 + refine lp.ext_continuousLinearMap ENNReal.one_ne_top fun l ↦ ?_ + refine ContinuousLinearMap.ext_ring ?_ + change A (δ l) = readQ h hm (δ l) + rw [readQ_single, ← toCoord_fromCoord hP (qImage d m l), ← qPolyBasis, + as_sum_range' (qPolyBasis d m l) (N + 1) + (Nat.lt_succ_of_le (natDegree_qPolyBasis_le hP hm l))] + simp only [A, _root_.sum_apply, + ContinuousLinearMap.smulRight_apply, qCoeffCLM_single, map_sum, ← C_mul_X_pow_eq_monomial, + toCoord_C_mul, toCoord_X_pow, map_smul] + +end ReadL1 diff --git a/LeanPool/ReadL1/Theorem7.lean b/LeanPool/ReadL1/Theorem7.lean new file mode 100644 index 0000000000..835a438a3f --- /dev/null +++ b/LeanPool/ReadL1/Theorem7.lean @@ -0,0 +1,296 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Theorem7Prep +import Mathlib.Analysis.Normed.Algebra.Spectrum +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.SplitIfs +import Mathlib.Tactic.Abel + +/-! +# Śliwa's Theorem 7: no nontrivial closed invariant subspace + +Under the growth facts (`ReadL1.Theorem7Hyp`: those of `ReadL1.GrowthHyp` and Śliwa's +`α aₘ Aₘ Rₘ < bₘ`, p. 640), Read's operator on ℓ¹ has no nontrivial closed invariant subspace +(`ReadL1.theorem7`). + +The heart is `ReadL1.exists_aeval_near_delta`: for `0 < ‖e‖ ≤ 1` and `δ > 0` some polynomial +`f` has `‖f(T) e - x⁰‖ < δ`. Śliwa's proof: take `k > 2` with `6aₖ₋₁⁻¹ < δ`, `m` from Lemma 5, +`y = Qₘ e`, `q` from Lemma 6 (with `ε = (aₘAₘ)⁻¹`, `M = Aₘ`) and `f = bₘ⁻¹ x^{aₘ+bₘ} q`; then + +``` +f(T)e - x⁰ = (f(T)e - z) + (z - P_a z) + (P_a z - P_c t) + + (P_c t - x^{(m-k+1)aₘ}) + (x^{(m-k+1)aₘ} - x⁰) +``` + +with `z = f y`, `t = x^{aₘ} q y`, `a = (m - 1)aₘ + bₘ`, `c = (m - 1)aₘ`, and the five terms are +below `aₘ⁻¹`, `aₘ⁻¹`, `aₘ⁻¹`, `aₘ⁻¹`, `2aₖ₋₁⁻¹` ((S1)–(S5)). + +The vector `x⁰ = δ₀` has dense orbit span (its orbit is `x⁰, x¹, x², …`, spanning the finite +sequences), so `ReadL1.isEmpty_closedInvariantSubspace_of_cyclic` finishes. +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/-- The growth facts for Theorem 7: those of `GrowthHyp`, and `α aₘ Aₘ Rₘ < bₘ` with +`Rₘ = (aₘAₘ)^{(2(m-2)aₘ)!}` (Śliwa p. 640). -/ +structure Theorem7Hyp (d : ℕ → ℕ) : Prop extends GrowthHyp d where + r_bound : ∀ m, 3 ≤ m → + alpha * seqA d m * capA d m * (seqA d m * capA d m) ^ (2 * ((m - 2) * seqA d m)).factorial < + seqB d m + +lemma toL1_toCoord_one : toL1 (toCoord d (1 : ℂ[X])) = δ 0 := by + rw [← pow_zero X, toCoord_X_pow] + simp [xPow, toL1_single] + +/-- The coordinates of a polynomial `p` are `p(T) x⁰`. -/ +lemma toL1_toCoord_eq_aeval (h : GrowthHyp d) (p : ℂ[X]) : + toL1 (toCoord d p) = aeval (readOp h) p (δ 0) := by + rw [← toL1_toCoord_one, aeval_readOp_toL1_toCoord, mul_one] + +/-- **The vector `x⁰` has dense orbit span.** -/ +lemma dense_orbitSpan_delta (h : GrowthHyp d) : + (orbitSpan (readOp h) (δ 0)).topologicalClosure = ⊤ := by + have hP := h.toPartitionHyp + -- Every finite sequence is in the orbit span. + have hfin : ∀ g : ℕ →₀ ℂ, toL1 g ∈ orbitSpan (readOp h) (δ 0) := fun g ↦ by + rw [← toCoord_fromCoord hP g, toL1_toCoord_eq_aeval h] + exact aeval_mem_orbitSpan _ _ _ + refine eq_top_iff.2 fun x _ ↦ ?_ + rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe] + refine mem_closure_of_tendsto (lp.hasSum_single ENNReal.one_ne_top x).tendsto_sum_nat + (Filter.Eventually.of_forall fun N ↦ ?_) + have hsingle : ∀ i, lp.single 1 i (x i) = toL1 (single i (x i)) := fun i ↦ by + refine lp.ext (funext fun k ↦ ?_) + rw [toL1_apply, lp.single_apply, Pi.single_apply, Finsupp.single_apply] + by_cases hik : k = i + · subst hik; simp + · simp [hik, Ne.symm hik] + simp only [hsingle, ← map_sum] + exact hfin _ + +section + +variable (h : Theorem7Hyp d) +include h + +lemma two_lt_capA {m : ℕ} (hm : 1 ≤ m) : 2 < capA d m := by + have h1 := two_mul_le_capA h.toGrowthHyp hm + have h2 : (4096 : ℝ) ≤ seqA d m := by exact_mod_cast h.a_big m hm + linarith + +lemma one_lt_seqA {m : ℕ} (hm : 1 ≤ m) : (1 : ℝ) < seqA d m := by + have h2 : (4096 : ℝ) ≤ seqA d m := by exact_mod_cast h.a_big m hm + linarith + +/-- **The approximation**: for `0 < ‖e‖ ≤ 1` and `δ > 0`, some `f(T) e` is within `δ` of `x⁰`. -/ +theorem exists_aeval_near_delta {e : L1} (he0 : e ≠ 0) (he1 : ‖e‖ ≤ 1) {δ' : ℝ} (hδ : 0 < δ') : + ∃ f : ℂ[X], ‖aeval (readOp h.toGrowthHyp) f e - δ 0‖ < δ' := by + have hG := h.toGrowthHyp + have hP := hG.toPartitionHyp + -- Choose `k > 2` with `6 / aₖ₋₁ < δ`. + obtain ⟨N, hN⟩ := exists_nat_gt (6 / δ') + set k := N + 3 with hk + have hk2 : 2 < k := by omega + have hak : 6 / (seqA d (k - 1) : ℝ) < δ' := by + have h1 : (N : ℝ) + 2 ≤ seqA d (k - 1) := by + exact_mod_cast (show N + 2 ≤ k - 1 by omega).trans (le_seqA hG (by omega)) + have h2 : 0 < (seqA d (k - 1) : ℝ) := seqA_pos hG _ + rw [div_lt_iff₀ h2] + rw [div_lt_iff₀ hδ] at hN + nlinarith + -- Lemma 5 gives `m`. + obtain ⟨m, hkm, h5⟩ := lemma5 hG he0 hk2 + have hm3 : 3 ≤ m := by omega + set a := seqA d m with ha_def + set b := seqB d m with hb_def + set A := capA d m with hA_def + set n := (m - 2) * a with hn_def + set m' := (m - k) * a with hm'_def + have ha1 : (1 : ℝ) < a := one_lt_seqA h (by omega) + have ha0 : (0 : ℝ) < a := by linarith + have hA2 : 2 < A := two_lt_capA h (by omega) + have hA0 : (0 : ℝ) < A := by linarith + have hb0 : (0 : ℝ) < b := by + exact_mod_cast lt_of_le_of_lt (Nat.zero_le _) (hP.a_lt_b m) + have haN : 1 ≤ a := hP.one_le_a m + -- `y = Qₘ e`, `|y| ≤ Aₘ`. + set y := qPoly hP m e with hy_def + have hy : pnorm y ≤ A := pnorm_qPoly_le_capA hG (by omega) he1 + -- Lemma 6 with `ε = (aₘAₘ)⁻¹`, `M = Aₘ`. + have hn1 : 1 ≤ n := by + rw [hn_def]; exact Nat.one_le_iff_ne_zero.2 (Nat.mul_ne_zero (by omega) (by omega)) + have hm'n : m' ≤ n := Nat.mul_le_mul_right _ (by omega) + have haA : 2 < a * A := by nlinarith + obtain ⟨q, hqd, hqn, hqe⟩ := lemma6 hn1 hm'n (ε := (a * A)⁻¹) (M := A) (by positivity) + (by rw [inv_lt_comm₀ (by positivity) (by norm_num)]; norm_num; linarith) + hA2 (by rw [inv_inv]; nlinarith) hy + (by rw [show A * ((a : ℝ) * A)⁻¹ = (a : ℝ)⁻¹ by field_simp]; exact h5) + rw [inv_inv] at hqn + set R := (a * A) ^ (2 * n).factorial with hR_def + have hR0 : 0 ≤ R := by positivity + -- The growth fact `α aₘ Aₘ Rₘ < bₘ` and its two uses. + have hr := h.r_bound m hm3 + rw [← ha_def, ← hA_def, ← hb_def, ← hn_def] at hr + have hα : (1 : ℝ) ≤ alpha := one_le_alpha + have hN1 : alpha * (b : ℝ)⁻¹ * R < (a : ℝ)⁻¹ := by + rw [show alpha * (b : ℝ)⁻¹ * R = alpha * R / b by ring, div_lt_iff₀ hb0, inv_mul_eq_div, + lt_div_iff₀ ha0] + nlinarith [mul_le_mul_of_nonneg_left (show (1 : ℝ) ≤ A by linarith) + (by positivity : (0 : ℝ) ≤ alpha * a * R)] + have hN2 : (b : ℝ)⁻¹ * R * A < (a : ℝ)⁻¹ := by + rw [show (b : ℝ)⁻¹ * R * A = R * A / b by ring, div_lt_iff₀ hb0, inv_mul_eq_div, + lt_div_iff₀ ha0] + nlinarith [mul_le_mul_of_nonneg_right hα (by positivity : (0 : ℝ) ≤ a * A * R)] + -- `f = bₘ⁻¹ x^{aₘ+bₘ} q`. + set f := C (b : ℂ)⁻¹ * (X ^ (a + b) * q) with hf_def + have hfn : pnorm f = (b : ℝ)⁻¹ * pnorm q := by + rw [hf_def, pnorm_C_mul, pnorm_X_pow_mul, norm_inv, Complex.norm_natCast] + have hfK : ∀ s ∈ f.support, InK1 d m s := fun s hs ↦ by + rw [Polynomial.mem_support_iff, hf_def, coeff_C_mul, coeff_X_pow_mul'] at hs + split_ifs at hs with hle + · have hq0 : q.coeff (s - (a + b)) ≠ 0 := right_ne_zero_of_mul hs + have := le_natDegree_of_ne_zero hq0 + change a + b ≤ s ∧ s ≤ (m - 1) * a + b + refine ⟨hle, ?_⟩ + have hna : n + a = (m - 1) * a := by + rw [hn_def, ← add_one_mul, show m - 2 + 1 = m - 1 by omega] + omega + · simp at hs + have hfdeg : f.natDegree ≤ a + b + n := + (natDegree_C_mul_le _ _).trans ((natDegree_mul_le).trans + (add_le_add (natDegree_X_pow_le _) hqd)) + have hydeg : y.natDegree ≤ (m - 1) * a := natDegree_qPoly_le hP m e + -- The pieces, as vectors of ℓ¹. + set c := (m - 1) * a with hc_def + set F := f * y with hF_def + set t := X ^ a * (q * y) with ht_def + have hFt : F = C (b : ℂ)⁻¹ * (X ^ b * t) := by rw [hF_def, hf_def, ht_def, pow_add]; ring + have hz : aeval (readOp hG) f (readQ hG (by omega : 2 ≤ m) e) = toL1 (toCoord d F) := by + rw [← toL1_toCoord_qPoly hG (by omega : 2 ≤ m), aeval_readOp_toL1_toCoord] + -- (S1) + have hS1 : ‖aeval (readOp hG) f e - toL1 (toCoord d F)‖ < (a : ℝ)⁻¹ := by + rw [← hz] + refine (norm_aeval_sub_le hG (by omega) f hfK e).trans_lt ?_ + calc alpha * pnorm f * ‖e‖ ≤ alpha * ((b : ℝ)⁻¹ * R) * 1 := + mul_le_mul (mul_le_mul_of_nonneg_left + (by rw [hfn]; exact mul_le_mul_of_nonneg_left hqn (by positivity)) alpha_pos.le) + he1 (norm_nonneg _) (by have := alpha_pos; positivity) + _ = alpha * (b : ℝ)⁻¹ * R := by ring + _ < (a : ℝ)⁻¹ := hN1 + -- (S2) + have hFdeg : F.natDegree ≤ 2 * c + b := by + rw [hF_def] + have := (natDegree_mul_le (p := f) (q := y)).trans (add_le_add hfdeg hydeg) + have hna : n + a = c := by rw [hn_def, hc_def, ← add_one_mul, show m - 2 + 1 = m - 1 by omega] + omega + have hF : pnorm F ≤ (b : ℝ)⁻¹ * R * A := by + refine (pnorm_mul_le f y).trans ?_ + rw [hfn] + exact mul_le_mul (mul_le_mul_of_nonneg_left hqn (by positivity)) hy (pnorm_nonneg _) + (by positivity) + have hS2 : ‖toL1 (toCoord d F) - toL1 (toCoord d (ptrunc (c + b) F))‖ < (a : ℝ)⁻¹ := by + rw [← map_sub, ← map_sub, norm_toL1] + refine (nrm_toCoord_sub_ptrunc_le hFdeg fun j hj1 hj2 ↦ ?_).trans_lt (hF.trans_lt hN2) + exact nrm_xPow_le_one_of_L2 hG hm3 hj1 hj2 + -- (S3) + have hqy : pnorm (q * y) ≤ R * A := + (pnorm_mul_le q y).trans (mul_le_mul hqn hy (pnorm_nonneg _) hR0) + have hS3 : ‖toL1 (toCoord d (ptrunc (c + b) F)) - toL1 (toCoord d (ptrunc c t))‖ < + (a : ℝ)⁻¹ := by + rw [← map_sub, ← map_sub, norm_toL1] + have hPF : ptrunc (c + b) F - ptrunc c t = (C (b : ℂ)⁻¹ * X ^ b - 1) * ptrunc c t := by + rw [hFt, ptrunc_C_mul, ← X_pow_mul_ptrunc]; ring + rw [hPF] + refine (nrm_toCoord_K_mul_le hP (by omega) (fun j hj ↦ ?_) (natDegree_ptrunc_le c t)).trans_lt + ?_ + · rw [coeff_ptrunc, ht_def, coeff_X_pow_mul', ite_eq_right (show ¬ a ≤ j by omega)] + simp + · calc (b : ℝ)⁻¹ * pnorm (ptrunc c t) ≤ (b : ℝ)⁻¹ * (R * A) := by + refine mul_le_mul_of_nonneg_left ((pnorm_ptrunc_le c t).trans ?_) (by positivity) + rw [ht_def, pnorm_X_pow_mul]; exact hqy + _ = (b : ℝ)⁻¹ * R * A := by ring + _ < (a : ℝ)⁻¹ := hN2 + -- (S4) + have hS4 : ‖toL1 (toCoord d (ptrunc c t)) - toL1 (toCoord d (X ^ ((m - k + 1) * a)))‖ < + (a : ℝ)⁻¹ := by + rw [← map_sub, ← map_sub, norm_toL1] + have hcn : c = n + a := by + rw [hn_def, hc_def, ← add_one_mul, show m - 2 + 1 = m - 1 by omega] + have heq : ptrunc c t - X ^ ((m - k + 1) * a) = X ^ a * (ptrunc n (q * y) - X ^ m') := by + rw [ht_def, hcn, ← X_pow_mul_ptrunc, hm'_def, mul_sub, ← pow_add, + show a + (m - k) * a = (m - k + 1) * a by ring] + have hdeg : (ptrunc c t - X ^ ((m - k + 1) * a)).natDegree ≤ c := + (natDegree_sub_le _ _).trans (max_le (natDegree_ptrunc_le c t) + ((natDegree_X_pow_le _).trans (Nat.mul_le_mul_right _ (by omega)))) + refine (nrm_toCoord_le hdeg (nrm_xPow_le_cap hG m (by omega)).1).trans_lt ?_ + rw [heq, pnorm_X_pow_mul] + calc A * pnorm (ptrunc n (q * y) - X ^ m') < A * (a * A)⁻¹ := mul_lt_mul_of_pos_left hqe hA0 + _ = (a : ℝ)⁻¹ := by field_simp + -- (S5) + have hS5 : ‖toL1 (toCoord d (X ^ ((m - k + 1) * a))) - δ 0‖ ≤ 2 / seqA d (k - 1) := by + rw [← toL1_toCoord_one, ← map_sub, norm_toL1, toCoord_X_pow, ← pow_zero X, toCoord_X_pow] + exact nrm_xPow_sub_zero_le hG (by omega) (by omega) + -- Assemble. + have hak1 : (seqA d (k - 1) : ℝ) ≤ a := by exact_mod_cast seqA_mono hG (by omega) (by omega) + have hinv : (a : ℝ)⁻¹ ≤ (seqA d (k - 1) : ℝ)⁻¹ := inv_anti₀ (seqA_pos hG _) hak1 + refine ⟨f, ?_⟩ + have hsplit : aeval (readOp hG) f e - δ 0 = + (aeval (readOp hG) f e - toL1 (toCoord d F)) + + (toL1 (toCoord d F) - toL1 (toCoord d (ptrunc (c + b) F))) + + (toL1 (toCoord d (ptrunc (c + b) F)) - toL1 (toCoord d (ptrunc c t))) + + (toL1 (toCoord d (ptrunc c t)) - toL1 (toCoord d (X ^ ((m - k + 1) * a)))) + + (toL1 (toCoord d (X ^ ((m - k + 1) * a))) - δ 0) := by abel + rw [hsplit] + set u1 := aeval (readOp hG) f e - toL1 (toCoord d F) + set u2 := toL1 (toCoord d F) - toL1 (toCoord d (ptrunc (c + b) F)) + set u3 := toL1 (toCoord d (ptrunc (c + b) F)) - toL1 (toCoord d (ptrunc c t)) + set u4 := toL1 (toCoord d (ptrunc c t)) - toL1 (toCoord d (X ^ ((m - k + 1) * a))) + set u5 := toL1 (toCoord d (X ^ ((m - k + 1) * a))) - δ 0 + have t1 := norm_add_le (u1 + u2 + u3 + u4) u5 + have t2 := norm_add_le (u1 + u2 + u3) u4 + have t3 := norm_add_le (u1 + u2) u3 + have t4 := norm_add_le u1 u2 + have h6 : 6 / (seqA d (k - 1) : ℝ) = 4 * (seqA d (k - 1) : ℝ)⁻¹ + 2 / seqA d (k - 1) := by ring + linarith + +end + +/-- **Śliwa's Theorem 7.** Read's operator has no nontrivial closed invariant subspace. -/ +theorem theorem7 (h : Theorem7Hyp d) : + IsEmpty (InvariantSubspaceProblem.ClosedInvariantSubspace (readOp h.toGrowthHyp)) := by + refine isEmpty_closedInvariantSubspace_of_cyclic (readOp h.toGrowthHyp) (δ 0) + (dense_orbitSpan_delta h.toGrowthHyp) fun x hx ↦ ?_ + -- Scale `x` to norm one; its orbit span does not change. + have hxn : 0 < ‖x‖ := norm_pos_iff.2 hx + set e := ((‖x‖⁻¹ : ℝ) : ℂ) • x with he + have he1 : ‖e‖ = 1 := by + rw [he, norm_smul, Complex.norm_real, Real.norm_of_nonneg (by positivity), + inv_mul_cancel₀ hxn.ne'] + have he0 : e ≠ 0 := fun h0 ↦ by rw [h0, norm_zero] at he1; exact zero_ne_one he1 + rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] + intro ε hε + obtain ⟨f, hf⟩ := exists_aeval_near_delta h he0 he1.le hε + refine ⟨aeval (readOp h.toGrowthHyp) f e, ?_, ?_⟩ + · rw [he, map_smul] + exact Submodule.smul_mem _ _ (aeval_mem_orbitSpan _ f x) + · rwa [dist_eq_norm, norm_sub_rev] + +end ReadL1 diff --git a/LeanPool/ReadL1/Theorem7Prep.lean b/LeanPool/ReadL1/Theorem7Prep.lean new file mode 100644 index 0000000000..20500e4aef --- /dev/null +++ b/LeanPool/ReadL1/Theorem7Prep.lean @@ -0,0 +1,351 @@ +/- +Copyright (c) 2026 Zayn Blore. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Zayn Blore +-/ + +-- Modified for Lean Pool. + +module + +public import LeanPool.ReadL1.Cyclic +public import LeanPool.ReadL1.Lemma5 +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.SplitIfs + +/-! +# Preparations for Theorem 7 + +* Polynomials in the operator: `f(T) e` lies in the orbit span of `e` + (`ReadL1.aeval_mem_orbitSpan`), and on finite sequences `f(T)` multiplies by `f` + (`ReadL1.aeval_readOp_toL1`). +* (S1) through Lemma 4: `‖f(T) e - f(T) Qₘ e‖ ≤ α |f| ‖e‖` when the powers of `f` lie in `Kₘ,₁` + (`ReadL1.norm_aeval_sub_le`). +* `|Qₘ e| ≤ Aₘ ‖e‖` (`ReadL1.pnorm_qPoly_le_capA`), from `|fₗ| ≤ Aₘ` for `l ≤ (m - 1)aₘ` + (`ReadL1.pnorm_fPoly_le`). Śliwa (p. 640) gets `√Aₘ · √Aₘ` through `‖Qₘ‖ ≤ √Aₘ` and + `|y| ≤ √Aₘ ‖y‖`; the bound here is the same, reached through the basis directly. +* The norm estimates in (S2), (S3) and (S5). +-/ + +@[expose] public section + +namespace ReadL1 + +open Polynomial Finsupp + +variable {d : ℕ → ℕ} + +/- ### Polynomials in the operator -/ + +lemma aeval_apply_eq_sum {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] (T : E →L[ℂ] E) + (f : ℂ[X]) (x : E) : aeval T f x = ∑ s ∈ f.support, f.coeff s • (T ^ s) x := by + rw [aeval_def, eval₂_eq_sum, Polynomial.sum_def, _root_.sum_apply] + refine Finset.sum_congr rfl fun s _ ↦ ?_ + rw [Algebra.algebraMap_eq_smul_one, smul_mul_assoc, one_mul, _root_.smul_apply] + +lemma aeval_end_apply_eq_sum (T : (ℕ →₀ ℂ) →ₗ[ℂ] (ℕ →₀ ℂ)) (f : ℂ[X]) (x : ℕ →₀ ℂ) : + aeval T f x = ∑ s ∈ f.support, f.coeff s • (T ^ s) x := by + rw [aeval_def, eval₂_eq_sum, Polynomial.sum_def, LinearMap.sum_apply] + refine Finset.sum_congr rfl fun s _ ↦ ?_ + rw [Algebra.algebraMap_eq_smul_one, smul_mul_assoc, one_mul, LinearMap.smul_apply] + +/-- `f(T) x` lies in the span of the orbit of `x`. -/ +lemma aeval_mem_orbitSpan {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] (T : E →L[ℂ] E) + (f : ℂ[X]) (x : E) : aeval T f x ∈ orbitSpan T x := by + rw [aeval_apply_eq_sum] + exact Submodule.sum_mem _ fun s _ ↦ Submodule.smul_mem _ _ (Submodule.subset_span ⟨s, rfl⟩) + +/-- On finite sequences, `f(T)` is `f(T₀)`. -/ +lemma aeval_readOp_toL1 (h : GrowthHyp d) (f : ℂ[X]) (g : ℕ →₀ ℂ) : + aeval (readOp h) f (toL1 g) = toL1 (aeval (T₀ d) f g) := by + rw [aeval_apply_eq_sum, aeval_end_apply_eq_sum, map_sum] + exact Finset.sum_congr rfl fun s _ ↦ by rw [readOp_pow_toL1, map_smul] + +/-- `f(T)` applied to the coordinates of `y` gives the coordinates of `f y`. -/ +lemma aeval_readOp_toL1_toCoord (h : GrowthHyp d) (f y : ℂ[X]) : + aeval (readOp h) f (toL1 (toCoord d y)) = toL1 (toCoord d (f * y)) := by + rw [aeval_readOp_toL1, aeval_T₀_toCoord h.toPartitionHyp] + +/-- **(S1)**: `‖f(T) e - f(T) Qₘ e‖ ≤ α |f| ‖e‖` when every power of `f` lies in `Kₘ,₁`. -/ +lemma norm_aeval_sub_le (h : GrowthHyp d) {m : ℕ} (hm : 2 < m) (f : ℂ[X]) + (hf : ∀ s ∈ f.support, InK1 d m s) (e : L1) : + ‖aeval (readOp h) f e - aeval (readOp h) f (readQ h hm.le e)‖ ≤ alpha * pnorm f * ‖e‖ := by + rw [aeval_apply_eq_sum, aeval_apply_eq_sum, ← Finset.sum_sub_distrib] + refine (norm_sum_le _ _).trans ?_ + rw [pnorm_eq_sum_of_subset f le_rfl, Finset.mul_sum, Finset.sum_mul] + refine Finset.sum_le_sum fun s hs ↦ ?_ + rw [← smul_sub, norm_smul] + have hs' : ‖(readOp h ^ s) e - (readOp h ^ s) (readQ h hm.le e)‖ ≤ alpha * ‖e‖ := by + have heq : (readOp h ^ s) e - (readOp h ^ s) (readQ h hm.le e) = + (readOp h ^ s - readOp h ^ s * readQ h hm.le) e := rfl + rw [heq] + exact (ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul_of_nonneg_right (lemma4 h hm (hf s hs)) (norm_nonneg _)) + calc ‖f.coeff s‖ * ‖(readOp h ^ s) e - (readOp h ^ s) (readQ h hm.le e)‖ + ≤ ‖f.coeff s‖ * (alpha * ‖e‖) := mul_le_mul_of_nonneg_left hs' (norm_nonneg _) + _ = alpha * ‖f.coeff s‖ * ‖e‖ := by ring + +lemma pnorm_X_pow_mul (k : ℕ) (p : ℂ[X]) : pnorm (X ^ k * p) = pnorm p := by + induction k with + | zero => simp + | succ k ih => rw [pow_succ', mul_assoc, pnorm_X_mul, ih] + +/-- `xᵃ (Pₙ v) = Pₙ₊ₐ (xᵃ v)`. -/ +lemma X_pow_mul_ptrunc (a n : ℕ) (v : ℂ[X]) : X ^ a * ptrunc n v = ptrunc (n + a) (X ^ a * v) := by + induction a with + | zero => simp + | succ a ih => + rw [pow_succ', mul_assoc, ih, X_mul_ptrunc, ← mul_assoc, ← pow_succ', add_assoc] + +/- ### `|Qₘ e| ≤ Aₘ ‖e‖` -/ + +/-- `|Qₘ e| ≤ C ‖e‖` when every `|Qₘ fₗ| ≤ C`. -/ +lemma pnorm_qPoly_le (h : PartitionHyp d) {m : ℕ} (hm : 2 ≤ m) {C : ℝ} + (hC : ∀ l, pnorm (qPolyBasis d m l) ≤ C) (e : L1) : pnorm (qPoly h m e) ≤ C * ‖e‖ := by + set N := (m - 1) * seqA d m + have hsum : ∀ j, Summable fun l ↦ ‖e l‖ * ‖(qPolyBasis d m l).coeff j‖ := fun j ↦ by + simpa only [norm_mul] using summable_norm_qTerm h m j e + rw [pnorm_eq_sum_of_subset _ (support_subset_range (natDegree_qPoly_le h m e))] + calc ∑ j ∈ Finset.range (N + 1), ‖(qPoly h m e).coeff j‖ + ≤ ∑ j ∈ Finset.range (N + 1), ∑' l, ‖e l‖ * ‖(qPolyBasis d m l).coeff j‖ := by + refine Finset.sum_le_sum fun j _ ↦ ?_ + rw [coeff_qPoly h hm, qCoeffCLM_apply] + refine (norm_tsum_le_tsum_norm ?_).trans_eq ?_ + · simpa only [norm_mul] using hsum j + · simp only [norm_mul] + _ = ∑' l, ∑ j ∈ Finset.range (N + 1), ‖e l‖ * ‖(qPolyBasis d m l).coeff j‖ := + (Summable.tsum_finsetSum fun j _ ↦ hsum j).symm + _ ≤ ∑' l, ‖e l‖ * C := by + refine Summable.tsum_le_tsum (fun l ↦ ?_) (summable_sum fun j _ ↦ hsum j) + ((summable_norm e).mul_right C) + rw [← Finset.mul_sum] + refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) + rw [← pnorm_eq_sum_of_subset _ (support_subset_range (natDegree_qPolyBasis_le h hm l))] + exact hC l + _ = C * ‖e‖ := by rw [tsum_mul_right, norm_eq_tsum, mul_comm] + +lemma capA_mono (h : GrowthHyp d) {n m : ℕ} (hn : 1 ≤ n) (hnm : n ≤ m) : capA d n ≤ capA d m := + alpha_rpow_le (Real.sqrt_le_sqrt (by exact_mod_cast seqA_mono h hn hnm)) + +lemma capB_le_capA_succ (h : GrowthHyp d) {m : ℕ} (hm : 1 ≤ m) : capB d m ≤ capA d (m + 1) := by + have := h.rpow_b_add_two_le m hm; unfold capB capA; linarith + +/-- `α x² ≤ α^{√x}` from `α x² < α^{√x/4}`. -/ +lemma rpow_quarter_le (x : ℝ) : alpha ^ (Real.sqrt x / 4) ≤ alpha ^ Real.sqrt x := + alpha_rpow_le (by linarith [Real.sqrt_nonneg x]) + +lemma two_mul_le_capA (h : GrowthHyp d) {n : ℕ} (hn : 1 ≤ n) : 2 * (seqA d n : ℝ) ≤ capA d n := by + have h1 := h.rpow_a n hn + have ha : (1 : ℝ) ≤ seqA d n := by exact_mod_cast h.one_le_a n + have h2 := rpow_quarter_le (seqA d n : ℝ) + have h3 : 2 * (seqA d n : ℝ) ≤ alpha * (seqA d n : ℝ) ^ 2 := by rw [alpha]; nlinarith + unfold capA + linarith + +lemma one_add_le_capA_succ (h : GrowthHyp d) {n : ℕ} (hn : 1 ≤ n) : + 1 + (seqB d n : ℝ) ≤ capA d (n + 1) := by + have h1 := h.rpow_b n hn + have hb : (1 : ℝ) ≤ seqB d n := by exact_mod_cast (h.two_le_b n).trans' (by norm_num) + have h2 := rpow_quarter_le (seqB d n : ℝ) + have h3 := capB_le_capA_succ h hn + have h4 : 1 + (seqB d n : ℝ) ≤ alpha * (seqB d n : ℝ) ^ 2 := by rw [alpha]; nlinarith + unfold capB at h3 + linarith + +/-- The exponent numerator `(2r - 1)c - 2i` is at most `c` once `i ≥ (r - 1)c`. -/ +lemma weight_numer_le {c r i : ℕ} (hr : 1 ≤ r) (hi : (r - 1) * c ≤ i) : + (2 * (r : ℝ) - 1) * c - 2 * i ≤ c := by + have hi' : ((r - 1 : ℕ) : ℝ) * c ≤ i := by exact_mod_cast hi + rw [Nat.cast_sub hr, Nat.cast_one] at hi' + linarith + +lemma pnorm_C_mul_X_pow (c : ℂ) (i : ℕ) : pnorm (C c * X ^ i) = ‖c‖ := by + rw [pnorm_C_mul, pnorm_X_pow, mul_one] + +lemma pnorm_one : pnorm (1 : ℂ[X]) = 1 := by rw [← C_1, pnorm_C, norm_one] + +/-- **`|fₗ| ≤ Aₘ`** for `l ≤ (m - 1)aₘ`. -/ +lemma pnorm_fPoly_le (h : GrowthHyp d) {m l : ℕ} (hm : 2 ≤ m) (hl : l ≤ (m - 1) * seqA d m) : + pnorm (fPoly d l) ≤ capA d m := by + have hP := h.toPartitionHyp + rcases Nat.eq_zero_or_pos l with rfl | hl0 + · rw [fPoly_zero, pnorm_one]; exact one_le_capA m + have hB := block_mem hP hl0 + rcases hbl : block d l with ⟨n, r, k⟩ + rw [hbl] at hB + obtain ⟨hlo, hhi, hX⟩ := Block.mem_level hP hB + have hr1 := hB.1 + have hrn := hB.2.1 + dsimp only at hlo hhi hX hr1 hrn + have hvm : (m - 1) * seqA d m ≤ seqV d m := by + unfold seqV; exact Nat.mul_le_mul_left _ (Nat.le_add_right _ _) + have hnm : n ≤ m := by + by_contra hmn + have := seqV_mono hP (show m ≤ n - 1 by omega) + omega + -- At level `m` itself only `J` and `I` blocks reach below `(m - 1)aₘ`. + have hLK : k = .L ∨ k = .K → n < m := fun hk ↦ by + by_contra hnm' + obtain rfl : n = m := by omega + rcases hX.1 hl with h' | h' <;> rcases hk with hk | hk <;> rw [hk] at h' <;> simp at h' + have ha : 0 < seqA d n := hP.one_le_a n + cases k with + | J => + rw [fPoly_of_J hP hB rfl, pnorm_C_mul_X_pow, Complex.norm_real, + Real.norm_of_nonneg (weight_pos _ _ _).le] + have hJ := hB.2.2.1 + dsimp only at hJ + calc weight (seqA d n) r l ≤ alpha ^ (Real.sqrt (seqA d n) / 2) := + weight_le_half ha (weight_numer_le hr1 (by omega)) + _ ≤ capA d n := alpha_rpow_le (by linarith [Real.sqrt_nonneg (seqA d n : ℝ)]) + _ ≤ capA d m := capA_mono h (by omega) hnm + | L => + have hnm' := hLK (Or.inl rfl) + rw [fPoly_of_L hP hB rfl, pnorm_C_mul_X_pow, Complex.norm_real, + Real.norm_of_nonneg (weight_pos _ _ _).le] + have hL := hB.2.2.1 + dsimp only at hL + have hb : 0 < seqB d n := lt_of_le_of_lt (Nat.zero_le _) (hP.a_lt_b n) + have hle : (r - 1) * seqB d n ≤ l := by omega + calc weight (seqB d n) r l ≤ alpha ^ (Real.sqrt (seqB d n) / 2) := + weight_le_half hb (weight_numer_le hr1 hle) + _ ≤ capB d n := alpha_rpow_le (by linarith [Real.sqrt_nonneg (seqB d n : ℝ)]) + _ ≤ capA d (n + 1) := capB_le_capA_succ h (by omega) + _ ≤ capA d m := capA_mono h (by omega) (by omega) + | I => + rw [fPoly_of_I hP hB rfl, pnorm_C_mul, Complex.norm_natCast] + have hX2 : pnorm (X ^ l - X ^ (l - seqA d n) : ℂ[X]) ≤ 2 := by + refine (pnorm_sub_le _ _).trans ?_ + rw [pnorm_X_pow, pnorm_X_pow]; norm_num + have hmono : (seqA d (n - r) : ℝ) ≤ seqA d n := by + exact_mod_cast seqA_mono h (by omega) (by omega) + have ha0 : (0 : ℝ) ≤ seqA d (n - r) := Nat.cast_nonneg _ + calc (seqA d (n - r) : ℝ) * pnorm (X ^ l - X ^ (l - seqA d n) : ℂ[X]) + ≤ seqA d n * 2 := mul_le_mul hmono hX2 (pnorm_nonneg _) (Nat.cast_nonneg _) + _ ≤ capA d n := by linarith [two_mul_le_capA h (n := n) (by omega)] + _ ≤ capA d m := capA_mono h (by omega) hnm + | K => + have hnm' := hLK (Or.inr rfl) + rw [fPoly_of_K hP hB rfl] + calc pnorm (X ^ l - C (seqB d n : ℂ) * X ^ (l - seqB d n)) + ≤ 1 + seqB d n := by + refine (pnorm_sub_le _ _).trans ?_ + rw [pnorm_X_pow, pnorm_C_mul_X_pow, Complex.norm_natCast] + _ ≤ capA d (n + 1) := one_add_le_capA_succ h (by omega) + _ ≤ capA d m := capA_mono h (by omega) (by omega) + +lemma pnorm_qPolyBasis_le_capA (h : GrowthHyp d) {m : ℕ} (hm : 2 ≤ m) (l : ℕ) : + pnorm (qPolyBasis d m l) ≤ capA d m := by + have hA := two_mul_le_capA h (n := m) (by omega) + have ha : (0 : ℝ) ≤ seqA d m := Nat.cast_nonneg _ + rcases le_or_gt l ((m - 1) * seqA d m) with hl | hl + · rw [qPolyBasis_of_le hl]; exact pnorm_fPoly_le h hm hl + · rw [qPolyBasis_of_gt h.toPartitionHyp hl] + split_ifs + · rw [smul_eq_C_mul, pnorm_C_mul_X_pow, norm_neg, Complex.norm_natCast]; linarith + · rw [pnorm_zero]; linarith + +/-- **`|Qₘ e| ≤ Aₘ`** for `‖e‖ ≤ 1`. -/ +lemma pnorm_qPoly_le_capA (h : GrowthHyp d) {m : ℕ} (hm : 2 ≤ m) {e : L1} (he : ‖e‖ ≤ 1) : + pnorm (qPoly h.toPartitionHyp m e) ≤ capA d m := by + refine (pnorm_qPoly_le h.toPartitionHyp hm (pnorm_qPolyBasis_le_capA h hm) e).trans ?_ + have := one_le_capA (d := d) m + nlinarith [norm_nonneg e] + +/- ### The norm estimates of (S2), (S3), (S5) -/ + +/-- (S2): `‖xʲ‖ ≤ 1` on `((m - 1)aₘ + bₘ, 2(m - 1)aₘ + bₘ] ⊂ Lₘ,₂`. -/ +lemma nrm_xPow_le_one_of_L2 (h : GrowthHyp d) {m j : ℕ} (hm : 3 ≤ m) + (hj1 : (m - 1) * seqA d m + seqB d m < j) (hj2 : j ≤ 2 * ((m - 1) * seqA d m) + seqB d m) : + nrm (xPow d j) ≤ 1 := by + have hP := h.toPartitionHyp + have hab := h.a_small m (by omega) + have h8 : 8 * m * seqA d m = 8 * (m * seqA d m) := by ring + have hm1 : m * seqA d m = (m - 1) * seqA d m + seqA d m := by + rw [show m = m - 1 + 1 by omega, add_one_mul, Nat.add_sub_cancel] + have hB : (⟨m, 2, .L⟩ : Block).Mem d j := by + refine ⟨by dsimp only; omega, by dsimp only; omega, ?_, ?_⟩ + · dsimp only; omega + · dsimp only; omega + rw [nrm_xPow_of_L hP hB rfl] + dsimp only + refine inv_le_one_of_one_le₀ (one_le_alpha_rpow ?_) + have hb : (0 : ℝ) < seqB d m := by exact_mod_cast lt_of_le_of_lt (Nat.zero_le _) hab + refine div_nonneg ?_ (Real.sqrt_nonneg _) + have : (2 * j : ℝ) ≤ 3 * seqB d m := by exact_mod_cast (by omega : 2 * j ≤ 3 * seqB d m) + push_cast + linarith + +/-- (S2): `‖F - Pₐ F‖ ≤ |F|` when every `‖xʲ‖ ≤ 1` for `a < j ≤ deg F`. -/ +lemma nrm_toCoord_sub_ptrunc_le {F : ℂ[X]} {a N : ℕ} (hF : F.natDegree ≤ N) + (hx : ∀ j, a < j → j ≤ N → nrm (xPow d j) ≤ 1) : + nrm (toCoord d (F - ptrunc a F)) ≤ pnorm F := by + have hdeg : (F - ptrunc a F).natDegree ≤ N := by + rw [natDegree_le_iff_coeff_eq_zero] + intro j hj + have hj' : N < j := by exact_mod_cast hj + rw [coeff_sub, coeff_ptrunc, coeff_eq_zero_of_natDegree_lt (by omega)] + simp + rw [toCoord_apply, Polynomial.sum_over_range' _ (f := fun i c ↦ c • xPow d i) + (fun n ↦ zero_smul ℂ _) (N + 1) (by omega)] + refine (nrm_sum_le _ _).trans ?_ + rw [pnorm_eq_sum_of_subset F (support_subset_range hF)] + refine Finset.sum_le_sum fun j hj ↦ ?_ + rw [nrm_smul, coeff_sub, coeff_ptrunc] + split_ifs with hja + · simp + · rw [sub_zero] + exact (mul_le_mul_of_nonneg_left (hx j (by omega) + (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj))) (norm_nonneg _)).trans_eq (mul_one _) + +/-- (S3): for `aₘ ≤ j ≤ (m - 1)aₘ`, `j + bₘ ∈ Kₘ,₁`, so `bₘ⁻¹ x^{j+bₘ} - xʲ = bₘ⁻¹ f_{j+bₘ}`. -/ +lemma toCoord_K_diff (h : PartitionHyp d) {m j : ℕ} (hm : 2 ≤ m) (hj1 : seqA d m ≤ j) + (hj2 : j ≤ (m - 1) * seqA d m) : + toCoord d (C (seqB d m : ℂ)⁻¹ * X ^ (j + seqB d m) - X ^ j) = + (seqB d m : ℂ)⁻¹ • single (j + seqB d m) 1 := by + have hB : (⟨m, 1, .K⟩ : Block).Mem d (j + seqB d m) := by + refine ⟨by dsimp only; omega, by dsimp only; omega, ?_, ?_⟩ + · dsimp only; omega + · dsimp only; omega + have hb : (seqB d m : ℂ) ≠ 0 := by + exact_mod_cast (lt_of_le_of_lt (Nat.zero_le _) (h.a_lt_b m)).ne' + rw [single_eq_of_K h hB rfl] + dsimp only + rw [Nat.add_sub_cancel, map_sub, toCoord_C_mul, toCoord_X_pow, toCoord_X_pow, smul_sub, + smul_smul, inv_mul_cancel₀ hb, one_smul] + +/-- (S3): `‖(bₘ⁻¹ x^{bₘ} - 1) w‖ ≤ bₘ⁻¹ |w|` for `w` with powers in `[aₘ, (m - 1)aₘ]`. -/ +lemma nrm_toCoord_K_mul_le (h : PartitionHyp d) {m : ℕ} (hm : 2 ≤ m) {w : ℂ[X]} + (hw0 : ∀ j < seqA d m, w.coeff j = 0) (hwdeg : w.natDegree ≤ (m - 1) * seqA d m) : + nrm (toCoord d ((C (seqB d m : ℂ)⁻¹ * X ^ seqB d m - 1) * w)) ≤ + (seqB d m : ℝ)⁻¹ * pnorm w := by + set c := (m - 1) * seqA d m + have hterm : ∀ j ∈ Finset.range (c + 1), + nrm (toCoord d ((C (seqB d m : ℂ)⁻¹ * X ^ seqB d m - 1) * monomial j (w.coeff j))) ≤ + (seqB d m : ℝ)⁻¹ * ‖w.coeff j‖ := fun j hj ↦ by + rw [Finset.mem_range] at hj + by_cases hja : j < seqA d m + · rw [hw0 j hja, monomial_zero_right, mul_zero, map_zero, nrm_zero, norm_zero, mul_zero] + · rw [show (C (seqB d m : ℂ)⁻¹ * X ^ seqB d m - 1) * monomial j (w.coeff j) = + C (w.coeff j) * (C (seqB d m : ℂ)⁻¹ * X ^ (j + seqB d m) - X ^ j) by + rw [← C_mul_X_pow_eq_monomial, pow_add]; ring, + toCoord_C_mul, toCoord_K_diff h hm (by omega) (by omega), nrm_smul, nrm_smul, + nrm_single, norm_one, mul_one, norm_inv, Complex.norm_natCast, mul_comm] + rw [as_sum_range' w (c + 1) (by omega), Finset.mul_sum, map_sum] + refine (nrm_sum_le _ _).trans ?_ + rw [← as_sum_range' w (c + 1) (by omega), pnorm_eq_sum_of_subset w (support_subset_range hwdeg), + Finset.mul_sum] + exact Finset.sum_le_sum hterm + +/-- (S5) by Lemma 1 (b): `‖x^{(m-k+1)aₘ} - x⁰‖ ≤ 2 / aₖ₋₁`. -/ +lemma nrm_xPow_sub_zero_le (h : GrowthHyp d) {m k : ℕ} (hk : 2 ≤ k) (hkm : k ≤ m) : + nrm (xPow d ((m - k + 1) * seqA d m) - xPow d 0) ≤ 2 / seqA d (k - 1) := by + have hB : (⟨m, m - k + 1, .I⟩ : Block).Mem d ((m - k + 1) * seqA d m) := by + refine ⟨by dsimp only; omega, by dsimp only; omega, by dsimp only; omega, ?_⟩ + dsimp only; omega + have := nrm_xPow_sub_of_I h hB + rwa [Nat.sub_self, show m - (m - k + 1) = k - 1 by omega] at this + +end ReadL1 diff --git a/LeanPool/projects/read-l1.yaml b/LeanPool/projects/read-l1.yaml new file mode 100644 index 0000000000..8dca06ce6a --- /dev/null +++ b/LeanPool/projects/read-l1.yaml @@ -0,0 +1,51 @@ +slug: read-l1 +title: Read's invariant-subspace counterexample on complex ℓ¹ +summary: >- + Constructs a bounded linear operator on the complex Banach space ℓ¹ with + no nontrivial closed invariant subspace. The proof follows Wiesław Śliwa's + explicit form of Charles Read's construction. It verifies a concrete + growth sequence, constructs the operator first on finitely supported + sequences, and proves that every nonzero vector is cyclic. The development + includes the bounded extension from coordinate images, polynomial + truncation estimates, and the finite-rank projections used in the proof. +branch: functional analysis +entry_module: LeanPool.ReadL1 +authors: + - Zayn Blore +source: + title: An explicit example concerning the invariant subspace problem for Banach spaces + doi: 10.1216/RMJ-2010-40-2-627 + read_doi: 10.1112/blms/17.4.305 + url: https://github.com/zblore/fc-read-l1/tree/e8f632e26409119168b0b57c3e20ab0510c1a914 + github_repo: zblore/fc-read-l1 + commit: e8f632e26409119168b0b57c3e20ab0510c1a914 + announcement_url: https://leanprover.zulipchat.com/#narrow/channel/583339-AI-authored-projects/topic/Read.27s.20operator.20on.20.E2.84.93.C2.B9/near/642205346 + announcement_date: '2026-11-20T12:45:17Z' + palomar_url: https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-19-000030 + statement_url: https://github.com/google-deepmind/formal-conjectures/blob/40a8592cb6f7e96cb9a8275d96bb3e013feeb1dc/FormalConjectures/Wikipedia/InvariantSubspaceProblem.lean +license: Apache-2.0 +status: verified +provenance: AI +provenance_evidence: Zayn Blore reports using Claude Code to draft the Lean proofs. +main_declarations: + - ReadL1.invariant_subspace_problem_l1 + - ReadL1.norm_readOp_le + - ReadL1.theorem7Hyp_dRead +main_results: + - declaration: ReadL1.invariant_subspace_problem_l1 + informal: >- + A bounded complex-linear operator on ℓ¹ has no closed invariant + subspace other than zero and the whole space. + - declaration: ReadL1.norm_readOp_le + informal: >- + Under the construction's growth inequalities, the operator extending + Śliwa's rule for the finitely supported vectors has norm at most eight. + - declaration: ReadL1.theorem7Hyp_dRead + informal: A concrete sequence satisfies all the growth inequalities used in the cyclicity proof. +tags: + - banach-spaces + - operator-theory + - invariant-subspaces +msc: + - 47A15 + - 46B45