Counting exact-one satisfying assignments #
The exact-one count reuses CNF.modelCount through the ordinary CNF encoding, which preserves
both assignments and occurring variables. Variables outside the formula are not counted.
Main definitions #
CNF.oneModelCount: the exact-one satisfying-assignment count.
Main results #
CNF.oneModelCount_eq_card_filter: count through a finite assignment representation.CNF.oneModelCount_relabel_of_injOn: support-injective relabelling preserves the count.CNF.oneModelCount_compact: compact numbering preserves the count.
References #
These are original consequences of the ordinary CNF model-count API.
The number of exact-one satisfying assignments on the occurring variables.
Instances For
theorem Cslib.Logic.PL.CNF.oneModelCount_eq_card_filter {V : Type u_1} [DecidableEq V] {ι : Type u_3} [Fintype ι] {φ : CNF V} (f : (V → Bool) → ι) (P : ι → Prop) [DecidablePred P] (hf : ∀ (σ τ : V → Bool), evalOne σ φ = true → evalOne τ φ = true → (f σ = f τ ↔ ∀ v ∈ φ.vars, σ v = τ v)) (hP : ∀ (i : ι), P i ↔ ∃ (σ : V → Bool), evalOne σ φ = true ∧ f σ = i) :
Count exact-one assignments through any faithful finite representation of them.
An exact-one model exists exactly when the exact-one count is positive.
theorem Cslib.Logic.PL.CNF.oneModelCount_relabel_of_injOn {V : Type u_1} {W : Type u_2} [DecidableEq V] [DecidableEq W] {f : V → W} (φ : CNF V) (hf : Set.InjOn f {v : V | v ∈ φ.vars}) :
Support-injective relabelling preserves the number of exact-one models.
theorem Cslib.Logic.PL.CNF.oneModelCount_relabel {V : Type u_1} {W : Type u_2} [DecidableEq V] [DecidableEq W] {f : V → W} (hf : Function.Injective f) (φ : CNF V) :
Injective relabelling preserves the number of exact-one models.
Compact variable numbering preserves the number of exact-one models.
Compact variable numbering preserves exact-one satisfiability.