The marginals of a direct sum of CL presentations are blockwise
ProvedMIPRE.CL.CLFun.eval_truncate_famSumLet be a semiring, a finite index set with decidable equality (the coordinates of ), , and a finite index set with decidable equality and a bijection , so that : is the -th block of , and is the vector with blocks . An -level conditionally linear (CL) presentation on is the zero presentation at level or, at level , a register subspace , a linear map on and a continuation choosing an -level presentation by the value of . The direct sum of -level presentations on is the -level presentation on whose stages act blockwise (famSum). A presentation presents the function (eval), and its -th marginal (truncate j) keeps its first levels, padded with trivial levels when exceeds .
For all , every family of -level presentations on and every ,
the -th block of the -th marginal of the direct sum at is the -th marginal of at the -th block of . Marginals are part of a sampler's query interface; this is one of the identities that let the repeated sampler of the parallel repetition theorem answer its queries blockwise.
Formalization Note The statement is ((famSum e ℓ P).truncate j).eval x = join e fun i => ((P i).truncate j).eval (block e i x), quantified in Lean over j ℓ : ℕ, P : Fin k → CLFun F ι ℓ and x : κ → F, with e : Fin k × ι ≃ κ explicit; an equality in κ → F with no hypothesis on the family. block e i x and join e v are the block and assembly maps above. CLFun.truncate j is zero at j = 0, pads zero with lift ∅ at j + 1, and sends cons S L₁ next to cons S L₁ fun v => (next v).truncate j at j + 1; eval (cons S L₁ next) x = L₁ x + (next (L₁ x)).eval (proj Sᶜ x), proj Sᶜ zeroing the coordinates in S. F is any Semiring; ι, κ carry [DecidableEq] [Fintype] and k : ℕ is implicit (the module's variable line). Blueprint lem:cl-famsum.
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Real.Basic
import Mathlib.LinearAlgebra.Pi
import Definitions.Def_MIPRE_Foundations_CL_Register
import Definitions.Def_MIPRE_Foundations_CL_Basic
import Definitions.Def_MIPRE_Foundations_CL_Closure
import Definitions.Def_MIPRE_Foundations_CL_Repeat
open MIPRE
open MIPRE.CL
open MIPRE.CL.CLFun
set_option linter.unusedSectionVars false
universe u v w
variable {F : Type u} [Semiring F] {ι : Type v} [DecidableEq ι] [Fintype ι] {κ : Type w}
[DecidableEq κ] [Fintype κ] {k : ℕ}
variable {ℓ : ℕ}
variable (e : Fin k × ι ≃ κ)theorem MIPRE.CL.CLFun.eval_truncate_famSum : ∀ (j ℓ : ℕ) (P : Fin k → CLFun F ι ℓ) (x : κ → F),
((famSum e ℓ P).truncate j).eval x = join e fun i => ((P i).truncate j).eval (block e i x) := by sorry