Buckets:
cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Lattices /AllocatedAffineRecenteredSource.lean
import OAI.Combinatorics.Progressions.Estimates.AllocatedRecenteredL1Source
import OAI.Combinatorics.Progressions.Lattices.AllocatedAffineFiniteModelL2
namespace OAI
section
namespace Erdos3.VectorPolynomial
universe uJ uQ
open MeasureTheory Module Submodule
open scoped Classical BigOperators NNReal
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (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 uJ} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.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 basis R σ)
variable {α : Type*} [Fintype α] [DecidableEq α]
variable (rowSets : Fin m → Finset (Finset α))
variable [∀ j, Nonempty (rowSets j)]
local notation "selectedRows" => (fun j : Fin m => {t : Finset α // t ∈ rowSets j})
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset α))
variable (x : G → IntegerScalarCubeBox α S.value)
variable (s : ∀ j : Fin m, ↥(rowSets j) ↪ BoundedIntegerExponent G (j.val + 1))
variable (hA : ∀ j, ((scalarKernelIntegerJet x (j.val + 1) (Subtype.val : rowSets j → Finset α)).submatrix id (s j)).det ≠ 0)
variable {Mk : ℕ} (hMk : 0 < Mk)
variable (hi : ∀ j : Fin m, fixedKernelInverseBound (O := ↥(rowSets j))
S.positive x (j.val + 1) (Subtype.val : rowSets j → Finset α) (s j) (hA j) (1 / (Mk : ℝ)))
variable {P : ℝ} (hP : 0 ≤ P) (hMkP : (Mk : ℝ) ≤ Real.exp P)
variable (hRP : ∀ j, R j ≤ Real.exp P) (hRi : ∀ j, (R j)⁻¹ ≤ Real.exp P)
variable (hσi : ∀ j, (σ j)⁻¹ ≤ Real.exp P)
variable (hcount : ∀ j : Fin m, (Fintype.card
(BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) + 1 ≤ Real.exp P)
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type uQ) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (d : ℕ) [NeZero d]
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable (H₀ step₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH₀ : ∀ t, 0 < H₀ t)
variable (hsubset₀ : ∀ t, integerProgressionSupport (c₀ t) (step₀ t : ℤ) (H₀ t) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ))
variable (modulus : ℕ) (r₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option α → ZMod modulus)
variable (hcell : 0 < (principalTupleWeights (α := α) B (layerSamplerDegree I n) H₀ hH₀).mass
(Finset.univ.filter (fun y => principalResidueLabel modulus y = r₀)))
local notation "embed" => (fun j : Tuple => (Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j) : PrincipalTupleIndex B (layerSamplerDegree I n)))
local notation "H" => (fun j : Tuple => H₀ (embed j))
local notation "step" => (fun j : Tuple => step₀ (embed j))
local notation "c" => (fun j : Tuple => c₀ (embed j))
local notation "hsubset" => (fun j : Tuple => hsubset₀ (embed j))
local notation "residue" => (fun j : Tuple => r₀ (embed j))
local notation "GridTuples" => PrincipalAxisTuples (α := α) grid (allocatedPrincipalSides B U basis S)
local notation "wholeLaw" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
local notation "gridLaw" => containedSupportedProgressionAxisLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell grid
local notation "wholeRoot" y => allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x y
local notation "wholeDirs" y => allocatedPhysicalCubeDirections B U basis S x y
local notation "deck" => PMF.uniformOfFintype (CoefficientDeckResidues (K := LayerSamplerVariables G I n B) Q d)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν 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 (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "ξ" => Measure.pi (fun j => Measure.pi (fun _ : rowSets j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
local notation "cover" => quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) d
include hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem allocatedAffineIdeal_l1
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) α (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) ξ)
(hglaw : ∀ y, (realDensityMeasure μ (fun z => density (cover z))).map
(euclideanCoefficientJetMap U (wholeRoot y) (wholeDirs y) rows) = realDensityMeasure ξ (g y))
{δ η : ℝ} (ρ : (LayerSamplerAxis I n → Prop) → ℝ≥0) (t : ℝ) (htone : t ≤ 1)
(hs : AllocatedAffineCoveredComparison.{uJ, uQ, _, _, _, _, _} (G := G) B rows δ η ρ t htone)
(hρ : 0 < ρ grid) (hρ1 : ρ grid ≤ 1)
(hσsmall : ∀ j, σ j ≤ t)
(hstep : ∀ j : Tuple, 0 < step j) (hH : ∀ j : Tuple, 2 ≤ H j)
(hδ : 0 < δ)
(hdense : ∀ j : Tuple, δ * L j ≤ ((integerProgressionSupport (c j) (step j : ℤ) (H j)).card : ℝ))
(hm : 0 < modulus)
(hsize : ∀ j : Tuple, (Fintype.card α + 1) * modulus ≤ H j)
(hsmall : ∀ j : Tuple, scalarCubeGridBoundaryConstant α * ((modulus : ℝ) / H j) <
volume.real (scalarCubeDomain α))
{ε : ℝ} (hε : 0 ≤ ε) (hmesh : ∀ j : Tuple, (step j : ℝ) / L j ≤ ε)
(selection : α ↪ G)
(hgood : GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x)
(hq : Fintype.card α ≤ m + 1)
{e εcoef : ℝ} (he : 0 ≤ e) (hεcoef : 0 < εcoef) (hεe : εcoef⁻¹ ≤ Real.exp e)
(hlarge : Real.exp (allocatedKernelReplacementLog (G := G) B α jetRows P e) ≤ S.value)
(hperiod : ∀ j : Fin m, integerScalarLattice (selectedRows j) (modulus : ℤ) ≤
(scalarKernelIntegerJet x (j.val + 1) (rows j)).mulVecLin.range)
(v₀ : PrincipalAxisTuples (α := α) (fun a => ¬grid a) (allocatedPrincipalSides B U basis S))
(hv₀ : (containedProgressionResidueLaw activeB activeDegree L H step c positiveLengths
(fun j : Tuple => hH₀ (embed j)) hsubset modulus hm residue hsize).weight v₀ ≠ 0)
{mesh Cmask : ℝ} (hmesh0 : 0 ≤ mesh) (hmesh1 : mesh ≤ 1)
(hscaleMesh : 1 / (S.value : ℝ) ^ (layerTailDegree m + 1) ≤ mesh)
(hCmask : 1 ≤ Cmask)
(hmask : ∀ (u : GridTuples) j z, 0 ≤ allocatedIntegerKernelMask B U basis S x rows j
modulus
(integerResidueMatrix (allocatedNonkernelJetMatrix B U basis S x u rows j v₀) modulus) z ∧ allocatedIntegerKernelMask B U basis S x rows j
modulus
(integerResidueMatrix (allocatedNonkernelJetMatrix B U basis S x u rows j v₀) modulus) z ≤ Cmask)
(T : Fin m → ℝ) (hT : ∀ j, partitionedIdealRadius α m + 1 ≤ T j)
(hsource : ∀ j, (Fintype.card (BoundedCoefficientExponent
(LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) *
((2 : ℝ) ^ Fintype.card α * ((Fintype.card α : ℝ) + 1) ^ (j.val + 1)) ≤ T j)
(C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j)
(hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(hbudget : ∀ j, C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) ≤ 1 / 4) :
let center := principalProgressionSliceCenter (α := α) activeB activeDegree L c
let width := principalProgressionSliceWidth (α := α) activeB activeDegree L H step
let ideal := diagonalImageDensity (fun o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) => R o.1.val.1)
(activeAveragedSlicedProfileIdeal (G := G) (B := B) (G × Option α)
(layerSamplerDegree I n) grid (fun a => rows a.val.1) (ρ grid) center width)
let _outputResidue := fun (u : GridTuples) j => integerResidueMatrix
(allocatedNonkernelJetMatrix B U basis S x u rows j v₀) modulus
(∫ y, ‖((wholeLaw).mean (fun v => g v y) : ℂ) -
((gridLaw).mean (fun u => allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u v₀) modulus ideal y) : ℂ)‖ ∂ξ) ≤
(2 * Real.exp (allocatedJetSupportLog (G := G) B α selectedRows P) + 1)^
Fintype.card (Σ a : LayerSamplerAxis I n, selectedRows a.1) *
(Fintype.card {a // ¬grid a} * εcoef *
(1 + (layerKernelIndexBound m Mk : ℝ) * Real.exp (allocatedDensityLog (G := G) B α selectedRows P) + εcoef)^
Fintype.card {a // ¬grid a}) +
allocatedAffineSourceReferenceError B U basis S α selectedRows (ρ grid) P η (fun _ => modulus) H ε mesh Cmask
:= by
intro center width ideal outputResidue
have hw := principalProgressionSlice_parameters (α := α) activeB activeDegree
L H step c positiveLengths hstep hH hδ hsubset hdense
have hidealm : Measurable ideal :=
allocatedRowSlicedIdeal_measurable B U basis S rowSets hR (ρ grid) hρ center width
let profile := fun u y => allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u v₀) modulus ideal y
have hprofilem (u) : Measurable (profile u) :=
allocatedWholeMaskedCoveredProfile_measurable B U basis hR hσ S x rows hb o bW d
(principalAxisJoin grid u v₀) modulus ideal hidealm
have hprofilei (u) : Integrable (profile u) ξ := by
have hfm := allocatedLongProfileDensity_measurable B U basis S x rows
modulus (outputResidue u) ideal hidealm
have hfi := allocatedAffineIdeal_profile_integrable B U basis hR S x rows
hRP hRi (ρ grid) hρ hρ1 center width (fun i => (hw i).2.2)
modulus (outputResidue u) hCmask (hmask u)
have hi := allocatedCoveredProfileDensity_integrable B U basis hR hσ S x u v₀ rows
hb o bW d (fun j (_ : selectedRows j) => standardLatticeClosedQuarterBox (J j))
(fun j _ => (standardLatticeClosedQuarterBox_isCompact (J j)).measurableSet)
(fun j _ => standardLatticeClosedQuarterBox_subset_smallBox (J j)) ν _ hfm hfi
simpa only [profile, allocatedWholeMaskedCoveredProfile_join] using hi
have hmeanm : Measurable (fun y => ((wholeLaw).mean (fun v => g v y) : ℂ)) :=
(Finset.measurable_sum Finset.univ (fun v _ => (hgm v).const_mul _)).complex_ofReal
have hmeani : Integrable (fun y => ((wholeLaw).mean (fun v => g v y) : ℂ)) ξ :=
(integrable_finsetSum Finset.univ (fun v _ => (hgi v).const_mul _)).ofReal
have hmodelm : Measurable (fun y => ((gridLaw).mean (fun u => profile u y) : ℂ)) :=
((gridLaw).mean_measurable _ hprofilem).complex_ofReal
have hmodeli : Integrable (fun y => ((gridLaw).mean (fun u => profile u y) : ℂ)) ξ :=
(integrable_finsetSum Finset.univ (fun u _ => (hprofilei u).const_mul _)).ofReal
apply complex_model_l1_le_of_bounded_tests ξ _ _ hmeanm hmodelm hmeani hmodeli
intro F hF hFbound
have hc := allocatedAffineWholeProfile_comparison B U basis hR hσ S rows x s hA hMk hi
hP hMkP hRP hRi hσi hcount Q hb o bW d F H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell ν
ρ t htone hs hρ hρ1 hσsmall hstep hH hδ hdense hm hsize hsmall hε hmesh
selection hgood hq he hεcoef hεe hlarge hperiod v₀ hv₀ hmesh0 hmesh1 hscaleMesh hCmask hmask
T hT hsource C hC hchart hbudget hF hFbound
have hsmallDensity (j) : C j * ((Fintype.card (I j) : ℝ) + 1) * R j ≤ 1 / 4 := by
have hT1 : 1 ≤ T j := (le_add_of_nonneg_left (partitionedIdealRadius_nonneg α m)).trans (hT j)
have hRle : R j ≤ T j * R j := by simpa only [one_mul] using mul_le_mul_of_nonneg_right hT1 (hR j).le
calc
_ = C j * (((Fintype.card (I j) : ℝ) + 1) * R j) := mul_assoc _ _ _
_ ≤ C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) :=
mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hRle
(add_nonneg (Nat.cast_nonneg _) zero_le_one)) (hC j)
_ ≤ _ := hbudget j
have hdeck := allocatedCoefficientDeckSample_density_law B U basis hR hσ S Q hb o bW d μ ν
(fun j => (hσsmall j).trans htone) C hC hchart hsmallDensity
have hid := allocatedProgressionCoveredExpectation_density B U basis hR hσ S rows x Q hb o bW d
H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell μ ν hdeck g hgm hg0 hgi hglaw F hF hFbound
rw [hid] at hc
exact hc
include hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem allocatedAffineIdeal_l1_small
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) α (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) ξ)
(hglaw : ∀ y, (realDensityMeasure μ (fun z => density (cover z))).map
(euclideanCoefficientJetMap U (wholeRoot y) (wholeDirs y) rows) = realDensityMeasure ξ (g y))
{δ η : ℝ} (ρ : (LayerSamplerAxis I n → Prop) → ℝ≥0) (t : ℝ) (htone : t ≤ 1)
(hs : AllocatedAffineCoveredComparison.{uJ, uQ, _, _, _, _, _} (G := G) B rows δ η ρ t htone)
(hρ : 0 < ρ grid) (hρ1 : ρ grid ≤ 1)
(hσsmall : ∀ j, σ j ≤ t)
(hstep : ∀ j : Tuple, 0 < step j) (hH : ∀ j : Tuple, 2 ≤ H j)
(hδ : 0 < δ)
(hdense : ∀ j : Tuple, δ * L j ≤ ((integerProgressionSupport (c j) (step j : ℤ) (H j)).card : ℝ))
(hm : 0 < modulus)
(hsize : ∀ j : Tuple, (Fintype.card α + 1) * modulus ≤ H j)
(hsmall : ∀ j : Tuple, scalarCubeGridBoundaryConstant α * ((modulus : ℝ) / H j) <
volume.real (scalarCubeDomain α))
{ε : ℝ} (hε : 0 ≤ ε) (hmesh : ∀ j : Tuple, (step j : ℝ) / L j ≤ ε)
(selection : α ↪ G)
(hgood : GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x)
(hq : Fintype.card α ≤ m + 1)
(hrowDegree : ∀ j (a : rowSets j), a.val.card ≤ j.val + 1)
{e εcoef : ℝ} (he : 0 ≤ e) (hεcoef : 0 < εcoef) (hεe : εcoef⁻¹ ≤ Real.exp e)
(hlarge : Real.exp (allocatedKernelReplacementLog (G := G) B α jetRows P e) ≤ S.value)
(hperiod : ∀ j : Fin m, integerScalarLattice (selectedRows j) (modulus : ℤ) ≤
(scalarKernelIntegerJet x (j.val + 1) (rows j)).mulVecLin.range)
(v₀ : PrincipalAxisTuples (α := α) (fun a => ¬grid a) (allocatedPrincipalSides B U basis S))
(hv₀ : (containedProgressionResidueLaw activeB activeDegree L H step c positiveLengths
(fun j : Tuple => hH₀ (embed j)) hsubset modulus hm residue hsize).weight v₀ ≠ 0)
{mesh : ℝ} (hmesh0 : 0 ≤ mesh) (hmesh1 : mesh ≤ 1)
(hscaleMesh : 1 / (S.value : ℝ) ^ (layerTailDegree m + 1) ≤ mesh)
(T : Fin m → ℝ) (hT : ∀ j, partitionedIdealRadius α m + 1 ≤ T j)
(hsource : ∀ j, (Fintype.card (BoundedCoefficientExponent
(LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) *
((2 : ℝ) ^ Fintype.card α * ((Fintype.card α : ℝ) + 1) ^ (j.val + 1)) ≤ T j)
(C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j)
(hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(hbudget : ∀ j, C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) ≤ 1 / 4)
{D target Pk Prho : ℝ}
(hdimensions : AllocatedComparisonDimensions (G := G) B α selectedRows D)
(hPk : 0 ≤ Pk) (hMkPk : (Mk : ℝ) ≤ Real.exp Pk)
(hPrho : 0 ≤ Prho) (hρlog : (ρ grid : ℝ)⁻¹ ≤ Real.exp Prho)
(htarget : 0 ≤ target)
(hη0 : 0 ≤ η)
(hcoefsmall : εcoef ≤ Real.exp (-(target + 1 + coefficientReplacementErrorLog D (allocatedAffineL1Log m D P Prho Pk))))
(hηsmall : η ≤ Real.exp (-(target + 1 + D * ((m * 2 ^ (m + 1) : ℕ) * Pk) + 4)))
(hratiosmall : (∑ j : Tuple, (modulus : ℝ) / H j) ≤
Real.exp (-(target + 1 + affineReferenceCoefficientLog D (allocatedAffineL1Log m D P Prho Pk) + 4)))
(hεsmall : ε ≤ Real.exp (-(target + 1 + affineReferenceCoefficientLog D (allocatedAffineL1Log m D P Prho Pk) + 4)))
(hmeshsmall : mesh ≤ Real.exp (-(target + 1 + affineReferenceCoefficientLog D (allocatedAffineL1Log m D P Prho Pk) + 4))) :
let center := principalProgressionSliceCenter (α := α) activeB activeDegree L c
let width := principalProgressionSliceWidth (α := α) activeB activeDegree L H step
let ideal := diagonalImageDensity (fun o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) => R o.1.val.1)
(activeAveragedSlicedProfileIdeal (G := G) (B := B) (G × Option α)
(layerSamplerDegree I n) grid (fun a => rows a.val.1) (ρ grid) center width)
let _outputResidue := fun (u : GridTuples) j => integerResidueMatrix
(allocatedNonkernelJetMatrix B U basis S x u rows j v₀) modulus
(∫ y, ‖((wholeLaw).mean (fun v => g v y) : ℂ) -
((gridLaw).mean (fun u => allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u v₀) modulus ideal y) : ℂ)‖ ∂ξ) ≤
Real.exp (-target) := by
intro center width ideal outputResidue
let Lb := allocatedAffineL1Log m D P Prho Pk
have hD := hdimensions.nonneg
have haxes := hdimensions.axes
have houtputs := hdimensions.outputs
have hlongoutputs := hdimensions.active_outputs B grid
have hsplit := selectedOutput_card_split (allocatedLongIntegerSelect B U basis S (O := selectedRows))
have hunselected : (Fintype.card (UnselectedColumn
(allocatedLongIntegerSelect B U basis S (O := selectedRows))) : ℝ) ≤ D := by
apply (Nat.cast_le.mpr (Nat.le_add_right _ _)).trans
rw [hsplit]
exact hlongoutputs
have hinteger : (Fintype.card {o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) //
allocatedLongIntegerCoordinate B U basis S (O := selectedRows) o} : ℝ) ≤ D :=
(Nat.cast_le.mpr (Fintype.card_subtype_le _)).trans hlongoutputs
obtain ⟨hLb, hPL, hdensity, hsupport, hamp, hideal, hKi, hindexL, hboundary⟩ :=
allocatedAffineL1_primitive_bounds B hdimensions hP hPrho hPk hMkPk grid R
(fun j => (hR j).le) hRi (ρ grid) hρlog
have hboundary0 : 0 ≤ scalarCubeGridBoundaryConstant α / volume.real (scalarCubeDomain α) :=
div_nonneg (scalarCubeGridBoundaryConstant_pos α).le (scalarCubeDomain_volumeReal_pos α).le
let Cmask : ℝ := layerKernelIndexBound m Mk
have hCmask : 1 ≤ Cmask := by
dsimp only [Cmask, layerKernelIndexBound]
exact_mod_cast (Nat.one_le_pow _ _ hMk)
have hmask (u : GridTuples) (j : Fin m) (z : selectedRows j → ℤ) :=
allocatedIntegerKernelMask_bound B U basis S x rows hMk selection hgood hq
(fun _ => Subtype.val_injective) hrowDegree j modulus (outputResidue u j) z
have hmaskL : Cmask ≤ Real.exp Lb :=
(layerKernelIndexBound_le_exp m hMkPk).trans (Real.exp_le_exp.mpr hindexL)
have hearlyMask : Cmask ^ Fintype.card (LayerSamplerAxis I n) ≤
Real.exp (D * ((m * 2 ^ (m + 1) : ℕ) * Pk)) :=
pow_le_exp_mul_of_le_exp (Nat.cast_nonneg _) (layerKernelIndexBound_le_exp m hMkPk)
(mul_nonneg (Nat.cast_nonneg _) hPk) _ haxes
have hc := allocatedAffineIdeal_l1 B U basis hR hσ S rowSets x s hA hMk hi
hP hMkP hRP hRi hσi hcount Q hb o bW d H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell ν μ
g hgm hg0 hgi hglaw ρ t htone hs hρ hρ1 hσsmall hstep hH hδ hdense hm hsize hsmall
hε hmesh selection hgood hq he hεcoef hεe hlarge hperiod v₀ hv₀ hmesh0 hmesh1 hscaleMesh
hCmask hmask T hT hsource C hC hchart hbudget
have hactive : (Fintype.card {a // ¬grid a} : ℝ) ≤ D :=
(Nat.cast_le.mpr (Fintype.card_subtype_le (fun a => ¬grid a))).trans haxes
have hreplace := coefficientReplacementError_small hD hLb (by linarith : 0 ≤ target + 1)
hsupport (mul_nonneg (Nat.cast_nonneg _) (Real.exp_nonneg _)) hamp
(Fintype.card (Σ a : LayerSamplerAxis I n, selectedRows a.1))
(Fintype.card {a // ¬grid a}) houtputs hactive hεcoef.le hcoefsmall
have href := allocatedAffineSourceReferenceError_small_separated B U basis S α selectedRows (ρ grid) P
(fun _ => modulus) H hearlyMask hD hLb hPL hdensity hsupport hideal hKi (zero_le_one.trans hCmask)
hmaskL hboundary0 hboundary haxes hlongoutputs hunselected hinteger hη0 hε hmesh0
hηsmall hratiosmall hεsmall hmeshsmall
calc
_ ≤ _ := hc
_ ≤ Real.exp (-(target + 1)) + Real.exp (-(target + 1)) := add_le_add hreplace href
_ ≤ Real.exp (-target) := by
have htwo : (2 : ℝ) ≤ Real.exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)]
calc
_ = 2 * Real.exp (-(target + 1)) := by ring
_ ≤ Real.exp 1 * Real.exp (-(target + 1)) :=
mul_le_mul_of_nonneg_right htwo (Real.exp_nonneg _)
_ = _ := by rw [← Real.exp_add]; congr 1; ring
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
universe uJ uQ
open MeasureTheory Module Submodule
open scoped Classical BigOperators NNReal
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (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 uJ} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.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 basis R σ)
variable {α : Type*} [Fintype α] [DecidableEq α]
variable (rowSets : Fin m → Finset (Finset α))
variable [∀ j, Nonempty (rowSets j)]
local notation "selectedRows" => (fun j : Fin m => {t : Finset α // t ∈ rowSets j})
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset α))
variable (x : G → IntegerScalarCubeBox α S.value)
variable (s : ∀ j : Fin m, ↥(rowSets j) ↪ BoundedIntegerExponent G (j.val + 1))
variable (hA : ∀ j, ((scalarKernelIntegerJet x (j.val + 1) (Subtype.val : rowSets j → Finset α)).submatrix id (s j)).det ≠ 0)
variable {Mk : ℕ} (hMk : 0 < Mk)
variable (hi : ∀ j : Fin m, fixedKernelInverseBound (O := ↥(rowSets j))
S.positive x (j.val + 1) (Subtype.val : rowSets j → Finset α) (s j) (hA j) (1 / (Mk : ℝ)))
variable {P : ℝ} (hP : 0 ≤ P) (hMkP : (Mk : ℝ) ≤ Real.exp P)
variable (hRP : ∀ j, R j ≤ Real.exp P) (hRi : ∀ j, (R j)⁻¹ ≤ Real.exp P)
variable (hσi : ∀ j, (σ j)⁻¹ ≤ Real.exp P)
variable (hcount : ∀ j : Fin m, (Fintype.card
(BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) + 1 ≤ Real.exp P)
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type uQ) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (d : ℕ) [NeZero d]
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable (H₀ step₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH₀ : ∀ t, 0 < H₀ t)
variable (hsubset₀ : ∀ t, integerProgressionSupport (c₀ t) (step₀ t : ℤ) (H₀ t) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ))
variable (modulus : ℕ) (r₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option α → ZMod modulus)
variable (hcell : 0 < (principalTupleWeights (α := α) B (layerSamplerDegree I n) H₀ hH₀).mass
(Finset.univ.filter (fun y => principalResidueLabel modulus y = r₀)))
local notation "embed" => (fun j : Tuple => (Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j) : PrincipalTupleIndex B (layerSamplerDegree I n)))
local notation "H" => (fun j : Tuple => H₀ (embed j))
local notation "step" => (fun j : Tuple => step₀ (embed j))
local notation "c" => (fun j : Tuple => c₀ (embed j))
local notation "hsubset" => (fun j : Tuple => hsubset₀ (embed j))
local notation "residue" => (fun j : Tuple => r₀ (embed j))
local notation "GridTuples" => PrincipalAxisTuples (α := α) grid (allocatedPrincipalSides B U basis S)
local notation "wholeLaw" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
local notation "gridLaw" => containedSupportedProgressionAxisLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell grid
local notation "wholeRoot" y => allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x y
local notation "wholeDirs" y => allocatedPhysicalCubeDirections B U basis S x y
local notation "deck" => PMF.uniformOfFintype (CoefficientDeckResidues (K := LayerSamplerVariables G I n B) Q d)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν 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 (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "ξ" => Measure.pi (fun j => Measure.pi (fun _ : rowSets j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
local notation "cover" => quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) d
include hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem allocatedAffineIdeal_l1_of_length
{D target Pk Prho F Tmod : ℝ}
(hdimensions : AllocatedComparisonDimensions (G := G) B α selectedRows D)
(hPk : 0 ≤ Pk) (hMkPk : (Mk : ℝ) ≤ Real.exp Pk)
(hPrho : 0 ≤ Prho) (htarget : 0 ≤ target) (hF : 0 ≤ F) (hTmod : 0 ≤ Tmod)
(hlength : Real.exp (allocatedAffineLengthLog m D P Prho Pk target F Tmod) ≤ S.value)
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) α (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) ξ)
(hglaw : ∀ y, (realDensityMeasure μ (fun z => density (cover z))).map
(euclideanCoefficientJetMap U (wholeRoot y) (wholeDirs y) rows) = realDensityMeasure ξ (g y))
{δ η : ℝ} (ρ : (LayerSamplerAxis I n → Prop) → ℝ≥0) (t : ℝ) (htone : t ≤ 1)
(hs : AllocatedAffineCoveredComparison.{uJ, uQ, _, _, _, _, _} (G := G) B rows δ η ρ t htone)
(hρ : 0 < ρ grid) (hρ1 : ρ grid ≤ 1)
(hσsmall : ∀ j, σ j ≤ t)
(hstep : ∀ j : Tuple, 0 < step j)
(hδ : 0 < δ) (hδF : δ⁻¹ ≤ Real.exp F)
(hdense : ∀ j : Tuple, δ * L j ≤ ((integerProgressionSupport (c j) (step j : ℤ) (H j)).card : ℝ))
(hm : 0 < modulus)
(hmodulus : (modulus : ℝ) ≤ Real.exp Tmod)
(selection : α ↪ G)
(hgood : GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x)
(hq : Fintype.card α ≤ m + 1)
(hrowDegree : ∀ j (a : rowSets j), a.val.card ≤ j.val + 1)
(hperiod : ∀ j : Fin m, integerScalarLattice (selectedRows j) (modulus : ℤ) ≤
(scalarKernelIntegerJet x (j.val + 1) (rows j)).mulVecLin.range)
(v₀ : PrincipalAxisTuples (α := α) (fun a => ¬grid a) (allocatedPrincipalSides B U basis S))
(hv₀ : (containedProgressionResidueLaw activeB activeDegree L H step c positiveLengths
(fun j : Tuple => hH₀ (embed j)) hsubset modulus hm residue (allocatedAffineLength_slice_ready B U basis hdimensions hP hPrho hPk htarget hF hTmod S hlength H₀ step₀ c₀ hsubset₀ hδ hδF modulus hm hmodulus hstep hdense).2.1).weight v₀ ≠ 0)
(T : Fin m → ℝ) (hT : ∀ j, partitionedIdealRadius α m + 1 ≤ T j)
(hsource : ∀ j, (Fintype.card (BoundedCoefficientExponent
(LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) *
((2 : ℝ) ^ Fintype.card α * ((Fintype.card α : ℝ) + 1) ^ (j.val + 1)) ≤ T j)
(C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j)
(hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(hbudget : ∀ j, C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) ≤ 1 / 4)
(hρlog : (ρ grid : ℝ)⁻¹ ≤ Real.exp Prho)
(hη0 : 0 ≤ η)
(hηsmall : η ≤ Real.exp (-(target + 1 + D * ((m * 2 ^ (m + 1) : ℕ) * Pk) + 4))) :
let center := principalProgressionSliceCenter (α := α) activeB activeDegree L c
let width := principalProgressionSliceWidth (α := α) activeB activeDegree L H step
let ideal := diagonalImageDensity (fun o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) => R o.1.val.1)
(activeAveragedSlicedProfileIdeal (G := G) (B := B) (G × Option α)
(layerSamplerDegree I n) grid (fun a => rows a.val.1) (ρ grid) center width)
let _outputResidue := fun (u : GridTuples) j => integerResidueMatrix
(allocatedNonkernelJetMatrix B U basis S x u rows j v₀) modulus
(∫ y, ‖((wholeLaw).mean (fun v => g v y) : ℂ) -
((gridLaw).mean (fun u => allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u v₀) modulus ideal y) : ℂ)‖ ∂ξ) ≤
Real.exp (-target) := by
let e := allocatedAffineCoefficientAccuracyLog m D P Prho Pk target
let E := allocatedAffineReferenceAccuracyLog m D P Prho Pk target
obtain ⟨he, hE, _⟩ := allocatedAffineLengthLog_bounds m hdimensions.nonneg hP hPrho hPk htarget hF hTmod
obtain ⟨hH, hsize, hsmall, hratio, hmesh⟩ := allocatedAffineLength_slice_ready B U basis hdimensions hP hPrho hPk htarget hF hTmod S hlength H₀ step₀ c₀ hsubset₀ hδ hδF modulus hm hmodulus hstep hdense
obtain ⟨hlarge, hscaleMesh, _⟩ :=
allocatedAffineLength_ready B U basis hdimensions hP hPrho hPk htarget hF hTmod S hlength
have hεe : (Real.exp (-e))⁻¹ ≤ Real.exp e := by rw [← Real.exp_neg, neg_neg]
exact allocatedAffineIdeal_l1_small B U basis hR hσ S rowSets x s hA hMk hi
hP hMkP hRP hRi hσi hcount Q hb o bW d H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell ν μ
g hgm hg0 hgi hglaw ρ t htone hs hρ hρ1 hσsmall hstep hH hδ hdense hm hsize hsmall
(Real.exp_nonneg (-E)) hmesh selection hgood hq hrowDegree he (Real.exp_pos (-e)) hεe hlarge
hperiod v₀ hv₀ (Real.exp_nonneg (-E)) (Real.exp_le_one_iff.mpr (neg_nonpos.mpr hE))
hscaleMesh T hT hsource C hC hchart hbudget hdimensions hPk hMkPk hPrho hρlog htarget hη0
le_rfl hηsmall hratio le_rfl le_rfl
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
universe uJ uQ
open MeasureTheory Module Submodule
open scoped Classical BigOperators NNReal
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (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 uJ} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.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 basis R σ)
variable {α : Type*} [Fintype α] [DecidableEq α]
variable (rowSets : Fin m → Finset (Finset α))
variable [∀ j, Nonempty (rowSets j)]
local notation "selectedRows" => (fun j : Fin m => {t : Finset α // t ∈ rowSets j})
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset α))
variable (x : G → IntegerScalarCubeBox α S.value)
variable (s : ∀ j : Fin m, ↥(rowSets j) ↪ BoundedIntegerExponent G (j.val + 1))
variable (hA : ∀ j, ((scalarKernelIntegerJet x (j.val + 1) (Subtype.val : rowSets j → Finset α)).submatrix id (s j)).det ≠ 0)
variable {Mk : ℕ} (hMk : 0 < Mk)
variable (hi : ∀ j : Fin m, fixedKernelInverseBound (O := ↥(rowSets j))
S.positive x (j.val + 1) (Subtype.val : rowSets j → Finset α) (s j) (hA j) (1 / (Mk : ℝ)))
variable {P : ℝ} (hP : 0 ≤ P) (hMkP : (Mk : ℝ) ≤ Real.exp P)
variable (hRP : ∀ j, R j ≤ Real.exp P) (hRi : ∀ j, (R j)⁻¹ ≤ Real.exp P)
variable (hσi : ∀ j, (σ j)⁻¹ ≤ Real.exp P)
variable (hcount : ∀ j : Fin m, (Fintype.card
(BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) + 1 ≤ Real.exp P)
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type uQ) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (d : ℕ) [NeZero d]
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable (H₀ step₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH₀ : ∀ t, 0 < H₀ t)
variable (hsubset₀ : ∀ t, integerProgressionSupport (c₀ t) (step₀ t : ℤ) (H₀ t) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ))
variable (modulus : ℕ) (r₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option α → ZMod modulus)
variable (hcell : 0 < (principalTupleWeights (α := α) B (layerSamplerDegree I n) H₀ hH₀).mass
(Finset.univ.filter (fun y => principalResidueLabel modulus y = r₀)))
local notation "embed" => (fun j : Tuple => (Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j) : PrincipalTupleIndex B (layerSamplerDegree I n)))
local notation "H" => (fun j : Tuple => H₀ (embed j))
local notation "step" => (fun j : Tuple => step₀ (embed j))
local notation "c" => (fun j : Tuple => c₀ (embed j))
local notation "hsubset" => (fun j : Tuple => hsubset₀ (embed j))
local notation "residue" => (fun j : Tuple => r₀ (embed j))
local notation "GridTuples" => PrincipalAxisTuples (α := α) grid (allocatedPrincipalSides B U basis S)
local notation "wholeLaw" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
local notation "gridLaw" => containedSupportedProgressionAxisLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell grid
local notation "wholeRoot" y => allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x y
local notation "wholeDirs" y => allocatedPhysicalCubeDirections B U basis S x y
local notation "deck" => PMF.uniformOfFintype (CoefficientDeckResidues (K := LayerSamplerVariables G I n B) Q d)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν 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 (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "ξ" => Measure.pi (fun j => Measure.pi (fun _ : rowSets j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
local notation "cover" => quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) d
include hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem exists_allocatedAffineIdeal_l1_reference
{D target Pk Prho F Tmod : ℝ}
(hdimensions : AllocatedComparisonDimensions (G := G) B α selectedRows D)
(hPk : 0 ≤ Pk) (hMkPk : (Mk : ℝ) ≤ Real.exp Pk)
(hPrho : 0 ≤ Prho) (htarget : 0 ≤ target) (hF : 0 ≤ F) (hTmod : 0 ≤ Tmod)
(hlength : Real.exp (allocatedAffineLengthLog m D P Prho Pk target F Tmod) ≤ S.value)
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) α (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) ξ)
(hglaw : ∀ y, (realDensityMeasure μ (fun z => density (cover z))).map
(euclideanCoefficientJetMap U (wholeRoot y) (wholeDirs y) rows) = realDensityMeasure ξ (g y))
{δ η : ℝ} (ρ : (LayerSamplerAxis I n → Prop) → ℝ≥0) (t : ℝ) (htone : t ≤ 1)
(hs : AllocatedAffineCoveredComparison.{uJ, uQ, _, _, _, _, _} (G := G) B rows δ η ρ t htone)
(hρ : 0 < ρ grid) (hρ1 : ρ grid ≤ 1)
(hσsmall : ∀ j, σ j ≤ t)
(hstep : ∀ j : Tuple, 0 < step j)
(hδ : 0 < δ) (hδF : δ⁻¹ ≤ Real.exp F)
(hdense : ∀ j : Tuple, δ * L j ≤ ((integerProgressionSupport (c j) (step j : ℤ) (H j)).card : ℝ))
(hm : 0 < modulus)
(hmodulus : (modulus : ℝ) ≤ Real.exp Tmod)
(selection : α ↪ G)
(hgood : GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x)
(hq : Fintype.card α ≤ m + 1)
(hrowDegree : ∀ j (a : rowSets j), a.val.card ≤ j.val + 1)
(hperiod : ∀ j : Fin m, integerScalarLattice (selectedRows j) (modulus : ℤ) ≤
(scalarKernelIntegerJet x (j.val + 1) (rows j)).mulVecLin.range)
(T : Fin m → ℝ) (hT : ∀ j, partitionedIdealRadius α m + 1 ≤ T j)
(hsource : ∀ j, (Fintype.card (BoundedCoefficientExponent
(LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) *
((2 : ℝ) ^ Fintype.card α * ((Fintype.card α : ℝ) + 1) ^ (j.val + 1)) ≤ T j)
(C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j)
(hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(hbudget : ∀ j, C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) ≤ 1 / 4)
(hρlog : (ρ grid : ℝ)⁻¹ ≤ Real.exp Prho)
(hη0 : 0 ≤ η)
(hηsmall : η ≤ Real.exp (-(target + 1 + D * ((m * 2 ^ (m + 1) : ℕ) * Pk) + 4))) :
∃ y₀ : PrincipalIntegerTuples B (layerSamplerDegree I n) α (allocatedPrincipalSides B U basis S),
0 < (wholeLaw).weight y₀ ∧
(∀ j, IntegerScalarCube (allocatedPrincipalSides B U basis S j) (fun a => (y₀ j a : ℤ))) ∧
0 < (gridLaw).weight (principalAxisRestrict grid y₀) ∧
(∀ y, (wholeLaw).weight y ≠ 0 → principalResidueLabel modulus y = principalResidueLabel modulus y₀) ∧
let center := principalProgressionSliceCenter (α := α) activeB activeDegree L c
let width := principalProgressionSliceWidth (α := α) activeB activeDegree L H step
let ideal := diagonalImageDensity (fun o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) => R o.1.val.1)
(activeAveragedSlicedProfileIdeal (G := G) (B := B) (G × Option α)
(layerSamplerDegree I n) grid (fun a => rows a.val.1) (ρ grid) center width)
(∫ y, ‖((wholeLaw).mean (fun v => g v y) : ℂ) -
((gridLaw).mean (fun u => allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u (principalAxisRestrict (fun a => ¬grid a) y₀)) modulus ideal y) : ℂ)‖ ∂ξ) ≤
Real.exp (-target) := by
obtain ⟨y₀, hy₀, hcube, hmarg, hlabel⟩ := exists_containedSupportedProgressionReference
B (layerSamplerDegree I n) (allocatedPrincipalSides B U basis S) H₀ step₀ c₀
(allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
refine ⟨y₀, hy₀, hcube, hmarg grid, hlabel, ?_⟩
have hsize := (allocatedAffineLength_slice_ready B U basis hdimensions hP hPrho hPk htarget hF hTmod
S hlength H₀ step₀ c₀ hsubset₀ hδ hδF modulus hm hmodulus hstep hdense).2.1
have hv₀ := hmarg (fun a => ¬grid a)
have heq := containedSupportedProgressionAxisLaw_eq_of_size B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S)
hH₀ hsubset₀ modulus hm r₀ hcell (fun a => ¬grid a) hsize
have hv₁ : 0 < (containedProgressionResidueLaw activeB activeDegree L H step c positiveLengths
(fun j : Tuple => hH₀ (embed j)) hsubset modulus hm residue hsize).weight
(principalAxisRestrict (fun a => ¬grid a) y₀) := by
erw [← heq]
convert hv₀ using 1
congr! (transparency := .reducible)
exact allocatedAffineIdeal_l1_of_length B U basis hR hσ S rowSets x s hA hMk hi
hP hMkP hRP hRi hσi hcount Q hb o bW d H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell ν μ
hdimensions hPk hMkPk hPrho htarget hF hTmod hlength
g hgm hg0 hgi hglaw ρ t htone hs hρ hρ1 hσsmall hstep hδ hδF hdense hm hmodulus
selection hgood hq hrowDegree hperiod (principalAxisRestrict (fun a => ¬grid a) y₀) hv₁.ne'
T hT hsource C hC hchart hbudget hρlog hη0 hηsmall
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
universe uJ uQ uX
open MeasureTheory Module Submodule BooleanCubeKernel
open scoped Classical BigOperators NNReal
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (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 uJ} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.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 basis R σ)
variable {dim : ℕ}
variable (rowSets : Fin m → Finset (Finset (Fin dim)))
variable [∀ j, Nonempty (rowSets j)]
local notation "selectedRows" => (fun j : Fin m => {t : Finset (Fin dim) // t ∈ rowSets j})
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset (Fin dim)))
variable (x : G → IntegerScalarCubeBox (Fin dim) S.value)
variable (s : ∀ j : Fin m, ↥(rowSets j) ↪ BoundedIntegerExponent G (j.val + 1))
variable (hA : ∀ j, ((scalarKernelIntegerJet x (j.val + 1) (Subtype.val : rowSets j → Finset (Fin dim))).submatrix id (s j)).det ≠ 0)
variable {Mk : ℕ} (hMk : 0 < Mk)
variable (hi : ∀ j : Fin m, fixedKernelInverseBound (O := ↥(rowSets j))
S.positive x (j.val + 1) (Subtype.val : rowSets j → Finset (Fin dim)) (s j) (hA j) (1 / (Mk : ℝ)))
variable {P : ℝ} (hP : 0 ≤ P) (hMkP : (Mk : ℝ) ≤ Real.exp P)
variable (hRP : ∀ j, R j ≤ Real.exp P) (hRi : ∀ j, (R j)⁻¹ ≤ Real.exp P)
variable (hσi : ∀ j, (σ j)⁻¹ ≤ Real.exp P)
variable (hcount : ∀ j : Fin m, (Fintype.card
(BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) + 1 ≤ Real.exp P)
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type uQ) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (d : ℕ) [NeZero d]
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable (H₀ step₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH₀ : ∀ t, 0 < H₀ t)
variable (hsubset₀ : ∀ t, integerProgressionSupport (c₀ t) (step₀ t : ℤ) (H₀ t) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ))
variable (modulus : ℕ) (r₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod modulus)
variable (hcell : 0 < (principalTupleWeights (α := (Fin dim)) B (layerSamplerDegree I n) H₀ hH₀).mass
(Finset.univ.filter (fun y => principalResidueLabel modulus y = r₀)))
local notation "embed" => (fun j : Tuple => (Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j) : PrincipalTupleIndex B (layerSamplerDegree I n)))
local notation "H" => (fun j : Tuple => H₀ (embed j))
local notation "step" => (fun j : Tuple => step₀ (embed j))
local notation "c" => (fun j : Tuple => c₀ (embed j))
local notation "hsubset" => (fun j : Tuple => hsubset₀ (embed j))
local notation "residue" => (fun j : Tuple => r₀ (embed j))
local notation "GridTuples" => PrincipalAxisTuples (α := (Fin dim)) grid (allocatedPrincipalSides B U basis S)
local notation "wholeLaw" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
local notation "gridLaw" => containedSupportedProgressionAxisLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell grid
local notation "wholeRoot" y => allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x y
local notation "wholeDirs" y => allocatedPhysicalCubeDirections B U basis S x y
local notation "deck" => PMF.uniformOfFintype (CoefficientDeckResidues (K := LayerSamplerVariables G I n B) Q d)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν 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 (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "ξ" => Measure.pi (fun j => Measure.pi (fun _ : rowSets j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
local notation "cover" => quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) d
variable {X : Type uX} [Fintype X] [DecidableEq X]
variable [CompactSpace (CoefficientTorus (K := Fin dim) U)]
variable [MeasurableSpace (CoefficientTorus (K := Fin dim) U)]
variable [BorelSpace (CoefficientTorus (K := Fin dim) U)]
variable (μrows : Measure (CoefficientTorus (K := Fin dim) U))
variable [μrows.IsAddLeftInvariant] [IsProbabilityMeasure μrows]
include μrows hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem allocatedAffineIdeal_sampled_l1_of_length
{D target Pk Prho F Tmod : ℝ}
(hdimensions : AllocatedComparisonDimensions (G := G) B (Fin dim) selectedRows D)
(hPk : 0 ≤ Pk) (hMkPk : (Mk : ℝ) ≤ Real.exp Pk)
(hPrho : 0 ≤ Prho) (htarget : 0 ≤ target) (hF : 0 ≤ F) (hTmod : 0 ≤ Tmod)
(hlength : Real.exp (allocatedAffineLengthLog m D P Prho Pk target F Tmod) ≤ S.value)
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) ξ)
(hglaw : ∀ y, (realDensityMeasure μ (fun z => density (cover z))).map
(euclideanCoefficientJetMap U (wholeRoot y) (wholeDirs y) rows) = realDensityMeasure ξ (g y))
{δ η : ℝ} (ρ : (LayerSamplerAxis I n → Prop) → ℝ≥0) (t : ℝ) (htone : t ≤ 1)
(hs : AllocatedAffineCoveredComparison.{uJ, uQ, _, _, _, _, _} (G := G) B rows δ η ρ t htone)
(hρ : 0 < ρ grid) (hρ1 : ρ grid ≤ 1)
(hσsmall : ∀ j, σ j ≤ t)
(hstep : ∀ j : Tuple, 0 < step j)
(hδ : 0 < δ) (hδF : δ⁻¹ ≤ Real.exp F)
(hdense : ∀ j : Tuple, δ * L j ≤ ((integerProgressionSupport (c j) (step j : ℤ) (H j)).card : ℝ))
(hm : 0 < modulus)
(hmodulus : (modulus : ℝ) ≤ Real.exp Tmod)
(selection : (Fin dim) ↪ G)
(hgood : GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x)
(hq : Fintype.card (Fin dim) ≤ m + 1)
(hrowDegree : ∀ j (a : rowSets j), a.val.card ≤ j.val + 1)
(hperiod : ∀ j : Fin m, integerScalarLattice (selectedRows j) (modulus : ℤ) ≤
(scalarKernelIntegerJet x (j.val + 1) (rows j)).mulVecLin.range)
(v₀ : PrincipalAxisTuples (α := (Fin dim)) (fun a => ¬grid a) (allocatedPrincipalSides B U basis S))
(hv₀ : (containedProgressionResidueLaw activeB activeDegree L H step c positiveLengths
(fun j : Tuple => hH₀ (embed j)) hsubset modulus hm residue (allocatedAffineLength_slice_ready B U basis hdimensions hP hPrho hPk htarget hF hTmod S hlength H₀ step₀ c₀ hsubset₀ hδ hδF modulus hm hmodulus hstep hdense).2.1).weight v₀ ≠ 0)
(T : Fin m → ℝ) (hT : ∀ j, partitionedIdealRadius (Fin dim) m + 1 ≤ T j)
(hsource : ∀ j, (Fintype.card (BoundedCoefficientExponent
(LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) *
((2 : ℝ) ^ Fintype.card (Fin dim) * ((Fintype.card (Fin dim) : ℝ) + 1) ^ (j.val + 1)) ≤ T j)
(C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j)
(hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(hbudget : ∀ j, C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) ≤ 1 / 4)
(hρlog : (ρ grid : ℝ)⁻¹ ≤ Real.exp Prho)
(hη0 : 0 ≤ η)
(hηsmall : η ≤ Real.exp (-(target + 1 + D * ((m * 2 ^ (m + 1) : ℕ) * Pk) + 4))) :
let center := principalProgressionSliceCenter (α := (Fin dim)) activeB activeDegree L c
let width := principalProgressionSliceWidth (α := (Fin dim)) activeB activeDegree L H step
let ideal := diagonalImageDensity (fun o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) => R o.1.val.1)
(activeAveragedSlicedProfileIdeal (G := G) (B := B) (G × Option (Fin dim))
(layerSamplerDegree I n) grid (fun a => rows a.val.1) (ρ grid) center width)
let profile := fun y => ((gridLaw).mean (fun u =>
allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u v₀) modulus ideal y) : ℂ)
let A := Classical.choose (exists_translated_physical_jet_l1_perturbation.{uX,uJ,0} m dim)
∀ {Psample Rrank Sstride τ εsample ηsample δsur : ℝ},
0 ≤ Psample → (Fintype.card X : ℝ) ≤ Psample →
(Fintype.card (Option (Fin dim) × X) : ℝ) ≤ Psample →
∀ (base : X → ℤ) (poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ))
(_hp : ∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (poly j))
(hmem : ∀ j ex, coefficients (poly j) ex ∈ U j),
(d : ℝ) ≤ Real.exp Psample →
∀ (stride : X → ℕ), (∀ i, 0 < stride i) →
0 ≤ Sstride → Sstride ≤ Real.exp Psample → 0 < τ → 0 < εsample →
1 / τ ≤ Real.exp Psample → 1 / εsample ≤ Real.exp Psample →
(∀ i, (stride i : ℝ) ≤ Sstride) →
∀ (N : X → ℝ), (∀ i, Real.exp ((Psample + A) ^ A) ≤ N i) →
(∀ j, HasLayerSamplingRank (j.val + 1) N Rrank (U j) (poly j)) →
Real.exp ((Psample + A) ^ A) ≤ Rrank →
∀ (cells : Finset (ColumnResiduePattern (Option (Fin dim)) X stride)), cells.Nonempty →
∀ (V : Option (Fin dim) × X → ℝ), (∀ z, 0 < V z) → (∀ z, τ * N z.2 ≤ V z) →
∀ (actual surrogate : (JetAmbientIndex selectedRows J → UnitAddCircle) → ℂ)
(La Ls Ca Cs : ℝ≥0),
LipschitzWith La actual → LipschitzWith Ls surrogate →
(∀ z, ‖actual z‖ ≤ Ca) → (∀ z, ‖surrogate z‖ ≤ Cs) →
0 < ηsample → (Fintype.card (CoefficientAmbientIndex (Fin dim) J) : ℝ) ≤ Psample →
(La : ℝ) ≤ Real.exp Psample → (Ls : ℝ) ≤ Real.exp Psample →
(Ca : ℝ) ≤ Real.exp Psample → (Cs : ℝ) ≤ Real.exp Psample →
((∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0) : ℝ≥0) : ℝ) ≤ Real.exp Psample →
ηsample⁻¹ ≤ Real.exp Psample →
(∀ y, ((wholeLaw).mean (fun v => g v y) : ℂ) = actual (coveredJetAmbientTorus U 1 y)) →
(∀ y, ‖profile y - surrogate (coveredJetAmbientTorus U 1 y)‖ ≤ δsur) →
∃ _hZ : 0 < ∑' z, selectedResidueSmoothWeight stride cells V z,
selectedResidueDensityMass stride cells V (fun z =>
let point := physicalCubeRowSample U d rows poly hmem
(translatePhysicalCube base (standardPhysicalCubeOutput z))
‖((wholeLaw).mean (fun v => g v point) : ℂ) - profile point‖) ≤
Real.exp (-target) + 2 * δsur + (2 * ηsample + εsample) := by
intro center width ideal profile A Psample Rrank Sstride τ εsample ηsample δsur
hPs hX hframe base poly hp hmem hdP stride hstridepos hSstride hSstrideP hτ hεsample hτP hεsampleP
hstride N hsize hrank hRrank cells hcells V hV hwidth actual surrogate La Ls Ca Cs
hLa hLs hCa hCs hηsample hamb hLaP hLsP hCaP hCsP hjet hηsampleP hactual happrox
have hhaar := allocatedAffineIdeal_l1_of_length B U basis hR hσ S rowSets x s hA hMk hi
hP hMkP hRP hRi hσi hcount Q hb o bW d H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell ν μ
hdimensions hPk hMkPk hPrho htarget hF hTmod hlength
g hgm hg0 hgi hglaw ρ t htone hs hρ hρ1 hσsmall hstep hδ hδF hdense hm hmodulus
selection hgood hq hrowDegree hperiod v₀ hv₀ T hT hsource C hC hchart hbudget hρlog hη0 hηsmall
have hmass : (∫ y, ‖actual (coveredJetAmbientTorus U 1 y) - profile y‖ ∂ξ) ≤ Real.exp (-target) := by
simpa only [hactual] using hhaar
have hmeas : Measurable profile :=
allocatedWholeMaskedCoveredProfile_mean_measurable B U basis hR hσ S x rows hb o bW d
(gridLaw) (fun u => principalAxisJoin grid u v₀) modulus ideal
(allocatedRowSlicedIdeal_measurable B U basis S rowSets hR (ρ grid) hρ center width)
have hsample := (Classical.choose_spec (exists_translated_physical_jet_l1_perturbation.{uX,uJ,0} m dim)).2
(I := X) (J := J) (O := selectedRows)
obtain ⟨hZ, he⟩ := hsample rows (fun _ => Subtype.val_injective) hrowDegree hPs hX hframe U μrows ν
base poly hp hmem d (NeZero.pos d) hdP stride hstridepos hSstride hSstrideP hτ hεsample
hτP hεsampleP hstride N hsize hrank hRrank cells hcells V hV hwidth actual surrogate La Ls Ca Cs
hLa hLs hCa hCs hηsample hamb hLaP hLsP hCaP hCsP hjet hηsampleP profile hmeas happrox hmass
refine ⟨hZ, ?_⟩
simpa only [hactual] using he
end Erdos3.VectorPolynomial
end
section
namespace Erdos3.VectorPolynomial
universe uJ uQ uX
open MeasureTheory Module Submodule BooleanCubeKernel
open scoped Classical BigOperators NNReal
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (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 uJ} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.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 basis R σ)
variable {dim : ℕ}
variable (rowSets : Fin m → Finset (Finset (Fin dim)))
variable [∀ j, Nonempty (rowSets j)]
local notation "selectedRows" => (fun j : Fin m => {t : Finset (Fin dim) // t ∈ rowSets j})
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset (Fin dim)))
variable (x : G → IntegerScalarCubeBox (Fin dim) S.value)
variable (s : ∀ j : Fin m, ↥(rowSets j) ↪ BoundedIntegerExponent G (j.val + 1))
variable (hA : ∀ j, ((scalarKernelIntegerJet x (j.val + 1) (Subtype.val : rowSets j → Finset (Fin dim))).submatrix id (s j)).det ≠ 0)
variable {Mk : ℕ} (hMk : 0 < Mk)
variable (hi : ∀ j : Fin m, fixedKernelInverseBound (O := ↥(rowSets j))
S.positive x (j.val + 1) (Subtype.val : rowSets j → Finset (Fin dim)) (s j) (hA j) (1 / (Mk : ℝ)))
variable {P : ℝ} (hP : 0 ≤ P) (hMkP : (Mk : ℝ) ≤ Real.exp P)
variable (hRP : ∀ j, R j ≤ Real.exp P) (hRi : ∀ j, (R j)⁻¹ ≤ Real.exp P)
variable (hσi : ∀ j, (σ j)⁻¹ ≤ Real.exp P)
variable (hcount : ∀ j : Fin m, (Fintype.card
(BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) + 1 ≤ Real.exp P)
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type uQ) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (d : ℕ) [NeZero d]
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable (H₀ step₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH₀ : ∀ t, 0 < H₀ t)
variable (hsubset₀ : ∀ t, integerProgressionSupport (c₀ t) (step₀ t : ℤ) (H₀ t) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ))
variable (modulus : ℕ) (r₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod modulus)
variable (hcell : 0 < (principalTupleWeights (α := (Fin dim)) B (layerSamplerDegree I n) H₀ hH₀).mass
(Finset.univ.filter (fun y => principalResidueLabel modulus y = r₀)))
local notation "embed" => (fun j : Tuple => (Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j) : PrincipalTupleIndex B (layerSamplerDegree I n)))
local notation "H" => (fun j : Tuple => H₀ (embed j))
local notation "step" => (fun j : Tuple => step₀ (embed j))
local notation "c" => (fun j : Tuple => c₀ (embed j))
local notation "hsubset" => (fun j : Tuple => hsubset₀ (embed j))
local notation "residue" => (fun j : Tuple => r₀ (embed j))
local notation "GridTuples" => PrincipalAxisTuples (α := (Fin dim)) grid (allocatedPrincipalSides B U basis S)
local notation "wholeLaw" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
local notation "gridLaw" => containedSupportedProgressionAxisLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell grid
local notation "wholeRoot" y => allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x y
local notation "wholeDirs" y => allocatedPhysicalCubeDirections B U basis S x y
local notation "deck" => PMF.uniformOfFintype (CoefficientDeckResidues (K := LayerSamplerVariables G I n B) Q d)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν 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 (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "jetHaar" => Measure.pi (fun j => Measure.pi (fun _ : rowSets j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
local notation "cover" => quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) d
variable {X : Type uX} [Fintype X] [DecidableEq X]
variable [CompactSpace (CoefficientTorus (K := Fin dim) U)]
variable [MeasurableSpace (CoefficientTorus (K := Fin dim) U)]
variable [BorelSpace (CoefficientTorus (K := Fin dim) U)]
variable (μrows : Measure (CoefficientTorus (K := Fin dim) U))
variable [μrows.IsAddLeftInvariant] [IsProbabilityMeasure μrows]
include μrows hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem allocatedAffineIdeal_recentered_source_of_length
{D target Pk Prho F Tmod : ℝ}
(hdimensions : AllocatedComparisonDimensions (G := G) B (Fin dim) selectedRows D)
(hPk : 0 ≤ Pk) (hMkPk : (Mk : ℝ) ≤ Real.exp Pk)
(hPrho : 0 ≤ Prho) (htarget : 0 ≤ target) (hF : 0 ≤ F) (hTmod : 0 ≤ Tmod)
(hlength : Real.exp (allocatedAffineLengthLog m D P Prho Pk target F Tmod) ≤ S.value)
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim) (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) jetHaar)
(hglaw : ∀ y, (realDensityMeasure μ (fun z => density (cover z))).map
(euclideanCoefficientJetMap U (wholeRoot y) (wholeDirs y) rows) = realDensityMeasure jetHaar (g y))
{δ η : ℝ} (ρ : (LayerSamplerAxis I n → Prop) → ℝ≥0) (t : ℝ) (htone : t ≤ 1)
(hs : AllocatedAffineCoveredComparison.{uJ, uQ, _, _, _, _, _} (G := G) B rows δ η ρ t htone)
(hρ : 0 < ρ grid) (hρ1 : ρ grid ≤ 1)
(hσsmall : ∀ j, σ j ≤ t)
(hstep : ∀ j : Tuple, 0 < step j)
(hδ : 0 < δ) (hδF : δ⁻¹ ≤ Real.exp F)
(hdense : ∀ j : Tuple, δ * L j ≤ ((integerProgressionSupport (c j) (step j : ℤ) (H j)).card : ℝ))
(hm : 0 < modulus)
(hmodulus : (modulus : ℝ) ≤ Real.exp Tmod)
(selection : (Fin dim) ↪ G)
(hgood : GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x)
(hq : Fintype.card (Fin dim) ≤ m + 1)
(hrowDegree : ∀ j (a : rowSets j), a.val.card ≤ j.val + 1)
(hperiod : ∀ j : Fin m, integerScalarLattice (selectedRows j) (modulus : ℤ) ≤
(scalarKernelIntegerJet x (j.val + 1) (rows j)).mulVecLin.range)
(v₀ : PrincipalAxisTuples (α := (Fin dim)) (fun a => ¬grid a) (allocatedPrincipalSides B U basis S))
(hv₀ : (containedProgressionResidueLaw activeB activeDegree L H step c positiveLengths
(fun j : Tuple => hH₀ (embed j)) hsubset modulus hm residue (allocatedAffineLength_slice_ready B U basis hdimensions hP hPrho hPk htarget hF hTmod S hlength H₀ step₀ c₀ hsubset₀ hδ hδF modulus hm hmodulus hstep hdense).2.1).weight v₀ ≠ 0)
(T : Fin m → ℝ) (hT : ∀ j, partitionedIdealRadius (Fin dim) m + 1 ≤ T j)
(hsource : ∀ j, (Fintype.card (BoundedCoefficientExponent
(LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) *
((2 : ℝ) ^ Fintype.card (Fin dim) * ((Fintype.card (Fin dim) : ℝ) + 1) ^ (j.val + 1)) ≤ T j)
(C : Fin m → ℝ) (hC : ∀ j, 0 ≤ C j)
(hchart : ∀ j v, ‖(normalizedOrthogonalChart (euclideanSubspace (U j)) (basis j)).symm v‖ ≤ C j * ‖v‖)
(hbudget : ∀ j, C j * (((Fintype.card (I j) : ℝ) + 1) * (T j * R j)) ≤ 1 / 4)
(hρlog : (ρ grid : ℝ)⁻¹ ≤ Real.exp Prho)
(hη0 : 0 ≤ η)
(hηsmall : η ≤ Real.exp (-(target + 1 + D * ((m * 2 ^ (m + 1) : ℕ) * Pk) + 4))) :
let center := principalProgressionSliceCenter (α := (Fin dim)) activeB activeDegree L c
let width := principalProgressionSliceWidth (α := (Fin dim)) activeB activeDegree L H step
let ideal := diagonalImageDensity (fun o : (Σ a : {a // ¬grid a}, selectedRows a.val.1) => R o.1.val.1)
(activeAveragedSlicedProfileIdeal (G := G) (B := B) (G × Option (Fin dim))
(layerSamplerDegree I n) grid (fun a => rows a.val.1) (ρ grid) center width)
let profile := fun y => ((gridLaw).mean (fun u =>
allocatedWholeMaskedCoveredProfile B U basis hR hσ S x rows
hb o bW d (principalAxisJoin grid u v₀) modulus ideal y) : ℂ)
∀ (spatialModulus : ℕ) [NeZero spatialModulus] (stride N : X → ℕ),
let refined := residueRefinedPeriod spatialModulus stride
let labels := PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod refined
∀ (wholeReference : labels → PrincipalIntegerTuples B (layerSamplerDegree I n) (Fin dim)
(allocatedPrincipalSides B U basis S)) (r : labels),
(∀ y, (wholeLaw).weight y ≠ 0 → principalResidueLabel refined y = r) →
principalResidueLabel refined (wholeReference r) = r →
∀ {W τ ξn mesh : ℝ} (hW : 0 ≤ W) (base : X → ℤ)
(cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) X stride))
(poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ))
(_hp : ∀ j, DegreeLE (1 : X → ℕ) (j.val + 1) (poly j))
(hmem : ∀ j ex, coefficients (poly j) ex ∈ U j)
(test : (X → (Unit ⊕ Fin dim) → ℤ) → ℂ),
let point := physicalCubeRowSample U d rows poly hmem
∀ (model : EuclideanJetLayers U selectedRows → ℂ)
{κ loss εtrunc Psample Rrank Sstride εsample ηsample δsur : ℝ},
(∀ i, 0 < stride i) → (∀ i, 0 < N i) → 0 < τ → 0 < mesh →
allocatedPhysicalRootBudget B U basis S (fun _ => 0) ≤ W →
integerScalarLattice (Unit ⊕ Fin dim) (spatialModulus : ℤ) ≤
pivotFullImage (selectedSpatialPivot (fun g => (0 : ℤ) + (x g none : ℤ))
(scalarCubeDifferenceMatrix x) selection)
(selectedSpatialFreeColumns (fun g => (0 : ℤ) + (x g none : ℤ))
(scalarCubeDifferenceMatrix x) selection) →
(∀ v, ‖test v‖ ≤ 1) →
κ ≤ ((wholeLaw).complexMean (allocatedRecenteredProfileTerm (τ := τ) (ξ := ξn)
B U basis S X spatialModulus stride wholeReference x hMk selection hgood N hW mesh base cells point test
(fun y z => (g y z : ℂ)))).re →
0 ≤ εtrunc → (∀ z, ‖profile z - model z‖ ≤ εtrunc) →
0 ≤ Psample → (Fintype.card X : ℝ) ≤ Psample →
(Fintype.card (Option (Fin dim) × X) : ℝ) ≤ Psample →
(d : ℝ) ≤ Real.exp Psample →
0 ≤ Sstride → Sstride ≤ Real.exp Psample → 0 < εsample →
1 / τ ≤ Real.exp Psample → 1 / εsample ≤ Real.exp Psample →
(∀ i, (stride i : ℝ) ≤ Sstride) →
let A := Classical.choose (exists_translated_physical_jet_l1_perturbation.{uX,uJ,0} m dim)
(∀ i, Real.exp ((Psample + A) ^ A) ≤ (N i : ℝ)) →
(∀ j, HasLayerSamplingRank (j.val + 1) (fun i => (N i : ℝ)) Rrank (U j) (poly j)) →
Real.exp ((Psample + A) ^ A) ≤ Rrank →
∀ (actual surrogate : (JetAmbientIndex selectedRows J → UnitAddCircle) → ℂ)
(La Ls Ca Cs : ℝ≥0),
LipschitzWith La actual → LipschitzWith Ls surrogate →
(∀ z, ‖actual z‖ ≤ Ca) → (∀ z, ‖surrogate z‖ ≤ Cs) →
0 < ηsample → (Fintype.card (CoefficientAmbientIndex (Fin dim) J) : ℝ) ≤ Psample →
(La : ℝ) ≤ Real.exp Psample → (Ls : ℝ) ≤ Real.exp Psample →
(Ca : ℝ) ≤ Real.exp Psample → (Cs : ℝ) ≤ Real.exp Psample →
((∑ j : Fin m, (Fintype.card (BoundedCoefficientExponent (Fin dim) (j.val + 1)) : ℝ≥0) : ℝ≥0) : ℝ) ≤ Real.exp Psample →
ηsample⁻¹ ≤ Real.exp Psample →
(∀ y, ((wholeLaw).mean (fun v => g v y) : ℂ) = actual (coveredJetAmbientTorus U 1 y)) →
(∀ y, ‖profile y - surrogate (coveredJetAmbientTorus U 1 y)‖ ≤ δsur) →
let root := allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x (wholeReference r)
let dirs := allocatedPhysicalCubeDirections B U basis S x (wholeReference r)
let Hsp := trimmedSpatialRootScale τ N stride
let V := narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξn N
let Csp := ((spatialModulus : ℝ) ^ Fintype.card (Unit ⊕ Fin dim) *
anisotropicSpatialDensityCap selection (1 / (Mk : ℝ))) ^ Fintype.card X
let volumeFactor := (30 / smoothProbabilityProfile 0) ^ Fintype.card (Option (Fin dim) × X) *
(((1 + W) / S.value) ^ dim) ^ Fintype.card X
(∀ z, 0 < V z) → (0 < ∑' z, selectedResidueSmoothWeight stride cells V z) →
(∀ t i, (∑ k, |(physicalCubeCoefficient root dirs i k : ℝ)|) ≤ Hsp t) →
(∀ t, 8 * (probabilityProfileLipschitz : ℝ) ≤ 20 * Hsp t) →
(∀ t, 1 ≤ Hsp t) →
Csp * (volumeFactor * (Real.exp (-target) + 2 * δsur + (2 * ηsample + εsample)) +
((9 : ℝ) ^ Fintype.card (X × (Unit ⊕ Fin dim)) *
(((1 + W) / S.value) ^ dim) ^ Fintype.card X) * εtrunc) ≤ loss →
κ - loss ≤
(∑ t : cells × spatialWindow (α := Fin dim) Hsp 4, (selectedResidueCellWeight stride cells V t.1 : ℂ) *
allocatedRecenteredResidueWeight (τ := τ) B U basis S X spatialModulus stride wholeReference x hMk selection hgood
N hW mesh base cells test r t.1 t.2.val *
model (point (allocatedWholeResidueReconstruction B U basis S X spatialModulus stride wholeReference x base r
t.1.val t.2.val))).re := by
intro center width ideal profile spatialModulus _ stride N refined labels wholeReference r hlabel hwhole
W τ ξn mesh hW base cells poly hp hmem test point model κ loss εtrunc Psample Rrank Sstride εsample ηsample δsur
hstridepos hN hτ hmesh hrootbudget hspatialPeriod htest hpositive hεtrunc htrunc
hPs hX hframe hdP hSstride hSstrideP hεsample hτP hεsampleP hstride A hsize hrank hRrank
actual surrogate La Ls Ca Cs hLa hLs hCa hCs hηsample hamb hLaP hLsP hCaP hCsP hjet hηsampleP hactual happrox
root dirs Hsp V Csp volumeFactor hV hZ hrows hscale hH1 hcost
apply allocatedRecenteredSelectedMean_l1_source B U basis S X spatialModulus stride wholeReference
x hMk selection hgood N hW mesh base cells point test (wholeLaw) r hlabel hwhole
(fun y z => (g y z : ℂ)) profile model hstridepos hN hτ hrootbudget hmesh hspatialPeriod htest
hpositive hεtrunc htrunc hV hZ hrows hscale hH1 ?_ hcost
intro a
let targetCell := columnResiduePattern stride (standardPhysicalCubeFrame
(physicalCubeRootDifferences root dirs 0 (boundedColumnResidueRepresentative stride a.val)))
let V₁ := referenceJetEnvelopeWidths (q := dim) stride Hsp
have hwidth (z : Option (Fin dim) × X) : τ * (N z.2 : ℝ) ≤ V₁ z := by
change τ * (N z.2 : ℝ) ≤ referenceJetEnvelopeWidths stride (trimmedSpatialRootScale τ N stride) z
rw [referenceJetEnvelopeWidths_trimmed stride N hstridepos τ z]
nlinarith [mul_pos hτ (Nat.cast_pos.mpr (hN z.2))]
have hV₁ (z : Option (Fin dim) × X) : 0 < V₁ z :=
(mul_pos hτ (Nat.cast_pos.mpr (hN z.2))).trans_le (hwidth z)
obtain ⟨hZa, he⟩ := allocatedAffineIdeal_sampled_l1_of_length B U basis hR hσ S rowSets x s hA hMk hi
hP hMkP hRP hRi hσi hcount Q hb o bW d H₀ step₀ c₀ hH₀ hsubset₀ modulus r₀ hcell ν μ μrows
hdimensions hPk hMkPk hPrho htarget hF hTmod hlength
g hgm hg0 hgi hglaw ρ t htone hs hρ hρ1 hσsmall hstep hδ hδF hdense hm hmodulus
selection hgood hq hrowDegree hperiod v₀ hv₀ T hT hsource C hC hchart hbudget hρlog hη0 hηsmall
hPs hX hframe base poly hp hmem hdP stride hstridepos hSstride hSstrideP hτ hεsample hτP hεsampleP
hstride (fun i => (N i : ℝ)) hsize hrank hRrank {targetCell} (Finset.singleton_nonempty _)
V₁ hV₁ hwidth actual surrogate La Ls Ca Cs hLa hLs hCa hCs hηsample hamb hLaP hLsP hCaP hCsP hjet hηsampleP
hactual happrox
exact ⟨hZa, by simpa only [FiniteProbabilityWeights.complexMean_ofReal] using he⟩
end Erdos3.VectorPolynomial
end
end OAI
import OAI.Combinatorics.Progressions.Estimates.AllocatedRecenteredL1Source
import OAI.Combinatorics.Progressions.Lattices.AllocatedAffineFiniteModelL2
namespace OAI
section
namespace Erdos3.VectorPolynomial
universe uJ uQ
open MeasureTheory Module Submodule
open scoped Classical BigOperators NNReal
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (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 uJ} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (basis : ∀ j, Module.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 basis R σ)
variable {α : Type*} [Fintype α] [DecidableEq α]
variable (rowSets : Fin m → Finset (Finset α))
variable [∀ j, Nonempty (rowSets j)]
local notation "selectedRows" => (fun j : Fin m => {t : Finset α // t ∈ rowSets j})
local notation "rows" => (fun j => (Subtype.val : rowSets j → Finset α))
variable (x : G → IntegerScalarCubeBox α S.value)
variable (s : ∀ j : Fin m, ↥(rowSets j) ↪ BoundedIntegerExponent G (j.val + 1))
variable (hA : ∀ j, ((scalarKernelIntegerJet x (j.val + 1) (Subtype.val : rowSets j → Finset α)).submatrix id (s j)).det ≠ 0)
variable {Mk : ℕ} (hMk : 0 < Mk)
variable (hi : ∀ j : Fin m, fixedKernelInverseBound (O := ↥(rowSets j))
S.positive x (j.val + 1) (Subtype.val : rowSets j → Finset α) (s j) (hA j) (1 / (Mk : ℝ)))
variable {P : ℝ} (hP : 0 ≤ P) (hMkP : (Mk : ℝ) ≤ Real.exp P)
variable (hRP : ∀ j, R j ≤ Real.exp P) (hRi : ∀ j, (R j)⁻¹ ≤ Real.exp P)
variable (hσi : ∀ j, (σ j)⁻¹ ≤ Real.exp P)
variable (hcount : ∀ j : Fin m, (Fintype.card
(BoundedCoefficientExponent (LayerSamplerVariables G I n B) (j.val + 1)) : ℝ) + 1 ≤ Real.exp P)
local notation "grid" => allocatedGridAxis (I := I) U basis S.value
local notation "degree" => layerSamplerDegree I n
local notation "Tuple" => PrincipalTupleIndex (fun a : {a // ¬grid a} => B (Subtype.val a)) (fun a => degree (Subtype.val a))
local notation "jetRows" => selectedRows
local notation "activeB" => (fun a : {a // ¬grid a} => B (Subtype.val a))
local notation "activeDegree" => (fun a : {a // ¬grid a} => degree (Subtype.val a))
local notation "L" => principalAxisLength (fun a => ¬grid a) (allocatedPrincipalSides B U basis S)
local notation "positiveLengths" => (fun j : Tuple => allocatedPrincipalSides_pos B U basis S
(Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j)))
variable (Q : Fin m → Type uQ) [∀ j, Fintype (Q j)]
variable (hb : ∀ j, span ℤ (Set.range (basis j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable (bW : ∀ j, Basis (Q j) ℤ
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))))
variable (d : ℕ) [NeZero d]
local notation "source" => allocatedCoefficientSource B U basis hR hσ S
local notation "frozenSource" => allocatedFrozenCoefficientSource B U basis hR hσ S
local notation "reference" => allocatedLongJetReference B U basis S jetRows
variable (H₀ step₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℕ)
variable (c₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → ℤ) (hH₀ : ∀ t, 0 < H₀ t)
variable (hsubset₀ : ∀ t, integerProgressionSupport (c₀ t) (step₀ t : ℤ) (H₀ t) ⊆
Finset.Ico (0 : ℤ) (allocatedPrincipalSides B U basis S t : ℤ))
variable (modulus : ℕ) (r₀ : PrincipalTupleIndex B (layerSamplerDegree I n) → Option α → ZMod modulus)
variable (hcell : 0 < (principalTupleWeights (α := α) B (layerSamplerDegree I n) H₀ hH₀).mass
(Finset.univ.filter (fun y => principalResidueLabel modulus y = r₀)))
local notation "embed" => (fun j : Tuple => (Sigma.mk (Subtype.val (Sigma.fst j)) (Sigma.snd j) : PrincipalTupleIndex B (layerSamplerDegree I n)))
local notation "H" => (fun j : Tuple => H₀ (embed j))
local notation "step" => (fun j : Tuple => step₀ (embed j))
local notation "c" => (fun j : Tuple => c₀ (embed j))
local notation "hsubset" => (fun j : Tuple => hsubset₀ (embed j))
local notation "residue" => (fun j : Tuple => r₀ (embed j))
local notation "GridTuples" => PrincipalAxisTuples (α := α) grid (allocatedPrincipalSides B U basis S)
local notation "wholeLaw" => containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell
local notation "gridLaw" => containedSupportedProgressionAxisLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U basis S) H₀ step₀ c₀ (allocatedPrincipalSides_pos B U basis S) hH₀ hsubset₀ modulus r₀ hcell grid
local notation "wholeRoot" y => allocatedPhysicalCubeRoot B U basis S (fun _ => 0) x y
local notation "wholeDirs" y => allocatedPhysicalCubeDirections B U basis S x y
local notation "deck" => PMF.uniformOfFintype (CoefficientDeckResidues (K := LayerSamplerVariables G I n B) Q d)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (ν : ∀ j, Measure (euclideanSubspace (U j) ⧸
(latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j))).toAddSubgroup))
variable [∀ j, (ν j).IsAddLeftInvariant] [∀ j, IsProbabilityMeasure (ν 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 (μ : Measure (CoefficientTorus (K := LayerSamplerVariables G I n B) U))
variable [μ.IsAddLeftInvariant] [IsProbabilityMeasure μ]
local notation "ξ" => Measure.pi (fun j => Measure.pi (fun _ : rowSets j => ν j))
local notation "density" => allocatedCoefficientDensity B U basis hb o hR hσ S
local notation "cover" => quotientIntegerCover (coefficientIntegerLattice (K := LayerSamplerVariables G I n B) U) d
include hR hσ hMk hi hP hMkP hRP hRi hσi hcount in
omit [∀ j, Nonempty (rowSets j)] in
theorem allocatedAffineIdeal_l1
(g : PrincipalIntegerTuples B (layerSamplerDegree I n) α (allocatedPrincipalSides B U basis S) →
EuclideanJetLayers U selectedRows → ℝ)
(hgm : ∀ y, Measurable (g y)) (hg0 : ∀ y z, 0 ≤ g y z)
(hgi : ∀ y, Integrable (g y) ξ)
Xet Storage Details
- Size:
- 78.2 kB
- Xet hash:
- 360037521ec0a94efb9cb2e4e965398220d57f354677386dacccca0168ee447b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.