Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.BinaryDigitsPolyTime

Computing binary-digit tensor entries in polynomial time #

The evaluator reads a natural table entry at the little-endian index of its port word and returns its binary digits as natural coefficients. The table values and the index are in binary; out-of-range indices return zero. Together with polynomial-time Horner evaluation at 2, this supplies the input and output maps for exact natural counting through truncated contraction.

Main results #

One more than the encoded length of all table entries. It is a positive uniform bound on every entry's bit length, and can be computed from the explicit input.

The automatic table bound is positive, including when there are no entries.

Every stored natural has bit length at most the automatic bound.

theorem Cslib.Circuits.Frontier.ExplicitTensorNetwork.binaryTableBound_le {G : ExplicitTensorNetwork ℕ} {M W : ℕ} (hM : ∀ v ∈ G.vertices, v.2.length ≤ M) (hW : ∀ v ∈ G.vertices, ∀ n ∈ v.2, n.size ≤ W) :

A table-length bound and an entry-bit bound control the entire encoded table list.