1 Proposition, Logical connectives and compound statements

Similar documents
Handout #1: Mathematical Reasoning

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

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.

Math 3000 Section 003 Intro to Abstract Math Homework 2

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

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

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

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

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

INTRODUCTORY SET THEORY

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

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

Predicate Logic. For example, consider the following argument:

DISCRETE MATH: LECTURE 3

Mathematical Induction

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

Invalidity in Predicate Logic

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

Lecture 16 : Relations and Functions DRAFT

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

3. Mathematical Induction

Basic Proof Techniques

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CHAPTER 7 GENERAL PROOF SYSTEMS

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

p: I am elected q: I will lower the taxes

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Logic in Computer Science: Logic Gates

Predicate Logic Review

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Cartesian Products and Relations

6.080/6.089 GITCS Feb 12, Lecture 3

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

Math 223 Abstract Algebra Lecture Notes

Beyond Propositional Logic Lukasiewicz s System

Math Week in Review #4. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

CS 3719 (Theory of Computation and Algorithms) Lecture 4

The Mathematics of GIS. Wolfgang Kainz

MAT Program Verication: Exercises

Logic in general. Inference rules and theorem proving

Mathematics Review for MS Finance Students

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Logic is a systematic way of thinking that allows us to deduce new information

Formal Engineering for Industrial Software Development

Incenter Circumcenter

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

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

If an English sentence is ambiguous, it may allow for more than one adequate transcription.

10.4 Traditional Subject Predicate Propositions

Lecture 2: Universality

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Today s Topics. Primes & Greatest Common Divisors

Logic Appendix. Section 1 Truth Tables CONJUNCTION EXAMPLE 1

Solutions for Practice problems on proofs

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

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

196 Chapter 7. Logical Agents

Mathematical Induction

Correspondence analysis for strong three-valued logic

Mathematical Induction. Mary Barnes Sue Gordon

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

Lecture Notes on Linear Search

Mathematical Induction. Lecture 10-11

Rigorous Software Development CSCI-GA

facultad de informática universidad politécnica de madrid

88 CHAPTER 2. VECTOR FUNCTIONS. . First, we need to compute T (s). a By definition, r (s) T (s) = 1 a sin s a. sin s a, cos s a

Math 55: Discrete Mathematics

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

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

The Fundamental Theorem of Arithmetic

1 Propositions. mcs-ftl 2010/9/8 0:40 page 5 #11. Definition. A proposition is a statement that is either true or false.

Real Roots of Univariate Polynomials with Real Coefficients

CS510 Software Engineering

Lecture Notes on Polynomials

MATH10040 Chapter 2: Prime and relatively prime numbers

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

DEFINABLE TYPES IN PRESBURGER ARITHMETIC

INCIDENCE-BETWEENNESS GEOMETRY

8 Divisibility and prime numbers

Quine on truth by convention

Lecture 13 of 41. More Propositional and Predicate Logic

A Few Basics of Probability

Introduction to Automata Theory. Reading: Chapter 1

mod 10 = mod 10 = 49 mod 10 = 9.

Lecture 9 Maher on Inductive Probability

Notes on Determinant

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

First-Order Logics and Truth Degrees

Hypothetical Syllogisms 1

Regular Languages and Finite Automata

NP-Completeness and Cook s Theorem

MTH6120 Further Topics in Mathematical Finance Lesson 2

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

CHAPTER 2: METHODS OF PROOF

24. PARAPHRASING COMPLEX STATEMENTS

Removing Partial Inconsistency in Valuation- Based Systems*

(a) Write each of p and q as a polynomial in x with coefficients in Z[y, z]. deg(p) = 7 deg(q) = 9

Principle of Data Reduction

Transcription:

Discrete Mathematics: Lecture 4 Introduction to Logic Instructor: Arijit Bishnu Date: July 27, 2009 1 Proposition, Logical connectives and compound statements Logic is the discipline that deals with the methods of reasoning. Intuitively speaking, logic as a subject is the collection of techniques used to prove that an argument is valid. The purpose of studying logic in computer science is to prove theorems and verify the correctness of programs. We would follow [1, 2, 3] for logic in this course. We want to make statements which can be an atomic statement or a compound statement and determine whether the statement is true or false. In that sense, a statement is attached to a truth value. A proposition (or a statement) is a declarative sentence that is either TRUE (denoted as T) or FALSE (denoted as F), but not both. Exercise 1 Consider the statement S : 3 x = 5. Is it a proposition? 2 Logical connectives and compound statements Propositional variables are propositions usually denoted as p, q, r,.... Propositional variables can be combined using logical connectives to obtain compound statements. The truth value of a compound statement depends only on the truth value of the statements and the logical connective. Negation: The negation of p is denoted as p. p is TRUE when p is FALSE. In terms of truth table, we have the following: p p T F Conjunction: The conjunction of p and q is denoted as p q. p q is true when both p and q are true. F T p q p q F T F F F F Disjunction: The disjunction of p and q is denoted as p q. p q is true when either p or q or both are true. 1

p q p q T F T F T T F F F Exercise 2 Form the truth table for the compound statement (p q) ( p). 3 Quantifiers Let us recall our definition of sets. We defined sets as the collection of all elements x satisfying a property P (x). In terms of set theoretic notations, {x P (x)}. Consider an element w of this set. Surely, P (w) is true. Consider another element z not in this set. Surely, P (z) is false. P (x) is called to be a predicate or a propositional function. It is a propositional function because each choice of x produces a proposition P (x) that can either be true or false but not both. Example 1 Let A = {x x R and x Π}. Here, the proposition is P (x) : x is a real number less than equal to Π. P (1) is true, so 1 A, but P (400) is false, so 400 A. Example 2 Consider the following piece of C code. unsigned int i,j;...... while((i <=5 ) && (j >= 6)) { printf("\n Hello World \n"); i++; j--; } The statement i<=5 denotes a predicate or a propositional function as for some values of i, the statement is true. Similarly, with j>=6. With the && sign, we make a conjunction of the two propositional functions to get a new predicate. This predicate acts as a control of how the while loop will run. Universal Quantification: The universal quantification of a predicate P (x) is the statement: for all values of x, P (x) is true, denoted as x P (x). is the universal quantifier. Example 3 Let a predicate P (x) be P (x) : x + x = 2x, x R. So, the universal quantification of P (x), xp (x) is true. Existential Quantification: The existential quantification of a predicate P (x) is the statement: there exists a value of x for which P (x) is true, denoted as xp (x). is the existential quantifier. 2

Example 4 Let a predicate P (x) be P (x) : x 2 = 1, x R. So, the existential quantification of P (x), xp (x) is true, as P (1) is true. Consider the propositional function P (y) : y y + 2 = y. P (y) is false. Example 5 This is an example of writing compound predicates. Let P (x) : x is a person; B(x, y) : x is the brother of y; S(x, y) : x is the sister of y. We want to write the predicate: x is the sister of the brother of y. In order to symbolize the predicate, we name a person called z as the brother of y. So, the statement now is: there exists a person z such that x is the sister of z AND z is the brother of y. Thus, the predicate now is: ( z)(p (z) S(x, z) B(z, y)). Now, for a relation between existential quantifier and universal quantifier. Let p be a predicate xp (x). The negation of p is false when p is true and true when p is false. For p to be false, there must be at least one value of x for which P (x) is false. Thus, p is false if x, P (x) is true. On the other hand, if x, P (x) is false, then for every x, P (x) is false, i.e. xp (x) is true. Exercise 3 Are the following two statements always equivalent: z x y p(x, y, z) and x y z p(x, y, z)? Can you give an example of a p(x, y, z) to show that the two statements are not equivalent? 4 Conditional statements Let us first look at what are necessary and sufficient conditions. Sufficient condition: We start with an example. Example 6 Consider the following statement. If } a natural number {{ n is even}, then p n is divisible by 2. Look at the statement p : a natural number n is even, and the }{{} q statement q : n is divisible by 2. We say that p is a sufficient condition for q. Let p and q be two statements. We say that p is a sufficient condition for q when p being true implies q is true. Formally, a statement p is a sufficient condition of a statement q if p implies ( ) q. Another example. If you are studying M. Tech. (CS) at ISI then you have cleared the ISI entrance test. One more example. If x is a rational number, then x is real. In all the above examples, let p be the first statement and q be the second one. We can see that p q. Let us explore a feature that is emerging from all the above examples. Let S(p) be the set of objects for which p holds true and S(q) be the set of objects for which q holds true. Then, S(p) S(q). 3

Necessary condition: We start with an example. Example 7 Consider the following statement. If a natural number n > 2 is prime, }{{} q then n} is{{ odd}. Look at the statement p : n is odd, and the statement q : a natural p number n greater than 2 is prime. We say that p is a necessary condition for q. A necessary condition of a statement must be satisfied for the statement to be true. Let p and q be two statements. p is a necessary condition of q if q implies ( ) p. The contrapositive of a statement q p is p q. Then, we have another interpretation of a necessary statement: p is not true implies q is not true. As before, let S(p) be the set of objects for which p holds true and S(q) be the set of objects for which q holds true. Then, S(p) S(q). Necessary and sufficient condition: We say that a statement p is necessary and sufficient for q if p is necessary for q and p is sufficient for q. We also say p if and only if q which is denoted as p q. So, to prove p is a necessary and sufficient condition for q, we have to prove both p q and q p. We next look at truth tables of the compound statements corresponding to the conditional ( ) and biconditional ( ). Conditional statement: Let p and q be statements. Then, the compound statement: if p, then q, denoted as p q is called a conditional statement or an implication. p is said to be the hypothesis or antecedent and q is said to be the consequent or conclusion. if then is a connective. The compound statement p q is true asserts the following: if p is true, then q will also be found to be true. p q means q is a necessary condition for p. The converse of the statement p q is q p. Let us look at the truth table: p q p q F T T F F T Exercise 4 Using truth table, verify that p q and q p are the same implications. Biconditional statement: Let p and q be statements. Then, the compound statement: p if and only if q, denoted as p q is called a biconditional statement or an equivalence. The compound statement p q is true only when both p and q are true or when both p and q are false. p q means p is a necessary and sufficient condition for q. Let us look at the truth table: 4

p q p q F T F F F T Exercise 5 Compute the truth table for (p q) ( q p). Tautology and contradiction A statement that is true for all possible values of its propositional variables is called a tautology. A statement that is always false is called a contradiction. p and q are logically equivalent, denoted as, if p q is a tautology. Exercise 6 Prove the commutative, associative, distributive, idempotent properties and De Morgan s law using the notion of equivalence. Exercise 7 Show that ((p r) (q r)) ((p q) r) is a tautology. (p q) ( p q) (p q) ( q p) (p q) (p q) (q p) (p q) (p q) (p q) ((p q) (q p)) ( x p(x)) ( x ( p(x))) ( x p(x)) ( x ( p(x))) References [1] C. L. Liu, Elements of Discrete Mathematics, Tata McGraw Hill, New Delhi, 2000. [2] B. Kolman, R. C. Busby, S. C. Ross and N. Rehman, Discrete Mathematical Structures Pearson Education. [3] Elliott Mendelson, Introduction to Mathematical Logic, Litton Educational Publishing Inc. 5