EVAL PTHEOREM (mknot (Tsunshining), C2)

2 downloads 0 Views 247KB Size Report
And McCarthy asks \Why don't they use the bridge?" and he says that ... information and the answer \I don't know" comes out as the result of not knowing. The.
EVAL PTHEOREM (mknot (Tsunshining), C2); ALLE AX4 Tsunshining C2 P; IMPE 2,3; ALLE AX2 Tsunshining , C2 , P; EVAL not Pconsist (Tsunshining, C2); IMPE 5, 6;

21

ATTACH mkands ATTACH PTHEOREM ATTACH Pconsist

TO [SETOFFACTS=WFF] TO [WFF,CONTEXT ] TO [WFF,CONTEXT ]

andsbuilder; PTHEOREM; Pconsist;

COMMENT | AXIOMS DEFINITION | AXIOM AX1: forall w c p. (IAC(p,c) and CBB(w,c,p) imp IAC(p,assert(w,c))); AXIOM AX2: forall w c p . (not Pconsist(w,c) imp not IAC(p,assert(w,c))); AXIOM AX3: forall w p c.(PTHEOREM (w,c) imp CBB(w,c,p)); AXIOM AX4: forall w c p.(PTHEOREM (mknot(w),c) imp not(CBB(w,c,p))); AXIOM AX5: forall p c. (CBB(Tnoon,c,p) and Pconsist(Tsunshining,c) imp CBB(Tsunshining,c,p)); AXIOM AX6: forall w c.(Pconsist(w,c) iff not TAUT(mkimp (mkands (setoffacts(c)),mknot(w)),c)); AXIOM AX7: forall c. (PCONSIST (c) iff Pconsist(True,c)); AXIOM AX8: forall w c. (PTHEOREM(w,c) iff TAUT(mkimp (mkands (setoffacts(c)),w),c)); COMMENT | EXTERNAL CONTEXTS BUILDING | NAMEPROOF PRF1; LET C0 TO [CONTEXT] dclSentconst(Tnoon, dclSentconst(Tsunshining, dclSentconst(Teclipse,Emptycontext) ) ); LET C1 TO [CONTEXT] assert(Tnoon, assert(mkimp(Teclipse,mknot(Tsunshining)),C0)); ASSUME IAC(P,C1); ALLE AX1 Tsunshining, C1, P; ALLE AX5 P,C1; EVAL PTHEOREM (Tnoon,C1); ALLE AX3 Tnoon P C1; IMPE 7, 6; EVAL Pconsist(Tsunshining, C1); ANDI 8, 9; IMPE 10, 5; ANDI 3, 11; IMPE 4, 12; COMMENT | SECOND HALF OF THE PROOF IN C2 | MAKEPROOF PRF2; SWITCHPROOF PRF2; LET C2 TO [CONTEXT] assert(Teclipse,C1);

20

DECLARE FUNCONST mkands DECLARE FUNCONST setoffacts

(SETOFFACTS) =WFF; (CONTEXT) =SETOFFACTS;

Representations are the domains of interpretation of the constants in the language. In FOL you rst have to de ne the representations and then to use them as domains of interpretation of sorts. COMMENT | SIMULATION STRUCTURE DEFINITION | COMMENT | DOMAINS OF THE INTERPRETATIONS DEFINITION| DECREP WFF; DECREP CONTEXT; DECREP PROBLEM; DECREP SETOFFACTS; COMMENT | REPRESENT REPRESENT REPRESENT REPRESENT

REPRESENTING SORTS IN THE MODEL | {WFF} AS WFF; {CONTEXT} AS CONTEXT; {PROBLEM} AS PROBLEM; {SETOFFACTS}AS SETOFFACTS;

At this point all the HGKM de nitions of the functions which are the interpretation of (some of) the function and predicate symbols of the language should be de ned. This part is omitted because not very interesting. Their behaviour should be understood from their name and the descriptions given in the paper. The next step is to attach them to the symbols in the language. COMMENT | INTERPRETING THE CONSTANTS OF THE LANGUAGE | ATTACH Tnoon DAR [WFF] Noon; ATTACH Tsunshining DAR [WFF] Sunshining; ATTACH Teclipse DAR [WFF] Eclipse; HARDWARE Emptycontext DAR [CONTEXT] (cxtmakempty); COMMENT | INTERPRETING THE APPLICATION SYMBOLS OF THE LANGUAGE | ATTACH dclSentconst TO [WFF,CONTEXT=CONTEXT] contextdeclsentconst; ATTACH assert TO [WFF,CONTEXT=CONTEXT] contextmakassert; ATTACH mkimp TO [WFF,WFF =WFF] mkimp; ATTACH mknot TO [WFF =WFF] mknot; ATTACH TAUT TO [WFF,CONTEXT] CONTEXTTAUT; ATTACH PCONSIST TO [CONTEXT] PCONSIST; ATTACH setoffacts TO [CONTEXT=SETOFFACTS] getfacts;

19

Appendix B: The complete formalization of the example Some parts of example are commented in order to make the proof self-contained and clearer. In FOL , when starting a proof the user has to say everything. Nothing (but numerals with interpretation the naturals) is de ned by default. So the rst part of the proof is the de nition of the language and the Simulation Structure. The rst command names the current context. COMMENT | NON MONOTONIC LOGIC EXAMPLE | PROBE ALL; NAMECONTEXT PSC; COMMENT COMMENT DECLARE DECLARE

| LANGUAGE DEFINITION | | SORTS DEFININITION | SORT CONTEXT PROBLEM SETOFFACTS; SORT WFF;

COMMENT DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE

| VARIABLES AND CONSTANTS DEFINITION | INDCONST True [WFF]; INDCONST Tnoon Tsunshining Teclipse [WFF]; INDCONST C0 C1 C2 [CONTEXT]; INDCONST Emptycontext [CONTEXT]; INDCONST P [PROBLEM]; INDVAR w [WFF]; INDVAR c [CONTEXT]; INDVAR p [PROBLEM];

COMMENT COMMENT COMMENT DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE

| PREDICATES DEFINITION | | CBB: CAN BE BELIEVED | | IAC: IS AN APPROPRIATE CONTEXT | PREDCONST CBB 3; PREDCONST IAC 2; PREDCONST TAUT 2; PREDCONST PTHEOREM 2; PREDCONST Pconsist 2; PREDCONST PCONSIST 1;

COMMENT DECLARE DECLARE DECLARE DECLARE

| FUNCTIONS DEFINITION | FUNCONST mknot (WFF) =WFF; FUNCONST mkimp (WFF,WFF) =WFF; FUNCONST assert (WFF,CONTEXT)=CONTEXT; FUNCONST dclSentconst (WFF,CONTEXT)=CONTEXT;

18

FOL:: IMPI 1,9; 10 PTHEOREM(w,c) imp not Pconsist(w),c) FOL:: ALLI ^1 w c; 11 forall w c (PTHEOREM(w,c) imp not Pconsist(mknot(w),c))

A.2 Proving

``forall w c .

(not Pconsist(mknot(w),c) imp PTHEOREM(w,c))''

FOL:: MAKEPROOF PRF2; FOL:: SWITCHPROOF PRF2; FOL:: ASSUME not Pconsist(mknot(w),c); 1 not Pconsist(mknot(w),c) (1) FOL:: ALLE AX6 mknot(w) c; 2 Pconsist(mknot(w),c) iff not TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w))),c) FOL:: TAUT TAUT (mkimp (mkands (setoffacts(c)),mknot(mknot(w))),c) by 1,2; 3 TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w))),c) (1) FOL:: ALLE AX8 mknot(mknot(w)) c; 4 PTHEOREM(mknot(mknot(w)),c) iff TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w))),c) FOL:: IFFE 4,2; 5 TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w))),c) imp PTHEOREM(mknot(mknot(w)),c) FOL:: IMPE 5,3; 6 PTHEOREM(mknot(mknot(w)),c) (1) FOL:: ALLE 1 w c; 7 PTHEOREM(w,c) iff PTHEOREM(mknot(mknot(w)),c) FOL:: IFFE 7,2; 8 PTHEOREM(mknot(mknot(w)),c) imp PTHEOREM(w,c) FOL:: IMPE 8,7; 9 PTHEOREM(w,c) (1) FOL:: IMPI 1,9; 10 not Pconsist(mknot(w),c) imp PTHEOREM(w,c) FOL:: ALLI 10 w c; 11 forall w c (not Pconsist(mknot(w),c) imp PTHEOREM(w,c))

17

Appendix A: Proof of Theorem (8) The following theorem: forall w c .(PTHEOREM(w,c) i not Pconsist(mknot(w),c))

(8)

must be proved to hold in classical logic. In order to prove (8) we make use of the following (meta)axiom: forall w c . (PTHEOREM(w,c) i PTHEOREM(mknot(mknot(w)),c)) (9) which holds in classical logic. (9) is taken as an axiom but it can be easily proved (see [Men64, Wey82]). The proof is given using the FOL syntax. To save space not all the declarations are made. Individual constants and variables are of the sort (de ned in the example) suggested by their name. Constants and variables are written in small and capital letters respectively. The function, predicate symbols and axiom names are the same as those used in the example. The numbers at the end of the line (if they exist) are the list of dependencies [Pra65] of that fact. The proof is done proving that the implication holds in both directions.

A.1 Proving

``forall w c .

(P THEOREM(w,c) imp not Pconsist(mknot(w),c))''

FOL:: NAMEPROOF PRF1 FOL:: ASSUME PTHEOREM(w,c); 1 PTHEOREM(w,c) (1) FOL:: ALLE 1 w c; 2 PTHEOREM(w,c) iff PTHEOREM(mknot(mknot(w)),c) FOL:: IFFE ^1,1; 3 PTHEOREM(w,c) imp PTHEOREM(mknot(mknot(w)),c) FOL:: IMPE 1,3; 4 PTHEOREM(mknot(mknot(w),c)) (1) FOL:: ALLE AX8 mknot(mknot(w)) c; 5 PTHEOREM(mknot(mknot(w)),c) iff TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w)),c)) FOL:: IFFE ^1,1; 6 PTHEOREM(mknot(mknot(w)),c) imp TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w)),c)) FOL:: IMPE 4,^1; 7 TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w)),c)) (1) FOL:: ALLE AX6 mknot(w) c; 8 Pconsist(mknot(w),c) iff not TAUT(mkimp(mkands(setoffacts(c)),mknot(mknot(w)),c)) FOL:: TAUT not Pconsist(mknot(w),c) by 8,7; 9 not Pconsist(mknot(w),c) (1)

16

[Luk86] W. Lukaszewicz. Minimization of abnormality: a simple system for default reasoning. In Proc. 7th European Conference on Arti cial Intelligence, pages 382{389, Brighton, Great Britain, July 1986. [McC86] J. McCarthy. Applications of Circumscription to Formalizing Common-Sense Knowledge. Artif. Intell., 28(1):71{87, 1986. Also in V. Lifschitz (ed.), Formalizing common sense: papers by John McCarthy, Ablex Publ., 1990, pp. 198{225. [McC87] J. McCarthy. Generality in Arti cial Intelligence. Communications of ACM, 30(12):1030{1035, 1987. Also in V. Lifschitz (ed.), Formalizing common sense: papers by John McCarthy, Ablex Publ., 1990, pp. 226{236. [MD80] D. McDermott and J. Doyle. Non-Monotonic Logic I. Artif. Intell., 13(1,2):41{ 72, 1980. [Men64] E. Mendelson. Introduction to Mathematical Logic. Van Nostrand Reinhold, 1964. [MH69] J. McCarthy and P. Hayes. Some Philosophical Problems from the Standpoint of Arti cial Intelligence. In B. Meltzer and D. Michie, editors, Machine Intelligence 4, pages 463{502. Edinburgh University Press, 1969. Also in V. Lifschitz (ed.), Formalizing common sense: papers by John McCarthy, Ablex Publ., 1990, pp. 21{63. [Min81] M. Minsky. A framework for representing knowledge. In J. Haugeland, editor, MIND DESIGN. Philosophy, Psychology, Arti cial Intelligence, pages 95{128, Cambridge, Mass., 1981. The MIT Press. [Pra65] D. Prawitz. Natural Deduction - A proof theoretical study. Almquist and Wiksell, Stockholm, 1965. [Qui53] W. V. Quine. From a logical point of view. Harward University Press, 1953. [Rei78] R. Reiter. On closed world data bases. In H. Gallaire and J. Minker, editors, Logic and Data Bases. Plenum Press, 1978. [Wey80] R.W. Weyhrauch. Prolegomena to a Theory of Mechanized Formal Reasoning. Artif. Intell., 13(1):133{176, 1980. [Wey82] R.W. Weyhrauch. An Example of FOL Using Metatheory. Formalizing Reasoning and Introducing Derived Inference Rules. In Proceedings of the 6th Conference on Automatic Deduction, 1982.

15

(meta) facts about another theory T2 which, at the same time, contains some (di erent meta) facts about T1. This multi-context framework allows to build theories which are locally consistent (inside a context) but globally inconsistent (two contexts may contain two facts whose w s are one the negation of the other). The impossibility of representing inconsistencies inside rst order logic has always been one of the main issues against its use in knowledge representation as \human are demonstrably inconsistent". A good presentation of this point of view is in the Appendix 6: \Criticism of the logistic approach" of [Min81]. Contexts are a possible solution to this kind of problems. Let's reconsider McCarthy's discussion about cannibals and missionaries [McC87]. There are some cannibals and missionaries who want to get across the river using the boat. And McCarthy asks \Why don't they use the bridge?" and he says that circumscription gives you the opportunity to eliminate the fact that there is the bridge. In a multi-context approach the problem is solved from the other side and forces the user to state explicitly what is known. The system has always the possibility to give an answer, no matter how partial the theory of the world is. What exists is only positive information and the answer \I don't know" comes out as the result of not knowing. The answer to \where is the bridge?" is either \you have made a mistake in telling me what the problem is, you did not speak to me of bridge before" or \I have made a mistake in guring out in what is the right context where to solve the problem". The wrong answer may be due not only to a wrong axiomatization, but also to the non-appropriateness of the context for solving the problem. We have not eliminated a priori all the information not explicitly mentioned in the problem.

Acknowledgements This paper has been possible, because of the help of many people. Among them, the authors want to thank the latest collaborators, namely Dan Blom, Eliana Minicozzi, Daniele Nardi and Carolyn Talcott.

References [EMR85] D.W. Etherington, R.E. Mercer, and R. Reiter. On the adequacy of predicate circumscription for closed-world reasoning. Computational Intelligence, 1:11{ 15, 1985. [Fol] D. Follesdal. Quine on modality. In J. Hintikka D. Davindson, editor, Words and Objections, Essays on the work of W.V. Quine, pages 175{185. Reidel Publishing Company, Dordrecht, Holland, ? [Giu87] F. Giunchiglia. Brief considerations about knowledge, meaning and language. Memo, 1987. [Kri62] S. A. Kripke. Semantical considerations on modal logic. In Proc. A colloquium on Modal and Many-Valued Logics, Helsinki, 1962. 14

Comparing C1 and C2 it can be veri ed that there is no accessibility criterion or any explicit statement which allows to get to C2 from C1 (or vice-versa). There is no way of proving the \can be believed" part; there is no accessibility to the belief that the sun is shining. Moreover C2 is proved not to be an appropriate context to assume that there is sunshining. That is, it is proved to be a non-monotonic extension of C1. In FOL syntax: FOL:: EVAL PTHEOREM (mknot (Tsunshining),C2); 2 PTHEOREM(mknot(Tsunshining),C2) FOL:: ALLE AX4 Tsunshining C2 P 3 PTHEOREM(mknot (Tsunshining),C2) imp not CBB(Tsunshining,C2,P) FOL:: IMPE ^1, ^2 ; 4 not CBB(Tsunshining,C2,P) FOL:: ALLE AX2 Tsunshining , C2 , P; 5 not Pconsist (Tsunshining, C2) imp not IAC (P, assert(Tsunshining,C2)) FOL:: EVAL not Pconsist (Tsunshining, C2); 6 not Pconsist (Tsunshining, C2) FOL:: IMPE ^1,^2; 7 not IAC (P, assert (Tsunshining, C2))

In step 4 of the proof we have proved that Tsunshining cannot be believed if C2 is taken as the context where to solve the problem P. In step 7 we have proved that C2 is not the right context to assert that there is sunshining. Of course the two results are strictly related and, even if this fact hasn't been used, one implies the other. To get the fact number 7 directly from the fact number 4 we could have used theorem (8) (end of section 3.2).

4 Afterthoughts about our proposal This multi-context formalism is based on the idea that the user must be able to put the right assertions in the right context at the right level. This is the case, for instance, of CBB and IAC: the fact that something can be believed or is appropriate is a metatheoretic statement about whichever theory, also about the theory where they are de ned (in this case we would have self-reference). CBB and IAC are only examples of a more general way to do problem solving, they are useful in the de nition of one of the possible accessibility criterions valid in a multiple context framework. An approach which distinguishes between theory and metatheory can be seen as a particular case where we have only two contexts one playing rigidly as metatheory of the other. In this framework there are many more directions towards which you can move your axiomatization. Not only can you have as many contexts as you want but also chains (eventually closed) of theories. As a limit case, a theory T1 can contain some 13

8 CBB (Tnoon,C1,P) FOL:: EVAL Pconsist(Tsunshining, C1); 9 Pconsist(Tsunshining, C1) FOL:: ANDI ^2, ^1; 10 CBB(Tnoon,C1,P) and Pconsist(Tsunshining,C1)

The \^1" and \^2" tell FOL to use the last and the before the last steps of the current proof. Now it can be proved that, for the problem P, C1 is an appropriate context to assume that there is sunshining. FOL:: IMPE ^1, 5; 11 CBB(Tsunshining,C1,P) FOL:: ANDI 3, ^1; 12 IAC(P,C1) and CBB(Tsunshining,C1,P) FOL:: IMPE 4, ^1; 13 IAC(P, Assert (Tsunshining,C1))

On the other hand, in a slightly modi ed context C2 which knows all what is known in C1 plus the fact that right now there is an eclipse we get opposite results. Let's start up a new proof in PSC (let's call it PRF2) and build C2 taking C1 and adding a new fact: FOL:: MAKEPROOF PRF2; FOL:: SWITCHPROOF PRF2; FOL:: LET C2 = [CONTEXT] assert(Teclipse,C1);

Looking at the trace it can be seen that the new context is created taking the interpretation of C1 and adding one more line to its proof. FOL:: I am doing the command: LET ... ctext-get: I changed context to: C1 3

Eclipse

(3)

ctext-get: I changed context to: PSC ... 1 C2 = assert (Teclipse,C1)

12

FOL:: ASSUME IAC(P,C1); 3 IAC(P,C1) (3) FOL uses a generalized and also (a little) modi ed version of the system of Natural Deduction as de ned by Prawitz [Pra65]. The command ASSUME causes FOL to take the w which is its argument as assumption. The introduction and elimination inference rules are commands whose name is build as the concatenation of the name of the connective and an \I" or an \E" (i.e. \and elimination": ANDE, \and introduction": ANDI). We are trying to prove C1 is an appropriate context. In order to do that we have to use the axiom AX1 and istantiate it (with a \forall elimination") to the problem P, the context C1 and the w Tsunshining: FOL::ALLE AX1 Tsunshining, C1, P; 4 (IAC(P,C1) and CBB(Tsunshining,C1,P)) imp IAC(P,assert(Tsunshining,C1))

Having assumed IAC(P,C1) and proving CBB(Tsunshining,C1,P) with an \and introduction" and an \imp elimination" the thesis (which is the right hand side of (4)) can then be proved. In order to prove CBB(Tsunshining,C1,P) we use McDermott's principle (axiom AX5) suitably instantiated for our problem. FOL:: ALLE AX5 P,C1; 5 (CBB(Tnoon,C1,P) and Pconsist(Tsunshining,C1)) imp CBB(Tsunshining,C1,P)

The problem is now shifted to proving the right hand side of (5), that is to proving the two parts and then to make another \and introduction". In order to prove CBB(Tnoon,C1,P) we verify that Tnoon is a theorem of C1 and then we use axiom AX3. This can be done asking the FOL evaluator (command EVAL) whether or not in the simulation structure Noon turns out to be a theorem of C1 (which it is, by the step (2) of the proof and axiom AX8). In the same way, asking the evaluator, Pconsist(Tsunshining,C1) can be proved (by axiom AX6). So we have: FOL:: EVAL PTHEOREM (Tnoon,C1); 6 PTHEOREM(Tnoon,C1) FOL:: ALLE AX3 Tnoon P C1; 7 PTHEOREM (Tnoon,C1) imp CBB (Tnoon,C1,P) FOL:: IMPE ^1, ^2;

11

indicates the sort of C0. C0 is built taking the empty context and adding (one by one) the symbols to its language (using dclSentconst). The result is the creation of the rst step of PRF1 (as indicated by the number 1 at the beginning of the line). 1 C0 = dclSentconst (Tnoon, dclSentconst (Tsunshining, dclSentconst (Teclipse, Emptycontext)));

Now the context where to work can be created. We have to decide which facts we are willing to accept as true. Let's suppose we have a context C1 which knows that it is noon and that \If there is an eclipse then there is not sunshining": ATTACH ATTACH ATTACH LET C1

assert TO [WFF,CONTEXT = CONTEXT] contextmakassert; mkimp TO [WFF,WFF = WFF] mkimp; mknot TO [WFF = WFF] mknot; = [CONTEXT] assert(Tnoon, assert(mkimp(Teclipse,mknot(Tsunshining)),C0));

The interpretation of C1 is built in the model taking C0 and building in it a little proof where the two facts are stated. Looking at the trace (the FOL prompt FOL:: is indicated to di erentiate the input to FOL from its output: FOL:: I am doing the command: LET ... ctext-get: I changed context to: C0 1 Eclipse imp not Sunshining ... 2 Noon

(1) (2)

ctext-get: I changed context to: PSC ... 2 C1 = assert (Tnoon, assert (mkimp(Teclipse,mknot(Tsunshining)),CO))

After the process of evaluation in the SS of all the constants, FOL goes into the context C0 where it asserts two facts (line 1 and 2 of the proof of the trace). Then it gets back to PSC where, since the evaluation has succeeded, it asserts the line 2 of PRF1 (last line of the trace). The problem P can be now solved in C1. The question is: is C1 an \appropriate context" to assert that the sun is shining? Let's suppose that C1 is actually an appropriate context where to solve the problem P. In FOL syntax: 10

3.3 The proof

The rst step is to build the contexts where we want to give the answer to the problems Mcdermott and Doyle are speaking about. The proofs are built making use of the Simulation Structure (SS) facilities of FOL . In PSC three names of contexts are de ned and are attached, in the SS, to three contexts. Proofs in these contexts are done by evaluation in the SS of PSC of statements (in PSC about them3. So the rst step of the proof (let's name if PRF1) is to build a context C0 which knows of Noon, Sunshining and Eclipse. This context has no facts, only the above three propositional constants. In FOL syntax: DECLARE INDCONST Teclipse [WFF]; DECLARE INDCONST Emptycontext [CONTEXT]; DECLARE FUNCONST dclSentconst (WFF,CONTEXT) = CONTEXT; ATTACH Tnoon DAR Noon; ATTACH Tsunshining DAR Sunshining; ATTACH Teclipse DAR Eclipse; HARDWARE Emptycontext DAR (ctextmakempty); ATTACH dclSentconst TO [WFF,CONTEXT = CONTEXT] contextdeclsentconst; NAMEPROOF PRF1; LET C0 = [CONTEXT] dclSentconst(Tnoon, dclSentconst(Tsunshining, dclSentconst(Teclipse,Emptycontext) ))

The commands ATTACH and HARDWARE assign to their rst argument (which must be an element of the language) their last argument as interpretation in the simulation structure. HARDWARE di ers from ATTACH since, when making the attachment, it (lisp) evaluates its last argument (ctextmakempty) in the example above). In the language of PSC the individual constants Tnoon, Tsunshining and Teclipse are the names of the objects (w s in the underlying context) Noon, Sunshining and Eclipse, contextdeclsentconst and cxtmakempty are two HGKM functions (HGKM is a language developed at Stanford by the FOL group. FOL is written in HGKM). contextdeclsentconst gets a context and a sentential constant and returns a new context which is the old one with the sentential constant in the language. More precisely: contextdeclsentconst(SENTCONST,) =

The e ect of the FOL command LET is to evaluate in the SS the left hand side of the equality and, if the evaluation succeeds, to attach to the individual constant on the left hand side of the equality (C0 in this case) the result of the evaluation. CONTEXT 3 By \evaluation in the SS" it is meant the actual running of the FOL evaluator in the partial model built by the user using the commands ATTACH and HARDWARE

9

3.2 Some principles for propositional deduction

In order to carry out the example some more deduction machinery must be set up. A rst concept is that of propositional consistency: Pconsist takes a w w, a context c. The idea is that Pconsist(w,c) is true if the w w is propositionally consistent with the context c. Since a context is a nite structure and has a nite number of facts in it, this is a decidable predicate. The consistency can be proved taking the conjunction of all the facts and verifying if the negation of the w can be derived from it (FOL is able to check tautologies). The w w is propositionally consistent with the facts of the context c if and only if this is not the case. In FOL syntax: DECLARE SORT SETOFFACTS; DECLARE PREDCONST TAUT (WFF,CONTEXT); DECLARE FUNCONST mkimp (WFF,WFF) = WFF; DECLARE FUNCONST mkands (SETOFFACTS) = WFF; DECLARE FUNCONST setoffacts (CONTEXT) = SETOFFACTS; AXIOM AX6: forall w c.(Pconsist(w,c) iff not TAUT(mkimp(mkands(setoffacts(c)),mknot(w)),c));

A variable of sort SETOFFACTS is interpreted in the SS as a set of facts. The function takes a context and returns the set of all the facts of the context; mkands takes a set of facts and returns a w which is the conjunction of all the w s belonging to the facts; mkimp takes two w s and makes a new w which is their implication. TAUT takes a w and holds if and only if the w is a tautology. Pconsist(w,c) can now be used to axiomatize the concept of consistent context: setoffacts

DECLARE INDCONST True [WFF]; DECLARE PREDCONST PCONSIST (CONTEXT); AXIOM AX7: forall c. (PCONSIST (c) iff Pconsist(True,c));

is an individual constant interpreted in the SS as TRUE. PCONSIST takes a context and holds if and only if the set of facts of the context are mutually consistent. AX7 says that a set of facts is consistent if and only if it is (propositionally) consistent with the propositional constant True. The consistency of a set of facts is derived from the more general concept of \consistency with respect to a w ". Analogously we can de ne the concept of theorem in propositional logic: True

AXIOM AX8: forall W c.(PTHEOREM(w,c) iff TAUT(mkimp (mkands(setoffacts(c)),c)c));

A w w is a propositional theorem if and only if the implication of the conjunction of all the facts in the theory and w itself is a tautology. The concept of propositional theorem and propositional consistency, as de ned by the axioms AX7 and AX8 are clearly related. The following theorem for classical logic can in fact be proved (see appendix A for the proof): forall w c .(PTHEOREM(w,c) i not Pconsist(mknot(w),c)) (8) Getting 8 as an axiom (or proving it) could simplify (the second part of) the proof. We have not used 8 since useless to our goals.

8

for doing problem solving. Essentially it says that, starting from a consistent context, problem solving must be done in consistent contexts. Using axiom AX1, having proved CBB(w,c,p), eventually a new context can be created2. We need some more facts about CBB. For instance it is obvious that if a w is a theorem it can be believed and that, on the other hand, if its negation is a theorem, it cannot be believed. DECLARE FUNCONST mknot (WFF) = WFF; DECLARE PREDCONST PTHEOREM (WFF,CONTEXT); AXIOM AX3: forall w p c.(PTHEOREM (w,c) imp CBB(w,c,p)); AXIOM AX4: forall w p c.(PTHEOREM (mknot(w),c) imp not (CBB(w,c,p)));

takes a w and returns a new w which is its negation. PTHEOREM(w,c) holds when the w w is a (propositional) theorem in the context c. More axioms can be created depending on which problem solving strategies are of interest. For instance some form of closed world assumption (CWA) [Rei78] for classical logic can be stated:

mknot

forall w p c. not PTHEOREM (w,c) imp CBB(mknot(w),c,p) (6) ((6) is a multi-context translation of the version of CWA given in [Rei78]). Some form of Open World Assumption (OWA) can also be asserted: forall w p c. not PTHEOREM(w,c) and not PTHEOREM(mknot(w),c) imp not CBB(w,c,p) and not CBB(mknot(w),c,p) (7) The argument used in the proof is very simple, oriented to the solution of this particular example. A multi-context version of the argument McDermott makes in [MD80] is de ned: DECLARE INDCONST Tnoon Tsunshining [WFF]; AXIOM AX5: forall p c. (CBB(Tnoon,c,p) and Pconsist(Tsunshining,c) imp CBB(Tsunshining,c,p));

and Tsunshining are individual constants of sort WFF. Tnoon can be intuitively interpreted as \It is noon"; Tsunshining as \The sun is shining". AX5 is to be read: if Tnoon can be believed relatively to the problem p in the context c and Tsunshining is consistent in the context c then, for that problem and context, Tsunshing can be believed. This is the mechanizable proof theoretical translation of the intuitive description of M . Actually AX5 is a slight modi cation of the original argument. CBB(w,c,p) doesn't necessarily mean that w gets asserted, which is what actually McDermott does. CBB(w,c,p) is weaker than asserting the w w itself. So AX5 is in some sense stronger and weaker than the one used by McDermott (CBB appears both in the premise and in the conclusion). The same consideration applies to 6 and 7, in particular, substituting CBB with PTHEOREM, 7 would become tautologically true. Tnoon

2 The new context can be update an old one or be a completely new one; the intensional aspects of the theory are out of the goals of this paper, the example is discussed only from an extensional point of view.

7

for the problem solving activity. The concept of accessibility must be relativized to the current state of the proof. Let's now de ne two predicates: Is-an-Appropriate-Context IAC(p,c) which takes a problem p and a context c and Can-Be-Believed CBB(w,p,c) which takes a w w, a problem p and a context c. The idea is that IAC(p,c) should be true if and only if w is plausible with respect to p and c. Even if not very much is known about these predicates (what does it mean that \I believe something" or that \this context is the right one"?), they can be used to build some principles self-evident and correct in anyone's understanding of problem solving. The claim is that this is the right proof-theoretic way of thinking about problem-solving: you do not need to know everything of what is being formalized, you only want to have the right answers to your questions and problems. People have a sort of understanding of what means to be an appropriate context or that something can be believed which is independent of any context or problem, but they are very far from knowing everything of it. The proposed solution is to de ne predicates (like CBB and IAC) with which to build axioms self evident in anyone's understanding of the notions involved in any problem solving. So a rst accessibility criterion which makes use of CBB and IAC can be de ned: DECLARE SORT WFF; DECLARE INDVAR w [WFF]; DECLARE PREDCONST CBB (WFF,CONTEXT,PROBLEM); DECLARE PREDCONST IAC (PROBLEM,CONTEXT); DECLARE FUNCONST assert (WFF,CONTEXT) = CONTEXT; AXIOM AX1: forall w c p. (IAC(p,c) and CBB(w,c,p) imp IAC(p,assert(w,c)));

is a variable over w s, CBB is de ned as a predicate constant with three arguments, the rst of sort WFF, the second of sort CONTEXT and the third of sort PROBLEM. IAC takes a problem and a context, assert is a function which takes a context and a w and makes a new context. In AX1, inside the forall, the premise of the implication if true means that the context c is an appropriate place to solve the problem p and that there are good reasons for thinking that a particular w w can be believed in this context with respect to this problem. The conclusion says that (when the premise is true) we can get w as a theorem. This is a positive statement about how to use a new context where w is believed as true. It is a kind of accessibility criterion: if w can be believed and c is appropriate then a new context (created adding w to c) can be accessed. Using the concept of propositional consistency (see next subsection for its de nition) an obvious principle about IAC can be stated: w

DECLARE PREDCONST Pconsist (WFF,CONTEXT); AXIOM AX2: forall w c p . (not Pconsist(w,c) imp not IAC(p,assert(w,c)));

takes a w and a context and should be true when the w is consistent with the w s of the context. The axiom says that if the w w is not consistent with the current context c the context created from c adding w is not an appropriate context

Pconsist

6

instance that the sun is shining) and in this case we assert it without any modal operator or we don't know (or we don't believe) it and the resulting worlds are di erent. On the other hand, if the issue is to reason about reasoning, this kind of problem solving is di erent and should be distinguished from that done in the theory which is reasoned about. It should be done in another context with, for example, a di erent language. For instance, if we want to reason about the fact that there is an eclipse we must be able to name it. Analogously, we must have a name for the fact that there is sunshining, we must have the possibility to state the fact that a w is consistent with the theory under study and so on.

3.1 Some principles for problem solving

How should we think about problem solving? Which principles are used when solving a problem? A theory of problem solving must contain principles which take into account the kind of puzzle being solved. This means that there must be variables and constants p1, : : : , pn, P which range over problems, in rst order logic individual constants and individual variables of sort PROBLEM. In FOL syntax this can be stated as: DECLARE SORT PROBLEM; DECLARE INDCONST P [PROBLEM]; DECLARE INDVAR p [PROBLEM];

In words, PROBLEM has been de ned as SORT (sorts can be thought as predicate constants with one argument) and then P and p have been de ned as individual constant and individual variable respectively of this sort. Analogously there are solutions. Actually, once accepted that the world is described as a set of theories, anything stated must be relativized to the context where the reasoning is being done. Problems and solutions exist only inside the environment where they are worked out. In FOL syntax (solutions have not been de ned since useless in the present formalization): DECLARE SORT CONTEXT; DECLARE INDCONST C0 C1 C2 [CONTEXT]; DECLARE INDVAR c [CONTEXT];

When reasoning, people seem to be able to switch the focus of their attention and make always some sort of \local" reasoning. FOL gives the possibility to create (n+1) contexts

C1 : : :; Cn and Cc with always only one current context Cc (where deduction is being done), to work

and switch in any of them. The problem consists of giving criteria, a law, which tells us, being in Cc, which contexts can be reached and under which conditions. In other words, what is needed is some sort of accessibility criterion a la Kripke [Kri62]. This is actually not sucient because it is also necessary to know when to change context, namely whether or not, at a certain step of the proof, the current context is appropriate 5

reasoning of the overall system can be non-monotonic. But non-monotonicity does not need to be in the language, it may come from the behaving of the system, for instance from changing the context where the problem solving is done. The non-monotonicity gets pushed into having the right objects around to talk about, into putting the information into the right context. This is why the non-monotonicity McDermott and Doyle are speaking about is non-essential: this kind of reasoning can be monotonically described inside rst order logic by axiomatizing its metatheory (metatheories). So far contexts have been described appealing to the intuitive meaning that the word \context" carries. More precisely, contexts are the natural development of what in [Wey80] Weyhrauch called LS-pairs. An FOL context is a nite data structure which acts like a (partial) theory of the world. This data structure is a triple:

hL; SS; F i

where L is a language which de nes the words which can be used and for what (i.e. \+" is a function), \SS" is a simulation structure, which can be seen as a partial model, a mental image of the language L and F is a set of facts which states the information we have of the world we are describing. Sets of contexts, when put together, build an FOL system. FOL provides the user the possibility to create, name and change branch inside a proof, to create, name and change context inside an FOL system and to create, name and change FOL system. Deductions in di erent contexts may also in uence each other because some contexts may share (part of) their simulation structure of the other (in this case the second acts as a metatheory of the rst).

3 Solving the Problem Two contexts are sucient to formalize the example. Both should contain the facts that, if it is noon and there is not an eclipse, then there is sunshining and that, if there is an eclipse, then there is not sunshining, only one that there is an eclipse. Actually, our main goal is not to formalize these facts, but rather to reproduce the kind of reasoning which allows people to reason about them. In other words, our goal is to build a little theory of reasoning, a theory about theory building and problem solving. Thus the problem is structures and formalized with three contexts: 1. The rst, named PSC (Problem Solving Context) contains the principles of problem solving and theory building. It contains axioms which allow to decide in which context to reason and how. 2.3. The two contexts where the problem is to be solved (as informally described at the beginning of this section). The authors think this is a better framework for the formalization of this kind of reasoning. Among other reasons, here not discussed because out of the goals of the paper (a thorough discussion about these issues is in [Giu87]), epistemologically the meaning of the operator M is not so clear. In fact either we know (or believe) something (for 4

on, following the new FOL syntax, the logical symbols inside formulas are written in letters, namely \and" as and, \or" as or, \it implies" as imp, \not" as not and \if and only if" as i ): noon and M[sun-sunshining] imp sun-sunshining noon eclipse imp not sun-shining

(1) (2) (3)

in which we can prove: but if we add the axiom:

sun-shining

(4)

eclipse (5) then (4) is inconsistent and is not a theorem of the extended theory. This theory is a (non-monotonic) formalization of the intuitive argument that, since it is noon, if there is not an eclipse I believe that there is sunshing, while, if there is an eclipse, I believe that the sun is not shining. This paper does not want to explain what non-monotonic reasoning is, rather it wants to make the claim that this kind of reasoning is not non-monotonic. It can be classi ed as inessential non-monotonicity. The whole theory has been built as non-monotonic because of the choice of the formalism. The implicit assumption at the basis of this approach (made, among the others, also in [Luk86, McC87, EMR85]) is that there is only one theory of the whole world which contains all the axioms and theorems. On the other hand, analogously to what happens in human reasoning, it must be possible to derive, in di erent situations, both A and notA, where A is a w (in our example A is sun-shining). In fact we never believe A and notA at the same time, for we would have an inconsistent theory of the world, but we can believe A and notA at di erent times. The referential opacity [Qui53] (or extensional opacity, as better de ned in [Fol]) of modal operators (M is this case) allows to maintain consistency (we cannot in general substitute equals for equals) and at the same time allows to derive, with two di erent reasoning processes, either A or notA. The example could also be reformulated as an unique monotonic theory considering for instance sunshining and eclipse no longer as propositional constants but as unary predicates with argument of sort SITUATION [MH69]. Thus, depending on the case, di erent conclusions could be reached (namely that either there is sunshining or there is not). But the question we are trying to answer is \What is the representation system which allows to build proofs in a more natural way?" or, better, \What is the representation system which allows to make automated reasoning more human-like?". The approach taken in this paper removes the basic epistemological assumption that there is only one theory of the world. The proposal is to formalize this kind of problems describing the world as a set of contexts. No matter how their language is de ned the

3

proposed \circumscription" that is to use second order axiomatizations for \circumscribing" the problem at hand to a \minimal world". Reiter [EMR85] has proposed \default reasoning", where partial rst order theories are augmented with inference rules that allow to derive, in absence of information, some not known statements about the world. Lukaszewicz [Luk86] has proposed to express circumscription in rst order logic. The non-monotonicity comes out from letting the resolution theorem prover stop the computation not only with the empty clause but also with well formed formulas which are (disjunctions of) abnormality predicates. Doyle and McDermott [MD80] have proposed the use of a modal operator M (a more detailed discussion about M is in the next sections). This paper steps back and approaches the problem of formalizing non-monotonicity and, more in general, problem solving using rst order logic. Certain kinds of nonmonotonic reasoning can be described monotonically formulating problems in a \more structured" way. Any problem is formalized through a set of contexts, where a context is a ( rst order) formalization of a piece of the problem. Reasoning comes out as a result of deduction in di erent contexts. Thus, for instance, there is a context \META" which is a metatheory for other contexts, \LINALG" which knows of algebra and so on. The claim is that proofs built in this way are clearer and better resemble the kind of explanation that humans give when describing some phenomenon. This thesis is articulated discussing the example about non-monotonic reasoning reported in [MD80]. No formal issues are faced, the focus is only on the representational issues. The system used to implement the proof is not described (FOL , First Order Logic), an overview is in [Wey80]. All the necessary information is given when needed. The paper follows this path: the next section begins with the description of the example. Here contexts are described and it is brie y discussed why they are the right structure to think when solving this kind of problems. Section three is devoted to a formalization of the example. The proof is described in detail showing some of the FOL features for multi-context interaction. In order not to complicate the example only the propositional case is treated. In section four some nal considerations are made. Since quite long, the complete proof has been put in appendix B while, during the paper, only the most interesting parts are described.

2 Non-monotonic reasoning: an informal discussion

First order logic has the property of being monotonic, that is, if B and D are two ( rst order) theories such that B  D (B is a subset of D) and if C is a well formed formula (w from now on) then if B ` C we have D ` C . In words, if you add some new hypotheses you cannot prove as false something which was true before. As a consequence, monotonic logics lack the possibility of having new information leading to a revision of old conclusions. A solution can be that of introducing modalities using the modal operator M , where informally M [p] is to mean that p is consistent with everything believed [MD80]. Thus one small theory employing this modality would be (from now 2

A multi-context monotonic axiomatization of inessential non-monotonicity Fausto Giunchiglia

yz

Richard W. Weyhrauch

1

?

yIRST, Povo, 38100 Trento, Italy

?

zDIST, University of Genoa, Via Opera Pia 11A, Genova, Italy

IBUKI, 1447 N. Shoreline Blvd., Mountain View, CA 94043, U.S.A.

Abstract

The main premise of this paper is that certain kinds of non-monotonic reasoning can be solved within rst order logic in a simple monotonic way by formulating problems in a suitable environment. Any problem is formalized as a set of contexts, where a context is a ( rst order) formalization of a piece of the problem. Reasoning comes out as a result of deduction in di erent contexts. The claim is that proofs built in this way are clearer and better resemble the kind of explanation that humans give when describing some phenomenon. This thesis is articulated discussing the example about non-monotonic reasoning reported in [MD80].

1 Introduction The main premise of this paper is that certain kinds of non-monotonic reasoning can be solved within rst order logic in a simple monotonic way by formulating problems in a suitable environment. One of the main issues against the use of rst order logic for representing knowledge is that the latter is intrinsically non-monotonic while the former is monotonic. Most proposals to solve this problem have been oriented towards extensions and/or modi cations of standard rst order logic. McCarthy [McC87, McC86] has 1 The work described in this paper was done while the rst author was Visiting Scholar at the Computer Science Department of Stanford University. This paper is published in D. Nardi and P. Maes (eds.) Meta-level architectures and Re ection,pages 271-285, North Holland, 1988.

1

A Multi-Context Monotonic Axiomatization of Inessential Non-monotonicity F. Giunchiglia, R.W. Weyhrauch April 1991 Technical Report # 91-0004

Published in D. Nardi and P. Maes (eds.), Meta-Level Architectures and Re ection, pp. 271{285, North Holland, 1988.

universita di genova facolta di ingegneria

dipartimento informatica sistemistica telematica