Buckets:
cfahlgren1/math / lean /OAI /NumberTheory /Ostmann /Arithmetic /BulkLogWeightedKernelPairComparison.lean
| import OAI.NumberTheory.Ostmann.Arithmetic.BulkKernelPairComparison | |
| import OAI.NumberTheory.Ostmann.Arithmetic.MovingBulkLogFactors | |
| namespace OAI | |
| /-! # Joint prime comparison retaining the initial bulk logarithmic cutoffs -/ | |
| namespace Ostmann | |
| open MeasureTheory | |
| open scoped Classical BigOperators SchwartzMap ComplexConjugate | |
| noncomputable def bulkLogWeightedKernelPairBudget (Ο : π’(β, β)) (V lo hi : β) | |
| (n d r e t rlog : β) (B D Dlog : β) : β := | |
| ((2 * (((2 ^ n + (2 ^ n - 1)) * (2 * (n * d + e) + r)) + | |
| ((3 * (2 ^ n - 1) + 2 * 2 ^ n) * (2 * (n * d + e) + r))) + t * rlog + 1 : β) : β) * | |
| ((movingFourierVariationBudget Ο V lo hi n * (2 * B + D * (Real.exp 2 - 1)) ^ (2 ^ n - 1)) ^ 2 * | |
| (2 + Dlog * (Real.exp 2 - 1)) ^ t) | |
| /-- The signed pair keeps every initial bulk log-sum factor. Its additional | |
| root and variation costs are explicit, and independent of the prime values. -/ | |
| theorem PublishedProgressionInput.bulk_log_weighted_kernel_pair_prime_comparison (P : PublishedProgressionInput) | |
| {Ο : Type*} (value : Ο β β) (i : Ο) (childBound pivotBound : β β β) | |
| {n : β} (T : Bool β MovingSlotData Ο n) (hT : β b, (T b).CompensationAbsent i) | |
| (L R : Polynomial β) (Ο : π’(β, β)) (X lo hi V : β) (hlo : 1 β€ lo) (hhi : lo β€ hi) | |
| (hV : β b, (T b).Frequencies (fun s => |(s : β)| β€ V)) (Ο : β β β) | |
| (G : β β β) (B D : β) (hB : 0 β€ B) (hD : 0 β€ D) | |
| (hΟ : β x, |Ο x| β€ B) (hlip : β x y, |Ο x - Ο y| β€ D * |x - y|) | |
| (hout : β x, 1 β€ |x| β Ο x = 0) | |
| (d r e : β) (hsize : β b, (T b).SizeLE d) (hregular : β b, (T b).RegularLengthLE r) | |
| (hL : L.natDegree β€ e) (hR : R.natDegree β€ e) | |
| {t : β} (slots : Fin t β List Ο) (cb Dlog : β) (hDlog : 0 β€ Dlog) | |
| (hloglip : β x y, |logCellProfile x - logCellProfile y| β€ Dlog * |x - y|) | |
| (rlog : β) (hslots : β j, (slots j).length β€ rlog) | |
| {Q q a : β} (hQ : 2 β€ Q) (hq : 1 β€ q) (hqQ : q β€ Q) (ha : a.Coprime q) | |
| (u v : β) (hu : 1 β€ u) (huv : u β€ v) (hshort : v β€ u + 1) : | |
| let H := fun y => ((β j, bulkLogCutoffWeight | |
| (Function.update value i (Real.exp y)) cb (slots j) : β) : β) * realValueKernelPair (Function.update value i (Real.exp y)) childBound pivotBound T | |
| Ο X lo hi hlo hhi Ο G (L.eval (Real.exp y)) (R.eval (Real.exp y)) | |
| βcomplexPrimeInterval q a u v H - | |
| β« y in Set.Ioc u v, H y * (selectedPrimeLogDensity P Q q a y : β)β β€ | |
| bulkLogWeightedKernelPairBudget Ο V lo hi n d r e t rlog B D Dlog * bulkPrimeErrorFactor P Q u := by | |
| dsimp only | |
| let F (b : Bool) := bulkSmoothFactors value i (T b) L R Ο X lo hi hlo hhi Ο G B D hB hD hΟ hlip | |
| let W := movingFourierVariationBudget Ο V lo hi n * | |
| (2 * B + D * (Real.exp 2 - 1)) ^ (2 ^ n - 1) | |
| let A := (2 ^ n + (2 ^ n - 1)) * (2 * (n * d + e) + r) | |
| let B' := (3 * (2 ^ n - 1) + 2 * 2 ^ n) * (2 * (n * d + e) + r) | |
| obtain β¨S, hS, hrSβ© := bulkSmoothFactors_root_cuts value i (T false) L R Ο X lo hi hlo hhi | |
| Ο G B D hB hD hΟ hlip d r e (hsize false) (hregular false) hL hR | |
| obtain β¨U, hU, hrUβ© := bulkSmoothFactors_root_cuts value i (T true) L R Ο X lo hi hlo hhi | |
| Ο G B D hB hD hΟ hlip d r e (hsize true) (hregular true) hL hR | |
| obtain β¨S', hS', hcSβ© := bulkFullSupport_root_cuts value i childBound pivotBound (T false) | |
| (hT false) L R X lo hi d r e (hsize false) (hregular false) hL hR | |
| obtain β¨U', hU', hcUβ© := bulkFullSupport_root_cuts value i childBound pivotBound (T true) | |
| (hT true) L R X lo hi d r e (hsize true) (hregular true) hL hR | |
| let E := bulkLogCutoffFactors value i cb Dlog hDlog hloglip slots | |
| obtain β¨Eroots, hEroots, hrEβ© := bulkLogCutoffFactors_roots value i cb Dlog hDlog hloglip slots rlog hslots | |
| let V' := ((S βͺ U) βͺ (S' βͺ U')) βͺ Eroots | |
| have hcard : V'.card + 1 β€ 2 * (A + B') + t * rlog + 1 := by | |
| simp only [MovingSlotData.bulkNodePolynomials_length] at hS hU | |
| have hsu := Finset.card_union_le S U | |
| have hsu' := Finset.card_union_le S' U' | |
| have hall := Finset.card_union_le (S βͺ U) (S' βͺ U') | |
| have hextra := Finset.card_union_le ((S βͺ U) βͺ (S' βͺ U')) Eroots | |
| dsimp only [A, B', V'] | |
| omega | |
| let w := fun z => realValueSupportFlag (Function.update value i z) childBound pivotBound | |
| (T false) X lo hi (L.eval z) (R.eval z) * | |
| conj (realValueSupportFlag (Function.update value i z) childBound pivotBound | |
| (T true) X lo hi (L.eval z) (R.eval z)) | |
| have hw (z : β) : βw zβ β€ 1 := by | |
| rw [show w z = _ * conj _ from rfl, norm_mul, Complex.norm_conj] | |
| exact (mul_le_mul (realValueSupportFlag_norm _ _ _ _ _ _ _ _ _) | |
| (realValueSupportFlag_norm _ _ _ _ _ _ _ _ _) (norm_nonneg _) (by norm_num)).trans_eq (by norm_num) | |
| have hconst (x y : β) (hxy : rootCellCode V' x = rootCellCode V' y) : w x = w y := by | |
| have hsxy := rootCellCode_eq_of_subset S' V' | |
| (Finset.subset_union_left.trans (Finset.subset_union_right.trans Finset.subset_union_left)) x y hxy | |
| have huxy := rootCellCode_eq_of_subset U' V' | |
| (Finset.subset_union_right.trans (Finset.subset_union_right.trans Finset.subset_union_left)) x y hxy | |
| change _ * conj _ = _ * conj _ | |
| rw [hcS x y hsxy, hcU x y huxy] | |
| have hroots (j) (z) (hz : z β ((Fin.append | |
| (pairedPolynomialFactors (F false) (F true)) E) j).polynomial.derivative.roots) : z β V' := by | |
| revert hz | |
| refine Fin.addCases ?_ ?_ j | |
| Β· intro j hj | |
| simp only [Fin.append_left] at hj | |
| exact Finset.mem_union_left _ (Finset.mem_union_left _ | |
| (pairedPolynomialFactors_roots (F false) (F true) S U hrS hrU j z hj)) | |
| Β· intro j hj | |
| simp only [Fin.append_right] at hj | |
| exact Finset.mem_union_right _ (hrE j z hj) | |
| have hbudget0 : smoothPolynomialBudget (pairedPolynomialFactors (F false) (F true)) β€ W ^ 2 := by | |
| rw [pairedPolynomialFactors_budget, pow_two] | |
| have h0 := bulkSmoothFactors_budget value i (T false) L R Ο X lo hi V hlo hhi | |
| (hV false) Ο G B D hB hD hΟ hlip | |
| have h1 := bulkSmoothFactors_budget value i (T true) L R Ο X lo hi V hlo hhi | |
| (hV true) Ο G B D hB hD hΟ hlip | |
| exact mul_le_mul h0 h1 (smoothPolynomialBudget_nonneg _) ((smoothPolynomialBudget_nonneg _).trans h0) | |
| have hbudget : smoothPolynomialBudget (Fin.append | |
| (pairedPolynomialFactors (F false) (F true)) E) β€ | |
| W ^ 2 * (2 + Dlog * (Real.exp 2 - 1)) ^ t := by | |
| have happ : smoothPolynomialBudget (Fin.append | |
| (pairedPolynomialFactors (F false) (F true)) E) = | |
| smoothPolynomialBudget (pairedPolynomialFactors (F false) (F true)) * | |
| smoothPolynomialBudget E := by | |
| unfold smoothPolynomialBudget | |
| rw [Fin.prod_univ_add] | |
| simp only [Fin.append_left, Fin.append_right] | |
| have hE : smoothPolynomialBudget E = (2 + Dlog * (Real.exp 2 - 1)) ^ t := | |
| bulkLogCutoffFactors_budget value i cb Dlog hDlog hloglip slots | |
| rw [happ, β hE] | |
| exact mul_le_mul_of_nonneg_right hbudget0 (smoothPolynomialBudget_nonneg E) | |
| have he (z : β) : w z * smoothPolynomialWeight (Fin.append (pairedPolynomialFactors (F false) (F true)) E) z = | |
| ((β j, bulkLogCutoffWeight (Function.update value i z) cb (slots j) : β) : β) * | |
| realValueKernelPair (Function.update value i z) childBound pivotBound T | |
| Ο X lo hi hlo hhi Ο G (L.eval z) (R.eval z) := by | |
| have happ : smoothPolynomialWeight (Fin.append (pairedPolynomialFactors (F false) (F true)) E) z = | |
| smoothPolynomialWeight (pairedPolynomialFactors (F false) (F true)) z * smoothPolynomialWeight E z := by | |
| simp only [smoothPolynomialWeight, Fin.prod_univ_add, Fin.append_left, Fin.append_right] | |
| rw [happ, pairedPolynomialFactors_weight, | |
| show smoothPolynomialWeight E z = _ from bulkLogCutoffFactors_weight value i cb Dlog hDlog hloglip slots z] | |
| simp only [F, bulkSmoothFactors_value value i (T false) (hT false) L R Ο X lo hi hlo hhi Ο G B D hB hD hΟ hlip hout z, | |
| bulkSmoothFactors_value value i (T true) (hT true) L R Ο X lo hi hlo hhi Ο G B D hB hD hΟ hlip hout z] | |
| simp only [w, realValueKernelPair, realValueKernel, map_mul] | |
| ring | |
| have h := P.gated_smooth_prime_all_roots hQ hq hqQ ha u v hu huv hshort | |
| (Fin.append (pairedPolynomialFactors (F false) (F true)) E) V' hroots w 1 (by norm_num) hw hconst | |
| simp only [he, one_mul] at h | |
| apply h.trans | |
| change (V'.card + 1 : β) * smoothPolynomialBudget (Fin.append (pairedPolynomialFactors (F false) (F true)) E) * | |
| bulkPrimeErrorFactor P Q u β€ ((2 * (A + B') + t * rlog + 1 : β) : β) * | |
| (W ^ 2 * (2 + Dlog * (Real.exp 2 - 1)) ^ t) * bulkPrimeErrorFactor P Q u | |
| apply mul_le_mul_of_nonneg_right _ (by | |
| dsimp only [bulkPrimeErrorFactor] | |
| have := P.errorConstant_nonneg | |
| positivity) | |
| exact mul_le_mul (by exact_mod_cast hcard) hbudget (smoothPolynomialBudget_nonneg _) (by positivity) | |
| end Ostmann | |
| end OAI | |
Xet Storage Details
- Size:
- 8.93 kB
- Xet hash:
- 87aab8d3c221fea48b02234d031e33cb7767fa48ad5cd5ed0c106de502a968b6
Β·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.