Decomposable DAGs: rectangles, multi-partition covers and threshold counting #
A decomposable DAG (DecomposableDAG) represents a set of inputs ι → U by nodes of
three kinds, each about a set of coordinates, its scope, and accepting a set of assignments of
its scope:
- a leaf accepts at most one assignment, as a literal or a constant does;
- a union accepts what one of its children accepts, and each child's scope is contained in its scope;
- a product of two children accepts what both accept, and their scopes split its scope into two disjoint parts (decomposability).
A rank decreasing from each node to its children makes the DAG acyclic. Nodes may be shared, different branches may split the coordinates in different ways, and neither smoothness nor determinism is built into the structure; instead, they are orthogonal predicates:
DecomposableDAG.IsSmooth: the root covers every coordinate and every child of a union has the union's scope;DecomposableDAG.IsDeterministic: no two distinct children of a union accept a common input.
Over the alphabet Bool with literal and constant leaves, decomposable DAGs are the DNNFs of
knowledge compilation, and deterministic decomposable DAGs are the d-DNNFs [Dar01].
Certificates and rectangles. A node occurs on an accepting certificate of an input x
(DecomposableDAG.Occurs) when it is the root and accepts x, a child of an occurring union that
accepts x, or a child of an occurring product. Even without smoothness, if a node occurs for x,
then replacing the part of x on its scope by any assignment that the node accepts keeps the input
accepted (DecomposableDAG.Occurs.mem_accepted). So the assignments accepted by a node and its
contexts, the parts outside its scope of the inputs for which it occurs, form a rectangle inside
the accepted set (DecomposableDAG.rectangle_subset) [BCMS16].
Multi-partition covers. Over finitely many coordinates (n ≥ 2) and an arbitrary alphabet U,
walking down an accepting certificate from the root—always to the heavier child at a product and to
an accepting child at a union—stops at a balanced node, a large leaf, or a union edge to a small
child (DecomposableDAG.exists_isCover_size, DecomposableDAG.coverNumber_accepted_le_size),
covering accepted by at most max 1 size balanced rectangles. When every union is binary and its
scope is the union of its children's scopes (as in Cslib.Circuits.NNF), at most one child of a
large union is small, giving a cover by at most |N| balanced rectangles
(DecomposableDAG.exists_isCover_card, DecomposableDAG.coverNumber_accepted_le_card)
[BCMS16].
Threshold counting. For a smooth decomposable DAG whose accepted set is K-rectangle-free with
at least K elements, descending along a certificate of an accepted input x from the root to the
lowest node v accepting at least K assignments charges at most (K - 1) ^ 2 inputs to each
union edge and (K - 1) ^ 3 to each product (DecomposableDAG.ncard_accepted_le):
|accepted| ≤ (K - 1) ^ 2 · #(union edges) + (K - 1) ^ 3 · #(products).
For dense rectangle-free sets with small thresholds, every smooth decomposable DAG is therefore exponentially large.
Main definitions #
Cslib.Circuits.DecomposableDAG.Gate,Cslib.Circuits.DecomposableDAG: a decomposable DAG and its node gates.Cslib.Circuits.DecomposableDAG.accepts,Cslib.Circuits.DecomposableDAG.accepted: the inputs accepted by a node and the set represented by the DAG.Cslib.Circuits.DecomposableDAG.IsSmooth,Cslib.Circuits.DecomposableDAG.IsDeterministic: smoothness and determinism.Cslib.Circuits.DecomposableDAG.Occurs,Cslib.Circuits.DecomposableDAG.contexts,Cslib.Circuits.DecomposableDAG.SmallSides,Cslib.Circuits.DecomposableDAG.stops: nodes on accepting certificates, node contexts, small-side bounds, and threshold stopping nodes.Cslib.Circuits.DecomposableDAG.unionEdges,DecomposableDAG.products,DecomposableDAG.size: the size of a DAG.
Main results #
Cslib.Circuits.DecomposableDAG.occurs_eq_rectangle,Cslib.Circuits.DecomposableDAG.rectangle_subset: the inputs for which a node occurs are the rectangle of its accepted assignments and its contexts, which lies inside the accepted set.Cslib.Circuits.DecomposableDAG.exists_isCover_size,Cslib.Circuits.DecomposableDAG.coverNumber_accepted_le_size,Cslib.Circuits.DecomposableDAG.exists_isCover_card,Cslib.Circuits.DecomposableDAG.coverNumber_accepted_le_card: multi-partition balanced rectangle covers for unsmoothed decomposable DAGs over arbitrary alphabets.Cslib.Circuits.DecomposableDAG.ncard_accepted_le_of_smallSides,Cslib.Circuits.DecomposableDAG.ncard_accepted_le: threshold counting for smooth DAGs.Cslib.Circuits.DecomposableDAG.ncard_accepted_le_size: threshold counting, charging(K - 1) ^ 3to every union edge and every product.
References #
The gate at a node of a decomposable DAG on the nodes N.
A decomposable DAG on the nodes N, representing a set of inputs ι → U. Each node has a
scope, a set of coordinates, and accepts a set of assignments of its scope. The gate at a node is
a leaf, accepting at most one assignment; a union of children, each with scope contained in that of
the node, accepting what one of them accepts; or a product of two children whose scopes split the
scope of the node into two disjoint parts, accepting what both accept. A rank decreasing from each
node to its children makes the DAG acyclic. Smoothness (IsSmooth) and determinism
(IsDeterministic) are orthogonal predicates rather than fields of the structure.
- scope : N → Set ι
The coordinates that a node is about.
- root : N
The root.
- gate : N → Gate N
The gate at a node.
- rank : N → ℕ
A rank that decreases from each node to its children.
The assignments of its scope that a node accepts.
A leaf accepts at most one assignment.
- scope_union (v : N) (c : Finset N) : self.gate v = Gate.union c → ∀ u ∈ c, self.scope u ⊆ self.scope v
The scope of each child of a union is contained in the union's scope.
The children of a union have lower rank.
- values_union (v : N) (c : Finset N) : self.gate v = Gate.union c → ∀ (x : ι → U), (self.scope v).domRestrict x ∈ self.values v ↔ ∃ u ∈ c, (self.scope u).domRestrict x ∈ self.values u
A union accepts what one of its children accepts.
- scope_product (v l r : N) : self.gate v = Gate.product l r → self.scope v = self.scope l ∪ self.scope r
The scope of a product is the union of the scopes of its children.
- disjoint_product (v l r : N) : self.gate v = Gate.product l r → Disjoint (self.scope l) (self.scope r)
The scopes of the children of a product are disjoint (decomposability).
- rank_product (v l r : N) : self.gate v = Gate.product l r → self.rank l < self.rank v ∧ self.rank r < self.rank v
The children of a product have lower rank.
- values_product (v l r : N) : self.gate v = Gate.product l r → ∀ (x : ι → U), (self.scope v).domRestrict x ∈ self.values v ↔ (self.scope l).domRestrict x ∈ self.values l ∧ (self.scope r).domRestrict x ∈ self.values r
A product accepts what both of its children accept.
The inputs accepted by a node: those whose part on its scope it accepts.
The set represented by the DAG: the inputs accepted by the root.
A decomposable DAG is smooth (over all coordinates ι) when the root covers every coordinate
and every child of a union has the same scope as the union.
The root is about every coordinate.
Every child of a union has the union's scope.
A decomposable DAG is deterministic when no two distinct children of any union node accept a common input.
Certificates and rectangles #
A node occurs on an accepting certificate of the input x.
- root {ι : Type u_1} {U : Type u_2} {N : Type u_3} {P : DecomposableDAG ι U N} {x : ι → U} : x ∈ P.accepted → P.Occurs x P.root
The root occurs when it accepts
x. - union {ι : Type u_1} {U : Type u_2} {N : Type u_3} {P : DecomposableDAG ι U N} {x : ι → U} {v u : N} {c : Finset N} : P.Occurs x v → P.gate v = Gate.union c → u ∈ c → x ∈ P.accepts u → P.Occurs x u
A child of an occurring union occurs when it accepts
x. - left {ι : Type u_1} {U : Type u_2} {N : Type u_3} {P : DecomposableDAG ι U N} {x : ι → U} {v l r : N} : P.Occurs x v → P.gate v = Gate.product l r → P.Occurs x l
The left child of an occurring product occurs.
- right {ι : Type u_1} {U : Type u_2} {N : Type u_3} {P : DecomposableDAG ι U N} {x : ι → U} {v l r : N} : P.Occurs x v → P.gate v = Gate.product l r → P.Occurs x r
The right child of an occurring product occurs.
A node occurring for x accepts x.
Any node occurring for x witnesses that x is accepted by the DAG.
Certificate substitution. If a node occurs for x, then it also occurs for any input that
the node accepts and that agrees with x outside the scope of the node.
Substitution. If a node occurs for x, then any input that the node accepts and that
agrees with x outside the scope of the node is accepted.
The contexts of a node: the parts outside its scope of the inputs for which it occurs.
The inputs for which a node occurs form a rectangle when the node occurs for at least one
input: they are the inputs whose part on P.scope v lies in P.values v and whose part outside
lies in P.contexts v. (When v never occurs, P.contexts v is empty and both sets are empty.)
A node and its contexts form a rectangle inside the accepted set.
Every node of P has fewer than K accepted assignments or fewer than K contexts, counted
with Set.encard.
If the accepted set is K-rectangle-free, every node has a side smaller than K.
The threshold of SmallSides is positive.
When the accepted set is nonempty, SmallSides K forces 1 < K: the root has both a value and
a context.
Threshold counting #
The inputs for which the descent to the threshold K stops at the node v: the node occurs
for the input and accepts at least K assignments, while the children of v through which the
input is accepted accept fewer.
The descent stops. If the accepted set of a smooth DAG has at least K > 1 elements, the
descent from the root along a certificate of an accepted input stops at some node. The rank makes
the descent finite, even with shared nodes.
The number of union edges: the children of each union, a shared child being counted once for each of its parents.
The number of products.
The size of the DAG: its union edges and its products. Leaves are free.
Threshold counting under SmallSides. If every node of a smooth decomposable DAG has a
side smaller than K and the accepted set has at least K elements, then
|accepted| ≤ (K - 1) ^ 2 · #(union edges) + (K - 1) ^ 3 · #(products).
Threshold counting for smooth decomposable DAGs. If the set represented by a smooth
decomposable DAG is K-rectangle-free and has at least K elements, then
|accepted| ≤ (K - 1) ^ 2 · #(union edges) + (K - 1) ^ 3 · #(products).
Unions need not be disjoint, and different branches may split the coordinates differently.
Threshold counting by size. If the set represented by a smooth decomposable DAG is
K-rectangle-free and has at least K elements, then |accepted| ≤ (K - 1) ^ 3 · size.
Multi-partition balanced rectangle covers #
BCMS multi-partition cover by size. Over n ≥ 2 coordinates and an arbitrary alphabet U,
any (not necessarily smooth or deterministic) decomposable DAG admits a cover of its accepted set
by max 1 P.size balanced rectangles [BCMS16].
BCMS cover-number bound by size. Over n ≥ 2 coordinates and an arbitrary alphabet U,
the multi-partition rectangle cover number of a decomposable DAG is at most max 1 P.size
[BCMS16].
BCMS multi-partition cover by node count for decomposable DAGs with binary unions whose
scope is the union of their children's scopes (such as Cslib.Circuits.NNF): over n ≥ 2
coordinates and an arbitrary alphabet U, P.accepted is covered by Fintype.card N balanced
rectangles [BCMS16].
BCMS cover-number bound by node count for binary-union decomposable DAGs over n ≥ 2
coordinates and an arbitrary alphabet U [BCMS16].