An LRUP (RUP-only LRAT) checker on the word RAM: correctness and running time #
This file proves the main theorem about the word-RAM LRUP (RUP-only LRAT) checker
(Cslib.Algorithms.WordRAM.LRAT.program): on the input encode φ cert it halts with output 1
exactly when Cslib.Logic.PL.CNF.checkLRUP φ cert = true, and otherwise with 0, within
60 L + 20 W + 21 instructions, where L is the length of the input and W is the total length
of the clauses that the hints of the certificate name (Cslib.Algorithms.WordRAM.LRAT.certWork).
It checks the RUP-only fragment of LRAT and rejects RAT steps (full LRAT with RAT steps
CNF.checkLRATRat is not checked here). Since each hint names a clause of the database, W is at
most the number of hints times the length of the longest clause of the database, so the run also
takes at most 80 (F + C · max 1 w) + 81 instructions, where F and C are the numbers of words
encoding the formula and the certificate, and w is that width. The certificate is measured in
encoded words: a RAT step, which the checker rejects, is encoded by its tag alone, however large
its contents.
Main definitions #
Cslib.Algorithms.WordRAM.LRAT.certWork: the total length of the hinted clauses.Cslib.Algorithms.WordRAM.LRAT.dbWidth: the length of the longest clause of the formula or of a RUP step, which bounds every clause of the database.
Main results #
Cslib.Algorithms.WordRAM.LRAT.program_spec: correctness againstCNF.checkLRUPand the instruction bound.Cslib.Algorithms.WordRAM.LRAT.program_spec_dbWidth: correctness and the coarser bound80 (F + C · max 1 w) + 81.Cslib.Algorithms.WordRAM.LRAT.certWork_le,Cslib.Algorithms.WordRAM.LRAT.lrupHintCount_le_length_stepWords: the hinted clauses have total length at mostlrupHintCount · dbWidth, and there are at most as many hints as words encoding the certificate.
The database of the formula #
The numbered clauses of ψ, numbered from j.
The database checkLRUP starts from.
Recording the address a of the encoding of c under a new number i appends (i, c) to
the database.
Loading the formula #
The loading loop records the clauses ψ at ptr under the numbers that follow the
clauses done already recorded.
The checker #
The total length of the clauses that the hints of cert name, in the database of each
step.
The word size the checker needs on the input encode φ cert: the input's addresses, and
twice its largest word, fit.
The LRUP (RUP-only LRAT) checker leaves checkLRUP φ cert in out, within
60 L + 20 W + 20 instructions on an input of length L whose hinted clauses have total length
W.
The LRUP (RUP-only LRAT) checker on the word RAM. At any word size w that fits
wordBound φ cert, the program run on the input encode φ cert of length L halts with output
1 when checkLRUP φ cert = true and 0 otherwise, after at most 60 L + 20 W + 21
instructions, where W = certWork φ cert is the total length of the clauses that the hints of
cert name. RAT steps are rejected.
The bound in terms of the certificate size and the clause width #
The length of the longest clause of φ or of a RUP step of cert: every clause of every
database that checkLRUP φ cert reads has at most this length.
The hinted clauses are bounded by the hints and the width: they have total length at most
the number of RUP/empty hints (Cslib.Logic.PL.CNF.lrupHintCount) times dbWidth φ cert.
The hints are part of the certificate: there are at most as many as the words encoding
cert.
The LRUP (RUP-only LRAT) checker on the word RAM, in terms of the formula, the certificate
and the clause width. At any word size w that fits wordBound φ cert, the program run on the
input encode φ cert halts with output 1 when checkLRUP φ cert = true and 0 otherwise,
after at most 80 (F + C · max 1 W) + 81 instructions, where F and C are the numbers of words
encoding φ and cert, and W = dbWidth φ cert bounds the length of every clause in the
database. The max 1 keeps the certificate term when W = 0: every step is read even when no
clause is. RAT steps are rejected.