cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /AllocatedModularForecastRationalSource.lean
cfahlgren1's picture
download
raw
8.79 kB
import OAI.Combinatorics.Progressions.Sampling.FixedSpatialKernelNativeForecastSource
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 (b : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b 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 allocatedModularForecastRationalSourceModulusNeZero : 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'⟩
section RationalSite
variable (selected : A → Σ j : Fin m, Fin (n j))
variable (hselected : Function.Injective selected)
variable [siteInst1 : ∀ a, Nonempty (B ⟨(selected a).1, Sum.inr (selected a).2⟩)]
variable (T : ℕ)
variable (hT : 0 < T)
variable {D P p v δ E : ℝ}
variable (hD : AllocatedComparisonDimensions (G := G) B Empty
(fun _ : Fin m => ((Finset.univ : Finset (Finset Empty)) : Type)) D)
variable (hP : 1 ≤ P)
variable (hp : 0 ≤ p)
variable (hv : 0 ≤ v)
variable (hPp : P ≤ Real.exp p)
variable (hTv : (T : ℝ) ≤ Real.exp v)
variable (hδ : 0 < δ)
variable (hE : 0 ≤ E)
variable (hδE : δ⁻¹ ≤ Real.exp E)
variable (hsize : T ≤ S.value)
variable (hR1 : ∀ a, R (selected a).1 ≤ 1)
variable (hsmall : ∀ a, basisAxisScale (b (selected a).1) (selected a).2 ≤
S.value ^ ((selected a).1.val + 1))
variable (hgrid : ∀ a, allocatedGridAxis (I := I) U b S.value
⟨(selected a).1, Sum.inr (selected a).2⟩)
variable (c : ∀ a, BoundedCoefficientExponent (LayerSamplerVariables G I n B)
((selected a).1.val + 1) → ℤ)
variable (hc : ∀ a d, c a d ∈ (allocatedLayerIntegerPMFs B U b hR hσ S
(selected a).1 (selected a).2 d).support)
variable (hσ1 : ∀ a, σ (selected a).1 ≤ 1)
variable (L : ℝ≥0)
variable (hL : LipschitzWith L Real.smoothTransition)
variable (hprimitive : scalarCubePrimitiveEnvelope Empty L 1 0 T ≤ P)
variable (hB : ∀ a, uniformSpectrumBlockCount (selected a).1.val 1 ((selected a).1.val + 1) ≤
Fintype.card (B ⟨(selected a).1, Sum.inr (selected a).2⟩))
variable {Pscale : ℝ}
variable (hPscale : 0 ≤ Pscale)
variable (hRinv : ∀ a, (R (selected a).1)⁻¹ ≤ Real.exp Pscale)
variable (hslots : ∀ a, ((layerIntegerPrincipalSlots (G := G) B
(selected a).1 (selected a).2).card : ℝ) ≤ Pscale)
include selected hselected siteInst1 T hT hD hP hp hv hPp hTv hδ hE hδE hsize
hR1 hsmall hgrid c hc hσ1 L hL hprimitive hB hPscale hRinv hslots
hm hPr hDmod hbad
theorem exists_allocated_modular_forecast_rational_source :
let law := principalTupleWeights (α := Empty) B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) (allocatedPrincipalSides_pos B U b S)
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 < law.mass (Finset.univ.filter (fun y => principalResidueLabel (orderOf χ.val) y = r))}
letI : ∀ χ : Ch, Fintype (Pos χ) := fun χ => by
dsimp only [Pos]
infer_instance
let scale := fun a => basisAxisScale (b (selected a).1) (selected a).2
let W := 4 * (Pscale + 8)
let O := allocatedInactiveJointSiteLog m D p v (E + D * W) + W
∃ e : ∀ χ : Ch, Pos χ → A → ScalarSiteExpansion.{0,0} (Finset Empty),
(∀ χ r a, (e χ r a).Bounds (Real.exp O) (Real.exp O) (Real.exp O)
⟨Real.exp O, Real.exp_nonneg _⟩ (Real.exp (allocatedInactiveSupportLog D))) ∧
(∑ χ : Ch, ∑ t : Σ r : Pos χ, ∀ a, (e χ r a).Term,
‖forecastSiteMixtureCoefficient (e χ)
(fun r => (law.mass (Finset.univ.filter
(fun y => principalResidueLabel (orderOf χ.val) y = r.val)) : ℂ) *
forecastInactiveCharacterCoefficient poly N pRat χ.val r.val) t‖)
≤ (T : ℝ) ^ (Fintype.card Out + 1) * Real.exp (Fintype.card A * O) ∧
∀ (x : G → IntegerScalarCubeBox Empty S.value) (z : A → ℤ) (outPoint : Out → ZMod N),
‖(rationalInactiveForecast law (fun _ => pRat)
(forecastInactiveFixedOutput B U b S selected c x)
(fun y t j => integerLongPolynomialOutput poly (fun k => (y k.1 k.2 : ℤ)) N t j)
N (∏ a, (scale a : ℝ)) (fun a _ => z a) outPoint : ℂ) -
(∑ χ : Ch, (∑ r : Pos χ, (law.mass (Finset.univ.filter
(fun y => principalResidueLabel (orderOf χ.val) y = r.val)) : ℂ) *
forecastInactiveCharacterCoefficient poly N pRat χ.val r.val *
siteFamilyEval (e χ r) (fun _ => z) (fun _ a => (z a : ℝ) / scale a)) *
star (χ.val outPoint))‖ ≤
(∏ a, (scale a : ℝ)) * law.fiberMean (forecastInactiveFixedOutput B U b S selected c x)
(fun a _ => z a) (fun _ => 1) * (Cdecay / T) +
(T : ℝ) ^ (Fintype.card Out + 1) * δ := 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 b 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_forecast_rational_site_approximation B U b S hR hσ
selected hselected poly N pRat T hT hD hP hp hv hPp hTv hδ hE hδE
hsize hR1 hsmall hgrid c hc hσ1 L hL hprimitive hB hPscale hRinv hslots
hCdecay hPdecay hdecay
end RationalSite
end Erdos3.VectorPolynomial
end
end OAI

Xet Storage Details

Size:
8.79 kB
·
Xet hash:
079f4c2c067b661b31f437af4ade60ac44ab744b3d81c1044a01e6552fad4dbb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.