Documentation

CslibFrontier.Computability.Circuit.Rational

Rational hitting lists, nonzeroness, and admissibility #

A noncommutative rational formula is nonzero if it has a defined nonzero value at some substitution of square rational matrices of positive dimension, and admissible if it is defined at some such substitution. For all n and s there is an explicit, executable list of substitutions of rational matrices, of dimension and encoding length polynomial in n + s, at which every admissible nonzero formula in n variables with at most s nodes takes an invertible value somewhere (hittingList_hits). The construction is OpenAI's.

The list yields executable tests for nonzeroness and admissibility, by exact rational matrix evaluation. The admissibility test needs a list for two extra syntax nodes: if f has a defined value, either f or f + 1 has a nonzero value. The correctness theorems do not assert polynomial bit complexity of formula evaluation. The tests are deductions from the source result, without a claim of new priority. The generator's running time is bounded in CslibFrontier.Computability.Circuit.Rational.Runtime: Cslib.Circuits.Rational.hittingList_polytime computes the encoding encodeOutput (hittingList n s) tidily in polynomial time from unary (n, s).

Main definitions #

Main results #

References #

The explicit, executable list of rational matrix substitutions.

Every list hits the formulas with at most 0 nodes, since every formula has a node.

The generated list hits every admissible nonzero formula with at most s nodes at an invertible value. This holds for all n and s; for s = 0 it is hits_zero.

The generated matrices have polynomially bounded dimension.

The complete reduced-rational binary encoding has polynomial length, for all n and s, including n = 0. The constant PolynomialBounds.outputConstant differs from the source's, which assumes 1 ≤ n: covering n = 0 raises the grid-size coefficient from 24577 to 49153.

Some matrix evaluation of the inverse is defined exactly when the formula is nonzero.

theorem Cslib.Circuits.Rational.Admissible.exists_dimension_le {n : ℕ} {f : Formula n} (hf : Admissible f) :
∃ (d : ℕ), 0 < d ∧ d ≤ 256 * (n + Formula.nodeCount f + 3) ^ 10 ∧ ∃ (X : Tuple n d) (v : Mat d), Evaluates f X v

Every nonempty matrix domain has a witness of polynomially bounded dimension.

Test whether the formula has a defined positive-dimensional rational matrix evaluation, by exact evaluation on the hitting list for f.nodeCount + 2 nodes: the two extra nodes cover f + 1, which is nonzero wherever f is defined and zero.

Test whether the formula has a defined nonzero rational matrix evaluation, by searching the hitting list for f.nodeCount + 2 nodes for an invertible value. A list for f.nodeCount nodes would suffice for this test; the same list as for Formula.admissible? is used.

The generated finite domain test is correct, with no promise on the formula. It uses that the list hits formulas with f.nodeCount + 2 nodes.

The generated finite nonzeroness test is correct, with no admissibility promise. It uses only that the list hits formulas with f.nodeCount nodes.

@[instance_reducible]

Computed decidability of the existence of a defined matrix evaluation.

@[instance_reducible]

Computed decidability of the existence of a defined nonzero matrix evaluation.