cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Sampling /PhysicalCoveredL1Sampling.lean
cfahlgren1's picture
download
raw
5.72 kB
import OAI.Combinatorics.Progressions.Estimates.NativePhysicalHaarExpansion
namespace OAI
section
namespace Erdos3.BooleanCubeKernel
open MeasureTheory VectorPolynomial
open scoped BigOperators Classical NNReal
theorem exists_physical_covered_l1_sampling (m dim : ℕ) :
∃ A : ℕ, 2 ≤ A ∧ ∀ {I : Type*}
[Fintype I] [DecidableEq I]
{J : Fin m → Type*} [∀ j, Fintype (J j)]
{P : ℝ} (_hP : 0 ≤ P) (_hn : (Fintype.card I : ℝ) ≤ P)
(_hd : (Fintype.card (Option (Fin dim) × I) : ℝ) ≤ 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 I ℝ (J j → ℝ))
(_hp : ∀ j, DegreeLE (1 : I → ℕ) (j.val + 1) (p j))
(_hm : ∀ j d, coefficients (p j) d ∈ U j)
(q : ℕ) (_hq : 0 < q) (_hqP : (q : ℝ) ≤ Real.exp P)
(stride : I → ℕ) (_hs : ∀ k, 0 < stride k)
{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 : ∀ k, (stride k : ℝ) ≤ S)
(H : I → ℝ) (_hsize : ∀ k, Real.exp ((P + A) ^ A) ≤ H k)
(_hrank : ∀ i, HasLayerSamplingRank (i.val + 1) H R (U i) (p i))
(_hR : Real.exp ((P + A) ^ A) ≤ R)
(G : Finset (ColumnResiduePattern (Option (Fin dim)) I stride)) (_hG : G.Nonempty)
(V : Option (Fin dim) × I → ℝ) (_hV : ∀ z, 0 < V z) (_hwidth : ∀ z, ρ * H z.2 ≤ V z)
(f g : (JetAmbientIndex (fun j : Fin m => BoundedBooleanJet (Fin dim) (j.val + 1)) J → UnitAddCircle) → ℂ)
(Lf Lg Cf Cg : ℝ≥0) (_hf : LipschitzWith Lf f) (_hg : LipschitzWith Lg g)
(_hfb : ∀ y, ‖f y‖ ≤ Cf) (_hgb : ∀ y, ‖g y‖ ≤ Cg)
{η Q : ℝ} (_hη : 0 < η) (_hQ : 0 ≤ Q)
(_hdim : (Fintype.card (CoefficientAmbientIndex (Fin dim) J) : ℝ) ≤ Q)
(_hLQ : (((Lf + Lg) * ∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0) : ℝ≥0) : ℝ) ≤ Real.exp Q) (_hηQ : η⁻¹ ≤ Real.exp Q)
(_hfreqP : Real.exp ((2 * Q + 2) ^ 4) ≤ Real.exp P)
(_hcoeffP : Real.exp (2 * Q * (2 * Q + 2) ^ 4) * (Cf + Cg : ℝ≥0) ≤ Real.exp P)
{E : ℝ} (_hmass : (∫ y, ‖f (coveredJetAmbientTorus U 1 y) -
g (coveredJetAmbientTorus U 1 y)‖
∂Measure.pi (fun j => Measure.pi (fun _ : BoundedBooleanJet (Fin dim) (j.val + 1) => ν j))) ≤ E),
∃ _hZ : 0 < ∑' x, selectedResidueSmoothWeight stride G V x,
selectedResidueDensityMass stride G V (fun z =>
‖f (coveredJetAmbientTorus U 1
(physicalCubeEuclideanSample U q p _hm (standardPhysicalCubeOutput z))) -
g (coveredJetAmbientTorus U 1
(physicalCubeEuclideanSample U q p _hm (standardPhysicalCubeOutput z)))‖) ≤ E + 2 * η + ε := by
obtain ⟨A, hA, hsample⟩ := exists_coefficient_ambient_l1_sampling m
refine ⟨A, hA, ?_⟩
intro I _ _ J _ P hP hn hd U _ _ _ μ _ _ ν _ _ p hp hm q hq hqP stride hs R S ρ ε
hS hSP hρ hε hρP hεP hstride H hsize hrank hR G hG V hV hwidth
f g Lf Lg Cf Cg hf hg hfb hgb η Q hη hQ hdim hLQ hηQ hfreqP hcoeffP E hmass
let rows := fun j : Fin m => (Subtype.val : BoundedBooleanJet (Fin dim) (j.val + 1) → Finset (Fin dim))
let jet := coefficientAmbientRowsJet (J := J) rows
let Ljet : ℝ≥0 := ∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0)
have hjet : LipschitzWith Ljet jet := coefficientAmbientRowsJet_lipschitz rows
have hhaar : (∫ x, ‖f (jet (coefficientAmbientTorus U x)) -
g (jet (coefficientAmbientTorus U x))‖ ∂μ) ≤ E := by
let error := fun y => ‖f (coveredJetAmbientTorus U 1 y) - g (coveredJetAmbientTorus U 1 y)‖
have hp := standardPhysicalJetMap_measurePreserving (q := dim) U μ ν
have he : AEStronglyMeasurable error (Measure.map (standardPhysicalJetMap U) μ) := by
rw [hp.map_eq]
exact (((hf.continuous.comp (coveredJetAmbientTorus_continuous U 1)).sub
(hg.continuous.comp (coveredJetAmbientTorus_continuous U 1))).norm).aestronglyMeasurable
have hi := (integral_map hp.measurable.aemeasurable he).symm
rw [hp.map_eq] at hi
simp only [jet, coefficientAmbientRowsJet_eq]
exact hi.trans_le hmass
have hLip : (((Lf * Ljet + Lg * Ljet : ℝ≥0) : ℝ)) ≤ Real.exp Q := by
simpa only [add_mul] using hLQ
obtain ⟨hZ, he⟩ := hsample hP hn hd U μ p hp hm q hq hqP stride hs
hS hSP hρ hε hρP hεP hstride H hsize hrank hR G hG V hV hwidth
(fun z => f (jet z)) (fun z => g (jet z)) (Lf * Ljet) (Lg * Ljet) Cf Cg
(hf.comp hjet) (hg.comp hjet) (fun z => hfb _) (fun z => hgb _)
hη hQ hdim hLip hηQ hfreqP hcoeffP hhaar
refine ⟨hZ, ?_⟩
have hid (z : Option (Fin dim) × I → ℤ) :
jet (coefficientAmbientTorus U (affineCoefficientCoverSample U p hm q
(fun k j => (z (k,j) : ℝ)))) =
coveredJetAmbientTorus U 1
(physicalCubeEuclideanSample U q p hm (standardPhysicalCubeOutput z)) :=
(coefficientAmbientRowsJet_eq rows U _).trans
(congrArg (coveredJetAmbientTorus U 1) (coefficientCoverSample_standardPhysicalJet U q p hp hm z))
simpa only [hid] using he
end Erdos3.BooleanCubeKernel
end
end OAI

Xet Storage Details

Size:
5.72 kB
·
Xet hash:
7a6b9dfd0704c9a6cd36cf1bf003d4be0a57bfc29d98d7da18e202be10a7c732

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.