SlideShare uma empresa Scribd logo
1 de 65
Mathematical Reasoning


The Foundation of Algorithmics
The Nature of Truth
   In mathematics, we deal with
   statements that are True or False
   This is known as “The Law of the
   Excluded Middle”
   Despite the fact that multi-valued logics
   are used in computer science,
   they have no place in mathematical
   reasoning
The nature of mathematical proof
   An individual once said to me “You
   know what the definition of a good
   proof is?”
   “What?” I replied.
   “It convinces you!” he said, quite proud
   of himself.
   This individual was …
Mathematical Proof II

     Dead Wrong!
   Personal certitude has nothing to do with
   mathematical proof.
   The human mind is a fragile thing, and
   human beings can be convinced of the most
   preposterous things.
Mathematical Proof III
   A good proof is one that starts with a
   set of axioms, and proceeds using
   correct rules of inference to the
   conclusion.
   In many cases, we will proceed
   informally, but that does not mean that
   we will skip essential steps.
A Sample Proof I
   Prove that (x+1)2=x2+2x+1
   Incorrect Proof #1
     The book says that this is true
   Incorrect Proof #2
     My teacher says that this is true
   Incorrect Proof #3
     Everybody knows that this is true
A Sample Proof II
   Incorrect Proof #4:          x+1
     This is an algorithm.      x+1
     Before you can use an      x+1
     algorithm as part of     2
                             x +x
     a proof, you must
     prove it correct.        2
                             x + 2x + 1
     You didn’t do that.
A Sample Proof III
   A Correct Proof
   (x+1)2=(x+1)(x+1)
     Because the left-hand side is just
     shorthand notation for the right-hand side.
   (x+1)(x+1)=((x+1)x+(x+1)1)
     Because the distributive law is one of the
     axioms of the real numbers
A Sample Proof IV
   ((x+1)x+(x+1)1)=(x+1)x+(x+1)
    Because the outer parentheses are not
    needed, and because the identity law of
    multiplication is one of the axioms of the
    real numbers
   (x+1)x+(x+1)=(xx+1x)+(x+1)
    Because the distributive law is an axiom of
    the real numbers
A Sample Proof V
   (xx+1x)+(x+1)=(xx+x)+(x+1)
    Because the identity law of multiplication is
    one of the axioms of the real numbers
   (xx+x)+(x+1)=(x2+x)+(x+1)
    Because x2 is notational shorthand for xx.
   (x2+x)+(x+1)=x2+(x+(x+1))
    Because the associative law of addition is
    one of the axioms of the real numbers.
A Sample Proof VI
   x2+(x+(x+1))= x2+((x+x)+1)
    Because the associative law of addition is
    one of the axioms of the real numbers
   x2+((x+x)+1)= x2+((1+1)x+1)
    Because the distributive law is one of the
    axioms of the real numbers.
   x2+((1+1)x+1)= x2+(2x+1)
    Because 1+1=2, and because notational
    convention says that multiplication is
    performed first.
A Sample Proof VII
   x2+(2x+1)= (x2+2x)+1
    Because the associative law of addition is
    one of the axioms of the real numbers.
   (x2+2x)+1= x2+2x+1
    Because x2+(2x+1)= (x2+2x)+1, there is
    no ambiguity introduced by omitting the
    parentheses.
A Warning!

  WE’RE NOT
  KIDDING
  ABOUT THIS!
More Warnings…
  This REALLY IS how you do
  mathematical proofs!
  You can combine steps.
  You can leave out the explanations.
  But you MUST be able to put them back
  in upon demand.
  Any other way of doing things is
  WRONG!
The Rules of Inference I
   Given the statement: All A is B
   And the statement: All B is C
   We conclude: Therefore All A is C.
   This is a correct inference.
   Example: All cows are animals, all
   animals are living beings, therefore all
   cows are living beings.
The Rules of Inference II
   Given All A is B
   We conclude that Some B is A.
   Example, All Cows are Animals,
   therefore some Animals are Cows.
   An incorrect inference: Given All A is B,
   to conclude that All B is A. After all, not
   all animals are cows.
The Rules of Inference III
   Given Some A is B, and Some B is C,
   what can we conclude?
   Nothing.
   Example: Some Cows are Jerseys,
   Some Jerseys are human. (Here we are
   to interpret the word “Jersey” as
   “Things that come from Jersey, an
   island in the English Channel.”
The Rules of Inference IV
   Given Some A is B, we can conclude
   that Some B is A.
   Some cows are Jerseys, some Jerseys
   are cows.
The Rules of Inference V
   Given Some A is B and All B is C,
   We conclude: Some A is C.
   Example: Some cows give milk, All
   things that give milk are female.
   Therefore: some cows are female.
The Rules of Inference VI
   Given All A is B, and Some B is C, what
   can we conclude?
   Nothing.
   Example: All cows are animals. Some
   animals are birds. No conclusion is
   possible.
Quantifiers
   A statement such as “All A is B” is said
   to be “Universally quantified.”
   In other words, it is a universal
   statement that applies to all A.
   A statement such as “Some A is B” is
   said to be “Existentially quantified.”
   In other words, there exists at least one
   A to which the statement applies.
Negative Statements
   The only permissible form for the
   universal negative is: No A is B. (Accept
   no substitutes!)
   The existential negative has several
   forms, Not all A is B, Some A is not B,
   and many others.
   Mathematical statements may require
   somewhat greater precision than
   general statements. (See below)
Negating Statements
   An existential negates a universal, and
   an universal negates an existential.
   The negation of “All A is B” is “Some A
   is not B”
   The negation of “Some A is B” is “No A
   is B”
   The two statements “Some A is B” and
   “Some A is not B” can both be true.
Mathematical Quantifiers I
   Mathematical statements need to be
   somewhat more precise than “All Cows
   are Animals.”
   All mathematical statements are
   quantified, but sometimes, quantifiers
   are understood.
   Example: prove that (x+1)2=x2+2x+1.
   The universal quantifier “For all x” is
   understood.
Mathematical Quantifiers II
   A proposition is a statement that can be
   assigned the value True or False.
   “All Cows Eat Grass,” “All Cows are
   Ducks,” and “All multiples of 10 end in
   0” are examples of propositions.
   Statements such as “good weather,”
   “return 25 to the printout” and “I fit
   new blue” are not propositions.
Mathematical Quantifiers III
   Assume that P is a proposition
   containing the variable x.
   We sometimes denote P as P(x) to
   indicate it contains the variable x.
   xP is read “For all x P”
   xP is read “There exists an x such that
   P”
   In both cases, we read out P, we don’t
   just say “P”.
Mathematical Quantifiers IV
   Practice with these:
   x (x+1)2=x2+2x+1
   x x<5
   As in ordinary logic, a universal negates
   an existential, and an existential
   negates a universal.
The Rules of Inference VII
   X and Y are equal (X=Y) if X and Y are
   names for the same thing.
   If a statement P(X) containing X is true,
   and X=Y then the statement P(Y)
   obtained by substituting Y for X is also
   true.
   If P(X) is quantified, and X appears in
   the quantifier, then Y must appear in
   the quantifier of P(Y)
The Rules of Inference VIII
   If the statement x P(x) is known to be
   true, and k is within the domain of
   discourse of P, then P(k) is true.
   Example: x (x+1)2=x2+2x+1.
   The domain of discourse is all real
   numbers. 15.7 is a real number, so
   (15.7+1)2=15.72+2*15.7+1 is true.
Rules of Inference IX
   Example II: x (x+1)2=x2+2x+1
   “Toothpicks” is outside the domain of
   discourse of (x+1)2=x2+2x+1.
   We cannot say that (“Toothpicks”+1)2=
   “Toothpicks” 2+2 “Toothpicks”+1 is
   true.
   This statement is not a proposition and
   is neither true nor false.
Rules of Inference X
   If the statement x P(x) is known to be
   false, and k falls within the domain of
   discourse of P, then P(k) is false.
   Example: x 5<x<4
   The domain of discourse is all real
   numbers.
   4.5 is a real number, so 5<4.5<4 is
   false.
Negating Quantified Statements
   Negate: x (x+1)2=x2+2x+1
   Result: x (x+1)2x2+2x+1
   Negate: x x<5
   Result: x x5
   By the law of the excluded middle, if a
   statement is true, its negation is false,
   and vice-versa.
Logical Connectives I
   If P is a proposition P is its negation.
   P is read “Not P.”
   Do not confuse this mathematical
   connective with the general statement
   “Not All A is B”. They are not the same
   thing.
   Sometimes P is written P’ or P.
Logical Connectives II
   If P and Q are propositions, PQ is
   called the conjunction of P and Q and is
   read P AND Q.
   If P and Q are propositions, PQ is
   called the disjunction of P and Q and is
   read P OR Q.
   If P and Q are propositions, PQ is
   called the implication of P and Q and is
   read IF P THEN Q.
Truth Tables for Connectives
 P       Q       PQ     PQ     PQ

 True    True    True    True    True

 True    False   False   True    False

 False   True    False   True    True

 False   False   False   False   True
Implications
   The most interesting connective is the
   implication PQ, which can also be
   written PQ.
   If P is False, then the entire statement
   is true. That is, “A False Statement
   Implies Anything.”
   An implication is proven by assuming
   that P is true and then showing that, in
   that case, Q must also be true.
Implications II
   Given a statement S of the form PQ,
   the statement QP is called the
   Converse of S.
   The Converse of S is an independent
   statement that must be proven
   independently of S.
   S can be true and its converse can be
   false and vice versa. They could both
   be true or both be false.
Implications III
   Given a statement S of the form PQ,
   the statement Q P is called the
   Contrapositive of S.
   A statement and its contrapositive are
   logically equivalent. Either both are true
   or both are false.
   The statement P Q is the Inverse
   of S. The inverse of S is logically
   equivalent to the converse of S.
Proven Implications
   Once an implication has been proven,
   we use a special symbol to designate
   the implication.
   The notation PQ is read “if P then Q”
   and also says that the P=T, Q=F case
   never occurs.
   In other words, that the implication is
   always true.
If and Only If
   A statement of the form P if and only if
   Q is shorthand for (if P then Q) and (if
   Q then P).
   In symbols we express this as PQ.
   Once the statement has been proven
   we rewrite the statement as PQ.
   To prove PQ, we must prove both of
   PQ and QP.
Negating Compound Statements
   (PQ) = P  Q
     X is less than three and X is odd
     X is greater than or equal to 3 or X is even
   (PQ) = P  Q
     The car was either red or green
     The car was not red AND it was not green
   (PQ) = P  Q
     If a person has a Ph.D. then they must be rich
     Prof. Maurer has a Ph.D and Prof. Maurer is poor.
     Note change in quantifiers.
The Rules of Inference XI
   If P is known to be true, P is false, and vice
   versa.
   If PQ is true, then QP is true
   If PQ is true then both P and Q are true.
   If PQ is known to be false, and P is known
   to be true, then Q is false.
   If PQ is true, then QP is true.
   If PQ is false, then both P and Q are false.
   If PQ is known to be true, and P is known to
   be false, then Q is true.
The Rules of Inference XII
   If PQ is known to be true, and P is
   true, then Q is true.
   If PQ is known to be true, and Q is
   false then P is false.
The Rules of Inference XIII
   If PQ is known to be true and P is
   true then Q is true, and vice versa.
   If PQ is known to be true and P is
   false then Q is false, and vice versa.
   If PQ is known to be false and P is
   false then Q is true, and vice versa.
   If PQ is known to be false and P is
   false then Q is true, and vice versa.
Logical Fallacies: The Biggie I
   Let’s go back to our theorem
   (x+1)2=x2+2x+1 and give another
   invalid proof.
   X=5, (x+1)2=(5+1)2=62=36
   x2+2x+1=52+2*5+1=25+10+1=36
   “Hence Proved ”
   What has really been proved?
   (See Next Slide)
Logical Fallacies: The Biggie II
   This “proof” proves:
   x (x+1)2=x2+2x+1
   But the theorem was:
   x (x+1)2=x2+2x+1
   For the preceding to be a proof, the
   following implication would have to be
   true for all propositions P
   xP x P
Logical Fallacies: The Biggie III
   Is xP x P true for all P?

   Here is a capital letter A:   A
   This capital A is red. For the implication
   to be true, ALL capital A’s would have
   to be red.

   But this one isn’t:   A
Logical Fallacies: The Biggie IV
   Most students have a hard time
   understanding this.
   It is not the calculations that are
   incorrect in the “proof” given above.
   It is the Inference that is wrong!
   If an inference technique can be used
   to prove silly nonsense (all capital A’s
   are red), then it cannot be used to
   prove anything true.
Logical Fallacies: The Biggie V
   When you are asked to prove
   something in a class, it is generally
   something that is well-known to be
   true.
   Your proof isn’t supposed to derive a
   new truth.
   Your proof is supposed to demonstrate
   that you know how to apply the rules of
   inference correctly.
Logical Fallacies: The Biggie VI
   Question: You run your program P on X
   number of inputs and observe that
   condition C is true on all these inputs.
   Does this prove that condition C is true
   on ALL inputs?
   Answer: No
   Repeat Answer: No
   Repeat Answer Again: No, No, No, No
Logical Fallacies: The Biggie VII
   Testing a program cannot prove
   anything.
   There is no such thing as “proof by
   example”
   That is: examples can be used to prove
   existential statements, but cannot be
   used to prove universal ones.
   This is an inductive fallacy known as:
   Hasty Generalization
Other Logical Fallacies I
   Appeal to Authority: “But that’s what it
   says in the book!”
   Usually a lie.
   If the book has the wrong answer
   And you copy the answer onto your test

   Then your answer is:   WRONG!
Other Logical Fallacies II
  Non Sequitur: Squaring something is a
  more powerful operation than adding
  something, so (x+1)2 can’t possibly
  equal x2+1, therefore we have to add
  2x to offset the power of the squaring
  operation.
  The truth of (x+1)2=x2+2x+1 does not
  follow from this argument. You must
  use the axioms of the real numbers
Other Logical Fallacies III
   Ad Ignorandum (appeal to ignorance): We
   certainly cannot prove it false that
   (x+1)2=x2+2x+1.
   Or alternatively: Why shouldn’t it be true that
   (x+1)2=x2+2x+1?
   An inability to prove the falsity of something
   does not imply that it is true.
   You cannot assert whatever you want and
   then defy the world to prove it false. You
   must prove your statements to be true.
Other Logical Fallacies IV
   Assuming the converse: If this square
   root function is correct then it will
   compute the square root of 4 to be 2.
   This square root function computes the
   square root of 4 to be 2, therefore it is
   correct.
   See next slide for the code of this
   function.
Other Logical Fallacies V
   float SquareRoot(float x)
   {
       return 2.0;
   }
   Given a true statement of the form “if P
   then Q,” the truth of P proves the truth
   of Q.
   However, the truth of Q does not prove
   the truth of P.
Other Logical Fallacies VI
   Assuming the Inverse: If a number n is
   prime and greater than 2 then it must
   be odd.
   This number is greater than two, but it
   is not prime. Therefore, it can’t be odd.
   The number is 9.
Other Logical Fallacies VII
   Given a true statement of the form “If P
   then Q:”
   The falsity of Q proves the falsity of P.
   However, the falsity of P does not prove
   the falsity of Q.
   Since the converse is logically
   equivalent to the inverse, assuming the
   inverse and assuming the converse are
   the same fallacy.
Proving Things, In General
   Take stock of your resources. These are
   the things that are known to be true.
     The given elements of the problem
     Axioms
     Proven Theorems
   Use your tools to derive the result from
   your resources. Your tools are your
   rules of inference.
Proving If-Then Statements
   For a statement of the form If P then Q,
   add P to your resources. P is assumed
   to be true.
   You must use the rules of inference to
   derive Q from your resources.
Inductive Proofs
   Suppose P(n) is a statement about
   integers. (It must be about integers.)
   To prove that P(n) is true, you must
   prove P(0) and the statement “if P(n)
   then P(n+1)”
   The axioms of the integers state that
   “There is an integer 0.” and “Every
   integer n has a successor n+1”
Complete Induction
   Complete induction is weaker than
   normal induction, because it does not
   use the axioms of the integers directly.
   For complete induction you must prove
   P(0) and the statement “if P(k) for all
   k<n then P(n)”
Disproving Things I
   A disproof of a statement is the same
   as proving the negation of the
   statement.
   Disprove: No even integer is prime.
   “2 is prime.”
   One counterexample is sufficient to
   disprove a universally quantified
   statement.
Disproving Things II
   Disprove: All odd integers are prime.
   “9 is odd and is not prime”
   One counterexample is sufficient.
   Disprove: There is an even integer
   greater than 2 which is prime.
   Proof: if x is an even integer it must be
   of the form 2k for some integer k (by
   definition). (continued on next slide)
Disproving Things III
   Since x>2 we have 2k>2.
   Canceling the 2s (inverse law of
   multiplication) we get k>1.
   Since x=2k, and k>1, x is composite,
   and cannot be prime. Therefore if x is
   an even number greater than 2, it
   cannot be prime.
   Disproving an existential requires proof
   of a universal

Mais conteúdo relacionado

Mais procurados

Chap 1 real number
Chap 1 real numberChap 1 real number
Chap 1 real numberJNV
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proofAbdur Rehman
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicUniversity of Potsdam
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicIT Engineering Department
 
Real number by G R Ahmed of KVK
Real number by G R Ahmed of KVKReal number by G R Ahmed of KVK
Real number by G R Ahmed of KVKMD. G R Ahmed
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logicSharif Omar Salem
 
Goldbach Conjecture
Goldbach ConjectureGoldbach Conjecture
Goldbach ConjectureAnil1091
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
32 multiplication and division of decimals
32 multiplication and division of decimals32 multiplication and division of decimals
32 multiplication and division of decimalsalg1testreview
 
IIT JEE - 2007 ii - mathematics
IIT JEE -  2007   ii - mathematicsIIT JEE -  2007   ii - mathematics
IIT JEE - 2007 ii - mathematicsVasista Vinuthan
 
Pigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityPigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityKiran Munir
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategyallyn joy calcaben
 
2 7 variations
2 7 variations2 7 variations
2 7 variationsmath123b
 

Mais procurados (18)

Chap 1 real number
Chap 1 real numberChap 1 real number
Chap 1 real number
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proof
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 
Real number by G R Ahmed of KVK
Real number by G R Ahmed of KVKReal number by G R Ahmed of KVK
Real number by G R Ahmed of KVK
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
 
Goldbach Conjecture
Goldbach ConjectureGoldbach Conjecture
Goldbach Conjecture
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
32 multiplication and division of decimals
32 multiplication and division of decimals32 multiplication and division of decimals
32 multiplication and division of decimals
 
IIT JEE - 2007 ii - mathematics
IIT JEE -  2007   ii - mathematicsIIT JEE -  2007   ii - mathematics
IIT JEE - 2007 ii - mathematics
 
Prpositional2
Prpositional2Prpositional2
Prpositional2
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Pigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityPigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,Countability
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
2 7 variations
2 7 variations2 7 variations
2 7 variations
 

Semelhante a Mathreasoning

1Week 3 Section 1.4 Predicates and Quantifiers As.docx
 1Week 3 Section 1.4 Predicates and Quantifiers  As.docx 1Week 3 Section 1.4 Predicates and Quantifiers  As.docx
1Week 3 Section 1.4 Predicates and Quantifiers As.docxjoyjonna282
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptxPradeeshSAI
 
desmath(1).ppt
desmath(1).pptdesmath(1).ppt
desmath(1).pptMemMem25
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.pptTejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introductionyashirraza123
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptNandiniSR2
 
S2 1
S2 1S2 1
S2 1IIUM
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdfsmarwaneid
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptxSESSION-11 PPT.pptx
SESSION-11 PPT.pptxNaniSarath
 
Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1Sabu Francis
 

Semelhante a Mathreasoning (20)

1Week 3 Section 1.4 Predicates and Quantifiers As.docx
 1Week 3 Section 1.4 Predicates and Quantifiers  As.docx 1Week 3 Section 1.4 Predicates and Quantifiers  As.docx
1Week 3 Section 1.4 Predicates and Quantifiers As.docx
 
Logic
LogicLogic
Logic
 
True but Unprovable
True but UnprovableTrue but Unprovable
True but Unprovable
 
Logic.pptx
Logic.pptxLogic.pptx
Logic.pptx
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Quantification
QuantificationQuantification
Quantification
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
desmath(1).ppt
desmath(1).pptdesmath(1).ppt
desmath(1).ppt
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.ppt
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
S2 1
S2 1S2 1
S2 1
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Logic&proof
Logic&proofLogic&proof
Logic&proof
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Course notes1
Course notes1Course notes1
Course notes1
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptxSESSION-11 PPT.pptx
SESSION-11 PPT.pptx
 
Per3 logika&amp;pembuktian
Per3 logika&amp;pembuktianPer3 logika&amp;pembuktian
Per3 logika&amp;pembuktian
 
Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1
 

Último

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 

Último (20)

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 

Mathreasoning

  • 2. The Nature of Truth In mathematics, we deal with statements that are True or False This is known as “The Law of the Excluded Middle” Despite the fact that multi-valued logics are used in computer science, they have no place in mathematical reasoning
  • 3. The nature of mathematical proof An individual once said to me “You know what the definition of a good proof is?” “What?” I replied. “It convinces you!” he said, quite proud of himself. This individual was …
  • 4. Mathematical Proof II Dead Wrong! Personal certitude has nothing to do with mathematical proof. The human mind is a fragile thing, and human beings can be convinced of the most preposterous things.
  • 5. Mathematical Proof III A good proof is one that starts with a set of axioms, and proceeds using correct rules of inference to the conclusion. In many cases, we will proceed informally, but that does not mean that we will skip essential steps.
  • 6. A Sample Proof I Prove that (x+1)2=x2+2x+1 Incorrect Proof #1 The book says that this is true Incorrect Proof #2 My teacher says that this is true Incorrect Proof #3 Everybody knows that this is true
  • 7. A Sample Proof II Incorrect Proof #4: x+1 This is an algorithm. x+1 Before you can use an x+1 algorithm as part of 2 x +x a proof, you must prove it correct. 2 x + 2x + 1 You didn’t do that.
  • 8. A Sample Proof III A Correct Proof (x+1)2=(x+1)(x+1) Because the left-hand side is just shorthand notation for the right-hand side. (x+1)(x+1)=((x+1)x+(x+1)1) Because the distributive law is one of the axioms of the real numbers
  • 9. A Sample Proof IV ((x+1)x+(x+1)1)=(x+1)x+(x+1) Because the outer parentheses are not needed, and because the identity law of multiplication is one of the axioms of the real numbers (x+1)x+(x+1)=(xx+1x)+(x+1) Because the distributive law is an axiom of the real numbers
  • 10. A Sample Proof V (xx+1x)+(x+1)=(xx+x)+(x+1) Because the identity law of multiplication is one of the axioms of the real numbers (xx+x)+(x+1)=(x2+x)+(x+1) Because x2 is notational shorthand for xx. (x2+x)+(x+1)=x2+(x+(x+1)) Because the associative law of addition is one of the axioms of the real numbers.
  • 11. A Sample Proof VI x2+(x+(x+1))= x2+((x+x)+1) Because the associative law of addition is one of the axioms of the real numbers x2+((x+x)+1)= x2+((1+1)x+1) Because the distributive law is one of the axioms of the real numbers. x2+((1+1)x+1)= x2+(2x+1) Because 1+1=2, and because notational convention says that multiplication is performed first.
  • 12. A Sample Proof VII x2+(2x+1)= (x2+2x)+1 Because the associative law of addition is one of the axioms of the real numbers. (x2+2x)+1= x2+2x+1 Because x2+(2x+1)= (x2+2x)+1, there is no ambiguity introduced by omitting the parentheses.
  • 13. A Warning! WE’RE NOT KIDDING ABOUT THIS!
  • 14. More Warnings… This REALLY IS how you do mathematical proofs! You can combine steps. You can leave out the explanations. But you MUST be able to put them back in upon demand. Any other way of doing things is WRONG!
  • 15. The Rules of Inference I Given the statement: All A is B And the statement: All B is C We conclude: Therefore All A is C. This is a correct inference. Example: All cows are animals, all animals are living beings, therefore all cows are living beings.
  • 16. The Rules of Inference II Given All A is B We conclude that Some B is A. Example, All Cows are Animals, therefore some Animals are Cows. An incorrect inference: Given All A is B, to conclude that All B is A. After all, not all animals are cows.
  • 17. The Rules of Inference III Given Some A is B, and Some B is C, what can we conclude? Nothing. Example: Some Cows are Jerseys, Some Jerseys are human. (Here we are to interpret the word “Jersey” as “Things that come from Jersey, an island in the English Channel.”
  • 18. The Rules of Inference IV Given Some A is B, we can conclude that Some B is A. Some cows are Jerseys, some Jerseys are cows.
  • 19. The Rules of Inference V Given Some A is B and All B is C, We conclude: Some A is C. Example: Some cows give milk, All things that give milk are female. Therefore: some cows are female.
  • 20. The Rules of Inference VI Given All A is B, and Some B is C, what can we conclude? Nothing. Example: All cows are animals. Some animals are birds. No conclusion is possible.
  • 21. Quantifiers A statement such as “All A is B” is said to be “Universally quantified.” In other words, it is a universal statement that applies to all A. A statement such as “Some A is B” is said to be “Existentially quantified.” In other words, there exists at least one A to which the statement applies.
  • 22. Negative Statements The only permissible form for the universal negative is: No A is B. (Accept no substitutes!) The existential negative has several forms, Not all A is B, Some A is not B, and many others. Mathematical statements may require somewhat greater precision than general statements. (See below)
  • 23. Negating Statements An existential negates a universal, and an universal negates an existential. The negation of “All A is B” is “Some A is not B” The negation of “Some A is B” is “No A is B” The two statements “Some A is B” and “Some A is not B” can both be true.
  • 24. Mathematical Quantifiers I Mathematical statements need to be somewhat more precise than “All Cows are Animals.” All mathematical statements are quantified, but sometimes, quantifiers are understood. Example: prove that (x+1)2=x2+2x+1. The universal quantifier “For all x” is understood.
  • 25. Mathematical Quantifiers II A proposition is a statement that can be assigned the value True or False. “All Cows Eat Grass,” “All Cows are Ducks,” and “All multiples of 10 end in 0” are examples of propositions. Statements such as “good weather,” “return 25 to the printout” and “I fit new blue” are not propositions.
  • 26. Mathematical Quantifiers III Assume that P is a proposition containing the variable x. We sometimes denote P as P(x) to indicate it contains the variable x. xP is read “For all x P” xP is read “There exists an x such that P” In both cases, we read out P, we don’t just say “P”.
  • 27. Mathematical Quantifiers IV Practice with these: x (x+1)2=x2+2x+1 x x<5 As in ordinary logic, a universal negates an existential, and an existential negates a universal.
  • 28. The Rules of Inference VII X and Y are equal (X=Y) if X and Y are names for the same thing. If a statement P(X) containing X is true, and X=Y then the statement P(Y) obtained by substituting Y for X is also true. If P(X) is quantified, and X appears in the quantifier, then Y must appear in the quantifier of P(Y)
  • 29. The Rules of Inference VIII If the statement x P(x) is known to be true, and k is within the domain of discourse of P, then P(k) is true. Example: x (x+1)2=x2+2x+1. The domain of discourse is all real numbers. 15.7 is a real number, so (15.7+1)2=15.72+2*15.7+1 is true.
  • 30. Rules of Inference IX Example II: x (x+1)2=x2+2x+1 “Toothpicks” is outside the domain of discourse of (x+1)2=x2+2x+1. We cannot say that (“Toothpicks”+1)2= “Toothpicks” 2+2 “Toothpicks”+1 is true. This statement is not a proposition and is neither true nor false.
  • 31. Rules of Inference X If the statement x P(x) is known to be false, and k falls within the domain of discourse of P, then P(k) is false. Example: x 5<x<4 The domain of discourse is all real numbers. 4.5 is a real number, so 5<4.5<4 is false.
  • 32. Negating Quantified Statements Negate: x (x+1)2=x2+2x+1 Result: x (x+1)2x2+2x+1 Negate: x x<5 Result: x x5 By the law of the excluded middle, if a statement is true, its negation is false, and vice-versa.
  • 33. Logical Connectives I If P is a proposition P is its negation. P is read “Not P.” Do not confuse this mathematical connective with the general statement “Not All A is B”. They are not the same thing. Sometimes P is written P’ or P.
  • 34. Logical Connectives II If P and Q are propositions, PQ is called the conjunction of P and Q and is read P AND Q. If P and Q are propositions, PQ is called the disjunction of P and Q and is read P OR Q. If P and Q are propositions, PQ is called the implication of P and Q and is read IF P THEN Q.
  • 35. Truth Tables for Connectives P Q PQ PQ PQ True True True True True True False False True False False True False True True False False False False True
  • 36. Implications The most interesting connective is the implication PQ, which can also be written PQ. If P is False, then the entire statement is true. That is, “A False Statement Implies Anything.” An implication is proven by assuming that P is true and then showing that, in that case, Q must also be true.
  • 37. Implications II Given a statement S of the form PQ, the statement QP is called the Converse of S. The Converse of S is an independent statement that must be proven independently of S. S can be true and its converse can be false and vice versa. They could both be true or both be false.
  • 38. Implications III Given a statement S of the form PQ, the statement Q P is called the Contrapositive of S. A statement and its contrapositive are logically equivalent. Either both are true or both are false. The statement P Q is the Inverse of S. The inverse of S is logically equivalent to the converse of S.
  • 39. Proven Implications Once an implication has been proven, we use a special symbol to designate the implication. The notation PQ is read “if P then Q” and also says that the P=T, Q=F case never occurs. In other words, that the implication is always true.
  • 40. If and Only If A statement of the form P if and only if Q is shorthand for (if P then Q) and (if Q then P). In symbols we express this as PQ. Once the statement has been proven we rewrite the statement as PQ. To prove PQ, we must prove both of PQ and QP.
  • 41. Negating Compound Statements (PQ) = P  Q X is less than three and X is odd X is greater than or equal to 3 or X is even (PQ) = P  Q The car was either red or green The car was not red AND it was not green (PQ) = P  Q If a person has a Ph.D. then they must be rich Prof. Maurer has a Ph.D and Prof. Maurer is poor. Note change in quantifiers.
  • 42. The Rules of Inference XI If P is known to be true, P is false, and vice versa. If PQ is true, then QP is true If PQ is true then both P and Q are true. If PQ is known to be false, and P is known to be true, then Q is false. If PQ is true, then QP is true. If PQ is false, then both P and Q are false. If PQ is known to be true, and P is known to be false, then Q is true.
  • 43. The Rules of Inference XII If PQ is known to be true, and P is true, then Q is true. If PQ is known to be true, and Q is false then P is false.
  • 44. The Rules of Inference XIII If PQ is known to be true and P is true then Q is true, and vice versa. If PQ is known to be true and P is false then Q is false, and vice versa. If PQ is known to be false and P is false then Q is true, and vice versa. If PQ is known to be false and P is false then Q is true, and vice versa.
  • 45. Logical Fallacies: The Biggie I Let’s go back to our theorem (x+1)2=x2+2x+1 and give another invalid proof. X=5, (x+1)2=(5+1)2=62=36 x2+2x+1=52+2*5+1=25+10+1=36 “Hence Proved ” What has really been proved? (See Next Slide)
  • 46. Logical Fallacies: The Biggie II This “proof” proves: x (x+1)2=x2+2x+1 But the theorem was: x (x+1)2=x2+2x+1 For the preceding to be a proof, the following implication would have to be true for all propositions P xP x P
  • 47. Logical Fallacies: The Biggie III Is xP x P true for all P? Here is a capital letter A: A This capital A is red. For the implication to be true, ALL capital A’s would have to be red. But this one isn’t: A
  • 48. Logical Fallacies: The Biggie IV Most students have a hard time understanding this. It is not the calculations that are incorrect in the “proof” given above. It is the Inference that is wrong! If an inference technique can be used to prove silly nonsense (all capital A’s are red), then it cannot be used to prove anything true.
  • 49. Logical Fallacies: The Biggie V When you are asked to prove something in a class, it is generally something that is well-known to be true. Your proof isn’t supposed to derive a new truth. Your proof is supposed to demonstrate that you know how to apply the rules of inference correctly.
  • 50. Logical Fallacies: The Biggie VI Question: You run your program P on X number of inputs and observe that condition C is true on all these inputs. Does this prove that condition C is true on ALL inputs? Answer: No Repeat Answer: No Repeat Answer Again: No, No, No, No
  • 51. Logical Fallacies: The Biggie VII Testing a program cannot prove anything. There is no such thing as “proof by example” That is: examples can be used to prove existential statements, but cannot be used to prove universal ones. This is an inductive fallacy known as: Hasty Generalization
  • 52. Other Logical Fallacies I Appeal to Authority: “But that’s what it says in the book!” Usually a lie. If the book has the wrong answer And you copy the answer onto your test Then your answer is: WRONG!
  • 53. Other Logical Fallacies II Non Sequitur: Squaring something is a more powerful operation than adding something, so (x+1)2 can’t possibly equal x2+1, therefore we have to add 2x to offset the power of the squaring operation. The truth of (x+1)2=x2+2x+1 does not follow from this argument. You must use the axioms of the real numbers
  • 54. Other Logical Fallacies III Ad Ignorandum (appeal to ignorance): We certainly cannot prove it false that (x+1)2=x2+2x+1. Or alternatively: Why shouldn’t it be true that (x+1)2=x2+2x+1? An inability to prove the falsity of something does not imply that it is true. You cannot assert whatever you want and then defy the world to prove it false. You must prove your statements to be true.
  • 55. Other Logical Fallacies IV Assuming the converse: If this square root function is correct then it will compute the square root of 4 to be 2. This square root function computes the square root of 4 to be 2, therefore it is correct. See next slide for the code of this function.
  • 56. Other Logical Fallacies V float SquareRoot(float x) { return 2.0; } Given a true statement of the form “if P then Q,” the truth of P proves the truth of Q. However, the truth of Q does not prove the truth of P.
  • 57. Other Logical Fallacies VI Assuming the Inverse: If a number n is prime and greater than 2 then it must be odd. This number is greater than two, but it is not prime. Therefore, it can’t be odd. The number is 9.
  • 58. Other Logical Fallacies VII Given a true statement of the form “If P then Q:” The falsity of Q proves the falsity of P. However, the falsity of P does not prove the falsity of Q. Since the converse is logically equivalent to the inverse, assuming the inverse and assuming the converse are the same fallacy.
  • 59. Proving Things, In General Take stock of your resources. These are the things that are known to be true. The given elements of the problem Axioms Proven Theorems Use your tools to derive the result from your resources. Your tools are your rules of inference.
  • 60. Proving If-Then Statements For a statement of the form If P then Q, add P to your resources. P is assumed to be true. You must use the rules of inference to derive Q from your resources.
  • 61. Inductive Proofs Suppose P(n) is a statement about integers. (It must be about integers.) To prove that P(n) is true, you must prove P(0) and the statement “if P(n) then P(n+1)” The axioms of the integers state that “There is an integer 0.” and “Every integer n has a successor n+1”
  • 62. Complete Induction Complete induction is weaker than normal induction, because it does not use the axioms of the integers directly. For complete induction you must prove P(0) and the statement “if P(k) for all k<n then P(n)”
  • 63. Disproving Things I A disproof of a statement is the same as proving the negation of the statement. Disprove: No even integer is prime. “2 is prime.” One counterexample is sufficient to disprove a universally quantified statement.
  • 64. Disproving Things II Disprove: All odd integers are prime. “9 is odd and is not prime” One counterexample is sufficient. Disprove: There is an even integer greater than 2 which is prime. Proof: if x is an even integer it must be of the form 2k for some integer k (by definition). (continued on next slide)
  • 65. Disproving Things III Since x>2 we have 2k>2. Canceling the 2s (inverse law of multiplication) we get k>1. Since x=2k, and k>1, x is composite, and cannot be prime. Therefore if x is an even number greater than 2, it cannot be prime. Disproving an existential requires proof of a universal