Conditionally linear functions #
Blueprint def:cl-function (paper linear.tex, Definition def:cl-func; ledger node
1.1.2). The question distribution of every game in the pipeline is conditionally linear:
linear maps applied in stages to complementary register subspaces of V = F^ι, the register
subspace and the linear map of each stage being allowed to depend on the outputs of the
previous stages.
Presentations and functions #
The paper defines the set of ℓ-level CL functions on V inductively: the 0-level one is
the zero function, and an ℓ-level one is any L of the form
L(x) = L₁(x^{V₁}) + L_{>1, L₁(x^{V₁})}(x^{V_{>1}}) for complementary register subspaces
V₁ ⊕ V_{>1} = V, a linear map L₁ on V₁, and (ℓ-1)-level CL functions L_{>1,v} on
V_{>1}, one for each value v of L₁. Everything downstream — the structure lemma
lem:cl-kth, the query interface of a sampler, the hiding tests of introspection — works with
the decomposition data, which the function does not determine. So the Lean object is the
data:
MIPRE.CL.CLFun F ι ℓis the type ofℓ-level presentations on the ambient spaceι → F. A presentation of levelℓ + 1iscons S L₁ next: the coordinatesS : Finset ιof the first register subspaceV₁ = V_S, the first linear mapL₁ : RegLinear F S, and the continuationnext : (ι → F) → CLFun F ι ℓ, indexed by the value ofL₁.CLFun.evalis the function presented:eval (cons S L₁ next) x = L₁ x + eval (next (L₁ x)) (x^{V_{Sᶜ}}).CLFun.SupportedOn P Tsays thatPis a presentation onV_Tin the paper's sense:S ⊆ T, and every continuation is onV_{T \ S}. The paper'sV_{>1}isV_{T \ S}; it is not stored, because the level-0presentationzerois "the zero function onV_{T'}" for everyT'(exactly as in the paper), and this keeps every construction free of dependent-type transport.MIPRE.CL.IsCLFun ℓ T fis the paper's notion itself: someℓ-level presentation onV_Tevaluates tof.
Two departures from the letter of the paper, both harmless: continuations are indexed by all
vectors rather than by the values of L₁ (the others are never evaluated), and there is one
ambient space F^ι throughout, register subspaces of it playing the role of the paper's
V_{>1}, U ⊕ V, and so on.
The structure lemma (lem:cl-kth) #
lem:cl-kth attaches to an ℓ-level CL function its marginals L_{≤k}, factor spaces
V_{k,u} and stage maps L_{k,u}, u being the prefix L_{<k}(x). Here:
CLFun.truncate k Ppresents thek-th marginal (P.truncate ℓ = P,truncate_self), padded with trivial levels whenkexceeds the level (CLFun.lift, the paper'srk:higher-level);CLFun.factorAt P k xandCLFun.mapAt P k xare the register subspace and the linear map applied at stagek + 1on the inputx. They depend onxonly through the prefixL_{≤k}(x):CLFun.factorOfPrefixandCLFun.mapOfPrefixcompute them from that prefix alone (SupportedOn.factorOfPrefix_eval,SupportedOn.mapOfPrefix_eval), which is what thefactorandlinearqueries of a sampler answer;SupportedOn.eval_truncate_eq_sumis the decompositionL_{≤k}(x) = ∑_{i ≤ k} x^{L_i}, andSupportedOn.disjoint_factorAt,SupportedOn.factorAt_subsetsay that the factor spaces along a run are disjoint register subspaces ofV_T.CLFun.ExactlyOn P Tis the strengthening under which they partitionT(ExactlyOn.biUnion_factorAt) — item (2) oflem:cl-kth, which samplers are required to satisfy.
Presentations of ℓ-level conditionally linear functions on the ambient space ι → F
(blueprint def:cl-function). cons S L₁ next presents x ↦ L₁ x + next (L₁ x) (x^{V_{Sᶜ}}).
- zero
{F : Type u}
[Semiring F]
{ι : Type v}
[DecidableEq ι]
: CLFun F ι 0
The
0-level presentation: the zero function. - cons
{F : Type u}
[Semiring F]
{ι : Type v}
[DecidableEq ι]
{ℓ : ℕ}
(S : Finset ι)
(L₁ : RegLinear F S)
(next : (ι → F) → CLFun F ι ℓ)
: CLFun F ι (ℓ + 1)
One more level in front: the register subspace
V_S, a linear mapL₁on it, and the continuation, chosen according to the value ofL₁.
Instances For
Support #
P.SupportedOn T: P is a presentation on V_T — its first register subspace lies inside
T, and every continuation is a presentation on the complementary V_{T \ S}.
Equations
- MIPRE.CL.CLFun.zero.SupportedOn x✝ = True
- (MIPRE.CL.CLFun.cons S L₁ next).SupportedOn x✝ = (S ⊆ x✝ ∧ ∀ (v : ι → F), (next v).SupportedOn (x✝ \ S))
Instances For
Levels: padding and marginals #
One more level at the bottom, acting on the register subspace V_T by the zero map: the
paper's rk:higher-level, every ℓ-level CL function being (ℓ + 1)-level. Padding with
T = ∅ preserves every support; padding with the coordinates not yet used preserves exactness
(ExactlyOn.lift).
Equations
- MIPRE.CL.CLFun.lift T MIPRE.CL.CLFun.zero = MIPRE.CL.CLFun.cons T 0 fun (x : ι → F) => MIPRE.CL.CLFun.zero
- MIPRE.CL.CLFun.lift T (MIPRE.CL.CLFun.cons S L₁ next) = MIPRE.CL.CLFun.cons S L₁ fun (v : ι → F) => MIPRE.CL.CLFun.lift (T \ S) (next v)
Instances For
n trivial levels at the bottom.
Equations
- MIPRE.CL.CLFun.liftN T 0 x✝ = x✝
- MIPRE.CL.CLFun.liftN T n.succ x✝ = MIPRE.CL.CLFun.lift T (MIPRE.CL.CLFun.liftN T n x✝)
Instances For
The first k levels of P: the k-th marginal L_{≤k} of lem:cl-kth. When k exceeds
the level of P, the missing levels are trivial.
Equations
- MIPRE.CL.CLFun.truncate 0 x✝ = MIPRE.CL.CLFun.zero
- MIPRE.CL.CLFun.truncate k.succ MIPRE.CL.CLFun.zero = MIPRE.CL.CLFun.lift ∅ (MIPRE.CL.CLFun.truncate k MIPRE.CL.CLFun.zero)
- MIPRE.CL.CLFun.truncate k.succ (MIPRE.CL.CLFun.cons S L₁ next) = MIPRE.CL.CLFun.cons S L₁ fun (v : ι → F) => MIPRE.CL.CLFun.truncate k (next v)
Instances For
Item (4) of lem:cl-kth: L = L_{≤ℓ}.
Item (1) of lem:cl-kth: the k-th marginal is a k-level CL function on the same space.
Exact support #
P.ExactlyOn T: P is a presentation on V_T whose last level leaves nothing over, so
that the factor spaces along every run partition T (ExactlyOn.biUnion_factorAt). This is
item (2) of lem:cl-kth, V = ⊕ᵢ V_{i, L_{<i}(x)}.
Equations
Instances For
Evaluation #
The function presented: L(x) = x^{L₁} + L_{>1, x^{L₁}}(x^{V_{>1}}).
Equations
- MIPRE.CL.CLFun.zero.eval x✝ = 0
- (MIPRE.CL.CLFun.cons S L₁ next).eval x✝ = L₁ x✝ + (next (L₁ x✝)).eval ((MIPRE.CL.proj Sᶜ) x✝)
Instances For
A presentation on V_T reads only the coordinates in T.
A presentation on V_T takes its values in V_T.
Evaluation of padded and truncated presentations #
The data of a stage #
The register subspace acted on at stage k + 1 on the input x: the factor space
V_{k+1,u} of lem:cl-kth, u = L_{≤k}(x) the prefix. Beyond the level of P it is empty.
Equations
- MIPRE.CL.CLFun.zero.factorAt x✝¹ x✝ = ∅
- (MIPRE.CL.CLFun.cons S L₁ next).factorAt 0 x✝ = S
- (MIPRE.CL.CLFun.cons S L₁ next).factorAt k.succ x✝ = (next (L₁ x✝)).factorAt k ((MIPRE.CL.proj Sᶜ) x✝)
Instances For
The linear map applied at stage k + 1 on the input x: the map L_{k+1,u} of
lem:cl-kth, u = L_{≤k}(x) the prefix, as an endomorphism of the ambient space. Beyond the
level of P it is zero.
Equations
- MIPRE.CL.CLFun.zero.mapAt x✝¹ x✝ = 0
- (MIPRE.CL.CLFun.cons S L₁ next).mapAt 0 x✝ = L₁.toLinearMap
- (MIPRE.CL.CLFun.cons S L₁ next).mapAt k.succ x✝ = (next (L₁ x✝)).mapAt k ((MIPRE.CL.proj Sᶜ) x✝)
Instances For
The factor spaces along a run lie in T.
The factor spaces along a run are pairwise disjoint.
The stage maps of a presentation on V_T read only the coordinates in T.
Item (3) of lem:cl-kth: L_{≤k}(x) = ∑_{i ≤ k} x^{L_i}, the marginal is the sum of the
stage maps applied to the input.
Stage data from the prefix #
The factor space at stage k + 1, read off the prefix u = L_{≤k}(x) rather than the
input x: the paper's V_{k+1,u}. The prefix determines the branch taken at each earlier
stage — its V_S-component is the value of that stage's map — and this is how a sampler's
factor query is answered.
Equations
- MIPRE.CL.CLFun.zero.factorOfPrefix x✝¹ x✝ = ∅
- (MIPRE.CL.CLFun.cons S L₁ next).factorOfPrefix 0 x✝ = S
- (MIPRE.CL.CLFun.cons S L₁ next).factorOfPrefix k.succ x✝ = (next ((MIPRE.CL.proj S) x✝)).factorOfPrefix k ((MIPRE.CL.proj Sᶜ) x✝)
Instances For
The linear map at stage k + 1, read off the prefix u = L_{≤k}(x): the paper's
L_{k+1,u}; how a sampler's linear query is answered.
Equations
- MIPRE.CL.CLFun.zero.mapOfPrefix x✝¹ x✝ = 0
- (MIPRE.CL.CLFun.cons S L₁ next).mapOfPrefix 0 x✝ = L₁.toLinearMap
- (MIPRE.CL.CLFun.cons S L₁ next).mapOfPrefix k.succ x✝ = (next ((MIPRE.CL.proj S) x✝)).mapOfPrefix k ((MIPRE.CL.proj Sᶜ) x✝)
Instances For
The two components of the prefix L_{≤(k+1)}(x) = L₁ x + r of a presentation
cons S L₁ next on V_T: L₁ x on V_S, and r, the prefix of the continuation, on
V_{T \ S}.
The factor space at a stage is determined by the prefix: factorOfPrefix computes
factorAt. This is what makes the paper's indexing V_{k,u} by u ∈ L_{<k}(V) well defined.
The linear map at a stage is determined by the prefix: mapOfPrefix computes mapAt.
Item (2) of lem:cl-kth: along every run, the factor spaces partition the coordinates.
The paper's notion #
Blueprint def:cl-function: f is an ℓ-level conditionally linear function on V_T if
some ℓ-level presentation on V_T evaluates to it.
Equations
- MIPRE.CL.IsCLFun ℓ T f = ∃ (P : MIPRE.CL.CLFun F ι ℓ), P.SupportedOn T ∧ P.eval = f