Last bit on Inference rules, and some real proofs!

So far we have talked about:
  1. propositions
  2. logical equivalences
  3. inference rules
  4. prepositions
  5. quantifiers
You should be able to give a one sentence definition of each of the above terms. We've even talked about a few logical equivalences that relate to quantified statements, for example:
~ (forall x) P(x)  <==> (exists x) ~P(x)

and

~ (exists x) P(x)  <==> (forall y) ~P(y)
  
   notice that I changed x to y.  Does that matter?  No! this is like
   a local variable in a function.

Often one mixes quantified and unquantified statements, then we can play the same "find what rules we can apply" game as before.

(exists) x (C(x) ^  ~B(x))
(forall) x (C(x) --> P(X))
--------------------------
(exists) x (P(x) ^  ~B(x))

1. (exists) x (C(x) ^  ~B(x))  Premise
2. C(a) ^ ~(B(a)), for some element a,  Existential Instantiation,1 
3. C(a),                       simplification
4. (forall) x (C(x) --> P(X))  premise
5. C(a) --> P(a)               Universal Instantiation
6. P(a)                        3,5, Modus Ponens.
7. ~B(a)		       2, Simplification
8. (P(a) ^  ~B(a))             6,7 conjunction
9. (exists) x (P(x) ^  ~B(x))  8, Existential Generalization 
<\pre>
------------------------------------------------------------------

Fallacies:

There are some very common fallacies
argument form [(p --> q) ^  q] -->  p
                    (p --> q) ^ ~p] --> ~q
are not valid arguments. But one uses them all the time...
"you said if you do the problem right then you get credit, but my friend got the problem wrong and they got credit and that's WRONG".
Interviewer: "Your resume looks impressive but I need another reference."
Bill: "Jill can give me a good reference."
Interviewer: "Good. But how do I know that Jill is trustworthy?"
Bill: "Certainly. I can vouch for her."
------------------------------------------------------------------

Proofs.

Perhaps that is enough of arguments in the abstract. How are these arguments actually being used? Typically, when you construct an argument you are trying to prove some specific fact. There are 3 common types of proofs: Direct Proofs, Indirect Proofs, and proofs by contradiction.

Suppose that you want to prove the statement

P --> Q

you need to show "If P is true, then Q is true". But the way proofs are often phrased, knowing P is not sufficient. Really, you are being asked to prove:

(P ^ all the math facts that have ever been discovered to be always true) --> Q

Now... "all the math facts..." should worry you. If you are ever stuck trying to prove something, you should look through the relevant chapter of the book and see if there is some math fact you are missing... or how to FORMALLY express some math fact.

For instance (math fact #1):

Let P(n) be the predicate "n is even".

How do you express this?
  P(n) = (exists) a, n = 2a

Proof Strategy 1

In a direct proof, you assume that P is true, then use inference rules and other facts to prove that Q is true.

Our First Proof:

Prove P(14).
(exists) a, 2a = 14          definition of P.

1. choose a = 7, 2(7) = 14.     math.
2. (exists) a, 2a = 14          existential generalization.

------------------------------------------------------------

Our second proof:

Prove If n is an odd integer, then n2 is an odd integer.

1. Suppose n is an odd integer.
2. exists a such that n = 2a + 1.        
3. n2 = (2a + 1)2
4.    = 4a2 + 4a + 1
5.    = 2(a2+2a) + 1
6. n2 = 2b + 1, for b = a2+2a
7. exists b, n2 = 2b + 1
8. so n is odd --> n2 is odd

QED

QED (quod erat demonstrandum Latin for "what was to be proven". ).
  Yatta!  success!  little black box. or, bizarrely in your book, a
  little triangle.

did we forget anything?

in line 7 we said that we had found and INTEGER b... is b an integer?

well, yes: b = a2 + 2a and

(math fact #2), the integers are "closed under addition and multiplication". (They are not, for instance, closed under division.).

------------------------------------------------------------------------

slightly harder proof?

If a and b are real numbers, then a2 + b2 >= 2ab. 

prove (forall) a,b XXXX

Math Fact #3, forall real numbers a, a squared >= 0.
              forall real numbers a != 0, a squared > 0.
----------------------------------------------------------------------

Prove: The sum of two rational numbers is a rational number. 

Math Fact #4, P(n): n is "rational" <==> (exists) a, (exists)b, n =
a/b

----------------------------------------------------------------------
----------------------------------------------------------------------

Sometimes, it is HARD to do a direct proof. In these cases, you can perhaps "apply a logical equivalence" to the formula you are trying to prove, then prove this equivalent formula. This is called an "indirect proof".

an indirect proof of P --> Q is:

~Q --> ~P

so, assume Q is false, and show that then P is false.

remember, that we always use other math facts in our proof so this is
  really:

  (P ^ math) --> Q    <==>    ~Q --> ~(P ^ math)

  ~Q --> (~P v ~math)

  so you can show that your assumption is violated, or some other
  contradiction with known math facts...

ok, now an example of an indirect proof:

If n is an integer and n2 is odd, then n is odd.

  try direct proof.
  try indirect proof.

-------------------------------------------------------------------------

Another indirect proof:

There are 41 Home Blues Hockey games.  Prove that at least 6 of them
must be on the same day of the week.

-------------------------------------------------------------------------

Proof by contradiction:  (similar to above, but no premise P)... just:

math --> Q
~Q --> ~math

so assume ~Q and prove any contradiction to known math facts...

-------------------------------------------------------------------------

Theorem. There are infinitely many prime numbers.

Proof. Assume to the contrary that there are only finitely many prime numbers, and all of them are listed as follows: p1, p2 ..., pn. Consider the number q = p1p2... pn + 1. This number is not divisible by any of the listed primes since if we divided pi into q, there would result a remainder of 1 for each i = 1, 2, ..., n. Well then, we must conclude that q is a prime OR if q is composite, all of its factors must be different tha p1, ... pn. This is contradicting our assumption that all primes are in the list p1, p2 ..., pn.