we set Σ equal to the output of GenPI(ϕ). By Theorem 4.1.4, we know that the elements of Σ are precisely the prime implicates of ϕ, so ϕ must be equivalent to the conjunction of elements in Σ by Theorem 3.2.9. We also know from Theorem 4.1.5 that the signatures of the formulae in Σ are all contained in the signature of ϕ and that the depths of the elements in Σ cannot exceed δ(ϕ). Thus all we need to show is that the operations performed on the formulae in Σ in Step 3 are equivalence-, signature-, and depth-preserving. For (i) and (ii), this follows directly from Theorem 2.3.1, and for (iii), this is obvious. For (iv), this follows from the induction hypothesis since we apply the function Pinf to formulae with depth at most k. We have thus shown that the formula output by Pinf (ϕ) is equivalent to ϕ, has signature contained in sig(ϕ), and depth at most δ(ϕ). We now verify that Pinf (ϕ) is in prime implicate normal form. Clearly, Pinf (ϕ) is a conjunction of clauses, since the elements in Σ are originally clauses, and the modifications in Step 3 do not change this. As we have shown the operations in Step 3 to be equivalence- preserving, it follows that the conjuncts of Pinf (ϕ) are all prime implicates of C and that each prime implicate of C is equivalent to some conjunct of Pinf (ϕ). Moreover, the conjuncts all satisfy the other conditions of Definition 6.2.1. We have |Diami(ϕ)| ≤ 1 for every 1 ≤ i ≤ n because of part (i) of Step 3. Because of Step 3 (ii), we know that for if there are disjuncts 3iǫ and 2iψ, then ǫ |= ψ. We also know that there are no redundant disjuncts since all unnecessary disjuncts were eliminated in Step 3 (iii). Finally, we can be sure that all of the formulae appearing behind the modal operators are in prime implicate normal form because of part (iv) of Step 3. We have thus shown that Pinf (ϕ) is in prime implicate normal form, completing the proof.
6.5
Spatial Complexity of Prime Implicate Normal Form
In the current section, we investigate the spatial complexity of prime implicate normal form in order to determine how much more space is needed in the worst-case to represent a formula in prime implicate normal form.
It is well-known that in propositional logic the transformation to prime implicate normal form can result in an exponential blowup in the size of the formula (cf. [CM78]). The blowup can never be more than singly-exponential since there are at most 3n distinct clauses on n variables.
Theorem 6.5.1.
Every propositional formula built from n propositional variables is equivalent to a formula in prime implicate normal form whose length is single exponential in n.
We now prove that for arbitrary formulae in Kn the transformation to prime implicate normal form involves an at most double exponential blowup in formula length.
Theorem 6.5.2.
Every formula ϕ in Kn is equivalent to a formula in prime implicate normal form whose length is at most double exponential in |ϕ|.
Proof. We assume throughout the proof that the input to Pinf is in NNF. This is without loss of generality since the transformation to NNF is linear (Theorem 2.4.2). We will use fl(k) to denote the maximal length of the output of Pinf when the input formula has depth k and l mutually non-equivalent literal subformulae. We know from Theorem 6.5.1 that there exists some polynomial q such that every propositional formula built using at most m propositional variables is equivalent to some propositional formula in prime implicate normal form with length at most 2q(m). As the number of propositional variables appearing in a formula can never exceed the number of mutually non-equivalent literal subformulae appearing in the formula, it follows that there exists some polynomial function p such that fl(0) ≤ 2p(l).
Now that we have obtained an upper bound on fl(0), we try to obtain an upper bound on fl(k + 1) in terms of fl(k). Consider some formula ϕ with depth k + 1 and having at most l mutually non-equivalent literal subformulae. The output of Pinf (ϕ) is a conjunction of clauses, one for each prime implicate of ϕ. We know from the proof of Theorem 4.1.12 that there can be no more than l2l prime implicates of ϕ modulo equivalence. As the output of Pinf (ϕ) is in prime implicate normal form, and formulae in prime implicate normal form have one conjunct per equivalence class of prime implicates, there can be at most l2l conjuncts in the output of Pinf (ϕ).
We also know that every prime implicate of ϕ is equivalent to some clause having at most 2l disjuncts (cf. proof of Theorem 4.1.6). We want to show that the elements in Σ at the beginning of Step 4 also have at most 2l disjuncts each. Let us then consider some formula π which is a conjunct of Pinf (ϕ), and let π′ be a clause with at most 2l disjuncts which is equivalent to π. We will suppose that for any pair of disjuncts 2iζ and 3iθ of π′ we have θ |= ζ. This is without loss of generality since any clause can be transformed into an equivalent clause with the same number of disjuncts and satisfying this condition (cf. Theorem 2.3.1). As π is in prime implicate normal form (by correctness of Pinf , Theorem 6.4.3), it cannot have any unnecessary disjuncts, which means in particular that there can be no unsatisfiable disjuncts, nor any disjunct which implies another disjunct.
184 6.5. Spatial Complexity of Prime Implicate Normal Form
Since π |= π′, we know that P rop(π) ⊆ P rop(π′). As there can be no repeated propositional disjuncts in π, the number of propositional disjuncts in π′ must be at least as great as the number of propositional disjuncts in π. Next suppose that π possesses a disjunct 3iψ. We know that 3iψ is satisfiable, so by Theorem 2.3.3 there must be at least one 3i-disjunct in π′. As we know π to have at most one 3i-disjunct per i, it follows that π′ has at least as many 3-disjuncts as π. Finally, we want to show that number of 2-disjuncts of π is bounded above by the number of 2-disjuncts of π′. We first remark that if π contains a disjunct 2iχ, then there must be some disjunct 2iζ of π′ such that χ |= ζ (because of Theorem 2.3.3 and our assumptions on the structure of π′). We need to make sure however that each 2i-disjunct of π matches up with a different 2i-disjunct of π′. Let us suppose then that 2iχ1 and 2iχ2 are disjuncts of π which imply a single disjunct 2iζ of π′. We thus have χ1 |= ζ and χ2 |= ζ. As π′|= π, and π is in prime implicate normal form, we must have ζ |= χj for some disjunct 2iχj of π. It follows that χ1 |= χj and χ2 |= χj. If j = 1, then we have χ2 |= χ1, making the disjunct 2iχ2 unnecessary, contradicting our assumption that π is in prime implicate normal form. For other values of j, we obtain a contradiction in a similar manner. Thus we can conclude that there can be no pair of disjuncts 2iχ1and 2iχ2which imply the same disjunct of π′. It follows then that the total number of 2-disjuncts in π′ is at least as great as that of π. We have thus shown that π′ has at least as many disjuncts as π, and hence that π has no more than 2l disjuncts.
We now want to place a bound on the size of the disjuncts appearing in the conjuncts of Pinf (ϕ). Consider some conjunct π of Pinf (ϕ), and let λ be the element of GenPI(ϕ) which was transformed into π via the modifications in Step 3 of Pinf . Besides the propositional disjuncts which have length at most 2, there are two types of disjuncts which may appear in π: formulae of the form 3i(Pinf (ψ1∨...∨ ψr) where Diami(λ) = {ψ1, ..., ψr}, and formulae of the form 2iPinf (ǫ∨ψ1∨...∨ψr) where ǫ ∈ Boxi(λ) and Diami(λ) = {ψ1, ..., ψr}. Now we know from Theorem 4.1.5 that every literal subformula of one of the elements in Diami(λ) ∪ Boxi(λ) must also be a literal subformula of ϕ. That means that if ǫ ∈ Boxi(λ) and Diami(λ) = {ψ1, ..., ψr}, then all the literal subformulae appearing in ψ1∨ ... ∨ ψr or ǫ∨ψ1∨...∨ψralso appear in ϕ. As we have assumed there to be at most l mutually non-equivalent literal subformulae in ϕ, it follows that there can be no more than l mutually non-equivalent literal subformulae in ψ1∨...∨ψror ǫ∨ψ1∨...∨ψr. We also know that the disjuncts of λ have depth at most k+1 (Theorem 4.1.5), which means that any formula of the form ψ1∨ ... ∨ ψr or ǫ ∨ ψ1∨ ... ∨ ψr where ǫ ∈ Boxi(λ) and Diami(λ) = {ψ1, ..., ψr} must have depth no greater than k. We can thus conclude that |Pinf (ψ1∨ ... ∨ ψn)| ≤ fl(k) and |Pinf (ǫ ∨ ψ1∨ ... ∨ ψr)| ≤ fl(k) for ǫ ∈ Boxi(λ)
and Diami(λ) = {ψ1, ..., ψr}, which means that any disjunct in λ must have length at most fl(k) + 1 (the extra 1 is for the modality).
Putting all of this together, we obtain the following relationship between fl(k+1) and fl(k):
fl(k + 1) ≤ l2
l
(2l(fl(k) + 1) + 1) Here the l2l
gives the maximal number of conjuncts, 2l gives the maximal number of disjuncts per conjunct, fl(k) + 1 gives the maximal size of the disjuncts, and the two extra 1’s in the formula are for the ∧ and ∨ symbols which connect the different conjuncts and disjuncts. Using standard techniques for solving first-order linear recurrence relations, we arrive at the following:
fl(k) ∈ O((l2
l
2l)kfl(0))
It is not hard to see that this expression is no more than double exponential in l. Now suppose that ϕ is a formula with l mutually non-equivalent literal subformulae and depth k. We know that the size of Pinf (ϕ) is bounded above by fl(k). As the number of literal subformulae in a formula ϕ can never exceed |ϕ|, we must have l ≤ |ϕ|. We also know that the depth of ϕ is bounded by the length of ϕ, i.e. k= δ(ϕ) ≤ |ϕ|. This means that the above expression is at most double exponential in |ϕ|, so |Pinf (ϕ)| must also be at most than double-exponential in |ϕ|.
We now prove this upper bound to be optimal by showing that in some cases the transformation to prime implicate normal form may involve a double exponential blowup in formula size.
Theorem 6.5.3.
There exist formulae ϕ such that the smallest equivalent formula in prime implicate normal form has length which is double exponential in the length of ϕ.
Proof. In Theorem 4.1.7 of Chapter 4, we exhibited a formula ϕ such that the number of non-equivalent prime implicates of ϕ was double exponential in |ϕ|. Any formula in prime implicate normal form which is equivalent to ϕ must have double- exponentially many conjuncts, and hence a length which is double exponential in |ϕ|.