//! Retired folded trace API β UNSOUND, compiled only with the `legacy` feature.
//!
//! `commit`, `open`, `verify_eval`, `verify`, `fold` and `decide` implement the
//! 0.3.x legacy fold over hemera + Brakedown. It must not be used for
//! production. Its holes are recorded in `specs/decider.md` Β§soundness:
//!
//! - the fold is never checked by the verifier: hemera is not homomorphic,
//! so the error vector is prover data (`decider.md`, "current
//! implementation residual");
//! - the statement is not bound: a satisfying witness of nothing verifies for
//! any `Statement` (finding 3), and the constant wire is free, so the
//! all-zero witness satisfies the universal instance (finding 2);
//! - the Brakedown code distance is unproven (lens#6).
//!
//! The tests `retired_path_hole_zeroed_constant_wire_satisfies_universal_instance`
//! and `retired_path_hole_meaningless_witness_passes_for_any_statement`
//! (`folding/fold.rs`) demonstrate the holes; they pass because the path is
//! broken. The sound production APIs are `crate::execution` (public profile v3,
//! state profile v3, native private MITH) and `crate::envelope`; see
//! `specs/soundness.md`. The feature exists so external consumers can migrate;
//! it is removed in phase 5 of the proof-system repair.
use Goldilocks;
use VecTrace;
use Brakedown;
use ;
use crate;
use crate;
use crateSpartanVerifier;
use crateTranscript;
use crate;
/// Compute the hemera hash of a trace row's 16 registers as a 32-byte digest.
///
/// This is the exact binding `commit()` enforces between
/// `Statement.input_hash`/`output_hash` and the first/last trace rows β
/// exported so provers (joy) can construct statements that bind.
/// Digest binding all accumulator groups of one TraceProof together.
///
/// hemera hash over the group count and every group's witness commitment,
/// in group order. Absorbed into each group's decide transcript (option A
/// linkage of the axis design): a valid group spliced in from another
/// proof changes the digest and breaks every group's Fiat-Shamir chain.
pub
/// Fold a sequence of witnesses of one instance into a fresh accumulator.
pub
/// Prove a nox execution trace.
///
/// Every Layer-1 row β each consecutive trace pair, each replayed
/// Fiat-Shamir Poseidon2 round of an axis/look opening, each BBG root-chain
/// compression β is a witness of the ONE universal step instance and folds
/// into ONE legacy-fold accumulator. The opening bindings (axis, hash, look eq
/// steps) fold into a second, degree-1 accumulator when present. Each is
/// closed by one decider under a shared linkage digest. The proof is two
/// groups at most and its size does not depend on the trace length (the
/// legacy fold is unsound; see the module documentation).
///
/// `hash_aux` provides prover hints for Poseidon2 hash blocks (one per block).
/// `axis_openings` provides Brakedown opening proofs for axis reads (one per axis row).
/// `look_openings` provides Brakedown opening proofs for BBG look reads (one per look row).
/// Pass empty slices for traces without hash, axis, or look operations.
/// Commit a polynomial and open it at an evaluation point.
///
/// `poly` is the evaluation table (any length; padded to `1 << point.len()`).
/// `point` has `num_vars` coordinates β one per variable of the multilinear poly.
/// Returns the binding commitment and an opening proof that `poly(point) = value`.
///
/// Pair with `verify_eval` for the full commit-open-verify cycle.
/// Verify a polynomial evaluation proof produced by `open`.
///
/// Returns `Ok(())` if the opening proves that the polynomial committed in
/// `commitment` evaluates to `value` at `point`. Returns `Err` otherwise.
/// Verify a zheng proof against a public statement.
///
/// The universal group is checked against `ccs::universal_ccs()`, the
/// binding group against `ccs::eq_instance()` β the instances come from
/// the verifier, never from the proof. Both groups must verify.
/// Fold one trace step into an accumulator.
///
/// `transcript` must be shared across all fold calls within one CCS group so
/// that beta challenges are chained (Fiat-Shamir binding). Start a fresh
/// `Transcript::new_v1()` at the beginning of each group and pass the same
/// instance throughout the group. Mixing instances or transcripts across groups
/// breaks soundness.
/// Run the legacy SuperSpartan decider on an accumulated legacy-fold state.
///
/// Produces the final proof from the accumulated CCS instance and witness,
/// bound to the given statement via Fiat-Shamir. The proof carries a
/// single-group linkage digest, so a `TraceProof` whose only group is this
/// one (a universal accumulator, no binding group) verifies with [`verify`].
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); }