Logic and Proofs 1. 1 Overview. 2 Sentential Connectives. John Nachbar Washington University December 26, 2014

Similar documents
A Little Deductive Logic

A Little Deductive Logic

Introducing Proof 1. hsn.uk.net. Contents

Manual of Logical Style

Chapter 1 Elementary Logic

Supplementary Logic Notes CSE 321 Winter 2009

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

Propositional logic (revision) & semantic entailment. p. 1/34

The statement calculus and logic

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Introduction to Metalogic

Proof strategies, or, a manual of logical style

MATH 135 Fall 2006 Proofs, Part IV

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

8. Reductio ad absurdum

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Manual of Logical Style (fresh version 2018)

GÖDEL S COMPLETENESS AND INCOMPLETENESS THEOREMS. Contents 1. Introduction Gödel s Completeness Theorem

Propositional Logic: Part II - Syntax & Proofs 0-0

4 Derivations in the Propositional Calculus

Truth-Functional Logic

3 The Semantics of the Propositional Calculus

Formal Logic. Critical Thinking

Propositional Logic. Fall () Propositional Logic Fall / 30

8. Reductio ad absurdum

A Guide to Proof-Writing

Mathematical Writing and Methods of Proof

Lecture 7. Logic. Section1: Statement Logic.

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Logic, Sets, and Proofs

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On

Propositional Logic Review

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Writing Mathematical Proofs

Meaning of Proof Methods of Proof

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

THE LOGIC OF COMPOUND STATEMENTS

Math 10850, fall 2017, University of Notre Dame

15414/614 Optional Lecture 1: Propositional Logic

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

02 Propositional Logic

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

The Process of Mathematical Proof

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

FORMAL PROOFS DONU ARAPURA

Homework assignment 1: Solutions

For all For every For each For any There exists at least one There exists There is Some

Gödel s Incompleteness Theorems

Proof Techniques (Review of Math 271)

Learning Goals of CS245 Logic and Computation

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Lecture 5 : Proofs DRAFT

- 1.2 Implication P. Danziger. Implication

18.S097 Introduction to Proofs IAP 2015 Lecture Notes 1 (1/5/2015)

Math 38: Graph Theory Spring 2004 Dartmouth College. On Writing Proofs. 1 Introduction. 2 Finding A Solution

EECS 1028 M: Discrete Mathematics for Engineers

Introduction to Metalogic 1

Some Review Problems for Exam 1: Solutions

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

1.1 Statements and Compound Statements

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

Reading and Writing. Mathematical Proofs. Slides by Arthur van Goetham

3 The language of proof

Proofs. Chapter 2 P P Q Q

Handout: Proof of the completeness theorem

THE LOGIC OF COMPOUND STATEMENTS

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

5. And. 5.1 The conjunction

CHAPTER 11. Introduction to Intuitionistic Logic

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

Mat 243 Exam 1 Review

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Section 1.1: Logical Form and Logical Equivalence

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Logic. Propositional Logic: Syntax

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

CHAPTER 2. FIRST ORDER LOGIC

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

1.1 Language and Logic

Logic Overview, I. and T T T T F F F T F F F F

CIS260 Mathematical Foundations of Computer Science Some Notes

MATH10040: Chapter 0 Mathematics, Logic and Reasoning

Classical Propositional Logic

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Proofs. Chapter 2 P P Q Q

Elementary Linear Algebra, Second Edition, by Spence, Insel, and Friedberg. ISBN Pearson Education, Inc., Upper Saddle River, NJ.

Logic. Propositional Logic: Syntax. Wffs

MAGIC Set theory. lecture 1

LECTURE 1. Logic and Proofs

5. And. 5.1 The conjunction

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Lecture Notes on Inductive Definitions

Transcription:

John Nachbar Washington University December 26, 2014 Logic and Proofs 1 1 Overview. These notes provide an informal introduction to some basic concepts in logic. For a careful exposition, see, for example, Enderton (2000). 2 Sentential Connectives. Formal logical statements are built up out of sentential connectives such as and and implies and quantifiers such as there exists. To understand the mathematical meaning of the sentential connectives, it is useful to characterize them in terms of truth tables. I begin with not, which I sometimes write as. The idea is to assign to some statement α the value T (true) or F (false) and then see how not changes that value. α α T F F T Next comes or. α β α or β T F T F T T F F F Informally, α or β is true if and only if either α or β is true. Note that this is the inclusive or: the answer to coffee or tea? could be, both. Next comes and. α β α and β T F F F T F F F F Informally, α and β is true if and only if both α and β are true. 1 cbna. This work is licensed under the Creative Commons Attribution-NonCommercial- ShareAlike 4.0 License. 1

Next comes, which is a symbol for implies. α β α β T F F F T T F F T Informally, α implies β is true unless α is true and β is false. 2 In everyday usage, α implies β means the same thing as if α then β and α only if β. Note the last. α if β is the informal version of β α, not of α β. Finally, consider, which is the symbol for if and only if. α β α β T F F F T F F F T Informally, α if and only if β is true if and only if α and β are either both true or both false. I typically abbreviate if and only if to iff. 3 Tautologies. A tautology is a statement that is always true, regardless of the truth assignment of its constituent parts. Using the previous truth tables as building blocks, it is easy to show that (α β) (( β) ( α)) is a tautology. This particular tautology says that α β is equivalent to its contrapositive ( β) ( α). α β α β β α β α (α β) (( β) ( α)) F F T T T F F T F F T F T T F F F T T 2 Note that α β is true whenever α is false. Mathematics, in effect, takes the position that α β is true until proven false. If α is true and β is false then α β is certainly false. If α is false, however, then we cannot test α β and so we continue to treat it as true. In practice, any possible discrepancy between everyday language and mathematical usage tends to be moot. One is typically interested in the truth of α β only when one knows that α is true. 2

4 Quantifiers. The symbols ( for all or for every ) and ( there exists ) are quantifiers. There are a number of important subtleties involving quantifiers. The first subtlety is that, in the math that we will be using, a sentence is well formulated only if every variable is bound by a quantifier. In practice this means the following. In English one can say, Cats are black. This is not well formulated, because no quantifier has been specified for cats. A properly formulated sentence would read For every cat, the cat is black (i.e., all cats are black) or There exists a cat such that the cat is black (i.e., there is at least one black cat). One can also formulate sentences that mean, At least 50% of cats are black; I won t torment you with the details about how to do this. Note that if a variable is not bound by a quantifier then the sentence is ambiguous, and may be neither true nor false. We are trying to avoid ambiguity. A second subtlety is that x is equivalent to not x not. For example, the statement that every cat has fleas is equivalent to the statement that there is no cat without fleas. Similarly, x is equivalent to not x not. In fact, for formal mathematics, we only need one quantifier, say, and we define the other quantifier using the above expressions. We use both quantifiers for convenience. These equivalences come into play when we have to deal with negation, which arises frequently in proofs. For example, not x is equivalent to not not x not, which in turn is equivalent to x not. Thus, the statement that it is not true that every cat has fleas is equivalent to the statement that there is a cat that does not have fleas. Similarly, not x is equivalent to x not. For example, the statement that, there does not exist a cat such that the cat weighs as much as the earth is equivalent to the statement that for every cat, the cat does not weigh as much as the earth. More generally, when one takes a negation, then the negation cascades through the quantifiers, flipping and, and adding a not at the end. For example, negating x y z yields x y z not. Make sure you understand why. Finally, the order of quantifiers can matter. In particular, consider the two claims y x P (x, y) and x y P (x, y), where P (x, y) is some statement about x and y. In the first, the claim is that P (x, y) can hold for every y, but I can choose different x for different y. In the second, the claim is still that P (x, y) can hold for every y, but now there must be an x such that P (x, y) holds for the same x for every y. For example, consider the statement, For every cat c, there is a flea f such that f is on c. More colloquially: every cat has fleas. Reversing the quantifiers radically changes the meaning, There exists a flea f such that for every cat c, f is on c. 3

Note that in this statement, it is the same flea that is simultaneously on every cat. A common error is to reverse the order of quantifiers without realizing it. In everyday English, it is sometimes possible to reverse quantifiers without changing the listener s (or reader s) interpretation, because the listener effectively corrects your mistake by choosing the interpretation that makes the most sense. For example, if you say there is a flea on every cat, you will usually be understood to mean the first statement above and not the second. But in formal mathematics, we want the ability to have our statements interpreted exactly as written, to avoid ambiguity and to enable us to express ideas that may at first seem counterintuitive. But for this to work, we must be extremely careful with the order of quantifiers. And even in everyday English, it is a good idea to get the order of quantifiers correct. 5 Proofs. Modus ponens ( method of affirming ) states: if α is true and if α β is true, then I deduce that β is true. You may view this as a definition of what deduce means. The idea behind modus ponens is that words like deduce belong to the language of ordinary mathematics, not to the special language of logic. Thus, modus ponens provides a bridge between a formalism and the formalism s intended meaning. In particular, modus ponens captures the meaning implicit in the tautology (α and (α β)) β. I use the symbol, instead of, to indicate implication in the ordinary mathematical sense, with modus ponens implicit. In mathematics, a proof is a finite string of applications of modus ponens. Starting with a set of statements that I assume to be true, I use modus ponens to make a sequence of deductions, ultimately establishing the truth of whatever it is that I was trying to show. Each step is mechanical, making the proof easy, in principle, to verify. (In practice, people often skip steps, which can make proofs difficult to follow. Also, even when the proof is easy to follow, constructing it in the first place may take great ingenuity.) I refer to such proofs as deductive proofs. In practice, it is common to encounter arguments that are non-deductive but equivalent to deductive arguments. This is not a logical issue (the equivalence with deductive proof means that there is no logical issue) but something to do with the way that human beings think. There are two common forms of non-deductive argument that I use. In a proof by contraposition, one proves that α β by showing instead that ( β) ( α). The contraposition tautology that I demonstrated above can be used to show that any proof by contraposition can be transformed into a straight deductive proof. As an example of proof by contraposition, one way to prove that every closed set contains all its limit points is by showing that if a set does not contain all its limit points then it is not closed. 4

In a proof by reductio ad absurdum (reducing to absurdity; RAA), one proves that some statement is true by showing that if it were false then it would imply a logical inconsistency, meaning something of the form β and β. The inconsistency β β works equally well. One can show that any proof by RAA can be transformed into a straight deductive proof. The underlying logic of RAA is expressed by the tautology ( α (β and β)) iff α. Informally, note that β and β is always false, regardless of the truth of β. Therefore, α (β and β) is true (given the truth table for ) iff α is false, and hence iff α is true. The standard proof that 2 is irrational is RAA. One argues that if 2 were rational, then (1) 2 could be expressed as an irreducible fraction (because it is a theorem of Number Theory that any rational number can be written as an irreducible fraction) but (2) one can also show by direct argument that 2 cannot be expressed as an irreducible fraction. Thus, if 2 were rational, then it both can and cannot be expressed as an irreducible fraction. Hence by RAA, 2 is not rational. I personally tend to find proof by RAA confusing and favor deduction or contraposition, but I concede that RAA proofs are sometimes useful. In my notes on Set Theory, for example, I give an RAA proof of the fact that there is no set of all sets. A somewhat related point is that it is common to see proofs by contradiction. In practice, proof by contradiction is usually either a disguised proof by contraposition or a disguised proof by RAA. For example, it is common to see the proof of the irrationality of 2 written in the form: if 2 is rational then put it in irreducible form; but 2 cannot be put in irreducible form, a contradiction; therefore 2 is not rational. I strongly encourage you to avoid using proof by contradiction. Proof by contradiction tends to obscure the underlying logic and it encourages error (probably in part precisely because it obscures the underlying logic). Fortunately, it is usually easy to rewrite a proof by contradiction (provided it is actually correct) as a clean proof by contraposition or RAA, and you should do so. Remark 1. I am using the term RAA in a very specific way that is somewhat nonstandard. It is more common to see the term RAA used as a synonym for proof by contradiction. One last style of proof that you may have encountered is proof by induction. These are proofs in which one shows that a statement is true for all n {1, 2,... } by showing that it is true for n = 1 and then showing that if it is true for any n then it is also true for n + 1. For example, this is the standard way of showing that 1 + 2 + + n = n(n + 1)/2, for all n {1, 2,... }. Induction proofs are actually standard deduction proofs. The induction part of the proof is simply a deduction based on a theorem of Set Theory. 5

6 Theories and Axioms. A theory is a collection of sentences T with the property that if the sentences in T logically imply a sentence σ then σ is also in T. A trivial example of a theory is the set of all sentences. This theory is not particularly interesting because it is inconsistent: if σ is in T then also σ is in T. This is something one would like to avoid. A theory T is axiomatizable if there is a decidable set of sentences Σ such that σ is in T if and only if Σ logically implies σ. In particular, every sentence in Σ is a sentence in T. I will not formalize here what decidable means. Informally, it means that if you give me a sentence α, then I have some systematic procedure for determining, in finite time, whether α is in Σ. A finite set is certainly decidable but many infinite sets are as well. If T is axiomatizable, then Σ are the axioms of T. Typically, a theory T will have more than one possible axiomatization. The idea behind axiomatization is to represent a theory, typically a huge object, in a form that is manageable. If a theory is axiomatized, then one can, in a sense, give someone a full description of the theory simply by transmitting the axioms, typically a much easier task than transmitting the full list of all sentences in the theory. I will be exhibiting for you a particular axiomatized theory, Set Theory. References Enderton, H. B. (2000): A Mathematical Introduction to Logic. Academic Press, New York. 6