Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /AllocatedSlicedModularForecastContinuousSource.lean
| import OAI.Combinatorics.Progressions.Sampling.AllocatedForecastShortRawDependence | |
| namespace OAI | |
| section | |
| namespace Erdos3.VectorPolynomial | |
| open scoped BigOperators Classical NNReal Matrix | |
| variable {m : ℕ} {G : Type*} [Fintype G] | |
| variable {I : Fin m → Type*} [∀ j, Fintype (I j)] [∀ j, DecidableEq (I j)] | |
| variable {n : Fin m → ℕ} | |
| variable (B : LayerSamplerAxis I n → Type*) [∀ a, Fintype (B a)] [∀ a, DecidableEq (B a)] | |
| variable {J : Fin m → Type*} [∀ j, Fintype (J j)] | |
| variable (U : ∀ j, Submodule ℝ (J j → ℝ)) | |
| variable (basis : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ) | |
| variable {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U basis R σ) | |
| variable (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j) | |
| variable {A : Type*} [Fintype A] | |
| attribute [local instance] ScalarSiteExpansion.termFinite | |
| variable {X : Type*} [Fintype X] | |
| variable {Eout : Fin m → Type*} [∀ j, Fintype (Eout j)] | |
| variable (inactive : LayerSamplerAxis I n → Prop) | |
| variable (hm : 0 < m) | |
| variable (Pr : Finset ℕ) [∀ q : Pr, NeZero q.val] | |
| variable (Aexp epres : ℕ → ℕ) (hPr : ∀ q ∈ Pr, q.Prime) | |
| variable (Dmod : ℕ) | |
| variable (hDmod : Fintype.card X + ∑ j : Fin m, (Fintype.card (Eout j) + n j) ≤ Dmod) | |
| variable (noise : Option (LayerSamplerVariables G I n B) × X → ℤ) | |
| variable (rdeck : ∀ j : Fin m, | |
| BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1) → Eout j → ℤ) | |
| variable (projection : ∀ j, AllocatedDegreeActiveAxis inactive j → | |
| BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1) → ℤ) | |
| variable {Lrank : ℕ} | |
| variable (spatial : Fin Lrank ↪ G) (kernel : ∀ j : Fin m, Fin Lrank × Fin (j.val + 1) ↪ G) | |
| variable (block : ∀ j, ∀ a : AllocatedDegreeActiveAxis inactive j, Fin Lrank ↪ B ⟨j, a.val⟩) | |
| variable (Rbad : ℕ) | |
| variable (hbad : (∏ q : Pr, q.val ^ allocatedCongruenceBadDepth | |
| inactive noise rdeck projection spatial kernel block Pr Aexp | |
| (modularForecastRankConstant m Dmod : ℝ) q.val) ≤ Rbad) | |
| variable (base : X → ℤ) | |
| variable (origin : ∀ q : Pr, LayerSamplerLongVariables inactive G B → ZMod (q.val ^ Aexp q.val)) | |
| local notation "Vact" => LayerSamplerLongVariables inactive G B | |
| local notation "Out" => Sigma (AllocatedCongruenceRankOutput X Eout inactive) | |
| local notation "N" => (∏ q : Pr, (Subtype.val q) ^ Aexp (Subtype.val q)) | |
| local notation "poly" => allocatedForecastPolynomial inactive base noise rdeck projection | |
| local notation "pRat" => crtPolynomialInputLaw (fun q : Pr => (Subtype.val q)) | |
| (fun q : Pr => Aexp (Subtype.val q)) (fun q : Pr => epres (Subtype.val q)) | |
| (primePower_crt_coprime (fun q : Pr => (Subtype.val q)) (fun q : Pr => Aexp (Subtype.val q)) | |
| (fun q => hPr (Subtype.val q) (Subtype.property q)) Subtype.val_injective) origin | |
| local notation "Cmod" => (modularForecastRankConstant m Dmod : ℝ) | |
| local notation "Pdecay" => modularRankDecayExponent m Cmod | |
| local notation "Cdecay" => (((Rbad * ∏ q : Pr, (Subtype.val q) ^ epres (Subtype.val q) : ℕ) : ℝ) ^ | |
| (modularRankDecayExponent m Cmod * modularRankChargeFactor m)) | |
| local instance modularSourceModulusNeZero : NeZero N := | |
| ⟨Finset.prod_ne_zero_iff.mpr (fun q _ => pow_ne_zero _ (NeZero.ne q.val))⟩ | |
| local instance (χ : AddChar (Out → ZMod N) ℂ) : NeZero (orderOf χ) := | |
| ⟨(isOfFinOrder_of_finite χ).orderOf_pos.ne'⟩ | |
| variable (H step : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ) | |
| variable (c : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH : ∀ t, 0 < H t) | |
| variable (hsubset : ∀ t, integerProgressionSupport (c t) (step t : ℤ) (H t) ⊆ | |
| Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ)) | |
| include hm hPr hDmod hbad in | |
| theorem exists_allocated_sliced_modular_forecast_continuous_source | |
| (selected : A → Σ j : Fin m, Fin (n j)) | |
| (hselected : Function.Injective selected) | |
| (T : ℕ) (hT : 0 < T) | |
| (δ P : ℝ) (Hchild : ℕ) (hδ : 0 < δ) | |
| (hreg : ∀ a, (∃ b0 v0, | |
| allocatedPrincipalSides B U basis S ⟨⟨(selected a).1,Sum.inr (selected a).2⟩,b0,v0⟩ < Hchild) ∨ | |
| ((∀ b v, δ * allocatedPrincipalSides B U basis S ⟨⟨(selected a).1,Sum.inr (selected a).2⟩,b,v⟩ ≤ | |
| (H ⟨⟨(selected a).1,Sum.inr (selected a).2⟩,b,v⟩ : ℝ)) ∧ | |
| (∀ b v, 0 < step ⟨⟨(selected a).1,Sum.inr (selected a).2⟩,b,v⟩))) | |
| (hsmall : ∀ a, basisAxisScale (basis (selected a).1) (selected a).2 ≤ | |
| S.value ^ ((selected a).1.val + 1)) | |
| (hgrid : ∀ a, allocatedGridAxis (I := I) U basis S.value ⟨(selected a).1, Sum.inr (selected a).2⟩) | |
| (coefficients : ∀ a, BoundedCoefficientExponent (LayerSamplerVariables G I n B) | |
| ((selected a).1.val + 1) → ℤ) | |
| (hcoefficients : ∀ a d, coefficients a d ∈ (allocatedLayerIntegerPMFs B U basis hR hσ S | |
| (selected a).1 (selected a).2 d).support) | |
| (hσ1 : ∀ a, σ (selected a).1 ≤ 1) | |
| (L : ℝ≥0) (hL : LipschitzWith L Real.smoothTransition) | |
| (hP : 1 ≤ P) (hsP : scalarCubePrimitiveEnvelope Empty L 1 0 T ≤ P) | |
| (hstride : ∀ a b v, ((step ⟨⟨(selected a).1,Sum.inr (selected a).2⟩,b,v⟩ * T : ℕ) : ℝ) ≤ P) | |
| (hB : ∀ a, uniformSpectrumBlockCount (selected a).1.val 1 ((selected a).1.val + 1) ≤ | |
| Fintype.card (B ⟨(selected a).1, Sum.inr (selected a).2⟩)) | |
| (Cactual δout Q Nt Vt Ct Ht : ℝ) (Lt : ℝ≥0) | |
| (hCactual : 0 ≤ Cactual) (hCtNonneg : 0 ≤ Ct) (hδout : 0 < δout) (hQ : 0 ≤ Q) | |
| (hnumerics : ∀ q : ℕ, 0 < q → q ≤ T → | |
| forecastInactiveSlicedSiteNumerics (G := G) B (R := R) selected q Hchild | |
| δ P Cactual δout Q Nt Vt Ct Ht Lt) | |
| {SmoothCoord : Type*} [PseudoMetricSpace SmoothCoord] | |
| (density : SmoothCoord → ℝ) (Hdensity : ℝ) (hHdensity : 1 ≤ Hdensity) | |
| (hdensity : ∀ y, ‖density y‖ ≤ Hdensity) | |
| (densityLip : ℝ≥0) (hdensityLip : LipschitzWith densityLip density) : | |
| let p := principalTupleWeights (α := Empty) B (layerSamplerDegree I n) H hH | |
| let map := containedProgressionTupleMap B (layerSamplerDegree I n) | |
| (allocatedPrincipalSides B U basis S) H step c (allocatedPrincipalSides_pos B U basis S) hsubset | |
| let law := p.fiberLaw map | |
| let Ch := Finset.univ.filter (fun χ : AddChar (Out → ZMod N) ℂ => orderOf χ ≤ T) | |
| let Pos := fun χ : Ch => | |
| {r : PrincipalTupleIndex B (layerSamplerDegree I n) → Option Empty → ZMod (orderOf χ.val) // | |
| 0 < p.mass (Finset.univ.filter (fun y => principalResidueLabel (orderOf χ.val) y = r))} | |
| letI : ∀ χ : Ch, Fintype (Pos χ) := fun χ => by | |
| dsimp only [Pos] | |
| infer_instance | |
| let height := fun a => basisAxisScale (basis (selected a).1) (selected a).2 | |
| let weight := fun (χ : Ch) (r : Pos χ) => | |
| (p.mass (Finset.univ.filter (fun y => principalResidueLabel (orderOf χ.val) y = r.val)) : ℂ) * | |
| forecastInactiveCharacterCoefficient poly N pRat χ.val | |
| (progressionPrincipalResidue B (layerSamplerDegree I n) step c (orderOf χ.val) r.val) | |
| ∃ e : ∀ χ : Ch, Pos χ → A → ScalarSiteExpansion.{0,0} (Finset Empty), | |
| (∀ χ r a, (e χ r a).Bounds Nt Vt Ct Lt Ht) ∧ | |
| let Term := Σ χ : Ch, Σ r : Pos χ, ∀ a, (e χ r a).Term | |
| let coeff := fun t : Term => (Hdensity : ℂ) * forecastSiteMixtureCoefficient (e t.1) (weight t.1) t.2 | |
| let factor := fun (outPoint : Out → ZMod N) (t : Term) (z : A → ℤ) | |
| (y : SmoothCoord × (A → ℝ)) => | |
| (star (t.1.val outPoint) * ((density y.1 : ℂ) / (Hdensity : ℂ))) * | |
| siteFamilyFactor (e t.1 t.2.1) t.2.2 ∅ | |
| (fun a => (z a : ZMod ((e t.1 t.2.1 a).period (t.2.2 a)))) y.2 | |
| (∑ t : Term, ‖coeff t‖) ≤ Hdensity * ((T : ℝ) ^ (Fintype.card Out + 1) * Ct ^ Fintype.card A) ∧ | |
| (∀ outPoint t z y, ‖factor outPoint t z y‖ ≤ 1) ∧ | |
| (∀ outPoint t z, LipschitzWith (densityLip + Fintype.card A * Lt) (factor outPoint t z)) ∧ | |
| ∀ (x : G → IntegerScalarCubeBox Empty S.value) (z : A → ℤ) | |
| (outPoint : Out → ZMod N) (y : SmoothCoord), | |
| ‖(density y : ℂ) * (rationalInactiveForecast law (fun _ => pRat) | |
| (forecastInactiveFixedOutput B U basis S selected coefficients x) | |
| (fun y t j => integerLongPolynomialOutput poly (fun k => (y k.1 k.2 : ℤ)) N t j) | |
| N (∏ a, (height a : ℝ)) (fun a _ => z a) outPoint : ℂ) - | |
| ∑ t : Term, coeff t * factor outPoint t z (y, fun a => (z a : ℝ) / height a)‖ ≤ | |
| Hdensity * (Cactual ^ Fintype.card A * (Cdecay / T) + | |
| (T : ℝ) ^ (Fintype.card Out + 1) * δout) := by | |
| have hCdecay : 0 ≤ Cdecay := Real.rpow_nonneg (Nat.cast_nonneg _) _ | |
| have hPdecay : ((Fintype.card Out + 2 : ℕ) : ℝ) ≤ Pdecay := | |
| allocatedCongruenceForecastRankConstant_dimension inactive hm Dmod hDmod | |
| have hdecay (y : PrincipalIntegerTuples B (layerSamplerDegree I n) Empty | |
| (allocatedPrincipalSides B U basis S)) (χ : AddChar (Out → ZMod N) ℂ) := | |
| allocatedForecastPolynomial_crt_decay_of_bad_product inactive noise rdeck projection spatial kernel block | |
| hm Pr Aexp epres hPr Cmod (Nat.cast_nonneg _) Rbad hbad base origin | |
| (fun k => (y k.1 k.2 : ℤ)) χ | |
| exact exists_forecastInactive_sliced_capped_continuous_rational_source | |
| B U basis hR hσ S H step c hH hsubset selected hselected poly N pRat T hT | |
| δ P Hchild hδ hreg hsmall hgrid coefficients hcoefficients hσ1 L hL hP hsP | |
| hstride hB Cactual δout Q Nt Vt Ct Ht Lt hCactual hCtNonneg hδout hQ hnumerics | |
| hCdecay hPdecay hdecay density Hdensity hHdensity hdensity densityLip hdensityLip | |
| end Erdos3.VectorPolynomial | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 9.69 kB
- Xet hash:
- ac7ceabac7188cc0d89fc39226a5c5752c48f3e68ac5575d712180bd0dd7ef4d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.