cfahlgren1/math / lean /OAI /Combinatorics /Progressions /Linear /AllocatedSlicedDenseKernelSource.lean
cfahlgren1's picture
download
raw
6.08 kB
import OAI.Combinatorics.Progressions.Estimates.AllocatedSlicedRowsProjectedSource
namespace OAI
section
namespace Erdos3.VectorPolynomial
open Module Submodule MeasureTheory BooleanCubeKernel
open scoped BigOperators Classical
variable {m : ℕ} {G : Type*} [Fintype G] [DecidableEq G]
variable {I : Fin m → Type*} [∀ j, Fintype (I j)] [∀ j, DecidableEq (I j)]
variable {n : Fin m → ℕ} (B : LayerSamplerAxis I n → Type*)
variable [∀ a, Fintype (B a)] [∀ a, DecidableEq (B a)]
variable {J : Fin m → Type*} [∀ j, Fintype (J j)] (U : ∀ j, Submodule ℝ (J j → ℝ))
variable (b : ∀ j, Basis (Fin (n j)) ℝ (euclideanSubspace (U j))ᗮ)
variable (hb : ∀ j, span ℤ (Set.range (b j)) = projectedIntegerLattice (euclideanSubspace (U j)))
variable (o : ∀ j, OrthonormalBasis (I j) ℝ (euclideanSubspace (U j)))
variable {R σ : Fin m → ℝ} (hR : ∀ j, 0 < R j) (hσ : ∀ j, 0 < σ j)
variable (S : LayerSamplerScale (G := G) B U b R σ)
variable {dim : ℕ} (X : Type*) [Fintype X]
variable (poly : ∀ j, VectorPolynomial X ℝ (J j → ℝ))
variable (hmem : ∀ j e, coefficients (poly j) e ∈ U j)
variable [∀ j, IsZLattice ℝ (latticeSection (standardEuclideanLattice (J j)) (euclideanSubspace (U j)))]
variable (N : X → ℕ) (hN : ∀ t, 0 < N t)
variable {W τ ξ : ℝ} (hW : 0 ≤ W) (hτ : 0 < τ) (hξ : 0 < ξ)
variable (stride : X → ℕ)
variable (cells : Finset (ColumnResiduePattern (Option (LayerSamplerVariables G I n B)) X stride))
local notation "widths" => narrowTrimmedSpatialWidths (G := G)
(J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N
local notation "hwidths" => narrowTrimmedSpatialWidths_pos hW hτ hξ N hN
local notation "baseDensity" => allocatedJointBaseDensity B U b hb o hR hσ S X poly hmem
local notation "whole" => principalTupleWeights (α := Fin dim) B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) (allocatedPrincipalSides_pos B U b S)
variable (hmass : 0 < ∑' z, selectedResidueSmoothWeight stride cells
(narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N) z)
variable (bases : Finset (X → ℤ)) (hbases : bases.Nonempty)
variable (htotal : 0 < selectedJointDensityMass bases stride cells
(narrowTrimmedSpatialWidths (G := G) (J := PrincipalTupleIndex B (layerSamplerDegree I n)) W τ ξ N)
(allocatedJointBaseDensity B U b hb o hR hσ S X poly hmem))
local notation "sides" => Sum.elim (fun _ : G => S.value) (allocatedPrincipalSides B U b S)
local notation "hSides" => (Sum.rec (fun _ : G => S.positive) (allocatedPrincipalSides_pos B U b S))
variable (H : LayerSamplerVariables G I n B → ℕ) (hH : ∀ k, 0 < H k)
variable (c : LayerSamplerVariables G I n B → ℤ) (step : ℕ)
variable (hsubset : ∀ k : LayerSamplerVariables G I n B,
integerProgressionSupport (c k) (step : ℤ) (H k) ⊆
Finset.Ico (0 : ℤ)
((Sum.elim (fun _ : G => S.value) (allocatedPrincipalSides B U b S) k : ℕ) : ℤ))
local notation "kernelLaw" => containedProgressionCubeLaw (α := Fin dim)
(fun _ : G => S.value) (fun g => H (Sum.inl g)) (fun _ => step) (fun g => c (Sum.inl g))
(fun _ => S.positive) (fun g => hH (Sum.inl g)) (fun g => hsubset (Sum.inl g))
local notation "principalLaw" => containedProgressionCubeLaw (α := Fin dim)
(allocatedPrincipalSides B U b S) (fun j => H (Sum.inr j)) (fun _ => step) (fun j => c (Sum.inr j))
(allocatedPrincipalSides_pos B U b S) (fun j => hH (Sum.inr j)) (fun j => hsubset (Sum.inr j))
include hbases htotal in
theorem allocatedSlicedCubeSource_good_kernel_dense_residue
[Nonempty (Fin dim)]
(selection : Fin dim ↪ G) (hG : dim * (dim + 2) ≤ Fintype.card G)
{F gain : ℝ} (hgain : 0 < gain)
(hkernel : scalarKernelCutoff (Fin dim) G 1 ⌈Real.exp F⌉₊ (gain / 2) ≤ S.value)
(hstep : 0 < step) (hcounts : ∀ g, Real.exp (-F) * S.value ≤ (H (Sum.inl g) : ℝ))
(f : (X → ℤ) → ℂ) (hf : ∀ u, ‖f u‖ ≤ 1)
(hlarge : gain ≤ (allocatedSlicedCubeSource (dim := dim) B U b hb o hR hσ S X poly hmem
N hN hW hτ hξ stride cells hmass bases H hH c step f).re)
(q : (G → IntegerScalarCubeBox (Fin dim) S.value) → ℕ) [∀ x, NeZero (q x)] :
let Mk := scalarKernelCutoff (Fin dim) G 1 ⌈Real.exp F⌉₊ (gain / 2)
∃ (x : G → IntegerScalarCubeBox (Fin dim) S.value),
0 < (kernelLaw).weight x ∧ GoodScalarKernelTuple selection (1 / (Mk : ℝ)) Mk x ∧
∃ (r : PrincipalTupleIndex B (layerSamplerDegree I n) → Option (Fin dim) → ZMod (q x))
(hr : 0 < (principalTupleWeights (α := Fin dim) B (layerSamplerDegree I n)
(fun j => H (Sum.inr j)) (fun j => hH (Sum.inr j))).mass
(Finset.univ.filter (fun y => principalResidueLabel (q x) y = r))),
gain / 2 ≤ ((containedSupportedProgressionLaw B (layerSamplerDegree I n)
(allocatedPrincipalSides B U b S) (fun j => H (Sum.inr j)) (fun _ => step)
(fun j => c (Sum.inr j)) (allocatedPrincipalSides_pos B U b S)
(fun j => hH (Sum.inr j)) (fun j => hsubset (Sum.inr j)) (q x) r hr).complexMean
(fun y => allocatedSlicedTupleValue B U b hb o hR hσ S X poly hmem
N hN hW hτ hξ stride cells hmass bases x y f)).re := by
intro Mk
have hD : 0 < ⌈Real.exp F⌉₊ := Nat.ceil_pos.mpr (Real.exp_pos F)
have hLH (g : G) : S.value ≤ ⌈Real.exp F⌉₊ * H (Sum.inl g) := by
have h := mul_le_mul_of_nonneg_left (hcounts g) (Real.exp_nonneg F)
have hl : (S.value : ℝ) ≤ Real.exp F * H (Sum.inl g) := by
simpa only [← mul_assoc, ← Real.exp_add, add_neg_cancel, Real.exp_zero, one_mul] using h
exact_mod_cast hl.trans (mul_le_mul_of_nonneg_right (Nat.le_ceil _) (Nat.cast_nonneg _))
exact allocatedSlicedCubeSource_good_kernel_residue B U b hb o hR hσ S X poly hmem
N hN hW hτ hξ stride cells hmass bases hbases htotal H hH c step hsubset
selection hG hD (half_pos hgain) (half_pos hgain) hkernel hstep hLH f hf
(by simpa only [add_halves] using hlarge) q
end Erdos3.VectorPolynomial
end
end OAI

Xet Storage Details

Size:
6.08 kB
·
Xet hash:
1346b6271e4f988bb521abcf4dbdeb24d1baf388cde31abd92d8ec902f575c12

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