Welcome to SNePSLOG (A logic interface to SNePS) Copyright (C) 1984, 88, 89, 93 by Research Foundation of State University of New York. ------------------------------------------------------------------------- *** COMMENT ***: Let the current belief space be the real world. ------------------------------------------------------------------------- : set-context real-world () ((ASSERTIONS NIL) (RESTRICTION NIL) (NAMED (REAL-WORLD DEFAULT-DEFAULTCT))) : set-default-context real-world ((ASSERTIONS NIL) (RESTRICTION NIL) (NAMED (REAL-WORLD DEFAULT-DEFAULTCT))) ------------------------------------------------------------------------- *** COMMENT ***: Webegin by giving Cassie some background knowledge about the real world. First, she is told (using SNePSLOG) that all persons who are assassinated in some year are dead in that year. As a result, Cassie believes that proposition. ------------------------------------------------------------------------- : all(p,y)(Assassinated(p,y) => Dead(p,y)) all(P,Y)(ASSASSINATED(P,Y) => DEAD(P,Y)) ------------------------------------------------------------------------- *** COMMENT ***: Cassie is told that if a person, p, is dead in some year y1, and y1 is before year y2, then p is dead in y2 (a "no-resurrection" hypothesis, according to Bonnie Webber): ------------------------------------------------------------------------- : all(p,y1,y2) ({Dead(p,y1), Before(y1,y2)} &=> {Dead(p, y2)}) all(P,Y1,Y2) ({DEAD(P,Y1),BEFORE(Y1,Y2)} &=> {DEAD(P,Y2)}) ------------------------------------------------------------------------- *** COMMENT ***: Cassie is told that if a person is elected in some year, then it is not the case that that person is dead in that year (a "neither Chicago nor Philadelphia" hypothesis): ------------------------------------------------------------------------- : all(p,y)(Elected(p,y) => ~Dead(p,y)) all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) ------------------------------------------------------------------------- *** COMMENT ***: Cassie is told that 1865 is before 1868: ------------------------------------------------------------------------- : Before(1865, 1868) BEFORE(1865,1868) ------------------------------------------------------------------------- *** COMMENT ***: Next, we tell Cassie some specific facts about Lincoln. After each one, Cassie performs forward inference, signalled by the "!', in order to draw conclusions. If she has to reason, she "thinks out loud". First, she is told that Lincoln was elected in 1860, from which she infers that Lincoln was not dead in 1860: ------------------------------------------------------------------------- : Elected(Lincoln, 1860)! Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1860) I infer ~DEAD(LINCOLN,1860) ELECTED(LINCOLN,1860) ~DEAD(LINCOLN,1860) ------------------------------------------------------------------------- *** COMMENT ***: Cassie is told that Lincoln was assassinated in 1865, from which she infers that Lincoln was dead in 1865, hence also in 1868. ("BS" is a "belief space"; for its definition in SNeBR, see Martins & Shapiro, 1988.) ------------------------------------------------------------------------- : Assassinated(Lincoln, 1865)! Since all(P,Y)(ASSASSINATED(P,Y) => DEAD(P,Y)) and ASSASSINATED(LINCOLN,1865) I infer DEAD(LINCOLN,1865) I wonder if DEAD(LINCOLN,Y1) holds within the BS defined by context REAL-WORLD I wonder if BEFORE(Y1,Y2) holds within the BS defined by context REAL-WORLD I know DEAD(LINCOLN,1865) I know BEFORE(1865,1868) I know it is not the case that DEAD(LINCOLN,1860) I wonder if ASSASSINATED(LINCOLN,Y) holds within the BS defined by context REAL-WORLD Since all(P,Y)(ASSASSINATED(P,Y) => DEAD(P,Y)) and ASSASSINATED(LINCOLN,1865) I infer DEAD(LINCOLN,1865) I wonder if ELECTED(LINCOLN,Y) holds within the BS defined by context REAL-WORLD Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1860) I infer ~DEAD(LINCOLN,1860) I know ASSASSINATED(LINCOLN,1865) I know ELECTED(LINCOLN,1860) DEAD(LINCOLN,1868) BEFORE(1865,1868) ~DEAD(LINCOLN,1860) ASSASSINATED(LINCOLN,1865) DEAD(LINCOLN,1865) ------------------------------------------------------------------------- *** COMMENT ***: So, Cassie's background, or real-world, beliefs consist of 6 hypotheses-- *that assassination implies death (WFF1), *that death in year y1 implies death in all later years (WFF2), *that elected people aren't dead (WFF3), *that 1865 is before 1868 (WFF4), *that Lincoln was elected in 1860 (WFF5), *that Lincoln was assassinated in 1865 (WFF8) --together with all propositions inferred from these: ------------------------------------------------------------------------- : describe-context ((ASSERTIONS (WFF1 WFF2 WFF3 WFF4 WFF5 WFF8)) (RESTRICTION NIL) (NAMED (REAL-WORLD))) ------------------------------------------------------------------------- *** COMMENT ***: Next, the "story world" context is defined, following Rule (R1), to consist, by default, of all of Cassie's current hypotheses. (R1) Propositions outside the story-world operator (i.e., antecedently believed by the reader) are assumed, when necessary, to hold within that story world by default, but defeasibly (This implementation of the story-world operator does not use an explicit story node; rather, it uses SNeBR's mechanism of contexts; cf. Martins & Shapiro, 1988.): ------------------------------------------------------------------------- : set-context story (wff1 wff2 wff3 wff4 wff5 wff8) ((ASSERTIONS (WFF1 WFF2 WFF3 WFF4 WFF5 WFF8)) (RESTRICTION NIL) (NAMED (STORY REAL-WORLD))) ------------------------------------------------------------------------- *** COMMENT ***: The story-world context is entered; from here until that context is left, Cassie should be thought of as reading a narrative about Lincoln, the Lincoln about whom she believes WFFs 1-5, 8, and all beliefs that she has inferred from them: ------------------------------------------------------------------------- : set-default-context story ((ASSERTIONS (WFF1 WFF2 WFF3 WFF4 WFF5 WFF8)) (RESTRICTION NIL) (NAMED (STORY REAL-WORLD))) ------------------------------------------------------------------------- *** COMMENT ***: Cassie reads that Lincoln was tall in 1860, from which, being an intelligent reader who thinks about what she reads, she infers nothing: ------------------------------------------------------------------------- : Tall(Lincoln, 1860)! TALL(LINCOLN,1860) ------------------------------------------------------------------------- *** COMMENT ***: Cassie reads that Lincoln was elected in 1868 (thus, Cassie is clearly reading a work of historical fiction)...: ------------------------------------------------------------------------- : Elected(Lincoln, 1868)! ------------------------------------------------------------------------- *** COMMENT ***: ... from which she infers that, in the story world, Lincoln is not dead in 1868. Since this is inconsistent with her beliefs that Lincoln is dead in 1865 and that anyone who is dead in 1865 is dead in the later year 1868, SNeBR, the interactive belief-revision system, is invoked: ------------------------------------------------------------------------- Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1868) I infer ~DEAD(LINCOLN,1868) A contradiction was detected within context STORY. The contradiction involves the newly derived node: ~DEAD(LINCOLN,1868) ------------------------------------------------------------------------- *** COMMENT ***: I.e., the contradiction involves the proposition that it is not the case that Lincoln is dead in 1868, which Cassie has just inferred in her real-world-augmented story world, ... ------------------------------------------------------------------------- and the previously existing node: DEAD(LINCOLN,1868) ------------------------------------------------------------------------- *** COMMENT ***: ... and the proposition that Lincoln is dead in 1868, which Cassie had inferred to hold in the real world. ------------------------------------------------------------------------- You have the following options: 1. [C]ontinue anyway, knowing that a contradiction is derivable; 2. [R]e-start the exact same run in a different context which is not inconsistent; 3. [D]rop the run altogether. (please type c, r or d) =><= r ------------------------------------------------------------------------- *** COMMENT ***: I.e., we choose to eliminate the inconsistencies. ------------------------------------------------------------------------- In order to make the context consistent you must delete at least one hypothesis from each of the following sets of hypotheses: (WFF1 WFF12 WFF2 WFF3 WFF4 WFF8) ------------------------------------------------------------------------- *** COMMENT ***: WFF12 = Lincoln was elected in 1868. ------------------------------------------------------------------------- In order to make the context consistent you must delete some hypotheses from the set (WFF1 WFF12 WFF2 WFF3 WFF4 WFF8) You are now entering a package that will enable you to delete some hypotheses from this set. Do you need guidance about how to use the package? =><= n Do you want to take a look at hypothesis WFF1? =><= y all(P,Y)(ASSASSINATED(P,Y) => DEAD(P,Y)) There are 3 nodes depending on hypothesis WFF1: (WFF1 WFF10 WFF9). ------------------------------------------------------------------------- *** COMMENT ***: WFF9 = Lincoln is dead in 1865. WFF10 = Lincoln is dead in 1868. ------------------------------------------------------------------------- Do you want to look at [a]ll of them, [s]ome of them, or [n]one? (please type a, s or n) =><= n What do you want to do with hypothesis WFF1? [d]iscard from the context, [k]eep in the context, [u]ndecided, [q]uit this package (please type d, k, u or q) =><= k ------------------------------------------------------------------------- *** COMMENT ***: We choose to keep within the story world the belief that assassinated people are dead. ------------------------------------------------------------------------- Do you want to take a look at hypothesis WFF12? =><= y ELECTED(LINCOLN,1868) There are 2 nodes depending on hypothesis WFF12: (WFF12 WFF13). ------------------------------------------------------------------------- *** COMMENT ***: WFF13 = Lincoln is not dead in 1868. ------------------------------------------------------------------------- Do you want to look at [a]ll of them, [s]ome of them, or [n]one? (please type a, s or n) =><= n What do you want to do with hypothesis WFF12? [d]iscard from the context, [k]eep in the context, [u]ndecided, [q]uit this package (please type d, k, u or q) =><= k ------------------------------------------------------------------------- *** COMMENT ***: We keep in the story world that Lincoln was elected in 1868. (After all, this is a fact in the story world and must be accepted.) ------------------------------------------------------------------------- Do you want to take a look at hypothesis WFF2? =><= y all(P,Y1,Y2) ({DEAD(P,Y1),BEFORE(Y1,Y2)} &=> {DEAD(P,Y2)}) There are 2 nodes depending on hypothesis WFF2: (WFF10 WFF2). Do you want to look at [a]ll of them, [s]ome of them, or [n]one? (please type a, s or n) =><= n What do you want to do with hypothesis WFF2? [d]iscard from the context, [k]eep in the context, [u]ndecided, [q]uit this package (please type d, k, u or q) =><= k ------------------------------------------------------------------------- *** COMMENT ***: We keep in the story world that once dead, always dead. ------------------------------------------------------------------------- Do you want to take a look at hypothesis WFF3? =><= y all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) There are 3 nodes depending on hypothesis WFF3: (WFF13 WFF3 WFF7). ------------------------------------------------------------------------- *** COMMENT ***: WFF7 = Lincoln is not dead in 1860. ------------------------------------------------------------------------- Do you want to look at [a]ll of them, [s]ome of them, or [n]one? (please type a, s or n) =><= n What do you want to do with hypothesis WFF3? [d]iscard from the context, [k]eep in the context, [u]ndecided, [q]uit this package (please type d, k, u or q) =><= k ------------------------------------------------------------------------- *** COMMENT ***: We keep in the story world that elected people aren't dead. ------------------------------------------------------------------------- Do you want to take a look at hypothesis WFF4? =><= y BEFORE(1865,1868) There are 2 nodes depending on hypothesis WFF4: (WFF10 WFF4). Do you want to look at [a]ll of them, [s]ome of them, or [n]one? (please type a, s or n) =><= n What do you want to do with hypothesis WFF4? [d]iscard from the context, [k]eep in the context, [u]ndecided, [q]uit this package (please type d, k, u or q) =><= k ------------------------------------------------------------------------- *** COMMENT ***: We keep in the story world that 1865 is before 1868. ------------------------------------------------------------------------- Do you want to take a look at hypothesis WFF8? =><= y ASSASSINATED(LINCOLN,1865) There are 3 nodes depending on hypothesis WFF8: (WFF10 WFF8 WFF9). Do you want to look at [a]ll of them, [s]ome of them, or [n]one? (please type a, s or n) =><= n What do you want to do with hypothesis WFF8? [d]iscard from the context, [k]eep in the context, [u]ndecided, [q]uit this package (please type d, k, u or q) =><= d ------------------------------------------------------------------------- *** COMMENT ***: That Lincoln was assassinated in 1865 is "defeated"; i.e., we remove it from the story world as being the "cause" of the inconsistency; i.e., everything that Cassie antecedently believed about Lincoln is assumed to hold in the story world, except for this belief. ------------------------------------------------------------------------- The following (not known to be inconsistent) set of hypotheses was also part of the context where the contradiction was derived: (M11! M5!) Do you want to inspect or discard some of them? =><= n ------------------------------------------------------------------------- *** COMMENT ***: The propositions that: Lincoln was elected in 1860 (WFF5, represented by node M5!) and that Lincoln was tall in 1860 (WFF11, represented by node M11!) were not listed as among the hypotheses responsible for the inconsistency, so they remain in the story world by default. ------------------------------------------------------------------------- Do you want to add a new hypothesis? =><= n ------------------------------------------------------------------------- *** COMMENT ***: Cassie's reasoning about Lincoln's properties in the story world continues: ------------------------------------------------------------------------ Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1868) I infer ~DEAD(LINCOLN,1868) ELECTED(LINCOLN,1868) ~DEAD(LINCOLN,1868) ------------------------------------------------------------------------- *** COMMENT ***: Cassie has just inferred, again, that, in the story world, Lincoln was not dead in 1868. This is no longer inconsistent with her other beliefs about the story world. We now interactively ask Cassie questions about what she believes, including what she has read. ------------------------------------------------------------------------- : ?P(Lincoln,?y)? ------------------------------------------------------------------------- *** COMMENT ***: Cassie begins to reason within the story world, but also using her real-world beliefs. (By Rule (R1), they were assumed to hold in the story world by default, but defeasibly--as we just saw.) ------------------------------------------------------------------------- I wonder if ?P(LINCOLN,?Y) holds within the BS defined by context STORY I know ELECTED(LINCOLN,1860) I know ELECTED(LINCOLN,1868) I know TALL(LINCOLN,1860) I know it is not the case that ASSASSINATED(LINCOLN,1865) I know it is not the case that DEAD(LINCOLN,1860) I know it is not the case that DEAD(LINCOLN,1868) I wonder if DEAD(LINCOLN,Y1) holds within the BS defined by context STORY I wonder if BEFORE(Y1,Y2) holds within the BS defined by context STORY I wonder if ASSASSINATED(LINCOLN,Y) holds within the BS defined by context STORY I wonder if ELECTED(LINCOLN,Y) holds within the BS defined by context STORY Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1868) I infer ~DEAD(LINCOLN,1868) I know BEFORE(1865,1868) I know ELECTED(LINCOLN,1860) Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1860) I infer ~DEAD(LINCOLN,1860) I know ELECTED(LINCOLN,1868) ------------------------------------------------------------------------- *** COMMENT ***: Following is Cassie's reply to our question. She believes that, in the story world: *Lincoln was tall in 1860, *he was elected in 1868, *he is not dead in 1868, *he was not assassinated in 1865, *he was elected in 1860, *he was not dead in 1860: ------------------------------------------------------------------------- TALL(LINCOLN,1860) ELECTED(LINCOLN,1868) ~DEAD(LINCOLN,1868) ~ASSASSINATED(LINCOLN,1865) ELECTED(LINCOLN,1860) ~DEAD(LINCOLN,1860) ------------------------------------------------------------------------- *** COMMENT ***: Now we tell Cassie to think about the real world, in which she believes the propositions represented by WFFs 1, 2, 3, 4, 5, and 8: ------------------------------------------------------------------------- : set-default-context real-world ((ASSERTIONS (WFF1 WFF2 WFF3 WFF4 WFF5 WFF8)) (RESTRICTION ((WFF12))) (NAMED (REAL-WORLD))) : %(clear-infer) (Node activation cleared. Some register information retained.) ------------------------------------------------------------------------- *** COMMENT ***: If we just add WFF11 to the real world, following Rule (R2), Cassie tries to believe, by default, but defeasibly, that what she read in the story is true in the real world. (R2) Propositions inside the story world are assumed, when necessary, to hold outside that story world by default but defeasibly. No inconsistency is detected, so, since Lincoln's being tall in 1860 is consistent with her real-world beliefs, she believes it: ------------------------------------------------------------------------- : Tall(Lincoln, 1860)! TALL(LINCOLN,1860) ------------------------------------------------------------------------- *** COMMENT ***: But, if we then add WFF12, an inconsistency is created. What she has learned in the story world is inconsistent with what she antecendently believed in the real world; so SNeBR is invoked: ------------------------------------------------------------------------- : Elected(Lincoln, 1868)! Since all(P,Y)(ELECTED(P,Y) => (~DEAD(P,Y))) and ELECTED(LINCOLN,1868) I infer ~DEAD(LINCOLN,1868) A contradiction was detected within context REAL-WORLD. The contradiction involves the newly derived node: ~DEAD(LINCOLN,1868) and the previously existing node: DEAD(LINCOLN,1868) You have the following options: 1. [C]ontinue anyway, knowing that a contradiction is derivable; 2. [R]e-start the exact same run in a different context which is not inconsistent; 3. [D]rop the run altogether. (please type c, r or d) =><= d ------------------------------------------------------------------------- *** COMMENT ***: So WFF12 is not added. The following message, however, is printed, because we attempted to add WFF12. That fact that it was not successfully added to the real-world context will be apparent below. ------------------------------------------------------------------------- ELECTED(LINCOLN,1868) ------------------------------------------------------------------------- *** COMMENT ***: We ask Cassie again what she believes about Lincoln in the real world (this time, her reasoning has been edited out, for readability): ------------------------------------------------------------------------- : ?P(Lincoln,?y)? ------------------------------------------------------------------------- *** COMMENT ***: She infers the following; note that Cassie now believes, on the basis of the story, that, in the real world, Lincoln was tall in 1860. Note, too, that she does not believe that Lincoln was elected in 1868. ------------------------------------------------------------------------- DEAD(LINCOLN,1868) TALL(LINCOLN,1860) ELECTED(LINCOLN,1860) ~DEAD(LINCOLN,1860) ASSASSINATED(LINCOLN,1865) DEAD(LINCOLN,1865)