Documentation

CslibFrontier.Computability.Circuit.NNF.Rectangle

Embedding DNNFs into DecomposableDAG and multi-partition covers #

Every decomposable NNF (DNNF) C : NNF ι N embeds into an unsmoothed DecomposableDAG ι Bool N on the same node type (NNF.IsDecomposable.toDecomposableDAG): literals and constants become leaves, ∧ gates become products, and ∨ gates become binary unions. Acceptance is preserved at every node (NNF.IsDecomposable.accepts_toDecomposableDAG, NNF.IsDecomposable.accepted_toDecomposableDAG), determinism transfers (NNF.IsDecomposable.isDeterministic_toDecomposableDAG), and the DAG's edge-and-product size is at most 2 * C.size (NNF.IsDecomposable.size_toDecomposableDAG_le).

Theorem [BCMS16] [ArenasBroadrickLiewVanDenBroeck2026, Theorem 3.1]. Specializing DecomposableDAG.exists_isCover_card along NNF.IsDecomposable.toDecomposableDAG, if a DNNF with s nodes computes f : (ι → Bool) → Bool and there are at least two variables, then f⁻¹(1) is the union of at most s balanced rectangles (NNF.exists_isCover), so Cov^m_1(f) ≤ s (NNF.coverNumberFun_le_size). Applied to a DNNF for ¬f, this bounds Cov^m_0(f) by the DNNF size of ¬f (NNF.coverNumberFun_false_le_size).

Main definitions #

Main results #

References #

View a decomposable NNF (DNNF) as an unsmoothed DecomposableDAG on the same node type N over Bool: literals and constants become leaves, ∧ gates become products, and ∨ gates become binary unions.

theorem Cslib.Circuits.NNF.IsDecomposable.accepts_toDecomposableDAG {ι : Type u_1} {N : Type u_2} [DecidableEq ι] {C : NNF ι N} [DecidableEq N] (hC : C.IsDecomposable) (v : N) :
hC.toDecomposableDAG.accepts v = {x : ι → Bool | C.eval x v = true}

Each node of hC.toDecomposableDAG accepts the inputs on which it evaluates to true.

A deterministic DNNF (d-DNNF) maps to a deterministic DecomposableDAG. Note that the converse fails when an ∨ gate has identical children (x ∨ x), since DecomposableDAG stores children as a Finset whereas NNF.IsDeterministic is positional.

The union-edge and product count of hC.toDecomposableDAG is at most twice the node count of C: each ∨ gate contributes at most two union edges and each ∧ gate one product.

theorem Cslib.Circuits.NNF.exists_isCover {ι : Type u_1} {N : Type u_2} [DecidableEq ι] {C : NNF ι N} [Fintype ι] [Fintype N] (hC : C.IsDecomposable) (hn : 2 ≤ Fintype.card ι) :

DNNF size bounds the cover number, in the form of an explicit cover: a DNNF with s nodes over at least two variables gives a cover of the inputs it accepts by s balanced rectangles.

[BCMS16], [ArenasBroadrickLiewVanDenBroeck2026, Theorem 3.1]. Every DNNF computing f over at least two variables has at least Cov^m_1(f) nodes.

theorem Cslib.Circuits.NNF.coverNumberFun_false_le_size {ι : Type u_1} {N : Type u_2} [DecidableEq ι] {C : NNF ι N} [Fintype ι] [Fintype N] (hC : C.IsDecomposable) (hn : 2 ≤ Fintype.card ι) {f : (ι → Bool) → Bool} (hf : ∀ (x : ι → Bool), C.toFun x = !f x) :

Every DNNF computing ¬f over at least two variables has at least Cov^m_0(f) nodes.