diff --git a/specification/src/operational-stack-table.md b/specification/src/operational-stack-table.md index a5fdd0d43..0b4b2f5b9 100644 --- a/specification/src/operational-stack-table.md +++ b/specification/src/operational-stack-table.md @@ -121,7 +121,7 @@ The template row is inserted below the last row until the desired padded height Memory-consistency follows from two more primitive properties: 1. Contiguity of regions of constant memory pointer. - Since the memory pointer for the Op Stack table, `osp` can change by at most one per cycle, it is possible to enforce a full sorting using AIR constraints. + Since in Op Stack Table, the `stack_pointer` can change by at most one per cycle, it is possible to enforce a full sorting using AIR constraints. 2. Correct inner-sorting within contiguous regions. Specifically, the rows within each contiguous region of constant memory pointer should be sorted for clock cycle. This property is established by the clock jump difference [Lookup Argument](lookup-argument.md). @@ -135,18 +135,16 @@ Both types of challenges are X-field elements, _i.e._, elements of $\mathbb{F}_{ ## Initial Constraints -1. `clk` is 0 -1. `osv` is 0. -1. `osp` is the number of available stack registers, _i.e._, 16. -1. The running product for the permutation argument with the Processor Table `rppa` starts off having accumulated the first row with respect to challenges 馃崑, 馃崐, 馃崏, and 馃珤 and indeterminate 馃. +1. The `stack_pointer` is the number of available stack registers, _i.e._, 16. +1. If the row is not a padding row, the running product for the permutation argument with the Processor Table `rppa` starts off having accumulated the first row with respect to challenges 馃崑, 馃崐, 馃崏, and 馃珤 and indeterminate 馃. + Otherwise, it is the Permutation Argument's default initial, _i.e._, 1. 1. The logarithmic derivative for the clock jump difference lookup `ClockJumpDifferenceLookupClientLogDerivative` is 0. ### Initial Constraints as Polynomials -1. `clk` -1. `osv` -1. `osp - 16` -1. `rppa - (馃 - 馃崑路clk - 馃崐路ib1 - 馃崏路osp - 馃珤osv)` +1. `stack_pointer - 16` +1. `(shrink_stack - 2)路(rppa - (馃 - 馃崑路clk - 馃崐路shrink_stack - 馃崏路stack_pointer - 馃珤路first_underflow_element))`
+ `+ (shrink_stack - 0)路(shrink_stack - 1)路(rppa - 1)` 1. `ClockJumpDifferenceLookupClientLogDerivative` ## Consistency Constraints @@ -155,30 +153,36 @@ None. ## Transition Constraints -1. - - the `osp` increases by 1, *or* - - the `osp` does not change AND the `osv` does not change, *or* - - the `osp` does not change AND the shrink stack indicator `shrink_stack` is 1. -1. The running product for the permutation argument with the Processor Table `rppa` absorbs the next row with respect to challenges 馃崑, 馃崐, 馃崏, and 馃珤 and indeterminate 馃. -1. If the op stack pointer `osp` does not change, then the logarithmic derivative for the clock jump difference lookup `ClockJumpDifferenceLookupClientLogDerivative` accumulates a factor `(clk' - clk)` relative to indeterminate 馃獮. - Otherwise, it remains the same. +1. - the `stack_pointer` increases by 1, *or* + - the `stack_pointer` does not change AND the `first_underflow_element` does not change, *or* + - the `stack_pointer` does not change AND the shrink stack indicator `shrink_stack` in the next row is 0. +1. If thex next row is not a padding row, the running product for the permutation argument with the Processor Table `rppa` absorbs the next row with respect to challenges 馃崑, 馃崐, 馃崏, and 馃珤 and indeterminate 馃. + Otherwise, the running product remains unchanged. +1. If the current row is a padding row, then the next row is a padding row. +1. If the next row is not a padding row and the op stack pointer `stack_pointer` does not change, then the logarithmic derivative for the clock jump difference lookup `ClockJumpDifferenceLookupClientLogDerivative` accumulates a factor `(clk' - clk)` relative to indeterminate 馃獮. + Otherwise, it remains the unchanged. Written as Disjunctive Normal Form, the same constraints can be expressed as: -1. - - the `osp` increases by 1 or the `osp` does not change - - the `osp` increases by 1 or the `osv` does not change or the shrink stack indicator `shrink_stack` is 1 -1. `rppa' = rppa路(馃 - 馃崑路clk' - 馃崐路ib1' - 馃崏路osp' - 馃珤osv')` -1. - the `osp` changes or the logarithmic derivative accumulates a summand, and - - the `osp` does not change or the logarithmic derivative does not change. +1. The `stack_pointer` increases by 1 or the `stack_pointer` does not change. +1. The `stack_pointer` increases by 1 or the `first_underflow_element` does not change or the shrink stack indicator `shrink_stack` in the next row is 0. +1. - The next row is a padding row or `rppa` has accumulated the next row, and + - the next row is not a padding row or `rppa` remains unchanged. +1. The current row is not a padding row or the next row is a padding row. +1. - the `stack_pointer` changes or the next row is a padding row or the logarithmic derivative accumulates a summand, + - the `stack_pointer` remains unchanged or the logarithmic derivative remains unchanged, and + - the next row is not a padding row or the logarithmic derivative remains unchanged. ### Transition Constraints as Polynomials -1. `(osp' - (osp + 1))路(osp' - osp)` -1. `(osp' - (osp + 1))路(osv' - osv)路(1 - shrink_stack)` -1. `rppa' - rppa路(馃 - 馃崑路clk' - 馃崐路ib1' - 馃崏路osp' - 馃珤osv')` -1. `(osp' - (osp + 1))路((ClockJumpDifferenceLookupClientLogDerivative' - ClockJumpDifferenceLookupClientLogDerivative) 路 (馃獮 - clk' + clk) - 1)`
- `+ (osp' - osp)路(ClockJumpDifferenceLookupClientLogDerivative' - ClockJumpDifferenceLookupClientLogDerivative)` +1. `(stack_pointer' - stack_pointer - 1)路(stack_pointer' - stack_pointer)` +1. `(stack_pointer' - stack_pointer - 1)路(first_underflow_element' - first_underflow_element)路(shrink_stack' - 0)` +1. `(shrink_stack' - 2)路(rppa' - rppa路(馃 - 馃崑路clk' - 馃崐路shrink_stack' - 馃崏路stack_pointer' - 馃珤first_underflow_element'))`
+ `+ (shrink_stack' - 0)路(shrink_stack' - 1)路(rppa' - rppa)` +1. `(shrink_stack - 0)路(shrink_stack - 1)路(shrink_stack' - 2)` +1. `(stack_pointer' - stack_pointer - 1)路(shrink_stack' - 2)路((ClockJumpDifferenceLookupClientLogDerivative' - ClockJumpDifferenceLookupClientLogDerivative) 路 (馃獮 - clk' + clk) - 1)`
+ `+ (stack_pointer' - stack_pointer)路(ClockJumpDifferenceLookupClientLogDerivative' - ClockJumpDifferenceLookupClientLogDerivative)`
+ `+ (shrink_stack' - 0)路(shrink_stack' - 1)路(ClockJumpDifferenceLookupClientLogDerivative' - ClockJumpDifferenceLookupClientLogDerivative)` ## Terminal Constraints