Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /AllocatedBooleanRowsSampling.lean
| import OAI.Combinatorics.Progressions.Probability.AllocatedConditionalSampledError | |
| namespace OAI | |
| section | |
| namespace Erdos3.BooleanCubeKernel | |
| open MeasureTheory Module Submodule VectorPolynomial | |
| open scoped BigOperators Classical NNReal | |
| def AllocatedBooleanRowsSampling (m dim K : ℕ) (O : Fin m → Type) | |
| [∀ j, Fintype (O j)] (rows : ∀ j, O j → Finset (Fin dim)) : Prop := | |
| ∀ {X : Type*} [Fintype X] [DecidableEq X] | |
| {J : Fin m → Type*} [∀ j, Fintype (J j)] | |
| {P : ℝ} (_hP : 0 ≤ P) (_hn : (Fintype.card X : ℝ) ≤ P) | |
| (_hdim : (Fintype.card (Option (Fin dim) × X) : ℝ) ≤ P) | |
| (U : ∀ j, Submodule ℝ (J j → ℝ)) | |
| [CompactSpace (CoefficientTorus (K := Fin dim) U)] | |
| [MeasurableSpace (CoefficientTorus (K := Fin dim) U)] [BorelSpace (CoefficientTorus (K := Fin dim) U)] | |
| (μ : Measure (CoefficientTorus (K := Fin dim) U)) [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ] | |
| (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸ | |
| (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup)) | |
| [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν j)] | |
| (p : ∀ j, VectorPolynomial X ℝ (J j → ℝ)) | |
| (_hp : ∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (p j)) | |
| (hm : ∀ j e, coefficients (p j) e ∈ U j) | |
| (d : ℕ) [NeZero d] | |
| (stride : X → ℕ) (_hs : ∀ x, 0 < stride x) | |
| {R S₀ ρ ε : ℝ} (_hS : 0 ≤ S₀) (_hSP : S₀ ≤ Real.exp P) (_hρ : 0 < ρ) (_hε : 0 < ε) | |
| (_hρP : 1 / ρ ≤ Real.exp P) (_hεP : 1 / ε ≤ Real.exp P) | |
| (_hstride : ∀ x, (stride x : ℝ) ≤ S₀) | |
| (H : X → ℝ) (_hsize : ∀ x, Real.exp ((P + K) ^ K) ≤ H x) | |
| (_hrank : ∀ j, HasLayerSamplingRank (j.val + 1) H R (U j) (p j)) | |
| (_hR : Real.exp ((P + K) ^ K) ≤ R) | |
| (cells : Finset (ColumnResiduePattern (Option (Fin dim)) X stride)) (_hcells : cells.Nonempty) | |
| (W : Option (Fin dim) × X → ℝ) (_hW : ∀ z, 0 < W z) (_hwidth : ∀ z, ρ * H z.2 ≤ W z) | |
| {G : Type*} [Fintype G] {I : Fin m → Type*} [∀ j, Fintype (I j)] {n : Fin m → ℕ} | |
| (B : LayerSamplerAxis I n → Type*) [∀ a, Fintype (B a)] | |
| (b : ∀ j, Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ) | |
| {R₀ σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b R₀ σ) | |
| (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j))) | |
| (laws : ∀ a : {a // allocatedGridAxis (I := I) U b S.value a}, | |
| PMF (CoefficientJetAxisRow O a.val)) | |
| [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))] | |
| (_hb : ∀ j, span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j))) | |
| {Q : Fin m → Type*} [∀ j, Fintype (Q j)] | |
| (_bW : ∀ j, Basis (Q j) ℤ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))) | |
| (η A : ℝ≥0) (C V : Fin m → ℝ≥0) | |
| (_hC : ∀ j w, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (b j) w‖ ≤ C j * ‖w‖) | |
| (_hV : ∀ j, 0 ≤ mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ∧ | |
| mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ≤ V j) | |
| {δ L : ℝ} (_hδ : 0 < δ) (_hL : 0 ≤ L) | |
| (_hamb : (Fintype.card (JetAmbientIndex O J) : ℝ) ≤ L) | |
| (_hδL : δ⁻¹ ≤ Real.exp L), | |
| (allocatedErrorKernelLip B U b S (O := O) η A C V : ℝ) ≤ Real.exp L → | |
| Real.exp ((2 * L + 2) ^ 4) ≤ Real.exp P → | |
| Real.exp (2 * L * (2 * L + 2) ^ 4) * allocatedErrorKernelCap B U b S (O := O) η A V ≤ Real.exp P → | |
| let g := allocatedProbabilityMajorant B U b S o laws η A d | |
| let M := (η : ℝ) * A * | |
| (2 * (∑ j, (C j : ℝ) * ((Fintype.card (J j) : ℝ) + 1)) + 1) ^ | |
| Fintype.card (Σ a : LayerSamplerAxis I n, O a.1) | |
| ∃ _hZ : 0 < ∑' z, selectedResidueSmoothWeight stride cells W z, | |
| selectedResidueDensityMass stride cells W | |
| (fun z => g (physicalCubeRowSample U d rows p hm (standardPhysicalCubeOutput z))) ≤ M + 2 * δ + ε | |
| theorem exists_allocated_standard_rows_sampling (m dim : ℕ) : | |
| ∃ K : ℕ, 2 ≤ K ∧ AllocatedBooleanRowsSampling m dim K | |
| (fun j => BoundedBooleanJet (Fin dim) (j.val + 1)) (fun _ => Subtype.val) := by | |
| obtain ⟨K, hK, htest⟩ := exists_allocated_probability_sampled_mass m dim | |
| refine ⟨K, hK, ?_⟩ | |
| simpa only [AllocatedBooleanRowsSampling, physicalCubeRowSample_standard] using @htest | |
| theorem exists_allocated_boolean_rows_sampling (m dim : ℕ) : | |
| ∃ K : ℕ, 2 ≤ K ∧ ∀ inst : ∀ j : Fin m, | |
| Fintype {s : Finset (Fin dim) // s ∈ boundedBooleanJetRows (Fin dim) (j.val + 1)}, | |
| @AllocatedBooleanRowsSampling m dim K | |
| (fun j => {s : Finset (Fin dim) // s ∈ boundedBooleanJetRows (Fin dim) (j.val + 1)}) | |
| inst (fun _ => Subtype.val) := by | |
| obtain ⟨K, hK, htest⟩ := exists_allocated_standard_rows_sampling m dim | |
| refine ⟨K, hK, ?_⟩ | |
| intro inst | |
| exact boundedBooleanJetRows_family_transport (fun j : Fin m => j.val + 1) | |
| (fun O _ rows => AllocatedBooleanRowsSampling m dim K O rows) (@htest) inst | |
| end Erdos3.BooleanCubeKernel | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 5.12 kB
- Xet hash:
- b13d28f4fd0be34b59c6dbc3cebb885dc9789f765f8d6fa16a26762935f36357
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.