Complexity proof syntax
This is a syntax proposal. The current checker implements the machine declarations and guard rule described in the specification.
Clocked behavior
predicate accepts_within(machine: Machine, input: BitStrings, deadline: NaturalNumbers):
run(machine, initial(machine, input), deadline).control == accepted
theorem preserves_guard(machine: Machine, certificate: GuardCertificate):
forall configuration: MachineConfiguration,
holds(certificate, configuration) implies
holds(certificate, step(machine, configuration))
proof:
exact transition_cases(machine, certificate)
The definition uses absorbing halts, so acceptance at index deadline
means the machine accepted by that step. proof names an explicit term.
A checker would verify that the term has the stated proposition.
Fixed polynomial bounds
record PolynomialBound:
coefficient: PositiveNumbers
exponent: NaturalNumbers
function bound(polynomial: PolynomialBound, bits: NaturalNumbers) -> NaturalNumbers:
return polynomial.coefficient * (bits + 2) ^ polynomial.exponent
predicate verifies(language: Language, verifier: Machine, size: PolynomialBound, time: PolynomialBound):
forall input: BitStrings,
member(language, input) iff
exists witness: BitStrings where bit_length(witness) <= bound(size, bit_length(input)),
accepts_within(verifier, pair(input, witness), bound(time, bit_length(input)))
predicate has_polynomial_verifier(language: Language):
exists verifier: Machine, size: PolynomialBound, time: PolynomialBound,
verifies(language, verifier, size, time)
The last declaration defines the proposed verifier property. The deadline
and witness polynomials are chosen once before quantifying over
inputs. pair must have an explicit binary encoding, with its construction
and simulation costs accounted for. An additional claim can bound work for
all attempted witnesses if the verifier interface requires it.
Sugar and its expansion
| Syntax | Core form |
|---|---|
x <= y |
less_or_equal(x, y) |
a * (n + 2) ^ k |
multiply(a, power(add(n, 2), k)) |
x.field |
The record’s typed field projection applied to x |
exists x: T where R(x), P(x) |
exists x: T, both(R(x), P(x)) |
forall x: T where R(x), P(x) |
forall x: T, implies(R(x), P(x)) |
p iff q |
both(implies(p, q), implies(q, p)) |
Arithmetic binds tighter than comparisons, and comparisons bind tighter than logical connectives. Parentheses can make the core grouping explicit. Sugar preserves source positions on the generated terms.