Disjunctions of NNF circuits #
The disjunction of two NNF circuits (NNF.disj) is their disjoint union with a new ∨ output:
its nodes are Option (N₁ ⊕ N₂), so its size is the sum of their sizes plus one
(NNF.size_disj). It computes the disjunction of their functions (NNF.toFun_disj), is a DNNF
when both are (NNF.isDecomposable_disj), and is a d-DNNF when moreover the two functions are
never true together (NNF.isDeterministic_disj).
Copies of a circuit inside a larger one compute the same values
(NNF.eval_eq_of_gate_map, NNF.vars_eq_of_gate_map).
Main definitions #
Cslib.Circuits.NNF.Gate.map: relabelling the children of a gate.Cslib.Circuits.NNF.disj: the disjunction of two circuits.
Main results #
Copies compute the same values. If f maps each node of C to a node of C' whose gate
is that of the node with its children mapped by f, then f preserves values.
The disjunction of two DNNFs is a DNNF.
The disjunction of two d-DNNFs computing functions that are never true together is a d-DNNF.