Rational hitting lists: affine realizations #
Every rational formula f has a linear realization: a square matrix Formula.pencil f of affine
forms in the variables, indexed by a finite type Formula.Index f with f.nodeCount + 1
elements, together with a rational row and column. Wherever f is defined, the evaluated pencil
is invertible and the row, inverse and column multiply to the value of f. Conversely, f is
defined with an invertible value exactly when the pencils of its inverse nodes and of its
augmented root are invertible (Formula.certificates_iff); no rational cancellation is performed.
Main definitions #
Cslib.Circuits.Rational.Affine.Form,Cslib.Circuits.Rational.Affine.eval: affine forms and their evaluation.Cslib.Circuits.Rational.Formula.Index,Cslib.Circuits.Rational.Formula.pencil,Cslib.Circuits.Rational.Formula.row,Cslib.Circuits.Rational.Formula.col: the realization.Cslib.Circuits.Rational.Formula.inverseNodes,Cslib.Circuits.Rational.Formula.certificates: the inverse occurrences of a formula, and these together with the augmented root.
Main results #
Cslib.Circuits.Rational.Formula.card_index: the realization hasf.nodeCount + 1rows.Cslib.Circuits.Rational.Formula.Eval.realization: exact realization of defined formulas.Cslib.Circuits.Rational.Formula.certificates_iff: invertible certificate pencils are equivalent to a defined invertible value.Cslib.Circuits.Rational.Formula.certificate_bounds: the number and sizes of the certificates.
References #
A constant coefficient and one rational coefficient per variable.
Instances For
The affine form with the given constant and zero variable coefficients.
Instances For
The affine coordinate form for one variable.
Instances For
The realization is defined by recursion on the native constructors input and gate, so that
its index type reduces to sums of the index types of the arguments args j. The proofs below
therefore also proceed by induction on the native constructors.
The finite row and column index type of the formula's linear realization.
Instances For
The index type of a realization has decidable equality.
The realization of a formula has one more row than the formula has nodes.
The affine matrix pencil built recursively from a rational formula.
Instances For
Exact affine realization of every defined formula: the evaluated pencil is invertible, and the row, its inverse and the column multiply to the value.
A formula with at most s nodes has at most s + 1 certificates, each of dimension at most
2 * s + 1.
Reindexing a pencil's coefficients does not alter its matrix evaluation.
Homogeneous affine coefficients give exactly the ordinary Kronecker pencil.