Download data/lean/OAI/NumberTheory/Ostmann/Arithmetic/ArithmeticPatternPriorRate.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.16 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Ostmann/Arithmetic/ArithmeticPatternPriorRate.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/Ostmann/Arithmetic/ArithmeticPatternPriorRate.lean
-
curl -L -o ArithmeticPatternPriorRate.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Ostmann/Arithmetic/ArithmeticPatternPriorRate.lean
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 | |