cfahlgren1/math / lean /OAI /Computability /MaxCut /Games /KMSBasisComparisonPseudorandomTupleMap.lean
cfahlgren1's picture
download
raw
36.4 kB
import Mathlib
import OAI.Computability.MaxCut.Games.KMSMomentConstants
namespace OAI
/-! The restricted tuple law is the actual linear-map lift law in coordinates,
with all singular tuples still present in the uniform denominator. -/
namespace MaxCutGames.Inverse.KMSBasisComparisonPseudorandom
noncomputable section
open scoped BigOperators Classical
open KMS KMSBasisComparison
variable {n q t : ℕ}
def tupleBasis (q t : ℕ) : Module.Basis (Fin q ⊕ Fin t) F2 (Ambient (q + t)) :=
(Pi.basisFun F2 (Fin (q + t))).reindex finSumFinEquiv.symm
def tupleMapEquiv : ((Fin q ⊕ Fin t) → Ambient n) ≃ BasisMap n (q + t) :=
((tupleBasis q t).constr F2).toEquiv
def tupleMap (x : (Fin q ⊕ Fin t) → Ambient n) : BasisMap n (q + t) :=
(tupleBasis q t).constr F2 x
theorem tupleMap_range (x : (Fin q ⊕ Fin t) → Ambient n) :
LinearMap.range (tupleMap x) = Submodule.span F2 (Set.range x) :=
(tupleBasis q t).constr_range F2
@[simp] theorem tupleMap_basis (x : (Fin q ⊕ Fin t) → Ambient n)
(i : Fin q ⊕ Fin t) : tupleMap x (tupleBasis q t i) = x i :=
(tupleBasis q t).constr_basis F2 x i
theorem tupleMap_injective_iff (x : (Fin q ⊕ Fin t) → Ambient n) :
Function.Injective (tupleMap x) ↔ LinearIndependent F2 x := by
constructor
· intro h
have hi := (tupleBasis q t).linearIndependent.map' (tupleMap x)
(LinearMap.ker_eq_bot.mpr h)
simpa only [Function.comp_def, tupleMap_basis] using hi
· intro h
exact (tupleBasis q t).injective_constr_of_linearIndependent h
theorem inLift_tupleMap_iff (S : Finset (Vertex n (q + t)))
(Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n)) (z : Fin t → W) :
InLift S (tupleMap (joinedTuple Q W z)) ↔ completionEvent S Q W z := by
constructor
· intro h
have hi := (tupleMap_injective_iff _).mp (injective_of_inLift h)
obtain ⟨L, hLS, hr⟩ := h
refine ⟨hi, ?_⟩
have he : completionVertex Q W ⟨z, hi⟩ = L := by
apply Subtype.ext
exact (tupleMap_range _).symm.trans hr
simpa only [he] using hLS
· rintro ⟨hi, hmem⟩
exact ⟨completionVertex Q W ⟨z, hi⟩, hmem, tupleMap_range _⟩
/-- The tuple density equals the normalized expectation of the actual lift's
indicator on the prescribed basis-coordinate restriction. -/
theorem restrictedLiftDensity_eq_expect (S : Finset (Vertex n (q + t)))
(Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n)) :
restrictedLiftDensity S Q W =
𝔼 z : Fin t → W, liftedIndicator S (tupleMap (joinedTuple Q W z)) := by
rw [Fintype.expect_eq_sum_div_card]
simp only [liftedIndicator, inLift_tupleMap_iff]
rw [Finset.sum_boole]
simp only [restrictedLiftDensity, Nat.card_eq_fintype_card, Fintype.card_subtype]
/-- KMS Lemma 2.8 in the actual linear-map coordinates, with the stronger ε
bound supplied by exact equal-size completion fibers. -/
theorem grassmann_pseudorandom_lift_expect {r : ℕ} {ε : ℝ}
(S : Finset (Vertex n (q + t))) (hS : GrassmannPseudorandom S r ε)
(hε : 0 ≤ ε) (Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n))
(hbudget : q + (n - Module.finrank F2 W) ≤ r) :
(𝔼 z : Fin t → W, liftedIndicator S (tupleMap (joinedTuple Q W z))) ≤ ε := by
rw [← restrictedLiftDensity_eq_expect]
exact grassmann_pseudorandom_restricted S hS hε Q W hbudget
end
end MaxCutGames.Inverse.KMSBasisComparisonPseudorandom
/-!
The KMS restricted-tuple bound in any adapted basis, followed by an exact
uniform affine translation of the free coordinates. No generic rank-level
inequality is used: this is a change of coordinates for the actual lift.
-/
namespace MaxCutGames.Inverse.KMSAffineRestriction
noncomputable section
open scoped BigOperators Classical
open KMS KMSBasisComparison KMSBasisComparisonPseudorandom
variable {n ell q t r : ℕ} {ε : ℝ}
/-- The independent tuple law has the same bound in every basis of the domain.
The indicator depends only on the actual range of the constructed map. -/
theorem lifted_expect_in_basis (S : Finset (Vertex n ell))
(hS : GrassmannPseudorandom S r ε) (hε : 0 ≤ ε)
(b : Module.Basis (Fin q ⊕ Fin t) F2 (Ambient ell))
(Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n))
(hbudget : q + (n - Module.finrank F2 W) ≤ r) :
(𝔼 z : Fin t → W, liftedIndicator S (b.constr F2 (joinedTuple Q W z))) ≤ ε := by
have hdim : ell = q + t := by
simpa [Ambient] using Module.finrank_eq_card_basis b
subst ell
have hc := grassmann_pseudorandom_lift_expect S hS hε Q W hbudget
convert hc using 1
apply Finset.expect_congr rfl
intro z _
unfold liftedIndicator InLift
rw [b.constr_range F2, tupleMap_range]
/-- Coordinates of a uniform linear map, translated by a fixed linear map,
are still exactly uniform. This also covers zero-dimensional free domains. -/
def affineCoordinates {E W : Type*}
[AddCommGroup E] [Module F2 E] [AddCommGroup W] [Module F2 W]
(b : Module.Basis (Fin t) F2 E) (T : E →ₗ[F2] W) :
(E →ₗ[F2] W) ≃ (Fin t → W) :=
((b.constr F2).toEquiv).symm.trans (Equiv.addLeft (fun i => T (b i)))
@[simp] theorem affineCoordinates_apply {E W : Type*}
[AddCommGroup E] [Module F2 E] [AddCommGroup W] [Module F2 W]
(b : Module.Basis (Fin t) F2 E) (T H : E →ₗ[F2] W) (i : Fin t) :
affineCoordinates b T H i = T (b i) + H (b i) := rfl
/-- Actual uniform affine free-coordinate noise satisfies the tuple bound. -/
theorem lifted_expect_shifted_basis {E0 : Type*}
[AddCommGroup E0] [Module F2 E0]
(S : Finset (Vertex n ell)) (hS : GrassmannPseudorandom S r ε) (hε : 0 ≤ ε)
(b : Module.Basis (Fin q ⊕ Fin t) F2 (Ambient ell))
(Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n))
[Fintype (E0 →ₗ[F2] W)]
(b0 : Module.Basis (Fin t) F2 E0) (T0 : E0 →ₗ[F2] W)
(hbudget : q + (n - Module.finrank F2 W) ≤ r) :
(𝔼 H : E0 →ₗ[F2] W, liftedIndicator S
(b.constr F2 (joinedTuple Q W (fun i => T0 (b0 i) + H (b0 i))))) ≤ ε := by
have heq : (𝔼 H : E0 →ₗ[F2] W, liftedIndicator S
(b.constr F2 (joinedTuple Q W (fun i => T0 (b0 i) + H (b0 i))))) =
𝔼 z : Fin t → W, liftedIndicator S (b.constr F2 (joinedTuple Q W z)) := by
apply Fintype.expect_equiv (affineCoordinates b0 T0)
intro H
rfl
rw [heq]
exact lifted_expect_in_basis S hS hε b Q W hbudget
end
end MaxCutGames.Inverse.KMSAffineRestriction
/-!
Complements adapted to an affine restriction. The prescribed directions are
contained in a small summand, and the complementary directions are mapped into
the prescribed target subspace. This is ordinary finite-dimensional geometry;
no Fourier inequality or pseudorandomness hypothesis is used.
-/
namespace MaxCutGames.Inverse.KMSAffineRestrictionComplement
variable {K E F : Type*} [DivisionRing K]
[AddCommGroup E] [Module K E] [FiniteDimensional K E]
[AddCommGroup F] [Module K F]
/-- Enlarge prescribed directions by at most the rank of `L`, leaving a
complement on which `L` vanishes. -/
theorem exists_bounded_complement_of_linearMap
(V1 : Submodule K E) (L : E →ₗ[K] F) :
∃ U E0 : Submodule K E,
V1 ≤ U ∧ E0 ≤ LinearMap.ker L ∧ IsCompl U E0 ∧
Module.finrank K U ≤
Module.finrank K V1 + Module.finrank K (LinearMap.range L) := by
obtain ⟨D, hD⟩ := (LinearMap.ker L).exists_isCompl
let U : Submodule K E := V1 ⊔ D
have hcover : Codisjoint (LinearMap.ker L) U :=
hD.codisjoint.mono_right le_sup_right
obtain ⟨E0, hE0, hcompl⟩ := hcover.exists_isCompl
refine ⟨U, E0, le_sup_left, hE0, hcompl.symm, ?_⟩
have hdim := Submodule.finrank_add_eq_of_isCompl hD
have hrank := LinearMap.finrank_range_add_finrank_ker L
have hDdim : Module.finrank K D = Module.finrank K (LinearMap.range L) := by
omega
exact (Submodule.finrank_add_le_finrank_add_finrank V1 D).trans
(by rw [hDdim])
/-- Split the domain while preserving `V1` and mapping all complementary
directions into `W`. The extra dimension is at most the codimension of `W`. -/
theorem exists_bounded_complement [FiniteDimensional K F]
(V1 : Submodule K E) (W : Submodule K F) (T : E →ₗ[K] F) :
∃ U E0 : Submodule K E,
V1 ≤ U ∧ E0 ≤ LinearMap.ker (W.mkQ.comp T) ∧ IsCompl U E0 ∧
Module.finrank K U ≤
Module.finrank K V1 + Module.finrank K (F ⧸ W) := by
obtain ⟨U, E0, hV1, hE0, hcompl, hdim⟩ :=
exists_bounded_complement_of_linearMap V1 (W.mkQ.comp T)
refine ⟨U, E0, hV1, hE0, hcompl, hdim.trans ?_⟩
exact Nat.add_le_add_left (Submodule.finrank_le (LinearMap.range (W.mkQ.comp T))) _
end MaxCutGames.Inverse.KMSAffineRestrictionComplement
/-!
The actual parameter space of an affine matrix restriction splits along a
complementary domain decomposition. The constrained coordinate is a map out of
`U / D`, while the complementary coordinate is an unrestricted map into `W`.
The equivalence transports the full uniform law to independent uniform factors.
-/
namespace MaxCutGames.Inverse.KMSAffineRestrictionSplit
open MaxCutGames.Integration.BinaryLinear
open MaxCutGames.Fourier.MatrixRestrictions
open scoped BigOperators
noncomputable section
variable {E F : Type*} [AddCommGroup E] [Module F2 E]
[AddCommGroup F] [Module F2 F]
/-- The original vanishing subspace viewed inside the chosen large summand. -/
abbrev localVanishing (D U : Submodule F2 E) : Submodule F2 U :=
D.comap U.subtype
/-- The constrained component of an actual quotient parameter. -/
def splitLeft (D U : Submodule F2 E) (W : Submodule F2 F)
(A : Parameter D W) : Parameter (localVanishing D U) W :=
(localVanishing D U).liftQ (A.comp (D.mkQ.comp U.subtype)) (by
intro x hx
change A (D.mkQ (x : E)) = 0
have hz : D.mkQ (x : E) = 0 :=
(Submodule.Quotient.mk_eq_zero D).mpr hx
rw [hz, map_zero])
@[simp] theorem splitLeft_apply (D U : Submodule F2 E) (W : Submodule F2 F)
(A : Parameter D W) (x : U) :
splitLeft D U W A ((localVanishing D U).mkQ x) =
A (D.mkQ (x : E)) := rfl
/-- The free component of an actual quotient parameter. -/
def splitRight (D E₀ : Submodule F2 E) (W : Submodule F2 F)
(A : Parameter D W) : E₀ →ₗ[F2] W :=
A.comp (D.mkQ.comp E₀.subtype)
@[simp] theorem splitRight_apply (D E₀ : Submodule F2 E) (W : Submodule F2 F)
(A : Parameter D W) (x : E₀) :
splitRight D E₀ W A x = A (D.mkQ (x : E)) := rfl
/-- Assemble the two components before quotienting by `D`. -/
def joinMap (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hc : IsCompl U E₀) (B : Parameter (localVanishing D U) W)
(C : E₀ →ₗ[F2] W) : E →ₗ[F2] W :=
B.comp ((localVanishing D U).mkQ.comp (U.projectionOnto E₀ hc)) +
C.comp (E₀.projectionOnto U hc.symm)
@[simp] theorem joinMap_apply_left (D U E₀ : Submodule F2 E)
(W : Submodule F2 F) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) (x : U) :
joinMap D U E₀ W hc B C (x : E) = B ((localVanishing D U).mkQ x) := by
simp [joinMap]
@[simp] theorem joinMap_apply_right (D U E₀ : Submodule F2 E)
(W : Submodule F2 F) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) (x : E₀) :
joinMap D U E₀ W hc B C (x : E) = C x := by
simp [joinMap]
theorem joinMap_vanishes (D U E₀ : Submodule F2 E)
(W : Submodule F2 F) (hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) :
D ≤ (joinMap D U E₀ W hc B C).ker := by
intro x hx
let u : U := ⟨x, hDU hx⟩
change joinMap D U E₀ W hc B C (u : E) = 0
rw [joinMap_apply_left]
have hz : (localVanishing D U).mkQ u = 0 :=
(Submodule.Quotient.mk_eq_zero (localVanishing D U)).mpr hx
rw [hz, map_zero]
/-- The actual quotient parameter reconstructed from both independent pieces. -/
def join (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) : Parameter D W :=
D.liftQ (joinMap D U E₀ W hc B C) (joinMap_vanishes D U E₀ W hDU hc B C)
@[simp] theorem join_apply (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) (x : E) :
join D U E₀ W hDU hc B C (D.mkQ x) = joinMap D U E₀ W hc B C x := rfl
@[simp] theorem join_embed_apply_left (D U E₀ : Submodule F2 E)
(W : Submodule F2 F) (hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) (x : U) :
embed D W (join D U E₀ W hDU hc B C) (x : E) =
(B ((localVanishing D U).mkQ x) : F) := by
rw [embed_apply, join_apply, joinMap_apply_left]
@[simp] theorem join_embed_apply_right (D U E₀ : Submodule F2 E)
(W : Submodule F2 F) (hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) (x : E₀) :
embed D W (join D U E₀ W hDU hc B C) (x : E) = (C x : F) := by
rw [embed_apply, join_apply, joinMap_apply_right]
theorem splitLeft_join (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) :
splitLeft D U W (join D U E₀ W hDU hc B C) = B := by
apply LinearMap.ext
intro q
obtain ⟨x, rfl⟩ := (localVanishing D U).mkQ_surjective q
rw [splitLeft_apply, join_apply, joinMap_apply_left]
theorem splitRight_join (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) :
splitRight D E₀ W (join D U E₀ W hDU hc B C) = C := by
apply LinearMap.ext
intro x
rw [splitRight_apply, join_apply, joinMap_apply_right]
theorem join_split (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀) (A : Parameter D W) :
join D U E₀ W hDU hc (splitLeft D U W A) (splitRight D E₀ W A) = A := by
apply LinearMap.ext
intro q
obtain ⟨x, rfl⟩ := D.mkQ_surjective q
obtain ⟨⟨u, v⟩, hx⟩ := (Submodule.prodEquivOfIsCompl U E₀ hc).surjective x
change (u : E) + (v : E) = x at hx
rw [← hx]
simp only [map_add, join_apply, joinMap_apply_left, joinMap_apply_right,
splitLeft_apply, splitRight_apply]
/-- Linear equivalence of the full restriction domain with the constrained
component and the free complementary component. -/
def splitEquiv (D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀) :
Parameter D W ≃ₗ[F2]
(Parameter (localVanishing D U) W × (E₀ →ₗ[F2] W)) where
toFun A := (splitLeft D U W A, splitRight D E₀ W A)
invFun P := join D U E₀ W hDU hc P.1 P.2
left_inv := join_split D U E₀ W hDU hc
right_inv P := Prod.ext (splitLeft_join D U E₀ W hDU hc P.1 P.2)
(splitRight_join D U E₀ W hDU hc P.1 P.2)
map_add' A B := by
apply Prod.ext
· apply LinearMap.ext
intro q
obtain ⟨x, rfl⟩ := (localVanishing D U).mkQ_surjective q
rfl
· rfl
map_smul' a A := by
apply Prod.ext
· apply LinearMap.ext
intro q
obtain ⟨x, rfl⟩ := (localVanishing D U).mkQ_surjective q
rfl
· rfl
@[simp] theorem splitEquiv_symm_apply (D U E₀ : Submodule F2 E)
(W : Submodule F2 F) (hDU : D ≤ U) (hc : IsCompl U E₀)
(B : Parameter (localVanishing D U) W) (C : E₀ →ₗ[F2] W) :
(splitEquiv D U E₀ W hDU hc).symm (B, C) = join D U E₀ W hDU hc B C := rfl
instance freeFintype [Finite E] [Finite F] (E₀ : Submodule F2 E)
(W : Submodule F2 F) : Fintype (E₀ →ₗ[F2] W) := by
classical
letI : Fintype E₀ := Fintype.ofFinite E₀
letI : Fintype W := Fintype.ofFinite W
exact Fintype.ofInjective (fun C : E₀ →ₗ[F2] W => (C : E₀ → W))
DFunLike.coe_injective
/-- Exact product uniform sampling on the original quotient-map parameters. -/
theorem expect_join [Finite E] [Finite F]
(D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀) (f : Parameter D W → ℝ) :
(𝔼 A : Parameter D W, f A) =
𝔼 B : Parameter (localVanishing D U) W,
𝔼 C : E₀ →ₗ[F2] W, f (join D U E₀ W hDU hc B C) := by
calc
_ = 𝔼 P : Parameter (localVanishing D U) W × (E₀ →ₗ[F2] W),
f (join D U E₀ W hDU hc P.1 P.2) :=
Fintype.expect_equiv (splitEquiv D U E₀ W hDU hc).toEquiv _ _
(fun A => congrArg f (join_split D U E₀ W hDU hc A).symm)
_ = _ := by
rw [← Finset.univ_product_univ, Finset.expect_product]
/-- The same exact split for the observable on the actual affine restriction. -/
theorem expect_restrict [Finite E] [Finite F]
(D U E₀ : Submodule F2 E) (W : Submodule F2 F)
(hDU : D ≤ U) (hc : IsCompl U E₀) (T : E →ₗ[F2] F)
(f : (E →ₗ[F2] F) → ℝ) :
(𝔼 A : Parameter D W, restrict f D W T A) =
𝔼 B : Parameter (localVanishing D U) W,
𝔼 C : E₀ →ₗ[F2] W, f (translate D W T (join D U E₀ W hDU hc B C)) :=
expect_join D U E₀ W hDU hc (restrict f D W T)
end
end MaxCutGames.Inverse.KMSAffineRestrictionSplit
/-!
Grassmann interval pseudorandomness controls actual arbitrary affine matrix
restrictions, at twice the restriction order. The proof chooses a bounded
prefix containing the vanishing subspace and all nonhomogeneous directions,
splits the exact quotient-map parameter law, and applies the tuple estimate.
-/
namespace MaxCutGames.Inverse.KMSAffineRestriction
noncomputable section
open scoped BigOperators Classical
open KMS KMSBasisComparison KMSBasisComparisonPseudorandom
open MaxCutGames.Fourier.MatrixRestrictions
open KMSAffineRestrictionSplit
variable {n ell q t : ℕ}
/-- Basis obtained from a genuine complementary domain decomposition. -/
def complementBasis (U E0 : Submodule F2 (Ambient ell)) (hc : IsCompl U E0)
(bU : Module.Basis (Fin q) F2 U) (b0 : Module.Basis (Fin t) F2 E0) :
Module.Basis (Fin q ⊕ Fin t) F2 (Ambient ell) :=
(bU.prod b0).map (Submodule.prodEquivOfIsCompl U E0 hc)
@[simp] theorem complementBasis_inl (U E0 : Submodule F2 (Ambient ell))
(hc : IsCompl U E0) (bU : Module.Basis (Fin q) F2 U)
(b0 : Module.Basis (Fin t) F2 E0) (i : Fin q) :
complementBasis U E0 hc bU b0 (Sum.inl i) = (bU i : Ambient ell) := by
simp [complementBasis, Module.Basis.prod_apply]
@[simp] theorem complementBasis_inr (U E0 : Submodule F2 (Ambient ell))
(hc : IsCompl U E0) (bU : Module.Basis (Fin q) F2 U)
(b0 : Module.Basis (Fin t) F2 E0) (i : Fin t) :
complementBasis U E0 hc bU b0 (Sum.inr i) = (b0 i : Ambient ell) := by
simp [complementBasis, Module.Basis.prod_apply]
/-- The affine center restricted to directions whose images already lie in W. -/
def freeCenter (E0 : Submodule F2 (Ambient ell)) (W : Submodule F2 (Ambient n))
(T : BasisMap n ell) (hE0 : E0 ≤ LinearMap.ker (W.mkQ.comp T)) : E0 →ₗ[F2] W :=
(T.comp E0.subtype).codRestrict W fun x =>
(Submodule.Quotient.mk_eq_zero W).mp (hE0 x.property)
@[simp] theorem freeCenter_coe (E0 : Submodule F2 (Ambient ell))
(W : Submodule F2 (Ambient n)) (T : BasisMap n ell)
(hE0 : E0 ≤ LinearMap.ker (W.mkQ.comp T)) (x : E0) :
(freeCenter E0 W T hE0 x : Ambient n) = T x := rfl
/-- Exact pointwise identity for the actual affine slice after splitting its
parameters. The fixed prefix includes the affine intercept. -/
theorem translate_join_eq_constr
(D U E0 : Submodule F2 (Ambient ell)) (W : Submodule F2 (Ambient n))
(hDU : D ≤ U) (hc : IsCompl U E0) (T : BasisMap n ell)
(hE0 : E0 ≤ LinearMap.ker (W.mkQ.comp T))
(bU : Module.Basis (Fin q) F2 U) (b0 : Module.Basis (Fin t) F2 E0)
(B : Parameter (localVanishing D U) W) (C : E0 →ₗ[F2] W) :
MaxCutGames.Fourier.MatrixRestrictions.translate D W T (join D U E0 W hDU hc B C) =
(complementBasis U E0 hc bU b0).constr F2
(joinedTuple
(fun i => T (bU i) + (B ((localVanishing D U).mkQ (bU i)) : Ambient n)) W
(fun i => freeCenter E0 W T hE0 (b0 i) + C (b0 i))) := by
apply (complementBasis U E0 hc bU b0).ext
intro i
rw [Module.Basis.constr_basis]
cases i with
| inl i =>
simp only [complementBasis_inl, joinedTuple, Sum.elim_inl,
MaxCutGames.Fourier.MatrixRestrictions.translate, LinearMap.add_apply]
rw [join_embed_apply_left]
| inr i =>
simp only [complementBasis_inr, joinedTuple, Sum.elim_inr,
MaxCutGames.Fourier.MatrixRestrictions.translate, LinearMap.add_apply]
rw [join_embed_apply_right]
rfl
/-- A bounded adapted prefix controls the entire affine restriction law. -/
theorem affine_expect_of_complement {r : ℕ} {ε : ℝ}
(S : Finset (Vertex n ell)) (hS : GrassmannPseudorandom S r ε) (hε : 0 ≤ ε)
(D U E0 : Submodule F2 (Ambient ell)) (W : Submodule F2 (Ambient n))
(hDU : D ≤ U) (hc : IsCompl U E0) (T : BasisMap n ell)
(hE0 : E0 ≤ LinearMap.ker (W.mkQ.comp T))
(hbudget : Module.finrank F2 U + (n - Module.finrank F2 W) ≤ r) :
(𝔼 A : Parameter D W, restrict (liftedIndicator S) D W T A) ≤ ε := by
rw [expect_restrict D U E0 W hDU hc T]
apply Finset.expect_le Finset.univ_nonempty
intro B _
let bU := Module.finBasis F2 U
let b0 := Module.finBasis F2 E0
have heq :
(𝔼 C : E0 →ₗ[F2] W,
liftedIndicator S (MaxCutGames.Fourier.MatrixRestrictions.translate D W T (join D U E0 W hDU hc B C))) =
𝔼 C : E0 →ₗ[F2] W,
liftedIndicator S ((complementBasis U E0 hc bU b0).constr F2
(joinedTuple
(fun i => T (bU i) + (B ((localVanishing D U).mkQ (bU i)) : Ambient n)) W
(fun i => freeCenter E0 W T hE0 (b0 i) + C (b0 i)))) := by
apply Finset.expect_congr rfl
intro C _
rw [translate_join_eq_constr D U E0 W hDU hc T hE0 bU b0 B C]
rw [heq]
exact lifted_expect_shifted_basis S hS hε (complementBasis U E0 hc bU b0)
_ W b0 (freeCenter E0 W T hE0) hbudget
/-- Every actual affine restriction of order d is sparse if all Grassmann
intervals of complexity at most 2d are sparse. Both sampling factors remain
uniform on their full finite spaces. -/
theorem affine_expect_bound {d : ℕ} {ε : ℝ}
(S : Finset (Vertex n ell)) (hS : GrassmannPseudorandom S (2 * d) ε)
(hε : 0 ≤ ε) (D : Submodule F2 (Ambient ell))
(W : Submodule F2 (Ambient n)) (T : BasisMap n ell)
(horder : order D W ≤ d) :
(𝔼 A : Parameter D W, restrict (liftedIndicator S) D W T A) ≤ ε := by
obtain ⟨U, E0, hDU, hE0, hc, hdim⟩ :=
KMSAffineRestrictionComplement.exists_bounded_complement D W T
have hcodim : n - Module.finrank F2 W = Module.finrank F2 (KMS.Ambient n ⧸ W) := by
have hd := W.finrank_quotient_add_finrank
have hn : Module.finrank F2 (KMS.Ambient n) = n := by simp [KMS.Ambient]
rw [hn] at hd
omega
apply affine_expect_of_complement S hS hε D U E0 W hDU hc T hE0
rw [hcodim]
change Module.finrank F2 D + Module.finrank F2 (KMS.Ambient n ⧸ W) ≤ d at horder
omega
/-- The normalized squared restriction norm is exactly the same sparse
probability because the full-rank lift is Boolean. -/
theorem affine_squared_expect_bound {d : ℕ} {ε : ℝ}
(S : Finset (Vertex n ell)) (hS : GrassmannPseudorandom S (2 * d) ε)
(hε : 0 ≤ ε) (D : Submodule F2 (Ambient ell))
(W : Submodule F2 (Ambient n)) (T : BasisMap n ell)
(horder : order D W ≤ d) :
(𝔼 A : Parameter D W, (restrict (liftedIndicator S) D W T A) ^ 2) ≤ ε := by
have heq : (𝔼 A : Parameter D W, (restrict (liftedIndicator S) D W T A) ^ 2) =
𝔼 A : Parameter D W, restrict (liftedIndicator S) D W T A := by
apply Finset.expect_congr rfl
intro A _
unfold restrict liftedIndicator
split <;> norm_num
rw [heq]
exact affine_expect_bound S hS hε D W T horder
end
end MaxCutGames.Inverse.KMSAffineRestriction
/-!
An affine map family presented by a surjective input map and an injective
output map is precisely the quotient-parameter family with vanishing subspace
the input kernel and target subspace the output range. Both its uniform law
and its dimension budget agree exactly with the intrinsic restriction data.
-/
namespace MaxCutGames.Inverse.KMSAffineRestrictionPresentation
open MaxCutGames.Integration.BinaryLinear
open MaxCutGames.Fourier.MatrixRestrictions
open scoped BigOperators
noncomputable section
variable {E F D C : Type*}
[AddCommGroup E] [Module F2 E] [AddCommGroup F] [Module F2 F]
[AddCommGroup D] [Module F2 D] [AddCommGroup C] [Module F2 C]
/-- Change from surjective/injective presentation coordinates to the actual
quotient-domain and subspace-target parameter. -/
def parameterEquiv (L : E →ₗ[F2] D) (hL : Function.Surjective L)
(J : C →ₗ[F2] F) (hJ : Function.Injective J) :
(D →ₗ[F2] C) ≃ₗ[F2] Parameter L.ker J.range :=
LinearEquiv.arrowCongr (L.quotKerEquivOfSurjective hL).symm
(LinearEquiv.ofInjective J hJ)
@[simp] theorem parameterEquiv_apply_mk (L : E →ₗ[F2] D)
(hL : Function.Surjective L) (J : C →ₗ[F2] F)
(hJ : Function.Injective J) (X : D →ₗ[F2] C) (x : E) :
((parameterEquiv L hL J hJ X) (L.ker.mkQ x) : F) = J (X (L x)) := rfl
/-- The embedded quotient parameter is the original two-sided composition. -/
@[simp] theorem embed_parameterEquiv (L : E →ₗ[F2] D)
(hL : Function.Surjective L) (J : C →ₗ[F2] F)
(hJ : Function.Injective J) (X : D →ₗ[F2] C) :
embed L.ker J.range (parameterEquiv L hL J hJ X) = J.comp (X.comp L) := by
apply LinearMap.ext
intro x
rfl
@[simp] theorem translate_parameterEquiv (L : E →ₗ[F2] D)
(hL : Function.Surjective L) (J : C →ₗ[F2] F)
(hJ : Function.Injective J) (T : E →ₗ[F2] F) (X : D →ₗ[F2] C) :
MaxCutGames.Fourier.MatrixRestrictions.translate L.ker J.range T (parameterEquiv L hL J hJ X) =
T + J.comp (X.comp L) := by
rw [MaxCutGames.Fourier.MatrixRestrictions.translate, embed_parameterEquiv]
/-- Exact uniform expectation in any presentation of the actual restriction. -/
theorem expect_presentation [Finite E] [Finite F] [Fintype (D →ₗ[F2] C)]
(L : E →ₗ[F2] D) (hL : Function.Surjective L)
(J : C →ₗ[F2] F) (hJ : Function.Injective J)
(T : E →ₗ[F2] F) (f : (E →ₗ[F2] F) → ℝ) :
(𝔼 X : D →ₗ[F2] C, f (T + J.comp (X.comp L))) =
𝔼 A : Parameter L.ker J.range, restrict f L.ker J.range T A := by
apply Fintype.expect_equiv (parameterEquiv L hL J hJ).toEquiv
intro X
exact congrArg f (translate_parameterEquiv L hL J hJ T X).symm
/-- In particular, the normalized squared restriction norms coincide. -/
theorem expect_presentation_sq [Finite E] [Finite F] [Fintype (D →ₗ[F2] C)]
(L : E →ₗ[F2] D) (hL : Function.Surjective L)
(J : C →ₗ[F2] F) (hJ : Function.Injective J)
(T : E →ₗ[F2] F) (f : (E →ₗ[F2] F) → ℝ) :
(𝔼 X : D →ₗ[F2] C, f (T + J.comp (X.comp L)) ^ 2) =
𝔼 A : Parameter L.ker J.range, (restrict f L.ker J.range T A) ^ 2 :=
expect_presentation L hL J hJ T (fun X => f X ^ 2)
/-- The intrinsic restriction order is exactly the dimensions lost by the
surjective input and injective output presentations. -/
theorem order_add_dimensions [FiniteDimensional F2 E] [FiniteDimensional F2 F]
(L : E →ₗ[F2] D) (hL : Function.Surjective L)
(J : C →ₗ[F2] F) (hJ : Function.Injective J) :
order L.ker J.range + Module.finrank F2 D + Module.finrank F2 C =
Module.finrank F2 E + Module.finrank F2 F := by
have hD := L.ker.finrank_quotient_add_finrank
have hD' := (L.quotKerEquivOfSurjective hL).finrank_eq
have hF := J.range.finrank_quotient_add_finrank
have hC := (LinearEquiv.ofInjective J hJ).finrank_eq
unfold order
omega
/-- The sum-of-dimensions budget used in the fourth-moment statement implies
the actual quotient/subspace restriction budget, without truncated subtraction. -/
theorem order_le_of_dimensions [FiniteDimensional F2 E] [FiniteDimensional F2 F]
(L : E →ₗ[F2] D) (hL : Function.Surjective L)
(J : C →ₗ[F2] F) (hJ : Function.Injective J) (r : ℕ)
(h : Module.finrank F2 E + Module.finrank F2 F ≤
Module.finrank F2 D + Module.finrank F2 C + r) :
order L.ker J.range ≤ r := by
have hdim := order_add_dimensions L hL J hJ
omega
end
end MaxCutGames.Inverse.KMSAffineRestrictionPresentation
/-! The actual Grassmann local-density hypothesis discharges the affine
squared-density predicate used by the new KMS point/character inductions. -/
namespace MaxCutGames.Inverse.KMSAffineRestriction
noncomputable section
open scoped BigOperators
open KMS KMSBasisComparison KMSBasisComparisonPseudorandom
open MaxCutGames.Fourier.MatrixRestrictions
/-- This supplies the local-density input of the genuine analytic induction
from the actual lifted Grassmann indicator, with the exact order-two loss. -/
theorem lifted_affineDensityBound {n ell d : ℕ} {ε : ℝ}
(S : Finset (Vertex n ell)) (hS : GrassmannPseudorandom S (2 * d) ε)
(hε : 0 ≤ ε) : KMSFourthMoment.AffineDensityBound d ε (liftedIndicator S) := by
intro D _ _ _ C _ _ _ _ L hL J hJ T hdim
calc
(𝔼 X : D →ₗ[F2] C, liftedIndicator S (T + J.comp (X.comp L)) ^ 2) =
𝔼 A : Parameter L.ker J.range,
(restrict (liftedIndicator S) L.ker J.range T A) ^ 2 :=
KMSAffineRestrictionPresentation.expect_presentation_sq L hL J hJ T _
_ ≤ ε := affine_squared_expect_bound S hS hε L.ker J.range T
(KMSAffineRestrictionPresentation.order_le_of_dimensions L hL J hJ d hdim)
end
end MaxCutGames.Inverse.KMSAffineRestriction
/-!
# Tuple pseudorandomness controls the actual affine squared density
This is the input conversion needed by the ordered-basis expansion theorem.
It starts directly from its tuple pseudorandomness assumption. All affine
intercepts and the full uniform parameter law are preserved by the checked
adapted-complement, split, and presentation equivalences.
-/
namespace MaxCutGames.Inverse.KMSBasisComparisonAffineDensity
noncomputable section
open scoped BigOperators Classical
open KMS KMSBasisComparison KMSBasisComparisonPseudorandom
open KMSAffineRestriction KMSAffineRestrictionSplit
open MaxCutGames.Fourier.MatrixRestrictions
variable {n ell q t r : ℕ} {ε : ℝ}
/-- The tuple hypothesis bounds the lift in every domain basis: the lift
depends only on the range, which is the span of the same prescribed tuple. -/
theorem lifted_expect_in_basis_of_tuple (S : Finset (Vertex n ell))
(hS : TuplePseudorandom S r ε)
(b : Module.Basis (Fin q ⊕ Fin t) F2 (Ambient ell))
(Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n))
(hbudget : q + (n - Module.finrank F2 W) ≤ r) :
(𝔼 z : Fin t → W, liftedIndicator S (b.constr F2 (joinedTuple Q W z))) ≤ ε := by
have hdim : ell = q + t := by
simpa [KMS.Ambient] using Module.finrank_eq_card_basis b
subst ell
have hc : restrictedLiftDensity S Q W ≤ ε := hS q t rfl Q W hbudget
rw [restrictedLiftDensity_eq_expect] at hc
convert hc using 1
apply Finset.expect_congr rfl
intro z _
unfold liftedIndicator InLift
rw [b.constr_range F2, tupleMap_range]
/-- Translation of the free coordinates retains the full uniform tuple law. -/
theorem lifted_expect_shifted_basis_of_tuple {E0 : Type*}
[AddCommGroup E0] [Module F2 E0]
(S : Finset (Vertex n ell)) (hS : TuplePseudorandom S r ε)
(b : Module.Basis (Fin q ⊕ Fin t) F2 (Ambient ell))
(Q : Fin q → Ambient n) (W : Submodule F2 (Ambient n))
[Fintype (E0 →ₗ[F2] W)]
(b0 : Module.Basis (Fin t) F2 E0) (T0 : E0 →ₗ[F2] W)
(hbudget : q + (n - Module.finrank F2 W) ≤ r) :
(𝔼 H : E0 →ₗ[F2] W, liftedIndicator S
(b.constr F2 (joinedTuple Q W (fun i => T0 (b0 i) + H (b0 i))))) ≤ ε := by
have heq : (𝔼 H : E0 →ₗ[F2] W, liftedIndicator S
(b.constr F2 (joinedTuple Q W (fun i => T0 (b0 i) + H (b0 i))))) =
𝔼 z : Fin t → W, liftedIndicator S (b.constr F2 (joinedTuple Q W z)) := by
apply Fintype.expect_equiv (affineCoordinates b0 T0)
intro H
rfl
rw [heq]
exact lifted_expect_in_basis_of_tuple S hS b Q W hbudget
/-- The adapted prefix contains all directions whose affine center lies
outside W. After splitting, each fixed constrained parameter gives an allowed
arbitrary prefix, and all free coordinates remain uniform in W. -/
theorem affine_expect_of_complement_of_tuple
(S : Finset (Vertex n ell)) (hS : TuplePseudorandom S r ε)
(D U E0 : Submodule F2 (Ambient ell)) (W : Submodule F2 (Ambient n))
(hDU : D ≤ U) (hc : IsCompl U E0) (T : BasisMap n ell)
(hE0 : E0 ≤ LinearMap.ker (W.mkQ.comp T))
(hbudget : Module.finrank F2 U + (n - Module.finrank F2 W) ≤ r) :
(𝔼 A : Parameter D W, restrict (liftedIndicator S) D W T A) ≤ ε := by
rw [expect_restrict D U E0 W hDU hc T]
apply Finset.expect_le Finset.univ_nonempty
intro B _
let bU := Module.finBasis F2 U
let b0 := Module.finBasis F2 E0
have heq :
(𝔼 C : E0 →ₗ[F2] W,
liftedIndicator S (translate D W T (join D U E0 W hDU hc B C))) =
𝔼 C : E0 →ₗ[F2] W,
liftedIndicator S ((complementBasis U E0 hc bU b0).constr F2
(joinedTuple
(fun i => T (bU i) + (B ((localVanishing D U).mkQ (bU i)) : Ambient n)) W
(fun i => freeCenter E0 W T hE0 (b0 i) + C (b0 i)))) := by
apply Finset.expect_congr rfl
intro C _
rw [translate_join_eq_constr D U E0 W hDU hc T hE0 bU b0 B C]
rw [heq]
exact lifted_expect_shifted_basis_of_tuple S hS (complementBasis U E0 hc bU b0)
_ W b0 (freeCenter E0 W T hE0) hbudget
/-- Order d affine restrictions require at most 2d tuple restriction budget. -/
theorem affine_expect_bound_of_tuple {d : ℕ}
(S : Finset (Vertex n ell)) (hS : TuplePseudorandom S (2 * d) ε)
(D : Submodule F2 (Ambient ell)) (W : Submodule F2 (Ambient n))
(T : BasisMap n ell) (horder : order D W ≤ d) :
(𝔼 A : Parameter D W, restrict (liftedIndicator S) D W T A) ≤ ε := by
obtain ⟨U, E0, hDU, hE0, hc, hdim⟩ :=
KMSAffineRestrictionComplement.exists_bounded_complement D W T
have hcodim : n - Module.finrank F2 W = Module.finrank F2 (KMS.Ambient n ⧸ W) := by
have hd := W.finrank_quotient_add_finrank
have hn : Module.finrank F2 (KMS.Ambient n) = n := by simp [KMS.Ambient]
rw [hn] at hd
omega
apply affine_expect_of_complement_of_tuple S hS D U E0 W hDU hc T hE0
rw [hcodim]
change Module.finrank F2 D + Module.finrank F2 (KMS.Ambient n ⧸ W) ≤ d at horder
omega
/-- Booleanity turns the exact restriction probability into its squared norm. -/
theorem affine_squared_expect_bound_of_tuple {d : ℕ}
(S : Finset (Vertex n ell)) (hS : TuplePseudorandom S (2 * d) ε)
(D : Submodule F2 (Ambient ell)) (W : Submodule F2 (Ambient n))
(T : BasisMap n ell) (horder : order D W ≤ d) :
(𝔼 A : Parameter D W, (restrict (liftedIndicator S) D W T A) ^ 2) ≤ ε := by
have heq : (𝔼 A : Parameter D W, (restrict (liftedIndicator S) D W T A) ^ 2) =
𝔼 A : Parameter D W, restrict (liftedIndicator S) D W T A := by
apply Finset.expect_congr rfl
intro A _
unfold restrict liftedIndicator
split <;> norm_num
rw [heq]
exact affine_expect_bound_of_tuple S hS D W T horder
/-- Directly discharge the fourth-moment affine density input from the
literal tuple pseudorandomness input of the ordered-basis expansion theorem. -/
theorem lifted_affineDensityBound_of_tuple {d : ℕ}
(S : Finset (Vertex n ell)) (hS : TuplePseudorandom S (2 * d) ε) :
KMSFourthMoment.AffineDensityBound d ε (liftedIndicator S) := by
intro D _ _ _ C _ _ _ _ L hL J hJ T hdim
calc
(𝔼 X : D →ₗ[F2] C, liftedIndicator S (T + J.comp (X.comp L)) ^ 2) =
𝔼 A : Parameter L.ker J.range,
(restrict (liftedIndicator S) L.ker J.range T A) ^ 2 :=
KMSAffineRestrictionPresentation.expect_presentation_sq L hL J hJ T _
_ ≤ ε := affine_squared_expect_bound_of_tuple S hS L.ker J.range T
(KMSAffineRestrictionPresentation.order_le_of_dimensions L hL J hJ d hdim)
end
end MaxCutGames.Inverse.KMSBasisComparisonAffineDensity
end OAI

Xet Storage Details

Size:
36.4 kB
·
Xet hash:
e736a8d8529131cd7b559e5721e82f5d177b0e80d96eb5318543a753112e960f

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