math / data /lean /OAI /NumberTheory /Ostmann /Arithmetic /ArithmeticPatternPriorRate.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.16 kB
import OAI.NumberTheory.Ostmann.Arithmetic.MovingPatternCostRate
import OAI.NumberTheory.Ostmann.Construction.SpectatorBulkScale
import OAI.NumberTheory.Ostmann.Arithmetic.ArithmeticPrimeNormRate
namespace OAI
/-! # A depth-independent cost for all original equality patterns -/
namespace Ostmann
open Filter
/-- The original internal-prior cost has an absolute coefficient of `2^n m`
once the depth is chosen. The fixed pattern count is absorbed only as `L`
tends to infinity; no constant exponential in the depth is charged per slot. -/
theorem movingPattern_prior_cost_rate (k : β„•) (hk : 0 < k)
(C Ξ΅ : ℝ) (hC : 1 ≀ C) (hΞ΅ : 0 < Ξ΅) (hdepth : 8 * C ≀ (k : ℝ) ^ 3) :
βˆ€αΆ  L : ℝ in atTop, βˆ€ n : β„•, n ≀ k β†’
(2 : ℝ) ^ ((4 * n * 2 ^ n) ^ 2) *
(max 2 (Real.exp (C * L))) ^ (4 * n * 2 ^ n) ≀
Real.exp ((2 ^ n : β„•) * spectatorBulkCount k L + Ξ΅ * spectatorBulkCount k L) := by
let J := 4 * k * 2 ^ k
let A : ℝ := (J ^ 2 : β„•) * Real.log 2
have hkR : 0 < (k : ℝ) := by exact_mod_cast hk
have hm := (spectatorBulkCount_tendsto k hk).eventually
(eventually_ge_atTop (A / Ξ΅))
filter_upwards [hm, eventually_ge_atTop (1 : ℝ),
eventually_ge_atTop (4 / (k : ℝ) ^ 4)] with L hm hL hscale n hn
have hL0 : 0 ≀ L := by linarith
have hscale' : 4 ≀ (k : ℝ) ^ 4 * L := by
simpa only [mul_comm] using
(div_le_iffβ‚€ (by positivity : 0 < (k : ℝ) ^ 4)).mp hscale
have hbulk := spectatorBulkCount_half k L hscale'
have hsmall : A ≀ Ξ΅ * spectatorBulkCount k L := by
simpa only [mul_comm] using (div_le_iffβ‚€ hΞ΅).mp hm
have hJ : 4 * n * 2 ^ n ≀ J := by
dsimp only [J]
exact Nat.mul_le_mul (Nat.mul_le_mul_left 4 hn) (Nat.pow_le_pow_right (by decide) hn)
have hcount : (((4 * n * 2 ^ n) ^ 2 : β„•) : ℝ) * Real.log 2 ≀ A := by
apply mul_le_mul_of_nonneg_right _ (Real.log_nonneg (by norm_num))
exact_mod_cast Nat.pow_le_pow_left hJ 2
have hkc : 8 * C * (k : ℝ) ≀ (k : ℝ) ^ 4 := by
calc
_ ≀ (k : ℝ) ^ 3 * k := mul_le_mul_of_nonneg_right hdepth hkR.le
_ = _ := by ring
have hkcL := mul_le_mul_of_nonneg_right hkc hL0
have hprior : 4 * (n : ℝ) * C * L ≀ (spectatorBulkCount k L : ℝ) := by
have hnR : (n : ℝ) ≀ k := by exact_mod_cast hn
have hnk := mul_le_mul_of_nonneg_right hnR (mul_nonneg (by linarith : 0 ≀ C) hL0)
nlinarith
have hprior' := mul_le_mul_of_nonneg_left hprior
(show (0 : ℝ) ≀ ((2 ^ n : β„•) : ℝ) by positivity)
have hCL : 1 ≀ C * L := one_le_mul_of_one_le_of_one_le hC hL
have he : (2 : ℝ) ≀ Real.exp (C * L) := by linarith [Real.add_one_le_exp (C * L)]
rw [max_eq_right he, ← Real.exp_log (by norm_num : (0 : ℝ) < 2),
← Real.exp_nat_mul, ← Real.exp_nat_mul, ← Real.exp_add]
apply Real.exp_le_exp.mpr
push_cast at hcount hprior' ⊒
nlinarith
/-- The retained numerical norm, including all original equality-pattern
weights, has the absolute bulk constant `log 12 + 1`. -/
theorem arithmetic_prime_pattern_budget_rate (ψ : SchwartzMap ℝ β„‚) (n k : β„•)
(hk : 0 < k) (hn : n ≀ k) (B Cfreq Cprior Ξ΅ : ℝ)
(hCfreq : 0 ≀ Cfreq) (hCprior : 1 ≀ Cprior) (hΞ΅ : 0 < Ξ΅)
(hdepth : 8 * Cprior ≀ (k : ℝ) ^ 3) :
βˆ€αΆ  L : ℝ in atTop, let m := spectatorBulkCount k L
βˆƒ D : ℝ, 0 ≀ D ∧
(βˆ€ q : β„•, q β‰  0 β†’ (q : ℝ) ≀ Real.exp (2 * Cfreq * m) β†’
(q.divisors.card : ℝ) ≀ D) ∧
βˆ€ N V : β„•, βˆ€ Ξ” : ℝ, (N : ℝ) ≀ Real.exp (Cfreq * m) β†’
(V : ℝ) ≀ Real.exp (Ξ” + Real.sqrt (4 * m)) β†’
((2 : ℝ) ^ ((4 * n * 2 ^ n) ^ 2) *
(max 2 (Real.exp (Cprior * L))) ^ (4 * n * 2 ^ n)) *
((((SchwartzMap.seminorm ℝ 0 0 ψ / Real.sqrt (Real.exp Ξ”)) ^ (2 ^ n) *
B ^ (2 ^ n - 1)) ^ 2 *
(((2 : ℝ) ^ (2 ^ n * m) * 4 * 3 ^ (2 ^ n * m)) *
((8 * D ^ 4 * (1 + Real.log N) ^ 3) ^ (2 ^ n - 1) *
(2 * (V : ℝ)) ^ (2 * 2 ^ n)))) * 2 ^ (2 ^ n * m)) ≀
Real.exp ((2 ^ n : β„•) * Ξ” + (Real.log 12 + 1) * (2 ^ n : β„•) * m + Ξ΅ * m) := by
filter_upwards [movingPattern_prior_cost_rate k hk Cprior (Ξ΅ / 4) hCprior
(by positivity) hdepth,
arithmetic_prime_fourier_budget_rate ψ n k hk B Cfreq (Ρ / 4) hCfreq (by positivity),
(spectatorBulkCount_tendsto k hk).eventually (eventually_ge_atTop (2 / Ξ΅))]
with L hprior hrate hm
dsimp only
obtain ⟨D, hD, hdiv, hcost⟩ := hrate
refine ⟨D, hD, hdiv, ?_⟩
intro N V Ξ” hN hV
have hp := hprior n hn
have hc := hcost N V Ξ” hN hV
have htwo : (2 : ℝ) ≀ Real.exp ((Ξ΅ / 2) * spectatorBulkCount k L) := by
have hscale := (div_le_iffβ‚€ hΞ΅).mp hm
have he := Real.add_one_le_exp ((Ξ΅ / 2) * spectatorBulkCount k L)
nlinarith
have hprod := mul_le_mul hp hc (by positivity) (Real.exp_nonneg _)
have hmain := mul_le_mul_of_nonneg_left hprod (by norm_num : (0 : ℝ) ≀ 2)
apply le_trans (le_of_eq (by ring)) hmain |>.trans
apply (mul_le_mul_of_nonneg_right htwo (by positivity)).trans_eq
simp only [← Real.exp_add]
congr 1
ring
end Ostmann
end OAI