Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Polynomial /AllocatedPolynomialUniformModel.lean
| import OAI.Combinatorics.Progressions.Estimates.AllocatedFiniteModelPhysicalExpansion | |
| namespace OAI | |
| section | |
| namespace Erdos3.VectorPolynomial | |
| open Module Submodule _root_.Set _root_.OAI.Set | |
| open scoped BigOperators Classical NNReal | |
| variable {m : ℕ} {G : Type*} [Fintype 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)] (U : ∀ j, Submodule ℝ (J j → ℝ)) | |
| variable (b : ∀ j, Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ) | |
| variable {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b R σ) | |
| variable {dim : ℕ} | |
| local notation "rowSets" => (fun j : Fin m => boundedBooleanJetRows (Fin dim) (Fin.val j + 1)) | |
| local notation "rowTypes" => (fun j : Fin m => {t : Finset (Fin dim) // t ∈ rowSets j}) | |
| local notation "rows" => (fun j => (Subtype.val : rowTypes j → Finset (Fin dim))) | |
| local notation "grid" => allocatedGridAxis (I := I) U b S.value | |
| local notation "split" => coefficientJetAxisSplit rowTypes I n grid | |
| local notation "baseVolume" => (allocatedFullGridNaturalVolume B U b S rowSets * | |
| coveredJetArrayScale (O := rowTypes) U * ∏ a, allocatedLongJetOutputScale B U b S (O := rowTypes) a) | |
| variable {E : Fin m → Type*} [∀ j, Fintype (E j)] | |
| variable (x : G → IntegerScalarCubeBox (Fin dim) S.value) | |
| variable (y₀ : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U b S)) | |
| variable (q d period : ℕ) [NeZero d] [NeZero period] | |
| variable (r : ℝ≥0) (hr : 0 < r) | |
| variable (hb : ∀ j, span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j))) | |
| variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j))) | |
| variable (bW : ∀ j, Basis (E j) ℤ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))) | |
| local notation "chart" => mixedCoveredJetChart U o b hb bW d | |
| local notation "region" => mixedCoveredJetRegion (E := E) U o b d | |
| (fun j (_ : rowTypes j) => standardLatticeClosedQuarterBox (J j)) | |
| local notation "cutoff" => allocatedProductSiteCutoff B U b S rowSets o hb bW d r hr | |
| local notation "mask" => allocatedClippedPrefactorSiteMask B U b S rowSets x y₀ q d period | |
| local notation "residue" => (fun j => integerResidueMatrix (allocatedNonkernelJetMatrix B U b S x | |
| (principalAxisRestrict grid y₀) rows j (principalAxisRestrict (fun a => ¬grid a) y₀)) q) | |
| local notation "inverseNormalizer" => ((allocatedProductIdealNormalizer B U b S rowSets : ℝ) : ℂ)⁻¹ | |
| attribute [local instance] ScalarSiteExpansion.termFinite | |
| attribute [local instance 2000] fullGridCoverAxisDecidableEq | |
| variable (e : {a // allocatedGridAxis (I := I) U b S.value a} → ScalarSiteExpansion.{0,0} (Finset (Fin dim))) | |
| theorem exists_allocated_finite_model_polynomial_uniform_expansion | |
| (hdiv : period ∣ d) (hR : ∀ j, 0 < R j) | |
| (C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j) | |
| (hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (b j)).symm v‖ ≤ C j * ‖v‖) | |
| (hbudget : ∀ j, ((rowSets j).card + 1 : ℝ) * (Fintype.card (Finset (Fin dim)) * | |
| (C j * (((Fintype.card (I j) : ℝ) + 1) * (2 * (r : ℝ) * R j)))) ≤ 1 / 4) | |
| (Cforward : Fin m → ℝ≥0) | |
| (hforward : ∀ j v, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (b j) v‖ ≤ Cforward j * ‖v‖) | |
| (K : ℝ≥0) (hK : ∀ j, (R j)⁻¹ ≤ K) | |
| {T : Type*} [Fintype T] (a : T → ℂ) | |
| (f : T → Finset (Fin dim) → (LayerSamplerAxis I n → ℝ) → ℂ) {L : ℝ≥0} | |
| (hf : ∀ k s, LipschitzWith L (f k s)) (hf1 : ∀ k s z, ‖f k s z‖ ≤ 1) | |
| {Nt V Cc Hs : {a // allocatedGridAxis (I := I) U b S.value a} → ℝ} {Lg : ℝ≥0} | |
| (he : ∀ a, (e a).Bounds (Nt a) (V a) (Cc a) Lg (Hs a)) | |
| (Q : ℝ≥0) (hQ : ∀ a, 8 * ((Finset.card (layerIntegerPrincipalSlots (G := G) B | |
| (allocatedGridIntegerAxis B U b S a).1 (allocatedGridIntegerAxis B U b S a).2) : ℝ) + 1) ≤ Q) | |
| : | |
| let Lcoord := K * ∑ j, Cforward j * Fintype.card (J j) | |
| let Llong := (Fintype.card (LayerSamplerAxis I n) * normalizedSiteCutoffBound / (2 * r)) * Lcoord + | |
| max (L * Lcoord * period) (4 * period) | |
| let Lgrid := fun k => max (((Fintype.card {a // allocatedGridAxis (I := I) U b S.value a} * Lg) * Q) * | |
| Lcoord * commonSitePeriod e k) (4 * commonSitePeriod e k) | |
| ∃ g : (Finset (Fin dim) → ((∀ j, Fin (n j) → ZMod period) × (∀ j, E j → ZMod period))) → | |
| T → (∀ a, (e a).Term) → Finset (Fin dim) → | |
| (((JetAmbientIndex (fun _ : Fin m => Unit) J → UnitAddCircle) × ((Σ j, J j) → UnitAddCircle)) × | |
| ((Σ j, J j) → UnitAddCircle)) → ℂ, | |
| (∀ label i k s, LipschitzWith (Llong + Lgrid k) (g label i k s)) ∧ | |
| (∀ label i k s z, ‖g label i k s z‖ ≤ 1) ∧ | |
| ∀ {X : Type*} (p : ∀ j, VectorPolynomial X ℝ (J j → ℝ)), | |
| (∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (p j)) → | |
| ∀ (hm : ∀ j e, coefficients (p j) e ∈ U j), | |
| AllocatedModelPhysicalExpansionIdentity B U b S x y₀ q d period r hr hb o bW e a f p hm g := by | |
| intro Lcoord Llong Lgrid | |
| have hsite (j : Fin m) : C j * (((Fintype.card (I j) : ℝ) + 1) * (2 * (r : ℝ) * R j)) ≤ 1 / 4 := | |
| siteBudget_of_rowBudget (Nat.cast_nonneg _) (by exact_mod_cast Fintype.card_pos) | |
| (mul_nonneg (hC j) (mul_nonneg (by positivity) (mul_nonneg (by positivity) (hR j).le))) (hbudget j) | |
| obtain ⟨gl, hgl, hglb, hlong⟩ := exists_allocated_physical_masked_expansion B U b S x y₀ q d period r hr hb o bW | |
| hdiv hR C hC hchart hsite Cforward hforward K hK a f hf hf1 | |
| obtain ⟨gg, hgg, _, hgrid⟩ := exists_allocated_finite_model_grid_cover B U b hR S d hb o bW e he Q hQ | |
| Cforward hforward K hK r hr C hC hchart hbudget | |
| obtain ⟨g, hgL, hgb, hgv⟩ := finiteNestedSiteExpansion_product_functions gl gg hgl | |
| (fun k s => (hgg k s).1) hglb (fun k s => (hgg k s).2) | |
| refine ⟨g, hgL, hgb, ?_⟩ | |
| intro X p hp hm v | |
| exact hgv | |
| (fun label i => (2 : ℂ) ^ Fintype.card (Finset (Fin dim)) * | |
| allocatedProductMaskedIdealCoefficient B U b S rowSets x y₀ q d period a label i) (coverSiteCoefficient e) | |
| (fun s => physicalMaskedFactorInput period p (fun z => (BooleanCubeKernel.physicalCubeVertexValue v s z : ℝ))) | |
| (fun k s => physicalGridFactorInput (commonSitePeriod e k) p (fun z => (BooleanCubeKernel.physicalCubeVertexValue v s z : ℝ))) | |
| _ _ (hlong p hp hm v) (hgrid x y₀ q period a f p hp hm v) | |
| end Erdos3.VectorPolynomial | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 6.58 kB
- Xet hash:
- 000815c4175c27cac31d48dc70ece6ab198c0e06760217c907a04ecaa5423908
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.