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

Similar documents
Logic and Propositional Calculus

Logic and Propositional Calculus

2-4: The Use of Quantifiers

Chapter 1 Elementary Logic

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

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

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

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.

Proofs. Joe Patten August 10, 2018

1.1 Statements and Compound Statements

Definition 2. Conjunction of p and q

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

1.1 Language and Logic

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

LECTURE 1. Logic and Proofs

Predicates, Quantifiers and Nested Quantifiers

1 Propositional Logic

1.1 Language and Logic

Practice Test III, Math 314, Spring 2016

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Logic. Propositional Logic: Syntax. Wffs

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Logic. Propositional Logic: Syntax

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

The statement calculus and logic

Introducing Proof 1. hsn.uk.net. Contents

Propositional Logic and Semantics

MA103 STATEMENTS, PROOF, LOGIC

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

Introduction to Metalogic 1

3 The Semantics of the Propositional Calculus

Seminaar Abstrakte Wiskunde Seminar in Abstract Mathematics Lecture notes in progress (27 March 2010)

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

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

MTH 299 In Class and Recitation Problems SUMMER 2016

Propositional Logic: Syntax

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

Chapter 1. Logic and Proof

Propositional Logic Not Enough

It rains now. (true) The followings are not propositions.

Logic, Sets, and Proofs

Gödel s Incompleteness Theorems

Section 3.1: Direct Proof and Counterexample 1

1 Differentiability at a point

Introduction to Sets and Logic (MATH 1190)

3 The language of proof

Completeness for FOL

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

Chapter 2: The Logic of Quantified Statements

Manual of Logical Style

Introduction to Metalogic

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

Part I: Propositional Calculus

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

Propositional Logic. Spring Propositional Logic Spring / 32

Math 10850, fall 2017, University of Notre Dame

Supplementary Logic Notes CSE 321 Winter 2009

A Guide to Proof-Writing

- 1.2 Implication P. Danziger. Implication

Discrete Mathematics and Its Applications

THE LOGIC OF COMPOUND STATEMENTS

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

Mat 243 Exam 1 Review

Proof strategies, or, a manual of logical style

A Little Deductive Logic

Formal Logic. Critical Thinking

A Little Deductive Logic

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

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Manual of Logical Style (fresh version 2018)

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

4.1 Real-valued functions of a real variable

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

III. Elementary Logic

CS 2800: Logic and Computation Fall 2010 (Lecture 13)

The Converse of Deducibility: C.I. Lewis and the Origin of Modern AAL/ALC Modal 2011 Logic 1 / 26

HOW TO CREATE A PROOF. Writing proofs is typically not a straightforward, algorithmic process such as calculating

HANDOUT AND SET THEORY. Ariyadi Wijaya

First Order Logic: Syntax and Semantics

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Axiomatic systems. Revisiting the rules of inference. Example: A theorem and its proof in an abstract axiomatic system:

Chapter 4. Basic Set Theory. 4.1 The Language of Set Theory

Basic Logic and Proof Techniques

1 Predicates and Quantifiers

CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:

1 The Foundation: Logic and Proofs

Mathematical Reasoning (Part I) 1

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

CITS2211 Discrete Structures Proofs

PHIL 422 Advanced Logic Inductive Proof

Compound Propositions

Topic 1: Propositional logic

Predicate Logic. Andreas Klappenecker

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

Lecture 5 : Proofs DRAFT

Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside.

Transcription:

Logic One reason for studying logic is that we need a better notation than ordinary English for expressing relationships among various assertions or hypothetical states of affairs. A solid grounding in formal logic would make it easier for freshmen to understand the definition of continuity: The function f is continuous if, for every x in the domain of f, for every number ɛ>0there is a number δ>0such that for any number y in the domain, if y x <δ, then f(y) f(x) <ɛ. So, why isn t calculus taught that way? Probably the best reason is that logic is more abstract than the calculus itself, so students would not understand or appreciate it if college mathematics led off with it. You can t understand a solution until you first understand why there is a problem. To appreciate abstraction you first need some painful experience with the more concrete problems that it clarifies. x means For all x : Quantifiers x [x <x+x 2 + 1] (real numbers understood). x means There exists an x such that [or... for which ]: and x [x is rotten in Denmark]. You can think of open sentences such as x<x+x 2 +1 x is rotten in Denmark as being something like functions or formulas in algebra and calculus, except that the value of such a function, when something particular is plugged in in the place of x, isnot a number, but rather a truth value either True or False (or either Yes or No ). A quantifier, x or x, closes off an open sentence and turns it into a genuine sentence, which is either true or false (although we may not know which). They are very much like the definite integral and limit notations in calculus, which turn formulas into numbers: 1 0 x 2 dx and lim x 2 x 2 are particular numbers, even though the expressions representing them involve a variable, x. In calculus such a variable is often called a dummy variable ; in logic it s traditionally called a bound variable (tied to its quantifier). 1

The quantified variable stands for objects in some universe of discourse, which may be stated explicitly x [if x is a real number, then x<x+x 2 +1] or understood from context. This is just like the domain of a numerical function. (Don t think of universe in the astronomical sense.) Leading universal quantifiers are often omitted when we state identities in mathematics: x + y = y + x; (n+ 1)! = (n +1)n! If two or more quantifiers of the same type are adjacent, their order doesn t matter: x y [x + y<y+x+ 1]; y x [x + y<y+x+1]. However, the order of quantifiers of different type is extremely important. (This is the first remark in this lecture of real technical importance.) Consider, for example, the old saying Behind every successful man there is a woman. The structure of this proposition (whether or not you believe it to be true or false) is But x y [if x is a man and x is successful, then y is a woman and y is behind x]. y x [if x is a man and x is successful, then y is a woman and y is behind x] says something completely different: There is one particular woman who stands behind every man in the world! It is notorious that this point is important for the ɛ and δ in the definition of a limit: You have to know ɛ before you can choose the right δ. There is not (usually) one δ that works for all ɛ s. If two quantifiers of one type are separated by one (or more) of the other type, then they cannot be reversed: x y z is not equivalent to z y x; There is a country where behind every man there is a woman is not equivalent to There is a woman such that for every man there a country where she stands behind him. Propositional Calculus (The Logical Connectives) Letters p,q,... are used as variables standing for sentences or open sentences. The second major part of logical notation expresses how simple sentences are combined into compound ones. 2

AND: p q (same as & ). OR: p q It is easy to see that these operations are commutative and associative, so we can write things like p q r. Furthermore, each of them is distributive over the other: p (q r) is equivalent to (p q) (p r), p (q r) is equivalent to (p q) (p r). (We shall prove this with truth tables in a moment.) NOT: p ( p simplifies to p.) DeMorgan s Laws: (p q) is equivalent to p q. (p q) is equivalent to p q, There are some closely related laws for quantifiers: x [...] is equivalent to x [...], x [...] is equivalent to x [...] Note that for a finite universe, quantifiers are unnecessary they can be rewritten in terms of connectives! If the universe has only 3 elements, say a, b, c, then xp(x) is equivalent to p(a) p(b) p(c), xp(x) is equivalent to p(a) p(b) p(c). Then the action of on quantifiers follows from DeMorgan s laws. Both of these sets of laws are especially nice when there are negations on both sides: etc. ( p q) simplifies to p q, x p(x) simplifies to x p(x), Truth Tables It is convenient and standard to let 1 represent True or Yes and 0 represent False or No. Each connective can be precisely defined by telling what its truth value is for each possible truth value of its parts. 3

AND: OR: p p q 0 1 0 0 0 1 0 1 q 0 1 0 0 1 1 1 1 From these the truth tables of more complicated sentences can be deduced. [Do for both sides of one of the distributive laws.] Implication and logical equivalence We consider two more extremely important connectives (postponing the touchy question of their names): p q 0 1 : 0 1 1 : 1 0 1 p q 0 1 0 1 0 1 0 1 Observe: 1. p q says that p and q have the same truth value (either both true or both false). Therefore, if we know one, we can conclude the other. 2. p q is equivalent to (p q) (q p). 3. p q is intended to symbolize that if we know that p is true, then we can conclude that q is true. Note that the bottom line of its truth table guarantees this. 4. The most common English rendering of p q is, If p, then q. The connective is slightly subtle conceptually. Right now you may be wanting to ask: 1. What is the justification for the top line of the table? Does it make sense to say, If 2+2 = 5, then e x is a continuous function, or If 2+2 = 5, then e x is a discontinuous function.? 2. Does it make sense to say, If China is in Asia, then e x is a continuous function, when the two statements obviously have no connection with each other? 4

3. What is the difference between the single-shafted arrows (, ) and the doubleshafted arrows (, )? All these questions are related. The answer to 1 is that we want p q to be meaningful and useful when p and q are open sentences in particular, when they are inside quantified sentences: x [ If x < π 4, then sin x < 1 ]. 2 This is a true and useful theorem. It does what we want of a theorem: Whenever a number is less than π in magnitude, it enables us to conclude (correctly) that its sine 4 is less than 1 2. However, there are other numbers, such as x = π 2, for which both the hypothesis and the conclusion are false, and there are still other numbers, such as x = π, for which the hypothesis is false but the conclusion is true. We must demand that these cases be consistent with the theorem, and the connective is defined to make this so. If we changed the top line of the truth table, or left it undefined, then the theorem would become false, or indeterminate, for some of these cases. This would make the formulation of mathematical statements very cumbersome. The resolution of point 2 is similar. Propositional calculus is concerned only with the truth values of sentences, not with what they mean. There are only 2 truth values, Yes and No. In this sense all true sentences are the same, and all false ones are the same, just as all numbers 9 are the same, regardless of what things you counted to get the number 9. Therefore, to say If China is in Asia, then e x is a continuous function. is no more strange than to say The number of planets in the solar system is less than or equal to the number of states in the Union. There is no scientific law that makes the latter statement true; it is simply a fact. Now, about those arrows. In algebra, we make statements about numbers. In logic, we make statements about statements, and this creates some new conceptual complications. In the technical language of logic, the connectives and belong to the object language; they are always part of a statement under discussion. The symbols and belong to the metalanguage; they are used to talk about statements and their relationships to each other. p q q is a statement (or statement framework) that we can write down, contemplate, test with a truth table, etc. p q q is an operational principle: it says that if I am given p q as one of the premises in an argument, then I can validly conclude q. The distinction is much like that between 5

The score written on your paper is at least 90 and You made an A on the test. The statements are somehow equivalent, but they exist on different levels of meaning: one is about ink, the other is about a person. In the discussion of formal elementary logic in this chapter, where we are not allowed to assume any information except what is stated in the premises, the single-shafted and double-shafted arrows are effectively equivalent (in the same sense as the two statements about a test). (The point here is that we can t assert a single-shafted statement as a theorem in this context unless it is a tautology, not merely true because of some extraneous information about the truth of the primitive statements within it.) However, in technical discussions of advanced logical systems or scientific theories with axioms or background information that is not explicitly stated in the premises, the question of whether one statement can be logically derived from another one is not necessarily the same as whether the if then statement combining them is true according to the truth table for. For example, one would probably deny that The planet Mercury is hot China is in Asia, although is certainly true. The planet Mercury is hot China is in Asia 1. A common logical terminology: Terminology and language quirks conditional biconditional implication equivalence However, Grimaldi uses implication for conditional. Don t worry about this. 2. Much more important in practice: If p q, or x[p(x) q(x)], then one says and p is a sufficient condition for q q is a necessary condition for p (that is, if q is false, then p can t be true). Therefore, if p is both necessary and sufficient for q, then p q or x [p(x) q (x)] (and conversely the if... then in this sentence is really a!). 3. For p q we have contrapositive: q p converse: q p inverse: p q 6

The original statement and its contrapositive are logically equivalent. The converse and the inverse are equivalent, because the inverse is the contrapositive of the converse. But the original and the converse are not logically equivalent (although they may both be true (or both false) under certain circumstances). Example of 2 and 3: Recall infinite series, n=0 a n. Let p a n 0 as n, q The series converges. Then p does not imply q, but q does imply p (e.g., the harmonic series). Thus (A) Tending of the terms to 0 is a necessary condition for convergence, but not a sufficient condition. (In contrast, most of the series convergence theorems state sufficient conditions (e.g., the alternating series test or the ratio test).) (B) p q is false for the harmonic series, but its converse, q p, is true. (Of course, p q is true of all series that happen to be convergent.) If we attach a universal quantifier over all series, a {a n }, then the result a [p(a) q(a)] is false, but a [q(a) p(a)] is true. As a rule of reasoning, p q is false but q p is true. 4. It is sometimes said that the English counterpart of is IF, but this is not true in the same sense that the English counterpart of is AND. Notice that p q can be expressed as If p, then q, but that p IF q corresponds instead to q p. However, if we say p ONLY IF q, then we do get something that means p q; it says that if q is false, then p is false, which is the contrapositive of p q. A consequence of this is that p IF AND ONLY IF q is an English way of saying p q. In fact, it is the standard way of expressing equivalent conditions (usually x [p(x) q (x)] statements) in mathematical English. Often it is blackboard abbreviated to IFF. 7

5. Counterfactual conditionals: Contemplate this sentence: If the Federal Reserve had not lowered the interest rate, we would be in a recession now. Is it automatically true by the truth table for, because the Fed did lower the interest rate? That doesn t seem right. Now consider this one: If Napoleon and Julius Caesar had been contemporaries, then Napoleon would be 2000 years old by now. Let s come back to these puzzles later, if we have time. 8