Logic and Set Notation

Similar documents
PROPOSITIONAL CALCULUS

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

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Propositional Logic. Spring Propositional Logic Spring / 32

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

Logic, Sets, and Proofs

Discrete Mathematical Structures: Theory and Applications

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.

software design & management Gachon University Chulyun Kim

HANDOUT AND SET THEORY. Ariyadi Wijaya

1.1 Statements and Compound Statements

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

Readings: Conjecture. Theorem. Rosen Section 1.5

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

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

Logic and Proof. Aiichiro Nakano

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

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

Logic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!

Predicate Logic. Andreas Klappenecker

On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes! 26-Aug-2011 MA

Propositional Logic, Predicates, and Equivalence

Propositional Logic. Fall () Propositional Logic Fall / 30

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Intro to Logic and Proofs

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

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

Chapter 1 Elementary Logic

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

Logical Reasoning. Chapter Statements and Logical Operators

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Logic and Propositional Calculus

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

The proposition p is called the hypothesis or antecedent. The proposition q is called the conclusion or consequence.

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

1 The Foundation: Logic and Proofs

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

A. Propositional Logic

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

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

Chapter 2: The Logic of Quantified Statements

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

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.

Introduction to Metalogic

Review 1. Andreas Klappenecker

CSE 20 DISCRETE MATH. Winter

CS 2336 Discrete Mathematics

CSC Discrete Math I, Spring Propositional Logic

Section 1.1 Propositions

A Little Deductive Logic

Logic and Propositional Calculus

A Quick Lesson on Negation

Rules Build Arguments Rules Building Arguments

1 The Foundation: Logic and Proofs

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

CSE 20 DISCRETE MATH. Fall

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

Rules of Inference. Arguments and Validity

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

Chapter 3. The Logic of Quantified Statements

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

COMP 2600: Formal Methods for Software Engineeing

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

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

1.1 Language and Logic

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

A Little Deductive Logic

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

1.1 Language and Logic

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

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

Math 3336: Discrete Mathematics Practice Problems for Exam I

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Sets, Logic, Relations, and Functions

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

DISCRETE MATHEMATICS BA202

ECOM Discrete Mathematics

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:

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

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

Advanced Topics in LP and FP

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

(Refer Slide Time: 02:20)

Compound Propositions

CA320 - Computability & Complexity

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

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

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

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

Propositional Logic: Review

Mat 243 Exam 1 Review

Transcription:

Logic and Set Notation

Logic Notation p, q, r: statements,,,, : logical operators p: not p p q: p and q p q: p or q p q: p implies q p q:p if and only if q We can build compound sentences using the above notation and then determine their truth or falsity with the use of logical operators. 2/14

If p then q A conditional statement consists of two parts, a hypothesis or antecedent in the if clause and a conclusion or consequent in the then clause. For instance, if it rains, then they cancel school. Given an if-then statement if p, then q, we can create three related statements. Statement: If p, then q. Converse: If q, then p. Inverse: If not p, then not q. Contrapositive: If not q, then not p. If the statement is true, then the contrapositive is also logically true. If the converse is true, then the inverse is also logically true. 3/14

Example I Statement: If three angles add up to 180 degrees, then they must form a triangle. Converse: If three angles form a triangle, then they must add up to 180 degrees. Inverse: If three angles do not add up to 180 degrees, then they must not form a triangle. Contrapositive: If three angles do not form a triangle, then they must not add up to 180 degrees. 4/14

Example II Statement: If a quadrilateral is a rectangle, then it has two pairs of parallel sides. Converse: If a quadrilateral has two pairs of parallel sides, then it is a rectangle. (FALSE!) Inverse: If a quadrilateral is not a rectangle, then it does not have two pairs of parallel sides. (FALSE!) Contrapositive: If a quadrilateral does not have two pairs of parallel sides, then it is not a rectangle. 5/14

can build compound sentences using the above notation and then determine the sity Truth with the use Tables of the logical operators. The truth tables of the logical operat imple: p q p q T T T T F F F T F F F F p q p q T T T T F T F T T F F F p q p q T T T T F F F T T F F T p p T F F T te that the operator is inclusive. That is, the statement p q is true if (a) Note that the operator is inclusive. That is, the statement e, or (b) only q is true, or (c) both are true. This is different from the use of p q is true if (a) only p is true, or (b) only q is true, or (c) day language, which is exclusive. That is, the statement p or q is true if (a) on or (b) both only qare is true, true. but This false is different both from are true. thealthough use of or sometimes in a special d to denote everyday the language, exclusive-or, which thisisoperator exclusive. is redundant because we can simpl q] [p q] to express it. very careful Also note where that youinplace the statement parentheses. p Forq, example, if p is false, what then does qp is q p it mean vacuously p (q p) true. For does example, it mean all (p cellphones q) p? The in the first room statement are is alwa the second turnedisoff truewill onlybe when truep when is false. there are no cellphones in the shall room. adopt the following convention. First, locate followed by a simple sta as p and take the brackets around p as implicit. Then, find instances where tw s are joined by or and take the brackets around them as implicit. Thus, 6/14

hall deal with necessary and sufficient conditions quite a bit, so you should mak oroughly understand them. utology is a compound statement that is always true (like p [q p], for exam orem (or proposition, or lemma or corollary) is a tautology of the form [p 1 k] q. The statements p 1,p 2,...,p k are assumptions. We would generally 7/14 tion, the correct interpretation of the example above is (p q) ( p). This co ll does not allow us to interpret p q r unambiguously, and so we shall use bra Truth Tables e the meaning clear. pecial attention to the operator because its expression in words may also be We can think of the statement p q, as two separate. We can think of the statement p q, as two separate statements. First, suffici ufficient statements. condition First, for q. That sufficiency: is, whenever p is ap sufficient is true, then condition q must for be true q. as we ver p is Second, false, then necessity: q can be q is either a necessary true or false. condition Second, for necessity: p. You should q is a nece on formake p. That sureis, that if qyou is false, understand then p must the following be false as truth well. table If q is which true, then er truedepicts or false. p and You qshould as jointly makenecessary sure that you and understand sufficient conditions. the following truth depicts p and q as jointly necessary and sufficient conditions. p q p q T T T T F F F T F F F T

Logical Rules How do we prove theorems? There are several types of logical rules available. 1 Simplification: From p q we can infer p and we can infer q. 2 Addition: From p we can infer p q. 3 Conjunction: From p and q we can infer p q. 4 Disjunctive Syllogism: From (p q) p we can infer q. 5 Modus Ponens: From (p q) p we can infer q. 6 Modus Tollens: From (p q) q we can infer p. 7 Hypothetical Syllogism: From (p q) (q r) we can infer (p r). 8 Constructive Dilemma: From (p q) (s t) (p s) we can infer (q t). 8/14

Quantifiers Sometimes we want to state generalities of the form some element in the set X has a property p( ) and every element in the set X has property p( ). To do this, we use quantifiers. Existential: ( x X)p(x) that p(x). Universal: ( x X)p(x) There exists an x in X such For all x in X, p(x). 9/14

Set Notation X, Y, Z: sets x, y, z: elements of sets x X: x is in X or x is an element in X x / X: x is not in X Y X: Y is a subset of X, or Y is included in X Y = X: Y is equal to X, or Y X X Y Y X: Y is not equal to X, or (Y = X) Y X: Y is a proper subset of X, or Y X Y X : the empty set (set with no elements) 10/14

Set Notation Note that the empty set is a subset of every set since ( x X)(x X) is vacuously true for every X. There is only one empty set. A set can be identified by listing its contents or by specifying a property common to all and only the elements of that set. For example, if X is the set of integers, then we can represent the set consisting of the number 1, 2 and 3 by {1, 2, 3} or {x X 0 < x < 4}, where the second representation is read the elements x of X such that 0 < x < 4. This method of defining sets is useful when the set is large. For example, if X is the set of real numbers, the set of positive real numbers is {x X x > 0}. We could never list these numbers. 11/14

Set Operations The following are some simple operations on sets. Let X be our universe of discourse (that is, everything happens in this set X). Let Y and Z be subsets of X. Then, 1 Intersection: Y Z = {x X x Y x Z}. 2 Union: Y Z = {x X x Y x Z}. 3 Complement: Ȳ = {x X x / Y }. 4 Subtraction: Y \ Z = Y Z = {x X x Y x / Z}. The last operation is also called the complement of Z relative to Y. 12/14

Remarks Sets are very useful for expressing order. For example, to represent a point on the Cartesian plane by a pair of numbers (one for horizontal and one for vertical position), we have to express order. Whenever order is important, we enclose the elements in parentheses: (5, 2). By convention, it is essential to list 5 before 2 because the point (5, 2) is quite different from the point (2, 5). The elements do not have to be numbers: we can consider (x, y, z) where x X, y Y and z Z with X, Y and Z being any sets at all. For example, let X be the set of numbers of Coke cans, Y be the set of numbers of whiskey shots, and Z be the set of numbers of wine glasses. Then (3, 1, 10) represents 3 Coke cans, 1 whiskey shot, and 10 glasses of wine. 13/14

Remarks When the elements are two, we call the signification of order an ordered pair. For more elements, we have ordered triples, all the way up to ordered n-tuples. The set of ordered n-tuples from X 1, X 2,..., X n is the n-fold cross product (sometimes called the Cartesian product) written as X 1 X 2... X n. For example, when n = 2 the cross-product of X 1 and X 2 is defined as X 1 X 2 = {(x 1, x 2 ) x 1 X 1 x 2 X 2 }. So, if X 1 = {1, 2, 3} and X 2 = {Mike, Suzie, P eter}, then the cross-product is X 1 X 2 = {(1, Mike), (2, Mike), (3, Mike), (1, Suzie), (2, Suzie), (3, Suzie), (1, P eter), (2, P eter), (3, P eter)}. When X 1 = X 2 = = X n = R, we refer to their cross product as the n-dimensional Euclidean space. 14/14