Discrete Structures

Lecture Notes, 24 Sep 2010

Last Update: 24 September 2010

Note: NEW or UPDATED material is highlighted


Note: A username and password may be required to access certain documents. Please contact Bill Rapaport.


Index to all lecture notes
…Previous lecture


  1. §1.3: Predicates & Quantifiers (cont'd):
      Knowledge Representation & Translation (cont'd):

    1. Lots of examples:

      In the interest of completeness, here I repeat all of the examples from last time,
      and add some new ones.

      • "Dictionary" of predicates and terms (for use in the examples):

        Let Dog(x) = (x) is a dog
        Let Fish(x) = (x) is a fish
        Let Glitters(x) = (x) glitters
        Let Gold(x) = (x) is gold
        Let Mammal(x) = (x) is a mammal
        Let Man(x) = (x) is a man
        Let Pet(x) = (x) is a pet
        Let Wise(x) = (x) is wise
        Let mark-twain = Mark Twain
        Let sam-clemens = Samuel Langhorne Clemens (as in Clemens Hall)


      1. Mark Twain is wise = "Wise(mark-twain)"
      2. Mark Twain was a wise man = "Wise(mark-twain) ∧ Man(mark-twain)"

        • Note: The tense of "was" is ignored in FOL!

      3. Mark Twain is Samuel Langhorne Clemens = "mark-twain = sam-clemens"
      4. All dogs are pets = "∀x[Dog(x) → Pet(x)]"


      5. Some dogs are pets = "∃x[Dog(x) ∧ Pet(x)]"

          Notes:
          1. NOT:  "∃x[Dog(x) → Pet(x)]" !!!
            which is true about my cat!

            i.e., even if there were no dogs, but only cats, "∃x[Dog(x) → Pet(x)]" would be T,
            but the English would be false.

            See "On the Translation of ‘Some Dogs Are Pets’" for further explanation.


          2. Here's yet another explanation:

            1. Semantics for ∀x[Dog(x) → Pet(x)]:

              • Consider a giant grab-bag of everything in the universe
                (i.e., everything in the domain)
              • Pick any thing at random from the bag.
              • Is it a dog?
              • If not, then (Dog(x) → Pet(x)) has not been refuted;
                i.e., it has not (yet) been determined to have tval=F
                ∴ assume its tval=T, & continue for-loop through bag.

              • If it is a dog, then is it a pet?
              • If so, then tval=T else tval=F


            2. Semantics for ∃x[Dog(x) ∧ Pet(x)]:

              • Consider grab-bag of everything in univ.
              • Search in it for a dog.
              • If you find a dog, then tval=T
                  i.e., you found an x in the domain that is both a dog and a pet

                else continue searching for a dog

              • If you don't find any dogs, then tval=F


            3. Semantics for ∃[Dog(x) → Pet(x)]:

              • Consider grab-bag of everything in univ.
              • Search in it for a dog.
              • If you find a dog, then is it a pet?
              • If so, then tval=T else continue searching for a dog.
              • If you don't find any dogs, then tval=T (!)
                (because everything you found is not a dog,
                ∴ the antecedent's tval=F
                ∴ the conditional's tval=T (!)


          3. Some other versions of FOL use "restricted quantifiers":

            "Some dogs are pets" becomes:

              (∃x : Dog(x))[Pet(x)]

            where the "restriction" on x that Dog(x) is like a type declaration.

            "All dogs are pets" becomes:

              (∀x : Dog(x))[Pet(x)]


      6. No dogs are fish = ¬∃x[Dog(x) ∧ Fish(x)]

        • But this could also be represented as: ∀x[Dog(x) → ¬Fish(x)]

        • So which is "correct"? Both! They are logically equivalent.


      7. All dogs are not fish = ∀x[Dog(x) → ¬Fish(x)]

        • But: Shakespeare's "All that glitters is not gold" = ¬∀x[Glitters(x) → Gold(x)] !

      8. Some dogs are not pets = ∃x[Dog(x) ∧ ¬Pet(x)]
      9. No dogs are not mammals = ¬∃x[Dog(x) ∧ ¬Mammal(x)]

        • This is ≡ ∀x[Dog(x) → Mammal(x)]

      10. Not all dogs are pet = ¬∀x[Dog(x) → Pet(x)]

        • This is ≡ ∃x[Dog(x) ∧ ¬Pet(x)]


    2. For more examples (in slightly different notation), see "Representing English Sentences in FOL"

      For more suggestions on how to translate, see:


  2. §1.4: Nested Quantifiers: Propositional functions with ≥2 variables can have ≥2 quantifiers:

    1. Consider the propositional function "x > y":

      1. By itself, this is a propositional function (an "open sentence"), not a proposition
        (it has no tval)

      2. It can become a proposition (it can gain a tval) by:

        1. assigning constant values to both variables: "3 > 2"
        2. or by quantifying ("binding") both variables:

          • xy[x > y]

            • "Every number is > every number"
            • For all numerical domains (W,N,Z,R,C), this is false.


    2. xy[x > y] ≡ ∀yx[x > y]

      • and it is ≡ ∀yx[y > x]

      • and it is ≡ ∀xy[y > x]

        • I.e., the order of the same quantifiers doesn't matter.


    3. Ditto for: ∃xy[x > y]

      • "Some number is > some number"
      • For all numerical domains, this is true


    4. But consider: ∀xy[x > y]

      • "For every number, there is a number that it's > than"
      • This is true for Z
      • But false for N
        • because x=0 → ¬∃y[x > y]


      • When ∀ and ∃ quantifiers are mixed, their order does matter:

        1. Consider: ∃yx[x > y]

          • "There is a strictly smallest number"
          • For all numerical domains, this is false

        2. Consider: ∀yx[x > y]

          • "For every number, there's a number > it"
          • For all numerical domains, this is true

        3. Consider: ∃xy[x > y]

          • "There is a biggest number"
          • For all infinite numerical domains, this is false


    5. Uniqueness:

      "There is exactly one dog" can be represented as:

        x[Dog(x) ∧ ∀y[Dog(y) → y = x]]

      • I.e., There is (at least) one thing in the domain that is a dog,
        and, any (other) dog in the domain is identical to that one.

      • Sometimes, logicians abbreviate this (with the "E-shriek!" quantifier) as:

          ∃!xDog(x)

        (read "There is a unique x in the domain such that x is a dog".)

      1. The scope of "∃x" is [Dog(x) ∧ ∀y[Dog(y) → y = x]]

        … and I will tell you more about this on Monday


Next lecture…


Text copyright © 2010 by William J. Rapaport (rapaport@buffalo.edu)
Cartoon links and screen-captures appear here for your enjoyment. They are not meant to infringe on any copyrights held by the creators. For more information on any cartoon, click on it, or contact me.
http://www.cse.buffalo.edu/~rapaport/191/F10/lecturenotes-20100924.html-20100924