Lecture 5 Propositional Logic (PL)
Lecture 5 Propositional Logic (PL)
a- Statement
Simple statements (sentences), TRUE or FALSE, that does not contain any other
statement as a part, are basic propositions; lower-case letters, p, q, r, are symbols for
simple statements.
Large, compound or complex statement are constructed from basic propositions by
combining them with connectives.
2
Lecture 5 Propositional Logic (PL) Knowledge Representation KR 2nd stage
University of Kerbala- Science College-Computer Science
b- Connective or Operator
The connectives join simple statements into compounds and joins compounds into
larger compounds.
3
Lecture 5 Propositional Logic (PL) Knowledge Representation KR 2nd stage
University of Kerbala- Science College-Computer Science
c- Truth value
The truth value of a statement is its TRUTH or FALSITY,
e.g.
P is either TRUE or FALSE,
~p is either TRUE or FALSE,
p v q is either TRUE or FALSE, and so on.
Use "T" or "1" to mean TRUE.
Use "F" or "0" to mean FALSE.
B- Contradictions
A proposition that is always false is called a contradiction.
e.g.
(P ¬ P) is always false regardless of the truth-value of the proposition P.
4
Lecture 5 Propositional Logic (PL) Knowledge Representation KR 2nd stage
University of Kerbala- Science College-Computer Science
C- Contingencies
A proposition is called a contingency, if that proposition is neither a tautology nor
a contradiction
e.g.
(P v Q) is a contingency.
D- Antecedent, Consequent
In the conditional statements, p → q,
1st statement or "if - clause" (here p) is called antecedent,
2nd statement or "then - clause" (here q) is called consequent.
e- Argument
Any argument can be expressed as a compound
statement. Take all the premises, conjoin them,
and make that conjunction the antecedent of a
conditional and make the conclusion the
consequent. This implication statement is called
the corresponding conditional of the argument
5
Lecture 5 Propositional Logic (PL) Knowledge Representation KR 2nd stage
University of Kerbala- Science College-Computer Science
2- Predicate logic
The propositional logic, is not powerful enough for all types of assertions;
e.g.
The assertion "x > 1",
Where x is a variable, is not a proposition because it is neither true nor false unless
value of x is defined.
For x > 1 to be a proposition,
either we substitute a specific number for x;
or change it to something like "There is a number x for which x > 1 holds";
or "For every number x, x > 1 holds".
e.g.
“All men are mortal.
Socrates is a man.
Then Socrates is mortal”,
These cannot be expressed in propositional logic as a
finite and logically valid argument (formula).
We need languages:
That allow us to describe properties (predicates) of objects, or a relationship among
objects represented by the variables.
6
Lecture 5 Propositional Logic (PL) Knowledge Representation KR 2nd stage
University of Kerbala- Science College-Computer Science
e.g.
A sentence "Judy {runs}".
The subject is Judy and the predicate is run.
The predicate always includes a verb, tells something about the subject.
The predicate is a verb phrase template that describes a property of objects, or a
relation among objects represented by the variables.
e.g.
“The car Tom is driving is blue”;
"The sky is blue”;
"The cover of this book is blue”.
Predicate is “is blue”, describes property.
Predicates are given names;
Let ‘B’ is name for predicate “is blue".
Sentence is represented as "B(x)", read as "x is blue";
“x” represents an arbitrary Object.
3- Language of the First Order logic (Declarative language)
2.1 Alphabet:
a- Logic symbols:
Punctuations: (,),
Connectives: ¬, ˄, ˅, ∀, ∃, =
Variables: x, x1, x2, ..., x', x", ..., y, ..., z, ...
b- Non-logical symbols
Predicate symbols (like cake)
Function symbols (like bestFriendOf)
7