Skip to content

spec: Recursion - #943

Draft
erik-3milabs wants to merge 5 commits into
spec/mainfrom
spec/recursion
Draft

spec: Recursion#943
erik-3milabs wants to merge 5 commits into
spec/mainfrom
spec/recursion

Conversation

@erik-3milabs

Copy link
Copy Markdown
Collaborator

No description provided.

@erik-3milabs erik-3milabs self-assigned this Aug 21, 2026
@erik-3milabs erik-3milabs added the spec Updates and improvements to the spec document label Aug 21, 2026
@github-actions

Copy link
Copy Markdown

Kimi Code Review

⚠️ Review failed: Kimi API request failed with status 401


Automated review by Kimi (Moonshot AI)

@github-actions

Copy link
Copy Markdown

Codex Code Review

  • Medium — Recursive verification omits the required commitment (spec/recursion.typ:105). verify accepts a commitmentSpace, but the recursive branch treats commitment_1 as a function; lines 116–118 similarly pass verifier functions directly. Use an explicitly defined specialization operation producing comm(verify'(commitment_0, commitment_1, ·)). As written, the equations are ill-typed and do not establish the claimed recursive chain.

Comment thread spec/recursion.typ
#let (prove, verify) = ($italic("p")$, $italic("v")$)

// Mathematical symbols
#let (zero, one) = ($bb(0)$, $bb(1)$)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these to be bb? It already feels like a lot of bb throughout the document

Comment thread spec/recursion.typ
i.e., all instances $instance in instanceSpace$
for which there exists a witness $witness in witnessSpace$ such that
$instance\(witness) = one$.
Lastly, we introduce the commitment function $c: instanceSpace mapsto commitmentSpace$.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commitments may need to be randomized, so with an explicit randomness parameter maybe c(x; r)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe we can be content with a deterministic commitment scheme and make explicit that we don't care about/expect it to be hiding.

Comment thread spec/recursion.typ
Lastly, we introduce the commitment function $c: instanceSpace mapsto commitmentSpace$.
To simplify notation, we use $commit(instance) = c(instance)$.

We now assume the existence of _proving system_ $(prove, verify)$ with

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We now assume the existence of _proving system_ $(prove, verify)$ with
We now assume the existence of _proof system_ $(prove, verify)$ with

Comment thread spec/recursion.typ
#let (inputSpace, input) = ($II$, $bb(i)$)
#let (instanceSpace, instance) = ($XX$, $bb(x)$)
#let (witnessSpace, witness) = ($WW$, $bb(w)$)
#let (proofSpace, proof) = ($bb(Pi)$, $bb(pi)$)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just pi instead of bb?

Comment thread spec/recursion.typ
Comment on lines +51 to +53
&: prob[verify\(commit(instance), prove\(instance; witness)) = one | instance(witness) = one] = 1 \
forall instance in instanceSpace without relation, forall proof in proofSpace
&: prob[verify\(commit(instance), proof) = one] < epsilon

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what probability space is this over? For the prover I'm assuming internal randomness, but the verifier should presumably be deterministic

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may be a side-effect of formalizing things as NIZKs, since the common way to express this as an interactive proocol can rely on the random challenges from the verifier for both of these.
For a NIZK, the soundness becomes computationally secure, presumably, so it becomes dependent on the prover somewhere.

Comment thread spec/recursion.typ

This concept, colloquially known as _proof recursion_, can be applied repeatedly.
The technique is specifically beneficial for _succint_ proving systems where proof size
typically shrinks (and verification time therefore reduces) as the level of recursion increases.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
typically shrinks (and verification time therefore reduces) as the level of recursion increases.
typically shrinks (and verification time reduces) as the level of recursion increases.

It is not a guaranteed fact that smaller proofs are faster to verify, though typically they would be

Comment thread spec/recursion.typ
verify(commitment_1(commitment_0, commitment_1, dot), proof) &text("if") b=1
)
$
where it is assumed that $comm(function(x_1, x_2, dot))$ can be easily

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stick to just $f$ (or use function everywhere and make it regular instead of bb)

Comment thread spec/recursion.typ
Comment on lines +108 to +109
where it is assumed that $comm(function(x_1, x_2, dot))$ can be easily
constructed from $comm(function), comm(x_1)$, and $comm(x_2)$.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this formulation the case in practice for us, and how does it interact with the absorption remark? That is, we let the verifier take an instance as argument, which has already absorbed its input, so that part of the formalization seems slightly wrong here. If we keep instance as (f, i) without the reinterpretation as f(i; .) it might work, but then the way we commit should also change a bit to have a commitment to f and potentially plain i (maybe a commitment to i works, but I'm not 100% certain).

Comment thread spec/recursion.typ
and vice-versa --- e.g., hashing merkle leafs containing field elements during FRI-query proof verification.
This implies that some form of communication between both VMs is required.

This architecture enables the required communications by introducing a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This" feels like it refers to what already was described, but the record is not an inherent part of introducing a split, so maybe

Suggested change
This architecture enables the required communications by introducing a
Our architecture enables the required communications by introducing a

Comment thread spec/recursion.typ
*Record $record$.*
The record contains all challenges the prover derived using Fiat-Shamir.

*Tasks for $verify'_b\(commitment_0, commitment_1, b, proof, record)$:*

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a few of the ad-hoc checks, which are (I think) mostly related to memory and paging.
It would probably be a good idea to have an overview of those somewhere central as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec Updates and improvements to the spec document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants