Exercises: Artificial Intelligence. Automated Reasoning: Good to walk

Size: px
Start display at page:

Download "Exercises: Artificial Intelligence. Automated Reasoning: Good to walk"

Transcription

1 Exercises: Artificial Intelligence Automated Reasoning: Good to walk

2 Automated Reasoning: Resolution INTRODUCTION

3 Introduction ProveQfromT TranslateQandTtologic LetT bet({ÿq} Transform all formula in T to implicative normal form: A 1 / /A n B 1 - -B m false B 1 - -B m A 1 / /A n true Derive contradiction: false true

4 Introduction Resolution propositional logic: Given two formula: /p/ - - / / -p- Derive new formula: ( /p/ )/( / / ) ( - - )-( -p- )

5 Introduction Dealing with variables: Substitution is assignment of values to variables: E.g.replacexbyA: q={x/a} (p(x,y))q=p(a,y) GivenatomsA,A Most general unifying substitution(mgu) is SubstitutionqsuchthatAq=A q q does not replace variables unless necessary Example: A=p(x,y), A =p(a,z) ï mgu(a,a )={x/a,y/z}

6 Introduction Resolution predicate logic: Given two formula: /A/ - - / / -A - Suchthatthereexistsanmgu(A,A )=q Derive new formula: (( /A/ )/( / / ) ( - - )-( -A - ))q

7 Introduction Another inference rule: Factoring Givenformula:( /A/A / - - ) Suchthatthereexistsanmgu(A,A )=q Derive new formula: ( /A/A / - - )q Givenformula:( / / -A-A - ) Suchthatthereexistsanmgu(A,A )=q Derive new formula: ( / / -A-A - )q

8 Automated Reasoning: Good to walk PROBLEM

9 Problem Convert to logic: Itisraining,itissnowingoritisdry. Itiswarm. Itisnotraining. Itisnotsnowing. Iftheweatherisnice,thenitisgoodtowalk. Iftheweatherisdryandwarm, theweatherisnice.

10 Automated Reasoning: Good to walk SOLUTION

11 Itisraining,itissnowingoritisdry. raining/snowing/dry( true) Itiswarm. Itisnotraining. Itisnotsnowing. Iftheweatherisnice,thenitisgoodtowalk. If the weather is dry and warm, the weather is nice.

12 raining/snowing/dry( true) Itiswarm. warm( true) Itisnotraining. Itisnotsnowing. Iftheweatherisnice,thenitisgoodtowalk. If the weather is dry and warm, the weather is nice.

13 raining/snowing/dry( true) warm( true) Itisnotraining. false raining OR Ÿraining Itisnotsnowing. Iftheweatherisnice,thenitisgoodtowalk. If the weather is dry and warm, the weather is nice.

14 raining/snowing/dry( true) warm( true) false raining OR Ÿraining Itisnotsnowing. false snowing OR Ÿsnowing Iftheweatherisnice,thenitisgoodtowalk. If the weather is dry and warm, the weather is nice.

15 raining/snowing/dry( true) warm( true) false raining OR Ÿraining false snowing snowing OR Ÿsnowing Iftheweatherisnice,thenitisgoodtowalk. walk nice If the weather is dry and warm, the weather is nice.

16 raining/snowing/dry( true) warm( true) false raining OR Ÿraining false snowing snowing OR Ÿsnowing walk nice If the weather is dry and warm, the weather is nice. nice dry-warm

17 raining/snowing/dry( true) warm( true) false raining OR Ÿraining false snowing OR Ÿsnowing walk nice nice dry-warm

18 Convert sentences to implicative normal form: raining/snowing/dry( true) warm( true) false raining false snowing walk nice nice dry-warm

19 Automated Reasoning: Good to walk PROBLEM

20 Problem Provebyresolution: Itisgoodtowalk

21 Automated Reasoning: Good to walk SOLUTION

22 Provebyresolution: Itisgoodtowalk Weassumethatitisnotgoodtowalk: false walk

23 Weassumethatitisnotgoodtowalk: Given: false walk raining/snowing/dry( true) warm( true) false raining false snowing walk nice nice dry-warm

24 false walk

25 walk nice false walk false nice

26 walk nice nice dry -warm false walk false nice false dry -warm

27 walk nice nice dry -warm warm true false walk false nice false dry -warm false dry

28 walk nice nice dry -warm warm true raining /snowing /dry true false walk false nice false dry -warm false dry raining /snowing true

29 walk nice nice dry -warm warm true raining /snowing /dry true false raining false walk false nice false dry -warm false dry raining /snowing true snowing true

30 walk nice nice dry -warm warm true raining /snowing /dry true false raining false snowing false walk false nice false dry -warm false dry raining /snowing true snowing true false true

31 Provebyresolution: Itisgoodtowalk Weassumethatitisnotgoodtowalk: false walk This leads to a contradiction: false true Thus, Itisgoodtowalk

32 Exercises: Artificial Intelligence Automated Reasoning: MGU

33 Automated Reasoning: MGU INTRODUCTION: UNIFICATION

34 Procedure Unify(a,b): mgu:={a=b};stop:=false; WHILE(not(stop) AND mgu contains s=t) Case1:tisavariable,sisnotavariable: Replaces=tbyt=sinmgu Case2:sisavariable,tistheSAMEvariable: Deletes=tfrommgu mgu Case3:sisavariable,tisnotavariableandcontainss: stop:=true Case4:sisavariable,tisnotidenticaltonorcontainss: Replacealloccurrencesofsinmgubyt Case5:sisoftheformf(s 1,,s n ),tofg(t 1,,t m ): Iffnotequaltogormnotequaltonthenstop:=true Elsereplaces=tinmgubys 1 =t 1,,s n =t n

35 Automated Reasoning: MGU PROBLEM

36 Problem Whatisthem.g.u.of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) p(a,x,f(g(y)))=p(z,f(z),f(a)) q(x,x)=q(y,f(y)) = q(y,f(y)) f(x,g(f(a),u))=f(g(u,v),x)

37 Automated Reasoning: MGU SOLUTION

38 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a))

39 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Case5:f(y)=x,w=x,g(z,y)=g(z,A)

40 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Case5:f(y)=x,w=x,g(z,y)=g(z,A) Case1:x=f(y),w=x,g(z,y)=g(z,A)

41 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Case5:f(y)=x,w=x,g(z,y)=g(z,A) Case1:x=f(y),w=x,g(z,y)=g(z,A) Case4:x=f(y),w=f(y),g(z,y)=g(z,A)

42 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Case5:f(y)=x,w=x,g(z,y)=g(z,A) Case1:x=f(y),w=x,g(z,y)=g(z,A) Case4:x=f(y),w=f(y),g(z,y)=g(z,A) Case5:x=f(y),w=f(y),z=z,y=A

43 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Case5:f(y)=x,w=x,g(z,y)=g(z,A) Case1:x=f(y),w=x,g(z,y)=g(z,A) Case4:x=f(y),w=f(y),g(z,y)=g(z,A) Case5:x=f(y),w=f(y),z=z,y=A Case2:x=f(y),w=f(y),y=A

44 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Init: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) Case5:f(y)=x,w=x,g(z,y)=g(z,A) Case1:x=f(y),w=x,g(z,y)=g(z,A) Case4:x=f(y),w=f(y),g(z,y)=g(z,A) Case5:x=f(y),w=f(y),z=z,y=A Case2:x=f(y),w=f(y),y=A Case4:x=f(A),w=f(A),y=A

45 What is the m.g.u. of: p(f(y),w,g(z,y)) = p(x,x,g(z,a)) MGU: x/f(a),w/f(a),y/a Result: p(f(a),f(a),g(z,a))

46 Automated Reasoning: MGU SOLUTION

47 What is the m.g.u. of: p(a,x,f(g(y))) = p(z,f(z),f(a)) Init:p(A,x,f(g(y)))=p(z,f(z),f(A))

48 What is the m.g.u. of: p(a,x,f(g(y))) = p(z,f(z),f(a)) Init:p(A,x,f(g(y)))=p(z,f(z),f(A)) Case5:A=z,x=f(z),f(g(y))=f(A)

49 What is the m.g.u. of: p(a,x,f(g(y))) = p(z,f(z),f(a)) Init:p(A,x,f(g(y)))=p(z,f(z),f(A)) Case5:A=z,x=f(z),f(g(y))=f(A) Case1:z=A,x=f(z),f(g(y))=f(A)

50 What is the m.g.u. of: p(a,x,f(g(y))) = p(z,f(z),f(a)) Init:p(A,x,f(g(y)))=p(z,f(z),f(A)) Case5:A=z,x=f(z),f(g(y))=f(A) Case1:z=A,x=f(z),f(g(y))=f(A) Case4:z=A,x=f(A),f(g(y))=f(A)

51 What is the m.g.u. of: p(a,x,f(g(y))) = p(z,f(z),f(a)) Init:p(A,x,f(g(y)))=p(z,f(z),f(A)) Case5:A=z,x=f(z),f(g(y))=f(A) Case1:z=A,x=f(z),f(g(y))=f(A) Case4:z=A,x=f(A),f(g(y))=f(A) Case5:z=A,x=f(A),g(y)=A

52 What is the m.g.u. of: p(a,x,f(g(y))) = p(z,f(z),f(a)) Init:p(A,x,f(g(y)))=p(z,f(z),f(A)) Case5:A=z,x=f(z),f(g(y))=f(A) Case1:z=A,x=f(z),f(g(y))=f(A) Case4:z=A,x=f(A),f(g(y))=f(A) Case5:z=A,x=f(A),g(y)=A Case5:stop:=true

53 Automated Reasoning: MGU SOLUTION

54 Whatisthem.g.u.of:q(x,x)=q(y,f(y)) Init: q(x,x) = q(y,f(y))

55 Whatisthem.g.u.of:q(x,x)=q(y,f(y)) Init: q(x,x) = q(y,f(y)) Case5:x=y,x=f(y)

56 Whatisthem.g.u.of:q(x,x)=q(y,f(y)) Init: q(x,x) = q(y,f(y)) Case5:x=y,x=f(y) Case4:x=y,y=f(y)

57 Whatisthem.g.u.of:q(x,x)=q(y,f(y)) Init: q(x,x) = q(y,f(y)) Case5:x=y,x=f(y) Case4:x=y,y=f(y) Case3:stop:=true

58 Automated Reasoning: MGU SOLUTION

59 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x)

60 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x

61 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x Case4:x=g(u,v),g(f(a),u)=g(u,v)

62 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x Case4:x=g(u,v),g(f(a),u)=g(u,v) Case5:x=g(u,v),f(a)=u,u=v

63 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x Case4:x=g(u,v),g(f(a),u)=g(u,v) Case5:x=g(u,v),f(a)=u,u=v Case1:x=g(u,v),u=f(a),u=v

64 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x Case4:x=g(u,v),g(f(a),u)=g(u,v) Case5:x=g(u,v),f(a)=u,u=v Case1:x=g(u,v),u=f(a),u=v Case4:x=g(f(a),v),u=f(a),f(a)=v

65 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x Case4:x=g(u,v),g(f(a),u)=g(u,v) Case5:x=g(u,v),f(a)=u,u=v Case1:x=g(u,v),u=f(a),u=v Case4:x=g(f(a),v),u=f(a),f(a)=v Case1:x=g(f(a),v),u=f(a),v=f(a)

66 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) Init: f(x,g(f(a),u)) = f(g(u,v),x) Case5:x=g(u,v),g(f(a),u)=x Case4:x=g(u,v),g(f(a),u)=g(u,v) Case5:x=g(u,v),f(a)=u,u=v Case1:x=g(u,v),u=f(a),u=v Case4:x=g(f(a),v),u=f(a),f(a)=v Case1:x=g(f(a),v),u=f(a),v=f(a) Case4:x=g(f(a),f(a)),u=f(a),v=f(a)

67 What is the m.g.u. of: f(x,g(f(a),u)) = f(g(u,v),x) MGU: x/g(f(a),f(a)),u/f(a),v/f(a) Result: f(g(f(a),f(a)),g(f(a),f(a)))

68 Exercises: Artificial Intelligence Automated Reasoning: Resolution

69 Automated Reasoning: Resolution PROBLEM

70 Problem Isthereanyonewhoisamother-in-lawofPeter? mother-in-law(x,y) mother(x,z)- married(z,y) mother(x,y) female(x)- parent(x,y) female(an)( true) parent(an,maria)( true) married(maria,peter)( true)

71 Automated Reasoning: Resolution SOLUTION

72 Assumption: Peter has no mother-in-law false mother-in-law(x,peter) Given: mother-in-law(x,y) mother(x,z)- married(z,y) mother(x,y) female(x)- parent(x,y) female(an)( true) parent(an,maria)( true) married(maria,peter)( true)

73 false mother-in-law(x,peter)

74 false mother-in-law(x,peter) mother-in-law(x,y ) mother(x,z )-married(z,y ) {x /x,y /Peter} false mother(x,z )- married(z,peter)

75 false mother-in-law(x,peter) false mother(x,z )- married(z,peter) mother(x,y ) female(x )-parent(x,y ) {x /x,y /z } false female(x)- parent(x,z )- married(z,peter)

76 false mother-in-law(x,peter) false mother(x,z )- married(z,peter) false female(x)- parent(x,z )- married(z,peter) female(an) {x/an} false parent(an,z )- married(z,peter)

77 false mother-in-law(x,peter) false mother(x,z )- married(z,peter) false female(x)- parent(x,z )- married(z,peter) false parent(an,z )- married(z,peter) parent(an,maria) {z /Maria} false married(maria,peter)

78 false mother-in-law(x,peter) false mother(x,z )- married(z,peter) {x/an} false female(x)- parent(x,z )- married(z,peter) false parent(an,z )- married(z,peter) false married(maria,peter) married(maria,peter) false true( )

79 Automated Reasoning: Resolution PROBLEM

80 Problem Is there a valid colouring of a map of Belgium, the Netherlands, and Germany? color(red)( true) color(green)( true) color(blue)( true) neighbour(x,y) color(x), color(y), diff(x,y) diff/2 succeeds when arguments cannot be unified

81 Automated Reasoning: Resolution SOLUTION

82 Assumption: There is no valid colouring false nb(b,g),nb(g,n),nb(n,b) Given: c(r)( true) c(g)( true) c(b)( true) nb(x,y) c(x), c(y), diff(x,y) diff/2 succeeds when arguments cannot be unified

83 false nb(b,g)-nb(g,n)-nb(n,b)

84 false nb(b,g)-nb(g,n)-nb(n,b) nb(x,y ) c(x ),c(y ),diff(x,y ) {x /b,y /g} false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b)

85 false nb(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) nb(x,y ) c(x ),c(y ),diff(x,y ) {x /g,y /n} false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b)

86 false nb(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) nb(x,y ) c(x ),c(y ),diff(x,y ) {x /n,y /b} false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b)

87 false nb(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) c(r) {b/r} false c(g)-diff(r,g)-c(n)-diff(g,n)-diff(n,r)

88 false nb(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) false c(g)-diff(r,g)-c(n)-diff(g,n)-diff(n,r) c(g) {g/g} false diff(r,g)- c(n)- diff(g,n)- diff(n,r)

89 false nb(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) false c(g)-diff(r,g)-c(n)-diff(g,n)-diff(n,r) false diff(r,g)- c(n)- diff(g,n)- diff(n,r) c(b) {n/b} false diff(r,g)- diff(g,b)- diff(b,r)

90 false nb(b,g)-nb(g,n)-nb(n,b) {b/r,g/g,n/b} false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) false c(g)-diff(r,g)-c(n)-diff(g,n)-diff(n,r) false diff(r,g)- c(n)- diff(g,n)- diff(n,r) false diff(r,g)- diff(g,b)- diff(b,r) Built-in diff/2: succeeds for different arguments false true( )

91 Alternative solution false nb(b,g)-nb(g,n)-nb(n,b) {b/b,g/g,n/r} false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) false c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) false diff(b,g)- c(n)- diff(g,n)- diff(n,b) false diff(b,g)- diff(g,r)- diff(r,b) Built-in diff/2: succeeds for different arguments false true( )

92 Or consistency = Continue search false nb(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-nb(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-nb(n,b) false c(b)-c(g)-diff(b,g)-c(n)-diff(g,n)-diff(n,b) false c(g)-diff(r,g)-c(n)-diff(g,n)-diff(n,r) false diff(r,r)- c(n)- diff(r,n)- diff(n,r) false diff(r,r)- diff(r,b)- diff(b,r) diff(r,r) is false false false

93 Exercises: Artificial Intelligence Automated Reasoning: Predicate Resolution

94 Automated Reasoning: Predicate Resolution PROBLEM

95 Problem Resolution in predicate logic: Given, the formula in first order predicate logic: "xp(x)/ÿr(f(x)) "x"yr(f(x))/r(f(f(y))) Here,xandyarevariables. Give an explicit resolution proof(graphical) for: "x$yp(f(x))-r(y)entailedbythegivenformula

96 Automated Reasoning: Predicate Resolution SOLUTION

97 Formula in implicative normal form: "xp(x)/ÿr(f(x)) p(x) r(f(x)) "x"yr(f(x))/r(f(f(y))) r(f(x))/r(f(f(y)))( true) Assumption Ÿ["x$yp(f(x))-r(y)]ñ$x"yŸ[p(f(x))-r(y)]ñ "yÿ[p(f(a))-r(y)]ñfalse p(f(a))-r(y)

98 false p(f(a))-r(y) Solution

99 false p(f(a))-r(y) p(x ) r(f(x )) {x /f(a)} false r(f(f(a)))-r(y)

100 false p(f(a))-r(y) false r(f(f(a)))-r(y) Factoring:mgu(r(f(f(A)))=r(y))={y/f(f(A))} false r(f(f(a)))-r(f(f(a)))

101 false p(f(a))-r(y) false r(f(f(a)))-r(y) false r(f(f(a)))-r(f(f(a))) r(f(x ))/r(f(f(y )))( true) Factoring:mgu(r(f(x ))=r(f(f(y ))))={x /f(y )} r(f(f(y )))( true) {y /A} false true( ) {y/f(f(a))}

Section Summary. Section 1.5 9/9/2014

Section Summary. Section 1.5 9/9/2014 Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers Translated

More information

8 General first order representation

8 General first order representation Intro. to Artificial Intelligence: Dale Schuurmans, Relu Patrascu 1 8 General first order representation 8.1 First order language Propositional core constants A, B, C, D predicates on(, ) associated arity,

More information

Logic III. Introduction to Artificial Intelligence CSE 150

Logic III. Introduction to Artificial Intelligence CSE 150 Logic III Introduction to Artificial Intelligence CSE 150 Outline Last Lecture Propositional Logic and Sound inference rules Introduction First order logic Symbols, Variables, Functions, Predicates This

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

CS 520: Introduction to Artificial Intelligence. Review

CS 520: Introduction to Artificial Intelligence. Review CS 520: Introduction to Artificial Intelligence Prof. Louis Steinberg : First-order Logic Proof Algorithms 1 Review Representing a Domain in FOL A domain is a portion of the world about which we wish to

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence First-Order Resolution [1] Propositional Resolution {} 1 2 n i A A) {} { 1, 2,, n } i { 1, 2,, n, }, {, 1, 2,, m } { 1, 2,, n, }, {, 1, 2,, m } { 1, 2,, n, 1, 2,, m } First-Order

More information

THE PREDICATE CALCULUS

THE PREDICATE CALCULUS 2 THE PREDICATE CALCULUS Slide 2.1 2.0 Introduction 2.1 The Propositional Calculus 2.2 The Predicate Calculus 2.3 Using Inference Rules to Produce Predicate Calculus Expressions 2.4 Application: A Logic-Based

More information

CS 4700: Artificial Intelligence

CS 4700: Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 14 Today Knowledge Representation and Reasoning (R&N Ch 7-9) Prelim, Statler Auditorium Tuesday, March 21

More information

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology: Test 1 Solutions(COT3100) Sitharam (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology: ( q (p q) (r p)) r Solution. This is Modus Tollens applied twice, with transitivity

More information

Solutions for Math 225 Assignment #4 1

Solutions for Math 225 Assignment #4 1 Solutions for Math 225 Assignment #4 () Let B {(3, 4), (4, 5)} and C {(, ), (0, )} be two ordered bases of R 2 (a) Find the change-of-basis matrices P C B and P B C (b) Find v] B if v] C ] (c) Find v]

More information

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures Formal Logic: Quantifiers, Predicates, and Validity CS 130 Discrete Structures Variables and Statements Variables: A variable is a symbol that stands for an individual in a collection or set. For example,

More information

G52DOA - Derivation of Algorithms Predicate Logic

G52DOA - Derivation of Algorithms Predicate Logic G52DOA - Derivation of Algorithms Predicate Logic Venanzio Capretta Predicate Logic So far, we studied propositional logic, in which we started with unspecified propositional variables A, B, C, and combined

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

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

First order logic (FOL) Chapters 8 & 9

First order logic (FOL) Chapters 8 & 9 First order logic (FOL) Chapters 8 & 9 Pros and cons of propositional logic Propositional logic is declarative Propositional logic is compositional Meaning in propositional logic is context-independent

More information

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!! CSCE 222 Discrete Structures for Computing Review for Exam 1 Dr. Hyunyoung Lee 1 Topics Propositional Logic (Sections 1.1, 1.2 and 1.3) Predicate Logic (Sections 1.4 and 1.5) Rules of Inferences and Proofs

More information

Introduction to proofs. Niloufar Shafiei

Introduction to proofs. Niloufar Shafiei Introduction to proofs Niloufar Shafiei proofs Proofs are essential in mathematics and computer science. Some applications of proof methods Proving mathematical theorems Designing algorithms and proving

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

Lecture 10: Even more on predicate logic" Prerequisites for lifted inference: Skolemization and Unification" Inference in predicate logic"

Lecture 10: Even more on predicate logic Prerequisites for lifted inference: Skolemization and Unification Inference in predicate logic CS440/ECE448: Intro to Artificial Intelligence Lecture 10: Even more on predicate logic Prof. Julia Hockenmaier juliahmr@illinois.edu http://cs.illinois.edu/fa11/cs440 Inference in predicate logic All

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic? Logic: Truth Tables CS160 Rosen Chapter 1 Logic? 1 What is logic? Logic is a truth-preserving system of inference Truth-preserving: If the initial statements are true, the inferred statements will be true

More information

Lecture overview. Knowledge-based systems in Bioinformatics, 1MB602. Reasoning. Reasoning cont. Inference in propositional logic.

Lecture overview. Knowledge-based systems in Bioinformatics, 1MB602. Reasoning. Reasoning cont. Inference in propositional logic. Lecture overview Knowledge-based systems in Bioinformatics, 1MB602 Logical reasoning Inference rules Example proofs Natural deduction SLD Resolution Lecture 7: Logical inference Reasoning The property

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

Definite Logic Programs: Derivation and Proof Trees. CSE 505 Computing with Logic Stony Brook University

Definite Logic Programs: Derivation and Proof Trees. CSE 505 Computing with Logic Stony Brook University Definite Logic Programs: Derivation and Proof Trees CSE 505 Computing with Logic Stony Brook University http://www.cs.stonybrook.edu/~cse505 1 Refutation in Predicate Logic parent(pam, bob). parent(tom,

More information

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions Note 01 Propositional Logic 1 / 10-1 Overview 1. Introduction to Propositional Logic 2. Operations on Propositions 3. Truth Tables 4. Translating Sentences into Logical Expressions 5. Preview: Propositional

More information

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof Discrete Mathematic Chapter 1: Logic and Proof 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers Dr Patrick Chan School of Computer Science and Engineering South China University of Technology http://125.216.243.100/dm/

More information

A Semantic Criterion for Proving Infeasibility in Conditional Rewriting

A Semantic Criterion for Proving Infeasibility in Conditional Rewriting A Semantic Criterion for Proving Infeasibility in Conditional Rewriting Salvador Lucas Raúl Gutiérrez DSIC, Universitat Politècnica de València, Spain 6 th International Workshop on Confluence, IWC 2017

More information

Logic Programming in Prolog Part II Substitutions, SLD Resolution Prolog Execution. Raj Sunderraman

Logic Programming in Prolog Part II Substitutions, SLD Resolution Prolog Execution. Raj Sunderraman Logic Programming in Prolog Part II Substitutions, SLD Resolution Prolog Execution Raj Sunderraman Puzzle Revisited faster solution didbetter(a,b,[a,b,_]). didbetter(a,c,[a,_,c]). didbetter(b,c,[_,b,c]).

More information

4.1 Real-valued functions of a real variable

4.1 Real-valued functions of a real variable Chapter 4 Functions When introducing relations from a set A to a set B we drew an analogy with co-ordinates in the x-y plane. Instead of coming from R, the first component of an ordered pair comes from

More information

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference quantifiers x P(x) P(x) is true for every x in the domain read as for all x, P of x x P x There is an x in the

More information

ANALYSIS EXERCISE 1 SOLUTIONS

ANALYSIS EXERCISE 1 SOLUTIONS ANALYSIS EXERCISE 1 SOLUTIONS 1. (a) Let B The main course will be beef. F The main course will be fish. P The vegetable will be peas. C The vegetable will be corn. The logical form of the argument is

More information

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference Logic? Propositional Logic (Rosen, Chapter 1.1 1.3) TOPICS Propositional Logic Truth Tables Implication Logical Proofs 10/1/12 CS160 Fall Semester 2012 2 What is logic? Logic is a truth-preserving system

More information

COMP 2600: Formal Methods for Software Engineeing

COMP 2600: Formal Methods for Software Engineeing COMP 2600: Formal Methods for Software Engineeing Dirk Pattinson Semester 2, 2013 What do we mean by FORMAL? Oxford Dictionary in accordance with convention or etiquette or denoting a style of writing

More information

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17 Propositional Logic Logical Implication (4A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

More information

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows. Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is

More information

Knowledge based Agents

Knowledge based Agents Knowledge based Agents Shobhanjana Kalita Dept. of Computer Science & Engineering Tezpur University Slides prepared from Artificial Intelligence A Modern approach by Russell & Norvig Knowledge Based Agents

More information

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

More information

A statement is a sentence that is definitely either true or false but not both.

A statement is a sentence that is definitely either true or false but not both. 5 Logic In this part of the course we consider logic. Logic is used in many places in computer science including digital circuit design, relational databases, automata theory and computability, and artificial

More information

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1) CS100: DISCREE SRUCURES Lecture 5: Logic (Ch1) Lecture Overview 2 Statement Logical Connectives Conjunction Disjunction Propositions Conditional Bio-conditional Converse Inverse Contrapositive Laws of

More information

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional Logical Operators Conjunction Disjunction Negation Exclusive Or Implication Biconditional 1 Statement meaning p q p implies q if p, then q if p, q when p, q whenever p, q q if p q when p q whenever p p

More information

Resolution: Motivation

Resolution: Motivation Resolution: Motivation Steps in inferencing (e.g., forward-chaining) 1. Define a set of inference rules 2. Define a set of axioms 3. Repeatedly choose one inference rule & one or more axioms (or premices)

More information

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.3) TOPICS Propositional Logic Logical Operations Equivalences Predicate Logic CS160 - Spring Semester 2014 2 What

More information

Strong AI vs. Weak AI Automated Reasoning

Strong AI vs. Weak AI Automated Reasoning Strong AI vs. Weak AI Automated Reasoning George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving Artificial intelligence can be classified into two categories:

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

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning. 3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on

More information

Thinking of Nested Quantification

Thinking of Nested Quantification Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers. Translating

More information

COMP4418: Knowledge Representation and Reasoning First-Order Logic

COMP4418: Knowledge Representation and Reasoning First-Order Logic COMP4418: Knowledge Representation and Reasoning First-Order Logic Maurice Pagnucco School of Computer Science and Engineering University of New South Wales NSW 2052, AUSTRALIA morri@cse.unsw.edu.au COMP4418

More information

Predicates and Quantifiers

Predicates and Quantifiers Predicates and Quantifiers Lecture 9 Section 3.1 Robb T. Koether Hampden-Sydney College Wed, Jan 29, 2014 Robb T. Koether (Hampden-Sydney College) Predicates and Quantifiers Wed, Jan 29, 2014 1 / 32 1

More information

Simon Fraser University School of Computing Science CMPT 383

Simon Fraser University School of Computing Science CMPT 383 Simon Fraser University School of Computing Science CMPT 383 Assignment 3 (Prolog) Due date: November 22, 2005 1) (7 marks) Convert the following predicate calculus to Horn clause(s). g ((logician(g) a(argument(l,a)

More information

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary Propositional Logic The Language of Propositions Applications Logical Equivalences Predicate Logic The Language of

More information

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov Introduction Predicates and Quantifiers Discrete Mathematics Andrei Bulatov Discrete Mathematics Predicates and Quantifiers 7-2 What Propositional Logic Cannot Do We saw that some declarative sentences

More information

Knowledge and reasoning 2

Knowledge and reasoning 2 Knowledge and reasoning 2 DDC65 Artificial intelligence and Lisp Peter Dalenius petda@ida.liu.se Department of Computer and Information Science Linköping University Knowledge-based agents Inside our agent

More information

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic Propositional logic Logical connectives Rules for wffs Truth tables for the connectives Using Truth Tables to evaluate

More information

Prolog. Resolution (for beginners?) Resolution (cont.) Resolution (cont.) Unification. Resolution (still cont.) Resolution & Unification

Prolog. Resolution (for beginners?) Resolution (cont.) Resolution (cont.) Unification. Resolution (still cont.) Resolution & Unification Resolution & Unification Prolog Computer Science Resolution (for beginners?) Resolution is a theorem proving method developed by Robinson based on representing logical formulas as clauses Clauses are build

More information

Logic and Proofs. (A brief summary)

Logic and Proofs. (A brief summary) Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations

More information

6.825 Techniques in Artificial Intelligence. Logic Miscellanea. Completeness and Incompleteness Equality Paramodulation

6.825 Techniques in Artificial Intelligence. Logic Miscellanea. Completeness and Incompleteness Equality Paramodulation 6.825 Techniques in Artificial Intelligence Logic Miscellanea Completeness and Incompleteness Equality Paramodulation Lecture 9 1 Logic is a huge subject. It includes esoteric mathematical and philosophical

More information

Introduction to Answer Set Programming

Introduction to Answer Set Programming Introduction to Answer Set Programming François Gagnon Ph.D. Student fgagnon@sce.carleton.ca Network Management and Artificial Intelligence Laboratory www.sce.carleton.ca/netmanage Carleton University

More information

Propositional natural deduction

Propositional natural deduction Propositional natural deduction COMP2600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2016 Major proof techniques 1 / 25 Three major styles of proof in logic and mathematics Model

More information

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1. Chapter 1 Chapter Summary Propositional Logic The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.3) Predicate Logic The Language of Quantifiers (1.4) Logical Equivalences (1.4)

More information

First Order Logic Arguments (5A) Young W. Lim 2/24/17

First Order Logic Arguments (5A) Young W. Lim 2/24/17 First Order Logic (5A) Young W. Lim Copyright (c) 2016-2017 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

DISCRETE MATHEMATICS BA202

DISCRETE MATHEMATICS BA202 TOPIC 1 BASIC LOGIC This topic deals with propositional logic, logical connectives and truth tables and validity. Predicate logic, universal and existential quantification are discussed 1.1 PROPOSITION

More information

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker CSCE 222 Discrete Structures for Computing Predicate Logic Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Predicates A function P from a set D to the set Prop of propositions is called a predicate.

More information

Artificial Intelligence: Methods and Applications Lecture 3: Review of FOPL

Artificial Intelligence: Methods and Applications Lecture 3: Review of FOPL Artificial Intelligence: Methods and Applications Lecture 3: Review of FOPL Henrik Björklund Ruvan Weerasinghe Umeå University What I d be doing Topics in Knowledge Representation 12 th Nov (Tue) Revision

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

Logical reasoning - Can we formalise our thought processes?

Logical reasoning - Can we formalise our thought processes? Logical reasoning - Can we formalise our thought processes? Why study (mathematical) logic? Logic: the science or method of reasoning Logical: able to reason correctly Human reasoning poorly understood,

More information

The following number (percentage) of students scored in the following ranges:

The following number (percentage) of students scored in the following ranges: The following number (percentage) of students scored in the following ranges: 100: 6 (18%) 95-99: 11 (33%) 90-94: 5 (15%) [22 (67%) scored 90 or better] 85-89: 3 (9%) 80-84: 3 (9%) [28 (85%) scored 80

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

Mat 243 Exam 1 Review

Mat 243 Exam 1 Review OBJECTIVES (Review problems: on next page) 1.1 Distinguish between propositions and non-propositions. Know the truth tables (i.e., the definitions) of the logical operators,,,, and Write truth tables for

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

Logic and Proofs. (A brief summary)

Logic and Proofs. (A brief summary) Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations

More information

Resolution and Refutation

Resolution and Refutation Resolution and Refutation York University Department of Computer Science and Engineering York University- CSE 3401- V. Movahedi 04_Resolution 1 Propositional Logic Resolution Refutation Predicate Logic

More information

Logic & Logic Agents Chapter 7 (& background)

Logic & Logic Agents Chapter 7 (& background) Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Logic & Logic Agents Chapter 7 (& background)

More information

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary! Propositional Logic! The Language of Propositions! Applications! Logical Equivalences! Predicate Logic! The Language

More information

Foundations of Mathematics Worksheet 2

Foundations of Mathematics Worksheet 2 Foundations of Mathematics Worksheet 2 L. Pedro Poitevin June 24, 2007 1. What are the atomic truth assignments on {a 1,..., a n } that satisfy: (a) The proposition p = ((a 1 a 2 ) (a 2 a 3 ) (a n 1 a

More information

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

What is Logic? Introduction to Logic. Simple Statements. Which one is statement? What is Logic? Introduction to Logic Peter Lo Logic is the study of reasoning It is specifically concerned with whether reasoning is correct Logic is also known as Propositional Calculus CS218 Peter Lo

More information

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers Sec$on Summary (K. Rosen notes for Ch. 1.4, 1.5 corrected and extended by A.Borgida)! Predicates! Variables! Quantifiers! Universal Quantifier! Existential Quantifier! Negating Quantifiers! De Morgan s

More information

ITEC Prolog Programming

ITEC Prolog Programming 1 ITEC 198 - Prolog Programming Dr. Maung M. Htay Department of Information Technology 1/18/16 Text Prolog Programming for Artificial Intelligence by Ivan Bratko Third Edition, Addison Wesley 2 References

More information

2. Find all combinations of truth values for p, q and r for which the statement p (q (p r)) is true.

2. Find all combinations of truth values for p, q and r for which the statement p (q (p r)) is true. 1 Logic Questions 1. Suppose that the statement p q is false. Find all combinations of truth values of r and s for which ( q r) ( p s) is true. 2. Find all combinations of truth values for p, q and r for

More information

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs The Foundations: Logic and Proofs Chapter 1, Part III: Proofs Summary Valid Arguments and Rules of Inference Proof Methods Proof Strategies Rules of Inference Section 1.6 Section Summary Valid Arguments

More information

Predicate Logic. Andreas Klappenecker

Predicate Logic. Andreas Klappenecker Predicate Logic Andreas Klappenecker Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P. Example Let D=Z be the set of integers.

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

Depending on equations

Depending on equations Depending on equations A proof-relevant framework for unification in dependent type theory Jesper Cockx DistriNet KU Leuven 3 September 2017 Unification for dependent types Unification is used for many

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 3: Logic Programming in Prolog Outline 1 2 3 The control of execution Logic Programming Declarative programming style: Emphasis on What is the solution? instead of How to find the solution? Symbolic

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

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof Ch. 1.6 Introduction to Proofs The following techniques for methods of proofs are discussed in our text - Vacuous proof - Trivial proof - Direct proof - Indirect proof (our book calls this by contraposition)

More information

First-Order Logic. Chapter Overview Syntax

First-Order Logic. Chapter Overview Syntax Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts

More information

Predicate Calculus - Syntax

Predicate Calculus - Syntax Predicate Calculus - Syntax Lila Kari University of Waterloo Predicate Calculus - Syntax CS245, Logic and Computation 1 / 26 The language L pred of Predicate Calculus - Syntax L pred, the formal language

More information

Computational Intelligence Winter Term 2017/18

Computational Intelligence Winter Term 2017/18 Computational Intelligence Winter Term 2017/18 Prof. Dr. Günter Rudolph Lehrstuhl für Algorithm Engineering (LS 11) Fakultät für Informatik TU Dortmund Plan for Today Fuzzy relations Fuzzy logic Linguistic

More information

CogSysI Lecture 8: Automated Theorem Proving

CogSysI Lecture 8: Automated Theorem Proving CogSysI Lecture 8: Automated Theorem Proving Intelligent Agents WS 2004/2005 Part II: Inference and Learning Automated Theorem Proving CogSysI Lecture 8: Automated Theorem Proving p. 200 Remember......

More information

Logic and Inferences

Logic and Inferences Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional

More information

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo Predicate Logic CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo c Xin He (University at Buffalo) CSE 191 Discrete Structures 1 / 22 Outline 1 From Proposition to Predicate

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

Proving logical equivalencies (1.3)

Proving logical equivalencies (1.3) EECS 203 Spring 2016 Lecture 2 Page 1 of 6 Proving logical equivalencies (1.3) One thing we d like to do is prove that two logical statements are the same, or prove that they aren t. Vocabulary time In

More information

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

Nested Quantifiers. Predicates and. Quantifiers. Agenda. Limitation of Propositional Logic. Try to represent them using propositional.

Nested Quantifiers. Predicates and. Quantifiers. Agenda. Limitation of Propositional Logic. Try to represent them using propositional. Disc rete M athema tic Chapter 1: Logic and Proof 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers Dr Patrick Chan School of Computer Science and Engineering South China Univers ity of Technology

More information

Math.3336: Discrete Mathematics. Propositional Equivalences

Math.3336: Discrete Mathematics. Propositional Equivalences Math.3336: Discrete Mathematics Propositional Equivalences Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall

More information

Logic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Logic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR Logic and Reasoning Foundations of Computing Science Pallab Dasgupta Professor, Dept. of Computer Sc & Engg 2 Knowledge and Reasoning Representation, Reasoning and Logic Propositional Logic First-Order

More information

DEDUCTIVE REASONING Propositional Logic

DEDUCTIVE REASONING Propositional Logic 7 DEDUCTIVE REASONING Propositional Logic Chapter Objectives Connectives and Truth Values You will be able to understand the purpose and uses of propositional logic. understand the meaning, symbols, and

More information

4 Predicate / First Order Logic

4 Predicate / First Order Logic 4 Predicate / First Order Logic 4.1 Syntax 4.2 Substitutions 4.3 Semantics 4.4 Equivalence and Normal Forms 4.5 Unification 4.6 Proof Procedures 4.7 Implementation of Proof Procedures 4.8 Properties First

More information

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class) MACM 101 Discrete Mathematics I Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class) Reminder: the work you submit must be your own. Any collaboration and

More information