7. Conclusiones, aportaciones y trabajos futuros 139
7.2.1. Trabajos relacionados con la malla de elementos finitos
T he concept of a Horn clause, and H orn formulas, were introduced in [91]. Horn clauses intuitively represent implications of th e form v\ A . . . A Vk —> v (for variables v \ , . . . ,V k,v G VA) making Horn clause-sets prim e candidates for modelling functional dependencies in database theory and logic program ming (for example the use of Horn-logic as th e underlying predicate language in
[101];see below for further details).
D e fin itio n 2 .7 .3 A clause C € CC is a H o rn clause i f \C fl VA\ < 1 and is a pure H o rn
clause i f \C fl V.4| = 1 . A H o rn cla u se-set resp. pure H o rn cla u se-set is a clause-set with
only Horn resp. pure Horn clauses. Let H O C CCS be the set o f all H o rn clau se-sets, that is, H O := {F G CCS | V C G F : \C n V A \ < I}, while H O + := { F G C CS | V C G F : |CnV.A | = 1} is the set of all p u re H o rn clau se-sets.
Some simple properties of Horn clause-sets are:
1. H O and H O + are stable under union (being a Horn clause or pure Horn clause is a local syntactic property).
2. Every F G H O + is satisfiable via (v —>■ 1 : v G var(F )) * F = T .
3. Every F G H O not containing th e em pty clause or positive unit-clauses is satisfiable via (v —> 0 : v G v ar(F )) * F = T .
4. H O is stable under elim ination of literal occurrences and elim ination of clauses (and thus also under application of p artial assignments).
5. H O + is stable under elim ination of clauses, but not under elim ination of literal occurrences and not under application of p artial assignments. H O + is stable under elim ination of negative literal occurrences and under application of p artial assignments which set no variable to 0.
6. H O as well as H O + is stable under addition of resolvents, and thus we have:
(a) For F G H O holds prc0(F ) G H O . (b) For F G H O + holds prc0(F ) G H O +.
7. Checking w hether a clause-set F is a Horn clause-set (or pure Horn) is possible in linear time (0 ( l ( F )) - simply check each clause is Horn resp. pure Horn).
As first shown in [53], there is a linear tim e algorithm for the determ ining satisfiability of th e special case of Horn formulas. In fact, not only is satisfiability of H orn clause-sets solvable in linear time, but it is actually solvable using unit-clause propagation (this was originally shown in [8 6] but is repeated here for pedagogical reasons) in linear tim e (due to [53] as m entioned in
Section 2.4).
L em m a 2 .7 .4 Consider a Horn clause-set F G H O . We have that
n ( F ) = {_L} <=> F e U S A T .
P ro o f: T h at r i( F ) = {_L} =4> F G U S A T follows from the fact th a t ri only sets forced assignments. To show th a t F G U S A T ==> r i( F ) = {_L} we consider th e contraposition r i( F ) 7^ {_!_} = > F G S A T . Consider an F such th a t F ' : = r i ( F ) / { J_ } . If F ' = T th en
obviously F G S A T . Otherwise F ' is a Horn clause-set (recall Horn clause-sets are closed under application of p artial assignments) and by the definition of ri we know th a t all clauses in F ' are of size > 2. Therefore every clause in F contains at least one negated variable and so the
assignment (v —> 0 : v G v a r(F /)) satisfies F '. □
In general, not every boolean function has an equivalent representation in 710 (for example, those given by m onotone CNFs - CNFs for which every clause contains only positive literals), however despite this the class is im portant as both the foundation of logic programming (as discussed in [1 0 1] 6^), as approxim ation classes for knowledge representation (see for example
using Horn upper and lower bounds as a m ethod for producing approxim ate knowledge bases in [142]), for modelling of functional dependencies in database systems in [58], and more (a good overview of uses of Horn clause-sets and Horn functions can be found in C hapter 6 of [42]).
2 .7 .2 .1 G e n e r a lis a tio n s o f H o r n c la u s e -s e ts
Due to the fact th a t TiO is insufficient to model all boolean functions and numerous simple classes of clause-set are not included, an obvious question becomes how to generalise Horn clause-sets to larger classes which allow more to be represented while m aintaining im portant properties. A first attem p t at generalising Horn clause-sets comes by observing th a t the “essential” syntactical structure is preserved by renamings.
D e fin itio n 2 .7 .5 By TVHO C CCS we denote the class o f renam able H o rn clau se-sets,
that is, the class o f clause-sets which are isomorphic to some Horn clause-sets. Remarks:
1. Checking w hether a clause-set F is in TTHO can be done in linear tim e as shown in [56].
2. IZTIO is now closed only under disjoint union, not union of arb itra ry members (observe th a t for any clause C th e clause-set {C} is renam able Horn bu t there are clause-sets which are not in IZTiO).
While IZTiO clearly includes more clause-sets th an 710 (for example, at least monotone CNFs are now included), it is still not complete w ith respect to representing boolean functions (e.g., parity functions, which have unique minimal CNF representations via their sets of prime implicates, have no equivalent clause-set representation in 7ZTIO - despite satisfiability for these representations being possible via ju st checking for _L). To address th e inability oiTLO and 7ZTiO to represent certain families of boolean functions, there have been various generalisations of 7LO and 7ZTiO to hierarchies of poly-time SAT classes. One of the first such classes which m aintains many of the properties of the Horn class is th a t of generalised Horn clause-sets introduced in [162, 6 6] and later recharacterised in [99].
6 Horn logic with respect to logic programming is actually concerned w ith Horn clauses in predicate logic, however the underlying structure is still the sam e and th e fundam entals properties th at ensure th e poly-tim e solvability of propositional Horn clau se-sets is th e sam e as th at th a t underlies the structure of predicate Horn formulae.
D e fin itio n 2 .7 .6 Let H O \ := H O , while fo r k > 1 we define H O k C CCS as the set o f all F £ CCS such that there exists an ordering F = {C \ , . . . , C m }, m := c(F ), of clauses, and there exist sets o f positive literals Vi C V A fo r i £ { 1 , . . . , m } such that we have
Vi C . . . C Vm
Vi Q C1, . . . , V m C C m
{'Ci \ m}} 6 H O k - 1-
Remarks:
1. By choosing all Vi = 0 we see th a t we have H O k Q HOk> for 1 < k < k'.
2. For F £ H O k , k £ N, k > 2, and every finite V C V A we have {C U V : C £ F } £ H O k as
well.
We collect some tools for recognition of generalised Horn clause-sets in th e following lemma (all follow by definition or via a simple inductive proof):
L e m m a 2 .7 .7 For k £ N the classes H O k are stable under the following operations:
1. removal o f clauses;
2. crossing out of variables (the operation V * F fo r variable-sets V );
3. application o f partial assignments (note that this can be achieved by crossing out o f variables and removal of clauses);
4. addition and removal of negative literal occurrences;
5. addition o f a clause C fo r which there is D £ F with D C C such that C \ D contains only negative literals.
Note that these operations can lead to contraction o f clauses. The class H O \ is also stable under removal o f arbitrary literal occurrences and under DP-reduction.
Although not im mediately obvious, we see th a t in the lim it the H O k hierarchy is capable of representing all boolean functions:
L e m m a 2 .7 .8 For a fu ll unsatisfiable clause-set F with n := n (F ) > 0 we have: 1. F £ H O n .
2. I f n (F ) > I, then F ^ H O n-1-
P r o o f : To see th a t F £ H O n , we proceed by induction on n. For n = 0 and n = 1 th a t
F £ H O \ = H O follows from the definition. For n > 1 choose a variable v £ v ar(F ) and order
th e clauses C \ , . . . , CV of F such th a t those clauses containing v come first, followed by those w ith v (note this covers all clauses). Now set Vi = • • • = V2™-\ = 0 and V2n - i +i = • • • = V2n = {u}.
We have th a t F " := {Ci \ Vi : i £ { 1 , . . . , m}} = F ' U {C U {u} : C £ F '} where F ' is th e full unsatisfiable clause-set on v ar(F ) \ {u}. By induction F ' £ H O n- \ and so by p art 5 of Lemm a 2.7.7 we have th a t F " £ H O n- \ , hence F £ H O n .
To see th a t F £ H O n_ i, we again proceed by induction on n. For n = 2 observe by definition th a t F H O due to th e binary clause w ith all positive literals. For n > 2 assume for th e sake of contradiction th a t F £ H O n- \ and hence th a t there exist V i , .. ., V2n and an
ordering C \, . . . , C2" of th e clause of F such th a t V \ C . . . C V2n, V \ Q C \, . . . , V2n C C2" and
F ' := {Ci \ K : i G { 1 , . . . ,m }} G H O n- 2. H V 1 = - - - = V 2~ = l then F ' = F and for any
variable v G v ar(F ) we have by induction th a t (v —» 0) * F ' H On - 2 and so by p art 3 of Lemma
2.7.7 F £ l-LOn-1. Otherwise, consider the smallest i G { 1 ,... , 2n } such th a t V* 7^ 0 and some
witness variable v G Vi. For all j > i we have th a t Vi C C j and so all clauses containing v occur in C i , . . . C i -1, i.e., {C U {u} : C G F "} C { C i,. . . , C i -1} C F ', where F " is the full clause-set
on var(F ) \ {v}. Therefore (v —> 0) * F ' = F " which by induction is not in 'HOn- 2 and so by
p art 3 of Lemma 2.7.7 neither is F ', a contradiction. □
By P a rt 1 of Lemma 2.7.8 and P a rt 1 of Lem ma 2.7.7:
C orollary 2 .7 .9 For all boolean functions f we have that C N F ( / ) G H O n^ y
There have been numerous other examples of classes and hierarchies generalising Horn clause- sets, including S C U R (introduced in [141] to capture classes of clause-set solvable via UCP (ri); discussed in Section 4.1 of C hapter 4), S C U R (k ) and S C U R * (k ) (based on SCU'R, and introduced in [36,10]), ( n f c ) f c e N0and ( Tk) ken0(based on nested structures of renam able Horn clause-sets and
introduced in [35], CANON(fc) (based on bounded depth resolution, and introduced in [36, 10]), as well as the G k (U ,S ) hierarchies from [104, 110] (on which for unsatisfiable clause-sets the hierarchy UCk in this thesis is based). These hierarchies are discussed in more detail in C hapter 4, where they are compared to th e hierarchies introduced in this thesis.