CS 100 - Week 12 Lecture 2 - November 8, 2012

starting Chapter 9 - A little categorical logic

*   in this chapter, we're interested in "All..." and "None/No.." and 
    "Some..." statements

    ...statements about classes or CATEGORIES or collections of things

*   statements such as:
    All food that tastes good is fattening.
    No minors are permitted in the store.
    Some mushrooms are poisonous.
    Some Californians aren't hippies.

    ...logicians call these CATEGORICAL STATEMENTS

*   and, for some simple arguments made up of categorical statements,
    there's a simple-but-powerful technique -- Venn diagrams -- for
    testing their validity;

*   MORE SPECIFICALLY,
    a categorical statement is a claim about the relationship between
    two or more categories or classes of things

    And our focus in Chapter 9 is on STANDARD-FORM categorical statements
    (or statements that can be reasonably converted to that form)

    which it is if it is one of the following 4 forms:
    *   All S are P.
    *   No S are P. 
    *   Some S are P. 
    *   Some S are not P.

*   Logicians have devised a number of techniques for testing the
    validity of simple arguments involving categorical statements --
    
    the simplest involves overlapping circles and markings
    known as VENN DIAGRAMS

*   see Figure 1, in 100lect12-2-figures.pdf posted along with these
    notes
    *   a circle represents a set of things --
        here, the set of all Dogs,
	and the set of all Mammals.

    *   Figure 2 - when we OVERLAP two circles as shown here,
        that creates 4 regions, marked with 1, 2, 3, and 4 here
        *   region 1 represents all dogs that are NOT also 
            mammals
        *   region 2 represents all dogs that are ALSO mammals
            (and also all mammals that are also dogs!)
        *   region 3 represents all mammals that are NOT also
            dogs
        *   region 4 -- everything OUTSIDE the two circles --
            represents everything that is neither dog nor
	    mammal

*   Now, there ARE differences in how Venn Diagrams are drawn and
    used in different fields --
    *   In Math/CS, to represent a statement such as 
        "All dogs are mammals", we'd put the circle for Dogs
	completely inside the circle for Mammals (Figure 3)

    *   BUT, in logic, we're using these to reason about
        statements -- 

	perhaps that's why it is more common in that field to
	ALWAYS draw the circles for different sets of interest
	as overlapping,
	
	and to then SHADE any regions that we know are EMPTY;

        *   Thus, in Figure 4, since "All dogs are mammals",
            we know that region 1 is empty, and so we shade it,
	    as shown.

        *   Now Figure 4 is depicting/representing the 
	    categorical statement, "All dogs are mammals".
    
*   Now consider the statement, "No beetles are mammals".
    *   we start with labelled, overlapping circles, one labelled
        Beetles (for the set of Beetles) and one labelled
        Mammals (for the set of Mammals). That's Figure 5.

    *   To represent the statement "No beetles are mammals",
        then, we need to shade region 2, the overlap between
        the two circles, to show that there are no beetles that
	are also mammals -- and the result is Figure 6.

*   (Figure 7 represents the answer fo Clicker Question 3.)

*   LOGIC VOCABULARY NOTES:
    *   consider "Some" -- MANY meanings in everyday English,
        but ONLY one in logic:
        In logic, "some" ALWAYS means "AT LEAST ONE"

        So, in logic,
	"Some mushrooms are poisonous."
	means, "At least one mushroom is poisonous."

    *   another important point:
        is an important distinction between "Some" statements
	   and "All" and "No" statements:

        *   in MODERN logic, "All" or "No" statements
            are treated as conditional in the following sense:

	    "All Hobbits are mushroom-lovers."
      
            is saying, in modern logic, IF anything is a Hobbit,
	        THEN it IS a mushroom-lover.

        *   "Some" asserts (in modern logic) that something exists!

	    "Some Hobbits are mushroom-lovers."
             
            is saying, in modern logic, that AT LEAST one Hobbit
	    exists, and THAT Hobbit IS a mushroom lover.

*   Now -- related to "Some S are P" and "Some S are not P"
    categorical statements -- there's a notation for these
    in Venn diagrams, too.

    *   When a "Some..." statement indicates that there is
        at least one of something, we indicate that by placing
	an X in the appropriate region;

    *   So -- for the statement "Some mushrooms are poisonous",

        the result is Figure 8 --
	a circle for Mushrooms overlapping with the circle
	for Poisonous Things, 

	and because "Some mushrooms are poisonous", 
	we put an X on the overlap between
	Mushrooms and Poisonous Things,
	
	to indicate that there is at least one thing in
	the set of Mushrooms that are also Poisonous Things
	(and in the set of Poisonous Things that are also
	Mushrooms)

*   And, for the statement "Some mushrooms are not poisonous",
    you get Figure 9 --
    *	a circle for Mushrooms overlapping with the circle
	for Poisonous Things, 

	and because "Some mushrooms are not poisonous", 
	we put an X in region 1 (the part of the Mushrooms
	circle NOT overlapping with the Poisonous Things
	circle),
	
	to indicate that there is at least one thing in
	the set of Mushrooms that are not also Poisonous Things