Documentation

CslibFrontier.Computability.WordRAM.NativeDegree

Word-RAM primitives with explicit degrees #

WordRAM.Native certifies each primitive of a word-RAM basis in polynomial time of unnamed degree. Here the primitives get explicit degrees: on a unary word size and binary operands, the literal check, the eq/lt tests, address extraction and the move and label checks all run in quadratic time and space with output of linear length, and so do checked addition and truncated subtraction. The fits test v < 2 ^ w compares the bit length of v with w in unary, without forming 2 ^ w.

Basis.nativePrimitivesOfDegree assembles a primitive bundle of degree d ≥ 2 from degree-d certificates for the operations of a basis; Basis.additive.quadraticPrimitives is the instance with d = 2. The other bases need degree certificates for multiplication, division, remainder, the bitwise operations and the shifts, which the machine library does not yet supply except for multiplication.

Main definitions #

Main results #

The fits test v < 2 ^ w is quadratic on a unary width and a binary value. It compares the bit length of v with w.

The word-RAM tests (eq, lt and the faulting test) are quadratic.

The primitive bundle of a basis from degree-d certificates for its checked operations, d ≥ 2; the literal, test, address, move and label primitives are quadratic.

The quadratic primitive bundle of the additive basis.

Every primitive of the additive basis is quadratic.