Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exactness of a direct sum of CL presentations is blockwise

Proved
MIPRE.CL.CLFun.exactlyOn_famSum

by thomasvidick · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-algebramip-remipre-formalizationparallel-repetitionverifiers

Let FFF be a semiring, ι\iotaι a finite index set with decidable equality (the coordinates of V=FιV = F^\iotaV=Fι), k∈Nk \in \mathbb{N}k∈N, and κ\kappaκ a finite index set with decidable equality and a bijection e:{0,…,k−1}×ι→κe : \{0,\dots,k-1\} \times \iota \to \kappae:{0,…,k−1}×ι→κ, so that Fκ≅(Fι)kF^\kappa \cong (F^\iota)^kFκ≅(Fι)k: x(i)=(xe(i,j))j∈ιx^{(i)} = (x_{e(i,j)})_{j \in \iota}x(i)=(xe(i,j)​)j∈ι​ is the iii-th block of x∈Fκx \in F^\kappax∈Fκ, and joine(v)∈Fκ\mathrm{join}_e(v) \in F^\kappajoine​(v)∈Fκ is the vector with blocks v0,…,vk−1∈Fιv_0, \dots, v_{k-1} \in F^\iotav0​,…,vk−1​∈Fι. An ℓ\ellℓ-level conditionally linear (CL) presentation on FιF^\iotaFι is the zero presentation at level 000 or, at level ℓ+1\ell + 1ℓ+1, a register subspace S⊆ιS \subseteq \iotaS⊆ι, a linear map L1L_1L1​ on VSV_SVS​ and a continuation choosing an ℓ\ellℓ-level presentation by the value of L1L_1L1​. The direct sum ⨁eP\bigoplus_e P⨁e​P of ℓ\ellℓ-level presentations P0,…,Pk−1P_0, \dots, P_{k-1}P0​,…,Pk−1​ on FιF^\iotaFι is the ℓ\ellℓ-level presentation on FκF^\kappaFκ whose stages act blockwise (famSum). For T0,…,Tk−1⊆ιT_0, \dots, T_{k-1} \subseteq \iotaT0​,…,Tk−1​⊆ι, blockSete(T)={e(i,j):i<k, j∈Ti}⊆κ\mathrm{blockSet}_e(T) = \{e(i,j) : i < k,\ j \in T_i\} \subseteq \kappablockSete​(T)={e(i,j):i<k, j∈Ti​}⊆κ. A presentation is exact on TTT (ExactlyOn) when, at level 000, T=∅T = \emptysetT=∅, and at level ℓ+1\ell + 1ℓ+1, S⊆TS \subseteq TS⊆T and every continuation is exact on T∖ST \setminus ST∖S: the register subspaces along every run partition TTT (item (2) of lem:cl-kth).

For every level ℓ\ellℓ, every family PPP of ℓ\ellℓ-level presentations on FιF^\iotaFι and every family TTT of register subspaces of ι\iotaι,

(∀ i<k, Pi is exact on Ti)  ⟹  ⨁eP is exact on blockSete(T).\bigl(\forall\, i < k,\ P_i \text{ is exact on } T_i\bigr) \;\Longrightarrow\; \textstyle\bigoplus_e P \text{ is exact on } \mathrm{blockSet}_e(T).(∀i<k, Pi​ is exact on Ti​)⟹⨁e​P is exact on blockSete​(T).

Samplers are required to be exact, so this is what makes the repeated sampler of the parallel repetition theorem, the direct sum of kkk copies of the input sampler's CL function, a sampler.

Formalization Note CLFun.ExactlyOn is defined by recursion on the presentation: zero is exact on T iff T = ∅; cons S L₁ next is exact on T iff S ⊆ T ∧ ∀ v, (next v).ExactlyOn (T \ S). CLFun.famSum e ℓ P is zero at level 0 and, at level ℓ + 1, cons (blockSet e fun i => (P i).hdS) (RegLinear.blockSum e fun i => (P i).hdL) fun v => famSum e ℓ fun i => (P i).tl (block e i v). Quantified in Lean over ℓ : ℕ, P : Fin k → CLFun F ι ℓ and T : Fin k → Finset ι, with e : Fin k × ι ≃ κ explicit; F is any Semiring; ι, κ carry [DecidableEq] [Fintype] and k : ℕ is implicit (the module's variable line). Blueprint lem:cl-famsum.

Preamble
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 × ι ≃ κ)
Formal statement
theorem MIPRE.CL.CLFun.exactlyOn_famSum : ∀ (ℓ : ℕ) (P : Fin k → CLFun F ι ℓ) (T : Fin k → Finset ι),
    (∀ i, (P i).ExactlyOn (T i)) → (famSum e ℓ P).ExactlyOn (blockSet e T) := by sorry
Source
https://github.com/vidick/MIPRE-formalization/blob/70cbf1c52e3d5e1dff1162fdf952c9a9f4bd99ed/MIPRE/Foundations/CL/Repeat.lean#L227-L243; blueprint lem:cl-famsum; paper linear.tex lem:cl-kth, item (2)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me