You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

483 lines
21 KiB

  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsfonts}
  4. \usepackage{amsthm}
  5. \usepackage{amsmath}
  6. \usepackage{mathtools}
  7. \usepackage{enumerate}
  8. \usepackage{hyperref}
  9. \usepackage{xcolor}
  10. \usepackage{centernot}
  11. \usepackage{algorithm}
  12. \usepackage{algpseudocode}
  13. \usepackage{pgf-umlsd} % diagrams
  14. % message between threads. From https://tex.stackexchange.com/a/174765
  15. % Example:
  16. % \bloodymess[delay]{sender}{message content}{receiver}{DIR}{start note}{end note}
  17. \newcommand{\bloodymess}[7][0]{
  18. \stepcounter{seqlevel}
  19. \path
  20. (#2)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess from) {};
  21. \addtocounter{seqlevel}{#1}
  22. \path
  23. (#4)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess to) {};
  24. \draw[->,>=angle 60] (mess from) -- (mess to) node[midway, above]
  25. {#3};
  26. \if R#5
  27. \node (\detokenize{#3} from) at (mess from) {\llap{#6~}};
  28. \node (\detokenize{#3} to) at (mess to) {\rlap{~#7}};
  29. \else\if L#5
  30. \node (\detokenize{#3} from) at (mess from) {\rlap{~#6}};
  31. \node (\detokenize{#3} to) at (mess to) {\llap{#7~}};
  32. \else
  33. \node (\detokenize{#3} from) at (mess from) {#6};
  34. \node (\detokenize{#3} to) at (mess to) {#7};
  35. \fi
  36. \fi
  37. }
  38. % prevent warnings of underfull \hbox:
  39. \usepackage{etoolbox}
  40. \apptocmd{\sloppy}{\hbadness 4000\relax}{}{}
  41. \theoremstyle{definition}
  42. \newtheorem{definition}{Def}[section]
  43. \newtheorem{theorem}[definition]{Thm}
  44. % custom lemma environment to set custom numbers
  45. \newtheorem{innerlemma}{Lemma}
  46. \newenvironment{lemma}[1]
  47. {\renewcommand\theinnerlemma{#1}\innerlemma}
  48. {\endinnerlemma}
  49. \title{Notes on HyperNova}
  50. \author{arnaucube}
  51. \date{May 2023}
  52. \begin{document}
  53. \maketitle
  54. \begin{abstract}
  55. Notes taken while reading about HyperNova \cite{cryptoeprint:2023/573} and CCS\cite{cryptoeprint:2023/552}.
  56. Usually while reading papers I take handwritten notes, this document contains some of them re-written to $LaTeX$.
  57. The notes are not complete, don't include all the steps neither all the proofs.
  58. Thanks to \href{https://twitter.com/asn_d6}{George Kadianakis} for clarifications, and the authors \href{https://twitter.com/srinathtv}{Srinath Setty} and \href{https://twitter.com/abhiramko}{Abhiram Kothapalli} for answers on chats and twitter.
  59. \end{abstract}
  60. \tableofcontents
  61. \section{CCS}
  62. \subsection{R1CS to CCS overview}
  63. \begin{description}
  64. \item[R1CS instance] $S_{R1CS} = (m, n, N, l, A, B, C)$\\
  65. where $m, n$ are such that $A \in \mathbb{F}^{m \times n}$, and $l$ such that the public inputs $x \in \mathbb{F}^l$. Also $z=(w, 1, x) \in \mathbb{F}^n$, thus $w \in \mathbb{F}^{n-l-1}$.
  66. \item[CCS instance] $S_{CCS} = (m, n, N, l, t, q, d, M, S, c)$\\
  67. where we have the same parameters than in $S_{R1CS}$, but additionally:\\
  68. $t=|M|$, $q = |c| = |S|$, $d$= max degree in each variable.
  69. \item[R1CS-to-CCS parameters] $n=n,~ m=m,~ N=N,~ l=l,~ t=3,~ q=2,~ d=2$, $M=\{A,B,C\}$, $S=\{\{0,~1\},~ \{2\}\}$, $c=\{1,-1\}$
  70. \end{description}
  71. The CCS relation check:
  72. $$\sum_{i=0}^{q-1} c_i \cdot \bigcirc_{j \in S_i} M_j \cdot z ==0$$
  73. where $z=(w, 1, x) \in \mathbb{F}^n$.
  74. In our R1CS-to-CCS parameters is equivalent to
  75. \begin{align*}
  76. &c_0 \cdot ( (M_0 z) \circ (M_1 z) ) + c_1 \cdot (M_2 z) ==0\\
  77. \Longrightarrow &1 \cdot ( (A z) \circ (B z) ) + (-1) \cdot (C z) ==0\\
  78. \Longrightarrow &( (A z) \circ (B z) ) - (C z) ==0
  79. \end{align*}
  80. which is equivalent to the R1CS relation: $Az \circ Bz == Cz$
  81. An example of the conversion from R1CS to CCS implemented in SageMath can be found at\\
  82. \href{https://github.com/arnaucube/math/blob/master/r1cs-ccs.sage}{https://github.com/arnaucube/math/blob/master/r1cs-ccs.sage}.
  83. Similar relations between Plonkish and AIR arithmetizations to CCS are shown in the CCS paper \cite{cryptoeprint:2023/552}, but for now with the R1CS we have enough to see the CCS generalization idea and to use it for the HyperNova scheme.
  84. \subsection{Committed CCS}
  85. $R_{CCCS}$ instance: $(C, \mathsf{x})$, where $C$ is a commitment to a multilinear polynomial in $s'-1$ variables.
  86. Sat if:
  87. \begin{enumerate}[i.]
  88. \item $\text{Commit}(pp, \widetilde{w}) = C$
  89. \item $\sum_{i=1}^q c_i \cdot \left( \prod_{j \in S_i} \left( \sum_{y \in \{0,1\}^{\log m}} \widetilde{M}_j(x, y) \cdot \widetilde{z}(y) \right) \right)$\\
  90. where $\widetilde{z}(y) = \widetilde{(w, 1, \mathsf{x})}(x) ~\forall x \in \{0, 1\}^{s'}$
  91. \end{enumerate}
  92. \subsection{Linearized Committed CCS}
  93. $R_{LCCCS}$ instance: $(C, u, \mathsf{x}, r, v_1, \ldots, v_t)$, where $C$ is a commitment to a multilinear polynomial in $s'-1$ variables, and $u \in \mathbb{F},~ \mathsf{x} \in \mathbb{F}^l,~ r \in \mathbb{F}^s,~ v_i \in \mathbb{F} ~\forall i \in [t]$.
  94. Sat if:
  95. \begin{enumerate}[i.]
  96. \item $\text{Commit}(pp, \widetilde{w}) = C$
  97. \item $\forall i \in [t],~ v_i = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_i(r, y) \cdot \widetilde{z}(y)$\\
  98. where $\widetilde{z}(y) = \widetilde{(w, u, \mathsf{x})}(x) ~\forall x \in \{0, 1\}^{s'}$
  99. \end{enumerate}
  100. \section{Multifolding Scheme for CCS}
  101. Recall sum-check protocol notation: \underline{$C \leftarrow \langle P, V(r) \rangle (g, l, d, T)$} means
  102. $$T=\sum_{x_1 \in \{0,1\}} \sum_{x_2 \in \{0,1\}} \cdots \sum_{x_l \in \{0,1\}} g(x_1, x_2, \ldots, x_l)$$
  103. where $g$ is a $l$-variate polynomial, with degree at most $d$ in each variable, and $T$ is the claimed value.
  104. \vspace{1cm}
  105. Let $s= \log m,~ s'= \log n$.
  106. \begin{enumerate}
  107. \item $V \rightarrow P: \gamma \in^R \mathbb{F},~ \beta \in^R \mathbb{F}^s$
  108. \item $V: r_x' \in^R \mathbb{F}^s$
  109. \item $V \leftrightarrow P$: sum-check protocol:
  110. $$c \leftarrow \langle P, V(r_x') \rangle (g, s, d+1, \underbrace{\sum_{j \in [t]} \gamma^j \cdot v_j}_\text{T})$$
  111. (in fact, $T=(\sum_{j \in [t]} \gamma^j \cdot v_j) \underbrace{+ \gamma^{t+1} \cdot Q(x)}_{=0}) = \sum_{j \in [t]} \gamma^j \cdot v_j$)\\
  112. where:
  113. \begin{align*}
  114. g(x) &:= \underbrace{\left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right)}_\text{LCCCS check} + \underbrace{\gamma^{t+1} \cdot Q(x)}_\text{CCCS check}\\
  115. \text{for LCCCS:}~ L_j(x) &:= \widetilde{eq}(r_x, x) \cdot \left(
  116. \underbrace{\sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_1(y)}_\text{this is the check from LCCCS}
  117. \right)\\
  118. \text{for CCCS:}~ Q(x) := &\widetilde{eq}(\beta, x) \cdot \left(
  119. \underbrace{ \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_2(y) \right) }_\text{this is the check from CCCS}
  120. \right)
  121. \end{align*}
  122. Notice that
  123. $$v_j= \sum_{y\in \{0,1\}^{s'}} \widetilde{M}_j(r, y) \cdot \widetilde{z}(y) = \sum_{x\in \{0,1\}^s} L_j(x)$$
  124. \item $P \rightarrow V$: $\left( (\sigma_1, \ldots, \sigma_t), (\theta_1, \ldots, \theta_t) \right)$, where $\forall j \in [t]$,
  125. $$\sigma_j = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_1(y)$$
  126. $$\theta_j = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_2(y)$$
  127. where $\sigma_j,~\theta_j$ are the checks from LCCCS and CCCS respectively with $x=r_x'$.
  128. \item V: $e_1 \leftarrow \widetilde{eq}(r_x, r_x')$, $e_2 \leftarrow \widetilde{eq}(\beta, r_x')$\\
  129. check:
  130. $$c = \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_j \right) + \gamma^{t+1} \cdot e_2 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)$$
  131. which should be equivalent to the $g(x)$ computed by $V,P$ in the sum-check protocol.
  132. \item $V \rightarrow P: \rho \in^R \mathbb{F}$
  133. \item $V, P$: output the folded LCCCS instance $(C', u', \mathsf{x}', r_x', v_1', \ldots, v_t')$, where $\forall i \in [t]$:
  134. \begin{align*}
  135. C' &\leftarrow C_1 + \rho \cdot C_2\\
  136. u' &\leftarrow u + \rho \cdot 1\\
  137. \mathsf{x}' &\leftarrow \mathsf{x}_1 + \rho \cdot \mathsf{x}_2\\
  138. v_i' &\leftarrow \sigma_i + \rho \cdot \theta_i
  139. \end{align*}
  140. \item $P$: output folded witness and the folded $r_w'$ (random value used for the witness commitment $C$):
  141. \begin{align*}
  142. \widetilde{w}' &\leftarrow \widetilde{w}_1 + \rho \cdot \widetilde{w}_2\\
  143. r_w' &\leftarrow r_{w_1} + \rho \cdot r_{w_2}
  144. \end{align*}
  145. \end{enumerate}
  146. \vspace{1cm}
  147. Multifolding flow:
  148. \begin{center}
  149. \begin{sequencediagram}
  150. \newinst[1]{p}{Prover}
  151. \newinst[3]{v}{Verifier}
  152. \bloodymess[1]{v}{$\gamma,~\beta,~r_x'$}{p}{L}{
  153. \shortstack{
  154. $\gamma \in \mathbb{F},~ \beta \in \mathbb{F}^s$\\
  155. $r_x' \in \mathbb{F}^s$
  156. }
  157. }{}
  158. \bloodymess[1]{p}{$c,~ \pi_{SC}$}{v}{R}{sum-check prove}{sum-check verify}
  159. \bloodymess[1]{p}{$\{\sigma_j\},~\{\theta_j\}$}{v}{R}{compute $\{\sigma_j\}, \{\theta_j\}~ \forall j \in [t]$}{verify $c$ with $\{\sigma_j\}, \{\theta_j\}$ relation}
  160. \bloodymess[1]{v}{$\rho$}{p}{L}{$\rho \in^R \mathbb{F}$}{}
  161. \callself[0]{p}{fold LCCCS instance}{p}
  162. \prelevel
  163. \callself[0]{v}{fold LCCCS instance}{v}
  164. \callself[0]{p}{fold $\widetilde{w}$}{p}
  165. \end{sequencediagram}
  166. \end{center}
  167. \vspace{1cm}
  168. Recall that we are folding 2 instances:
  169. \begin{itemize}
  170. \item[] LCCCS: $(C, u, \textcolor{orange}{x_1}, \textcolor{magenta}{r_x}, \textcolor{orange}{v_1, \ldots, v_t})$
  171. \item[] CCCS: $(C, \textcolor{cyan}{x_2})$
  172. \end{itemize}
  173. Now, to see the verifier check from step 5, observe that in LCCCS, since $\widetilde{w}$ satisfies,
  174. \begin{align*}
  175. \textcolor{orange}{L_j(x)} &:= \widetilde{eq}(\textcolor{magenta}{r_x}, x) \cdot \left(
  176. \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{orange}{\widetilde{z}_1(y)}
  177. \right)\\
  178. &\textcolor{orange}{v_j}= \sum_{y\in \{0,1\}^{s'}} \widetilde{M}_j(\textcolor{magenta}{r_x}, y) \cdot \textcolor{orange}{\widetilde{z}_1(y)})\\
  179. &~~=\sum_{x \in \{0,1\}^s} \widetilde{eq}(\textcolor{magenta}{r_x},y) \cdot (\sum_{y\in \{0,1\}^{s'}} \widetilde{M}_j(x,y)\cdot \textcolor{orange}{\widetilde{z}_1(y)})\\
  180. &~~=\sum_{x \in \{0,1\}^s} \textcolor{orange}{L_j(x)}
  181. \end{align*}
  182. Observe also that in CCCS, since $\widetilde{w}$ satisfies,\\
  183. we have that
  184. $$
  185. G(X) = \sum_{x \in \{0,1\}^s} \widetilde{eq}(X, x) \cdot \textcolor{cyan}{q(x)}
  186. $$
  187. is multilinear, and can be seen as a Lagrange polynomial where coefficients are evaluations of $q(x)$ on the hypercube.
  188. \begin{align*}
  189. \textcolor{cyan}{Q(x)} := &\widetilde{eq}(\textcolor{magenta}{\beta}, x) \cdot \left(
  190. \overbrace{ \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{cyan}{\widetilde{z}_2(y)} \right)
  191. }^\textcolor{cyan}{q(x)}
  192. \right)\\
  193. 0= &\sum_{i=1}^q c_i \prod_{j\in S_i} \left( \sum_{y\in \{0,1\}^{s'}} \widetilde{M}_j(\textcolor{magenta}{\beta}, y) \cdot \textcolor{cyan}{\widetilde{z}_2(y)}\right)\\
  194. =&\sum_{x \in \{0,1\}^s} \widetilde{eq}(\textcolor{magenta}{\beta}, x) \cdot \left( \sum_{i=1}^q c_i \prod_{j\in S_i} ( \sum_{y\in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{cyan}{\widetilde{z}_2(y)}) \right) \\
  195. =&\sum_{x \in \{0,1\}^s} \textcolor{cyan}{Q(x)} = G(\textcolor{magenta}{\beta})
  196. \end{align*}
  197. %
  198. For an honest prover, all these coefficients are zero, thus $G(X)$ must necessarily be the zero polynomial. Thus $G(\beta)=0$ for $\beta \in^R \mathbb{F}^s$.
  199. \vspace{1cm}
  200. We can now see that
  201. $$\textcolor{orange}{\sigma_j} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(\textcolor{pink}{r_x'}, y) \cdot \textcolor{orange}{\widetilde{z}_1(y)},
  202. ~~~\textcolor{cyan}{\theta_j} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(\textcolor{pink}{r_x'}, y) \cdot \textcolor{cyan}{\widetilde{z}_2(y)}$$
  203. $$e_1 \leftarrow \widetilde{eq}(\textcolor{magenta}{r_x}, \textcolor{pink}{r_x'}),~ e_2 \leftarrow \widetilde{eq}(\textcolor{magenta}{\beta}, \textcolor{pink}{r_x'})$$
  204. so the Verifier's check:
  205. \begin{align*}
  206. c &= \left(
  207. \sum_{j \in [t]} \gamma^j \cdot \underbrace{e_1 \cdot \textcolor{orange}{\sigma_j} }_\textcolor{orange}{L_j}(\textcolor{pink}{r_x'})
  208. \right)
  209. + \gamma^{t+1} \cdot
  210. \underbrace{e_2 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \textcolor{cyan}{\theta_j} \right) }_\textcolor{cyan}{Q}(\textcolor{pink}{r_x'})\\
  211. &= \left( \sum_{j\in [t]} \gamma^j \cdot \textcolor{orange}{L_j}(\textcolor{pink}{r_x'}) \right) + \gamma^{t+1} \cdot \textcolor{cyan}{Q}(\textcolor{pink}{r_x'})\\
  212. &= g(\textcolor{pink}{r_x'})
  213. \end{align}
  214. $$\textcolor{gray}{(Recall,~ g(x) := \left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right) + \gamma^{t+1} \cdot Q(x))}$$
  215. Outputted LCCCS: $(C', u', x', \textcolor{pink}{r_x'}, v_1', \ldots, v_t')$
  216. \framebox{\begin{minipage}{4.3 in}
  217. \begin{footnotesize}
  218. \textbf{Note}: notice that this past equation is related to Spartan paper \cite{cryptoeprint:2019/550}, lemmas 4.2 and 4.3, where instead of
  219. $$q(x) = \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_2(y) \right)$$
  220. for our R1CS example, we can restrict it to just $M_0,M_1,M_2$, which would be
  221. $$=\left( \sum_{y \in \{0,1\}^s} \widetilde{M_0}(x, y) \cdot \widetilde{z}(y) \right) \cdot \left( \sum_{y \in \{0,1\}^s} \widetilde{M_1}(x, y) \cdot \widetilde{z}(y) \right) - \sum_{y \in \{0,1\}^s} \widetilde{M_2}(x, y) \cdot \widetilde{z}(y)$$
  222. and we can see that $q(x)$ is the same equation $\widetilde{F}_{io}(x)$ that we had in Spartan:
  223. $$
  224. \widetilde{F}_{io}(x)=\left( \sum_{y \in \{0,1\}^s} \widetilde{A}(x, y) \cdot \widetilde{z}(y) \right) \cdot \left( \sum_{y \in \{0,1\}^s} \widetilde{B}(x, y) \cdot \widetilde{z}(y) \right) - \sum_{y \in \{0,1\}^s} \widetilde{C}(x, y) \cdot \widetilde{z}(y)
  225. $$
  226. where
  227. $$Q_{io}(t) = \sum_{x \in \{0,1\}^s} \widetilde{F}_{io}(x) \cdot \widetilde{eq}(t,x)=0$$
  228. and V checks $Q_{io}(\tau)=0$ for $\tau \in^R \mathbb{F}^s$, which in HyperNova is $G(\beta)=0$ for $\beta \in^R \mathbb{F}^s$.
  229. $Q_{io}(\cdot)$ is a zero-polynomial ($G(\cdot)$ in HyperNova), it evaluates to zero for all points in its domain iff $\widetilde{F}_{io}(\cdot)$ evaluates to zero at all points in the $s$-dimensional boolean hypercube.
  230. \begin{align*}
  231. \text{Spartan} &\longleftrightarrow \text{HyperNova}\\
  232. \tau &\longleftrightarrow \beta\\
  233. \widetilde{F}_{io}(x) &\longleftrightarrow q(x)\\
  234. Q_{io}(\tau) &\longleftrightarrow G(\beta)
  235. \end{align*}
  236. So, in HyperNova
  237. $$0 = \sum_{x \in \{0,1\}^s} Q(x) = \sum_{x \in \{0,1\}^s} \widetilde{eq}(\beta,x) \cdot q(x)$$
  238. \end{footnotesize}
  239. \end{minipage}}
  240. \vspace{1cm}
  241. \subsection{Multifolding for multiple instances}
  242. The multifolding of multiple LCCCS \& CCCS instances is not shown in the HyperNova paper, but Srinath Setty gave an overview in the PSE HyperNova presentation. This section unfolds it.
  243. We're going to do this example with parameters \textcolor{orange}{LCCCS: $\mu = 2$}, \textcolor{cyan}{CCCS: $\nu = 2$}, which means that we have 2 LCCCS instances and 2 CCCS instances.
  244. Assume we have 4 $z$ vectors, $z_1,~ \textcolor{orange}{z_2}$ for the two LCCCS instances, and $z_3,~ \textcolor{cyan}{z_4}$ for the two CCCS instances, where $z_1,~z_3$ are the vectors that we already had in the example with $\mu=1,\nu=1$, and $z_2,~z_4$ are the extra ones that we're adding now.
  245. In \emph{step 3} of the multifolding with more than one LCCCS and more than one CCCS instances, we have:
  246. \begin{align*}
  247. g(x) &:= \left( \sum_{j \in [t]} \gamma^j \cdot L_{1,j}(x) + \textcolor{orange}{\gamma^{t+j} \cdot L_{2,j}(x)} \right)
  248. + \gamma^{2t+1} \cdot Q_1(x) + \textcolor{cyan}{\gamma^{2t+2} \cdot Q_2(x)} \\
  249. &L_{1,j}(x) := \widetilde{eq}(r_{1,x}, x) \cdot \left(
  250. \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_1(y)
  251. \right)\\
  252. &\textcolor{orange}{L_{2,j}(x)} := \widetilde{eq}(\textcolor{orange}{r_{2,x}}, x) \cdot \left(
  253. \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{orange}{\widetilde{z}_2(y)}
  254. \right)\\
  255. &Q_1(x) := \widetilde{eq}(\beta, x) \cdot \left(
  256. \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_3(y) \right)\right)\\
  257. &\textcolor{cyan}{Q_2(x)} := \widetilde{eq}(\textcolor{cyan}{\beta}, x) \cdot \left(
  258. \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{cyan}{\widetilde{z}_4(y)} \right)\right)
  259. \end{align*}
  260. \framebox{\begin{minipage}{4.3 in}
  261. A generic definition of $g(x)$ for $\mu>1~\nu>1$, would be
  262. $$
  263. g(x) := \left( \sum_{i \in [\mu]} \left( \sum_{j \in [t]} \gamma^{i \cdot t+j} \cdot L_{i,j}(x) \right) \right)
  264. + \left( \sum_{i \in [\nu]} \gamma^{\mu \cdot t + i} \cdot Q_i(x) \right)
  265. $$
  266. \end{minipage}}
  267. Recall, the original $g(x)$ definition was
  268. $$\textcolor{gray}{g(x) := \left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right) + \gamma^{t+1} \cdot Q(x)}$$
  269. \vspace{0.5cm}
  270. In \emph{step 4}, $P \rightarrow V$:
  271. $(\{\sigma_{1,j}\}, \textcolor{orange}{\{\sigma_{2,j}\}}, \{\theta_{1,j}\}, \textcolor{cyan}{\{\theta_{2,j}\}}),~ \text{where} ~\forall j \in [t]$,
  272. $$\sigma_{1,j} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_1(y)$$
  273. $$\textcolor{orange}{\sigma_{2,j}} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \textcolor{orange}{\widetilde{z}_2(y)}$$
  274. $$\theta_{1,j} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_3(y)$$
  275. $$\textcolor{cyan}{\theta_{2,j}} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \textcolor{cyan}{\widetilde{z}_4(y)}$$
  276. \framebox{\begin{minipage}{4.3 in}
  277. so in a generic way,\\
  278. $P \rightarrow V$:
  279. $(\{\sigma_{i,j}\}, \{\theta_{k,j}\}),~ \text{where} ~\forall~ j \in [t],~ \forall~ i \in [\mu],~ \forall~ k \in [\nu]$
  280. where
  281. $$\sigma_{i,j} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_i(y)$$
  282. $$\theta_{k,j} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_{\mu+k}(y)$$
  283. \end{minipage}}
  284. \vspace{1cm}
  285. And in \emph{step 5}, $V$ checks
  286. \begin{align*}
  287. c &= \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_{1,j}
  288. ~\textcolor{orange}{+ \gamma^{t+j} \cdot e_2 \cdot \sigma_{2,j}}\right)\\
  289. &+ \gamma^{2t+1} \cdot e_3 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)
  290. + \textcolor{cyan}{\gamma^{2t+2} \cdot e_4 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)}
  291. \end{align*}
  292. where
  293. $e_1 \leftarrow \widetilde{eq}(r_{1,x}, r_x'),~ e_2 \leftarrow \widetilde{eq}(r_{2,x}, r_x')$, $e_3, e_4 \leftarrow \widetilde{eq}(\beta, r_x')$.
  294. \vspace{0.5cm}
  295. \framebox{\begin{minipage}{4.3 in}
  296. A generic definition of the check would be
  297. $$
  298. c = \sum_{i \in [\mu]} \left(\sum_{j \in [t]} \gamma^{i \cdot t + j} \cdot e_i \cdot \sigma_{i,j} \right) \\
  299. + \sum_{k \in [\nu]} \gamma^{\mu \cdot t+k} \cdot e_k \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_{k,j} \right)
  300. $$
  301. \end{minipage}}
  302. where the original check was\\
  303. $\textcolor{gray}{c = \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_j \right) + \gamma^{t+1} \cdot e_2 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)}$
  304. % TODO
  305. % Pending questions:
  306. % - \beta & \beta' can be the same? or related somehow like \beta'=\beta^2 ?
  307. \vspace{0.5cm}
  308. And for the \emph{step 7},
  309. \begin{align*}
  310. C' &\leftarrow C_1 + \rho \cdot C_2 + \rho^2 C_3 + \rho^3 C_4 + \ldots = \sum_{i \in [\mu + \nu]} \rho^i \cdot C_i \\
  311. u' &\leftarrow \sum_{i \in [\mu]} \rho^i \cdot u_i + \sum_{i \in [\nu]} \rho^{\mu + i-1} \cdot 1\\
  312. \mathsf{x}' &\leftarrow \sum_{i \in [\mu+\nu]} \rho^i \cdot \mathsf{x}_i\\
  313. v_i' &\leftarrow \sum_{i \in [\mu]} \rho^i \cdot \sigma_i + \sum_{i \in [\nu]} \rho^{\mu + i-1} \cdot \theta_i\\
  314. \end{align*}
  315. and \emph{step 8},
  316. \begin{align*}
  317. \widetilde{w}' &\leftarrow \sum_{i \in [\mu+\nu]} \rho^i\cdot \widetilde{w}_i\\
  318. r_w' &\leftarrow \sum_{i \in [\mu+\nu]} \rho^i \cdot r_{w_i}\\
  319. \end{align*}
  320. Note that over all the multifolding for $\mu >1$ and $\nu>1$, we can easily parallelize most of the computation.
  321. \vspace{2cm}
  322. %%%%%% APPENDIX
  323. \appendix
  324. \section{Appendix: Some details}
  325. This appendix contains some notes on things that don't specifically appear in the paper, but that would be needed in a practical implementation of the scheme.
  326. \subsection{Matrix and Vector to Sparse Multilinear Extension}
  327. Let $M \in \mathbb{F}^{m \times n}$ be a matrix. We want to compute its MLE
  328. $$\widetilde{M}(x_1, \ldots, x_l) = \sum_{e \in \{0, 1 \}^l} M(e) \cdot \widetilde{eq}(x, e)$$
  329. We can view the matrix $M \in \mathbb{F}^{m \times n}$ as a function with the following signature:
  330. $$M(\cdot): \{0,1\}^s \times \{0,1\}^{s'} \rightarrow \mathbb{F}$$
  331. where $s = \lceil \log m \rceil,~ s' = \lceil \log n \rceil$.
  332. An entry in $M$ can be accessed with a $(s+s')$-bit identifier.
  333. eg.:
  334. $$
  335. M = \begin{pmatrix}
  336. 1 & 2 & 3\\
  337. 4 & 5 & 6\\
  338. \end{pmatrix}
  339. \in \mathbb{F}^{3 \times 2}
  340. $$
  341. $m = 3,~ n = 2,~~~ s = \lceil \log 3 \rceil = 2,~ s' = \lceil \log 2 \rceil = 1$
  342. So, $M(x, y) = x$, where $x \in \{0,1\}^s,~ y \in \{0,1\}^{s'},~ x \in \mathbb{F}$
  343. $$
  344. M = \begin{pmatrix}
  345. M(00,0) & M(01,0) & M(10,0)\\
  346. M(00,1) & M(01,1) & M(10,1)\\
  347. \end{pmatrix}
  348. \in \mathbb{F}^{3 \times 2}
  349. $$
  350. This logic can be defined as follows:
  351. \begin{algorithm}[H]
  352. \caption{Generating a Sparse Multilinear Polynomial from a matrix}
  353. \begin{algorithmic}
  354. \State set empty vector $v \in (\text{index:}~ \mathbb{Z}, x: \mathbb{F}^{s \times s'})$
  355. \For {$i$ to $m$}
  356. \For {$j$ to $n$}
  357. \If {$M_{i,j} \neq 0$}
  358. \State $v.\text{append}( \{ \text{index}: i \cdot n + j,~ x: M_{i,j} \} )$
  359. \EndIf
  360. \EndFor
  361. \EndFor
  362. \State return $v$ \Comment {$v$ represents the evaluations of the polynomial}
  363. \end{algorithmic}
  364. \end{algorithm}
  365. Once we have the polynomial, its MLE comes from
  366. $$\widetilde{M}(x_1, \ldots, x_{s+s'}) = \sum_{e \in \{0,1\}^{s+s'}} M(e) \cdot \widetilde{eq}(x, e)$$
  367. $$M(X) \in \mathbb{F}[X_1, \ldots, X_s]$$
  368. \paragraph{Multilinear extensions of vectors}
  369. Given a vector $u \in \mathbb{F}^m$, the polynomial $\widetilde{u}$ is the MLE of $u$, and is obtained by viewing $u$ as a function mapping ($s=\log m$)
  370. $$u(x): \{0,1\}^s \rightarrow \mathbb{F}$$
  371. $\widetilde{u}(x, e)$ is the multilinear extension of the function $u(x)$
  372. $$\widetilde{u}(x_1, \ldots, x_s) = \sum_{e \in \{0,1\}^s} u(e) \cdot \widetilde{eq}(x, e)$$
  373. \bibliography{paper-notes.bib}
  374. \bibliographystyle{unsrt}
  375. \end{document}