Documentation

Complexity.Logics.Propositional.CNF.ExactOne.Compile

Constant-factor parsimonious compilation to positive exact-one clauses #

The two local constructions compose without another occurrence splitter or planarization. Every source clause contributes at most thirteen signed exact-one clauses; replacing their negative occurrences contributes at most thirteen times as many positive clauses. These are bounds on actual emitted lists. Every source variable keeps its occurrence count and no new variable occurs more than three times.

Main definitions #

Main results #

References #

The local gadgets are from [HuntMaratheRadhakrishnanStearns1998, Theorem 3.8]. The composition and quantitative bounds are original.

@[reducible, inline]

The two disjoint families of local auxiliary variables.

Instances For

    Replace disjunctions by uniquely extensible exact-one clauses and remove all negations.

    Instances For

      Compact natural names for all output variables.

      Instances For

        Both local stages have constant size: at most 169 clauses per source clause.

        Every emitted clause has exactly three literal occurrences.

        theorem Cslib.Logic.PL.CNF.PositiveExactOneCompile.positive_rawFormula {V : Type u_1} (φ : CNF V) (c : Clause (Variable V)) :
        c ∈ rawFormula φ → ∀ l ∈ c, l.2 = true

        All output literal polarities are positive.

        Every emitted clause has three distinct variables, including when source literals repeat.

        theorem Cslib.Logic.PL.CNF.PositiveExactOneCompile.count_vars_rawFormula_le {V : Type u_1} [DecidableEq V] (φ : CNF V) (hw : ∀ c ∈ φ, List.length c ≤ 3) (ho : ∀ (v : V), List.count v φ.vars ≤ 3) (v : Variable V) :

        Occurrence-three inputs retain that bound through both local replacements.

        Model counts are preserved through both uniquely extensible stages.

        Compact numbering preserves the constant-factor clause bound.

        Every compact output clause has exactly three literal occurrences.

        theorem Cslib.Logic.PL.CNF.PositiveExactOneCompile.positive_formula {V : Type u_1} [DecidableEq V] (φ : CNF V) (c : Clause ℕ) :
        c ∈ formula φ → ∀ l ∈ c, l.2 = true

        Compact numbering does not change the positive polarity of any literal.

        Compaction preserves distinct variables within every output clause.

        The actual output has at most 507 literal occurrences per source clause.

        theorem Cslib.Logic.PL.CNF.PositiveExactOneCompile.count_vars_formula_le {V : Type u_1} [DecidableEq V] (φ : CNF V) (hw : ∀ c ∈ φ, List.length c ≤ 3) (ho : ∀ (v : V), List.count v φ.vars ≤ 3) (v : ℕ) :

        Compact numbering preserves the degree-three restriction.

        The final natural-variable output has exactly the source model count.

        The compiler preserves satisfiability between ordinary and exact-one semantics.