Formal Methods in Computer Science CS1502 The Logic of Boolean Connectives

1 / 50
About This Presentation
Title:

Formal Methods in Computer Science CS1502 The Logic of Boolean Connectives

Description:

1. Formal Methods in Computer Science. CS1502. The Logic of Boolean Connectives ... problem with atomic sentences (before Boolean connectives are introduces) ... –

Number of Views:113
Avg rating:3.0/5.0
Slides: 51
Provided by: patchrawat
Category:

less

Transcript and Presenter's Notes

Title: Formal Methods in Computer Science CS1502 The Logic of Boolean Connectives


1
Formal Methods in Computer ScienceCS1502The
Logic of Boolean Connectives
  • Patchrawat Uthaisombut
  • University of Pittsburgh

2
Goals
  • To understand the concepts of
  • Truth, possibility, contradiction, equivalence,
    consequence
  • To understand the attempts to capture the notion
    of logical truths using
  • Tautologies and model-specific truths.
  • To gain skill in classifying sentences using the
    above concepts.

3
Truth value
  • What is truth value?
  • Truth value is a property of a sentence. The
    truth value of a sentence is the state of the
    sentence, of being true or false, with respect to
    a world.
  • Notice, the truth value of a sentence depends on
    which world it is evaluated against.

4
Truth value
  • In other words, a sentence is true in some worlds
    and false in some worlds.
  • Ex Cube(b), LeftOf(a,b), Taller(max,claire)
  • Is this always the case? Are there sentences
    that are true in all worlds or sentences that are
    false in all worlds?

5
Truth value
  • Cube(a) \/ Tet(a) \/ Dodec(a)
  • S(b) \/ S(b)
  • Large(b) /\ Larger(e,b)
  • ( P /\ P)
  • (A \/ (B /\ C)) /\ ((B \/ C) /\ A)

6
Truth-value vs. Truth
  • Truth value is a property of a sentence. The
    truth value of a sentence is the state of the
    sentence, of being true or false, with respect to
    a world.
  • A sentence is a truth if it is true in all
    worlds.
  • (we will further refine this notion later)

7
Related Definitions
  • Definitions (tentative)
  • A sentence is a truth if it is true in all
    worlds.
  • A sentence is a contradiction if it is false in
    all worlds.
  • A sentence is a possibility if it is true in at
    least one world.
  • A sentence is a contingency if it is true in at
    least one world and it is false in at least one
    world.
  • (we will further refine these later)

8
Truth value
  • Cube(a) \/ Tet(a) \/ Dodec(a)
  • S(b) \/ S(b)
  • Large(b) /\ Larger(e,b)
  • ( P /\ P)
  • (A \/ (B /\ C)) /\ ((B \/ C) /\ A)

9
Natural Questions that Arise
  • Given a sentence, is it a truth, a contradiction,
    and/or a possibility?
  • Did we have this problem with atomic sentences
    (before Boolean connectives are introduces)?

10
Concept Checking Questions
  • Can a sentence be both a truth and a
    contradiction?
  • If we know that a sentence is a truth, is it
    necessarily a possibility?
  • If we know that a sentence is a possibility, is
    it necessarily a truth?
  • Can a sentence be neither a truth nor a
    contradiction?
  • Can a sentence be neither a possibility nor a
    contradiction?

11
Goals
  • To understand the concepts of
  • Truth, possibility, contradiction, equivalence,
    consequence
  • To understand the attempts to capture the notion
    of logical truths using
  • Tautologies and model-specific truths.
  • To gain skill in classifying sentences using the
    above concepts.

12
Problems with current Definition of Truth
  • Definitions (tentative)
  • A sentence is a truth if it is true in all
    worlds.
  • What involves in determining if Cube(b) \/
    Tet(b) \/ Dodec(b) is a truth?
  • Which object b refers to.
  • How to interpret predicates Cube, Tet, Dodec.
  • How to interpret Boolean connectives.
  • All worlds. All? What exactly are those?
  • Restrictions of worlds as specified in a model.
  • e.g. world is an 8x8 board, 3 possible shapes, 3
    possible sizes, etc.
  • Which model we are using.
  • Many of these have not been specified.
  • Thus, our definition is not well-defined, it is
    ambiguous how to determine if a sentence is a
    truth.

13
So, is it a truth or not?
  • Is Cube(b) \/ Tet(b) \/ Dodec(b) a truth?
  • In Tarskis worlds model?
  • In the following model?
  • An object can be one of the following shapes
  • Cube, Tet, Dodec, Sphere
  • It depends on the model.

14
Model-specific truths and Logical truths
  • Definition A sentence is an X-necessity
    (model-specific truth) with respect to a model X
    if
  • using the interpretation of predicates according
    to model X,
  • the sentence is true in all worlds under model X.
  • Description A sentence is a logical truth if
  • The sentence is true for all circumstances that
    correspond to legitimate interpretations of the
    predicates.
  • Note
  • All circumstances mean all possible worlds (in
    all possible models).
  • We need to consider all possible legitimate
    interpretations of the predicates, not just one
    specific interpretation.
  • Deciding which interpretations are legitimate is
    subjective. Thus, the notion of logical truth is
    not well-defined.

15
Is it well-defined?
  • Determining if Cube(b) \/ Tet(b) \/ Dodec(b) is a
    TW-necessity.
  • Definition A sentence is an X-necessity
    (model-specific truth) with respect to a model X
    if
  • using the interpretation of predicates according
    to model X,
  • the sentence is true in all worlds under model X.
  • Check
  • Tarskis worlds model is being used
  • The set of worlds to consider (from TW model)
  • Names (terms) are determinate
  • Predicates are determinate (from TW model)
  • Boolean connectives

16
Previous Definitions
  • Definitions (tentative)
  • A sentence is a truth if it is true in all
    worlds.
  • A sentence is a contradiction if it is false in
    all worlds.
  • A sentence is a possibility if it is true in at
    least one world.
  • (we will refine these)

17
Model-specific classifications
  • Definitions
  • A sentence is an X-necessity (model-specific
    truth)with respect to a model X if
  • using the interpretation of predicates according
    to model X,
  • the sentence is true in all worlds under model X.
  • A sentence is an X-contradiction (model-specific
    contradiction) with respect to a model X if
  • using the interpretation of predicates according
    to model X,
  • the sentence is false in all worlds under model
    X.
  • A sentence is an X-possibility (model-specific
    possibility)with respect to a model X if
  • using the interpretation of predicates according
    to model X,
  • the sentence is true in at least one world under
    model X.

18
Classify these sentences
  • SameRow(b,c) \/ FrontOf(b,c) \/ BackOf(b,c)
  • TW-necessity
  • Not a necessity in model with shape Sphere
  • Large(b) /\ Larger(e,b)
  • TW-contradiction
  • Possibility in model with size Huge
  • LeftOf(a1,a2) /\ LeftOf(a2,a3) /\ /\
    LeftOf(a7,a8)
  • TW-possibility
  • Not a possibility in model with board 5x5.

19
Logical truth vs Model-specific truth why?
  • Intuitively, we want to know what sentences are
    logical truths, logical possibilities, logical
    contradictions.
  • Ex Is it possible for object b to be to the left
    of c, and c to be to the left of d, yet c is not
    between b and d?
  • However, these notions are vague.
  • In our first attempt to capture these notions, we
    made certain assumptions and come up with the
    definitions of model-specific truth, etc.
  • Are there other ways to capture these notions?

20
Logical truth vs Model-specific truth how?
  • The notion of logical truth is vague because
  • it is not clear what each predicate means, and
  • it is not clear what circumstances need to be
    considered.
  • The definition of model-specific truth removes
    these ambiguities by
  • clearly defining what worlds are considered, and
  • clearly defining what each predicate means (each,
    predicate is determinate)

21
Another attempt to capture logical truths
  • Ignore interpretation of atomic sentences
    (predicates names)
  • Each atomic sentence is considered a contingency.
  • A contingency is a sentence that is true in at
    least one circumstance and false in at least one
    circumstance
  • Ex aa has 2 possible truth values true and
    false.
  • Ex Larger(a,a)
  • Ignore any restriction about the worlds
  • Interaction between atomic sentences are ignored
  • Ex The pair ( Large(a) , Small(a) ) has 4
    possible combinations of truth values (TT, TF,
    FT, FF).
  • Ex ( Cube(a), Tet(a), Dodec(a) ) has 8 combos.
  • Ex ( Large(b), Larger(e,b) ) has 4 combos.

22
Helping ourselves to ignore
  • To help ourselves ignore these things, we should
    replace each atomic sentence by a meaningless
    variable.
  • Large(b) /\ Larger(e,b) ? A /\ B
  • Small(d) \/ Large(d) ? P \/ Q
  • (Tet(a) /\ Cube(b)) \/ Tet(a) \/ Cube(b) ?
    (A /\ B) \/ A \/ B

23
How many combos of truth values?
  • aa /\ bc
  • Large(b) /\ Larger(e,b)
  • Small(d) \/ Large(d)
  • (Cube(d) /\ Cube(d))
  • (Tet(a) /\ Cube(b)) \/ Tet(a) \/ Cube(b)
  • Is there a general rules to count the number of
    combinations?
  • How should we define truth here?

24
More examples
  • (Large(a) \/ Large(a))
  • (LeftOf(a,b) /\ LeftOf(b,c) /\ Adjoins(a,c))
  • (Tet(a) /\ LeftOf(a,b)) \/ (Tet(a) /\
    FrontOf(a,b))

25
Truth-Table necessity
  • Definition A sentence is a tautology if it is
    true in all rows of its truth table.
  • Other names Truth-Table necessity,
    TT-necessity, tautological truth.

26
Related Definitions
  • Definition
  • A sentence is a tautology if it is true in all
    rows of its truth table.
  • A sentence is a tautological contradiction if it
    is false in all rows of its truth table.
  • Other names Truth-Table contradiction,
    TT-contradiction
  • A sentence is a tautological possibility if it is
    true in at least one rows of its truth table.
  • Other names Truth-Table possibility,
    TT-possibility

27
Classify these
  • aa /\ bc
  • Large(b) /\ Larger(e,b)
  • Small(d) \/ Large(d)
  • (Cube(d) /\ Cube(d))
  • (Tet(a) /\ Cube(b)) \/ Tet(a) \/ Cube(b)

28
Checking tautologies
  • How easy or how hard it is to check if a sentence
    is a tautology?
  • What about model-specific truth and logical
    truth?

29
Concept Checking Questions
  • If a sentence is a tautology, is it a logical
    truth? The opposite?
  • Ex Larger(a,b) \/ Larger(a,b)
  • If a sentence is a tautology, is it a
    model-specific truth? The opposite?
  • If a sentence is a TT-possibility, is it a
    model-specific truth? The opposite?

30
3 interpretations
  • Model-specific
  • Unambiguous interpretation of predicates and
    worlds
  • Logical
  • Intuitive interpretation of predicates and worlds
  • Truth table
  • Doesnt interpret predicates
  • Only interpret Boolean connectives

31
When should we use which interpretation
  • (like on exam)
  • A /\ B ? tautological
  • Cube(b) \/ Tet(b) ? TW (model-specific)
  • Paul is at the library or he is at the movie?
    define a model, state assumptions (a person can
    only be at one place at a time) and use the model.

32
Table of Terms
33
Exercise
  • Create a sentence that is a truth under one
    interpretation, but not a truth under another
    interpretation
  • Show them to your neighbors and discuss any
    disagreement.
  • possibility
  • contradiction

34
Goals
  • To understand the concepts of
  • Truth, possibility, contradiction, equivalence,
    consequence
  • To understand the attempts to capture the notion
    of logical truths using
  • Tautologies and model-specific truths.
  • To gain skill in classifying sentences using the
    above concepts.

35
Equivalence
  • Description Two sentences P and Q are logically
    equivalent if the truth value of P and Q are the
    same in all circumstances.
  • Definition Two sentences P and Q are
    X-equivalentwith respect to a model X if
  • using the interpretation of predicates according
    to model X,
  • P and Q have the same truth value in all worlds
    under model X.
  • Definition Two sentences P and Q are
    tautological equivalent if P and Q have the same
    truth value in all rows of their joint truth
    table.

36
TT-equivalence
  • Two sentences are tautologically equivalent
    (TT-equivalent) if their truth-values are the
    same in every row of their joint truth table.
  • Meaning of predicates are completely ignored.
  • (Tet(a) /\ Tet(b)) and (Tet(a) \/ Tet(b)) are
    TT-equivalent
  • Tet(a) and Cube(a) \/ Dodec(a) is not
    TT-equivalent

37
Logical Equivalence
  • Two sentences are logically equivalent if their
    truth values are the same in all circumstances
    that correspond to legitimate interpretations of
    the predicates.
  • All circumstances mean all possible worlds in all
    possible models.

38
Model-specific Equivalence
  • Given a model M, two sentences are M-equivalence
    if their truth values are the same in all worlds
    in model M.
  • Two sentences are TW-equivalence their truth
    values are the same in all worlds that can be
    created in the Tarskis model.

39
Tautological, logical, and TW-equivalences
  • If two sentences are tautologically equivalent,
    then they are logically equivalent but not vice
    versa.
  • If two sentences are logically equivalent, then
    they are TW-equivalent but not vice versa.

40
Exercise
  • Create pairs of sentences that are
  • TW-equivalent but are not logically equivalent,
  • logically equivalent but are not TT-equivalent,
  • not TT-equivalent.
  • Show them to a classmate next to you and discuss
    any disagreement.

41
Goals
  • To understand the concepts of
  • Truth, possibility, contradiction, equivalence,
    consequence
  • To understand the attempts to capture the notion
    of logical truths using
  • Tautologies and model-specific truths.
  • To gain skill in classifying sentences using the
    above concepts.

42
Consequence
  • Description Q is a logical consequence of
    P1,P2,P3 if whenever P1,P2,P3 are all true, Q is
    also true
  • Definition Q is an X-consequence of P1,P2,P3
    with respect to a model X if
  • using the interpretation of predicates according
    to model X,
  • in all worlds under model X that P1,P2,P3 are all
    true, Q is also true.
  • Definition Q is a tautological consequence of
    P1,P2,P3 if in all rows of that P1,P2,P3 are all
    true, Q is also true.

43
TT-consequence
  • Q is a tautological consequence (TT-consequence)
    of P1, P2,,Pn if in every row of the joint truth
    table that P1, P2,,Pn are all true, Q is also
    true.
  • Meaning of predicates are completely ignored.
  • Tet(a) is a TT-consequence of Tet(a) \/ Cube(a)
    and Cube(a)

44
  • Tet(a) is a TT-consequence of Tet(a) \/ Cube(a)
    and Cube(a)

45
Logical Consequence
  • Q is a (logical) consequence of P1, P2,,Pn if in
    all circumstances that correspond to legitimate
    interpretations of the predicates and P1, P2,,Pn
    are all true, Q is also true.
  • All circumstances mean all possible worlds in all
    possible models.
  • ac is a consequence of ab and bc
  • Tet(a) is not a consequence of Cube(a) and
    Dodec(a)

46
Model-specific Consequence
  • Given a model M, Q is an M-consequence of P1,
    P2,,Pn if in all worlds in model M that P1,
    P2,,Pn are all true, Q is also true.
  • Q is a TW-consequence of P1, P2,,Pn if in all
    worlds in the Tarskis model that P1, P2,,Pn are
    all true, Q is also true.
  • Tet(a) is a TW-consequence of Cube(a) and
    Dodec(a)

47
Tautological, logical, and TW-consequences
  • If Q is a tautological consequence of P1, P2,
    ,Pn, then Q is a logical consequence of P1, P2,
    ,Pn, but not vice versa.
  • If Q is a logical consequence of P1, P2, ,Pn,
    then Q is a TW-consequence of P1, P2, ,Pn, but
    not vice versa.

48
Exercise
  • Create sets of sentences that form
  • TW-consequence but not logical consequence
  • Logical consequence but not TT-consequence,
  • not TT-consequence
  • Show them to a classmate next to you and discuss
    any disagreement.

49
(No Transcript)
50
Goals
  • To understand the concepts of
  • Truth, possibility, contradiction, equivalence,
    consequence
  • To understand the attempts to capture the notion
    of logical truths using
  • Tautologies and model-specific truths.
  • To gain skill in classifying sentences using the
    above concepts.
Write a Comment
User Comments (0)
About PowerShow.com