binius_ip/logup_star/output.rs
1// Copyright 2026 The Binius Developers
2
3//! The reduced output claims of a logUp* verification.
4
5/// The reduced output claims of a logUp* verification.
6///
7/// Each claim must be verified separately by the caller.
8/// Verifying them is out of scope here.
9///
10/// The two sides each carry **one** point, shared by every table, and read it from opposite ends.
11/// That is not a choice: the pushforward reduction pads a table at its high variables, while the
12/// fractional-addition batch pads a looker at its low ones.
13#[derive(Debug, Clone, PartialEq, Eq)]
14pub struct LogupOutput<F> {
15 /// The point the table and pushforward evaluation claims are drawn from, of `max m`
16 /// coordinates.
17 ///
18 /// A table over `m` variables is claimed at the **first `m`** coordinates. Tables of equal
19 /// size therefore all share the whole point; a smaller table's point is a prefix of a larger
20 /// one's.
21 pub table_eval_point: Vec<F>,
22 /// The point the index evaluation claims are drawn from, of `max n` coordinates.
23 ///
24 /// A looker whose column has `n` variables is claimed at the **last `n`** coordinates. Lookers
25 /// of equal length therefore all share the whole point; a shorter looker's point is a suffix
26 /// of a longer one's, because the batch pads each instance at its low coordinates.
27 pub index_eval_point: Vec<F>,
28 /// One entry per table, in the order the tables were given.
29 pub tables: Vec<LogupTableOutput<F>>,
30}
31
32/// The reduced claims belonging to one table.
33#[derive(Debug, Clone, PartialEq, Eq)]
34pub struct LogupTableOutput<F> {
35 /// The claimed evaluation of the table multilinear `T` at its prefix of
36 /// [`LogupOutput::table_eval_point`].
37 pub eval_claim: F,
38 /// The claimed evaluation of the pushforward multilinear `Y` at the same prefix.
39 pub pushforward_claim: F,
40 /// The claimed evaluations of this table's lookers' index multilinears `I`, in its own looker
41 /// order, each at that looker's own suffix of [`LogupOutput::index_eval_point`].
42 pub index_eval_claims: Vec<F>,
43}
44
45/// The open claims of a logUp* verification that leaves the table side unclosed.
46///
47/// This is what the reduction holds before the pushforward sumcheck runs.
48/// Each table keeps two claims on its pushforward and none on the table itself:
49///
50/// ```text
51/// <Y_t, eq_{z_t}> = Y_t(z_t) the fractional-addition leaf claim
52/// <Y_t, T_t> = e_t the product claim
53/// ```
54///
55/// See [`super::verify_reduction_transparent`].
56#[derive(Debug, Clone, PartialEq, Eq)]
57pub struct LogupTransparentOutput<F> {
58 /// The point the index evaluation claims are drawn from, of `max n` coordinates.
59 ///
60 /// A looker whose column has `n` variables is claimed at the **last `n`** coordinates, exactly
61 /// as in [`LogupOutput::index_eval_point`].
62 pub index_eval_point: Vec<F>,
63 /// One entry per table, in the order the tables were given.
64 pub tables: Vec<LogupTransparentTableOutput<F>>,
65}
66
67/// The open claims belonging to one table whose table side is left unclosed.
68#[derive(Debug, Clone, PartialEq, Eq)]
69pub struct LogupTransparentTableOutput<F> {
70 /// The fractional-addition leaf point `z_t`, of this table's own `m_t` coordinates.
71 pub pushforward_eval_point: Vec<F>,
72 /// The leaf claim `Y_t(z_t)` on this table's pushforward.
73 pub pushforward_eval_claim: F,
74 /// The product claim `e_t = <T_t, Y_t>`, an inner product over this table's `m_t`-variable
75 /// cube.
76 ///
77 /// It is the gamma-combination of the claims of the lookers that read this table.
78 /// The reduction never reads a table, so this claim arrives unchecked: opening it is what
79 /// proves the lookups.
80 pub product_claim: F,
81 /// The claimed evaluations of this table's lookers' index multilinears `I`, in its own looker
82 /// order, each at that looker's own suffix of [`LogupTransparentOutput::index_eval_point`].
83 pub index_eval_claims: Vec<F>,
84}