DeepAI
Log In Sign Up

An Application of Proof-Theory in Answer Set Programming

05/02/2009
by   V. W. Marek, et al.
0

We apply proof-theoretic techniques in answer Set Programming. The main results include: 1. A characterization of continuity properties of Gelfond-Lifschitz operator for logic program. 2. A propositional characterization of stable models of logic programs (without referring to loop formulas.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

04/25/2009

Guarded resolution for answer set programming

We describe a variant of resolution rule of proof and show that it is co...
04/26/2018

First-order answer set programming as constructive proof search

We propose an interpretation of the first-order answer set programming (...
09/21/2018

onlineSPARC: a Programming Environment for Answer Set Programming

Recent progress in logic programming (e.g., the development of the Answe...
09/30/2011

Properties and Applications of Programs with Monotone and Convex Constraints

We study properties of programs with monotone and convex constraints. We...
07/18/2022

Positive Dependency Graphs Revisited

Theory of stable models is the mathematical basis of answer set programm...
12/20/2013

An Algebra of Causal Chains

In this work we propose a multi-valued extension of logic programs under...
12/28/2010

On Elementary Loops of Logic Programs

Using the notion of an elementary loop, Gebser and Schaub refined the th...

1 Introduction

The use of proof theory in logic based formalisms for constraint solving is pervasive. For example, in Satisfiability (SAT), proof theoretic methods are used to find lower bounds on complexity of various SAT algorithms. However, proof-theoretic methods have not played as prominent role in Answer Set Programming (ASP) formalisms. This is not to say that there were no attempts to apply proof-theoretic methods in ASP. To give a few examples, Marek and Truszczynski in [MT93] used the proof-theoretic methods to characterize Reiter’s extensions in Default Logic (and thus stable semantics of logic programs). Bonatti [Bo04] and separately Milnikel [Mi05] devised non-monotonic proof systems to study skeptical consequences of programs and default theories. Lifschitz [Li96] used proof-theoretic methods to approximate well-founded semantics of logic programs. Bondarenko et.al. [BTK93] studied an approach to stable semantics using methods with a clear proof-theoretic flavor. Marek, Nerode, and Remmel in a series of papers, [MNR90a, MNR90b, MNR91, MNR92, MNR94a, MNR94b], developed proof theoretic methods to study what they termed non-monotonic rule systems which have as special cases almost all ASP formalisms that have been seriously studied in the literature. Recently the area of proof systems for ASP (and more generally, nonmonotonic logics) received a lot of attention [GS07, JO07]. It is clear that the community feels that an additional research of this area is necessary. Nevertheless, there is no clear classification of proof systems for nonmonotonic reasoning analogous to that present in classical logic, and SAT in particular.

In this paper, we define a notion of -proof schemes, which is a kind of a proof system that was previously used by Marek, Nerode, and Remmel to study complexity issues for stable semantics of logic programs [MNR94a]. This proof system abstracts of -proofs of [MT93] and produces Hilbert-style proofs. The nonmonotonic character of our -proofs is provided by the presence of guards, called the support of the proof scheme, to insure context-dependence. A different but equivalent, presentation of proof schemes, using a guarded resolution is also possible [MR09].

We shall show that we can use -proof schemes to find a characterization of stable models via reduced defining equations. While in general these defining equations may be infinite, we study the case of programs for which all these equations are finite. This resulting class of programs, called FSP-programs, turn out to be characterized by a form of continuity of the Gelfond-Lifschitz operator.

1.1 Contributions of the paper

The contributions of this paper consist, primarily of investigations that elucidate the proof-theoretical character of the stable semantics for logic programs, an area with 20 years history [GL88]. The principal results of this paper are:

  1. We show that the Gelfond-Lifschitz operator is, in fact a proof-theoretical construct (Proposition 4.3)

  2. As a result of the analysis of the Gelfond-Lifschitz operator we are able to show that the upper-half continuity of that operator is equivalent to finiteness of (propositional) formulas in a certain class associated with the program (Proposition 4.6)

We also discuss possible extension of these results to the case of programs with cardinality constraints.

2 Preliminaries

Let be a countably infinite set of atoms. We will study programs consisting of clauses built of the atoms from . A program clause is a string of the form

(1)

The integers or or both can be . The atom will be called the head of and denoted . We let denote the set and denote the set . For any set of atoms , we let denote the conjunction of negations of atoms from . Thus, we can write clause (1) as

Let us stress that the set is a set of atoms, not a set of negated atoms as is sometimes used in the literature. A normal propositional program is a set of such clauses. For any , we say that is model of if whenever and , then . We say that is a model of a program if is a model of each clause . Horn clauses are clauses with no negated literals, i.e. clauses of the form (1) where . We will denote by the part of the program consisting of its Horn clauses. Horn programs are logic programs consisting entirely of Horn clauses. Thus for a Horn program , .

Each Horn program has a least model over the Herbrand base and the least model of is the least fixed point of a continuous operator representing one-step Horn clause logic deduction ([L89]). That is, for any set , we let equal the set of all such that there is a clause in and . Then has a least fixed point which is obtained by iterating starting at the empty set for steps, i.e., where for any , and . Then is the least model of .

The semantics of interest for us is the stable semantics of normal programs, although we will discuss some extensions in Section LABEL:ext. The stable models of a program are defined as fixed points of the operator . This operator is defined on the set of all subsets of , . If is a program and is a subset of the Herbrand base, define operator as follows:

The following is immediate, see [Ap90] for unexplained notions.

Proposition 2.1

For every program and every set of atoms the operator is monotone and continuous.

Thus the operator like all monotonic continuous operators, possesses a least fixed point .

Given program and , we define the Gelfond-Lifschitz reduct of , , as follows. For every clause of , execute the following operations.
(1) If some atom , , belongs to , then eliminate altogether.
(2) In the remaining clauses that have not been eliminated by operation (1), eliminate all the negated atoms.
The resulting program is a Horn propositional program. The program possesses a least Herbrand model. If that least model of coincides with , then is called a stable model for . This gives rise to an operator which associates to each , the least fixed point of . We will discuss the operator and its proof-theoretic connections in section 4.2.

3 Proof schemes and reduced defining equations

In this section we recall the notion of a proof scheme as defined in [MNR90a, MT93] and introduce a related notion of defining equations.

Given a propositional logic program , a proof scheme is defined by induction on its length. Specifically, a proof scheme w.r.t. (in short -proof scheme) is a sequence subject to the following conditions:
(I) when , is a -proof scheme if , , , and and
(II) when is a -proof scheme,
is a clause in the program , and , then

is a -proof scheme.
When is a -proof scheme, then we call (i) the integer – the length of , (ii) the set – the support of , and (iii) the atom – the conclusion of . We denote by .

Example 3.1

Let be a program consisting of four clauses: , , , and . Then we have the following examples of -proof schemes:

  1. is a -proof scheme of length with conclusion and empty support.

  2. is a -proof scheme of length with conclusion and support .

  3. is a -proof scheme of length with conclusion and support .

  4. is a -proof scheme of length with conclusion and support .

Proof scheme in (c) is an example of a proof scheme with unnecessary items (the first term). Proof scheme (d) is an example of a proof scheme which is not internally consistent in that is in the support of its proof scheme and is also its conclusion.

A -proof scheme carries within itself its own applicability condition. In effect, a -proof scheme is a conditional proof of its conclusion. It becomes applicable when all the constraints collected in the support are satisfied. Formally, for any set of atoms , we say that a -proof scheme is -applicable if . We also say that admits if is -applicable.

The fundamental connection between proof schemes and stable models [MNR90a, MT93] is given by the following proposition.

Proposition 3.1

For every normal propositional program and every set of atoms, is a stable model of if and only if the following conditions hold.

  1. For every , there is a -proof scheme with conclusion such that admits .

  2. For every , there is no -proof scheme with conclusion such that admits .

Proposition 3.1 says that the presence and absence of the atom in a stable model depends only on the supports of proof schemes. This fact naturally leads to a characterization of stable models in terms of propositional satisfiability. Given , the defining equation for w.r.t. is the following propositional formula:

(2)

where is the list of all supports of -proof schemes. Here for any finite set of atoms, If is not the conclusion of any proof scheme, then we set the defining equation of to be . In the case, where all the supports of proof schemes of are empty, we set the defining equation of to be . Up to a total ordering of the finite sets of atoms such a formula is unique. For example, suppose we fix a total order on , . Then given two sets of atoms, and , we say that , if either (i) , (ii) and , or (iii) , , and is lexicographically less than . We say that (2) is the defining equation for relative to if . We will denote the defining equation for with respect to by .

For example, if is a Horn program, then for every atom , either the support of all its proof schemes are empty or is not the conclusion of any proof scheme. The first of these alternatives occurs when belongs to the least model of , . The second alternative occurs when . The defining equations are (that is ) when and (that is ) when . When is a stratified program the defining equations are more complex, but the resulting theory is logically equivalent to

where is the unique stable model of .

Let be the set . We then have the following consequence of Proposition 3.1.

Proposition 3.2

Let be a normal propositional program. Then stable models of are precisely the propositional models of the theory .

When is purely negative, i.e. all clauses of have , the stable and supported models of coincide [DK89] and the defining equations reduce to Clark’s completion [Cl78] of .

Let us observe that in general the propositional formulas on the right-hand-side of the defining equations may be infinite.

Example 3.2

Let be an infinite program consisting of clauses , for all . In this case, the defining equation for in is infinite. That is, it is

The following observation is quite useful. If are two finite sets of propositional atoms then

Here is the propositional consequence relation. The effect of this observation is that not all the supports of proof schemes are important, only the inclusion-minimal ones.

Example 3.3

Let be an infinite program consisting of clauses , for all . The defining equation for in is

which is infinite. But our observation above implies that this formula is equivalent to the formula

Motivated by the Example 3.3, we define the reduced defining equation for relative to to be the formula

(3)

where range over inclusion-minimal supports of -proof schemes for the atom and . Again, if is not the conclusion of any proof scheme, then we set the defining equation of to be . In the case, where there is a proof scheme of with empty support, then we set the defining equation of to be . We denote this formula as , and define to be the theory consisting of for all . We then have the following strengthening of Proposition 3.2.

Proposition 3.3

Let be a normal propositional program. Then stable models of are precisely the propositional models of the theory .

In our example 3.3, the theory involved formulas with infinite disjunctions, but the theory contains only normal finite propositions.

Given a normal propositional program , we say that is a finite support program (FSP-program) if all the reduced defining equations for atoms with respect to are finite propositional formulas. Equivalently, a program is an FSP-program if for every atom there is only finitely many inclusion-minimal supports of -proof schemes for .

4 Continuity properties of operators and proof schemes

In this section we investigate continuity properties of operators and we will see that one of those properties characterizes the class of FSP programs.

4.1 Continuity properties of monotone and antimonotone operators

Let us recall that denotes the set of all subsets of . We say that any function is an operator on the set of propositional atoms. An operator is monotone if for all sets , implies . Likewise an operator is antimonotone if for all sets , implies . For a sequence of sets of atoms, we say that is monotonically increasing if for all , implies and we say that is monotonically decreasing if for all , implies .

There are four distinct classes of operators that we shall consider in this paper. First, we shall consider two types of monotone operators, upper-half continuous monotone operators and lower-half continuous monotone operators. That is, we say that a monotone operator is upper-half continuous if for every monotonically increasing sequence , We say that a monotone operator is lower-half continuous if for every monotonically decreasing sequence , In the Logic Programming literature the first of these properties is called continuity. The classic result due to van Emden and Kowalski is the following.

Proposition 4.1

For every Horn program , the operator is upper-half continuous.

In general, the operator for Horn programs is not lower-half continuous. For example, let be the program consisting of the clauses for . Then the operator is not lower-half continuous. That is, if , then clearly for all . However, and .

Lower-half continuous monotone operators have appeared in the Logic Programming literature [Do94]. Even more generally, for a monotone operator , let us define its dual operator as follows:

Then an operator is upper-half continuous if and only if is lower-half continuous [JT51]. Therefore, for any Horn program , the operator is lower-half continuous.

In case of antimonotone operators, we have two additional notions of continuity. We say an antimonotone operator is upper-half continuous if for every monotonically increasing sequence , Similarly, we say an antimonotone operator is lower-half continuous if for every monotonically decreasing sequence , .

4.2 Gelfond-Lifschitz operator and proof-schemes

For the completeness sake, let us recall that the Gelfond-Lifschitz operator for a program which we denote , assigns to a set of atoms the least fixpoint of of the operator or, equivalently, the least model of the program which is the Gelfond-Lifschitz reduct of via [GL88]. The following fact is crucial.

Proposition 4.2 ([Gl88])

The operator is antimonotone.

Here is a useful proof-theoretic characterization of the operator .

Proposition 4.3

Let be a normal propositional program and be a set of atoms. Then

Proof: Let us assume that that is . As is the least model of the Horn program , . Then it is easy to prove by induction on , that if , then there is a -proof scheme such that is the conclusion of and is admitted by . Conversely, we can show, by induction on the length of the -proof schemes, that whenever such -proof scheme is admitted by , then belongs to .

4.3 Continuity properties of the operator

This section will be devoted to proving results on the continuity properties of the operator . First, we prove that for every program , the operator is lower-half continuous. We then show that if is a lower-half continuous antimonotone operator, then for a suitably chosen program . Finally, we show that the operator is upper-half continuous if and only if is an FSP-program. That is, is upper-half continuous if for all atoms the reduced defining equation for any (w.r.t. ) is finite.

Proposition 4.4

For every normal program , the operator is lower-half continuous.

Proof: We need to prove that for every program and every monotonically decreasing sequence ,

Our goal is to prove two inclusions: , and .
We first show . Since

for every , by antimonotonicity of we have

As is arbitrary,

Thus the inclusion holds.
Conversely, let . Then, by Proposition 4.3, there must be a proof scheme with support support and conclusion such that

But the family is monotonically descending and the set is finite. Thus there is an integer so that

This, however, implies that , and thus

As is arbitrary, the inclusion holds. Thus .

The lower-half continuity of antimonotone operators is closely related to programs, as shown in the following result.

Proposition 4.5

Let be a denumerable set of atoms. Let be an antimonotone and lower-half continuous operator on . Then there exists a normal logic program such that .

Proof.

We define the program as follows:

We claim that , that is, for all , .

Let be given. We consider two cases.
Case 1: is cofinite, . We need to prove two inclusions, (a) and (b) .
For (a), note that if , then the clause belongs to . Hence belongs to and .

For (b), note that if , then given the form of the clauses in , there must be some clause in where . But this means that . Since is antimonote and , we must have

and, hence, . Thus .
 
Case 2: is not cofinite. Let be an enumeration of . Let . Then, clearly, for all . Moreover the sequence is monotonically decreasing and . Therefore, by our assumptions on the operator ,

Again, we need to prove two inclusions, (a) and (b) . For (a), note that if , then for some , . Therefore, for that , is a clause in . But then so that the clause is in and .

For the proof of (b), note that if , then because of the syntactic form of the clauses in our program there are atoms so that the clause belongs to the program , and . Thus and, hence, for some , . Now, consider such a . Since is cofinite, it follows from Case 1 that . Since , by the antimonotonicity of . But because and, hence, . But since , as desired.

We are now ready to prove the next result of this paper.

Proposition 4.6

Let be a normal propositional program. The following are equivalent:

  1. is an FSP-program.

  2. The operator is upper-half continuous, i.e.

    for every monotonically increasing sequence .

Proof: Two implications need to be proved: , and .
Proof of the implication . Here, assuming , we need to prove two inclusions:
(i) , and
(ii) .
To prove (i), note that since , we have

As is arbitrary,

This proves (i).
To prove (ii), let . Then, for every , and so, for every , there is an inclusion-minimal support for such that

But by (a) there are only finitely many inclusion-minimal supports for -proof schemes for . Therefore there is a support of an inclusion minimal support of a proof scheme of , , such that for infinitely many ’s

But the sequence is monotonically increasing. Therefore for all , . But then

so that . Thus (ii) holds and the implication follows.

To prove that , assume that the operator is upper-half continuous. We need to show that for every , the reduced defining equation for is finite. So let us assume that is not finite. This means that there is an infinite set , where , such that

  1. each is finite,

  2. the elements of are pairwise inclusion-incompatible, and

  3. for every set of atoms , if and only if for some , .

We will now define two sequences:

  1. a sequence of infinite sets of integers and

  2. a sequence of atoms.

We define , and we define as the first element of such that

is infinite. Clearly, is well-defined. We need to show that is well-defined. If is not well-defined, then for every there is an integer such that for all , . But is finite so taking , we find that for all , - which contradicts the fact that the sets in are pairwise inclusion-incompatible. Thus is well-defined. We now set

Clearly. is infinite.

Now, let us assume that we already defined and so that is an infinite subset of . We select as the first element so that

is infinite. Clearly, by an argument as above, there is such , and so is well-defined. We then set

Since for all , for all . By construction, the set is infinite.

Now, we complete the argument as follows. We set . The sequence is monotonically increasing. For each there is (in fact infinitely many ’s) so that . Therefore, for each , . Hence .

On the other hand, let . Then

By our construction, , and so . Therefore does not admit any -proof scheme for . Thus . But this would contradict our assumption that is upper-half continuous. Thus there can be no such and hence must be a FSP-program.

5 Extensions to -programs

In [SNS02] Niemelä and coauthors defined a significant extension of logic programming with stable semantics which allows for programming with cardinality constraints, and, more generally, with weight constraints. This extension has been further studied in [MR04, MNT07]. To keep things simple, we will limit our discussion to cardinality constraints only, although it is possible to extend our arguments to any class of convex constraints [LT05]. Cardinality constraints are expressions of the form , where , and is a finite set of atoms. The semantics of an atom is that a set of atoms satisfies if and only if . When , we do not write it, and, likewise, when , we omit it, too. Thus an atom has the same meaning as while has the same meaning as .

The stable semantics for -programs is defined via fixpoints of an analogue of the Gelfond-Lifschitz operator ; see the details in [SNS02] and [MR04]. The operator in question is neither monotone nor antimonotone. But when we limit our attention to the programs where clauses have the property that the head consists of a single atom (i.e. are of the form ), then one can define an operator which is antimonotone and whose fixpoints are stable models of . This is done as follows.
 
Given a clause

we transform it into the clause

(4)

[MNT07]. We say that a clause of the form (4) is a -Horn clause if it is of the form

(5)

A -Horn program is a -program all of whose clauses are of the form (5). If is a -Horn program, we can define the analogue of the one step provability operator by defining that for a set of atom ,

(6)

It is easy to see that is monotone operator that the least fixed point of is given by

(7)

We can define the analogue of the Gelfond-Lifschitz reduct of a -program, which we call the -reduct of , as follows. Let denote the set of all transformed clauses derived from . Given a set of atoms , we eliminate from those clauses where some upper-constraint () is not satisfied by , i.e. . In the remaining clauses, the constraints of the form are eliminated altogether. This leaves us with a -Horn program . We then define to be the least fixed point of and say that is a -stable model if . The equivalence of this construction and the original construction in [SNS02] for normal -programs is shown in [MNT07].

Next we define the analogues of -proof schemes for normal -programs, i.e. programs which consists entirely of clauses of the form (4). This is done by induction as follows. When

is a normal -clause without the cardinality-constraints of the form then

is a --proof scheme with support . Likewise, when

is a --proof scheme,

is a clause in , and , , , then

is a --proof scheme with support . The notion of admittance of a --proof scheme is similar to the notion of admittance of -proof scheme for normal programs . That is, if is a -proof scheme with support , then is admitted by if for every , , i.e. .

Similarly, we can associate a propositional formula so that admits if and only if as follows:

(8)

Then we can define a partial ordering on the set of possible supports of proof scheme by defining . For example if , and , then

Then clearly so that . We then define a normal propositional -program to be FPS -program if for each , there are finitely many -minimal supports of --proof schemes with conclusion .

We can also define analogue of the defining equation of relative to a normal -program as

(9)

where is a list of supports of all --proofs schemes with conclusion . Again up to a total ordering of possible finite supports, this formula is unique. Let be the set . Similarly, we define the reduced defining equation for relative to to be the formula

(10)

where range over -minimal supports of --proof schemes for the atom .

Then we have the following analogues of Propositions 3.1 and 3.2.

Proposition 5.1

For every normal propositional -program and every set of atoms, is a -stable model of if and only if the following two conditions hold:

  1. for every