Harvard University, Math 101, Spring 2015

Similar documents
Handout #1: Mathematical Reasoning

Math 3000 Section 003 Intro to Abstract Math Homework 2

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

DISCRETE MATH: LECTURE 3

Basic Proof Techniques

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Boolean Algebra Part 1

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

6.080/6.089 GITCS Feb 12, Lecture 3

3. Mathematical Induction

INTRODUCTORY SET THEORY

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

Properties of Real Numbers

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Vocabulary. Term Page Definition Clarifying Example. biconditional statement. conclusion. conditional statement. conjecture.

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Binary Adders: Half Adders and Full Adders

Logic in Computer Science: Logic Gates

Continued Fractions and the Euclidean Algorithm

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

Computing exponents modulo a number: Repeated squaring

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Mathematical Induction

Logic in general. Inference rules and theorem proving

Boolean Design of Patterns

Beyond Propositional Logic Lukasiewicz s System

BOOLEAN ALGEBRA & LOGIC GATES

So let us begin our quest to find the holy grail of real analysis.

Notes on Determinant

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Full and Complete Binary Trees

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.

Understanding Logic Design

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Incenter Circumcenter

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

If n is odd, then 3n + 7 is even.

The Mathematics of GIS. Wolfgang Kainz

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Cartesian Products and Relations

CHAPTER 7 GENERAL PROOF SYSTEMS

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

8 Primes and Modular Arithmetic

CS510 Software Engineering

Factoring Polynomials

Conjunction is true when both parts of the statement are true. (p is true, q is true. p^q is true)

PYTHAGOREAN TRIPLES KEITH CONRAD

Logic Appendix. Section 1 Truth Tables CONJUNCTION EXAMPLE 1

Lecture 16 : Relations and Functions DRAFT

Examination paper for MA0301 Elementær diskret matematikk

Rules of Inference Friday, January 18, 2013 Chittu Tripathy Lecture 05

3. Logical Reasoning in Mathematics

Mathematics Review for MS Finance Students

Switching Algebra and Logic Gates

MAT Program Verication: Exercises

Solutions for Practice problems on proofs

Mathematical Induction. Lecture 10-11

The last three chapters introduced three major proof techniques: direct,

Math 223 Abstract Algebra Lecture Notes

4.5 Finite Mathematical Systems

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Notes on Factoring. MA 206 Kurt Bryan

Math 319 Problem Set #3 Solution 21 February 2002

196 Chapter 7. Logical Agents

Introduction to Logic: Argumentation and Interpretation. Vysoká škola mezinárodních a veřejných vztahů PhDr. Peter Jan Kosmály, Ph.D

Congruent Number Problem

Applications of Fermat s Little Theorem and Congruences

8 Square matrices continued: Determinants

SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me

Zero: If P is a polynomial and if c is a number such that P (c) = 0 then c is a zero of P.

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

Resolution. Informatics 1 School of Informatics, University of Edinburgh

Regular Languages and Finite Automata

Reasoning and Proof Review Questions

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Theorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive

Introduction. Appendix D Mathematical Induction D1

Quotient Rings and Field Extensions

Lectures notes on orthogonal matrices (with exercises) Linear Algebra II - Spring 2004 by D. Klain

26 Integers: Multiplication, Division, and Order

Linear Codes. Chapter Basics

5.1 Radical Notation and Rational Exponents

Unit 3 Boolean Algebra (Continued)

First-Order Logics and Truth Degrees

(0, 0) : order 1; (0, 1) : order 4; (0, 2) : order 2; (0, 3) : order 4; (1, 0) : order 2; (1, 1) : order 4; (1, 2) : order 2; (1, 3) : order 4.

Circuits and Boolean Expressions

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Chapter 1. Use the following to answer questions 1-5: In the questions below determine whether the proposition is TRUE or FALSE

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

Transcription:

Harvard University, Math 101, Spring 2015 Lecture 1 and 2 : Introduction to propositional logic 1 Logical statements A statement is a sentence that is either true or false, but not both. Some examples: 1. 1 is smaller than 2 2. 7 is an odd number 3. 2 is a rational number 4. x N (1) and (2) are true statements while (3) is a false statement and (4) is not a statement since its validity depends on an unspecified variable x. 2 Logical operators A logical operator or a Boolean operator is a function that takes as entries one or several statements and returns another statement. In propositional logic, we use propositional variables that we will denote by roman letters such as a, b, p, q, and s. A formula consists of propositional variables connected by logical operators. A valuation is a function that attached to each propositional variable either 1 for truth or 0 for falsity. We can define a logical operator by the values it takes for all possible valuations of its entries. Such valuations are organized in a truth table. Two logical operators are equivalent when they have the same truth table. 2.1 The negation: the NOT operator The negation (the NOT operator) is a unary operator 1 that takes a statement and returns its negation. We denote the negation of a statement p by p or p. Given a statement p, p is true if p is false, and p is false if p is true. This is summarized in the following truth table: p p 0 1 1 0 2.2 The conjunction : the AND operator The AND operator is a binary operator 2 that is true if and only if both of its entries are true. It is defined by the following table: 1 A unary operator is an operator with only one entry. 2 A binary operator is an operator with two entries. p q p q 0 1 0 1

2.3 The (inclusive) disjunction: the OR operator The OR operator is a binary operator that is true if and only if at least one of its entries is true. It is false if and only if both of its entries are false. It is defined by the following table: p q p q By comparing tables, we can prove that the OR operator can be expressed in terms of the AND and NOT operator. More precisely, we have the p q p q. To prove this theorem, we need to show that p q has the same truth table as p q. This is indeed the case. To compute the truth table of p q, we starts by enumerating all the possible valuations for p and q, we can then compute those of p and q and finally compute those of p q: p q p q p q 1 1 1 1 0 1 0 0 We can also prove the following dual statement: Proof. : p q p q. p q p q p q p q 1 1 1 0 0 1 The last two columns are the same, which shows that p q p q.. 2.4 The implication: the If...Then... operator The If...Then... operator is a binary operator that is false if and only if the first entry is true while the second entry is false. It is defined by the following table: p q p = q 0 0 1 2

We can show that (p = q) p q. Proof. p q p q p = q p q 1 1 1 0 1 1 0 0 1 The last two columns are the same, which establishes the equivalence. The statement p = q is also called a conditional statement. From that point of vue p is called the hypothesis and q is the conclusion or implication. Given the conditional statement p = q, q = p is called the converse of p = q p = q is called the inverse of p = q q = p is called its contrapositive of p = q We will see that a conditional statement is equivalent to its contrapositive while its converse is equivalent to its inverse. However, the conditional statement is usually not equivalent to its converse. 2.5 Equivalence : the If and Only If operator The equivalence operator is a binary operator that is false if the two entries have different truth values. It is defined by the following truth table: p q p q 0 1 0 0 0 1 We can show that (p q) (p = q) (q = p). or equivalently (p q) (p q) (q p). The equivalence symbol is actually not necessary since it is exactly the same as the operator. 2.6 The Exclusive disjunction: the XOR operator The exclusive disjunction is true if and only if the two entries have different valuation: p q p + q 1 1 0 3

We can show that it is the negation of the equivalence operator: p + q p q. 3 Basic properties of logical operators Summary of the truth tables Negation of logical operators: p q p q p q p = q p q p + q 0 1 0 0 p p p q p q p q p q p = q p q p q (p q) p + q Indempotence Simplifications Distributivity: Associativity: p p p p p p p 1 p p 0 p (1 = p) p (p = 0) p a (b c) (a b) (a c) a (b c) (a b) (a c) Commutativity a (b c) (a b) c a (b c) (a b) c p q q p p q q p p + q q + p p q q p The following theorems are also very handy to replace implications by a combination of NOT, OR, and AND operators: (p = q) p q (p q) (p = q) (q = p) (p q) (p q) 4

4 Tautologies A tautology is a formula that is always true. A contradiction is the negation of a tautology. A simple way to construct a tautology is to start from an equivalence a b and to replace the symbol by the operator. We now review a list of famous tautologies: The law of double negation: p p This is just the statement that the negation is an involutive operator (it squares to the identity). The law of excluded middle: p p The law of excluded middle reflects the fact that a propositional variables always have a well defined truth values, it is either true or false. The law of contraposition: (p = q) (q = p) The law of contraposition is often used in mathematical proof: to prove that p implies q it is sometimes easier to prove that q implies p. Dualities or de Morgan s laws: Syllogism: p q p q p q p q (a = b) (b = c) = (a = c) The syllogism is essentially the statement that the implication operator = is transitive. Proof by cases: (a b) (a = c) (b = c) = c If one of a or b is true and each implies c, then c is necessary true. Reductio ad absurdum: (p = q) (p = q) = p. This is a common procedure in mathematical proofs. To show that p is true, we can show that its negation implies both a proposition q and its negation q. Since q and q cannot be true at the same time, it follows that p has to be false, and therefore p is true. Modus ponens If q is true and p implies q, then q is true. p (p = q) = q 5

5 Boolean algebra We introduce the set Z 2 of integers modulo 2. As a set it is composed of only two elements: Z 2 = {0, 1}. The element 0 represents all the even integers and 1 to all the odd integers. Addition and multiplications are defined by the following tables: + 0 1 0 0 1 1 1 0 0 1 In particular 1 + 1 = 2 but since we are in Z 2 and 2 is even, we have 2 = 0 and therefore 1 + 1 = 0. Since the addition and multiplication are operations that take entries in Z 2 and return an element of Z 2, we can think of them as logical operators. We can write them as truth table and notice that they correspond respectively to XOR and AND: p q p + q 1 1 0 p q p q 0 1 0 When working with Z 2, it is useful to remember the identities: a 2 a, 2a 0. The dictionary between logical and arithmetic operators is simply: a b : a b a : 1 + a a XOR b : a + b a b : a + b + a b a b : 1 + a + b a = b : 1 + a + a b Boolean algebra is very handy for proving theorems of binary propositional logic. For example, let see that p p is a tautology: p p p + p + p p (since a b = a + b + ab) p + (1 + p) + p(1 + p) (since p = 1 + p) p + 1 + p + p 2 (by distributivity) 1 + 2p (since p 2 = p in Z 2 ) 1 (since 2p = 0 in Z 2 ). We will now prove the Modus Ponens p (p = q) = q using the arithmetic of Z 2. The first step is to translate it into an arithmetic expression in Z 2 and the second step is to prove that the expression we find is equal to 1. 6

Since (p = q) 1 + p + pq, and is just multiplication in Z 2, we have (p ) (p = q) = q p(1 + p + pq) = q 1 + p(1 + p + pq) + p(1 + p + pq)q 1 + p + p 2 + p 2 q + pq + p 2 q + p 2 q 1 + p + p + pq + pq + pq + pq (since p 2 = p in Z 2 ) 1 (since 2p = 0 and 4pq = 0 in Z 2 ) Since (a = b) = 1 + a + ab 7