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 :
  • 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:


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

    Construct truth tables for:


    Evaluate the following arguments:


    Formalize the following arguments and then test them for validity
     

    The argument becomes: 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