Skip to content

Commit

Permalink
chore: Use “main” & “aux over “base” & “ext”
Browse files Browse the repository at this point in the history
Over the years, the terminology of “main” and “auxiliary” tables has
become dominant over our terminology of “base” and “extension” tables.

changelog: ignore
  • Loading branch information
jan-ferdinand committed Sep 10, 2024
1 parent 278244a commit 07fdf15
Show file tree
Hide file tree
Showing 56 changed files with 2,729 additions and 2,976 deletions.
10 changes: 5 additions & 5 deletions specification/src/arithmetization.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ See “[Arguments Using Public Information](arithmetization.md#arguments-using-p

![](img/aet-relations.png)

### Base Tables
### Main Tables

The values of all registers, and consequently the elements on the stack, in memory, and so on, are elements of the _B-field_, _i.e._, $\mathbb{F}_p$ where $p$ is the Oxfoi prime, $2^{64}-2^{32}+1$.
All values of columns corresponding to one such register are elements of the B-Field as well.
Together, these columns are referred to as table's _base_ columns, and make up the _base table_.
Together, these columns are referred to as table's _main_ columns, and make up the _main table_.

### Extension Tables
### Auxiliary Tables

The entries of a table's columns corresponding to [Permutation](permutation-argument.md), [Evaluation](evaluation-argument.md), and [Lookup Arguments](lookup-argument.md) are elements from the _X-field_ $\mathbb{F}_{p^3}$.
These columns are referred to as a table's _extension_ columns, both because the entries are elements of the X-field and because the entries can only be computed using the base tables, through an _extension_ process.
Together, these columns are referred to as a table's _extension_ columns, and make up the _extension table_.
These columns are referred to as a table's _auxiliary_ columns, both because the entries are elements of the X-field and because the entries can only be computed using the main tables, through an _auxiliary_ process.
Together, these columns are referred to as a table's _auxiliary_ columns, and make up the _auxiliary table_.

### Padding

Expand Down
8 changes: 4 additions & 4 deletions specification/src/cascade-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ The Cascade Table facilitates the translation of limb widths.
For the actual lookup of the 8-bit limbs, the [Lookup Table](lookup-table.md) is used.
For a more detailed explanation and in-depth analysis, see the [Tip5 paper](https://eprint.iacr.org/2023/107.pdf).

## Base Columns
## Main Columns

The Cascade Table has 6 base columns:
The Cascade Table has 6 main columns:

| name | description |
|:---------------------|:--------------------------------------------------------------|
Expand All @@ -19,9 +19,9 @@ The Cascade Table has 6 base columns:
| `LookOutLo` | The less significant bits of the lookup output. |
| `LookupMultiplicity` | The number of times the value is looked up by the Hash Table. |

## Extension Columns
## Auxiliary Columns

The Cascade Table has 2 extension columns:
The Cascade Table has 2 auxiliary columns:

- `HashTableServerLogDerivative`, the (running sum of the) logarithmic derivative for the Lookup Argument with the Hash Table.
In every row, the sum accumulates `LookupMultiplicity / (🧺 - Combo)` where 🧺 is a verifier-supplied challenge
Expand Down
18 changes: 9 additions & 9 deletions specification/src/contiguity-of-memory-pointer-regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Analogously to the Op Stack Table, the Jump Stack's memory pointer `jsp` can onl
## Contiguity for RAM Table

The *Contiguity Argument* for the RAM table establishes that all RAM pointer regions start with distinct values.
It is easy to ignore _consecutive_ duplicates in the list of all RAM pointers using one additional base column.
It is easy to ignore _consecutive_ duplicates in the list of all RAM pointers using one additional main column.
This allows identification of the RAM pointer values at the regions' boundaries, $A$.
The Contiguity Argument then shows that the list $A$ contains no duplicates.
For this, it uses [Bézout's identity for univariate polynomials](https://en.wikipedia.org/wiki/Polynomial_greatest_common_divisor#B%C3%A9zout's_identity_and_extended_GCD_algorithm).
Expand All @@ -36,11 +36,11 @@ This implies that all roots of $f_A(X)$ have multiplicity 1, which holds if and

The following columns and constraints are needed for the Contiguity Argument:

- Base column `iord` and two deterministic transition constraints enable conditioning on a changed memory pointer.
- Base columns `bcpc0` and `bcpc1` and two deterministic transition constraints contain and constrain the symbolic Bézout coefficient polynomials' coefficients.
- Extension column `rpp` is a running product similar to that of a conditioned [permutation argument](permutation-argument.md). A randomized transition constraint verifies the correct accumulation of factors for updating this column.
- Extension column `fd` is the formal derivative of `rpp`. A randomized transition constraint verifies the correct application of the product rule of differentiation to update this column.
- Extension columns `bc0` and `bc1` build up the Bézout coefficient polynomials based on the corresponding base columns, `bcpc0` and `bcpc1`.
- Main column `iord` and two deterministic transition constraints enable conditioning on a changed memory pointer.
- Main columns `bcpc0` and `bcpc1` and two deterministic transition constraints contain and constrain the symbolic Bézout coefficient polynomials' coefficients.
- Auxiliary column `rpp` is a running product similar to that of a conditioned [permutation argument](permutation-argument.md). A randomized transition constraint verifies the correct accumulation of factors for updating this column.
- Auxiliary column `fd` is the formal derivative of `rpp`. A randomized transition constraint verifies the correct application of the product rule of differentiation to update this column.
- Auxiliary columns `bc0` and `bc1` build up the Bézout coefficient polynomials based on the corresponding main columns, `bcpc0` and `bcpc1`.
Two randomized transition constraints enforce the correct build-up of the Bézout coefficient polynomials.
- A terminal constraint takes the weighted sum of the running product and the formal derivative, where the weights are the Bézout coefficient polynomials, and equates it to one. This equation asserts the Bézout relation.

Expand All @@ -57,7 +57,7 @@ Columns not needed for establishing memory consistency are not displayed.
| $c$ | 0 | $k$ | $n$ | $(X - a)(X - b)(X - c)$ | $q(X)$ | $jX + k$ | $\ell X^2 + mX + n$ |
| $c$ | - | $k$ | $n$ | $(X - a)(X - b)(X - c)$ | $q(X)$ | $jX + k$ | $\ell X^2 + mX + n$ |

The values contained in the extension columns are undetermined until the verifier's challenge $\alpha$ is known; before that happens it is worthwhile to present the polynomial expressions in $X$, anticipating the substitution $X \mapsto \alpha$. The constraints are articulated relative to `α`.
The values contained in the auxiliary columns are undetermined until the verifier's challenge $\alpha$ is known; before that happens it is worthwhile to present the polynomial expressions in $X$, anticipating the substitution $X \mapsto \alpha$. The constraints are articulated relative to `α`.

The inverse of RAMP difference `iord` takes the inverse of the difference between the current and next `ramp` values if that difference is non-zero, and zero else. This constraint corresponds to two transition constraint polynomials:

Expand Down Expand Up @@ -87,7 +87,7 @@ $$f_\mathsf{bc0}(X) \cdot f_{\mathsf{rp}}(X) + f_\mathsf{bc1}(X) \cdot f_{\maths
The prover finds $f_\mathsf{bc0}(X)$ and $f_\mathsf{bc1}(X)$ as the minimal-degree Bézout coefficients as returned by the extended Euclidean algorithm.
Concretely, the degree of $f_\mathsf{bc0}(X)$ is smaller than the degree of $f_\mathsf{fd}(X)$, and the degree of $f_\mathsf{bc1}(X)$ is smaller than the degree of $f_\mathsf{rp}(X)$.

The (scalar) coefficients of the Bézout coefficient polynomials are recorded in base columns `bcpc0` and `bcpc1`, respectively.
The (scalar) coefficients of the Bézout coefficient polynomials are recorded in main columns `bcpc0` and `bcpc1`, respectively.
The transition constraints for these columns enforce that the value in one such column can only change if the memory pointer `ramp` changes.
However, unlike the conditional update rule enforced by the transition constraints of `rp` and `fd`, the new value is unconstrained.
Concretely, the two transition constraints are:
Expand All @@ -96,7 +96,7 @@ Concretely, the two transition constraints are:
- `(1 - (ramp' - ramp) ⋅ iord) ⋅ (bcpc1' - bcpc1)`

Additionally, `bcpc0` must initially be zero, which is enforced by an initial constraint.
This upper-bounds the degrees of the Bézout coefficient polynomials, which are built from base columns `bcpc0` and `bcpc1`.
This upper-bounds the degrees of the Bézout coefficient polynomials, which are built from main columns `bcpc0` and `bcpc1`.
Two transition constraints enforce the correct build-up of the Bézout coefficient polynomials:

- `(1 - (ramp' - ramp) ⋅ iord) ⋅ (bc0' - bc0) + (ramp' - ramp) ⋅ (bc0' - α ⋅ bc0 - bcpc0')`
Expand Down
10 changes: 5 additions & 5 deletions specification/src/evaluation-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ By the [Schwartz–Zippel lemma](https://en.wikipedia.org/wiki/Schwartz%E2%80%93
In Triton VM, the Evaluation Argument is generally used to show that (parts of) some row appear in two tables in the same order.
To establish this, the prover

- commits to the base column in question,[^2]
- commits to the main column in question,[^2]
- samples a random challenge $\alpha$ through the Fiat-Shamir heuristic,
- computes the _running evaluation_ of $f_A(\alpha)$ and $f_B(\alpha)$ in the respective tables' extension column.
- computes the _running evaluation_ of $f_A(\alpha)$ and $f_B(\alpha)$ in the respective tables' auxiliary column.

For example, in both Table A and B:

| base column | extension column: running evaluation |
| main column | auxiliary column: running evaluation |
|------------:|:-----------------------------------------------------------|
| 0 | $\alpha^1 + 0\alpha^0$ |
| 1 | $\alpha^2 + 0\alpha^1 + 1\alpha^0$ |
Expand All @@ -33,13 +33,13 @@ It is possible to establish a subset relation by skipping over certain elements
The running evaluation must incorporate the same elements in both tables.
Otherwise, the Evaluation Argument will fail.

Examples for subset Evaluation Arguments can be found between the [Hash Table](hash-table.md#extension-columns) and the [Processor Table](processor-table.md#extension-colums).
Examples for subset Evaluation Arguments can be found between the [Hash Table](hash-table.md#auxiliary-columns) and the [Processor Table](processor-table.md#auxiliary-colums).

---

[^1]: This depends on the length $n$ of the lists $A$ and $B$ as well as the field size.
For Triton VM, $n < 2^{32}$.
The polynomials $f_A(X)$ and $f_B(X)$ are evaluated over the extension field with $p^3 \approx 2^{192}$ elements.
The polynomials $f_A(X)$ and $f_B(X)$ are evaluated over the auxiliary field with $p^3 \approx 2^{192}$ elements.
The false positive rate is therefore $n / |\mathbb{F}_{p^3}| \leqslant 2^{-160}$.

[^2]: See “[Compressing Multiple Elements](table-linking.md#compressing-multiple-elements).”
8 changes: 4 additions & 4 deletions specification/src/hash-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ For convenience, this document occasionally refers to those states as if they we
This is an alias for
$(2^{48}\cdot\texttt{state\_i\_highest\_lkin} + 2^{32}\cdot\texttt{state\_i\_mid\_high\_lkin} + 2^{16}\cdot\texttt{state\_i\_mid\_low\_lkin} + \texttt{state\_i\_lowest\_lkin})\cdot R^{-1}$.

## Base Columns
## Main Columns

The Hash Table has 67 base columns:
The Hash Table has 67 main columns:

- The `Mode` indicator, as described above.
It takes value
Expand All @@ -84,9 +84,9 @@ This column is only relevant for mode `sponge`.
- 4 columns `state_i_inv` establishing correct decomposition of `state_0_*_lkin` through `state_3_*_lkin` into 16-bit wide limbs.
- 16 columns `constant_i`, which hold the round constant for the round indicated by `RoundNumber`, or 0 if no round with this round number exists.

## Extension Columns
## Auxiliary Columns

The Hash Table has 20 extension columns:
The Hash Table has 20 auxiliary columns:

- `RunningEvaluationReceiveChunk` for the [Evaluation Argument](evaluation-argument.md) for copying chunks of size $\texttt{rate}$ from the [Program Table](program-table.md).
Relevant for [program attestation](program-attestation.md).
Expand Down
6 changes: 3 additions & 3 deletions specification/src/jump-stack-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Jump Stack Memory contains the underflow from the Jump Stack.

## Base Columns
## Main Columns

The Jump Stack Table consists of 5 columns:
1. the cycle counter `clk`
Expand Down Expand Up @@ -103,9 +103,9 @@ Jump Stack Table:
| 14 | `bar` | 2 | `0xB3` | `0xC0` |
| 15 | `return` | 2 | `0xB3` | `0xC0` |

## Extension Columns
## Auxiliary Columns

The Jump Stack Table has 2 extension columns, `rppa` and `ClockJumpDifferenceLookupClientLogDerivative`.
The Jump Stack Table has 2 auxiliary columns, `rppa` and `ClockJumpDifferenceLookupClientLogDerivative`.

1. A Permutation Argument establishes that the rows of the Jump Stack Table match with the rows in the [Processor Table](processor-table.md).
The running product for this argument is contained in the `rppa` column.
Expand Down
10 changes: 5 additions & 5 deletions specification/src/lookup-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ $$
\sum_{i=0}^\ell \frac{1}{X - a_i} = \sum_{i=0}^n \frac{m_i}{X - b_i}
$$

To compute the sums, the lists $A$ and $B$ are base columns in the two respective tables.
Additionally, the lookup multiplicity is recorded explicitly in a base column of the lookup table.
To compute the sums, the lists $A$ and $B$ are main columns in the two respective tables.
Additionally, the lookup multiplicity is recorded explicitly in a main column of the lookup table.

## Example

In Table A:

| base column A | extension column A: logarithmic derivative |
| main column A | auxiliary column A: logarithmic derivative |
|--------------:|:---------------------------------------------------------------------|
| 0 | $\frac{1}{\alpha - 0}$ |
| 2 | $\frac{1}{\alpha - 0} + \frac{1}{\alpha - 2}$ |
Expand All @@ -86,7 +86,7 @@ In Table A:

And in Table B:

| base column B | multiplicity | extension column B: logarithmic derivative |
| main column B | multiplicity | auxiliary column B: logarithmic derivative |
|--------------:|-------------:|:---------------------------------------------------------------------|
| 0 | 1 | $\frac{1}{\alpha - 0}$ |
| 1 | 1 | $\frac{1}{\alpha - 0} + \frac{1}{\alpha - 1}$ |
Expand All @@ -96,7 +96,7 @@ It is possible to establish a subset relation by skipping over certain elements
The logarithmic derivative must incorporate the same elements with the same multiplicity in both tables.
Otherwise, the Lookup Argument will fail.

An example for a Lookup Argument can be found between the [Program Table](program-table.md) and the [Processor Table](processor-table.md#extension-colums).
An example for a Lookup Argument can be found between the [Program Table](program-table.md) and the [Processor Table](processor-table.md#auxiliary-colums).

---

Expand Down
8 changes: 4 additions & 4 deletions specification/src/lookup-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Correct creation of the Lookup Table is guaranteed through a public-facing [Eval
after sampling some challenge $X$, the verifier computes the terminal of the Evaluation Argument over the list of all the expected lookup values with respect to challenge $X$.
The equality of this verifier-supplied terminal against the similarly computed, in-table part of the Evaluation Argument is checked by the Lookup Table's terminal constraint.

## Base Columns
## Main Columns

The Lookup Table has 4 base columns:
The Lookup Table has 4 main columns:

| name | description |
|:---------------------|:--------------------------------------------|
Expand All @@ -20,9 +20,9 @@ The Lookup Table has 4 base columns:
| `LookOut` | The lookup output. |
| `LookupMultiplicity` | The number of times the value is looked up. |

## Extension Columns
## Auxiliary Columns

The Lookup Table has 2 extension columns:
The Lookup Table has 2 auxiliary columns:

- `CascadeTableServerLogDerivative`, the (running sum of the) logarithmic derivative for the Lookup Argument with the Cascade Table.
In every row, accumulates the summand `LookupMultiplicity / Combo` where `Combo` is the verifier-weighted combination of `LookIn` and `LookOut`.
Expand Down
6 changes: 3 additions & 3 deletions specification/src/operational-stack-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The sole task of the Op Stack Table is to keep underflow memory immutable.
To achieve this, any read or write accesses to the underflow memory are recorded in the Op Stack Table.
Read and write accesses to op stack underflow memory are a side effect of shrinking or growing the op stack.

## Base Columns
## Main Columns

The Op Stack Table consists of 4 columns:
1. the cycle counter `clk`
Expand Down Expand Up @@ -100,9 +100,9 @@ Operational Stack Table:
| 8 | 1 | 10 | 44 |


## Extension Columns
## Auxiliary Columns

The Op Stack Table has 2 extension columns, `rppa` and `ClockJumpDifferenceLookupClientLogDerivative`.
The Op Stack Table has 2 auxiliary columns, `rppa` and `ClockJumpDifferenceLookupClientLogDerivative`.

1. A Permutation Argument establishes that the rows of the Op Stack Table correspond to the rows of the [Processor Table](processor-table.md).
The running product for this argument is contained in the `rppa` column.
Expand Down
12 changes: 6 additions & 6 deletions specification/src/permutation-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ By the [Schwartz–Zippel lemma](https://en.wikipedia.org/wiki/Schwartz%E2%80%93
In Triton VM, the Permutation Argument is generally applied to show that the rows of one table appear in some other table without enforcing the rows' order in relation to each other.
To establish this, the prover

- commits to the base column in question,[^2]
- commits to the main column in question,[^2]
- samples a random challenge $\alpha$ through the Fiat-Shamir heuristic,
- computes the _running product_ of $f_A(\alpha)$ and $f_B(\alpha)$ in the respective tables' extension column.
- computes the _running product_ of $f_A(\alpha)$ and $f_B(\alpha)$ in the respective tables' auxiliary column.

For example, in Table A:

| base column A | extension column A: running product |
| main column A | auxiliary column A: running product |
|--------------:|:---------------------------------------------------|
| 0 | $(\alpha - 0)$ |
| 1 | $(\alpha - 0)(\alpha - 1)$ |
Expand All @@ -31,7 +31,7 @@ For example, in Table A:

And in Table B:

| base column B | extension column B: running product |
| main column B | auxiliary column B: running product |
|--------------:|:---------------------------------------------------|
| 2 | $(\alpha - 2)$ |
| 1 | $(\alpha - 2)(\alpha - 1)$ |
Expand All @@ -42,13 +42,13 @@ It is possible to establish a subset relation by skipping over certain elements
The running product must incorporate the same elements in both tables.
Otherwise, the Permutation Argument will fail.

An example of a subset Permutation Argument can be found between the [U32 Table](u32-table.md#extension-columns) and the [Processor Table](processor-table.md#extension-colums).
An example of a subset Permutation Argument can be found between the [U32 Table](u32-table.md#auxiliary-columns) and the [Processor Table](processor-table.md#auxiliary-colums).

---

[^1]: This depends on the length $n$ of the lists $A$ and $B$ as well as the field size.
For Triton VM, $n < 2^{32}$.
The polynomials $f_A(X)$ and $f_B(X)$ are evaluated over the extension field with $p^3 \approx 2^{192}$ elements.
The polynomials $f_A(X)$ and $f_B(X)$ are evaluated over the auxiliary field with $p^3 \approx 2^{192}$ elements.
The false positive rate is therefore $n / |\mathbb{F}_{p^3}| \leqslant 2^{-160}$.

[^2]: See “[Compressing Multiple Elements](table-linking.md#compressing-multiple-elements).”
Loading

0 comments on commit 07fdf15

Please sign in to comment.