Lecture 3, Tuesday Sept. 7

Lecture Notes, Proof of Tautology/Contradiction and Prepositions

Today we start with a few more examples of propositional equivalence:

First, for practice, we prove one rule of equivalnce as true using others.

Contrapositive: Prove this is logically equivalent...

  a --> b   <==>  ~b --> ~a       
  ~a v  b   <==>  ~b --> ~a       "implies rule"
  ~a v  b   <==>  ~~b v ~a        "implies rule"
  ~a v  b   <==>    b v ~a        "double negation"
  ~a v  b   <==>    ~a v b        "commutative rule"

Second, can we add to the list of nice rules about "--->"?

Prove or disprove the "associative rule of implication".

(p --> q) --> r  <==> p --> (q --> r)

~(~p v q) v r    ( we're just seeing if it works... so don't have to
                   do all the steps )

(p ^ ~q) v r     <==> ~p v (~q v r)
this looks alllll different. so find some way of assigning t,f to all the variables. then go back and check in the very first line, and make sure that the expressions are still different...

Predicates

So far we have talked about propositions, and the equivalence between different propositions. Today we are going to talk about predicates: Predicates are "parameterized" propositions, functions that take an input and output a truth value.

i.e. Statements like "x+1=3" are examples of predicates, and we can write this predicate as p(x).

you can have predicates that have more than one variable.

p(x,y) = "x + y = 7"
q(x,y) = "person x is dating person y"

in this case you have to INSTANTIATE both variables in order to have a truth value...

INSTANTIATION is the process of assigning a value to a variable. There is always some "domain", the set of possible values that may be put in (such as real numbers, names of people in this room etc.)

So, is there anything you can say about a predicate without knowing how its variables have been instantiated? well, yes!

  1. Question One. Is the predicate EVER true? Is there anything value from the domain that you can put it to make the predicate true?
  2. Question Two. Is the predicate ALWAYS true? does everything in the domain make the predicate true?

What do "EVER and ALWAYS" mean? This depends on the domain over which you quantify. We must always know what the domain is. Sometimes it will be defined in the problem, sometimes it will be assumed by the context. But you must know what it is.

Question one is true or false... so it is a proposition. it is written with a backwards E and is called the "Existential Quantifier"

(exist)x p(x) where (exist) is written as a backwards capital E.

Question two is written (the "Universal Quantifier")

(forall)x p(x) where (forall) is written as an upside down capital A.

For a finite domains, these can be written easily as a compound proposition.

(forall, over set {1,2,3}) p(x) = P(1) ^ P(2) ^ P(3)
Cheap memory trick: Forall = T ^ P(1) ^ P(2) ^ P(3)
Cheap memory trick: Exists = F v P(1) v P(2) v P(3)
These memory tricks work even if there are no elements in the set.

For infinite domains, these formulas can be written as really long compound propositions!

Now. what can we do with these? Let's use these to express some english sentences:

There are old pilots and there are old pilots, but there are no old, bold pilots.
Everyone who doesn't have an suv is poor or environmentally conscious.

Negation of Quantifiers

Ok. so i've tried to convince you that (forall)x p(x) is a proposition for a predicate p. Like, we could write Q = (forall)x p(x), and Q has some truth value.

So what is ~Q?

is there something besides ~(forall)x p(x) that we can write?

DeMorgans law still applies... try it on the finite case

Multiple variables

Now, what about propositions that have mutliple variables?

You can fool some of the people all the time, all the people some of the time, but not all the people all the time.

note, the ORDER of the existential and universal quantifiers MATTERS!

lets consider a case with a small, finite domain.

Formal Questions in Math

These quantifiers also give us the ability to express some of the most interesting mathematical questions ever posed:
  1. Fermat's last theorem:
    not (exist) a (exist)b (exist)c (exist) n such that a,b,c>0 n>2 and a^n + b^n = c^n
  2. irrational numbers:
    (exist) x in R (forall) a (forall) b not (x = a/b) ( we will soon prove that square root of 2 is one of these numbers ).
  3. Halting problem:
    H(p,x) program P stops when given input x.
  4. Goldbach's Conjecture: all positive even number are sum of two primes...
    forall(n>=4) (exist prime a,b) a+b=2n
  5. how can we express that a number a is prime?
  6. There are an infinite number of prime numbers?