zorch.sumcheck.eq.eq_poly¶
EqPoly sumcheck (Algorithm 5): an eq-weighted sumcheck of d multilinears against an equality weight eq(w, ·), with eq factored into left/right suffixes so no round materializes eq over the full hypercube.
Each round sends sᵢ = lᵢ · tᵢ sampled at the round's EvalDomain: tᵢ = Σₓ eq-weight ·
combine(folded factors), lᵢ the linear eq factor of the current variable. Both the
summand combine (SumcheckSummand — product by default) and the sampling domain
(the compressed Û_d = {∞, 0, 2, …, d−1} by default) are settable; a leading ∞ point
needs a homogeneous combine (see domain.summand_evals). The state width halves each
round, so a fixed-shape lax.scan does not fit: prove_eq_poly drives one EqPolyRound
through the fold_rounds host loop. Correctness anchor: the default (product, Û)
messages equal a plain product sumcheck over [P₁, …, P_d, eq(w,·)]
(testing/eq_poly_test.py).
EqPolyRound ¶
Bases: ProverRound
One EqPoly variable-binding round, reused across all l rounds — it reads the round index off the state width, so one object drives the whole proof. Bound to a homogeneous SumcheckSummand (its combine weighted by eq); product by default.
Source code in zorch/sumcheck/eq/eq_poly.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
compute_eq_evaluations ¶
compute_eq_evaluations(w: Array) -> list[Array]
Suffix eq tables [eq(w[-1:], ·), …, eq(w, ·)], entry i over {0,1}ⁱ⁺¹.
Scans w backwards, prepending each coordinate as the MSB; large members are
emitted outer-split (see expand_eq_family).
Source code in zorch/sumcheck/eq/eq_poly.py
46 47 48 49 50 51 | |
compute_eq_prefixes ¶
compute_eq_prefixes(w: Array) -> list[Array]
Prefix eq tables [eq(w[:1], ·), …, eq(w, ·)], entry i over {0,1}ⁱ⁺¹.
Scans w forwards, appending each coordinate as the LSB, so w[0] stays the
MSB of every table. The dual of compute_eq_evaluations: a round that binds
the LOW variable consumes w from the back, so what it has left is a prefix.
Source code in zorch/sumcheck/eq/eq_poly.py
54 55 56 57 58 59 60 | |
sumcheck_poly_from_t ¶
sumcheck_poly_from_t(
t_evals: Array, l_evals: Array, domain: EvalDomain
) -> Array
sᵢ = lᵢ · tᵢ sampled at domain: at a leading ∞ point s(∞) = l_diff·t(∞); at a
finite node s(node) = (l(0) + node·l_diff)·t(node), l the linear eq factor of the
round variable. Same body for the compressed Û message and the full coeff domain —
they differ only in domain.
Source code in zorch/sumcheck/eq/eq_poly.py
100 101 102 103 104 105 106 107 108 109 110 111 | |
prove_eq_poly ¶
prove_eq_poly(
p_initial: Array,
w: Array,
claim: Array,
transcript: Transcript,
summand: SumcheckSummand | None = None,
domain: EvalDomain | None = None,
*,
challenges: ChallengePolicy,
msb: bool = True
) -> tuple[Array, Transcript, list[Array]]
Fold all l variables; return the final factors (d, 1), the advanced transcript, and the per-round messages (each sᵢ over Û_d).
Fiat-Shamir binds to the compressed Û_d message, which drops u=1 and so is not standalone-verifiable. The standalone coefficient form is EqPolyRound._round_coeffs, checked round-by-round against verifier.CoeffsSumcheckRound — a distinct transcript, not a re-encoding of the Û_d proof returned here.
Source code in zorch/sumcheck/eq/eq_poly.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |