Professional Documents
Culture Documents
Lecture-2 PropPred Merged
Lecture-2 PropPred Merged
Lecture-2 PropPred Merged
Lecture 2
Mr. Waqas Ali
Lecturer
Department of Computer Science
UET, Lahore | KSK
Propositional Logic
->When most people say ‘logic’, they mean either propositional logic
or first-order predicate logic.
– a well-defined syntax;
– a well-defined semantics; and
– a well-defined proof-theory.
Propositional Logic
Example 1: If the train arrives late and there are no taxis at the
station, then John is late for his meeting. John is not late for his
meeting. The train did arrive late. Therefore, there were taxis at the
station.
Example 2: If it is raining and Jane does not have her umbrella with
her, then she will get wet. Jane is not wet. It is raining. Therefore,
Jane has her umbrella with her.
Pattern:
If p and not q, then r. Not r. p. Therefore q.
φ ::= p | q | r | (¬φ) | (φ X φ) | (φ V φ) | (φ → φ)
•(((¬p) X q) → (p X (q V (¬r)))) ?
Propositional logic as a formal language
Using the inversion principle write the stepwise derivation for the
formula
->In the case of ¬ there is only one subtree coming out of the root.
The problem is that the truth table has 2n many lines, each line
listing a possible combination of truth values for p1, p2, . . . , pn; and
for large n this task is impossible to complete.
->The first two columns list all possible combinations of values for p
and q.
Predicate Logic
Predicate Logic
->Propositional logic dealt quite satisfactorily with sentence
components like not(¬), and(X), or(V) and if . . . then(→).
6x(B(x) → F(x))
What if we can find such a bird who cannot fly? Then this means that
the above statement “All Birds Can Fly” is false
Ex(B(x) X ¬F(x))
Predicate Logic
•Write the formula for