Propositional Logic

Constants refer to atomic propositions. raining snowing wet

Compound sentences capture relationships among propositions. raining ∨ snowing ⇒ wet

2

Relational Logic
Constants refer to objects and relationships. joe mary loves happy

Simple sentences express relationships among objects. loves(joe,mary) Compound sentences capture relationships among relations. loves(x,y) ⇒ loves(y,x) loves(x,y) ∧ loves(y,x) ⇒ happy(x)
3

arthur.. z Constants begin with digits or letters from the beginning of the alphabet (from a through t).. 2. u. x. cathy. y. b. c. 5 . 1. v. a. . w.Words Variables begin with characters from the end of the alphabet (from u through z). betty.

person. and relation constants. loves There is no syntactic distinction between object constants. happy. The type of each such word is determined from context. age. times Relation constants refer to relations. mother. 6 . plus.Constants Object constants refer to objects in the universe of discourse. Function constants denote functions. parent. father. function constants.

7 . happy1 Binary Relation constants: parent2.Arity The arity of a function constant or a relation constant is the number of arguments it takes. Unary Function constants: father1. mother Binary Function constants: plus2. loves2 Ternary Relation constants: between3 The arity of a function constant or a relation constant is optionally notated as a subscript on the constant. times2 Ternary Function constants: price3 Unary Relation constants: person1.

Terms ref er to items in the universe of discourse. Terms are analogous to noun phrases in natural language. an object constant. or a functional term. 8 .Terms A term is either a variable.

plus2(age1(father1(joe)).Functional Terms A functional term is an expression f ormed from an n-ary function constant and n terms enclosed in parentheses and separated by commas. as such.2) Functional terms are terms and. father1(joe) age1(joe) plus2(x. can be nested.age1(mother1(joe))) 9 .

Relational sentences .analogous to the compound sentences in natural language Quantified sentences .Sentences There are three types of sentences.analogous to the simple sentences in natural language Logical sentences .sentences that express the significance of variables 10 .

Relational Sentences A relational sentence is an expression formed from an n-ary relation constant and n terms enclosed in parentheses and separated by commas. happy1(person1(joe)) happy1(joe) person1(joe) 11 . happy1(art) loves2(art.cathy) Relational sentences are not terms and cannot be nested in terms or relational sentences.

betty) ∨ loves(art.cathy)) (loves(x.betty) ∧ loves(betty.Logical Sentences Logical sentences in Relational Logic are analogous to those in Propositional Logic.art)) (loves(art.y) ⇔ loves(y. 12 .y) ⇒ loves(y.x)) (loves(x.y) ⇐ loves(y.cathy) (loves(art. ¬loves(art.x)) Parenthesization rules are the same as f or Propositional Logic.x)) (loves(x.

pear(x)) ∀x.apple(x) ∨ ∃x.y) 13 .loves(x.Quantified Sentences Quantified sentences can be nested within other sentences.∀y. ∀x.

betty) happy(person(cathy)) loves(x. plus2. .x) 14 . betty. loves2. reflexive2.x) reflexive(z) ⇒ z(x.Syntax Test Object Constants: art. 1. lt2 lt(father(art). mother1.mother(betty)) plus(father(art).. cathy. 2. age1. Function Constants: father1.y) ⇒ loves(y. times2 Relation Constants: person1.. parent2. happy1.

Functional terms may be used within relational sentences. Relational sentences may not be used in relational sentences.Reminder Functional terms and relational sentences look similar. they are not the same. However. 15 . Functional terms may be used within other functional terms. Relational sentences may not be used in functional terms.

3) expt(2.t) ↔ intersection(s.3) ↔ ↔ ↔ ↔ ↔ 2+3 2−3 2×3 2÷3 2↑3 s∪t s∩t union(s.3) quotient(2.3) minus(2.t) ↔ 16 .3) times(2.Infix Syntax for Functions plus(2.

3) leq(2.3) nq(2.3) ↔ ↔ ↔ ↔ ↔ ↔ 2=3 2≠3 2<3 2>3 2≤3 2≥3 s ∈t s⊂t s⊆t member(s.3) gt(2.t) ↔ 17 .3) geq(2.t) ↔ subseteq(s.3) lt(2.t) ↔ subset(s.Infix Syntax for Relations eq(2.

Operator Precedence ↑ ×÷ +− ∩ ∪ =≠<>≤≥ ∈∉⊂ ⊃ ⊆ ⊇ ¬∀∃ ∧ ∨ ⇐⇔⇒ 18 .

¬∃x. purple. then it is poisonous.(mushroom(x) ∧ purple(x) ⇒ poisonous(x)) No purple mushroom is poisonous. There is no thing that is a mushroom and purple and poisonous.(mushroom(x) ∧ purple(x) ∧ poisonous(x)) 19 . poisonous Purple mushrooms are poisonous. ∀x. If a thing is a purple mushroom.Mushrooms Unary relation constants: mushroom. If a thing is mushroom and it is purple. then it is poisonous.

then it is purple. If a thing is a mushroom and it is poisonous. If a thing is a mushroom and it is poisonous. purple. ∀x. it is not poisonous if it is not purple. If a thing is a mushroom. then it is purple. poisonous A mushroom is poisonous only if it is purple. ∀x. it is poisonous only if it is purple. If a thing is a mushroom.(mushroom(x) ∧ poisonous(x) ⇒ purple(x)) 20 .More Mushrooms Unary relation constants: mushroom.(mushroom(x) ∧ poisonous(x) ⇒ purple(x)) A mushroom is not poisonous unless it is purple.

∀x. maureen Binary relation constant: loves Everybody loves Maureen.maureen) Maureen loves everyone who loves her.mike)) 21 .loves(x.maureen) ⇒ loves(maureen.Interpersonal Relations Object constants: mike.loves(x. ¬∃x.mike) Nobody who loves Maureen loves Mike.maureen) ⇒ ¬loves(x.(loves(x.x)) Nobody loves Mike. ∀x.(loves(x. ∀x.

y) There is somebody whom everybody loves.∀x. ∀x.y) 22 .loves(x. ∃y.∃y.loves(x. maureen Binary relation constant: loves Everybody loves somebody.More Interpersonal Relations Object constants: mike.

Sign up to vote on this title
UsefulNot useful