Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /AllocatedExternalRetainedForecastModel.lean
| import OAI.Combinatorics.Progressions.Estimates.AllocatedZeroLayerFixedCenterExcess | |
| namespace OAI | |
| section | |
| namespace Erdos3.VectorPolynomial | |
| open Module Submodule BooleanCubeKernel NilpotentLieFiltration NilpotentLieBCHGroup | |
| open scoped BigOperators Classical TensorProduct | |
| variable {m : ℕ} {G X : Type} [Fintype G] [Fintype X] | |
| {I E J : Fin m → Type} [∀ j, Fintype (I j)] [∀ j, Fintype (J j)] | |
| {n : Fin m → ℕ} {B : LayerSamplerAxis I n → Type} [∀ a, Fintype (B a)] | |
| {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)))] | |
| (A : AllocatedExternalCandidateSampler B U b S hb o hR hσ N poly hm τ ξ stride cells center) | |
| namespace AllocatedExternalCandidateProblem | |
| variable {A} {L M : Type} [LieRing L] [LieAlgebra ℚ L] | |
| [LieRing M] [LieAlgebra ℚ M] {r d t : ℕ} | |
| {D : RationalFilteredNilmanifold L r d} {Fmark : NilpotentLieFiltration M t} | |
| {φ : L →ₗ⁅ℚ⁆ M} | |
| {marked : Fmark.realification.PolynomialOrbit (fullTaggedVariableWeight (X := X) J)} | |
| {observable : (X → ℤ) → D → ℂ} {weight : (X → ℤ) → ℂ} | |
| {cost massThreshold scoreThreshold : ℝ} | |
| {P : AllocatedExternalCandidateProblem (E := E) A D Fmark φ marked observable weight | |
| cost massThreshold scoreThreshold} | |
| {outputCost outputMass outputScore : ℝ} | |
| namespace Conclusion | |
| variable (out : P.Conclusion outputCost outputMass outputScore) | |
| local instance : Nonempty A.Site := A.site_nonempty | |
| theorem exists_fixedCenter_retained_forecast_model | |
| (hξone : ξ ≤ 1) (hmargin : ∀ x, 2 * spatialTrimMargin τ N x ≤ N x) | |
| {u p pSlice pTest localBudget Pnative massLog capLog Edata precision 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 ≤ precision) | |
| (hdirect : A.NativeDetection 0 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 precision) | |
| (hSlice : 0 ≤ pSlice) (hcost : outputCost ≤ pSlice) (htest : 2 ≤ pTest) | |
| (hshort : ∀ z : out.retained, ∀ i : {i // ¬(P.chart ⟨z.val, out.subset z.property⟩).keep i}, | |
| (A.sides i.val : ℝ) ≤ Real.exp pSlice) | |
| {Forecast : Type} [Nonempty Forecast] | |
| (data : Forecast → ActualForecastData N poly Pnative massLog capLog Edata) | |
| (input : integerBox N → ℂ) (hinput : ∀ v, ‖input v‖ ≤ Real.exp p) : | |
| let commonBudget := max localBudget (3 * Pnative + 3) | |
| let Qmodel := max commonBudget (2 * u + 4 * p + max 0 massLog + 20) | |
| let native := twistedNativeSampleFunctions (1 : X → ℕ) 0 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) ∧ | |
| A.law.mean (fun z => if hz : z ∈ out.retained then | |
| ‖(out.siteLaw ⟨z, hz⟩).complexMean | |
| (fun t => model.residual (A.physicalBox hξone hmargin z t))‖ else 0) ≤ 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 commonBudget Qmodel native | |
| let packet := out.residualPacket hSlice hcost htest hshort | |
| obtain ⟨model, hmodels, heq, hcoeff, hlocal, hforecast, hterms⟩ := | |
| A.exists_fixedCenter_forecast_model hξone hmargin hu hp hbudget hNative | |
| hSliceLog hC hCp hCap hAccuracy hPrecision hdirect hexcess | |
| (Tests := fun _ => Unit) | |
| (fun _ _ => RationalTorus.trivialNilmanifold 0) | |
| (fun z _ => (packet z).test) | |
| (fun z _ => (packet z).slice.subtypeSites) | |
| (fun z _ i => ((packet z).slice.start i : ℤ)) | |
| (fun z _ => (packet z).stride) | |
| (fun z _ => (packet z).slice.length) | |
| (fun z _ => (packet z).stride_pos) | |
| (fun z _ => (packet z).slice.subtypeSites_image_val.trans | |
| (packet z).slice.integerPoints_eq_commonStrideBox) | |
| (fun z _ => (packet z).slice.subtypeSites_dense (packet z).dense) | |
| (fun z _ => (packet z).complexity) (fun z _ => (packet z).norm) | |
| data input hinput | |
| refine ⟨model, hmodels, heq, hcoeff, ?_, hforecast, hterms⟩ | |
| exact (out.retained_residual_mean_le_sampledSliceSeminorm hSlice hcost htest hshort | |
| (A.physicalBox hξone hmargin) model.residual).trans hlocal | |
| end Conclusion | |
| end AllocatedExternalCandidateProblem | |
| end Erdos3.VectorPolynomial | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 6.15 kB
- Xet hash:
- 5c9cf8e5dcfcb6da0e0b682980d2a3d3c2969c0903fb61fabc4a28b62f94ee34
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.