Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.PolyTime.Matrix.Binary

Polynomial-time access to binary matrix words #

Rows and columns are supplied at runtime in unary. Entries are decoded from arbitrary raw words, padding missing bits with false. The result uses binary natural encoding, so no conversion to a unary value is required.

Main results #

theorem Turing.MultiTapeTM.ComputableInPolyTime.matrixBinaryEntry {α : Type} {input : α ↪ List Bool} {cols width row col : α → ℕ} {word : α → List Bool} (_hcols : ComputableInPolyTime cols input encUnary) (hwidth : ComputableInPolyTime width input encUnary) (hword : ComputableInPolyTime word input encBits) (_hrow : ComputableInPolyTime row input encUnary) (_hcol : ComputableInPolyTime col input encUnary) :
ComputableInPolyTime (fun (a : α) => Cslib.Matrix.binaryEntry (cols a) (width a) (word a) (row a) (col a)) input encNat

Read a fixed-width matrix entry from an arbitrary computed word. Dimensions and indices are efficient unary values; the entry is returned in binary.