You are on page 1of 15

Predicate Calculus

Limitations of Propositional Logic

• The prepositional calculus has its limitations that you


cannot deal properly with general statements of the
form
• “All men are mortal”
• You can not derive from the conjunction of this and
“Socrates is a man” that
• “Socrates is mortal”
Limitations

• If All men are mortal = P


• Socrates is a Man = Q
• Socrates is mortal = R
• Then (P & Q) → R is not valid
• To do this, you need to analyze propositions into
predicates and arguments, and deal explicitly with
quantification
Predicate Calculus

• Propositional logic combines atoms


• An atom contains no propositional connectives
• Have no structure (today_is_wet, john_likes_apples)
• Predicates allow us to talk about objects
• Properties: is_wet(today)
• Relations: likes(john, apples)
• True or false
• In predicate logic each atom is a predicate
• e.g. first order logic, higher-order logic
Possible Things in Predicates

• Alphabets (both small and capital)


• Digits (0 - 9)
• Underscore ( _ )
Terminologies

• Functions:
• States from small alphabet
• function_name( P1 ------- Pn )
• Arity is the other name of Parameter.
• Has True/False value

• Constants:
•Starts from small alphabet.

• Variables:
• Starts from capital alphabet.
Connectives
Atomic Sentence

• Atomic sentence are the smallest unit of predicate


calculus.
• Combing Atomic sentences with connectives may
form predicate sentence.
• study(ahmad,math) is an atomic sentence
• Example:
• sentence.
Study (ahmad,math) V study(ahmad,english) is a predicate

• Truth Values True and False are also atomic


sentences.
Quantifiers
Consider the following three statements:
1. All cats have tails.
2. Some people like their meat raw.
3. Everyone gets a break once in a while.

All these statements indicate how frequently certain


things are true.
In predicate calculus one uses quantifiers in this
context.
Universal Quantifiers

• Let A represent a formula, and let x represent a


variable. If we want to indicate that A is true for all
possible values of x, we write 8xA. Here, 8x is called
universal Quantifiers, and A is called the scope of
the Quantifiers. The variable x is said to be bound by
the Quantifiers. The symbol 8 is pronounced “for all”.

• Examples:

Express “All cats have tails” in predicate calculus.
• Express “Everyone gets a break once in a while” in
predicate calculus.
Existential Quantifiers

• Let A represent a formula, and let x represent a


variable. If we want to indicate that A is true for at
least one value x, we write 9xA. This statement is
pronounced “There exists an x such that A.” Here, 9x
is called the existential Quantifier, and A is called the
scope of the Quantifier. The variable x is said to be
bound by the Quantifier.

Examples:
• Let P be the predicate “like their meat raw”. Then
9xP(x) can be translated as \There exist people who like
their meat raw" or \Some people like their meat raw."
Predicate Sentence
• Every atomic sentence is a sentence.
1. If s is a sentence, then so is its negation, s.
If s1 and s2 are sentences, then so is their
2. Conjunction, s1  s2 .
3. Disjunction, s1  s2 .
4. Implication, s1  s2 .
5. Equivalence, s1  s2 .

• If6.XXis s.a variable and s is a sentence, then so are


7. X s.
• Remember that logic sentences evaluate to true or
false, therefore only such objects are atomic
sentences. Functions are not atomic sentences.
Semantics
• Domain:
The universe of discourse or domain is the collection of all
persons, ideas, symbols, data structures, and so on, that affect
the logical argument under consideration. The elements of the
domain are called individuals.
• Constant: is replaced by one symbol form domain.
• Variable: is replace by a non-empty subset of domain.
• Function:
• Arity / Input / Parameters form Domain
• Output from Domain
• Predicate:
• Arity / Input / Parameters form Domain
• Output from Domain
Interpretation
• IfTrue.
s is True then ~s is false otherwise

• Ifthens isXsx
a sentence and x is a variable
is True only if every
assignment of x is True.
• If s is a sentence and x variable then
Xsx is True if any assignment of x is
True.
• Where domain is infinite then it is undecideable.
Results
•¬  sx  x ¬ sx
•¬ x s  x ¬ s
x x

• x px   y p y

• ¬ x p  yx p y

• x(P 
x Q ) x xP  xQx x

•  x(P x Q ) x  xP   xQ
x x

You might also like