cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /SharedWidthPreparedFiniteSlicedForecastModelFromPrepared.lean
cfahlgren1's picture
download
raw
44.2 kB
import OAI.Combinatorics.Progressions.Sampling.PrecenterForecastNativePartners
import OAI.Combinatorics.Progressions.Sampling.SharedWidthPreparedShortForecastSourceModelAttachment
namespace OAI
section
namespace Erdos3.VectorPolynomial
open MeasureTheory Module Submodule BooleanCubeKernel
open scoped Classical BigOperators NNReal TensorProduct Matrix
variable {m : ℕ} {G : Type} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type} [∀ j, Fintype (I j)]
variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type)
variable [∀ a, Fintype (B a)]
variable {J : Fin m → Type} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable {R σ : Fin m → ℝ} (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j)
variable (S : LayerSamplerScale (G := G) B U basis R σ)
variable {nX : ℕ}
local notation "rowSets" => (fun j : Fin m => boundedBooleanJetRows (Fin (0 + 1)) (Fin.val j + 1))
attribute [local instance 2000] fullBooleanRowSetFintype
attribute [local instance] ScalarSiteExpansion.termFinite
local notation "selectedRows" => (fun j : Fin m => (rowSets j : Type))
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset (Fin (0 + 1))))
variable (selection : Fin (0 + 1) ↪ G) (stride N : Fin nX → ℕ)
variable (Pdetect : Polynomial ℕ) (uSource pModel pSlice : ℝ) (Vtail : Fin m → ℝ≥0)
local notation "pDetect" => allocatedModelTestLog uSource pModel
local notation "qDetect" => allocatedModelTestLog uSource pModel
local notation "Ctail" => (4 * ∏ j, earlyConstantDensityCap (Fintype.card (I j)) (n j) (R j) (Vtail j))
local notation "Kslice" => Real.exp (pSlice * Fintype.card (LayerSamplerVariables G I n B))
variable (τ u p forecastCap : ℝ)
local notation "α" => forecastAugmentedUnitThreshold u p Kslice (max 1 Ctail) forecastCap
variable {P : ℝ}
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν j)]
variable [MeasurableSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [BorelSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [CompactSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "jetHaar" => Measure.pi (fun j =>
@Measure.pi (selectedRows j) _ (fullBooleanRowSetFintype (0 + 1) (Fin.val j + 1)) _
(fun _ : selectedRows j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
variable {Eout : Fin m → Type} [∀ j, Fintype (Eout j)]
variable {Dmod Lrank : ℕ}
variable {spatial : Fin Lrank ↪ G}
variable {kernel : ∀ j : Fin m, Fin Lrank × Fin (j.val + 1) ↪ G}
variable {block : ∀ j, ∀ a : AllocatedDegreeActiveAxis
(allocatedShortAxis (I := I) U basis S.value) j, Fin Lrank ↪ B ⟨j, a.val⟩}
variable {Tsp : Type} [Fintype Tsp]
variable {spatialEquiv : G ≃ Fin nX ⊕ (Fin nX ⊕ Tsp)} {Wsp Lsp δslice : ℝ}
variable {A : Type} [Fintype A] (selected : A → Σ j : Fin m, Fin (n j))
variable (setup : ActualFixedSpatialForecastSetup (X := Fin nX) (Eout := Eout)
B U basis S Dmod selected τ δslice)
variable (bWforecast : ∀ j, Basis (Eout j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (qSliced : ActualFixedSpatialSlicedForecastNumerics setup)
variable (Good : ∀ (poly : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ)),
(∀ j ex, coefficients (poly j) ex ∈ U j) →
∀ (width : Option (LayerSamplerVariables G I n B) × Fin nX → ℝ)
(bases : Finset (Fin nX → ℤ)),
(CoefficientTorus (K := LayerSamplerVariables G I n B) U →
FiniteProbabilityWeights (bases × rectangularWeightIndices 0 width 1)) → Prop)
def SharedWidthPreparedUniversalSlicedForecastModelExtensionInterface
(Pchart Qstride Pmaster Plate _pGain Pphysical coarseTarget extraRequired : ℝ) : Prop :=
∀ (_hstride : ∀ i, 0 < stride i) (_hstrideBound : ∀ i, (stride i : ℝ) ≤ Real.exp Qstride)
(C : Fin m → ℝ) (_hC : ∀ j, 0 ≤ C j) (_hCbound : ∀ j, C j ≤ Real.exp Pchart)
(_hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(Cforward : Fin m → ℝ≥0)
(_hforward : ∀ j v, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j) v‖ ≤ Cforward j * ‖v‖)
(_hForward : ∀ j, (Cforward j : ℝ) ≤ Real.exp Pchart)
(_hVtail : ∀ j, (Vtail j : ℝ) ≤ Real.exp Pchart)
(_hVactual : ∀ j, 0 ≤ mixedDensityCovolumeRatio (euclideanSubspace (U j)) (basis j) ∧
mixedDensityCovolumeRatio (euclideanSubspace (U j)) (basis j) ≤ Vtail j)
(_hprofile : (probabilityProfileLipschitz : ℝ) ≤ Real.exp Pchart)
(_hcutoff : (normalizedSiteCutoffBound : ℝ) ≤ Real.exp Pchart),
∀ {E : ℝ},
∀ (hτSpatial : 0 < τ), τ⁻¹ ≤ Real.exp Pphysical →
τ ≤ 1 / 2 → (nX : ℝ) * τ ≤ 1 / 2 →
let r := preparedModularGeneralDetectorResources (preparedModularGeneralDetectorConstants m 0) (0 + 1) Pmaster Plate
let W := allocatedPhysicalRootBudget B U basis S (fun _ => 0)
∀ {ξn : ℝ} (hξn : 0 < ξn)
(hξle : ξn ≤ normalizedTupleNarrowWidth (Fin nX)
(PrincipalTupleIndex B (layerSamplerDegree I n)) selection
(allocatedDetectedKernelCutoff 0 G (Fintype.card (LayerSamplerVariables G I n B)) Pdetect pDetect qDetect (α / 2))
Pphysical coarseTarget),
ξn⁻¹ ≤ Real.exp Plate →
let hW := allocatedPhysicalRootBudget_nonneg B U basis S (fun _ => 0)
let hξone : ξn ≤ 1 := hξle.trans (min_le_left _ _)
let Pmarginal := r.Pproj
let modelRequired := max r.required ((max Pmarginal E + preparedCenteredMarginalExponent m) ^
preparedCenteredMarginalExponent m)
let required := max modelRequired extraRequired
∀ (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) (Fin nX) stride))
(poly : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ))
(_hp : ∀ j, DegreeLE (1 : (Fin nX) → ℕ) (j.val + 1) (poly j))
(hmem : ∀ j ex, coefficients (poly j) ex ∈ U j)
{Rrank : ℝ},
(∀ i, Real.exp required ≤ (N i : ℝ)) →
(∀ j, HasLayerSamplingRank (j.val + 1) (fun i => (N i : ℝ)) Rrank (U j) (poly j)) →
Real.exp required ≤ Rrank →
let V := narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξn N
cells.Nonempty →
let bases := trimmedIntegerBox N (spatialTrimMargin τ N)
let Z := selectedJointDensityMass bases stride cells V
(allocatedJointBaseDensity B U basis hb o hR hσ S (Fin nX) poly hmem)
∃ (hN : ∀ i, 0 < N i) (hbases : bases.Nonempty) (hbox : (integerBox N).Nonempty)
(hmass : 0 < ∑' z, selectedResidueSmoothWeight stride cells V z)
(_hnormalizer : |Z - 1| ≤ Real.exp (-r.E) ∧ Z ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧ 0 < Z ∧ Z⁻¹ ≤ 2)
(_hmargin : ∀ i, 2 * spatialTrimMargin τ N i ≤ N i),
let Path := bases × rectangularWeightIndices 0 V 1
let Zcenter := fun center => selectedJointDensityMass bases stride cells V
(allocatedCenteredJointDensity B U basis hb o hR hσ S poly hmem center)
∃ hnormalizerCenter : ∀ center,
|Zcenter center - 1| ≤ Real.exp (-E) ∧
Zcenter center ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧
0 < Zcenter center ∧ (Zcenter center)⁻¹ ≤ 2,
let centeredLaw := fun center => selectedJointFiniteLaw bases hbases stride cells V
(narrowTrimmedSpatialWidths_pos hW hτSpatial hξn N hN) hmass
(allocatedCenteredJointDensity B U basis hb o hR hσ S poly hmem center)
(allocatedCenteredJointDensity_nonneg B U basis hb o hR hσ S poly hmem center) (hnormalizerCenter center).2.2.1
∃ hweight : ∀ z, Measurable (fun center => (centeredLaw center).weight z),
Good poly hmem V bases centeredLaw ∧
let pathLaw := centeredFiniteMarginal μ centeredLaw hweight
let sides := Sum.elim (fun _ : G => S.value) (allocatedPrincipalSides B U basis S)
let Sites := integerBox sides
let e : Sites → LayerSamplerVariables G I n B → ℤ := Subtype.val
letI : Nonempty Sites := by
have hpos (k : LayerSamplerVariables G I n B) : 0 < sides k := by
cases k with
| inl g => exact S.positive
| inr j => exact allocatedPrincipalSides_pos B U basis S j
let : ∀ k, NeZero (sides k) := fun k => ⟨(hpos k).ne'⟩
exact (integerBox_nonempty sides).to_subtype
let hrootSum := fun t : Sites => allocatedParameterBox_root_bound B U basis S t
let physical := narrowPhysicalSiteMap (G := G)
(J := PrincipalTupleIndex B (layerSamplerDegree I n)) hW hτSpatial hξone N hN
_hmargin e hrootSum
(FiniteProbabilityWeights.uniformFinset (integerBox N) hbox).excessMass
(pathLaw.siteLaw physical) Ctail ≤ 6 * positiveProjectionAccuracy E ∧
∀ {Tests : Path → Type} [∀ z, Nonempty (Tests z)]
{Ldetect : ∀ z, Tests z → Type} [∀ z j, LieRing (Ldetect z j)] [∀ z j, LieAlgebra ℚ (Ldetect z j)]
{dims : ∀ z, Tests z → ℕ}
[∀ z j, TopologicalSpace (ℝ ⊗[ℚ] Ldetect z j)]
[∀ z j, IsTopologicalAddGroup (ℝ ⊗[ℚ] Ldetect z j)]
[∀ z j, ContinuousSMul ℝ (ℝ ⊗[ℚ] Ldetect z j)] [∀ z j, T2Space (ℝ ⊗[ℚ] Ldetect z j)]
(Ddetect : ∀ z j, RationalFilteredNilmanifold (Ldetect z j) 0 (dims z j))
(Vdetect : ∀ z j, (Ddetect z j).Niltest (fun _ : LayerSamplerVariables G I n B => 1))
(slices : ∀ z, Tests z → Finset Sites)
(cdetect : ∀ z, Tests z → LayerSamplerVariables G I n B → ℤ)
(stepdetect : ∀ z, Tests z → ℕ)
(Hdetect : ∀ z, Tests z → LayerSamplerVariables G I n B → ℕ),
(∀ z j, 0 < stepdetect z j) →
(∀ z j, (slices z j).image e = commonStrideBox (cdetect z j) (stepdetect z j) (Hdetect z j)) →
(∀ z j, IsDenseCommonStrideBox
(Sum.elim (fun _ : G => S.value) (allocatedPrincipalSides B U basis S)) pSlice ((slices z j).image e)) →
(Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Pdetect.eval₂ (Nat.castRingHom ℝ) qDetect →
(∀ z j, (Vdetect z j).ComplexityLE (Pdetect.eval₂ (Nat.castRingHom ℝ) qDetect)) →
(∀ z j, ((Vdetect z j).normBound : ℝ) ≤ 1) →
let budget := r.nativeBudget
let tests := fun z j t => star ((Vdetect z j).eval
(commonStrideIndex (cdetect z j) (stepdetect z j) (e t)))
u + 2 * p + max (max budget (3 * qSliced.Pnative + 3))
(2 * u + 4 * p + qSliced.massLog + 20) + 32 ≤ E →
let ForecastPath := ActualFixedSpatialSlicedAdmissiblePath
(hR := hR) (hσ := hσ) (spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp) (physicalN := N) setup qSliced
∃ data : Option ForecastPath → ActualForecastData N poly
qSliced.Pnative qSliced.massLog qSliced.capLog qSliced.E,
(∀ path, (data (some path)).target =
path.slice.target selected setup.hBactive o bWforecast hb poly hmem setup.κ ∧
(data (some path)).centerConstant = fun j => (path.slice.path.center j).val) ∧
(data none).target = (fun _ => 0) ∧
(data none).centerConstant = (fun _ _ => 0) ∧
(∀ f (poly' : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ))
(hm' : ∀ j d, coefficients (poly' j) d ∈ U j) (v : Fin nX → ℤ),
‖(match f with
| none => 0
| some path => path.slice.targetAt selected setup.hBactive o bWforecast hb
poly' hm' setup.κ v) -
∑ t, (data f).coefficient t * ((data f).twists t).eval N
(fun j => subtractConstant ((data f).centerConstant j) (poly' j)) v‖ ≤
Real.exp (-qSliced.E)) ∧
let forecast := fun f => (data f).target
∀ (input : integerBox N → ℂ), (∀ v, ‖input v‖ ≤ Real.exp p) →
let commonBudget := max budget (3 * qSliced.Pnative + 3)
let Qmodel := max commonBudget (2 * u + 4 * p + qSliced.massLog + 20)
∃ (nterms : ℕ) (_ : 0 < nterms)
(models : Fin nterms → (integerBox N → ℂ))
(coeff : Fin nterms → ℝ) (err : integerBox N → ℂ),
(∀ i, models i ∈ twistedNativeSampleFunctions (1 : Fin nX → ℕ) 0 commonBudget
(fun v : integerBox N => v.val)
(fun (W : NormalizedPolynomialTwist (Fin nX) (Σ j, J j)
(Real.exp commonBudget) (Real.exp commonBudget)
⟨Real.exp commonBudget, Real.exp_nonneg _⟩)
(v : integerBox N) => W.eval N poly v.val)) ∧
input = (∑ i, coeff i • models i) + err ∧
(∑ i, |coeff i|) ≤ Real.exp (Qmodel + 2) ∧
sampledSliceSeminorm pathLaw physical slices tests err ≤ Real.exp (-u) ∧
(∀ f, ‖(FiniteProbabilityWeights.uniformFinset (integerBox N) hbox).correlation
err (forecast f)‖ ≤ Real.exp (-u)) ∧
(nterms : ℝ) ≤ Real.exp (2 * Qmodel + 2 * u + 4 * p + 34) ∧
∀ errLocal : CoefficientTorus (K := LayerSamplerVariables G I n B) U × Path → ℂ,
Measurable errLocal →
(∀ center z, ∃ j, errLocal (center, z) =
𝔼 t ∈ slices z j, err (physical z t) * tests z j t) →
Integrable errLocal (centeredFiniteProbabilityMeasure μ centeredLaw) ∧
(∫ y, ‖errLocal y‖ ∂centeredFiniteProbabilityMeasure μ centeredLaw) ≤ Real.exp (-u)
omit [BorelSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
[CompactSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
[μ.IsAddLeftInvariant]
theorem sharedWidthPreparedUniversalSlicedForecastModelExtensionInterface_of_prepared
(Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired : ℝ)
(hApproxPrecision : 2 * u + 4 * p + 12 ≤ qSliced.E)
(hCap : Real.exp qSliced.capLog ≤ forecastCap)
(hMass : 0 ≤ qSliced.massLog)
(hModel : SharedWidthPreparedCenteredForecastModelExtensionInterface
(B := B) (U := U) (basis := basis) (S := S) (hR := hR) (hσ := hσ)
(selection := selection) (stride := stride) (N := N)
(Pdetect := Pdetect) (uSource := uSource) (pModel := pModel) (pSlice := pSlice)
(Vtail := Vtail) (τ := τ) (u := u) (p := p) (forecastCap := forecastCap)
(hb := hb) (o := o) (μ := μ) (Good := Good)
Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired) :
SharedWidthPreparedUniversalSlicedForecastModelExtensionInterface
(B := B) (U := U) (basis := basis) (S := S) (hR := hR) (hσ := hσ)
(selection := selection) (stride := stride) (N := N)
(Pdetect := Pdetect) (uSource := uSource) (pModel := pModel) (pSlice := pSlice)
(Vtail := Vtail) (τ := τ) (u := u) (p := p) (forecastCap := forecastCap)
(hb := hb) (o := o) (μ := μ) (Good := Good) (spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp)
(selected := selected) (setup := setup) (bWforecast := bWforecast) (qSliced := qSliced)
Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired := by
intro hstride hstrideBound C hC hCbound hchart Cforward hforward hForward
hVtail hVactual hprofile hcutoff E hτSpatial hτInv hτHalf hτDim
r W ξn hξn hξle hξLate hW hξone Pmarginal modelRequired required cells poly hpoly hmem Rrank
hsizeModel hrank hRank V hCells bases Z
obtain ⟨hN, hbases, hbox, hmass, hnormalizer, hmargin, hnormalizerCenter,
hweight, hgood, hexcess, hmodel⟩ :=
hModel hstride hstrideBound C hC hCbound hchart Cforward hforward hForward
hVtail hVactual hprofile hcutoff (E := E) hτSpatial hτInv hτHalf hτDim
hξn hξle hξLate cells poly hpoly hmem hsizeModel hrank hRank hCells
refine ⟨hN, hbases, hbox, hmass, hnormalizer, hmargin, ?_⟩
intro Path Zcenter
refine ⟨hnormalizerCenter, ?_⟩
intro centeredLaw
refine ⟨hweight, hgood, ?_⟩
intro pathLaw sides Sites e hrootSum physical
let : Nonempty Sites := by
have hpos (k : LayerSamplerVariables G I n B) : 0 < sides k := by
cases k with
| inl g => exact S.positive
| inr j => exact allocatedPrincipalSides_pos B U basis S j
let : ∀ k, NeZero (sides k) := fun k => ⟨(hpos k).ne'⟩
exact (integerBox_nonempty sides).to_subtype
refine ⟨hexcess, ?_⟩
intro Tests instTests Ldetect instLie instAlg dims instTopo instAdd instSmul instT2
Ddetect Vdetect slices cdetect stepdetect Hdetect hstep hSlices hDense
hnum hcomplex hcap budget tests hModelPrecision ForecastPath
obtain ⟨data, hdata, hnone, hnoneCenter, hdataCap, hdataMass, hdataApprox, hUniversal⟩ :=
exists_actualFixedSpatialSlicedForecastUniversalFamily_option_of_numerics
(hR := hR) (hσ := hσ) (spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp) (physicalN := N)
setup qSliced o bWforecast hb poly hmem
refine ⟨data, hdata, hnone, hnoneCenter, hUniversal, ?_⟩
intro forecast input hinput
exact hmodel Ddetect Vdetect slices cdetect stepdetect Hdetect hstep hSlices hDense
hnum hcomplex hcap forecast qSliced.hPnative hMass hModelPrecision
(fun f => (data f).Term) (fun f => (data f).coefficient)
(fun f => (data f).centerConstant) (fun f => (data f).twists)
hdataMass (fun f v => (hdataApprox f v).trans
(Real.exp_le_exp.mpr (neg_le_neg hApproxPrecision)))
(fun f v => (hdataCap f v).trans hCap) input hinput
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
open MeasureTheory Module Submodule BooleanCubeKernel
open scoped Classical BigOperators NNReal TensorProduct Matrix
variable {m : ℕ} {G : Type} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type} [∀ j, Fintype (I j)]
variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type)
variable [∀ a, Fintype (B a)]
variable {J : Fin m → Type} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable {R σ : Fin m → ℝ} (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j)
variable (S : LayerSamplerScale (G := G) B U basis R σ)
variable {nX : ℕ}
local notation "rowSets" => (fun j : Fin m => boundedBooleanJetRows (Fin (0 + 1)) (Fin.val j + 1))
attribute [local instance 2000] fullBooleanRowSetFintype
attribute [local instance] ScalarSiteExpansion.termFinite
local notation "selectedRows" => (fun j : Fin m => (rowSets j : Type))
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset (Fin (0 + 1))))
variable (selection : Fin (0 + 1) ↪ G) (stride N : Fin nX → ℕ)
variable (Pdetect : Polynomial ℕ) (uSource pModel pSlice : ℝ) (Vtail : Fin m → ℝ≥0)
local notation "pDetect" => allocatedModelTestLog uSource pModel
local notation "qDetect" => allocatedModelTestLog uSource pModel
local notation "Ctail" => (4 * ∏ j, earlyConstantDensityCap (Fintype.card (I j)) (n j) (R j) (Vtail j))
local notation "Kslice" => Real.exp (pSlice * Fintype.card (LayerSamplerVariables G I n B))
variable (τ u p forecastCap : ℝ)
local notation "α" => forecastAugmentedUnitThreshold u p Kslice (max 1 Ctail) forecastCap
variable {P : ℝ}
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν j)]
variable [MeasurableSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [BorelSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [CompactSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "jetHaar" => Measure.pi (fun j =>
@Measure.pi (selectedRows j) _ (fullBooleanRowSetFintype (0 + 1) (Fin.val j + 1)) _
(fun _ : selectedRows j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
variable {Eout : Fin m → Type} [∀ j, Fintype (Eout j)]
variable {Dmod Lrank : ℕ}
variable {spatial : Fin Lrank ↪ G}
variable {kernel : ∀ j : Fin m, Fin Lrank × Fin (j.val + 1) ↪ G}
variable {block : ∀ j, ∀ a : AllocatedDegreeActiveAxis
(allocatedShortAxis (I := I) U basis S.value) j, Fin Lrank ↪ B ⟨j, a.val⟩}
variable {Tsp : Type} [Fintype Tsp]
variable {spatialEquiv : G ≃ Fin nX ⊕ (Fin nX ⊕ Tsp)} {Wsp Lsp δslice : ℝ}
variable {A : Type} [Fintype A] (selected : A → Σ j : Fin m, Fin (n j))
variable (setup : ActualFixedSpatialForecastSetup (X := Fin nX) (Eout := Eout)
B U basis S Dmod selected τ δslice)
variable (bWforecast : ∀ j, Basis (Eout j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (qSliced : ActualFixedSpatialSlicedForecastNumerics setup)
variable (Good : ∀ (poly : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ)),
(∀ j ex, coefficients (poly j) ex ∈ U j) →
∀ (width : Option (LayerSamplerVariables G I n B) × Fin nX → ℝ)
(bases : Finset (Fin nX → ℤ)),
(CoefficientTorus (K := LayerSamplerVariables G I n B) U →
FiniteProbabilityWeights (bases × rectangularWeightIndices 0 width 1)) → Prop)
def SharedWidthPreparedFiniteUniversalSlicedForecastModelExtensionInterface
(Pchart Qstride Pmaster Plate _pGain Pphysical coarseTarget extraRequired : ℝ) : Prop :=
∀ (_hstride : ∀ i, 0 < stride i) (_hstrideBound : ∀ i, (stride i : ℝ) ≤ Real.exp Qstride)
(C : Fin m → ℝ) (_hC : ∀ j, 0 ≤ C j) (_hCbound : ∀ j, C j ≤ Real.exp Pchart)
(_hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(Cforward : Fin m → ℝ≥0)
(_hforward : ∀ j v, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j) v‖ ≤ Cforward j * ‖v‖)
(_hForward : ∀ j, (Cforward j : ℝ) ≤ Real.exp Pchart)
(_hVtail : ∀ j, (Vtail j : ℝ) ≤ Real.exp Pchart)
(_hVactual : ∀ j, 0 ≤ mixedDensityCovolumeRatio (euclideanSubspace (U j)) (basis j) ∧
mixedDensityCovolumeRatio (euclideanSubspace (U j)) (basis j) ≤ Vtail j)
(_hprofile : (probabilityProfileLipschitz : ℝ) ≤ Real.exp Pchart)
(_hcutoff : (normalizedSiteCutoffBound : ℝ) ≤ Real.exp Pchart),
∀ {E : ℝ},
∀ (hτSpatial : 0 < τ), τ⁻¹ ≤ Real.exp Pphysical →
τ ≤ 1 / 2 → (nX : ℝ) * τ ≤ 1 / 2 →
let r := preparedModularGeneralDetectorResources (preparedModularGeneralDetectorConstants m 0) (0 + 1) Pmaster Plate
let W := allocatedPhysicalRootBudget B U basis S (fun _ => 0)
∀ {ξn : ℝ} (hξn : 0 < ξn)
(hξle : ξn ≤ normalizedTupleNarrowWidth (Fin nX)
(PrincipalTupleIndex B (layerSamplerDegree I n)) selection
(allocatedDetectedKernelCutoff 0 G (Fintype.card (LayerSamplerVariables G I n B)) Pdetect pDetect qDetect (α / 2))
Pphysical coarseTarget),
ξn⁻¹ ≤ Real.exp Plate →
let hW := allocatedPhysicalRootBudget_nonneg B U basis S (fun _ => 0)
let hξone : ξn ≤ 1 := hξle.trans (min_le_left _ _)
let Pmarginal := r.Pproj
let modelRequired := max r.required ((max Pmarginal E + preparedCenteredMarginalExponent m) ^
preparedCenteredMarginalExponent m)
let required := max modelRequired extraRequired
∀ (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) (Fin nX) stride))
(poly : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ))
(_hp : ∀ j, DegreeLE (1 : (Fin nX) → ℕ) (j.val + 1) (poly j))
(hmem : ∀ j ex, coefficients (poly j) ex ∈ U j)
{Rrank : ℝ},
(∀ i, Real.exp required ≤ (N i : ℝ)) →
(∀ j, HasLayerSamplingRank (j.val + 1) (fun i => (N i : ℝ)) Rrank (U j) (poly j)) →
Real.exp required ≤ Rrank →
let V := narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξn N
cells.Nonempty →
let bases := trimmedIntegerBox N (spatialTrimMargin τ N)
let Z := selectedJointDensityMass bases stride cells V
(allocatedJointBaseDensity B U basis hb o hR hσ S (Fin nX) poly hmem)
∃ (hN : ∀ i, 0 < N i) (hbases : bases.Nonempty) (hbox : (integerBox N).Nonempty)
(hmass : 0 < ∑' z, selectedResidueSmoothWeight stride cells V z)
(_hnormalizer : |Z - 1| ≤ Real.exp (-r.E) ∧ Z ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧ 0 < Z ∧ Z⁻¹ ≤ 2)
(_hmargin : ∀ i, 2 * spatialTrimMargin τ N i ≤ N i),
let Path := bases × rectangularWeightIndices 0 V 1
let Zcenter := fun center => selectedJointDensityMass bases stride cells V
(allocatedCenteredJointDensity B U basis hb o hR hσ S poly hmem center)
∃ hnormalizerCenter : ∀ center,
|Zcenter center - 1| ≤ Real.exp (-E) ∧
Zcenter center ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧
0 < Zcenter center ∧ (Zcenter center)⁻¹ ≤ 2,
let centeredLaw := fun center => selectedJointFiniteLaw bases hbases stride cells V
(narrowTrimmedSpatialWidths_pos hW hτSpatial hξn N hN) hmass
(allocatedCenteredJointDensity B U basis hb o hR hσ S poly hmem center)
(allocatedCenteredJointDensity_nonneg B U basis hb o hR hσ S poly hmem center) (hnormalizerCenter center).2.2.1
∃ hweight : ∀ z, Measurable (fun center => (centeredLaw center).weight z),
Good poly hmem V bases centeredLaw ∧
let pathLaw := centeredFiniteMarginal μ centeredLaw hweight
let sides := Sum.elim (fun _ : G => S.value) (allocatedPrincipalSides B U basis S)
let Sites := integerBox sides
let e : Sites → LayerSamplerVariables G I n B → ℤ := Subtype.val
letI : Nonempty Sites := by
have hpos (k : LayerSamplerVariables G I n B) : 0 < sides k := by
cases k with
| inl g => exact S.positive
| inr j => exact allocatedPrincipalSides_pos B U basis S j
let : ∀ k, NeZero (sides k) := fun k => ⟨(hpos k).ne'⟩
exact (integerBox_nonempty sides).to_subtype
let hrootSum := fun t : Sites => allocatedParameterBox_root_bound B U basis S t
let physical := narrowPhysicalSiteMap (G := G)
(J := PrincipalTupleIndex B (layerSamplerDegree I n)) hW hτSpatial hξone N hN
_hmargin e hrootSum
(FiniteProbabilityWeights.uniformFinset (integerBox N) hbox).excessMass
(pathLaw.siteLaw physical) Ctail ≤ 6 * positiveProjectionAccuracy E ∧
∀ {Tests : Path → Type} [∀ z, Nonempty (Tests z)]
{Ldetect : ∀ z, Tests z → Type} [∀ z j, LieRing (Ldetect z j)] [∀ z j, LieAlgebra ℚ (Ldetect z j)]
{dims : ∀ z, Tests z → ℕ}
[∀ z j, TopologicalSpace (ℝ ⊗[ℚ] Ldetect z j)]
[∀ z j, IsTopologicalAddGroup (ℝ ⊗[ℚ] Ldetect z j)]
[∀ z j, ContinuousSMul ℝ (ℝ ⊗[ℚ] Ldetect z j)] [∀ z j, T2Space (ℝ ⊗[ℚ] Ldetect z j)]
(Ddetect : ∀ z j, RationalFilteredNilmanifold (Ldetect z j) 0 (dims z j))
(Vdetect : ∀ z j, (Ddetect z j).Niltest (fun _ : LayerSamplerVariables G I n B => 1))
(slices : ∀ z, Tests z → Finset Sites)
(cdetect : ∀ z, Tests z → LayerSamplerVariables G I n B → ℤ)
(stepdetect : ∀ z, Tests z → ℕ)
(Hdetect : ∀ z, Tests z → LayerSamplerVariables G I n B → ℕ),
(∀ z j, 0 < stepdetect z j) →
(∀ z j, (slices z j).image e = commonStrideBox (cdetect z j) (stepdetect z j) (Hdetect z j)) →
(∀ z j, IsDenseCommonStrideBox
(Sum.elim (fun _ : G => S.value) (allocatedPrincipalSides B U basis S)) pSlice ((slices z j).image e)) →
(Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Pdetect.eval₂ (Nat.castRingHom ℝ) qDetect →
(∀ z j, (Vdetect z j).ComplexityLE (Pdetect.eval₂ (Nat.castRingHom ℝ) qDetect)) →
(∀ z j, ((Vdetect z j).normBound : ℝ) ≤ 1) →
let budget := r.nativeBudget
let tests := fun z j t => star ((Vdetect z j).eval
(commonStrideIndex (cdetect z j) (stepdetect z j) (e t)))
u + 2 * p + max (max budget (3 * qSliced.Pnative + 3))
(2 * u + 4 * p + qSliced.massLog + 20) + 32 ≤ E →
let ForecastPath := ActualFixedSpatialSlicedAdmissiblePath
(hR := hR) (hσ := hσ) (spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp) (physicalN := N) setup qSliced
∃ data : Option ForecastPath → ActualForecastData N poly
qSliced.Pnative qSliced.massLog qSliced.capLog qSliced.E,
(∀ path, (data (some path)).target =
path.slice.target selected setup.hBactive o bWforecast hb poly hmem setup.κ ∧
(data (some path)).centerConstant = fun j => (path.slice.path.center j).val) ∧
(data none).target = (fun _ => 0) ∧
(data none).centerConstant = (fun _ _ => 0) ∧
(∀ f (poly' : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ))
(hm' : ∀ j d, coefficients (poly' j) d ∈ U j) (v : Fin nX → ℤ),
‖(match f with
| none => 0
| some path => path.slice.targetAt selected setup.hBactive o bWforecast hb
poly' hm' setup.κ v) -
∑ t, (data f).coefficient t * ((data f).twists t).eval N
(fun j => subtractConstant ((data f).centerConstant j) (poly' j)) v‖ ≤
Real.exp (-qSliced.E)) ∧
let forecast := fun f => (data f).target
∀ {Branch : Type} [Fintype Branch]
(input : Branch → integerBox N → ℂ), (∀ b v, ‖input b v‖ ≤ Real.exp p) →
let commonBudget := max budget (3 * qSliced.Pnative + 3)
let Qmodel := max commonBudget (2 * u + 4 * p + qSliced.massLog + 20)
let native := twistedNativeSampleFunctions (1 : Fin nX → ℕ) 0 commonBudget
(fun v : integerBox N => v.val)
(fun (W : NormalizedPolynomialTwist (Fin nX) (Σ j, J j)
(Real.exp commonBudget) (Real.exp commonBudget)
⟨Real.exp commonBudget, Real.exp_nonneg _⟩)
(v : integerBox N) => W.eval N poly v.val)
let localSeminorm := fun err => sampledSliceSeminorm pathLaw physical slices tests err
let selectedLocal := fun (err : integerBox N → ℂ)
(errLocal : CoefficientTorus (K := LayerSamplerVariables G I n B) U × Path → ℂ) =>
∀ center z, ∃ j, errLocal (center, z) =
𝔼 t ∈ slices z j, err (physical z t) * tests z j t
∃ models : Branch → CenteredForecastModel (integerBox N),
(∀ b, CenteredForecastModelBounds (centeredFiniteProbabilityMeasure μ centeredLaw)
native (FiniteProbabilityWeights.uniformFinset (integerBox N) hbox) forecast
localSeminorm selectedLocal (input b) (Real.exp (Qmodel + 2)) (Real.exp (-u))
(Real.exp (2 * Qmodel + 2 * u + 4 * p + 34)) (models b)) ∧
∀ errLocal : Branch → CoefficientTorus (K := LayerSamplerVariables G I n B) U × Path → ℂ,
(∀ b, Measurable (errLocal b)) →
(∀ b, selectedLocal (models b).residual (errLocal b)) →
(∀ b, Integrable (errLocal b) (centeredFiniteProbabilityMeasure μ centeredLaw)) ∧
Integrable (fun y => ∑ b, ‖errLocal b y‖)
(centeredFiniteProbabilityMeasure μ centeredLaw) ∧
(∫ y, ∑ b, ‖errLocal b y‖ ∂centeredFiniteProbabilityMeasure μ centeredLaw) ≤
(Fintype.card Branch : ℝ) * Real.exp (-u)
omit [BorelSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
[CompactSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
[μ.IsAddLeftInvariant]
theorem sharedWidthPreparedFiniteUniversalSlicedForecastModelExtensionInterface_of_universal
(Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired : ℝ)
(hModel : SharedWidthPreparedUniversalSlicedForecastModelExtensionInterface
(B := B) (U := U) (basis := basis) (S := S) (hR := hR) (hσ := hσ)
(selection := selection) (stride := stride) (N := N)
(Pdetect := Pdetect) (uSource := uSource) (pModel := pModel) (pSlice := pSlice)
(Vtail := Vtail) (τ := τ) (u := u) (p := p) (forecastCap := forecastCap)
(hb := hb) (o := o) (μ := μ) (Good := Good)
(spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp)
(selected := selected) (setup := setup) (bWforecast := bWforecast) (qSliced := qSliced)
Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired) :
SharedWidthPreparedFiniteUniversalSlicedForecastModelExtensionInterface
(B := B) (U := U) (basis := basis) (S := S) (hR := hR) (hσ := hσ)
(selection := selection) (stride := stride) (N := N)
(Pdetect := Pdetect) (uSource := uSource) (pModel := pModel) (pSlice := pSlice)
(Vtail := Vtail) (τ := τ) (u := u) (p := p) (forecastCap := forecastCap)
(hb := hb) (o := o) (μ := μ) (Good := Good) (spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp)
(selected := selected) (setup := setup) (bWforecast := bWforecast) (qSliced := qSliced)
Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired := by
intro hstride hstrideBound C hC hCbound hchart Cforward hforward hForward
hVtail hVactual hprofile hcutoff E hτSpatial hτInv hτHalf hτDim
r W ξn hξn hξle hξLate hW hξone Pmarginal modelRequired required cells poly hpoly hmem Rrank
hsizeModel hrank hRank V hCells bases Z
obtain ⟨hN, hbases, hbox, hmass, hnormalizer, hmargin, hnormalizerCenter,
hweight, hgood, hexcess, hmodel⟩ :=
hModel hstride hstrideBound C hC hCbound hchart Cforward hforward hForward
hVtail hVactual hprofile hcutoff (E := E) hτSpatial hτInv hτHalf hτDim
hξn hξle hξLate cells poly hpoly hmem hsizeModel hrank hRank hCells
refine ⟨hN, hbases, hbox, hmass, hnormalizer, hmargin, ?_⟩
intro Path Zcenter
refine ⟨hnormalizerCenter, ?_⟩
intro centeredLaw
refine ⟨hweight, hgood, ?_⟩
intro pathLaw sides Sites e hrootSum physical
let : Nonempty Sites := by
have hpos (k : LayerSamplerVariables G I n B) : 0 < sides k := by
cases k with
| inl g => exact S.positive
| inr j => exact allocatedPrincipalSides_pos B U basis S j
let : ∀ k, NeZero (sides k) := fun k => ⟨(hpos k).ne'⟩
exact (integerBox_nonempty sides).to_subtype
refine ⟨hexcess, ?_⟩
intro Tests instTests Ldetect instLie instAlg dims instTopo instAdd instSmul instT2
Ddetect Vdetect slices cdetect stepdetect Hdetect hstep hSlices hDense
hnum hcomplex hcap budget tests hModelPrecision ForecastPath
obtain ⟨data, hdata, hnone, hnoneCenter, hUniversal, hsingle⟩ :=
hmodel Ddetect Vdetect slices cdetect stepdetect Hdetect hstep hSlices hDense
hnum hcomplex hcap hModelPrecision
refine ⟨data, hdata, hnone, hnoneCenter, hUniversal, ?_⟩
intro forecast Branch instBranch input hinput commonBudget Qmodel native localSeminorm selectedLocal
have hsingleModel : ∀ f : integerBox N → ℂ, (∀ v, ‖f v‖ ≤ Real.exp p) →
∃ model : CenteredForecastModel (integerBox N),
CenteredForecastModelBounds (centeredFiniteProbabilityMeasure μ centeredLaw)
native (FiniteProbabilityWeights.uniformFinset (integerBox N) hbox) forecast
localSeminorm selectedLocal f (Real.exp (Qmodel + 2)) (Real.exp (-u))
(Real.exp (2 * Qmodel + 2 * u + 4 * p + 34)) model := by
intro f hf
obtain ⟨nterms, hpos, models, coeff, err, hspec⟩ := hsingle f hf
exact ⟨⟨nterms, hpos, models, coeff, err⟩, hspec⟩
obtain ⟨models, hmodels⟩ := exists_centeredFiniteForecastModels
(centeredFiniteProbabilityMeasure μ centeredLaw) native
(FiniteProbabilityWeights.uniformFinset (integerBox N) hbox) forecast
localSeminorm selectedLocal input (Real.exp p) (Real.exp (Qmodel + 2)) (Real.exp (-u))
(Real.exp (2 * Qmodel + 2 * u + 4 * p + 34)) hinput hsingleModel
refine ⟨models, hmodels, ?_⟩
intro errLocal hmeas hselected
exact centeredFiniteForecastModels_integral_sum_norm_le
(centeredFiniteProbabilityMeasure μ centeredLaw) native
(FiniteProbabilityWeights.uniformFinset (integerBox N) hbox) forecast
localSeminorm selectedLocal input (Real.exp (Qmodel + 2)) (Real.exp (-u))
(Real.exp (2 * Qmodel + 2 * u + 4 * p + 34)) models hmodels errLocal hmeas hselected
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
open MeasureTheory Module Submodule BooleanCubeKernel
open scoped BigOperators Classical NNReal TensorProduct Matrix
variable {m : ℕ} {G : Type} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type} [∀ j, Fintype (I j)] {n : Fin m → ℕ}
variable (B : LayerSamplerAxis I n → Type) [∀ a, Fintype (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 → ℝ} (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j)
variable (S : LayerSamplerScale (G := G) B U basis R σ)
variable {nX : ℕ} (selection : Fin (0 + 1) ↪ G) (stride N : Fin nX → ℕ)
variable (Pdetect : Polynomial ℕ) (uSource pModel pSlice : ℝ) (Vtail : Fin m → ℝ≥0)
variable (τ u p : ℝ)
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable [∀ j, IsZLattice ℝ (latticeSection
(standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable [MeasurableSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [IsProbabilityMeasure μ]
variable {Eout : Fin m → Type} [∀ j, Fintype (Eout j)]
variable {Dmod Lrank : ℕ} {spatial : Fin Lrank ↪ G}
variable {kernel : ∀ j : Fin m, Fin Lrank × Fin (j.val + 1) ↪ G}
variable {block : ∀ j, ∀ a : AllocatedDegreeActiveAxis
(allocatedShortAxis (I := I) U basis S.value) j, Fin Lrank ↪ B ⟨j, a.val⟩}
variable {Tsp : Type} [Fintype Tsp]
variable {spatialEquiv : G ≃ Fin nX ⊕ (Fin nX ⊕ Tsp)} {Wsp Lsp δslice : ℝ}
variable {A : Type} [Fintype A] (selected : A → Σ j : Fin m, Fin (n j))
variable (setup : ActualFixedSpatialForecastSetup (X := Fin nX) (Eout := Eout)
B U basis S Dmod selected τ δslice)
variable (bWforecast : ∀ j, Basis (Eout j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (qSliced : ActualFixedSpatialSlicedForecastNumerics setup)
variable (Good : ∀ (poly : ∀ j, VectorPolynomial (Fin nX) ℝ (J j → ℝ)),
(∀ j ex, coefficients (poly j) ex ∈ U j) →
∀ (width : Option (LayerSamplerVariables G I n B) × Fin nX → ℝ)
(bases : Finset (Fin nX → ℤ)),
(CoefficientTorus (K := LayerSamplerVariables G I n B) U →
FiniteProbabilityWeights (bases × rectangularWeightIndices 0 width 1)) → Prop)
theorem sharedWidthPreparedFiniteSlicedForecastModelInterface_of_prepared
(Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired : ℝ)
(hAccuracy : qSliced.E = 2 * u + 4 * p + 12)
(hCapLog : qSliced.capLog ≤ p) (hMass : 0 ≤ qSliced.massLog)
(hModel : SharedWidthPreparedCenteredForecastModelExtensionInterface
(B := B) (U := U) (basis := basis) (S := S) (hR := hR) (hσ := hσ)
(selection := selection) (stride := stride) (N := N)
(Pdetect := Pdetect) (uSource := uSource) (pModel := pModel) (pSlice := pSlice)
(Vtail := Vtail) (τ := τ) (u := u) (p := p) (forecastCap := Real.exp p)
(hb := hb) (o := o) (μ := μ) (Good := Good)
Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired) :
SharedWidthPreparedFiniteUniversalSlicedForecastModelExtensionInterface
(B := B) (U := U) (basis := basis) (S := S) (hR := hR) (hσ := hσ)
(selection := selection) (stride := stride) (N := N)
(Pdetect := Pdetect) (uSource := uSource) (pModel := pModel) (pSlice := pSlice)
(Vtail := Vtail) (τ := τ) (u := u) (p := p) (forecastCap := Real.exp p)
(hb := hb) (o := o) (μ := μ) (Good := Good) (spatial := spatial) (kernel := kernel) (block := block)
(spatialEquiv := spatialEquiv) (Wsp := Wsp) (Lsp := Lsp)
(selected := selected) (setup := setup) (bWforecast := bWforecast) (qSliced := qSliced)
Pchart Qstride Pmaster Plate pGain Pphysical coarseTarget extraRequired := by
apply sharedWidthPreparedFiniteUniversalSlicedForecastModelExtensionInterface_of_universal
apply sharedWidthPreparedUniversalSlicedForecastModelExtensionInterface_of_prepared
· exact hAccuracy.ge
· exact Real.exp_le_exp.mpr hCapLog
· exact hMass
· exact hModel
end Erdos3.VectorPolynomial
end
end OAI

Xet Storage Details

Size:
44.2 kB
·
Xet hash:
d4dd65f9ae4319bc533d7a7e288a644450be0f61b48464ef90ac733a90209d90

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