Rules of Inference for Predicate Calculus

Embed Size (px)

Citation preview

  • 7/25/2019 Rules of Inference for Predicate Calculus

    1/8

    Chapter

    Propositions and Predicates

    5 RULES OF INFERENCE FOR PREDICATE

    CALCULUS

    Before discussing the rules inference, we note that: i the proposition

    formulas are also the predicate formulas; ii) the predicate formulas w here all

    the variables are quantified) are the proposition formulas. Therefore, all the

    rules of inference for the proposition formulas are also applicable to predicate

    calculus wherever necessary.

    For predicate formulas not involving connectives such as A x), P x, y). we

    can get equivalences and rules inference similar t those given in

    Tables 1.11 and 1.13. For Example, corresponding

    to

    1

    6

    in Table 1.11

    we

    get

    P x v Q x P x

    i \

    -- ,

    Q x)). Corresponding to RI

    3

    in Table 1.13

    P

    i \

    Q

    }

    P,

    we get

    P x

    i \

    Q x

    ::::}

    P x).

    Thus we can replace propositional

    variables by predicate variables in Tables 1.11 and 1.13.

    Some necessary equivalences involving the two quantifiers and valid

    implications are given in Table 1.14.

    TABLE 4 Equivalences Involving Quantifiers

    Distributivity of

    j

    over

    3x CP x) O x)) = 3x PCI) 3x O x)

    3x P O x))

    =

    P 3x O x))

    Distributivity of ;I over

    A

    ;Ix P x) O x))

    x

    P x) ;Ix O x)

    ;Ix

    P

    /\ O x)) = P .\ ;Ix O x))

    3x P x)) = ;Ix . P x))

    dx P x)) = 3x P x))

    J ,7

    3x P .\ O x)) = P /\ 3x O x))

    - _

    18

    ;Ix

    P

    O x)) = P ;Ix OCr))

    RJ

    l

    ;Ix P x)

    3x

    P x)

    RJ

    ;Ix P x) ;Ix O x) ;Ix P x) O x))

    RJ

    3x P x)

    O x)) 3x P x)

    3x O x)

    Sometimes when we wish to derive s J m e c o ~ l u s i o n from a given set

    premises involving quantifiers. we may have to eliminate the quantifiers

    before applying the rules inference for proposition formulas. Also, when

    the conclusion involves quantifiers, we may have to introduce quantifiers. The

    necessary rules

    inference for addition and deletion

    quantifiers are given

    in Table 1.15.

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    2/8

    Theory o f

    Computer

    Science

    TABLE

    5 Rules of Inference for Addition and

    Deletion of Quantifiers

    RI

    13

    :

    Universal instantiation

    ix

    P x

    c

    is

    some element of the universe

    RI

    Existential instantiation

    ?:.xP x

    . P c

    c is some element for which P c is true

    Rl

    1s

    : Universal generalization

    P x

    ix

    P x

    x should not

    free in any of the given premises

    RI

    6

    Existential generalization

    P c

    . =x P x

    c is

    some element of the universe

    EXAMPLE 22

    Discuss the validity

    the following argument:

    All graduates are educated.

    Ram

    is

    a graduate.

    Therefore. Ram is educated.

    olut on

    Let G x denote

    x

    is a graduate .

    Let E x denote

    x

    is educated .

    Let

    R

    denote Ram .

    So the premises

    are i)

    If.r G x E x and ii) G R . The conclusion is E R .

    l fx

    G x E x Premise i)

    G R E R Universal instantiation RI

    G R)

    Premise ii)

    E R)

    Modus ponens

    RI

    Thus the conclusion is valid.

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    3/8

    Chapter Propositions and Predicates ;J 25

    EXAMPLE 23

    Discuss the validity

    of

    the following argument:

    All graduates can read and write.

    Ram can read and write.

    Therefore, Ram is a graduate.

    olut on

    Let G x) denote x is a graduate .

    Let L x) denote x can read and write .

    Let R denote Ram .

    The premises are:

    IIx G x)

    =? L x)) and

    L R).

    The conclusion

    is

    G R).

    G R)

    =?

    L R))

    /\

    L R))

    =?

    G R)

    is not a tautology.

    So we cannot derive

    G R).

    For example, a school boy can read and write

    and he is not a graduate.

    EXAMPLE 24

    Discuss the validity of the following argument:

    All educated persons are well behaved.

    Ram is educated.

    No well-behaved person is quarrelsome.

    Therefore. Ram is not quarrelsome.

    olut on

    Let the universe of discourse be the set of all educated persons.

    Let

    PCx

    denote x is well-behaved .

    Let y

    denote Ram .

    Let

    Q x)

    denote

    x

    is

    quarrelsome .

    So the premises are:

    i) II Y

    PCx .

    ii)

    y

    is a particular element of the universe

    of

    discourse.

    iii) IIx P x) =?

    Q x)).

    To obtain the conclusion. we have the following arguments:

    1. I Ix P x) Premise i)

    2 PC\ Universal instantiation RI

    3

    3 IIx P x) =? Q x)) Premise iii)

    4. PCy

    =?

    QC:y Universal instantiation

    3

    5 pry

    Line 2

    6 Q y) Modus ponens RIc;

    Q y)

    means that Ram is not quarrelsome . Thus the argument is valid.

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    4/8

    Q

    Theory

    ofComputer

    Science

    6

    SUPPLEMENTARY EXAMPLES

    EXAMPLE 25

    Write the following sentences in symbolic form:

    a) This book is interesting b ut the exercises are difficult.

    b) This book is interesting but the subject is difficult.

    c) This book is not interesting. the exercises are difficult but the subject

    is not difficult.

    d)

    this

    book

    is interesting and the exercises are not difficult then the

    subject is not difficult.

    e) This book is interesting means that the subject is

    not

    difficult, and

    conversely.

    f) The subject is not difficult but this book is inter esting and the

    exercises are difficult.

    g) The subject is not difficult but the exercises are difficult.

    h) Either the book is interesting

    or

    the subject is difficult.

    olut on

    Le t denote This book is interesting .

    Le t

    Q

    denote T he exercises are difficult .

    Let

    denote Th e subject is difficult .

    Then:

    a /\

    Q

    b)

    /\

    c P /\ Q

    d /\

    - ,

    Q)

    =: }

    R

    e)

    = >

    -,

    R

    f

    -,R

    /\

    /\ Q)

    g R /\ Q

    h) -,

    v

    EXAMPLE 26

    Construct the truth table for

    = -

    = > - , Q) = > Q = >

    olut on

    The truth table is constructed as shown in Table 1.16.

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    5/8

    Chapter

    Propositions and Predicates ml

    TABLE 6 Truth Table of Example 1.26

    P

    Q

    R

    Q R

    T

    T T

    F T T F

    T T

    T

    T F

    F T

    T

    F F T

    T

    F T

    T T T

    T

    T

    T

    T

    F F

    T F F F F T

    F

    T T

    F T

    T F T T

    F T F F

    T

    T F T

    T

    F

    F T T T T T T T

    F F

    F

    T F T T T

    T

    EXAMPLE 28

    State the converse, opposite and contrapositive

    to

    the following statements:

    a

    If

    a triangle is isoceles, then two of its sides are equal.

    b If there is no unemployment in India, then the Indians won t go to

    the USA for employment.

    olut on

    If P

    :::::} Q is a statement, then its converse, opposite and contrapositive

    s t ~ t n t s are, Q :::::}

    P P

    :::::} Q and Q :::::}

    P

    respectively.

    a

    Converse If

    two

    of

    the sides of a triangle are equal, then the triangle

    s

    isoceles.

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    6/8

    Theory ofComputer Science

    Opposite-If

    the triangle is not isoceles, then two of its sides are not

    equal.

    Contrapositive-If

    two of the sides of a triangle are not equal, then

    .the triangle is

    no t

    isoceles.

    b

    Converse-If

    the Indians

    won t

    go to the

    USA

    for employment, then

    there is

    no

    unemployment in India.

    Opposite-If

    there is unemployment in India. then the Indians will

    go

    to the

    USA

    for employment.

    c

    Contrapositive-If

    the Indians go to the

    USA

    for employment , then

    there is unemployment in India.

    EXAMPLE 1 29

    Show that:

    -

    P

    /\ -

    Q /\

    R v

    Q /\ R

    v

    P /\

    R

    :::> R

    olut on

    -

    P

    /\ -

    Q

    /\

    R

    v Q

    /\ R

    v

    P

    /\

    R

    :::> P /\

    -

    Q /\

    R

    v Q /\ R v P

    /\

    R by using the associative

    la w

    :::>

    -, P v Q /\ R v Q /\ R v P /\ R by using the

    DeMorgan s la w

    :::>

    h P v Q /\ R v Q v P /\ R by using the distributive law

    :::> -,

    P v Q v P v Q /\ R

    by

    using

    the commutative

    an d distributive laws

    by

    using s

    by using 1

    X MPL

    1 3

    Using identit ies, prove that:

    Q v

    P

    /\

    -

    Q

    V -

    P

    /\

    -

    Q is a tautology

    olut on

    Q

    v P /\ -

    Q

    V -

    P

    /\ -

    Q

    :::>

    Q v P

    /\

    Q V --- v

    -,

    P

    1\

    Q

    by

    using the distributive law

    :::>

    Q v

    P

    \

    T)

    v

    -, /\

    -, Q

    by

    using

    s

    :::> Q

    v

    P

    v

    P

    v Q

    by

    using the

    DeMorgan slaw

    and

    1

    9

    :::> P V

    Q

    V P

    v Q

    by using

    the

    commutative

    law

    >T

    Hence the given

    fonnula

    is a tautology.

    by

    using

    s

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    7/8

    Chapter

    Propositions and Predicates

    ;

    EXAMPLE 3

    Test the validity of the following argument:

    If

    I get the notes and study well, then I will get first class.

    I didn t get first class.

    So either I didn t get the notes or I didn t study well.

    olut on

    Let P denote get the notes .

    Let Q denote I study well .

    Let R denote 1 will get first class.

    Let S denote I

    didn t get first class.

    The given premises are:

    i) P

    ;\

    Q

    }

    R

    ii) -

    R

    The conclusion is - P v - , Q

    l . P ; \Q=: }R

    2.

    - R

    3. - P

    ;\

    Q)

    P

    v Q

    Thus the argument

    is

    valid.

    EXAMPLE 32

    Premise i)

    Premise ii)

    Lines I, 2 and modus tollens.

    DeMorgan s law

    Explain

    a

    the conditional proof rule and b) the indirect proof.

    olut on

    a)

    I f

    we want to prove

    A

    }

    then we take

    A

    as

    a premise and construct

    a proof of B This is called the conditional proof rule. It

    is

    denoted

    by

    CPo

    b) To prove a formula

    0:

    we construct a proof of

    -

    0:

    }

    F. In

    particular.

    to

    prove

    A

    }

    B

    we construct a proof

    of A ;\ -, B

    }

    F.

    EXAMPLE

    33

    Test the validity of the following argument:

    Babies are illogical.

    Nobody is despised who can manage a crocodile.

    Illogical persons are despised.

    Therefore babies cannot manage crocodiles.

    http://engineeringbooks.net

  • 7/25/2019 Rules of Inference for Predicate Calculus

    8/8

    Q Theory ofComputer Science

    olut on

    Let B x denote x is a baby .

    Let lex denote x is illogical .

    Let

    D x

    denote

    x

    is despised .

    Let C x denote x can manage crocodiles .

    Then the premises are:

    i)

    Vx

    B x ::::} I x

    ii) Vx C x ::::} , D x ) )

    iii)

    Vx

    l x ::::} D x

    The conclusion is Vx B x ::::}

    ,

    C x .

    1.

    Vx

    B x

    ::::}

    I x

    Premise i

    2

    Vx C x ::::} ,D x Premise ii)

    Vx l x

    ::::}

    D x Premise iii)

    B x

    ::::}

    I x) 1

    Universal instantiation

    5

    C x ::::}

    ,D x

    2 Universal instantiation

    6 I x ::::} D x) 3 Universal instantiation

    7

    B x

    Premise of conclusion

    8

    I x)

    4,7 Modus pollens

    9

    D x

    6,8 Modus pollens

    10. ,C x 5,9 Modus tollens

    11. B x ::::} , C x 7,10 Conditional proof

    2

    Vx

    B x ::::} , C x ) ) 11, Universal generalization.

    Hence the conclusion is valid.

    EXAMPLE 34

    Give an indirect proof

    Q, P Q, P v S S

    olut on

    We have to prove S. So we include iv) S as a premise.

    P v S Premise iii)

    2. S Premise iv)

    P 1,2, Disjunctive syllogism

    4. P

    Q

    Premise ii)

    5. Q 3,4, Modus ponens

    6.

    Q Premise i)

    7.

    Q /\

    Q 5.6, Conjuction

    8. F 1

    8

    We get a contradiction. Hence Q, P

    ::::}

    Q, P v S

    S.