List programs and evaluation equivalences for the integer lift tables #
At every grid point the executable generator materializes the integer lift matrices
Rational.Generator.integralLift, built from the integer Taylor test matrices
Rational.IntegralTest.padded and the signed-monomial formula Rational.IntegralLift.entry.
Those definitions are indexed by Fin and ZMod with a type-level modulus, and use Nat.choose.
This file restates them as ordinary programs on natural numbers, integers and lists of rows, and
proves that they compute the landed matrix definitions:
- the coefficients of
(X + c) ^ kare computed bykshift-and-add steps (coeffRow), with no division; - the Taylor test matrix is a list of rows of sums over
List.range M(testRows); - every lift entry is a double sum over
List.range MofM ^ 2terms (liftEntry,liftTable,liftRows). The original formula sums over three residues; the residueβis forced to beu - v, so that sum is dropped.
Magnitude bounds, bit-length budgets, and polynomial-time Turing machine certificates for these list
programs are proved in Complexity/Computability/Circuit/Rational/Runtime/Lift.lean.
Main definitions #
Cslib.Circuits.Rational.shiftAddRow,Cslib.Circuits.Rational.coeffRow,Cslib.Circuits.Rational.coeffRows: the coefficients of(X + c) ^ k, by repeated shift-and-add.Cslib.Circuits.Rational.testTerm,Cslib.Circuits.Rational.testTerms,Cslib.Circuits.Rational.testEntry,Cslib.Circuits.Rational.testRows: the integer Taylor test matrix as a list of rows.Cslib.Circuits.Rational.signedCoeff,Cslib.Circuits.Rational.liftTerm,Cslib.Circuits.Rational.liftTerms,Cslib.Circuits.Rational.liftSums,Cslib.Circuits.Rational.liftEntry: the signed coefficient of the cyclotomic regular representation, and the terms and entries of the integer lift.Cslib.Circuits.Rational.liftTable,Cslib.Circuits.Rational.liftRows: one integer lift matrix, and all of them at a grid point.
Main results #
Cslib.Circuits.Rational.getD_coeffRow,Cslib.Circuits.Rational.getD_coeffRow_eq:coeffRowcomputes the coefficients of(X + C c) ^ k.Cslib.Circuits.Rational.testEntry_eq,Cslib.Circuits.Rational.testRows_eq:testRows M N a t = rowsOf (IntegralTest.padded M N a t).Cslib.Circuits.Rational.liftEntry_eq: the double sum computesIntegralLift.entry.Cslib.Circuits.Rational.liftTable_eq,Cslib.Circuits.Rational.liftRows_eq,Cslib.Circuits.Rational.liftRows_eq_inputTables: the lift tables are the rows ofGenerator.integralLift, and of the executable generator'sinputTables.
References #
- The index bridges and the forms of
signedCoeff,testTermand the lift sum are adapted from OpenAI's formalization [OAI26a] at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a (files lean/OAI/Computability/RationalHitting/TaylorComputation.lean and LiftComputation.lean), via the complexitylib port [Sch26d] at revision add0aca8ee0d71e68969f2cb45cf91554a50f787.
Index bridges #
A sum over List.range m is a sum over Fin m.
A sum over List.range m is a sum over the residues modulo m.
The residue of the row-major block coordinate is the quotient by the degree.
The position inside the block of the row-major block coordinate is the remainder.
Lists of rows #
Coefficient rows #
coeffRow computes the coefficients of (X + C c) ^ k.
The integer Taylor test matrix #
The summand q of entry (u, v) of the integer Taylor test matrix: coefficient u of
(X - a) ^ (M - 1 - q) times coefficient q of (X + a) ^ v times t ^ q, read from the
coefficient rows minus and plus.
Instances For
The list program computes the integer Taylor test matrix.
The Taylor rows, read at residues, are the residue-indexed Generator.integerTest.
The integer lift #
The signed coefficient of the cyclotomic regular representation on natural numbers:
CyclotomicRing.signedEntry with the residue replaced by its value.
Instances For
The term (α, κ) of entry ((u, i), (v, j)) of the integer lift with test matrix T, with
M residues and cyclotomic degree Dg. The residue β of IntegralLift.entry is forced to be
u - v, which is (u + M - v) % M; κ - β and α * (u - κ) are computed likewise.
Instances For
The double sum computes the integer lift formula, for any list of rows that agrees with the test matrix at residues.
The integer lift entry of Generator.integralLift, on the residues of the test rows.
The entries of a lift table are the entries of Generator.integralLift.
The list program computes Generator.integralLift.
The list program computes all integer lift matrices at a grid point.
The list program computes the executable generator's dense input tables.