Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Polynomial /AllocatedExternalCandidateFixedCenterDegreeModel.lean
| import OAI.Combinatorics.Progressions.Estimates.AllocatedZeroLayerFixedCenterExcess | |
| namespace OAI | |
| section | |
| namespace Erdos3.VectorPolynomial | |
| open Module Submodule BooleanCubeKernel | |
| open scoped BigOperators Classical TensorProduct NNReal | |
| variable {m : ℕ} {G X : Type} [Fintype G] [Fintype X] | |
| {I : Fin m → Type} [∀ j, Fintype (I j)] {n : Fin m → ℕ} | |
| (B : LayerSamplerAxis I n → Type) [∀ a, Fintype (B a)] | |
| {J : Fin m → Type} [∀ j, Fintype (J j)] | |
| (U : ∀ j, Submodule ℝ (J j → ℝ)) | |
| (b : ∀ j, Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ) | |
| {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b R σ) | |
| (hb : ∀ j, span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j))) | |
| (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j))) | |
| (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j) | |
| (N : X → ℕ) (poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ)) | |
| (hm : ∀ j e, coefficients (poly j) e ∈ U j) | |
| (τ ξ : ℝ) (stride : X → ℕ) | |
| (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) X stride)) | |
| (center : CoefficientTorus (K := LayerSamplerVariables G I n B) U) | |
| [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))] | |
| namespace AllocatedExternalCandidateSampler | |
| variable {B U b S hb o hR hσ N poly hm τ ξ stride cells center} | |
| (A : AllocatedExternalCandidateSampler B U b S hb o hR hσ N poly hm τ ξ stride cells center) | |
| local instance fixedCenterDegreeSiteNonempty : Nonempty A.Site := A.site_nonempty | |
| theorem exists_fixedCenter_degree_forecast_model (degree : ℕ) | |
| (hξone : ξ ≤ 1) (hmargin : ∀ x, 2 * spatialTrimMargin τ N x ≤ N x) | |
| {u p pSlice pTest localBudget Pnative massLog capLog Edata P C : ℝ} | |
| (hu : 0 ≤ u) (hp : 0 ≤ p) (hbudget : 0 ≤ localBudget) | |
| (hNative : 0 ≤ Pnative) | |
| (hSliceLog : pSlice * Fintype.card (LayerSamplerVariables G I n B) ≤ p) | |
| (hC : 1 ≤ C) (hCp : C ≤ Real.exp p) (hCap : capLog ≤ p) | |
| (hAccuracy : 2 * u + 4 * p + 12 ≤ Edata) | |
| (hPrecision : u + 2 * p + max (max localBudget (3 * Pnative + 3)) | |
| (2 * u + 4 * p + max 0 massLog + 20) + 32 ≤ P) | |
| (hdirect : A.NativeDetection degree pSlice pTest localBudget | |
| (forecastAugmentedUnitThreshold u p | |
| (Real.exp (pSlice * Fintype.card (LayerSamplerVariables G I n B))) C (Real.exp capLog))) | |
| (hexcess : (FiniteProbabilityWeights.uniformFinset (integerBox N) A.integerBox_nonempty).excessMass | |
| (A.law.siteLaw (A.physicalBox hξone hmargin)) C ≤ 6 * positiveProjectionAccuracy P) | |
| {Tests : A.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) degree (dims z j)) | |
| (Vdetect : ∀ z j, (Ddetect z j).Niltest (fun _ : LayerSamplerVariables G I n B => 1)) | |
| (slices : ∀ z, Tests z → Finset A.Site) | |
| (origin : ∀ z, Tests z → LayerSamplerVariables G I n B → ℤ) | |
| (step : ∀ z, Tests z → ℕ) | |
| (length : ∀ z, Tests z → LayerSamplerVariables G I n B → ℕ) | |
| (hstep : ∀ z j, 0 < step z j) | |
| (hshape : ∀ z j, (slices z j).image Subtype.val = commonStrideBox (origin z j) (step z j) (length z j)) | |
| (hDense : ∀ z j, IsDenseCommonStrideBox A.sides pSlice ((slices z j).image Subtype.val)) | |
| (hcomplex : ∀ z j, (Vdetect z j).ComplexityLE pTest) | |
| (hcap : ∀ z j, ((Vdetect z j).normBound : ℝ) ≤ 1) | |
| {Forecast : Type} [Nonempty Forecast] | |
| (data : Forecast → ActualForecastData N poly Pnative massLog capLog Edata) | |
| (input : integerBox N → ℂ) (hinput : ∀ v, ‖input v‖ ≤ Real.exp p) : | |
| let tests : ∀ z, Tests z → A.Site → ℂ := fun z j t => | |
| star ((Vdetect z j).eval (commonStrideIndex (origin z j) (step z j) t.val)) | |
| let commonBudget := max localBudget (3 * Pnative + 3) | |
| let Qmodel := max commonBudget (2 * u + 4 * p + max 0 massLog + 20) | |
| let native := twistedNativeSampleFunctions (1 : X → ℕ) degree commonBudget | |
| (fun v : integerBox N => v.val) | |
| (fun (W : NormalizedPolynomialTwist X (Σ j, J j) | |
| (Real.exp commonBudget) (Real.exp commonBudget) | |
| ⟨Real.exp commonBudget, Real.exp_nonneg _⟩) | |
| (v : integerBox N) => W.eval N poly v.val) | |
| ∃ model : CenteredForecastModel (integerBox N), | |
| (∀ i, model.models i ∈ native) ∧ | |
| input = (∑ i, model.coefficient i • model.models i) + model.residual ∧ | |
| (∑ i, |model.coefficient i|) ≤ Real.exp (Qmodel + 2) ∧ | |
| sampledSliceSeminorm A.law (A.physicalBox hξone hmargin) slices tests model.residual ≤ | |
| Real.exp (-u) ∧ | |
| (∀ f, ‖(FiniteProbabilityWeights.uniformFinset (integerBox N) A.integerBox_nonempty).correlation | |
| model.residual (data f).target‖ ≤ Real.exp (-u)) ∧ | |
| (model.nterms : ℝ) ≤ Real.exp (2 * Qmodel + 2 * u + 4 * p + 34) := by | |
| classical | |
| intro tests commonBudget Qmodel native | |
| let : ∀ x, NeZero (N x) := fun x => ⟨(A.size_pos x).ne'⟩ | |
| have hsize := preparedCenteredForecast_slice_family_bounds B U b S slices hDense | |
| have htests (z) (j) (t : A.Site) : ‖tests z j t‖ ≤ 1 := | |
| preparedCenteredForecast_niltest_star_eval_bound (Vdetect z j) (hcap z j) | |
| (commonStrideIndex (origin z j) (step z j) t.val) | |
| have hdetect := hdirect Ddetect Vdetect slices origin step length | |
| hstep hshape hDense hcomplex hcap | |
| obtain ⟨nterms, hn, models, coefficient, residual, hmodels, heq, hcoeff, hlocal, hforecast, hterms⟩ := | |
| exists_fixedLaw_centered_forecast_twist_model degree N poly localBudget Pnative hbudget hNative | |
| A.law (A.physicalBox hξone hmargin) A.physical (fun _ _ => rfl) | |
| slices tests (fun f => (data f).target) hu hp (le_max_left 0 massLog) | |
| (Real.exp_nonneg _) hC (Real.exp_nonneg _) (Real.exp_le_exp.mpr hSliceLog) | |
| hCp (Real.exp_le_exp.mpr hCap) hPrecision hsize.2 htests (fun f => (data f).cap) | |
| hdetect (fun f => (data f).Term) (fun f => (data f).coefficient) | |
| (fun f => (data f).centerConstant) (fun f => (data f).twists) | |
| (fun f => (data f).mass.trans (Real.exp_le_exp.mpr (le_max_right 0 massLog))) | |
| (fun f v => ((data f).approximation v).trans (Real.exp_le_exp.mpr (neg_le_neg hAccuracy))) | |
| hexcess le_rfl input hinput | |
| exact ⟨⟨nterms, hn, models, coefficient, residual⟩, | |
| hmodels, heq, hcoeff, hlocal, hforecast, hterms⟩ | |
| end AllocatedExternalCandidateSampler | |
| end Erdos3.VectorPolynomial | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 6.87 kB
- Xet hash:
- 3de10de7f113aa7738a8ecc74f3200d68fd505ea3051b8ae3ac1bd3df7776037
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.