logic is everywhere Logik ist überall Hikmat har Jaga Hai Mantık her yerde la logica è dappertutto lógica está em toda parte

Size: px
Start display at page:

Download "logic is everywhere Logik ist überall Hikmat har Jaga Hai Mantık her yerde la logica è dappertutto lógica está em toda parte"

Transcription

1 Steffen Hölldobler logika je všude logic is everywhere la lógica está por todas partes Logika ada di mana-mana lógica está em toda parte la logique est partout Hikmat har Jaga Hai Human Reasoning, Logic Programs and the CORE Method International Center for Computational Logic Technische Universität Dresden Germany Human Reasoning Three-Valued Logic Programs A CORE Method for Human Reasoning Contractions Positive vs Negative Information Affirmation of the Consequent Open Problems logika je svuda Mantık her yerde la logica è dappertutto Logik ist überall Logica este peste tot Human Reasoning, Logic Programs and the CORE Method 1

2 Human Reasoning Two Examples Instructions on boarding card distributed at Amsterdam Schiphol Airport: If it s thirty minutes before your flight departure, make your way to the gate. As soon as the gate number is confirmed, make your way to the gate. Notice in London Underground: If there is an emergency then you press the alarm signal bottom. The driver will stop if any part of the train is in a station. Observations Intended meaning differs from literal meaning. Rigid adherence to classical logic is no help in modeling the examples. There seems to be a reasoning process towards more plausible meanings. The driver will stop the train in a station if the driver is alerted to an emergency and any part of the train is in the station. (Kowalski: Computational Logic and Human Life: How to be Artificially Intelligent. To appear 011) Human Reasoning, Logic Programs and the CORE Method

3 Human Reasoning Forward Reasoning Byrne: Suppressing Valid Inferences with Conditionals. Cognition 31, 61-83: 1989 If she has an essay to write then she will study late in the library. She has an essay to write. Modus Ponens. Byrne % of subjects conlude that she will study late in the library. If she has an essay to write then she will study late in the library. She has an essay to write. If she has a textbook to read she will study late in the library. Alternative Arguments. Byrne % of subjects conlude that she will study late in the library. If she has an essay to write then she will study late in the library. She has an essay to write. If the library stays open she will study late in the library Byrne % of subjects conlude that she will study late in the library. Additional arguments lead to suppression of earlier conclusions. Human Reasoning, Logic Programs and the CORE Method 3

4 Reasoning Towards an Appropriate Logical Form Context independent rules If she has an essay to write and the library is open then she will study late in the library. If the library is open and she has a reason for studying in the library then she will study late in the library. Context dependent rule plus exception If she has an essay to write then she will study late in the library. However, if the library is not open, then she will not study late in the library. The last sentence is the contrapositive of the converse of the original sentence! Human Reasoning, Logic Programs and the CORE Method 4

5 Human Reasoning Denial of Antecedent If she has an essay to write then she will study late in the library. She does not have an essay to write. Byrne % of subjects conlude that she will not study late in the library. If she has an essay to write then she will study late in the library. She does not have an essay to write. If she has a textbook to read she will study late in the library. Byrne % of subjects conlude that she will not study late in the library. If she has an essay to write then she will study late in the library. She does not have an essay to write. If the library stays open she will study late in the library. Byrne % of subjects conlude that she will not study late in the library. Human Reasoning, Logic Programs and the CORE Method 5

6 Human Reasoning The Search for Models Goal find a logic which adequately models human reasoning. How about classical two-valued propositional logic? Let s consider a direct encoding: {l e, e} {l e, e, l t} {l e, e, l o} {l e, e} {l e, e, l t} {l e, e, l o} Human Reasoning, Logic Programs and the CORE Method 6

7 Two-Valued Interpretations Let L be a language of propositional logic. A (two-valued) interpretation is a mapping L {, } represented by I, where I is a set containing all atoms which are mapped to. All atoms which do not occur in I are mapped to. Let I denote the set of all interpretations. (I, ) is a lattice. An interpretation I is a model for a program P, in symbols I = P, iff I(P) =. = {l e, e} {e} = {l e, e} {l} = {l e, e} {e, l} = {l e, e} {e} {e, l} {l} Human Reasoning, Logic Programs and the CORE Method 7

8 Two-Valued Interpretations Let L be a language of propositional logic. A (two-valued) interpretation is a mapping L {, } represented by I, where I is a set containing all atoms which are mapped to. All atoms which do not occur in I are mapped to. Let I denote the set of all interpretations. (I, ) is a lattice. An interpretation I is a model for a program P, in symbols I = P, iff I(P) =. = {l e, e} {l} = {l e, e} {e} = {l e, e} {e, l} = {l e, e} {e} {e, l} {l} Human Reasoning, Logic Programs and the CORE Method 8

9 Logical Consequence (1) A formula G is a logical consequence of a set of formulas F, in symbols F = G, iff all models for F are also models for G. {l e, e} = l {l e, e} = e {e, l} {e} {l} Human Reasoning, Logic Programs and the CORE Method 9

10 Logical Consequence () A formula G is a logical consequence of a set of formulas F, in symbols F = G, iff all models for F are also models for G. {l e, e} = e {l e, e} = l {l e, e} = l {e, l} {e} {l} Human Reasoning, Logic Programs and the CORE Method 10

11 Human Reasoning A Classical Logic Approach Recall the examples: {l e, e} = l modus ponens {l e, e, l t} = l classical logic is monoton {l e, e, l o} = l upps, humans don t do this {l e, e} = l denial of antecendent {l e, e, l t} = l {l e, e, l o} = l Conclusion classical logic is inadequate. Often mistakenly generalized to logic is inadequate. Human Reasoning, Logic Programs and the CORE Method 11

12 Human Reasoning A Computational Logic Approach Goal find a logic which adequately models human reasoning. Solution I propose the following: Logic programs under (weak) completion semantics Non-monotonicity Reasoning towards an appropriate logical form Logic programs Three-valued Lukasiewicz logic Least models An appropriate semantic operator Least fixed points are least models Least fixed points can be computed by iterating the operator Reasoning with respect to the least models A connectionist realization Human Reasoning, Logic Programs and the CORE Method 1

13 Logic Programs A (logic) program is a finite set of clauses. A (program) clause is an expression of the form A B 1 B n, where n 1, A is an atom, and each B i, 1 i n, is either a literal, or. A is called head and B 1 B n body of the clause. A clause of the form A is called a positive fact. A clause of the form A is called a negative fact. {l e, e } {l e, e, l t} {l e, e } Here I consider only propositional programs, but the approach extends to first-order programs. The language L underlying a program P shall contain precisely the relation symbols occurring in P, and no others. Human Reasoning, Logic Programs and the CORE Method 13

14 Program Completion Let P be a program. Consider the following transformation: 1 All clauses with the same head A Body 1, A Body,... are replaced by A Body 1 Body.... If an atom A is not the head of any clause in P then add A. 3 All occurrences of are replaced by. The resulting set is called completion of P or c P. If step is omitted then the resulting set is called weak completion of P or wc P. Human Reasoning, Logic Programs and the CORE Method 14

15 Program Completion Example 1 P 1 = {l e, e } c P 1 = {l e, e } wc P 1 = {l e, e } The models of c P 1 and wc P 1 {e, l} {e} {l} Hence, c P 1 = l and wc P 1 = l Human Reasoning, Logic Programs and the CORE Method 15

16 Program Completion Example P = {l e, e } c (P ) = {l e, e } wc (P ) = {l e, e } The models of c P and wc P {e, l} {e} {l} Hence, c P = l and wc P = l Remember, P = l Human Reasoning, Logic Programs and the CORE Method 16

17 Program Completion Example 3 P 3 = {l e, e, l t} c P 3 = {l e t, e, t } wc P 3 = {l e t, e } The models of c P 3 {e, l} The models of wc P 3 {e, l} {e, l, t} Hence, c P 3 = t whereas wc P 3 = t and wc P 3 = t. Human Reasoning, Logic Programs and the CORE Method 17

18 Monotonicity Let F and F be sets of formulas and G a formula. A logic is monotonic if the following holds: If F = G then F F = G. Classical logic is monotonic. A logic based on completion semantics is non-monotonic. Consider Then P 3 = {l e, e, l t} P 3 = P {t } c P 3 = t c P 3 = t Human Reasoning, Logic Programs and the CORE Method 18

19 Reasoning Towards an Appropriate Logical Form Stenning, van Lambalgen: Human Reasoning and Cognititve Science. MIT Press: 008 Represent conditionals as licences for conditionals. If she has an essay to write then she will study late in the library. She has an essay to write. P 4 = {l e ab, ab, e } If she has an essay to write then she will study late in the library. She has an essay to write. If she has a textbook to read she will study late in the library. P 5 = {l e ab 1, ab 1, l t ab, ab, e } Reason about additional premises. If she has an essay to write then she will study late in the library. She has an essay to write. If the library stays open she will study late in the library. P 6 = {l e ab 1, ab 1 o, l o ab, ab e, e } Human Reasoning, Logic Programs and the CORE Method 19

20 Reasoning Towards an Appropriate Logical Form Denial of Antecedent (DA) If she has an essay to write then she will study late in the library. She does not have an essay to write. P 7 = {l e ab, ab, e } If she has an essay to write then she will study late in the library. She does not have an essay to write. If she has a textbook to read she will study late in the library. P 8 = {l e ab 1, ab 1, l t ab, ab, e } If she has an essay to write then she will study late in the library. She does not have an essay to write. If the library stays open she will study late in the library. P 9 = {l e ab 1, ab 1 o, l o ab, ab e, e } Human Reasoning, Logic Programs and the CORE Method 0

21 Three-Valued Logics L L K K C U U U U U U U U U U U U U U U U U U U U U U U U U U U U U Lukasiewicz (L) semantics 190 L L Kleene (K) semantics 195 K K Fitting (F) semantics 1985 K C (F G) { 3L 3F } (F G) (G F ) Human Reasoning, Logic Programs and the CORE Method 1

22 Principles of Lukasiewicz Lukasiewicz used 1,, and 0 instead of,u, and, respectively. Principles of identity and non-identity ( ) ( ) (U U). ( ) ( ). ( U) (U ) ( U) (U ) U. Principles of implication ( ) ( ) (U U). ( ) ( U) (U ). ( ). ( U) (U ) U. Definitions of negation, disjunction, and conjunction F ( F ) (F G) (G (G F )). (F B) ( F G). Human Reasoning, Logic Programs and the CORE Method

23 Some Common Laws and Literature Laws L K F Equivalence F G (F G) (G F ) yes yes no Implication F G F G no yes yes Syllogism (F G) (G H) F H no yes yes Excluded Middle F F no no no Contradiction F F no no no Literature Fitting: A Kripke-Kleene Semantics for Logic Programs. Journal of Logic Programming, 95-31: Kleene: Introduction to Metamathematics. North-Holland: 195. Lukasiewicz: O logice trójwartościowej. Ruch Filozoficzny 5, : 190. English translation: On Three-Valued Logic. In: Jan Lukasiewicz Selected Works. (L. Borkowski, ed.), North Holland, 87-88, Human Reasoning, Logic Programs and the CORE Method 3

24 Three-Valued Interpretations A (three-valued) interpretation is a mapping L {,, U} represented by I, I, where I contains all atoms which are mapped to, I contains all atoms which are mapped to, I I =. All atoms which occur neither in I nor I are mapped to U. Human Reasoning, Logic Programs and the CORE Method 4

25 Interpretations and Models Let I denote the set of all interpretations. Fitting 1985 (I, ) is a complete semi-lattice. {p, q}, {p}, {q} {q}, {p}, {p, q} {p}, {q},, {q}, {p}, An interpretation I is a model for a program P, in symbols I = 3 P, iff I(P) =., { =3L = 3F } {p q} Human Reasoning, Logic Programs and the CORE Method 5

26 Logic Programs under Three-Valued L-Semantics We consider Lukasiewicz semantics. Let P be a logic program and I = I, I be an interpretation. Proposition 1 If I = I, I = 3L P then I = I, = 3L P. Proof Suppose I = I, I = 3L P Let A Body P. To show I = 3L A Body. We distinguish three cases A I In this case, I = 3L A Body. A I A I I Human Reasoning, Logic Programs and the CORE Method 6

27 Proof of Proposition 1 Case A I In this case I(A) = and I (A) = U. Because I = 3L A Body we conclude I(Body) =. Hence, we find L Body such that I(L) =. L = B In this case I(B) = and, hence, I (B) = I (L) = U. L = B In this case I(B) = and, hence, I (B) = and I (L) =. Consequently, I (Body) {U, }. Because I (A) = U we conclude I = 3L A Body. Human Reasoning, Logic Programs and the CORE Method 7

28 Proof of Proposition 1 Case 3 A I I In this case I(A) = I (A) = U. I(Body) = As in the previous case we find I (Body) {, U} Consequently, I = 3L A Body. I(Body) = U In this case we find L Body with I(L) = U. Then, I (L) = U. Consequently, I (Body) = U. Hence, I = 3L A Body. qed Example Consider P = {p q r}. {p, q}, {r} is a model for P, and so is {p, q},. {p, r}, {q} is a model for P, and so is {p, r},. {r}, {q} is a model for P, and so is {r},. Human Reasoning, Logic Programs and the CORE Method 8

29 Intersection of Two Models We consider Lukasiewicz semantics; let P be a logic program. Proposition Let I 1 = I 1, and I = I, be two models of P. Then, I 3 = I 1 I, is also a model for P. Proof Suppose I 3 = 3L P. Then, we find A Body P such that I 3 (A Body). We distinguish the following cases: I 3 (A) = and I 3 (Body) = Impossible, because I 3 =. I 3 (A) = and I 3 (Body) = U Impossible, because I 3 =. I 3 (A) = U and I 3 (Body) = We find j {1, } with I j (A) = U. Because I j = 3L A Body we find I j (Body) {U, }. Because I 3 (Body) = and I 3 = we find for all L Body that L is an atom and L I 3. Hence, for all L Body we find L I j, j {1, }. Consequently, I j (Body) =, j {1, } contradicting ( ) ( ) qed Human Reasoning, Logic Programs and the CORE Method 9

30 Intersection of Two Models Example Proposition does not hold for arbitrary models. Consider P = {p q 1 r 1, p q q }. Let I 1 =, {p, q 1, r } and I =, {p, q, r 1 }. Both, I 1 and I, are models for P. However, I 1 I =, {p} is not a models for P. Human Reasoning, Logic Programs and the CORE Method 30

31 Model Intersection We consider Lukasiewicz semantics; let P be a logic program. Theorem 3 The model intersection property holds for P, i.e., {I I = 3L P} = 3L P. Proof Follows immediately from Propositions 1 and Let lm 3L P denote the least model of P under Lukasiewicz semantics. qed lm 3L {p q} =, Observation Theorem 3 does not hold under Fitting semantics: {p, q}, = 3F {p q}, {p, q} = 3F {p q} but, = 3F {p q} Human Reasoning, Logic Programs and the CORE Method 31

32 Weakly Completed Logic Programs under L-Semantics We consider Lukasiewicz semantics. Let P be a logic program. Theorem 4 The model intersection property holds for wc P as well. Theorem 5 If I = 3L wc P then I = 3L P. Observation Theorem 5 does not hold under F-semantics., = 3F wc {p q} = {p q}, but, = 3F {p q} Human Reasoning, Logic Programs and the CORE Method 3

33 Reasoning with Respect to the Least Model of wc P Recall our examples wc P 4 = {l e ab, ab, e } lm 3L wc P 4 = {e, l}, {ab} lm 3L wc P 4 (l) = wc P 5 = {l (e ab 1 ) (t ab ), ab 1, ab, e } lm 3L wc P 5 = {e, l}, {ab 1, ab } lm 3L wc P 5 (l) = wc P 6 = {l (e ab 1 ) (o ab ), ab 1 o, ab e, e } lm 3L wc P 6 = {e}, {ab } lm 3L wc P 6 (l) = U wc P 7 = {l e ab, ab, e } lm 3L wc P 7 =, {e, l, ab} lm 3L wc P 7 (l) = wc P 8 = {l (e ab 1 ) (t ab ), ab 1, ab, e } lm 3L wc P 8 =, {e, ab 1, ab } lm 3L wc P 8 (l) = U wc P 9 = {l (e ab 1 ) (o ab ), ab 1 o, ab e, e } lm 3L wc P 9 = {ab }, {e, l} lm 3L wc P 9 (l) = This logic appears to be adequate! Human Reasoning, Logic Programs and the CORE Method 33

34 Completion versus Weak Completion Recall P 8 wc P 8 = {l (e ab 1 ) (t ab ), ab 1, ab, e } lm 3L wc P 8 =, {e, ab 1, ab } lm 3L wc P 8 (l) = U c P 8 = {l (e ab 1 ) (t ab ), ab 1, ab, e, t } lm 3L c P 8 =, {e, t, l, ab 1, ab } lm 3L c P 8 (l) = A logic using completion instead of weak completion is not adequate. Human Reasoning, Logic Programs and the CORE Method 34

35 Computing the Least Models of Weakly Completed Programs How can we compute the least models of weakly completed programs? A first candidate: Fitting s immediate consequence operator Φ F,P (I) = J, J, where J = {A there exists A Body P with I(Body) = } and J = {A for all A Body P we find I(Body) = }. Uses F-semantics. Some well-known results mostly due to Fitting 1985: (1) Φ F,P is monotone on (I, ). () Φ F,P is continuous and, hence, admits a least fixed point denoted by lfp Φ F,P. (3) lfp Φ F,P can be computed by iterating Φ F,P on,. (3) The least F-model of c P is the least fixed point of Φ F,P. Inadequate for human reasoning. Human Reasoning, Logic Programs and the CORE Method 35

36 The Stenning and van Lambalgen Operator Stenning and van Lambalgen s operator Φ SvL,P (I) = J, J, where J = {A there exists A Body P with I(Body) = } and J = {A there exists A Body P and for all A Body P we find I(Body) = }. Theorem 4 (1) Φ SvL,P is monotone on (I, ). () Φ SvL,P is continuous and, hence, admits a least fixed point denoted by lfp Φ SvL,P. (3) lfp Φ SvL,P can be computed by iterating Φ SvL,P on,. (3) lm 3L wc P = lfp Φ SvL,P. Human Reasoning, Logic Programs and the CORE Method 36

37 Computing Least Fixed Points Recall some of our examples P 4 = {l e ab, ab, e } wc P 4 = {l e ab, ab, e } Φ SvL,P4 (, ) = {e}, {ab} Φ SvL,P4 ( {e}, {ab} ) = {e, l}, {ab} = lfp Φ SvL,P4 = lm 3L wc P 4 P 9 = {l e ab 1, ab 1 o, l o ab, ab e, e } wc P 9 = {l (e ab 1 ) (o ab ), ab 1 o, ab e, e } Φ SvL,P9 (, ) =, {e} Φ SvL,P9 (, {e} ) = {ab }, {e} Φ SvL,P9 ( {ab }, {e} ) = {ab }, {e, l} = lfp Φ SvL,P9 = lm 3L wc P 9 Human Reasoning, Logic Programs and the CORE Method 37

38 Cores for Three-Valued Logic Programs Consider {p q}. A translation algorithm translates programs into a core. Recurrent connections connect the output to the input layer. Kalinke 1995, Seda, Lane 004 Φ F new Φ SvL p p p p p p p p q q q q q - q q q - - Human Reasoning, Logic Programs and the CORE Method 38

39 A CORE Method for Human Reasoning Consider three-layer feed forward networks of binary threshold units. The input as well as the output layer shall represent interpretations. Theorem 5 For each program P there exists a feed-forward core computing Φ SvL,P. Add recurrent connections between corresponding units in the output and the input layer. Corollary 6 The recurrent network reaches a stable state representing lfp Φ SvL,P if initialized with,. Human Reasoning, Logic Programs and the CORE Method 39

40 Human Reasoning Modus Ponens If she has an essay to write, she will study late in the library. She has an essay to write. Byrne % of subjects conclude that she will study late in the library. Stenning, van Lambalgen 008 P 4 = {l e ab, e, ab }. e e l l ab ab e e l l ab ab lfp Φ SvL,P4 = lm 3L wc P 4 = {l, e}, {ab}. From {l, e}, {ab} follows that she will study late in the library. Human Reasoning, Logic Programs and the CORE Method 40

41 Human Reasoning Alternative Arguments If she has an essay to write, she will study late in the library. She has an essay to write. If she has some textbooks to read, she will study late in the library. Byrne % of subjects conclude that she will study late in the library. Stenning, van Lambalgen 008 P 5 = {l e ab 1, e, ab 1, l t ab, ab }. e e l 3 l ab 1 ab 1 t t ab ab e e l l ab 1 ab 1 t t - ab ab lfp Φ SvL,P5 = lm 3L wc P 5 = {e, l}, {ab 1, ab }. From {e, l}, {ab 1, ab } follows that she will study late in the library. Human Reasoning, Logic Programs and the CORE Method 41

42 Human Reasoning Additional Argument If she has an essay to write, she will study late in the library. She has an essay to write. If the library stays open, she will study late in the library. Byrne % of subjects conclude that she will study late in the library. Stenning, van Lambalgen 008 P 6 = {l e ab 1, e, l o ab, ab 1 o, ab e, }. e e l 3 l ab 1 ab 1 o o ab ab e e l l ab 1 ab 1 o o - ab ab lfp Φ SvL,P6 = lm 3L wc P 6 = {e}, {ab }. From {e}, {ab } follows that it is unknown whether she will study late in the library. Human Reasoning, Logic Programs and the CORE Method 4

43 Human Reasoning Denial of Antecendent (DA) If she has an essay to write, she will study late in the library. She does not have an essay to write. Byrne % of subjects conclude that she will not study late in the library. Stenning, van Lambalgen 008 P 7 = {l e ab, e, ab }. e e l l ab ab e e l l ab ab lfp Φ SvL,P7 = lm 3L wc P 7 =, {ab, e, l}. From, {ab, e, l} follows that she will not study late in the library. Human Reasoning, Logic Programs and the CORE Method 43

44 Human Reasoning Alternative Argument and DA If she has an essay to write, she will study late in the library. She does not have an essay to write. If she has textbooks to read, she will study late in the library. Byrne % of subjects conclude that Marian will not study late in the library. Stenning, van Lambalgen 008 P 8 = {l e ab 1, e, ab 1, l t ab, ab }. e e l 3 l ab 1 ab 1 t t ab ab e e l l ab 1 ab 1 t t - ab ab lfp Φ SvL,P8 = lm 3L wc P 8 =, {ab 1, ab, e}. From, {ab 1, ab, e} follows that it is unknown whether she will study late in the library. Human Reasoning, Logic Programs and the CORE Method 44

45 Human Reasoning Additional Argument and DA If she has an essay to write, she will study late in the library. She does not have an essay to write. If the library is open, she will study late in the library. Byrne % of subjects conclude that she will not study late in the library. Stenning, van Lambalgen 008 P 9 = {l e ab 1, e, l o ab, ab 1 o, ab e}. e e l 3 l ab 1 ab 1 o o ab ab e e l l ab 1 ab 1 o o - ab ab lfp Φ SvL,P9 = lm 3L wc P 9 = {ab }, {e, l}. From {ab }, {e, l} follows that she will not study late in the library. Human Reasoning, Logic Programs and the CORE Method 45

46 Summary Under Lukasiewicz semantics we obtain Byrne 1989 Program lm 3L wc P i (l) Modus Ponens l (96%) P 4 Alternative Arguments l (96%) P 5 Additional Arguments l (38%) P 6 U Modus Ponens and DA l (46%) P 7 Alternative Arguments and DA l (4%) P 8 U Additional Arguments and DA l (63%) P 9 The approach appears to be adequate. Fitting semantics or completion is inadequate. Human Reasoning, Logic Programs and the CORE Method 46

47 Contraction Mappings Do we have to initialize the networks with the empty interpretation? Banach s Contraction Mapping Theorem A contraction mapping f on a complete metric space has a unique fixed point; the sequence x, f(x), f(f(x)),... converges to this fixed point, where x is an arbitrary element from the metric space. Let P be a program. A level mapping is a mapping l from the set of atoms to the set of natural numbers. It is extended to negative atoms by defining l( A) = l(a) for each atom A. Let I be the set of all interpretations and I, J I. d l (I, J) = 1 n if I J and I(A) = J(A) U for all A with l(a) < n and I(A) J(A) or I(A) = J(A) = U for some A with l(a) = n, 0 otherwise. Proposition 7 (Kencana Ramli 009) (I, d l ) is a complete metric space. Human Reasoning, Logic Programs and the CORE Method 47

48 Contraction Properties of the Semantic Operators Observation If P is an acceptable program then Φ SvL,P is not necessarily a contraction. Consider P = {r q p, r p q}. P is acceptable. Both,, and, {p, q}, are fixed points of Φ SvL,P. By Banach s contraction mapping theorem Φ SvL,P is not a contraction. Theorem 8 If P is an acyclic program then Φ SvL,P is a contraction. If P is acyclic then we find a level mapping l such that for each L 1... L n A P we have l(l i ) < l(a). d l (Φ SvL,P (I), Φ SvL,P (J)) 1 d l(i, J). Corollary 9 If P is an acyclic program then Φ SvL,P has a unique fixed point which can be reached by iterating Φ SvL,P starting from some interpretation. Human Reasoning, Logic Programs and the CORE Method 48

49 Positive versus Negative Information Consider P = {p, p }. lm 3L wc P = {p},. 1 p 1 p p 1 3 p 1 Positive information dominates negative information. However, we may take integrity constraints into account, i.e. expressions of the form L 1... L n. Human Reasoning, Logic Programs and the CORE Method 49

50 Long Term versus Short Term Memory Consider P = {p }. 1 1 ext 1 ext p 1 p p 1 p p 1 p p 1 p p 1 p p 1 p If unit p in the output layer is clamped, then the input and output layers do not represent interpretations any more. Adding a connection between the units p and p in the output layer with weight yields the desired effect. Human Reasoning, Logic Programs and the CORE Method 50

51 Human Reasoning Affirmation of the Consequent (AC) If she has an essay to write then she will study late in the library. She will study late in the library. Byrne % of subjects conlude that she has an essay to write. If she has an essay to write then she will study late in the library. She will study late in the library. If she has a textbook to read she will study late in the library. Byrne % of subjects conlude that she has an essay to write. If she has an essay to write then she will study late in the library. She will study late in the library. If the library stays open she will study late in the library. Byrne % of subjects conlude that she has an essay to write. Human Reasoning, Logic Programs and the CORE Method 51

52 Human Reasoning Modus Tollens If she has an essay to write then she will study late in the library. She will not study late in the library. Byrne % of subjects conlude that she does not have an essay to write. If she has an essay to write then she will study late in the library. She will not study late in the library. If she has a textbook to read she will study late in the library. Byrne % of subjects conlude that she does not have an essay to write. If she has an essay to write then she will study late in the library. She will not study late in the library. If the library stays open she will study late in the library. Byrne % of subjects conlude that she does not have an essay to write. Human Reasoning, Logic Programs and the CORE Method 5

53 Abductive Frameworks and Observations Remember Let K L be a set of formulas called the knowledge base, A L be a set of formulas called abducibles, and = L L a logical consequence relation. K, A, = is called abductive framework. An observation O is a subset of the language L. Here K is a logic program P (with negative facts). L is the language underlying P. R D P = {A R P A Body P} is the set of defined predicates in P. R U P = R P \ R D P is the set of undefined predicates in P. A is the set {A A R U P } {A A RU P }. = is = lm wc 3L lm wc, where P = 3L F iff lm 3L wc P(F ) =. Observations are usually sets containing a single literal, in which case we simply write O = L instead of O = {L}. Human Reasoning, Logic Programs and the CORE Method 53

54 Explanations Let L be a language. Let K, A, = be an abductive framework and O an observation. O is explained by E (or E is an explanation for O) iff E A, K E is satisfiable, K E = L for each L O. An explanation E for O is said to be a minimal iff there is no explanation E E for O. Human Reasoning, Logic Programs and the CORE Method 54

55 Reasoning Let P, A, = lm wc 3L P is a logic program and be an abductive framework, where A = {A A R U P } {A A RU P } the set of abducibles Let O be an observation and F a formula in the language underlying P. F follows sceptically by abduction from P and O (in symbols P, O = s A F ) lm wc iff O can be explained and for all minimal explanations E we find P E = 3L F. F follows credulously by abduction from P and O (in symbols P, O = c A F ) lm wc iff there exists a minimal explanation E such that P E = 3L F. Human Reasoning, Logic Programs and the CORE Method 55

56 Human Reasoning Modus Ponens and AC If she has an essay to write then she will study late in the library. She will study late in the library. Byrne % of subjects conlude that she has an essay to write. We obtain Thus P 10 = {l e ab, ab } A = {e, e } O = l lm 3L wc P 10 =, {ab} lm 3L wc (P 10 {e }) = {e, l}, {ab} lm 3L wc (P 10 {e }) =, {e, l, ab} Hence, {e } is the only minimal explanation and P 10, O = s A e. Human Reasoning, Logic Programs and the CORE Method 56

57 Human Reasoning Alternative Arguments and AC If she has an essay to write then she will study late in the library. She will study late in the library. If she has a textbook to read she will study late in the library. Byrne % of subjects conlude that she has an essay to write. We obtain P 11 = {l e ab 1, ab 1, l t ab, ab } A = {e, e, t, e } O = l Thus lm 3L wc P 11 =, {ab 1, ab } lm 3L wc (P 11 {e }) = {e, l}, {ab 1, ab } lm 3L wc (P 11 {e }) =, {e, ab 1, ab } lm 3L wc (P 11 {t }) = {t, l}, {ab 1, ab } lm 3L wc (P 11 {t }) =, {t, ab 1, ab } Hence, {e } and {t } are minimal explanations and P 11, O = s A e. Human Reasoning, Logic Programs and the CORE Method 57

58 Human Reasoning Additional Arguments and AC If she has an essay to write then she will study late in the library. She will study late in the library. If the library stays open she will study late in the library. Byrne % of subjects conlude that she has an essay to write. We obtain P 1 = {l e ab 1, ab 1 o, l o ab, ab e} A = {e, e, o, o } O = l Thus lm 3L wc P 1 =, lm 3L wc (P 1 {e }) = {e}, {ab } lm 3L wc (P 1 {e }) = {ab }, {e, l} lm 3L wc (P 1 {o }) = {t}, {ab 1 } lm 3L wc (P 1 {o }) = {ab 1 }, {o, l} lm 3L wc (P 1 {e, o }) = {t, e, l}, {ab 1, ab } {e, o } is the only minimal explanation and P 1, O = s A e. Human Reasoning, Logic Programs and the CORE Method 58

59 Human Reasoning Modus Tollens (MT) If she has an essay to write then she will study late in the library. She will not study late in the library. Byrne % of subjects conlude that she does not have an essay to write. We obtain Thus P 10 = {l e ab, ab } A = {e, e } O = l lm 3L wc P 10 =, {ab} lm 3L wc (P 10 {e }) = {e, l}, {ab} lm 3L wc (P 10 {e }) =, {e, l, ab} Hence, {e } is the only minimal explanation and P 10, O = s A e. Human Reasoning, Logic Programs and the CORE Method 59

60 Human Reasoning Alternative Argument and MT If she has an essay to write then she will study late in the library. She will not study late in the library. If she has a textbook to read she will study late in the library. Byrne % of subjects conlude that she does not have an essay to write. We obtain P 11 = {l e ab 1, ab 1, l t ab, ab } A = {e, e, t, e } O = l Thus lm 3L wc P 11 =, {ab 1, ab } lm 3L wc (P 11 {e }) = {e, l}, {ab 1, ab } lm 3L wc (P 11 {e }) =, {e, ab 1, ab } lm 3L wc (P 11 {t }) = {t, l}, {ab 1, ab } lm 3L wc (P 11 {t }) =, {t, ab 1, ab } lm 3L wc (P 11 {e, t }) =, {e, l, t, ab 1, ab } {e, t } is the only minimal explanation and P 11, O = s A e. Human Reasoning, Logic Programs and the CORE Method 60

61 Human Reasoning Additional Arguments and MT If she has an essay to write then she will study late in the library. She will not study late in the library. If the library stays open she will study late in the library. Byrne % of subjects conlude that she does not have an essay to write. We obtain P 1 = {l e ab 1, ab 1 o, l o ab, ab e} A = {e, e, o, o } O = l Thus lm 3L wc P 1 =, lm 3L wc (P 1 {e }) = {e}, {ab } lm 3L wc (P 1 {e }) = {ab }, {e, l} lm 3L wc (P 1 {o }) = {t}, {ab 1 } lm 3L wc (P 1 {o }) = {ab 1 }, {o, l} Hence, {e } and {o } are minimal explanations and P 1, O = s A e. Human Reasoning, Logic Programs and the CORE Method 61

62 Weak Completion is Needed Reconsider the case modus ponens with positive observation, i.e. P 10 = {l e ab, ab }, A = {e, e }, and O = l. lm wc Now consider P 10, A, = 3L instead of P 10, A, = 3L P 10 = 3L l P 10 {e } = 3L l (because ab can be mapped to ). P 10 {e } = 3L l P 10 A = 3L l Hence, the observation can not be explained at all (in contrast to Byrne 1989). Human Reasoning, Logic Programs and the CORE Method 6

63 Completion is Insufficient Reconsider the case modus ponens with positive observation, i.e. P 10 = {l e ab, ab }, A = {e, e }, and O = l. Now consider P 10, A, = c 3L instead of P lm wc 10, A, = where P = c 3L F iff F holds in all models for c P. 3L, c P 10 = {l e ab, ab, e } = 3L l c P 10 = 3L e The observation is inconsistent with the knowledge base and, thus, cannot be explained at all (in contrast to Byrne 1989). Human Reasoning, Logic Programs and the CORE Method 63

64 Explanations must be Completed as well Reconsider the case modus ponens with positive observation, i.e. P 10 = {l e ab, ab }, A = {e, e }, and O = l. Now (weakly) complete only the program, but not the explanations. wc P 10 = {l e ab, ab }. wc P 10 = 3L l wc (P 10 ) {e } = 3L l wc (P 10 ) {e } = 3L l (because e can be mapped to ). wc (P 10 ) A = 3L l Hence, the observation can not be explained (in contrast with Byrne 1989). Human Reasoning, Logic Programs and the CORE Method 64

65 Sceptical versus Creduluos Reasoning Reconsider the case alternative arguments with positive observation, i.e., P 11 = {l e ab 1, ab 1, l t ab, ab }, A = {e, e }, and O = l. Now consider P 11, A, = lm wc 3L and reason credulously: There are two minimal explanations, viz. {e } and {e }. Hence, P 11, l = s A e, but P 11, l = c A e. Creduluos reasoning is inconsistent with Byrne Human Reasoning, Logic Programs and the CORE Method 65

66 Summary Let P 10 = {l e ab, ab } P 11 = {l e ab 1, ab 1, l t ab, ab } P 1 = {l e ab 1, ab 1 o, l o ab, ab e} We obtain P 10, l = s A e P 11, l = s A e P 1, l = s A e P 10, l = s A e P 11, l = s A e P 1, l = s A e Byrne 1989 e(53%) e(16%) e(55%) e(69%) e(69%) e(44%) Human Reasoning, Logic Programs and the CORE Method 66

67 Summary Logic appears to be adequate for human reasoning if weak completion, Lukasiewicz semantics, the Stenning and van Lambalgen semantic operator, and abduction are used Human Reasoning is modeled by reasoning towards an appropriate logic program P and, thereafter, reasoning with respect to the least L-model of the weak completion of P. This approach matches data from studies in human reasoning. There is a connectionist encoding. Human Reasoning, Logic Programs and the CORE Method 67

68 Discussion Stenning, van Lambalgen 008 propose spreading-activation networks like KBANN (Towell, Shavlik 1993) with two units for each propositional letter and an inhibitory link between them. Logical threshold units can be replaced by bipolar sigmoidal ones following d Avila Garcez, Zaverucha, Carbalho Networks can be trained by backpropagation, but backpropagation is not neurally plausible. Human Reasoning, Logic Programs and the CORE Method 68

69 Some Open Problems (1) Negation How is negation treated in human reasoning? Errors How can frequently made errors be explained in the proposed approach? Lukasiezicz logic In a Lukasiezicz logic the semantic deduction theorem does not hold. Is this adequate with respect to human reasoning? Completion Under which conditions is human reasoning adequately modeled by completion and/or weak completion? Human Reasoning, Logic Programs and the CORE Method 69

70 Some Open Problems () Contractions Do humans exhibit a behavior which can be adequately modeled by contractional semantic operators? Can we generate appropriate level mappings by studying the behavior of humans? Explanations Do humans consider minimal explanations? In which order are (minimal) explanations generated by humans if there are several? Does attention play a role in the selection of (minimal) explanations? Stable coalitions Do stable coalitions occur in human reasoning? How are they deactivated? Human Reasoning, Logic Programs and the CORE Method 70

71 Some Open Problems (3) Reasoning Do humans reason sceptically or credulously? How does a connectionist realization of sceptical reasoning looks like? Theory revision How is theory revision modeled in human reasoning? Relation to other semantics What is the relation between the proposed approach and well-founded and/or stable and/or projection semantics? Human Reasoning, Logic Programs and the CORE Method 71

Weak Completion Semantics

Weak Completion Semantics Weak Completion Semantics International Center for Computational Logic Technische Universität Dresden Germany Some Human Reasoning Tasks Logic Programs Non-Monotonicity Łukasiewicz Logic Least Models Weak

More information

The Core Method. The Very Idea. The Propositional CORE Method. Human Reasoning

The Core Method. The Very Idea. The Propositional CORE Method. Human Reasoning The Core Method International Center for Computational Logic Technische Universität Dresden Germany The Very Idea The Propositional CORE Method Human Reasoning The Core Method 1 The Very Idea Various semantics

More information

logic is everywhere Logik ist überall Hikmat har Jaga Hai Mantık her yerde la logica è dappertutto lógica está em toda parte

logic is everywhere Logik ist überall Hikmat har Jaga Hai Mantık her yerde la logica è dappertutto lógica está em toda parte Simple Connectionist Systems Steffen Hölldobler logika je všude International Center for Computational Logic Technische Universität Dresden Germany logic is everywhere Connectionist Networks la lógica

More information

Skeptical Abduction: A Connectionist Network

Skeptical Abduction: A Connectionist Network Skeptical Abduction: A Connectionist Network Technische Universität Dresden Luis Palacios Medinacelli Supervisors: Prof. Steffen Hölldobler Emmanuelle-Anna Dietz 1 To my family. Abstract A key research

More information

A Computational Logic Approach to the Suppression Task

A Computational Logic Approach to the Suppression Task A Computational Logic Approach to the Suppression Task mmanuelle-anna Dietz and Steffen Hölldobler ({dietz,sh}@iccl.tu-dresden.de) International Center for Computation Logic, TU Dresden D-01062 Dresden,

More information

Logic Programs and Three-Valued Consequence Operators

Logic Programs and Three-Valued Consequence Operators International Center for Computational Logic, TU Dresden, 006 Dresden, Germany Logic Programs and Three-Valued Consequence Operators Master s Thesis Carroline Dewi Puspa Kencana Ramli Author Prof. Dr.

More information

Recurrent Neural Networks and Logic Programs

Recurrent Neural Networks and Logic Programs Recurrent Neural Networks and Logic Programs The Very Idea Propositional Logic Programs Propositional Logic Programs and Learning Propositional Logic Programs and Modalities First Order Logic Programs

More information

logic is everywhere Logik ist überall Hikmat har Jaga Hai Mantık her yerde la logica è dappertutto lógica está em toda parte Non-Monotonic Reasoning

logic is everywhere Logik ist überall Hikmat har Jaga Hai Mantık her yerde la logica è dappertutto lógica está em toda parte Non-Monotonic Reasoning Non-Monotonic Reasoning 1 Introduction logika je všude 2 Closed World Assumption 3 Completion logic is everywhere 4 Circumscription la lógica está por todas partes 5 Default Logic 6 Answer Set Programming

More information

Forward Human Reasoning Modeled by Logic Programming Modeled by Classical Logic with Circumscription and Projection

Forward Human Reasoning Modeled by Logic Programming Modeled by Classical Logic with Circumscription and Projection Faculty of Computer Science Institute of Artificial Intelligence Knowledge Representation and Reasoning Forward Human Reasoning Modeled by Logic Programming Modeled by Classical Logic with Circumscription

More information

THE LOGIC OF COMPOUND STATEMENTS

THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS All dogs have four legs. All tables have four legs. Therefore, all dogs are tables LOGIC Logic is a science of the necessary laws of thought, without which no employment

More information

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 1.1 - Logical Form and Logical Equivalence Definition. A statement or proposition is a sentence that is either true or false, but not both. ex. 1 + 2 = 3 IS a statement

More information

Simulating Human Inferences in the Light of New Information: A Formal Analysis

Simulating Human Inferences in the Light of New Information: A Formal Analysis Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence (IJCAI-16) Simulating Human Inferences in the Light of New Information: A Formal Analysis Marco Ragni, 1, Christian

More information

Clusters of Humans in Syllogistic Reasoning under the Weak Completion Semantics

Clusters of Humans in Syllogistic Reasoning under the Weak Completion Semantics Faculty of Computer Science Institute of Artificial Intelligence Knowledge Representation and Reasoning Clusters of Humans in Syllogistic Reasoning under the Weak Completion Semantics Richard Mörbitz KRR

More information

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

2. The Logic of Compound Statements Summary. Aaron Tan August 2017 2. The Logic of Compound Statements Summary Aaron Tan 21 25 August 2017 1 2. The Logic of Compound Statements 2.1 Logical Form and Logical Equivalence Statements; Compound Statements; Statement Form (Propositional

More information

A Computational Logic Approach to the Belief Bias in Human Syllogistic Reasoning

A Computational Logic Approach to the Belief Bias in Human Syllogistic Reasoning A Computational Logic Approach to the Belief Bias in Human Syllogistic Reasoning Emmanuelle-Anna Dietz International Center for Computational Logic TU Dresden, Germany CONTEXT 17 June 2017 PREMISE 1 PREMISE

More information

Propositional Logic. Fall () Propositional Logic Fall / 30

Propositional Logic. Fall () Propositional Logic Fall / 30 Propositional Logic Fall 2013 () Propositional Logic Fall 2013 1 / 30 1 Introduction Learning Outcomes for this Presentation 2 Definitions Statements Logical connectives Interpretations, contexts,... Logically

More information

03 Propositional Logic II

03 Propositional Logic II Martin Henz February 12, 2014 Generated on Wednesday 12 th February, 2014, 09:49 1 Review: Syntax and Semantics of Propositional Logic 2 3 Propositional Atoms and Propositions Semantics of Formulas Validity,

More information

Deductive Systems. Lecture - 3

Deductive Systems. Lecture - 3 Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth

More information

Logic Programs and Connectionist Networks

Logic Programs and Connectionist Networks Wright State University CORE Scholar Computer Science and Engineering Faculty Publications Computer Science and Engineering 9-2004 Logic Programs and Connectionist Networks Pascal Hitzler pascal.hitzler@wright.edu

More information

Language of Propositional Logic

Language of Propositional Logic Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called

More information

Formal Logic. Critical Thinking

Formal Logic. Critical Thinking ormal Logic Critical hinking Recap: ormal Logic If I win the lottery, then I am poor. I win the lottery. Hence, I am poor. his argument has the following abstract structure or form: If P then Q. P. Hence,

More information

A Little Deductive Logic

A Little Deductive Logic A Little Deductive Logic In propositional or sentential deductive logic, we begin by specifying that we will use capital letters (like A, B, C, D, and so on) to stand in for sentences, and we assume that

More information

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic. Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic. The method consists of using sets of Rules of Inference (valid argument forms)

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

A Quick Lesson on Negation

A Quick Lesson on Negation A Quick Lesson on Negation Several of the argument forms we have looked at (modus tollens and disjunctive syllogism, for valid forms; denying the antecedent for invalid) involve a type of statement which

More information

Connectionist Artificial Neural Networks

Connectionist Artificial Neural Networks Imperial College London Department of Computing Connectionist Artificial Neural Networks Master s Thesis by Mathieu Guillame-Bert Supervised by Dr. Krysia Broda Submitted in partial fulfillment of the

More information

A Little Deductive Logic

A Little Deductive Logic A Little Deductive Logic In propositional or sentential deductive logic, we begin by specifying that we will use capital letters (like A, B, C, D, and so on) to stand in for sentences, and we assume that

More information

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.7, 5.5) TOPICS Sets and Functions Propositional and Predicate Logic Logical Operators and Truth Tables Logical Equivalences and Inference

More information

PROPOSITIONAL CALCULUS

PROPOSITIONAL CALCULUS PROPOSITIONAL CALCULUS A proposition is a complete declarative sentence that is either TRUE (truth value T or 1) or FALSE (truth value F or 0), but not both. These are not propositions! Connectives and

More information

Minimal models with three-valued logic: The case of counterfactual conditionals

Minimal models with three-valued logic: The case of counterfactual conditionals Minimal models with three-valued logic: The case of counterfactual conditionals 1. Introduction This paper is about non-monotonic logic and its applications. I will try to bring together two different

More information

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional logic (revision) & semantic entailment. p. 1/34 Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)

More information

Logic, Sets, and Proofs

Logic, Sets, and Proofs Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Operators. A logical statement is a mathematical statement that can be assigned a value either true or false.

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

Integrating Logic Programs and Connectionist Systems

Integrating Logic Programs and Connectionist Systems Integrating Logic Programs and Connectionist Systems Sebastian Bader, Steffen Hölldobler International Center for Computational Logic Technische Universität Dresden Germany Pascal Hitzler Institute of

More information

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical

More information

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson Natural Deduction Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. An example 1. Validity by truth table 2. Validity by proof 2. What s a proof 1. Proof checker 3. Rules of

More information

A. Propositional Logic

A. Propositional Logic CmSc 175 Discrete Mathematics A. Propositional Logic 1. Statements (Propositions ): Statements are sentences that claim certain things. Can be either true or false, but not both. Propositional logic deals

More information

It rains now. (true) The followings are not propositions.

It rains now. (true) The followings are not propositions. Chapter 8 Fuzzy Logic Formal language is a language in which the syntax is precisely given and thus is different from informal language like English and French. The study of the formal languages is the

More information

15414/614 Optional Lecture 1: Propositional Logic

15414/614 Optional Lecture 1: Propositional Logic 15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Packet #1: Logic & Proofs. Applied Discrete Mathematics Packet #1: Logic & Proofs Applied Discrete Mathematics Table of Contents Course Objectives Page 2 Propositional Calculus Information Pages 3-13 Course Objectives At the conclusion of this course, you should

More information

185.A09 Advanced Mathematical Logic

185.A09 Advanced Mathematical Logic 185.A09 Advanced Mathematical Logic www.volny.cz/behounek/logic/teaching/mathlog13 Libor Běhounek, behounek@cs.cas.cz Lecture #1, October 15, 2013 Organizational matters Study materials will be posted

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

Extracting Reduced Logic Programs from Artificial Neural Networks

Extracting Reduced Logic Programs from Artificial Neural Networks Extracting Reduced Logic Programs from Artificial Neural Networks Jens Lehmann 1, Sebastian Bader 2, Pascal Hitzler 3 1 Department of Computer Science, Technische Universität Dresden, Germany 2 International

More information

Propositional Logic: Syntax

Propositional Logic: Syntax 4 Propositional Logic: Syntax Reading: Metalogic Part II, 22-26 Contents 4.1 The System PS: Syntax....................... 49 4.1.1 Axioms and Rules of Inference................ 49 4.1.2 Definitions.................................

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 4.1-4.8 p. 1/33 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook) Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or

More information

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Why Learning Logic? Logic. Propositional Logic. Compound Propositions Logic Objectives Propositions and compound propositions Negation, conjunction, disjunction, and exclusive or Implication and biconditional Logic equivalence and satisfiability Application of propositional

More information

A Computational Logic Approach to Human Syllogistic Reasoning

A Computational Logic Approach to Human Syllogistic Reasoning A Computational Logic Approach to Human Syllogistic Reasoning Ana Oliveira da Costa and Emmanuelle-Anna Dietz Saldanha and Steffen Hölldobler and Marco Ragni 1 International Center for Computational Logic,

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Logic (3A) Young W. Lim 11/2/13

Logic (3A) Young W. Lim 11/2/13 Copyright (c) 2013. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software

More information

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional) Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional

More information

Tutorial: Nonmonotonic Logic

Tutorial: Nonmonotonic Logic Tutorial: Nonmonotonic Logic PhDs in Logic (2017) Christian Straßer May 2, 2017 Outline Defeasible Reasoning Scratching the Surface of Nonmonotonic Logic 1/52 Defeasible Reasoning What is defeasible reasoning?

More information

Chapter 1 Elementary Logic

Chapter 1 Elementary Logic 2017-2018 Chapter 1 Elementary Logic The study of logic is the study of the principles and methods used in distinguishing valid arguments from those that are not valid. The aim of this chapter is to help

More information

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

More information

Logic (3A) Young W. Lim 10/31/13

Logic (3A) Young W. Lim 10/31/13 Copyright (c) 2013. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software

More information

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Discrete Structures of Computer Science Propositional Logic III Rules of Inference Discrete Structures of Computer Science Propositional Logic III Rules of Inference Gazihan Alankuş (Based on original slides by Brahim Hnich) July 30, 2012 1 Previous Lecture 2 Summary of Laws of Logic

More information

Manual of Logical Style

Manual of Logical Style Manual of Logical Style Dr. Holmes January 9, 2015 Contents 1 Introduction 2 2 Conjunction 3 2.1 Proving a conjunction...................... 3 2.2 Using a conjunction........................ 3 3 Implication

More information

KLEENE LOGIC AND INFERENCE

KLEENE LOGIC AND INFERENCE Bulletin of the Section of Logic Volume 4:1/2 (2014), pp. 4 2 Grzegorz Malinowski KLEENE LOGIC AND INFERENCE Abstract In the paper a distinguished three-valued construction by Kleene [2] is analyzed. The

More information

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers 1. When is an inference rule {a1, a2,.., an} c sound? (b) a. When ((a1 a2 an) c) is a tautology b. When ((a1

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Logic for Computer Science - Week 4 Natural Deduction

Logic for Computer Science - Week 4 Natural Deduction Logic for Computer Science - Week 4 Natural Deduction 1 Introduction In the previous lecture we have discussed some important notions about the semantics of propositional logic. 1. the truth value of a

More information

Propositional Logic: Review

Propositional Logic: Review Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or

More information

Chapter 1: The Logic of Compound Statements. January 7, 2008

Chapter 1: The Logic of Compound Statements. January 7, 2008 Chapter 1: The Logic of Compound Statements January 7, 2008 Outline 1 1.1 Logical Form and Logical Equivalence 2 1.2 Conditional Statements 3 1.3 Valid and Invalid Arguments Central notion of deductive

More information

Propositional Logic. Spring Propositional Logic Spring / 32

Propositional Logic. Spring Propositional Logic Spring / 32 Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32 Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements

More information

Valid Reasoning. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, Outline Truth and Validity Valid Reasoning

Valid Reasoning. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, Outline Truth and Validity Valid Reasoning Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February, 2018 Alice E. Fischer Reasoning... 1/23 1 Truth is not the same as Validity 2 Alice E. Fischer Reasoning... 2/23 Truth is not the

More information

Logic Overview, I. and T T T T F F F T F F F F

Logic Overview, I. and T T T T F F F T F F F F Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

More information

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

Warm-Up Problem. Write a Resolution Proof for. Res 1/32 Warm-Up Problem Write a Resolution Proof for Res 1/32 A second Rule Sometimes throughout we need to also make simplifications: You can do this in line without explicitly mentioning it (just pretend you

More information

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares

More information

Proof Worksheet 2, Math 187 Fall 2017 (with solutions)

Proof Worksheet 2, Math 187 Fall 2017 (with solutions) Proof Worksheet 2, Math 187 Fall 2017 (with solutions) Dr. Holmes October 17, 2017 The instructions are the same as on the first worksheet, except you can use all the rules in the strategies handout. We

More information

Maximal Introspection of Agents

Maximal Introspection of Agents Electronic Notes in Theoretical Computer Science 70 No. 5 (2002) URL: http://www.elsevier.nl/locate/entcs/volume70.html 16 pages Maximal Introspection of Agents Thomas 1 Informatics and Mathematical Modelling

More information

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations Logic Propositions and logical operations Main concepts: propositions truth values propositional variables logical operations 1 Propositions and logical operations A proposition is the most basic element

More information

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring 109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment

More information

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logic Knowledge Representation & Reasoning Mechanisms Logic Logic as KR Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logical inferences Resolution and Theorem-proving Logic

More information

HANDOUT AND SET THEORY. Ariyadi Wijaya

HANDOUT AND SET THEORY. Ariyadi Wijaya HANDOUT LOGIC AND SET THEORY Ariyadi Wijaya Mathematics Education Department Faculty of Mathematics and Natural Science Yogyakarta State University 2009 1 Mathematics Education Department Faculty of Mathematics

More information

AI Programming CS S-09 Knowledge Representation

AI Programming CS S-09 Knowledge Representation AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering

More information

PHI Propositional Logic Lecture 2. Truth Tables

PHI Propositional Logic Lecture 2. Truth Tables PHI 103 - Propositional Logic Lecture 2 ruth ables ruth ables Part 1 - ruth unctions for Logical Operators ruth unction - the truth-value of any compound proposition determined solely by the truth-value

More information

PL: Truth Trees. Handout Truth Trees: The Setup

PL: Truth Trees. Handout Truth Trees: The Setup Handout 4 PL: Truth Trees Truth tables provide a mechanical method for determining whether a proposition, set of propositions, or argument has a particular logical property. For example, we can show that

More information

(p == train arrives late) (q == there are taxis) (r == If p and not q, then r. Not r. p. Therefore, q. Propositional Logic

(p == train arrives late) (q == there are taxis) (r == If p and not q, then r. Not r. p. Therefore, q. Propositional Logic Propositional Logic The aim of logic in computer science is to develop languages to model the situations we encounter as computer science professionals Want to do that in such a way that we can reason

More information

cis32-ai lecture # 18 mon-3-apr-2006

cis32-ai lecture # 18 mon-3-apr-2006 cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem

More information

Weak Completion Semantics and its Applications in Human Reasoning

Weak Completion Semantics and its Applications in Human Reasoning Weak Completion Semantics and its Applications in Human Reasoning Ste en Hölldobler International Center for Computational Logic,TU Dresden, 01062 Dresden, Germany sh@iccl.tu-dresden.de Abstract. I present

More information

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018 cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018 Chapter 7 Introduction to Intuitionistic and Modal Logics CHAPTER 7 SLIDES Slides Set 1 Chapter 7 Introduction to Intuitionistic and Modal Logics

More information

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements

More information

Section 1.1 Propositions

Section 1.1 Propositions Set Theory & Logic Section 1.1 Propositions Fall, 2009 Section 1.1 Propositions In Chapter 1, our main goals are to prove sentences about numbers, equations or functions and to write the proofs. Definition.

More information

Natural Deduction for Propositional Logic

Natural Deduction for Propositional Logic Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic

More information

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Propositional Logic Arguments (5A) Young W. Lim 11/8/16 Propositional Logic (5A) Young W. Lim Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

Tableaux, Abduction and Truthlikeness RESEARCH REPORT

Tableaux, Abduction and Truthlikeness RESEARCH REPORT Section of Logic and Cognitive Science Institute of Psychology Adam Mickiewicz University in Poznań Mariusz Urbański Tableaux, Abduction and Truthlikeness RESEARCH REPORT Szamarzewskiego 89, 60-589 Poznań,

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

3 Propositional Logic

3 Propositional Logic 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

More information

(Refer Slide Time: 02:20)

(Refer Slide Time: 02:20) Discrete Mathematical Structures Dr. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 5 Logical Inference In the last class we saw about

More information

Formal (natural) deduction in propositional logic

Formal (natural) deduction in propositional logic Formal (natural) deduction in propositional logic Lila Kari University of Waterloo Formal (natural) deduction in propositional logic CS245, Logic and Computation 1 / 67 I know what you re thinking about,

More information

First Order Logic (1A) Young W. Lim 11/5/13

First Order Logic (1A) Young W. Lim 11/5/13 Copyright (c) 2013. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software

More information

MAI0203 Lecture 7: Inference and Predicate Calculus

MAI0203 Lecture 7: Inference and Predicate Calculus MAI0203 Lecture 7: Inference and Predicate Calculus Methods of Artificial Intelligence WS 2002/2003 Part II: Inference and Knowledge Representation II.7 Inference and Predicate Calculus MAI0203 Lecture

More information

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008 Chapter 3: Propositional Calculus: Deductive Systems September 19, 2008 Outline 1 3.1 Deductive (Proof) System 2 3.2 Gentzen System G 3 3.3 Hilbert System H 4 3.4 Soundness and Completeness; Consistency

More information

From Logic Programming to Human Reasoning: How to be Artificially Human

From Logic Programming to Human Reasoning: How to be Artificially Human From Logic Programming to Human Reasoning: How to be Artificially Human Dissertation zur Erlangung des akademischen Grades Doktor rerum naturalium (Dr. rer. nat.) vorgelegt an der Technischen Universität

More information

MAT2345 Discrete Math

MAT2345 Discrete Math Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview

More information

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173 Propositional Logic CSC 17 Propositional logic mathematical model (or algebra) for reasoning about the truth of logical expressions (propositions) Logical expressions propositional variables or logical

More information