Uniform layered arithmetic circuits and polynomial-time wiring extensions #
A verifier-side, efficient-wiring-MLE (HasPolyTimeWiringMLE) step toward
Goldwasser, Kalai, Rothblum Theorem 1.1 (§3; see also
Thaler, §4.6): the GKR protocol delegates the evaluation of a layered arithmetic
circuit C of depth d and gate counts 2 ^ width i with verifier work proportional to the
input/output sizes plus d rounds of sumcheck and wiring-extension evaluation. Here
UniformGKRFamily pairs LayeredCircuit.IsLogSpaceUniform with an explicit caller-supplied
HasPolyTimeWiringMLE oracle evaluating ãdd_i and m̃ult_i in polynomial time; compiling
arbitrary IsLogSpaceUniform wiring without a supplied HasPolyTimeWiringMLE oracle and poly(S)
prover multi-tape word-TM runtime remain open on #892.
This module formalizes:
- Log-space uniformity (
LayeredCircuit.IsLogSpaceUniform) for indexed familiesC : I → LayeredCircuitunder an index encodingencI : I ↪ List Bool: the depth, layer widths (in unary) and Boolean wiring predicatesisWiringare computable in deterministic logarithmic space (ComputableInLogSpace), with a direct constructorIsLogSpaceUniform.of_neighboursfrom log-space gate-kind and in-neighbour transducers. - Polynomial-time wiring multilinear extension oracles (
LayeredCircuit.HasPolyTimeWiringMLE) over prime/modular ringsZMod pwithpand field coordinates encoded in binary (encNat), so exponentially large moduli costO(log p)bits, bundled with log-space uniformity inUniformGKRFamily. - Subcube- and coordinate-literal-wired layered circuits (
WireLit,WiringClause,LayeredCircuit.ofClauses), covering data-parallel routing, fan-out, repeated squaring, binary reduction trees and mixed addition/multiplication layers. When the clauses of layeripartition{0, 1}^{width (i + 1)}(ClausesPartition), the multilinear extension ofwiringPredfactors into a sum of coordinate products (eval_multilinearExtension_wiringPred_ofClauses) computable in polynomial time (hasPolyTimeWiringMLE_ofClauses). - Concrete exponential-width circuit family (
powerSumGKRFamily): a parameterized family with2 ^ inWidthinputs, an internal fan-out andsqDepthrepeated-squaring layers of widthmidWidth(2 ^ midWidthgates per layer, exponentially larger than the unary parameter lengthinWidth + midWidth + sqDepth), andmidWidthbinary-tree addition layers reducing to one output gate, proved bothIsLogSpaceUniformandHasPolyTimeWiringMLE.
Note: primary-source page/theorem locators in [GoldwasserKalaiRothblum2015] (§3 / Theorem 1.1) and
[Thaler2022] (§4.6) are from recorded repository documentation (locator not re-verified against
primary PDF).
Main definitions #
Cslib.Interactive.GKR.encGate: bit-word encoding ofGate.Cslib.Interactive.GKR.WiringQuery,Cslib.Interactive.GKR.GateQuery,Cslib.Interactive.GKR.LayeredCircuit.IsLogSpaceUniform: log-space uniformity of a layered circuit family.Cslib.Interactive.GKR.WiringMLEQuery,Cslib.Interactive.GKR.LayeredCircuit.HasPolyTimeWiringMLE,Cslib.Interactive.GKR.UniformGKRFamily: polynomial-time wiring MLE evaluation overZMod p(binary modulus and coordinates) bundled with log-space uniformity.Cslib.Interactive.GKR.WireLit,Cslib.Interactive.GKR.WiringClause,Cslib.Interactive.GKR.LayeredCircuit.ofClauses: subcube- and literal-wired layered circuits.Cslib.Interactive.GKR.PowerSumParams,Cslib.Interactive.GKR.powerSumCircuit,Cslib.Interactive.GKR.powerSumGKRFamily: concrete exponential-width uniform GKR family.
Main results #
Cslib.Interactive.GKR.LayeredCircuit.IsLogSpaceUniform.of_neighbours: log-space gate and in-neighbour maps imply log-space uniformity of the wiring predicates.Cslib.Interactive.GKR.eval_multilinearExtension_wiringPred_ofClauses: closed-form coordinate product factorization ofãdd_iandm̃ult_ifor partitionedWiringClauselayers.Cslib.Interactive.GKR.computableInPolyTime_evalClausesMod,Cslib.Interactive.GKR.hasPolyTimeWiringMLE_ofClauses: polynomial-time evaluation of wiring multilinear extensions for clause-wired families.Cslib.Interactive.GKR.isLogSpaceUniform_powerSumCircuit,Cslib.Interactive.GKR.hasPolyTimeWiringMLE_powerSumCircuit: unconditionalUniformGKRFamilyinstance forpowerSumCircuit.
References #
- S. Goldwasser, Y. T. Kalai, G. N. Rothblum, Delegating computation: interactive proofs for muggles, Theorem 1.1 and Section 3 (locator not re-verified against primary PDF)
- J. Thaler, Proofs, Arguments, and Zero-Knowledge, Section 4.6 (locator not re-verified against primary PDF)
Gate encoding and Boolean wiring predicate #
The complete payload determines exactly this constructor value.
Extract the constructor payload or field; return none otherwise.
A payload exists precisely when this constructor matches.
The matcher recognizes precisely the range of this constructor.
A payload exists precisely when this constructor matches.
Case analysis by constructor, on the constructor payloads.
Test whether the value has this constructor.
The matcher recognizes precisely the range of this constructor.
The complete payload determines exactly this constructor value.
Test whether the value has this constructor.
Extract the constructor payload or field; return none otherwise.
Modular subtraction (a - b) mod p on natural representatives, returning 0 when p = 0.
Log-space uniformity and polynomial-time wiring MLE interfaces #
Input to a direct gate/in-neighbour lookup: circuit family index, unary layer index i, and
raw bit label outGate of a gate in layer i + 1.
Input to a Boolean wiring-predicate query (ι, g, i, a, b, c).
Tuple encoding of WiringQuery I, with layer in unary and gate labels as raw bit words.
Log-space uniformity of an indexed family of layered arithmetic circuits
(Goldwasser, Kalai, Rothblum, Thaler, §4.6):
depth, width (in unary) and the Boolean wiring predicates add_i, mult_i are computable in
deterministic logarithmic space on encI.
- depth : Turing.MultiTapeTM.ComputableInLogSpace (fun (ι : I) => (C ι).depth) encI Turing.MultiTapeTM.encUnary
Circuit depth is computable in logarithmic space in unary.
- width : Turing.MultiTapeTM.ComputableInLogSpace (fun (p : I × ℕ) => (C p.1).width p.2) (Turing.MultiTapeTM.encPair encI Turing.MultiTapeTM.encUnary) Turing.MultiTapeTM.encUnary
Layer bit-widths
width iare computable in logarithmic space in unary. - wiring : ∃ (decideWiring : WiringQuery I → Bool), Turing.MultiTapeTM.ComputableInLogSpace decideWiring (encWiringQuery I encI) Turing.MultiTapeTM.encBool ∧ ∀ (ι : I) (g : Gate), ∀ i < (C ι).depth, ∀ (a : Fin ((C ι).width (i + 1)) → Bool) (b c : Fin ((C ι).width i) → Bool), decideWiring { index := ι, gate := g, layer := i, outGate := List.ofFn a, leftGate := List.ofFn b, rightGate := List.ofFn c } = (C ι).isWiring g i a b c
Construct IsLogSpaceUniform from log-space transducers computing the gate kind and the left
and right in-neighbour labels of any gate a in layer i + 1.
Evaluation query for the multilinear extension of add_i or mult_i over ZMod modulus,
with modulus and coordinate lists encoded in binary.
- index : I
Circuit family index.
- gate : Gate
Gate kind (
Gate.addforãdd_i,Gate.mulform̃ult_i). - layer : ℕ
Layer index
i < depth, encoded in unary. - modulus : ℕ
Ring modulus
p, encoded in binary (encNat). Point
zin layeri + 1, as binary natural representatives.Left point
yin layeri, as binary natural representatives.Right point
win layeri, as binary natural representatives.
Tuple encoding of WiringMLEQuery I, keeping modulus and all coordinates in binary.
Polynomial-time wiring multilinear extension oracle for an indexed circuit family C:
evalWiring runs in polynomial time in |encI ι| + i + log p + (width (i+1) + 2 · width i) log p,
returns a canonical representative < p, and agrees with the multilinear extension of
(C ι).wiringPred g i over ZMod p for every layer i < (C ι).depth.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime evalWiring (encWiringMLEQuery I encI) Turing.MultiTapeTM.encNat
Polynomial-time native Turing-machine certificate.
- eval_eq (ι : I) (p : ℕ) [NeZero p] (g : Gate) (i : ℕ) : i < (C ι).depth → ∀ (zs ys ws : List ℕ), ↑(evalWiring { index := ι, gate := g, layer := i, modulus := p, z := zs, y := ys, w := ws }) = (MvPolynomial.eval (Sum.elim (vecOfList p ((C ι).width (i + 1)) zs) (Sum.elim (vecOfList p ((C ι).width i) ys) (vecOfList p ((C ι).width i) ws)))) (BitString.multilinearExtension ((C ι).wiringPred g i))
Exact agreement with
multilinearExtension ((C ι).wiringPred g i)inZMod p.
A step toward unconditional IsLogSpaceUniform GKR Theorem 1.1
(Goldwasser, Kalai, Rothblum §3; Thaler, §4.6): a
log-space uniform family of layered arithmetic circuits paired with an explicit caller-supplied
HasPolyTimeWiringMLE polynomial-time evaluator for its wiring multilinear extensions (compiling
arbitrary IsLogSpaceUniform wiring without HasPolyTimeWiringMLE and poly(S) prover runtime
remain open on #892).
- circuit : I → LayeredCircuit
The layered circuit at each index.
- evalWiring : WiringMLEQuery I → ℕ
Canonical modular evaluator for
ãdd_iandm̃ult_i. - uniform : LayeredCircuit.IsLogSpaceUniform encI self.circuit
Polynomial-time certificate and correctness of
evalWiring.
Coordinate-literal and subcube-wired layered circuits #
A coordinate literal reading at most one bit of a gate label a in the layer above:
either a constant Boolean or a[idx] ^^ neg (with binary index idx).
The complete payload determines exactly this constructor value.
Test whether the value has this constructor.
A payload exists precisely when this constructor matches.
The matcher recognizes precisely the range of this constructor.
Extract the constructor payload or field; return none otherwise.
Extract the constructor payload or field; return none otherwise.
The matcher recognizes precisely the range of this constructor.
Extract the constructor payload or field; return none otherwise.
Extract the constructor payload or field; return none otherwise.
Test whether the value has this constructor.
A payload exists precisely when this constructor matches.
The complete payload determines exactly this constructor value.
Multilinear indicator factor b ? r : 1 - r in a commutative ring R.
Tuple encoding of WiringClause.
Whether gate label a : Fin kOut → Bool lies in the subcube specified by cl.mask.
Left in-neighbour assigned by cl to a.
Right in-neighbour assigned by cl to a.
Coordinate-j factor when a j = b in the factored MLE of cl.
Closed-form polynomial evaluation of cl's contribution to the wiring multilinear extension
at (z, y, w).
A list of clauses partitions {0, 1}^kOut when every gate label matches exactly one clause.
Build a LayeredCircuit whose layer-i gate kinds and in-neighbours are given by the first
matching clause in clauses i (defaulting to an addition of gate 0 if none matches).
Product factorization of wiring multilinear extensions for LayeredCircuit.ofClauses:
when clauses i partitions {0, 1}^{width (i + 1)}, the multilinear extension of wiringPred g i
equals the sum over clauses cl ∈ clauses i with cl.gate = g of cl.evalFactor z y w.
Executable modular wiring-clause evaluator and polynomial-time certificate #
Natural representative of WireLit.litFactor b r modulo p (unreduced when b = true).
Evaluate the sum of matching clauses in clauses modulo p (returning 0 if p = 0).
Polynomial-time evaluation of clause-wired wiring extensions over binary moduli p.
Any indexed family built by LayeredCircuit.ofClauses with polynomial-time width and
clauses whose clauses partition each active layer admits a certified polynomial-time wiring MLE
evaluator (HasPolyTimeWiringMLE).
Concrete exponential-width uniform GKR family: fan-out + squaring + tree sum #
Parameters of powerSumCircuit: 2 ^ inWidth inputs, 2 ^ midWidth internal gates per layer
across one fan-out layer and sqDepth repeated-squaring layers, followed by midWidth binary-tree
addition layers reducing to 2 ^ 0 = 1 output gate.
Unary parameter encoding of PowerSumParams, of total length O(inWidth + midWidth + sqDepth) = O(log n + log S + d).
Total depth of powerSumCircuit P: 1 fan-out addition layer (x[prefix] + x[prefix]),
sqDepth squaring layers, and midWidth binary-tree addition layers.
Bit-width of layer i in powerSumCircuit P.
Single-clause specification of layer i in powerSumCircuit P:
- layer
0: fan-out addition (left a j = a[j],right a j = a[j]on the firstinWidthbits, padded withfalsewheninWidth > midWidth); - layers
1 .. sqDepth: elementwise squaring (mul,left a = a,right a = a); - layers
1 + sqDepth .. depth - 1: binary-tree sum (add,left a = snoc a false,right a = snoc a true).
Concrete layered circuit for P : PowerSumParams, with 2 ^ P.midWidth gates per internal
layer.
Modular wiring-MLE evaluator for powerSumCircuit.
powerSumCircuit admits polynomial-time wiring MLE evaluation.
Concrete UniformGKRFamily for powerSumCircuit: internal layers have 2 ^ midWidth gates
while parameter descriptions and wiring-MLE queries have size O(inWidth + midWidth + sqDepth).