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

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

Logic and Proof. Aiichiro Nakano

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

1.1 Statements and Compound Statements

ECOM Discrete Mathematics

CSC Discrete Math I, Spring Propositional Logic

Chapter 1 Elementary Logic

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

PROPOSITIONAL CALCULUS

Intro to Logic and Proofs

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

software design & management Gachon University Chulyun Kim

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

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Rules of Inference. Arguments and Validity

Readings: Conjecture. Theorem. Rosen Section 1.5

1 The Foundation: Logic and Proofs

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.

1 The Foundation: Logic and Proofs

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

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Math 3336: Discrete Mathematics Practice Problems for Exam I

Predicate Logic. Andreas Klappenecker

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Rules Build Arguments Rules Building Arguments

Logic, Sets, and Proofs

Compound Propositions

DISCRETE MATHEMATICS BA202

Logic and Proofs. (A brief summary)

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Discrete Structures for Computer Science

Review: Potential stumbling blocks

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

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

CS 2336 Discrete Mathematics

1.1 Language and Logic

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Manual of Logical Style

1.1 Language and Logic

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Chapter 1: The Logic of Compound Statements. January 7, 2008

First order Logic ( Predicate Logic) and Methods of Proof

Section 1.1 Propositions

Packet #1: Logic & Proofs. Applied Discrete Mathematics

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

Full file at

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

HANDOUT AND SET THEORY. Ariyadi Wijaya

Introduction to Sets and Logic (MATH 1190)

Chapter 4, Logic using Propositional Calculus Handout

Mat 243 Exam 1 Review

Proving logical equivalencies (1.3)

Predicate Logic & Quantification

Propositional Logic. Spring Propositional Logic Spring / 32

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Supplementary Logic Notes CSE 321 Winter 2009

Logic and Proofs. (A brief summary)

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

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

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Chapter 1, Section 1.1 Propositional Logic

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

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

Math 10850, fall 2017, University of Notre Dame

A Guide to Proof-Writing

The Logic of Compound Statements cont.

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

A. Propositional Logic

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

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.

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

2.2: Logical Equivalence: The Laws of Logic

COMP 2600: Formal Methods for Software Engineeing

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

MAT2345 Discrete Math

Section 1.2: Propositional Logic

Mathematical Reasoning (Part I) 1

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

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

STRATEGIES OF PROBLEM SOLVING

Show Your Work! Point values are in square brackets. There are 35 points possible. Tables of tautologies and contradictions are on the last page.

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

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

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Transcription:

Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical connectives are: (not), (inclusive or), (and), (implies), (if and only if). Their truth tables are: not p p T F F T or p q p q T F T F T T F F F and p q p q T F F F T F F F F implies p q p q T F F F T T F F T if and only if p q p q T F F F T F F F T A compound statement is a statement built from other statements using the basic logical connectives. The truth value of a compound statement is determined by the truth values of its component statements and the truth tables associated with the logical connectives. The converse of an implication p q is the implication q p. The contrapositive of an implication p q is the implication q p. An implication and its contrapositive are logically equivalent, meaning that they always take the same truth values. We use between statements to denote logical equivalence. A compound statement is a tautology if it always takes the truth value T. It is a contradiction if it always takes the truth value F, and it is a contingency if it is neither a tautology nor a contradiction. We use 1, 0 to denote unspecified tautologies and contradictions, respectively. statements? This statement is false no 2 + 3 = 8 yes (false, but still a statement) Atlanta is the capital of Georgia yes Don t try this at home no x + 3 = 7 no (this is a predicate, not a statement) x + y = y + x for all real numbers x and y yes Negate the following: Today is Thursday Bob is tall and he eats ice cream His shirt is black or it is a turtleneck. If you pack an umbrella it will not rain. The copier jams if and only if I am using it. Identify atomic statements, denote them by letters, and use logical connectives to symbolize. You can t ride this roller coaster if you are < 4 ft tall unless you are > 16 yrs old. The dog barks only when he is hungry. My headache is gone but my tooth hurts. Are the following tautologies, contradictions, or contingencies? p p, p p, p (p q), (p q) ( p q) Use truth tables to prove these are logically equivalent. (p q) ( p) ( q) p q ( p) q

Logic Overview, II BASIC LOGICAL EQUIVALENCES The following logical equivalences (and any substitution instances of them) can be used to formally simplify compound statements. They are also used to determine if two statements are logically equivalent, or to determine if a statement is a tautology, contradiction, or contingency. Use of these laws is an alternative to using truth tables. Truth tables are a semantic tool and logical equivalences are a syntactic tool. Both kinds of tools are commonly used in the study of logical systems. equivalence p 1 p p 0 p p 1 1 p 0 0 p p p p p p ( p) p p q q p p q q p identity laws domination laws idempotent laws double negation law commutative laws equivalence p (q r) (p q) r p (q r) (p q) r p (q r) (p q) (p r) p (q r) (p q) (p r) (p q) p q (p q) p q p (p q) p p (p q) p p p 1 p p 0 associative laws distributive laws De Morgan s laws absorption laws negation laws Use the laws to show (p ( p q)) p q. (p ( p q)) p ( p q)) de morgan p ( p q) de morgan p (p q) dble negative ( p p) ( p q) distributivity 0 ( p q) negation laws ( p q) 0 commutativity p q. identity

Logic Overview, III LOGICAL EQUIVALENCES INVOLVING AND Although the connectives,, and the above equivalences technically suffice for the logic of statements, it is much more natural (particularly in mathematics) to include and among our basic connectives, and make use of the following additional equivalences: equivalences involving p q p q elimination p q q p contrapositive (p q) p q negation (p q) r (p r) (q r) disjunctive hypothesis (p q) r (p r) (q r) conjunctive hypothesis p (q r) (p q) (p r) disjunctive consequence p (q r) (p q) (p r) conjunctive consequence equivalences involving p q (p q) (q p) p q p q p q (p q) ( p q) (p q) p q double implication biconditional inverse elimination alternation Show p q is logically equivalent to q p. Show p (q r) is not logically equivalent to (p q) r.

Logic Overview, IV PREDICATES AND QUANTIFIERS Mathematics deals with many statements involving variables, which leads us to consider a more sophisticated (and more natural) logical system beyond basic logic, known as predicate logic. A statement P (x) that involves a variable is neither true nor false when the value of the variable is not specified or quantified. We refer to such a statement as a (unary) predicate. A binary predicate has two variables, etc. A statement can be formed from a predicate by specifying the variable(s), as in P (1) or P (3). The domain from which these variables can be assigned is called the universe of discourse, and must be explicitly stated whenever predicate logic is used. Another way to form a statement from a predicate is to quantify the variable(s). There are two kinds of quantifiers, universal and existential. The universal quantification of P (x) is the statement xp (x), which asserts that P (x) is true for all values of x in the universe of discourse. The existential quantification of P (x) is the statement xp (x), which asserts that P (x) is true for some (at least one) value of x in the universe of discourse. equivalences involving quantifiers x P (x) x P (x) x P (x) x P (x) x y P (x, y) y xp (x, y) x y P (x, y) y xp (x, y) generalized De Morgan s laws commutative laws It should be noted that universal and existential quantifiers do not, in general, commute with each other. In other words, x yp (x, y) is not logically equivalent with y xp (x, y). Are the following statements true or false? x(x 3 = 1) x(( x) 2 = x 2 ) y x(x + y = 3) x y((x > 0 y < 0) xy < 0) Express the following in predicate logic. The sum of two positive integers is positive. For all ɛ > 0 there exists δ > 0 such that if 0 < x a < δ then f(x) L < ɛ. Negate and simplify. x y(xy = 1)

Logic Overview, V VALID ARGUMENTS AND RULES OF INFERENCE An argument is meant to establish the implication of a specific statement q, called the conclusion, from some set of specific assumptions p 1,..., p n, called the hypotheses. In other words, one wishes to prove that (p 1 p n ) q is a tautology. A valid argument is one in which the conclusion q must be true whenever the hypotheses p 1,..., p n are all true. To deduce a conclusion from a set of hypotheses, the following rules of inference are often used: modus ponens modus tollens disjun. syllogism chain rule resolution simplification conjunction p p q p q p q p r p q p p q q p q r q r q p q p r p q p p q When quantifiers are involved, the following additional rules of inference may be useful: universal instantiation universal generalization existential instantiation existential generalization xp (x) P (c) for an arbitrary c xp (x) P (c) for some element c P (c) xp (x) P (c) for some element c xp (x) Formulate and prove the following. A student in this class hasn t read the book. Everyone in this class passed the first exam. Therefore, someone who passed the exam didn t read the book. Solution. Let the universe of discourse be the set of all students. Let C(x) denote x is in this class. Let B(x) denote x read the book. Let P (x) denote x passed the exam. Then x(c(x) B(x)) premise C(a) B(a) for some a exist. instan. C(a) simplification x(c(x) P (x) premise C(a) P (a) universal instant. P (a) modus ponens B(a) simplification P (a) B(a) conjunction x(p (x) B(x)) exist. genrlztn

Logic Overview, VI COMMON METHODS OF PROOF A direct proof is an argument to establish an implication p q by assuming p and constructing a sequence of valid inferences that establish the statement q. An indirect proof also establishes an implication p q, but does so by way of the contrapositive: one assumes q and constructs an argument that p must follow. A proof by contradiction establishes a statement p by proving p must be false. In particular, one assumes p and shows that a contradiction arises from this assumption. A proof by cases establishes a statement q by considering a number of cases p 1, p 2,..., p n, one of which must hold, and showing that in each of these cases, p i q. A proof of equivalence of a set of statements p 1, p 2,..., p n establishes p 1 p 2 p n. One constructs, and proves, a chain of implications among the statements in such a way that it is possible to work through the chain from any statement to any other. A commonly used example of such a chain is p 1 p 2, p 2 p 3,... p n p 1. An existence proof establishes a statement of the form xp (x). There are two kinds. A constructive proof is given by providing an explicit element c and establishing P (c). A nonconstructive proof is any other proof of xp (x) that does not provide an explicit element c such that P (c). For example, one might proceed by contradiction and show that x P (x) is impossible. Mathematical theorems often assert the existence of a unique element satisfying a given predicate. For such theorems, a uniqueness proof must be supplied. That is, one must first prove the existence, as described above, but then one must also argue the uniqueness of the element under discussion. In other words, after proving xp (x), a uniqueness proof also requires that you prove x y((p (x) P (y)) (x = y)). It is worth remarking that if you are trying to argue that a universally quantified statement xp (x) is false, you need only provide a single counterexample, an element c such that P (c). Prove the following. For any integer n, if n is odd, then n 2 is odd. For any integer n, if 3n + 2 is odd, then n 2 is odd. At least 4 of any 22 days must fall on the same weekday. For all real x, y, xy = x y For any integer n, the following are equivalent: (i) n is even. (ii) n 1 is odd. (iii) n 2 is even. There exists a positive integer that can be written as the sum of 2 cubes of positive integers in 2 different ways. There exist irrational numbers x,y such that x y is rational. Every integer has a unique additive inverse.