September 19, 2007

Lecture: propositional logic

Argument: construct with one or more premises and one conclusion.

Valid argument: If the premises are true the conclusion is true.

Facts: everything there is the case (in the world).

Sentences capture (represent) facts - this is expressed by the semantics of a language.  Assessment of truth value.

Syntax :  possible configurations / rules for sentence forming.

In the world : facts follow from facts

In the language: sentences entail sentences

The syntax and semnatics determine the logic

Knowledge Base (KB): collection of sentences

Inference: given a knowledge base KB, it can generate new sentences or check if a sentence can be entailed.

Sound inference (truth preserving): inference procedure that generates only entailed sentences (that is sentences that correspond to the facts that follow from the facts corresponding to the KB).

Proof: steps in an sound inferenc eprocedure.

Complete inference: can  prove any sentence that is entailed.

LOGIC:
syntax and semantics
a proof theory

Propositional logic:

• symbols :
• logical constants (true and false)
• propositions (facts): p, q, r
• operators (Boolean connectives)
•  and (^)
• or (v)
• implication (->)
• not (~)
• equivalence (<->)
• BNF grammar of sentences in propositional logic:
 Sentence := AtomicSentence | ComplexSentence AtomicSentence := True  |  False | p | q | r | ... ComplexSentence := (Sentence)                                       | Sentence Connective Sentence                                       | ~Sentence   Connective :=   ^ | v | <-> | ->

Order of precedence is needed to solve ambiguities.  Also () are used to alter this order.

Semantics of the propositional logic (truth tables):

And (^):

 p \   q T F T T F F F F

Implication is very important and its truth table somewhat strange (no causality between its components is required):

p -> q

 p  \  q T F T T F F T T

One way to think about the implication " p -> q": "If p is true then claim that q is true otherwise we make no claim"

Truth functional operator: those operators for which it is possible to deduce the truth value of the result from the truth values of the operands.

All of the operators (connectives) above are truth functional.

Use of truth tables to check validity (semantic method)

An argument is valid (sound)  if whenever all the premises are true the conclusion is also true.

Inference rules for propositional logic and why they are valid:

|= : turnstile  for semantic inference

Modus Ponens (Implication Elimination):

p -> q, p |= q

 p q p p->q q T T T T T T F T F F F T F T T F F F T F

And-Elimination

p ^ q |= p ; p ^ q  |= q

And-Introduction

p, q |= p ^ q

Or-Introduction

p |= p v q

Double-negation-elimination:

~~p |= p

Unit Resolution : From a disjunction in which one term is false infer the other term

p v q, ~p |= q

Resolution: p v q , ~p v r |= q v r

In implicative form  (that is using p ->q  same as ~p v q) we have:

~q -> p , p -> r  |=  ~q -> r

 p q r p v q ~p v r q  v r T T T T T T T T F T F T T F T T T T T F F T F F F T T T T T F T F T T T F F T F T T F F F F T T

Some examples/exercises:

Construct truth tables for:

• p v ~p
• p
• p -> ~p
• (p ->q) -> (~q -> ~p)
• (p->q) -> (q -> p)
• (p -> q) -> (~p v q)
• p -> (p ^ q)
• (p ^ (q v ~q)) -> ((p ^ q) v ( ^ ~q))

Define : p <-> q (where <-> means if and only if) by
(p -> q) ^ (q -> p)

Construct truth tables for:

• p <-> ~p
• (p ^ q) <-> (q ^ p)

Evaluate the following arguments:

• p -> q, ~q |= p
• p -> ~q |= q -> ~p
• p -> ~q |= ~(p -> q)
• p |= p -> q
• p |= q -> p
• p v q  |=   ~(~p ^ ~q)

Formalize the following arguments and then test them for validity

• If Diane diets she will get slim.  Diane diets. So Diane gets slim.
• solution:
Set:
p = Diane diets;
q= she will get slim (same as Diane will get slim)
The argument becomes:
p => q, p |= q
valid : it is actually modus ponens

• If the Devil has no redeeming graces he is throughly bad.  Hence if he is thoroughly bad he has no redeeming graces.
• solution:
Set:
p = the Devil has no redeeming graces;
q= he (the Devil) is thoroughly bad
The argument becomes:
p => q |= q => p
validity : not valid
 p q p=>q (premise) q=>p (argument) T T T T T F F T F T T F F F T T
In  the shaded row the premise of the argument is tru but the conclusion is false.  Therefore the argument is NOT valid.

• God is all good and all powerful.  But if he is all powerful and good there can be no evil.  But there is plenty of evil.  So God is not all good or God is not all powerful.
solution:
Set:
p = God is all good;
q= God is all pwoerful;
r = there can be no evil;
The argument becomes:
p ^q => r, ~r |= ~p v ~q
validity : valid

 p q r p^q p^q=>r (premise) ~r (premise) ~p ~q ~p v ~q (conclusion) T T T T T F F F F T T F T F T F F F T F T F T F F T T T F F F T T F T T F T T F T F T F T F T F F T T T F T F F T F T F T T T F F F F T T T T T
• Manu is a Xavier student.  So he either is a Xavier student or he is intelligent.
• Logic is either too boring or too difficult.  For either it is part of mathematics or it is part of philosophy.  And unless it is part of mathematics it istoo difficult.  Only if it is boring will it be part of philosophy.