Rational hitting lists: the model #
Noncommutative rational formulas are formulas (Cslib.Circuits.Formula) over the signature
ratSignature of rational constants, addition, ordered multiplication and inversion. They are
evaluated relationally in any ring with a rational structure map: an inverse node requires an
actual two-sided inverse of its operand's value, so evaluation is partial. A formula is
admissible if some substitution of square rational matrices of positive dimension lies in its
domain, and nonzero if some such substitution yields a nonzero value. A finite list of matrix
substitutions hits the formulas of node count at most s if every admissible nonzero such
formula has an invertible value at some substitution on the list.
The node count of a formula, the source's size measure, counts every syntax-tree node: input
leaves, constants and operations (Formula.nodeCount, the native gate count Formula.size plus
the leaf count Formula.leafSize).
Main definitions #
Cslib.Circuits.Rational.ratSignature,Cslib.Circuits.Rational.Formula: the signature and the formulas, with constructorsFormula.var,Formula.const,Formula.add,Formula.mul,Formula.invand the induction principleFormula.inductionOn.Cslib.Circuits.Rational.Formula.nodeCount: the number of syntax-tree nodes.Cslib.Circuits.Rational.Formula.Eval: partial evaluation as a relation.Cslib.Circuits.Rational.Evaluates,Cslib.Circuits.Rational.Admissible,Cslib.Circuits.Rational.Nonzero: evaluation on rational matrices, and its domain and support.Cslib.Circuits.Rational.Output,Cslib.Circuits.Rational.encodeOutput: lists of matrix substitutions of a common positive dimension and their binary encoding.Cslib.Circuits.Rational.Hits: the hitting property.
Main results #
Cslib.Circuits.Rational.Formula.eval_add_iffand its siblings: evaluation unfolds along the constructors.
References #
Instances For
The signature of rational formulas: constants are nullary, addition and multiplication are binary, and inversion is unary.
Instances For
A noncommutative rational formula over n variables and rational constants.
Instances For
The input variable i.
Instances For
The rational constant q.
Instances For
The sum of two formulas.
Instances For
The ordered product of two formulas.
Instances For
The inverse of a formula.
Instances For
Induction on rational formulas, with one case for each constructor.
The number of syntax-tree nodes, counting input leaves, constants and operations alike: the
operation nodes Formula.size together with the input leaves Formula.leafSize.
Instances For
f.Eval c X v: the formula f is defined at the substitution X in the ring R, with
rational constants interpreted by c, and has the value v. An inverse node requires an actual
two-sided inverse of the value of its operand, not a totalized inverse.
Instances For
Square rational matrices of the specified dimension.
Instances For
A matrix substitution for every input variable.
Instances For
Some positive-dimensional rational matrix substitution is in the formula's domain.
Instances For
Some positive-dimensional rational matrix substitution has a defined nonzero value.
Instances For
A finite list of matrix substitutions, all of one common positive dimension.
- dimension : ℕ
Common dimension of all matrix tuples.
Exclude the trivial zero-dimensional matrix ring.
The finite list of matrix substitutions, in output order.
Instances For
Little-endian unsigned binary, prefixed by a unary bit-length and a zero terminator. This is a self-delimiting binary encoding, including zero.