Finite-word row-major scan of all Bethe floor constraints #
The scan keeps unary row and column counters, a one-bit found flag, a one-bit
done flag, and the immutable input payload. It examines the recovered
(m+1)-by-(m+1) matrix in row-major order and freezes at the first strict
floor violation. Its iteration ruler is constructed, in polynomial time,
as exactly (m+1)^2 unary bits on canonical inputs.
Input and state layout #
Extracts the unary dimension parameter from the floor-scan input.
Equations
Instances For
Extracts the paired threshold and coordinate vector from the floor-scan input.
Equations
Instances For
Extracts the encoded rational floor threshold from the scan input.
Equations
Instances For
Extracts the encoded rational coordinate vector from the scan input.
Equations
Instances For
Encodes a floor-scan state as row, column, found flag, done flag, and input payload.
Equations
- BeyondBethe.machineBetheFloorScanPack row column found done payload = Complexity.pair row (Complexity.pair column (Complexity.pair found (Complexity.pair done payload)))
Instances For
Extracts the current unary row index from the floor-scan state.
Equations
Instances For
Extracts the current unary column index from the floor-scan state.
Equations
Instances For
Extracts the flag recording discovery of an entry below the floor threshold.
Equations
Instances For
Extracts the flag recording completion of the floor scan.
Equations
Instances For
Extracts the original scan input stored in the state.
Equations
Instances For
Reads the unary dimension parameter from the state's stored input.
Equations
Instances For
Reads the rational floor threshold from the state's stored input.
Equations
Instances For
Reads the rational coordinate vector from the state's stored input.
Equations
Instances For
Tests whether the current row ruler equals the dimension ruler, marking the last row.
Equations
Instances For
Pairs the floor threshold with the current affine-entry query.
Equations
Instances For
Tests whether the current affine matrix entry violates the floor constraint.
Equations
Instances For
Increments the current unary row index by appending one bit.
Equations
Instances For
Increments the current unary column index by appending one bit.
Equations
Instances For
Exact polynomial iteration ruler #
Computes binary bits for the length of the input's dimension ruler.
Equations
Instances For
Computes binary bits for one plus the dimension-ruler length.
Equations
Instances For
Supplies the binary-multiplication width bound used to construct the scan ruler.
Equations
Instances For
Converts the square of the matrix order to a unary iteration ruler within the guard bound.
Equations
Instances For
Applies the binary-multiplication width bound twice to bound encoded scan components.
Equations
Instances For
Runs the floor-scan step for the number of iterations specified by its unary ruler.
Equations
Instances For
The public result is a found bit followed by the unary row and column of the first violation. When the bit is false the two counters are ignored.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Polynomial-time closure #
A global state envelope for the Cobham iteration #
Canonical ruler semantics #
Exact state semantics on canonical inputs #
Typed semantic state mirrored by the finite-word scan.
Current row of the affine matrix, whose indices range from zero through
m.Current column of the affine matrix, whose indices range from zero through
m.- found : Bool
Records whether the scan has found an entry below the floor threshold.
- done : Bool
Records whether the scan has examined all matrix entries without stopping at a violation.
Instances For
Initializes the semantic floor scan at the first matrix entry with both flags false.
Equations
Instances For
Scans one affine matrix entry in row-major order, stopping at a floor violation or completion.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encodes a semantic scan state with unary indices, Boolean flags, and its canonical input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs the semantic scan for (m + 1)^2 steps, enough to examine every matrix entry.
Equations
- BeyondBethe.finalBetheFloorScanSemanticState delta y = (BeyondBethe.betheFloorScanSemanticStep delta y)^[(m + 1) * (m + 1)] (BeyondBethe.betheFloorScanSemanticInit m)
Instances For
Encodes the found flag and the row and column at which the semantic scan stopped.
Equations
- BeyondBethe.betheFloorScanSemanticResultCode state = Complexity.pair [state.found] (Complexity.pair (List.replicate (↑state.row) true) (List.replicate (↑state.column) true))
Instances For
Mathematical correctness of the row-major semantic scan #
Records either the first violating entry, successful completion, or the next unchecked ordinal.
Equations
- One or more equations did not get rendered due to their size.