Documentation

Complexity.Logics.Propositional.CNF.Compact

Compact variable numbering for CNF formulas #

Variables are renamed by their first positions in the list of literal occurrences. The resulting indices are smaller than the number of occurrences, even when the original names have a succinct encoding. Repeated variables retain the same name. This prepares reductions whose output indices are unary without expanding binary input names into unary integers.

Main definitions #

Main results #

References #

Rename each variable by its first position among all literal occurrences.

Instances For
    @[simp]

    Compaction keeps all clauses, their order, and their lengths.

    @[simp]

    Compaction preserves the number of clauses.

    theorem Cslib.Logic.PL.CNF.mem_vars_compact_lt {V : Type u_1} [DecidableEq V] (φ : CNF V) {v : ℕ} (hv : v ∈ φ.compact.vars) :

    Every renamed variable is below the number of literal occurrences.

    theorem Cslib.Logic.PL.CNF.eval_compact {V : Type u_1} [DecidableEq V] (φ : CNF V) (σ : V → Bool) :
    eval (fun (i : ℕ) => φ.vars[i]?.elim false σ) φ.compact = eval σ φ

    Reading original names at the compact positions recovers the original evaluation.

    Compaction preserves satisfiability, without requiring a finite variable type.