Documentation

CslibFrontier.Logics.Propositional.CNF.LRATRelabel

Renaming the variables of an LRUP (RUP-only LRAT) certificate #

Renaming the variables of a formula along an injective map g, and the literals of a certificate along the same map, does not change whether the RUP-only checker Cslib.Logic.PL.CNF.checkLRUP accepts the certificate (Cslib.Logic.PL.CNF.checkLRUP_relabel). The checker only compares literals for equality and looks clauses up by number, and an injective renaming preserves both. A solver can therefore work on a formula whose variables have been renamed, for example to 0, …, k - 1, and translate its certificate back to the original variables.

Main definitions #

Main results #

A DIMACS literal renamed along g: the variable v, written ±(v + 1), becomes g v, with the same sign; 0 stays 0.

A certificate step with the literals of its clause renamed along g. Clause numbers and hints are unchanged.

theorem Cslib.Logic.PL.CNF.propagateHints_relabel {g : ℕ → ℕ} (hg : Function.Injective g) (db : List (ℕ × Clause ℕ)) (trail : List (Literal ℕ)) (hs : List ℕ) :
propagateHints (List.map (fun (e : ℕ × Clause ℕ) => (e.1, Clause.relabel g e.2)) db) (List.map (Prod.map g id) trail) hs = propagateHints db trail hs

Unit propagation along hints is unchanged by an injective renaming of the database and the starting literals.

The LRUP checker is invariant under injective renaming: it accepts a certificate with its literals renamed along an injective g for the renamed formula exactly when it accepts the original certificate for the original formula.