A finite collision bound for the raw projections of interpolation neighborhoods
ProvedThreeSumFuture.linear_projection_collision_budget3sumcombinatoricslinear-algebra
Over a finite field K, let every predecessor have at most D neighbors in a family of words over an embedded finite alphabet A. If a linear projection puts more than |A|^(k-1) neighbors of one predecessor at a single label, call the projection bad. The fraction of bad projections is at most |P| |K| D^k / |K|^k, where P is the set of predecessors. For ternary words and k=4 this controls projection fibers above 27 words.
Preamble
import Theorems.Thm_ThreeSumFuture_alphabet_words_in_subspace
import Mathlib.GroupTheory.Index
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Fintype.Pi
open scoped BigOperators
private theorem fiber_count {K I J : Type} [Field K] [Fintype K] [Fintype I] [Fintype J]
[DecidableEq K] {v : J → I → K} (hv : LinearIndependent K v) (z : J → K)
(set : Finset (I → K)) (hset : ∀ w, w ∈ set ↔ ∀ j, ∑ i, v j i * w i = z j) :
Fintype.card K ^ Fintype.card J * set.card = Fintype.card K ^ Fintype.card I := by
classical
let f : (I → K) →ₗ[K] (J → K) := LinearMap.pi (fun j => ∑ i, v j i • LinearMap.proj i)
let g := Fintype.linearCombination K v
have hg : Function.Surjective g.dualMap :=
LinearMap.dualMap_surjective_of_injective hv.fintypeLinearCombination_injective
have hf : Function.Surjective f := by
intro target
let ψ : Module.Dual K (J → K) := ∑ j, target j • LinearMap.proj j
obtain ⟨φ, hφ⟩ := hg ψ
refine ⟨fun i => φ (Pi.single i 1), ?_⟩
funext j
have hj := congrArg (fun F : Module.Dual K (J → K) => F (Pi.single j 1)) hφ
have hterm : φ (v j) = target j := by
simpa [g, ψ, LinearMap.dualMap_apply, Fintype.linearCombination_apply, Pi.single_apply] using hj
change (∑ i, v j i • LinearMap.proj i) (fun i => φ (Pi.single i 1)) = target j
rw [← hterm]
have hvsum : ∑ i, v j i • (Pi.single i 1 : I → K) = v j := by
ext i
simp [Pi.single_apply, smul_eq_mul]
nth_rw 2 [← hvsum]
simp [smul_eq_mul]
have hsame (y : J → K) : (Finset.univ.filter fun w => f w = y).card =
(Finset.univ.filter fun w => f w = z).card :=
AddMonoidHom.card_fiber_eq_of_mem_range f (hf y) (hf z)
have hexact : Fintype.card (J → K) * (Finset.univ.filter fun w => f w = z).card =
Fintype.card (I → K) := by
calc
_ = ∑ y : J → K, (Finset.univ.filter fun w => f w = y).card := by simp [hsame]
_ = ∑ y : J → K, ∑ w : I → K, if f w = y then (1 : ℕ) else 0 := by
simp only [Finset.card_eq_sum_ones, Finset.sum_filter]
_ = ∑ w : I → K, ∑ y : J → K, if f w = y then (1 : ℕ) else 0 := Finset.sum_comm
_ = _ := by simp
have hEq : (Finset.univ.filter fun w => f w = z) = set := by
ext w
simp [hset, f, funext_iff, smul_eq_mul]
simpa [Fintype.card_fun, hEq] using hexactFormal statement
theorem ThreeSumFuture.linear_projection_collision_budget {K I A P : Type} [Field K] [Fintype K] [Fintype I] [Fintype A] [Fintype P]
[Nonempty A] [DecidableEq K] [DecidableEq P] (encode : A → K)
(hencode : Function.Injective encode) (neighbors : P → Finset (I → A))
(k D : ℕ) (hk : 0 < k) (hD : ∀ r, (neighbors r).card ≤ D)
(bad : Finset (I → K))
(hbad : ∀ w ∈ bad, ∃ r z, ∃ fiber : Finset (I → A), fiber ⊆ neighbors r ∧
Fintype.card A ^ (k - 1) < fiber.card ∧ ∀ q ∈ fiber, (∑ i, encode (q i) * w i) = z) :
Fintype.card K ^ k * bad.card ≤
Fintype.card P * Fintype.card K * D ^ k * Fintype.card K ^ Fintype.card I := by sorrySource
Original finite projection estimate for batches induced by raw residues in weighted-cache 3SUM. It uses the proved alphabet-in-subspace bound and the standard equal fiber size for independent linear measurements.