//! Wrap steps: a verifier proved as one non-accumulating proof of the
//! recursion circuit alone (`specs/recursion.md` § wrap).
//!
//! A wrap proof shows that the circuit ran a verifier â the IVC final
//! verifier ([`super::finalv`]) or the verifier of another wrap proof â on
//! a proof it holds as witness, and output the digest of the public values
//! that verifier binds:
//!
//! ```text
//! X = H_PUBLIC(ctx, chain, segments, run challenges, statement constants,
//! the deferred nox-public claim (point, value))
//! ```
//!
//! Two modes:
//!
//! - [`Mode::Inner`] (a proof another wrap verifies): the circuit's AIR
//! over `2^n` rows with committed words `W1` (circuit phase 1), `W2`
//! (phase 2: the memory argument, after the memory challenges) and the
//! circuit's key as fixed base words (`splitkey`); any interpreter
//! verifies it, the circuit included;
//! - [`Mode::Final`] (the outermost proof, verified natively): one
//! committed word `W1`; the memory argument is replaced by its linear
//! form â every read slot's value equals its write slot's, batched with
//! powers of `λ` into `âšu_λ, W1â© = 0` over the whole word, one sumcheck
//! â and the key's columns are evaluated by the verifier (`u_λ` and the
//! key are fixed by the circuit's layout: `O(reads + key entries)`
//! field operations, no opening).
//!
//! Both: `live = 1` on every row, the public input `X` at the output row.
//!
//! ```text
//! transcript tag WRAP: X; W1 root, OOD; inner: (α_V, β_V), W2 root,
//! OOD | final: λ; Ï, ÎŒ; zerocheck (degree 9); the committed
//! columns at Ï and its successor; inner: the key columns at
//! Ï, γ_k; the shift reduction to one point per word; inner:
//! the key claim over its words | final: the wiring
//! sumcheck; one batched field-native WHIR opening
//! ```
//!
//! The verifier evaluates the circuit's constraints at the point through
//! their recorded graph (`expr`), so it runs natively and as a circuit.
pub use ;
pub use ;
pub use prove;
pub use ;
use WhirParams;
use Fp3;
use ;
use ;
use Pre;
use ClaimV;
use whir;
use Digest;
use crate;
use crate;
/// The shipped chain of levels over the IVC proof, innermost first, as
/// the benches spell it (`<log inv rate><i|f>[:<grinding bits>]`): inner
/// 1/16 grinding 16 bits (2^16 rows), inner 1/128 grinding 22 (2^15; its
/// key over the base field, `splitkey`, so the final circuit fits 2^14),
/// final 1/512 grinding 26 (2^14): the outermost proof is †64,213 B
/// over every transcript ([`max_proof_bytes`] †[`MAX_FINAL_BYTES`]), so a
/// profile-6 envelope of a statement up to â 1.3 KB fits 64 KiB â
/// `audit/wrap-fastverify-2026-10.md`.
pub const SHIPPED: &str = "4i:16,7i:22,9f:26";
/// The outermost proof's size bound: 64 KiB, by construction.
pub const MAX_FINAL_BYTES: usize = 65_536;
/// The most bytes an outermost proof under the final key `k` takes over
/// every transcript (no two queries sharing a Merkle node): every message
/// shape is fixed by the key; the multi-openings' siblings are bounded
/// level by level (`whir::wire::max_siblings`).
/// Committed columns (phase 1 â phase 2).
pub const COLS: usize = V1 + V2;
/// Columns of a committed word.
pub const WORD: usize = 64;
/// Column variables of a word.
pub const CBITS: usize = 6;
/// A wrap level's relation (module docs).
/// Everything a wrap level's prover and verifier derive from its
/// parameters and the verifier it proves.
/// A wrap proof (final mode: one trace word, the successor values of the
/// columns the constraints read, no key messages, no shift or wiring
/// sumcheck â its claims are the opening's weights).
/// The outermost proof: the recursive proof's header (step size, region
/// start, segments, the chain of pre-committed roots), the deferred
/// nox-public claim and the wrap proof whose public input binds them.
/// The constraint degree of the circuit.
pub const DEGREE: usize = 8;
/// The circuit's AIR alone, `live = 1` appended, for the zerocheck prover:
/// local = W1 â W2 (inner) or W1 (final, no memory constraints), publics =
/// key â public-input columns.
;
/// Inputs of the constraint graph: local, next (`w` each), key, public
/// input, α_V, β_V, Ό.
/// The key columns `g` (over committed width `w`) reads.
pub
/// Record `Σ_k Ό^k C_k` (constraints of the circuit and `live = 1`).
/// Verify the outermost proof natively against a prepared statement: the
/// deferred nox-public claim against the statement's columns, then the
/// wrap proof under the public input the statement and that claim hash
/// to.
/// Verify the outermost proof of `st` (the recursive proof's WHIR
/// parameters `ivc_whir`): prepare the statement under the proof's
/// header, then [`verify_final`].
/// Verify a wrap proof natively under public input `x`.
/// Every round-by-round term of a wrap level as `(name, bits)` â its own
/// rounds and its opening's (`specs/soundness.md` § wrap). `reads`: the
/// read slots of the final mode's wiring.
Homonyms
cyb/evy/forks/naga/src/back/hlsl/mod.rs
struct Baz { m: mat3x2, } struct Baz { float2 m_0; float2 m_1; float2 m_2; }; float3x2 GetMatmOnBaz(Baz obj) { return float3x2(obj.m_0, obj.m_1, obj.m_2); }