Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /AllocatedFiniteModelGridCover.lean
| import OAI.Combinatorics.Progressions.Estimates.AllocatedRecenteredIdealError | |
| namespace OAI | |
| section | |
| namespace Erdos3.VectorPolynomial | |
| open Module Submodule BooleanCubeKernel | |
| open scoped BigOperators Classical NNReal | |
| attribute [local instance] ScalarSiteExpansion.termFinite | |
| variable {m dim : ℕ} {G : Type*} [Fintype G] | |
| variable {I : Fin m → Type*} [∀ j, Fintype (I j)] [∀ j, DecidableEq (I j)] | |
| variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type*) | |
| variable [∀ 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, 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 b R σ) | |
| variable {E : Fin m → Type*} [∀ j, Fintype (E j)] (d : ℕ) [NeZero d] | |
| 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 "rowSets" => (fun j : Fin m => boundedBooleanJetRows (Fin dim) (Fin.val j + 1)) | |
| local notation "O" => (fun j : Fin m => {t : Finset (Fin dim) // t ∈ rowSets j}) | |
| local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset (Fin dim))) | |
| local notation "grid" => allocatedGridAxis (I := I) U b S.value | |
| local notation "gridAxes" => {a // grid a} | |
| local notation "ig" => allocatedGridIntegerAxis B U b S | |
| local notation "chart" => mixedCoveredJetChart U o b hb bW d | |
| local notation "region" => mixedCoveredJetRegion (E := E) U o b d | |
| (fun j (_ : O j) => standardLatticeClosedQuarterBox (J j)) | |
| attribute [local instance 2000] fullGridCoverAxisDecidableEq | |
| variable (e : {a // allocatedGridAxis (I := I) U b S.value a} → | |
| ScalarSiteExpansion.{0,0} (Finset (Fin dim))) | |
| include hR in | |
| omit [∀ j, DecidableEq (I j)] [∀ a, DecidableEq (B a)] in | |
| theorem exists_allocated_finite_model_grid_cover | |
| {Nt V Cc Hs : gridAxes → ℝ} {L : ℝ≥0} | |
| (he : ∀ a, (e a).Bounds (Nt a) (V a) (Cc a) L (Hs a)) | |
| (Q : ℝ≥0) (hQ : ∀ a : gridAxes, 8 * ((Finset.card (layerIntegerPrincipalSlots (G := G) B | |
| (ig a).1 (ig a).2) : ℝ) + 1) ≤ Q) | |
| (Cforward : Fin m → ℝ≥0) | |
| (hforward : ∀ j v, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (b j) v‖ ≤ Cforward j * ‖v‖) | |
| (K : ℝ≥0) (hK : ∀ j, (R j)⁻¹ ≤ K) | |
| (r : ℝ≥0) (hr : 0 < r) | |
| (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) : | |
| ∃ g : (∀ a, (e a).Term) → Finset (Fin dim) → (((Σ j, J j) → UnitAddCircle) → ℂ), | |
| (∀ k s, LipschitzWith (max (((Fintype.card gridAxes * L) * Q) * | |
| (K * ∑ j, Cforward j * Fintype.card (J j)) * commonSitePeriod e k) | |
| (4 * commonSitePeriod e k)) (g k s) ∧ ∀ v, ‖g k s v‖ ≤ 1) ∧ | |
| (∑ k, ‖coverSiteCoefficient e k‖) ≤ (2 : ℝ) ^ Fintype.card (Finset (Fin dim)) * ∏ a, Cc a ∧ | |
| ∀ (x : G → IntegerScalarCubeBox (Fin dim) S.value) | |
| (y₀ : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U b S)) | |
| (q period : ℕ) [NeZero period] {K₀ : Type*} [Fintype K₀] | |
| (a₀ : K₀ → ℂ) (f : K₀ → Finset (Fin dim) → (LayerSamplerAxis I n → ℝ) → ℂ) | |
| {X : Type*} (p : ∀ j, VectorPolynomial X ℝ (J j → ℝ)), | |
| (∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (p j)) → | |
| ∀ (hm : ∀ j a, coefficients (p j) a ∈ U j) (v : X → (Unit ⊕ Fin dim) → ℤ), | |
| allocatedProductChartIdealApproximation B U b S rowSets x y₀ q d period r hr hb o bW a₀ f | |
| (physicalCubeRowSample U d rows p hm v) * | |
| allocatedFullGridChartModel B U b S rowSets d hb o bW e | |
| (physicalCubeRowSample U d rows p hm v) = | |
| allocatedProductChartIdealApproximation B U b S rowSets x y₀ q d period r hr hb o bW a₀ f | |
| (physicalCubeRowSample U d rows p hm v) * | |
| ∑ k, coverSiteCoefficient e k * ∏ s, | |
| g k s (fun a => (((eval (fun z => (physicalCubeVertexValue v s z : ℝ)) | |
| (p a.1) a.2) / commonSitePeriod e k : ℝ) : UnitAddCircle)) := by | |
| obtain ⟨g, hg, hc, hv⟩ := exists_allocated_cover_site_expansion (G := G) | |
| (A := gridAxes) (S := Finset (Fin dim)) B U b e ig hR he Q hQ | |
| o Cforward hforward K hK hb bW | |
| refine ⟨g, hg, hc, ?_⟩ | |
| intro x y₀ q period _ K₀ _ a₀ f X p hp hm v | |
| let model := allocatedProductChartIdealApproximation B U b S rowSets x y₀ q d period r hr hb o bW a₀ f | |
| by_cases hy : physicalCubeRowSample U d rows p hm v ∈ chart '' region | |
| · obtain ⟨z, hz, hzy⟩ := hy | |
| rw [← hzy, allocatedFullGridChartModel_mixed B U b S rowSets d hb o bW e z hz] | |
| by_cases hzero : model (chart z) = 0 | |
| · change model (chart z) * _ = model (chart z) * _ | |
| rw [hzero, zero_mul, zero_mul] | |
| · have hcut : allocatedProductSiteCutoff B U b S rowSets o hb bW d r hr (chart z) ≠ 0 := by | |
| intro hcut | |
| apply hzero | |
| unfold model allocatedProductChartIdealApproximation | |
| apply Finset.sum_eq_zero | |
| intro label _ | |
| apply Finset.sum_eq_zero | |
| intro k _ | |
| rw [allocatedMaskedChartProduct_zero_of_cutoff_zero B U b S o hb bW d r hr period rowSets | |
| (f k) label _ hcut, mul_zero] | |
| have hs := allocatedProductSiteCutoff_sites_quarter B U b S rowSets o hb bW d r hr hR | |
| C hC hchart hbudget z hz hcut | |
| have hmatch := physicalRowChart_base_matching U o b hb bW d p hp hm v z hzy | |
| have hval := hv | |
| (fun s => physicalEuclideanSitePoint U p hm (fun z => (physicalCubeVertexValue v s z : ℝ))) | |
| (fun s j => mixedArrayRegroup (I j) (Fin (n j)) Unit | |
| ((mixedCoveredRowsSiteValue rowSets d z s).1 j) ()) hmatch | |
| (fun s j i => (hs s j (Set.mem_univ j) () (Set.mem_univ ())).1 i) | |
| apply congrArg (fun c : ℂ => model (chart z) * c) | |
| rw [allocatedFullGridSiteApproximation_mixed B U b S rowSets d e z] | |
| simpa only [allocatedGridNaturalScale, physicalEuclideanSitePoint_apply, | |
| mixedArrayRegroup_apply] using hval.symm | |
| · rw [allocatedProductChartIdealApproximation_zero_outside B U b S rowSets x y₀ q d period r hr hb o bW | |
| hR C hC hchart hbudget a₀ f _ hy, zero_mul, zero_mul] | |
| end Erdos3.VectorPolynomial | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 6.83 kB
- Xet hash:
- 9d4f5c1af60f85e86eae2fe36079371b46735927282aef1348cc421905c2f323
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.