cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Estimates /AllocatedCanonicalUniformCoarseSource.lean
cfahlgren1's picture
download
raw
56.3 kB
import OAI.Combinatorics.Progressions.Linear.AllocatedCanonicalProjectionBudget
import OAI.Combinatorics.Progressions.Linear.AllocatedCanonicalSlicedConstructedProjection
import OAI.Combinatorics.Progressions.Probability.AllocatedCanonicalSlicedProbabilitySource
namespace OAI
section
namespace Erdos3.VectorPolynomial
universe uX uJ uO uG uI uB
open BooleanCubeKernel MeasureTheory
open scoped BigOperators Classical NNReal
attribute [local instance 2000] fullBooleanRowSetFintype
variable {m : ℕ} {G : Type uG} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type uI} [∀ j, Fintype (I j)]
variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type uB)
variable [∀ a, Fintype (B a)]
variable {J : Fin m → Type uJ} [∀ j, Fintype (J j)]
variable (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (b : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b R σ)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (hb : ∀ j, Submodule.span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j) (Cproj Vproj : Fin m → ℝ≥0)
variable {dim : ℕ}
local notation "grid" => allocatedGridAxis (I := I) U b S.value
local notation "sides" => allocatedPrincipalSides B U b S
local notation "fullTuple" => PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) sides
variable (X : Type uX) [Fintype X] [DecidableEq X] (modulus : ℕ) (q : X → ℕ)
local notation "refined" => residueRefinedPeriod modulus q
local notation "labels" => (PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod refined)
variable (H step : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH : ∀ j, 0 < H j)
variable (hsubset : ∀ j, integerProgressionSupport (c j) (step j : ℤ) (H j) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U b S j : ℤ))
variable (label₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) →
ZMod (residueRefinedPeriod modulus q))
variable (hcell : 0 < (principalTupleWeights (α := Fin dim) B (layerSamplerDegree I n) H hH).mass
(Finset.univ.filter (fun y => principalResidueLabel (residueRefinedPeriod modulus q) y = label₀)))
variable (y₀ : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U b S))
variable (hy₀ : 0 < (containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) H step c (allocatedPrincipalSides_pos B U b S)
hH hsubset (residueRefinedPeriod modulus q) label₀ hcell).weight y₀)
local notation "law" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) H step c (allocatedPrincipalSides_pos B U b S)
hH hsubset refined label₀ hcell
local notation "wholeReference" => (fun _ : labels => y₀)
variable (x : G → IntegerScalarCubeBox (Fin dim) S.value)
variable [NeZero modulus] {M : ℕ} (hM : 0 < M) (selection : Fin dim ↪ G)
variable (hx : GoodScalarKernelTuple selection (1 / (M : ℝ)) M x)
variable (hcanonical : modulus = kernelPeriodCandidate (m + 1) (goodKernelUniformCandidate selection x hx m))
variable (N : X → ℕ) {W τ ξ : ℝ} (hW : 0 ≤ W) (mesh : ℝ)
variable (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) X q))
local notation "O" => (fun j : Fin m => (boundedBooleanJetRows (Fin dim) (Fin.val j + 1) : Type))
local notation "rows" => (fun j => (Subtype.val : O j → Finset (Fin dim)))
variable (cover : ℕ) (poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ))
variable (hp : ∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (poly j))
variable (hm : ∀ j ex, coefficients (poly j) ex ∈ U j)
local notation "point" => physicalCubeRowSample U cover rows poly hm
variable (signal : (X → ℤ) → ℂ) (hsignal : ∀ u, ‖signal u‖ ≤ 1)
local notation "test" => physicalCubeSiteTest (integerSelfSiteTest dim signal)
local notation "window" => spatialWindow (α := Fin dim) (trimmedSpatialRootScale τ N q) 4
variable (hN : ∀ t, 0 < N t) (hq : ∀ t, 0 < q t) (hτ : 0 < τ)
variable {C₀ ρ δ : ℝ} (hρ : 0 < ρ)
variable (hbudget : allocatedPhysicalRootBudget B U b S (fun _ => 0) ≤ W)
variable (hC₀ : 1 ≤ C₀) (hLC : (S.value : ℝ) ≤ C₀) (hWC : W ≤ C₀)
variable (hξ : 0 < ξ) (hξ1 : ξ ≤ 1)
variable (hsize : ∀ t, 8 * (1 + W) * (q t : ℝ) * ρ ≤ (ξ * τ) * (N t : ℝ))
variable (hmesh : anisotropicSpatialMeshThreshold selection (PrincipalTupleIndex B (layerSamplerDegree I n)) C₀ ≤ ρ)
variable (hρ8 : 8 * (probabilityProfileLipschitz : ℝ) ≤ ρ)
variable (hδ : 0 ≤ δ)
variable (hρshift : 2 * (Fintype.card (Option (LayerSamplerVariables G I n B)) *
(2 * allocatedPhysicalEntryBudget B U b S (fun _ => 0))) ≤ ρ)
variable (hρmove : Fintype.card (PrincipalTupleIndex B (layerSamplerDegree I n)) *
(2 * allocatedPhysicalEntryBudget B U b S (fun _ => 0)) ≤ δ * ρ)
variable (hmeshpos : 0 < mesh)
variable (hmass : 0 < ∑' z, selectedResidueSmoothWeight q cells
(narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N) z)
local notation "spatialError" => allocatedTupleSpatialError (Fintype.card X) selection
(PrincipalTupleIndex B (layerSamplerDegree I n)) M modulus C₀ ρ ξ W δ mesh
local notation "boundaryError" => (24 * (probabilityProfileLipschitz : ℝ) *
Fintype.card (Option (LayerSamplerVariables G I n B) × X) / ρ)
variable [CompactSpace (CoefficientTorus (K := Fin dim) U)]
variable [MeasurableSpace (CoefficientTorus (K := Fin dim) U)]
variable [BorelSpace (CoefficientTorus (K := Fin dim) U)]
variable (μ : Measure (CoefficientTorus (K := Fin dim) U)) [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν j)]
local notation "jetHaar" => Measure.pi (fun j => @Measure.pi (O j) _
(fullBooleanRowSetFintype dim (Fin.val j + 1)) _ (fun _ : O j => ν j))
include hp μ hN hq hτ hρ hbudget hC₀ hLC hWC hξ hξ1 hsize hmesh hρ8
hcanonical hδ hρshift hρmove hmeshpos hy₀ hsignal in
theorem AllocatedSlicedSourceProjection.canonical_coarse_source
(g : fullTuple → EuclideanJetLayers U O → ℝ)
(hg0 : ∀ y z, 0 ≤ g y z) (hgi : ∀ y, Integrable (g y) jetHaar)
(hgmass : ∀ y, (∫ z, g y z ∂jetHaar) = 1)
(Lf Cf : ℝ≥0)
(hambient : ∀ y, ∃ f : (JetAmbientIndex O J → UnitAddCircle) → ℂ,
LipschitzWith Lf f ∧ (∀ z, ‖f z‖ ≤ Cf) ∧
∀ z, (g y z : ℂ) = f (coveredJetAmbientTorus U 1 z))
{Pmass Rrank : ℝ} (hPmass : 0 ≤ Pmass)
(hXmass : (Fintype.card X : ℝ) ≤ Pmass)
(hframe : (Fintype.card (Option (Fin dim) × X) : ℝ) ≤ Pmass)
(hcover : 0 < cover) (hcoverP : (cover : ℝ) ≤ Real.exp Pmass)
(hstrideP : ∀ i, (q i : ℝ) ≤ Real.exp Pmass)
(hτP : 1 / τ ≤ Real.exp Pmass)
(hsizeMass : ∀ i, Real.exp ((Pmass + Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ^ Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ≤ (N i : ℝ))
(hrank : ∀ j, HasLayerSamplingRank (j.val + 1) (fun i => (N i : ℝ)) Rrank (U j) (poly j))
(hRrank : Real.exp ((Pmass + Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ^ Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ≤ Rrank)
(hamb : (Fintype.card (CoefficientAmbientIndex (Fin dim) J) : ℝ) ≤ Pmass)
(hLf : (Lf : ℝ) ≤ Real.exp Pmass) (hCf : (Cf : ℝ) ≤ Real.exp Pmass)
(hjet : ((∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0) : ℝ≥0) : ℝ) ≤ Real.exp Pmass)
{Cg : ℝ} (hCg : 0 ≤ Cg)
(hcap : ∀ y, (law).weight y ≠ 0 → ∀ v, ‖(g y (point v) : ℂ)‖ ≤ Cg) {target κ : ℝ}
(hboundary : Cg * boundaryError ≤ normalizedSpatialShare target / 2)
(hsite : spatialError * coarseReferenceMassConstant dim X W S.value ≤ normalizedSpatialShare target / 2)
{p E : ℝ} (hpBudget : 0 ≤ p) (hE : 0 ≤ E)
(hG : (Fintype.card G : ℝ) ≤ p) (hX : (Fintype.card X : ℝ) ≤ p)
(hdim : ((dim + 1 : ℕ) : ℝ) ≤ p)
(hMP : (M : ℝ) ≤ Real.exp p)
(hvars : (Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Real.exp p)
(hWscale : W ≤ Fintype.card (LayerSamplerVariables G I n B) * (S.value : ℝ))
(hmeshCoarse : mesh ≤ allocatedEarlyRecenteredMesh X selection M modulus p E)
{Asample : ℕ} {Pproj : ℝ}
(hprojection : AllocatedSlicedSourceProjection.{uX} B U b S x hb o hR hσ Cproj Vproj cover g Asample Pproj)
(hPproj : 1 ≤ Pproj) (hmProj : (m : ℝ) ≤ Pproj)
(hKproj : (Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Pproj)
(hWproj : W ≤ Real.exp Pproj)
(hRproj : ∀ j, (R j)⁻¹ ≤ Real.exp Pproj) (hσproj : ∀ j, (σ j)⁻¹ ≤ Real.exp Pproj)
(hcountProj : ∀ j : Fin m,
(Fintype.card (BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) ≤ Pproj)
(hIproj : ∀ j, (Fintype.card (I j) : ℝ) ≤ Pproj) (hnProj : ∀ j, (n j : ℝ) ≤ Pproj)
(hJproj : ∀ j, (Fintype.card (J j) : ℝ) ≤ Pproj)
(hProfileProj : (probabilityProfileLipschitz : ℝ) ≤ Real.exp Pproj)
(hCproj : ∀ j, (Cproj j : ℝ) ≤ Real.exp Pproj) (hVproj : ∀ j, (Vproj j : ℝ) ≤ Real.exp Pproj)
(hXproj : (Fintype.card X : ℝ) ≤ Pproj)
(hFrameProj : (Fintype.card (Option (LayerSamplerVariables G I n B) × X) : ℝ) ≤ Pproj)
(hStrideProj : ∀ i, (q i : ℝ) ≤ Real.exp Pproj)
(hτProj : τ⁻¹ ≤ Real.exp Pproj) (hξProj : ξ⁻¹ ≤ Real.exp Pproj)
(hSizeProj : ∀ i, Real.exp ((Pproj + Asample) ^ Asample) ≤ (N i : ℝ))
(hRankProj : Real.exp ((Pproj + Asample) ^ Asample) ≤ Rrank)
(hCells : cells.Nonempty) (bases : Finset (X → ℤ)) (hbases : bases.Nonempty) :
let V := narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N
let Z := selectedJointDensityMass bases q cells V
(allocatedJointBaseDensity B U b hb o hR hσ S X poly hm)
κ ≤ ((law).complexMean (fun y => allocatedSlicedTupleValue B U b hb o hR hσ S X poly hm
N hN hW hτ hξ q cells hmass bases x y signal)).re →
∃ base ∈ bases, Z ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧
Z * (κ - Real.exp (-Pproj) - Real.exp (-target)) - Real.exp (-E) ≤
((law).complexMean (allocatedRecenteredProfileTerm (τ := τ) (ξ := ξ)
B U b S X modulus q wholeReference x hM selection hx N hW
(allocatedEarlyRecenteredMesh X selection M modulus p E) base cells point test
(fun y z => (g y z : ℂ)))).re := by
intro V Z hsource
have hinj : ∀ j, Function.Injective (rows j) := fun j => Subtype.val_injective
have hcard : ∀ j (a : O j), (rows j a).card ≤ j.val + 1 := by
intro j a
simpa only [boundedBooleanJetRows, Finset.mem_filter, Finset.mem_univ, true_and] using a.property
have htest : ∀ v, ‖test v‖ ≤ 1 :=
physicalCubeSiteTest_norm_le _ (integerSelfSiteTest_norm_le dim signal hsignal)
have hcoarse (base : X → ℤ) (hZ : 1 / 2 ≤ Z) :=
allocatedCanonicalSlice_probability_coarse_source (κ := κ - Real.exp (-Pproj)) B U b S X modulus q
H step c hH hsubset label₀ hcell y₀ hy₀ x hM selection hx hcanonical N hW mesh base cells
rows hinj hcard cover poly hp hm test hN hq hτ hρ hbudget hC₀ hLC hWC hξ hξ1 hsize hmesh hρ8
hδ hρshift hρmove hmeshpos hmass htest μ ν g hg0 hgi hgmass Lf Cf hambient
hPmass hXmass hframe hcover hcoverP hstrideP hτP hsizeMass hrank hRrank hamb hLf hCf hjet
hCg hcap hZ hboundary hsite hpBudget hE hG hX hdim hMP hvars hWscale hmeshCoarse
generalize hlaweq : (law) = law₀ at hsource hcoarse ⊢
obtain ⟨hmass', hnormal, hproject⟩ := hprojection hPproj hmProj hKproj hW hbudget hWproj
hRproj hσproj hcountProj hIproj hnProj hJproj hProfileProj hCproj hVproj hXproj hFrameProj
poly hp hm q hq hStrideProj hτ hτProj hξ hξ1 hξProj N hN hSizeProj hrank hRankProj cells hCells bases hbases
obtain ⟨base, hbase, hbaseSource⟩ := hproject law₀ signal hsignal hsource
exact ⟨base, hbase, hnormal.2.1, hcoarse base hnormal.2.1.1 hbaseSource⟩
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
universe uX uJ uO uG uI uB
open BooleanCubeKernel MeasureTheory
open scoped BigOperators Classical NNReal
attribute [local instance 2000] fullBooleanRowSetFintype
private theorem canonical_rows_ambient_reinstance
{m dim : ℕ} {J : Fin m → Type*} [∀ j, Fintype (J j)]
(U : ∀ j, Submodule ℝ (J j → ℝ)) {Y : Type*}
(v : Y → EuclideanJetLayers U
(fun j : Fin m => (boundedBooleanJetRows (Fin dim) (j.val + 1) : Type)) → ℂ)
(L : ℝ≥0) (C : ℝ) (L' : ℝ≥0) (C' : ℝ) (hL : L ≤ L') (hC : C ≤ C')
(h : letI : ∀ j : Fin m, Fintype (boundedBooleanJetRows (Fin dim) (j.val + 1) : Type) :=
fun j => Subtype.fintype (fun t : Finset (Fin dim) => t ∈ boundedBooleanJetRows (Fin dim) (j.val + 1))
∀ y, ∃ f : (JetAmbientIndex
(fun j : Fin m => (boundedBooleanJetRows (Fin dim) (j.val + 1) : Type)) J → UnitAddCircle) → ℂ,
LipschitzWith L f ∧ (∀ z, ‖f z‖ ≤ C) ∧
∀ z, v y z = f (coveredJetAmbientTorus U 1 z)) :
∀ y, ∃ f : (JetAmbientIndex
(fun j : Fin m => (boundedBooleanJetRows (Fin dim) (j.val + 1) : Type)) J → UnitAddCircle) → ℂ,
LipschitzWith L' f ∧ (∀ z, ‖f z‖ ≤ C') ∧
∀ z, v y z = f (coveredJetAmbientTorus U 1 z) := by
let property (inst : ∀ j : Fin m, Fintype (boundedBooleanJetRows (Fin dim) (j.val + 1) : Type)) : Prop :=
letI := inst
∀ y, ∃ f : (JetAmbientIndex
(fun j : Fin m => (boundedBooleanJetRows (Fin dim) (j.val + 1) : Type)) J → UnitAddCircle) → ℂ,
LipschitzWith L f ∧ (∀ z, ‖f z‖ ≤ C) ∧
∀ z, v y z = f (coveredJetAmbientTorus U 1 z)
have hinst : (fun j : Fin m =>
Subtype.fintype (fun t : Finset (Fin dim) => t ∈ boundedBooleanJetRows (Fin dim) (j.val + 1))) =
(fun j : Fin m => fullBooleanRowSetFintype dim (j.val + 1)) := Subsingleton.elim _ _
have hsame : property (fun j : Fin m => fullBooleanRowSetFintype dim (j.val + 1)) :=
Eq.mp (congrArg property hinst) h
intro y
obtain ⟨f, hf, hbound, heq⟩ := hsame y
exact ⟨f, hf.weaken hL, fun z => (hbound z).trans hC, heq⟩
variable {m : ℕ} {G : Type uG} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type uI} [∀ j, Fintype (I j)]
variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type uB)
variable [∀ a, Fintype (B a)]
variable {J : Fin m → Type uJ} [∀ j, Fintype (J j)]
variable (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (b : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b R σ)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (hb : ∀ j, Submodule.span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j) (Cproj Vproj : Fin m → ℝ≥0)
variable {dim : ℕ}
local notation "grid" => allocatedGridAxis (I := I) U b S.value
local notation "sides" => allocatedPrincipalSides B U b S
local notation "fullTuple" => PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) sides
variable (X : Type uX) [Fintype X] [DecidableEq X] (modulus : ℕ) (q : X → ℕ)
local notation "refined" => residueRefinedPeriod modulus q
local notation "labels" => (PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod refined)
variable (H step : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH : ∀ j, 0 < H j)
variable (hsubset : ∀ j, integerProgressionSupport (c j) (step j : ℤ) (H j) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U b S j : ℤ))
variable (label₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) →
ZMod (residueRefinedPeriod modulus q))
variable (hcell : 0 < (principalTupleWeights (α := Fin dim) B (layerSamplerDegree I n) H hH).mass
(Finset.univ.filter (fun y => principalResidueLabel (residueRefinedPeriod modulus q) y = label₀)))
variable (y₀ : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U b S))
variable (hy₀ : 0 < (containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) H step c (allocatedPrincipalSides_pos B U b S)
hH hsubset (residueRefinedPeriod modulus q) label₀ hcell).weight y₀)
local notation "law" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) H step c (allocatedPrincipalSides_pos B U b S)
hH hsubset refined label₀ hcell
local notation "wholeReference" => (fun _ : labels => y₀)
variable (x : G → IntegerScalarCubeBox (Fin dim) S.value)
variable [NeZero modulus] {M : ℕ} (hM : 0 < M) (selection : Fin dim ↪ G)
variable (hx : GoodScalarKernelTuple selection (1 / (M : ℝ)) M x)
variable (hcanonical : modulus = kernelPeriodCandidate (m + 1) (goodKernelUniformCandidate selection x hx m))
variable (N : X → ℕ) {W τ ξ : ℝ} (hW : 0 ≤ W) (mesh : ℝ)
variable (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) X q))
local notation "O" => (fun j : Fin m => (boundedBooleanJetRows (Fin dim) (Fin.val j + 1) : Type))
local notation "rows" => (fun j => (Subtype.val : O j → Finset (Fin dim)))
variable (poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ))
variable (hp : ∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (poly j))
variable (hm : ∀ j ex, coefficients (poly j) ex ∈ U j)
local notation "point" d => physicalCubeRowSample U d rows poly hm
variable (signal : (X → ℤ) → ℂ) (hsignal : ∀ u, ‖signal u‖ ≤ 1)
local notation "test" => physicalCubeSiteTest (integerSelfSiteTest dim signal)
local notation "window" => spatialWindow (α := Fin dim) (trimmedSpatialRootScale τ N q) 4
variable (hN : ∀ t, 0 < N t) (hq : ∀ t, 0 < q t) (hτ : 0 < τ)
variable {C₀ ρ δ : ℝ} (hρ : 0 < ρ)
variable (hbudget : allocatedPhysicalRootBudget B U b S (fun _ => 0) ≤ W)
variable (hC₀ : 1 ≤ C₀) (hLC : (S.value : ℝ) ≤ C₀) (hWC : W ≤ C₀)
variable (hξ : 0 < ξ) (hξ1 : ξ ≤ 1)
variable (hsize : ∀ t, 8 * (1 + W) * (q t : ℝ) * ρ ≤ (ξ * τ) * (N t : ℝ))
variable (hmesh : anisotropicSpatialMeshThreshold selection (PrincipalTupleIndex B (layerSamplerDegree I n)) C₀ ≤ ρ)
variable (hρ8 : 8 * (probabilityProfileLipschitz : ℝ) ≤ ρ)
variable (hδ : 0 ≤ δ)
variable (hρshift : 2 * (Fintype.card (Option (LayerSamplerVariables G I n B)) *
(2 * allocatedPhysicalEntryBudget B U b S (fun _ => 0))) ≤ ρ)
variable (hρmove : Fintype.card (PrincipalTupleIndex B (layerSamplerDegree I n)) *
(2 * allocatedPhysicalEntryBudget B U b S (fun _ => 0)) ≤ δ * ρ)
variable (hmeshpos : 0 < mesh)
variable (hmass : 0 < ∑' z, selectedResidueSmoothWeight q cells
(narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N) z)
local notation "spatialError" => allocatedTupleSpatialError (Fintype.card X) selection
(PrincipalTupleIndex B (layerSamplerDegree I n)) M modulus C₀ ρ ξ W δ mesh
local notation "boundaryError" => (24 * (probabilityProfileLipschitz : ℝ) *
Fintype.card (Option (LayerSamplerVariables G I n B) × X) / ρ)
variable [CompactSpace (CoefficientTorus (K := Fin dim) U)]
variable [MeasurableSpace (CoefficientTorus (K := Fin dim) U)]
variable [BorelSpace (CoefficientTorus (K := Fin dim) U)]
variable (μ : Measure (CoefficientTorus (K := Fin dim) U)) [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν j)]
local notation "jetHaar" => Measure.pi (fun j => @Measure.pi (O j) _
(fullBooleanRowSetFintype dim (Fin.val j + 1)) _ (fun _ : O j => ν j))
variable [CompactSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [MeasurableSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [BorelSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [MeasurableSpace (SiteTorus (Finset (Fin dim)) U)]
variable [BorelSpace (SiteTorus (Finset (Fin dim)) U)]
variable (μcoeff : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μcoeff.IsAddLeftInvariant] [IsProbabilityMeasure μcoeff]
include μ in
theorem exists_allocatedCanonicalSlice_projection_data
{Pproj Pk : ℝ} (hPproj0 : 0 ≤ Pproj) (hGproj : (Fintype.card G : ℝ) ≤ Pproj)
(hLproj : (S.value : ℝ) ≤ Real.exp Pproj)
(hMkPk : (M : ℝ) ≤ Real.exp Pk) (hperiodP : ((m + 1 : ℕ) : ℝ) * Pk ≤ Pproj)
(hCactual : ∀ j z, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (b j) z‖ ≤ Cproj j * ‖z‖)
(hVactual : ∀ j, 0 ≤ mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ∧
mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ≤ Vproj j)
(hσ1 : ∀ j, σ j ≤ 1) (Cinv : Fin m → ℝ) (hCinv : ∀ j, 0 ≤ Cinv j)
(hchart : ∀ j z, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (b j)).symm z‖ ≤ Cinv j * ‖z‖)
(hsmall : ∀ j, Cinv j * ((Fintype.card (I j) : ℝ) + 1) * R j ≤ 1 / 4)
(Lf Cf : ℝ≥0)
:
let Acover := Classical.choose (exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim)
let coverLog := (Pproj + (dim + 2 : ℕ) + Acover) ^ Acover
let cap := (allocatedAmbientFactorCap (G := G) B R σ S.value Vproj : ℝ) ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m)
let densityLip := Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m) *
allocatedAmbientFactorLip (G := G) B R σ S.value (fun j => Fintype.card (J j)) Cproj Vproj *
allocatedAmbientFactorCap (G := G) B R σ S.value Vproj ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m)
let sectionLip := (Fintype.card (Finset (Fin dim)) : ℝ≥0) * Real.toNNReal (Real.exp coverLog)
let reconstructionLip := ∑ j : Fin m, (Fintype.card (BoundedBooleanJet (Fin dim) (j.val + 1)) : ℝ≥0)
densityLip * sectionLip * reconstructionLip ≤ Lf → cap ≤ Cf →
∃ cover : ℕ, kernelPeriodCandidate (m + 1) (goodKernelUniformCandidate selection x hx m) ∣ cover ∧ 0 < cover ∧ (cover : ℝ) ≤ Real.exp coverLog ∧
∃ g : fullTuple → EuclideanJetLayers U O → ℝ,
(∀ y, Continuous (g y)) ∧
(∀ y z, g y z ∈ Set.Icc (0 : ℝ) cap) ∧
(∀ y, Integrable (g y) jetHaar) ∧
(∀ y, (∫ z, g y z ∂jetHaar) = 1) ∧
(∀ y, (realDensityMeasure μcoeff (fun z => allocatedCoefficientDensity B U b hb o hR hσ S
(quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) cover z))).map
(euclideanCoefficientJetMap U (allocatedPhysicalCubeRoot B U b S (fun _ => 0) x y)
(allocatedPhysicalCubeDirections B U b S x y) rows) = realDensityMeasure jetHaar (g y)) ∧
(∀ y, ∃ f : (JetAmbientIndex O J → UnitAddCircle) → ℂ,
LipschitzWith Lf f ∧ (∀ z, ‖f z‖ ≤ Cf) ∧
∀ z, (g y z : ℂ) = f (coveredJetAmbientTorus U 1 z)) ∧
(∀ law₁ : FiniteProbabilityWeights fullTuple,
∃ F : (JetAmbientIndex O J → UnitAddCircle) → ℂ,
LipschitzWith Lf F ∧ (∀ z, ‖F z‖ ≤ Cf) ∧
∀ z, law₁.complexMean (fun y => (g y z : ℂ)) = F (coveredJetAmbientTorus U 1 z)) ∧
AllocatedSlicedSourceProjection.{uX} B U b S x hb o hR hσ Cproj Vproj cover g
(Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) Pproj := by
intro Acover coverLog cap densityLip sectionLip reconstructionLip hLipBudget hCfBudget
obtain ⟨cover, hdiv, hcover, hcoverBound, hdata⟩ :=
(Classical.choose_spec (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))).2.2
(G := G) (I := I) (n := n) (J := J) B U b S x
hPproj0 hGproj hLproj selection hx hMkPk hperiodP
obtain ⟨g, hcontinuous, hcap, hgi, hgmass, hglaw, hphysical, hambient, hmean, hprojection⟩ :=
hdata hb o hR hσ Cproj Vproj hCactual hVactual hσ1 Cinv hCinv hchart hsmall μcoeff ν μ
have hrowInst (j : Fin m) :
Subtype.fintype (fun s : Finset (Fin dim) => s ∈ boundedBooleanJetRows (Fin dim) (j.val + 1)) =
fullBooleanRowSetFintype dim (j.val + 1) := Subsingleton.elim _ _
have hHaar :
Measure.pi (fun j : Fin m => @Measure.pi (O j) _
(Subtype.fintype (fun t : Finset (Fin dim) => t ∈ boundedBooleanJetRows (Fin dim) (j.val + 1)))
_ (fun _ : O j => ν j)) = jetHaar := by
congr 1
funext j
exact congrArg (fun inst => @Measure.pi (O j) _ inst _ (fun _ : O j => ν j)) (hrowInst j)
rw [hHaar] at hgi hgmass hglaw
have hambient' := canonical_rows_ambient_reinstance (m := m) (dim := dim) (J := J) U
(fun y z => (g y z : ℂ)) (densityLip * sectionLip * reconstructionLip) cap Lf Cf
hLipBudget hCfBudget hambient
have hmean' := canonical_rows_ambient_reinstance (m := m) (dim := dim) (J := J) U
(fun (law₁ : FiniteProbabilityWeights fullTuple) z => law₁.complexMean (fun y => (g y z : ℂ)))
(densityLip * sectionLip * reconstructionLip) cap Lf Cf hLipBudget hCfBudget hmean
with_reducible exact ⟨cover, hdiv, hcover, hcoverBound, g, hcontinuous, hcap, hgi, hgmass, hglaw, hambient', hmean', hprojection⟩
include hp μ hN hq hτ hρ hbudget hC₀ hLC hWC hξ hξ1 hsize hmesh hρ8
hcanonical hδ hρshift hρmove hmeshpos hy₀ hsignal in
theorem exists_allocatedCanonicalSlice_projected_coarse_source
{Pproj Pk : ℝ} (hGproj : (Fintype.card G : ℝ) ≤ Pproj)
(hLproj : (S.value : ℝ) ≤ Real.exp Pproj)
(hMkPk : (M : ℝ) ≤ Real.exp Pk) (hperiodP : ((m + 1 : ℕ) : ℝ) * Pk ≤ Pproj)
(hCactual : ∀ j z, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (b j) z‖ ≤ Cproj j * ‖z‖)
(hVactual : ∀ j, 0 ≤ mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ∧
mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ≤ Vproj j)
(hσ1 : ∀ j, σ j ≤ 1) (Cinv : Fin m → ℝ) (hCinv : ∀ j, 0 ≤ Cinv j)
(hchart : ∀ j z, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (b j)).symm z‖ ≤ Cinv j * ‖z‖)
(hsmall : ∀ j, Cinv j * ((Fintype.card (I j) : ℝ) + 1) * R j ≤ 1 / 4)
(Lf Cf : ℝ≥0)
{Pmass Rrank : ℝ} (hPmass : 0 ≤ Pmass)
(hXmass : (Fintype.card X : ℝ) ≤ Pmass)
(hframe : (Fintype.card (Option (Fin dim) × X) : ℝ) ≤ Pmass)
(hstrideP : ∀ i, (q i : ℝ) ≤ Real.exp Pmass)
(hτP : 1 / τ ≤ Real.exp Pmass)
(hsizeMass : ∀ i, Real.exp ((Pmass + Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ^ Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ≤ (N i : ℝ))
(hrank : ∀ j, HasLayerSamplingRank (j.val + 1) (fun i => (N i : ℝ)) Rrank (U j) (poly j))
(hRrank : Real.exp ((Pmass + Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ^ Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ≤ Rrank)
(hamb : (Fintype.card (CoefficientAmbientIndex (Fin dim) J) : ℝ) ≤ Pmass)
(hLf : (Lf : ℝ) ≤ Real.exp Pmass) (hCf : (Cf : ℝ) ≤ Real.exp Pmass)
(hjet : ((∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0) : ℝ≥0) : ℝ) ≤ Real.exp Pmass)
{Cg : ℝ} (hCg : 0 ≤ Cg)
(hcapBudget : (allocatedAmbientFactorCap (G := G) B R σ S.value Vproj : ℝ) ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m) ≤ Cg)
{target κ : ℝ}
(hboundary : Cg * boundaryError ≤ normalizedSpatialShare target / 2)
(hsite : spatialError * coarseReferenceMassConstant dim X W S.value ≤ normalizedSpatialShare target / 2)
{p E : ℝ} (hpBudget : 0 ≤ p) (hE : 0 ≤ E)
(hG : (Fintype.card G : ℝ) ≤ p) (hX : (Fintype.card X : ℝ) ≤ p)
(hdim : ((dim + 1 : ℕ) : ℝ) ≤ p)
(hMP : (M : ℝ) ≤ Real.exp p)
(hvars : (Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Real.exp p)
(hWscale : W ≤ Fintype.card (LayerSamplerVariables G I n B) * (S.value : ℝ))
(hmeshCoarse : mesh ≤ allocatedEarlyRecenteredMesh X selection M modulus p E)
(hPproj : 1 ≤ Pproj) (hmProj : (m : ℝ) ≤ Pproj)
(hKproj : (Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Pproj)
(hWproj : W ≤ Real.exp Pproj)
(hRproj : ∀ j, (R j)⁻¹ ≤ Real.exp Pproj) (hσproj : ∀ j, (σ j)⁻¹ ≤ Real.exp Pproj)
(hcountProj : ∀ j : Fin m,
(Fintype.card (BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) ≤ Pproj)
(hIproj : ∀ j, (Fintype.card (I j) : ℝ) ≤ Pproj) (hnProj : ∀ j, (n j : ℝ) ≤ Pproj)
(hJproj : ∀ j, (Fintype.card (J j) : ℝ) ≤ Pproj)
(hProfileProj : (probabilityProfileLipschitz : ℝ) ≤ Real.exp Pproj)
(hCproj : ∀ j, (Cproj j : ℝ) ≤ Real.exp Pproj) (hVproj : ∀ j, (Vproj j : ℝ) ≤ Real.exp Pproj)
(hXproj : (Fintype.card X : ℝ) ≤ Pproj)
(hFrameProj : (Fintype.card (Option (LayerSamplerVariables G I n B) × X) : ℝ) ≤ Pproj)
(hStrideProj : ∀ i, (q i : ℝ) ≤ Real.exp Pproj)
(hτProj : τ⁻¹ ≤ Real.exp Pproj) (hξProj : ξ⁻¹ ≤ Real.exp Pproj)
(hSizeProj : ∀ i, Real.exp ((Pproj + Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ^ Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ≤ (N i : ℝ))
(hRankProj : Real.exp ((Pproj + Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ^ Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ≤ Rrank)
(hCells : cells.Nonempty) (bases : Finset (X → ℤ)) (hbases : bases.Nonempty) :
let Acover := Classical.choose (exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim)
let coverLog := (Pproj + (dim + 2 : ℕ) + Acover) ^ Acover
let cap := (allocatedAmbientFactorCap (G := G) B R σ S.value Vproj : ℝ) ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m)
let densityLip := Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m) *
allocatedAmbientFactorLip (G := G) B R σ S.value (fun j => Fintype.card (J j)) Cproj Vproj *
allocatedAmbientFactorCap (G := G) B R σ S.value Vproj ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m)
let sectionLip := (Fintype.card (Finset (Fin dim)) : ℝ≥0) * Real.toNNReal (Real.exp coverLog)
let reconstructionLip := ∑ j : Fin m, (Fintype.card (BoundedBooleanJet (Fin dim) (j.val + 1)) : ℝ≥0)
coverLog ≤ Pmass → densityLip * sectionLip * reconstructionLip ≤ Lf → cap ≤ Cf →
let V := narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N
let Z := selectedJointDensityMass bases q cells V
(allocatedJointBaseDensity B U b hb o hR hσ S X poly hm)
κ ≤ ((law).complexMean (fun y => allocatedSlicedTupleValue B U b hb o hR hσ S X poly hm
N hN hW hτ hξ q cells hmass bases x y signal)).re →
∃ cover : ℕ, modulus ∣ cover ∧ 0 < cover ∧ (cover : ℝ) ≤ Real.exp coverLog ∧
∃ g : fullTuple → EuclideanJetLayers U O → ℝ,
(∀ y, Continuous (g y)) ∧
(∀ y z, g y z ∈ Set.Icc (0 : ℝ) cap) ∧
(∀ y, Integrable (g y) jetHaar) ∧
(∀ y, (∫ z, g y z ∂jetHaar) = 1) ∧
(∀ y, (realDensityMeasure μcoeff (fun z => allocatedCoefficientDensity B U b hb o hR hσ S
(quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) cover z))).map
(euclideanCoefficientJetMap U (allocatedPhysicalCubeRoot B U b S (fun _ => 0) x y)
(allocatedPhysicalCubeDirections B U b S x y) rows) = realDensityMeasure jetHaar (g y)) ∧
(∀ law₁ : FiniteProbabilityWeights fullTuple,
∃ F : (JetAmbientIndex O J → UnitAddCircle) → ℂ,
LipschitzWith Lf F ∧ (∀ z, ‖F z‖ ≤ Cf) ∧
∀ z, law₁.complexMean (fun y => (g y z : ℂ)) = F (coveredJetAmbientTorus U 1 z)) ∧
∃ base ∈ bases, Z ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧
Z * (κ - Real.exp (-Pproj) - Real.exp (-target)) - Real.exp (-E) ≤
((law).complexMean (allocatedRecenteredProfileTerm (τ := τ) (ξ := ξ)
B U b S X modulus q wholeReference x hM selection hx N hW
(allocatedEarlyRecenteredMesh X selection M modulus p E) base cells (point cover) test
(fun y z => (g y z : ℂ)))).re := by
intro Acover coverLog cap densityLip sectionLip reconstructionLip hcoverLog hLipBudget hCfBudget V Z hsource
have hPproj0 : 0 ≤ Pproj := zero_le_one.trans hPproj
obtain ⟨cover, hdiv, hcover, hcoverBound, g, hcontinuous, hcap, hgi, hgmass,
hglaw, hambient', hmean', hprojection⟩ :=
exists_allocatedCanonicalSlice_projection_data B U b S hb o hR hσ Cproj Vproj x selection hx
μ ν μcoeff hPproj0 hGproj hLproj hMkPk hperiodP
hCactual hVactual hσ1 Cinv hCinv hchart hsmall Lf Cf hLipBudget hCfBudget
have hcap' (y) (_hy : (law).weight y ≠ 0) (v) : ‖(g y ((point cover) v) : ℂ)‖ ≤ Cg := by
rw [Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (hcap y _).1]
exact (hcap y _).2.trans hcapBudget
refine ⟨cover, ?_, hcover, hcoverBound, g, hcontinuous, hcap, hgi, hgmass, hglaw, hmean', ?_⟩
· rwa [hcanonical]
· with_reducible
exact AllocatedSlicedSourceProjection.canonical_coarse_source
(B := B)
(U := U)
(b := b)
(S := S)
(hb := hb)
(o := o)
(hR := hR)
(hσ := hσ)
(Cproj := Cproj)
(Vproj := Vproj)
(X := X)
(modulus := modulus)
(q := q)
(H := H)
(step := step)
(c := c)
(hH := hH)
(hsubset := hsubset)
(label₀ := label₀)
(hcell := hcell)
(y₀ := y₀)
(hy₀ := hy₀)
(x := x)
(hM := hM)
(selection := selection)
(hx := hx)
(hcanonical := hcanonical)
(N := N)
(hW := hW)
(mesh := mesh)
(cells := cells)
(poly := poly)
(hp := hp)
(hm := hm)
(signal := signal)
(hsignal := hsignal)
(hN := hN)
(hq := hq)
(hτ := hτ)
(hρ := hρ)
(hbudget := hbudget)
(hC₀ := hC₀)
(hLC := hLC)
(hWC := hWC)
(hξ := hξ)
(hξ1 := hξ1)
(hsize := hsize)
(hmesh := hmesh)
(hρ8 := hρ8)
(hδ := hδ)
(hρshift := hρshift)
(hρmove := hρmove)
(hmeshpos := hmeshpos)
(hmass := hmass)
(μ := μ)
(ν := ν)
(Lf := Lf)
(Cf := Cf)
(hPmass := hPmass)
(hXmass := hXmass)
(hframe := hframe)
(hstrideP := hstrideP)
(hτP := hτP)
(hsizeMass := hsizeMass)
(hrank := hrank)
(hRrank := hRrank)
(hamb := hamb)
(hLf := hLf)
(hCf := hCf)
(hjet := hjet)
(hCg := hCg)
(hboundary := hboundary)
(hsite := hsite)
(hpBudget := hpBudget)
(hE := hE)
(hG := hG)
(hX := hX)
(hdim := hdim)
(hMP := hMP)
(hvars := hvars)
(hWscale := hWscale)
(hmeshCoarse := hmeshCoarse)
(hPproj := hPproj)
(hmProj := hmProj)
(hKproj := hKproj)
(hWproj := hWproj)
(hRproj := hRproj)
(hσproj := hσproj)
(hcountProj := hcountProj)
(hIproj := hIproj)
(hnProj := hnProj)
(hJproj := hJproj)
(hProfileProj := hProfileProj)
(hCproj := hCproj)
(hVproj := hVproj)
(hXproj := hXproj)
(hFrameProj := hFrameProj)
(hStrideProj := hStrideProj)
(hτProj := hτProj)
(hξProj := hξProj)
(hSizeProj := hSizeProj)
(hRankProj := hRankProj)
(hCells := hCells)
(bases := bases)
(hbases := hbases)
(cover := cover) (g := g) (hg0 := fun y z => (Set.mem_Icc.mp (hcap y z)).1) (hgi := hgi)
(hgmass := hgmass) (hambient := hambient') (hcover := hcover)
(hcoverP := hcoverBound.trans (Real.exp_le_exp.mpr hcoverLog))
(hcap := hcap') (hprojection := hprojection) hsource
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
universe uX uJ uO uG uI uB
open BooleanCubeKernel MeasureTheory
open scoped BigOperators Classical NNReal
attribute [local instance 2000] fullBooleanRowSetFintype
private noncomputable abbrev canonicalCoverExponent
(m dim : ℕ) (_X : Type uX) (_G : Type uG) (I : Fin m → Type uI)
(n : Fin m → ℕ) (_B : LayerSamplerAxis I n → Type uB) (_J : Fin m → Type uJ) : ℕ :=
Classical.choose (exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim)
variable {m : ℕ} {G : Type uG} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type uI} [∀ j, Fintype (I j)]
variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type uB)
variable [∀ a, Fintype (B a)]
variable {J : Fin m → Type uJ} [∀ j, Fintype (J j)]
variable (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (b : ∀ j, Module.Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable {R σ : Fin m → ℝ} (S : LayerSamplerScale (G := G) B U b R σ)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (hb : ∀ j, Submodule.span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j) (Cproj Vproj : Fin m → ℝ≥0)
variable {dim : ℕ}
local notation "grid" => allocatedGridAxis (I := I) U b S.value
local notation "sides" => allocatedPrincipalSides B U b S
local notation "fullTuple" => PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) sides
variable (X : Type uX) [Fintype X] [DecidableEq X] (modulus : ℕ) (q : X → ℕ)
local notation "refined" => residueRefinedPeriod modulus q
local notation "labels" => (PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod refined)
variable (H step : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH : ∀ j, 0 < H j)
variable (hsubset : ∀ j, integerProgressionSupport (c j) (step j : ℤ) (H j) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U b S j : ℤ))
variable (label₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) →
ZMod (residueRefinedPeriod modulus q))
variable (hcell : 0 < (principalTupleWeights (α := Fin dim) B (layerSamplerDegree I n) H hH).mass
(Finset.univ.filter (fun y => principalResidueLabel (residueRefinedPeriod modulus q) y = label₀)))
variable (y₀ : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U b S))
variable (hy₀ : 0 < (containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) H step c (allocatedPrincipalSides_pos B U b S)
hH hsubset (residueRefinedPeriod modulus q) label₀ hcell).weight y₀)
local notation "law" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) H step c (allocatedPrincipalSides_pos B U b S)
hH hsubset refined label₀ hcell
local notation "wholeReference" => (fun _ : labels => y₀)
variable (x : G → IntegerScalarCubeBox (Fin dim) S.value)
variable [NeZero modulus] {M : ℕ} (hM : 0 < M) (selection : Fin dim ↪ G)
variable (hx : GoodScalarKernelTuple selection (1 / (M : ℝ)) M x)
variable (hcanonical : modulus = kernelPeriodCandidate (m + 1) (goodKernelUniformCandidate selection x hx m))
variable (N : X → ℕ) {W τ ξ : ℝ} (hW : 0 ≤ W) (mesh : ℝ)
variable (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) X q))
local notation "O" => (fun j : Fin m => (boundedBooleanJetRows (Fin dim) (Fin.val j + 1) : Type))
local notation "rows" => (fun j => (Subtype.val : O j → Finset (Fin dim)))
variable (poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ))
variable (hp : ∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (poly j))
variable (hm : ∀ j ex, coefficients (poly j) ex ∈ U j)
local notation "point" d => physicalCubeRowSample U d rows poly hm
variable (signal : (X → ℤ) → ℂ) (hsignal : ∀ u, ‖signal u‖ ≤ 1)
local notation "test" => physicalCubeSiteTest (integerSelfSiteTest dim signal)
local notation "window" => spatialWindow (α := Fin dim) (trimmedSpatialRootScale τ N q) 4
variable (hN : ∀ t, 0 < N t) (hq : ∀ t, 0 < q t) (hτ : 0 < τ)
variable {C₀ ρ δ : ℝ} (hρ : 0 < ρ)
variable (hbudget : allocatedPhysicalRootBudget B U b S (fun _ => 0) ≤ W)
variable (hC₀ : 1 ≤ C₀) (hLC : (S.value : ℝ) ≤ C₀) (hWC : W ≤ C₀)
variable (hξ : 0 < ξ) (hξ1 : ξ ≤ 1)
variable (hsize : ∀ t, 8 * (1 + W) * (q t : ℝ) * ρ ≤ (ξ * τ) * (N t : ℝ))
variable (hmesh : anisotropicSpatialMeshThreshold selection (PrincipalTupleIndex B (layerSamplerDegree I n)) C₀ ≤ ρ)
variable (hρ8 : 8 * (probabilityProfileLipschitz : ℝ) ≤ ρ)
variable (hδ : 0 ≤ δ)
variable (hρshift : 2 * (Fintype.card (Option (LayerSamplerVariables G I n B)) *
(2 * allocatedPhysicalEntryBudget B U b S (fun _ => 0))) ≤ ρ)
variable (hρmove : Fintype.card (PrincipalTupleIndex B (layerSamplerDegree I n)) *
(2 * allocatedPhysicalEntryBudget B U b S (fun _ => 0)) ≤ δ * ρ)
variable (hmeshpos : 0 < mesh)
variable (hmass : 0 < ∑' z, selectedResidueSmoothWeight q cells
(narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N) z)
local notation "spatialError" => allocatedTupleSpatialError (Fintype.card X) selection
(PrincipalTupleIndex B (layerSamplerDegree I n)) M modulus C₀ ρ ξ W δ mesh
local notation "boundaryError" => (24 * (probabilityProfileLipschitz : ℝ) *
Fintype.card (Option (LayerSamplerVariables G I n B) × X) / ρ)
variable [CompactSpace (CoefficientTorus (K := Fin dim) U)]
variable [MeasurableSpace (CoefficientTorus (K := Fin dim) U)]
variable [BorelSpace (CoefficientTorus (K := Fin dim) U)]
variable (μ : Measure (CoefficientTorus (K := Fin dim) U)) [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν j)]
local notation "jetHaar" => Measure.pi (fun j => @Measure.pi (O j) _
(fullBooleanRowSetFintype dim (Fin.val j + 1)) _ (fun _ : O j => ν j))
variable [CompactSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [MeasurableSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [BorelSpace (CoefficientTorus (K := LayerSamplerVariables G I n B) U)]
variable [MeasurableSpace (SiteTorus (Finset (Fin dim)) U)]
variable [BorelSpace (SiteTorus (Finset (Fin dim)) U)]
variable (μcoeff : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μcoeff.IsAddLeftInvariant] [IsProbabilityMeasure μcoeff]
variable {Pproj Pk : ℝ}
local notation "coverExponent" => canonicalCoverExponent m dim X G I n B J
local notation "samplingExponent" => Classical.choose
(exists_allocatedCanonicalProjection_composed_budget m dim coverExponent)
local notation "Pmass" => (Pproj + samplingExponent) ^ samplingExponent
local notation "projectionLip" => (Subtype.mk (Real.exp Pmass) (Real.exp_nonneg _) : ℝ≥0)
local notation "projectionCapNN" => (Subtype.mk (Real.exp Pmass) (Real.exp_nonneg _) : ℝ≥0)
local notation "projectionCap" => Real.exp Pmass
include hp μ hN hq hτ hρ hbudget hC₀ hLC hWC hξ hξ1 hsize hmesh hρ8
hcanonical hδ hρshift hρmove hmeshpos hy₀ hsignal in
theorem exists_allocatedCanonicalSlice_uniform_projected_coarse_source
(hGproj : (Fintype.card G : ℝ) ≤ Pproj)
(hLproj : (S.value : ℝ) ≤ Real.exp Pproj)
(hMkPk : (M : ℝ) ≤ Real.exp Pk) (hperiodP : ((m + 1 : ℕ) : ℝ) * Pk ≤ Pproj)
(hCactual : ∀ j z, ‖normalizedOrthogonalChart (euclideanSubspace (U j)) (b j) z‖ ≤ Cproj j * ‖z‖)
(hVactual : ∀ j, 0 ≤ mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ∧
mixedDensityCovolumeRatio (euclideanSubspace (U j)) (b j) ≤ Vproj j)
(hσ1 : ∀ j, σ j ≤ 1) (Cinv : Fin m → ℝ) (hCinv : ∀ j, 0 ≤ Cinv j)
(hchart : ∀ j z, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (b j)).symm z‖ ≤ Cinv j * ‖z‖)
(hsmall : ∀ j, Cinv j * ((Fintype.card (I j) : ℝ) + 1) * R j ≤ 1 / 4)
{Rrank : ℝ}
(hXmass : (Fintype.card X : ℝ) ≤ Pmass)
(hframe : (Fintype.card (Option (Fin dim) × X) : ℝ) ≤ Pmass)
(hstrideP : ∀ i, (q i : ℝ) ≤ Real.exp Pmass)
(hτP : 1 / τ ≤ Real.exp Pmass)
(hsizeMass : ∀ i, Real.exp ((Pmass + Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ^ Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ≤ (N i : ℝ))
(hrank : ∀ j, HasLayerSamplingRank (j.val + 1) (fun i => (N i : ℝ)) Rrank (U j) (poly j))
(hRrank : Real.exp ((Pmass + Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ^ Classical.choose
(exists_translated_physical_jet_density_window_mass.{uX,uJ,0,max uG uI uB} m dim)) ≤ Rrank)
(hamb : (Fintype.card (CoefficientAmbientIndex (Fin dim) J) : ℝ) ≤ Pmass)
(hjet : ((∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0) : ℝ≥0) : ℝ) ≤ Real.exp Pmass)
{target κ : ℝ}
(hboundary : projectionCap * boundaryError ≤ normalizedSpatialShare target / 2)
(hsite : spatialError * coarseReferenceMassConstant dim X W S.value ≤ normalizedSpatialShare target / 2)
{p E : ℝ} (hpBudget : 0 ≤ p) (hE : 0 ≤ E)
(hG : (Fintype.card G : ℝ) ≤ p) (hX : (Fintype.card X : ℝ) ≤ p)
(hdim : ((dim + 1 : ℕ) : ℝ) ≤ p)
(hMP : (M : ℝ) ≤ Real.exp p)
(hvars : (Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Real.exp p)
(hWscale : W ≤ Fintype.card (LayerSamplerVariables G I n B) * (S.value : ℝ))
(hmeshCoarse : mesh ≤ allocatedEarlyRecenteredMesh X selection M modulus p E)
(hPproj : 1 ≤ Pproj) (hmProj : (m : ℝ) ≤ Pproj)
(hKproj : (Fintype.card (LayerSamplerVariables G I n B) : ℝ) ≤ Pproj)
(hWproj : W ≤ Real.exp Pproj)
(hRproj : ∀ j, (R j)⁻¹ ≤ Real.exp Pproj) (hσproj : ∀ j, (σ j)⁻¹ ≤ Real.exp Pproj)
(hcountProj : ∀ j : Fin m,
(Fintype.card (BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) ≤ Pproj)
(hIproj : ∀ j, (Fintype.card (I j) : ℝ) ≤ Pproj) (hnProj : ∀ j, (n j : ℝ) ≤ Pproj)
(hJproj : ∀ j, (Fintype.card (J j) : ℝ) ≤ Pproj)
(hProfileProj : (probabilityProfileLipschitz : ℝ) ≤ Real.exp Pproj)
(hCproj : ∀ j, (Cproj j : ℝ) ≤ Real.exp Pproj) (hVproj : ∀ j, (Vproj j : ℝ) ≤ Real.exp Pproj)
(hXproj : (Fintype.card X : ℝ) ≤ Pproj)
(hFrameProj : (Fintype.card (Option (LayerSamplerVariables G I n B) × X) : ℝ) ≤ Pproj)
(hStrideProj : ∀ i, (q i : ℝ) ≤ Real.exp Pproj)
(hτProj : τ⁻¹ ≤ Real.exp Pproj) (hξProj : ξ⁻¹ ≤ Real.exp Pproj)
(hSizeProj : ∀ i, Real.exp ((Pproj + Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ^ Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ≤ (N i : ℝ))
(hRankProj : Real.exp ((Pproj + Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ^ Classical.choose (Classical.choose_spec
(exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim))) ≤ Rrank)
(hCells : cells.Nonempty) (bases : Finset (X → ℤ)) (hbases : bases.Nonempty) :
let Acover := Classical.choose (exists_allocated_canonical_constructed_projection.{uX,uG,uI,uB,uJ} m dim)
let coverLog := (Pproj + (dim + 2 : ℕ) + Acover) ^ Acover
let cap := (allocatedAmbientFactorCap (G := G) B R σ S.value Vproj : ℝ) ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m)
let V := narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N
let Z := selectedJointDensityMass bases q cells V
(allocatedJointBaseDensity B U b hb o hR hσ S X poly hm)
κ ≤ ((law).complexMean (fun y => allocatedSlicedTupleValue B U b hb o hR hσ S X poly hm
N hN hW hτ hξ q cells hmass bases x y signal)).re →
∃ cover : ℕ, modulus ∣ cover ∧ 0 < cover ∧ (cover : ℝ) ≤ Real.exp coverLog ∧
∃ g : fullTuple → EuclideanJetLayers U O → ℝ,
(∀ y, Continuous (g y)) ∧
(∀ y z, g y z ∈ Set.Icc (0 : ℝ) cap) ∧
(∀ y, Integrable (g y) jetHaar) ∧
(∀ y, (∫ z, g y z ∂jetHaar) = 1) ∧
(∀ y, (realDensityMeasure μcoeff (fun z => allocatedCoefficientDensity B U b hb o hR hσ S
(quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) cover z))).map
(euclideanCoefficientJetMap U (allocatedPhysicalCubeRoot B U b S (fun _ => 0) x y)
(allocatedPhysicalCubeDirections B U b S x y) rows) = realDensityMeasure jetHaar (g y)) ∧
(∀ law₁ : FiniteProbabilityWeights fullTuple,
∃ F : (JetAmbientIndex O J → UnitAddCircle) → ℂ,
LipschitzWith projectionLip F ∧ (∀ z, ‖F z‖ ≤ projectionCapNN) ∧
∀ z, law₁.complexMean (fun y => (g y z : ℂ)) = F (coveredJetAmbientTorus U 1 z)) ∧
∃ base ∈ bases, Z ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ∧
Z * (κ - Real.exp (-Pproj) - Real.exp (-target)) - Real.exp (-E) ≤
((law).complexMean (allocatedRecenteredProfileTerm (τ := τ) (ξ := ξ)
B U b S X modulus q wholeReference x hM selection hx N hW
(allocatedEarlyRecenteredMesh X selection M modulus p E) base cells (point cover) test
(fun y z => (g y z : ℂ)))).re := by
intro Acover coverLog cap V Z hsource
have hPproj0 : 0 ≤ Pproj := zero_le_one.trans hPproj
have hPmass : 0 ≤ Pmass := by positivity
have hnum : AllocatedSourceNumerics B U b S Cproj Vproj Pproj :=
⟨hPproj0, hmProj, hKproj, hLproj, hRproj, hσproj, hcountProj, hIproj, hnProj,
hJproj, hProfileProj, hCproj, hVproj, hbudget.trans hWproj⟩
have hcover0 : 0 ≤ coverLog := by dsimp [coverLog]; positivity
have hcompose := (Classical.choose_spec
(exists_allocatedCanonicalProjection_composed_budget m dim coverExponent)).2 Pproj hPproj0
have hbounds := hnum.canonical_projection_bounds B U b S Cproj Vproj hR hσ dim hcover0
have hCap : cap ≤ Real.exp Pmass :=
hbounds.1.trans (Real.exp_le_exp.mpr hcompose.2)
have hLip :
(Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m) *
allocatedAmbientFactorLip (G := G) B R σ S.value (fun j => Fintype.card (J j)) Cproj Vproj *
allocatedAmbientFactorCap (G := G) B R σ S.value Vproj ^
Fintype.card (CoefficientSlot (LayerSamplerVariables G I n B) m)) *
((Fintype.card (Finset (Fin dim)) : ℝ≥0) * Real.toNNReal (Real.exp coverLog)) *
(∑ j : Fin m, (Fintype.card (BoundedBooleanJet (Fin dim) (j.val + 1)) : ℝ≥0)) ≤ projectionLip :=
hbounds.2.trans (Real.exp_le_exp.mpr hcompose.2)
exact exists_allocatedCanonicalSlice_projected_coarse_source
(B := B)
(U := U)
(b := b)
(S := S)
(hb := hb)
(o := o)
(hR := hR)
(hσ := hσ)
(Cproj := Cproj)
(Vproj := Vproj)
(X := X)
(modulus := modulus)
(q := q)
(H := H)
(step := step)
(c := c)
(hH := hH)
(hsubset := hsubset)
(label₀ := label₀)
(hcell := hcell)
(y₀ := y₀)
(hy₀ := hy₀)
(x := x)
(hM := hM)
(selection := selection)
(hx := hx)
(hcanonical := hcanonical)
(N := N)
(hW := hW)
(mesh := mesh)
(cells := cells)
(poly := poly)
(hp := hp)
(hm := hm)
(signal := signal)
(hsignal := hsignal)
(hN := hN)
(hq := hq)
(hτ := hτ)
(hρ := hρ)
(hbudget := hbudget)
(hC₀ := hC₀)
(hLC := hLC)
(hWC := hWC)
(hξ := hξ)
(hξ1 := hξ1)
(hsize := hsize)
(hmesh := hmesh)
(hρ8 := hρ8)
(hδ := hδ)
(hρshift := hρshift)
(hρmove := hρmove)
(hmeshpos := hmeshpos)
(hmass := hmass)
(μ := μ)
(ν := ν)
(Lf := projectionLip)
(Cf := projectionCapNN)
(hPmass := hPmass)
(hXmass := hXmass)
(hframe := hframe)
(hstrideP := hstrideP)
(hτP := hτP)
(hsizeMass := hsizeMass)
(hrank := hrank)
(hRrank := hRrank)
(hamb := hamb)
(hLf := le_rfl)
(hCf := le_rfl)
(hjet := hjet)
(hCg := Real.exp_nonneg _)
(hboundary := hboundary)
(hsite := hsite)
(hpBudget := hpBudget)
(hE := hE)
(hG := hG)
(hX := hX)
(hdim := hdim)
(hMP := hMP)
(hvars := hvars)
(hWscale := hWscale)
(hmeshCoarse := hmeshCoarse)
(hPproj := hPproj)
(hmProj := hmProj)
(hKproj := hKproj)
(hWproj := hWproj)
(hRproj := hRproj)
(hσproj := hσproj)
(hcountProj := hcountProj)
(hIproj := hIproj)
(hnProj := hnProj)
(hJproj := hJproj)
(hProfileProj := hProfileProj)
(hCproj := hCproj)
(hVproj := hVproj)
(hXproj := hXproj)
(hFrameProj := hFrameProj)
(hStrideProj := hStrideProj)
(hτProj := hτProj)
(hξProj := hξProj)
(hSizeProj := hSizeProj)
(hRankProj := hRankProj)
(hCells := hCells)
(bases := bases)
(hbases := hbases)
(μcoeff := μcoeff)
(hGproj := hGproj)
(hLproj := hLproj)
(hMkPk := hMkPk)
(hperiodP := hperiodP)
(hCactual := hCactual)
(hVactual := hVactual)
(hσ1 := hσ1)
(Cinv := Cinv)
(hCinv := hCinv)
(hchart := hchart)
(hsmall := hsmall)
(hcapBudget := hCap)
hcompose.1 hLip hCap hsource
end Erdos3.VectorPolynomial
end
end OAI

Xet Storage Details

Size:
56.3 kB
·
Xet hash:
572cb7366adb1ff200930320842623140a531d832888488791fc0d9ca7f59fd6

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