Chapter 2 – Fundamentals of Logic. Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference.

Slides:



Advertisements
Similar presentations
Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
Advertisements

1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
08 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
CS128 – Discrete Mathematics for Computer Science
Chapter 1 The Logic of Compound Statements. Section 1.2 – 1.3 (Modus Tollens) Conditional and Valid & Invalid Arguments.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
From Chapter 4 Formal Specification using Z David Lightfoot
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
Adapted from Discrete Math
Propositions and Truth Tables
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
Discrete Mathematics and Its Applications
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Chapter 1: The Foundations: Logic and Proofs
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Reading: Chapter 4 (44-59) from the text book
資訊科學數學 4 : More About Logic 陳光琦助理教授 (Kuang-Chi Chen)
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Chapter 1 Logic and proofs
Simple Logic.
Chapter 1 Propositional Logic
Chapter 7. Propositional and Predicate Logic
2. The Logic of Compound Statements Summary
DISCRETE MATHEMATICS CHAPTER I.
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
(CSC 102) Discrete Structures Lecture 2.
Principles of Computing – UFCFA3-30-1
Chapter 8 Logic Topics
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
CS201: Data Structures and Discrete Mathematics I
Applied Discrete Mathematics Week 1: Logic
Back to “Serious” Topics…
Discrete Mathematics and Its Applications Kenneth H
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
MAT 3100 Introduction to Proof
TRUTH TABLES.
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
1.3 Propositional Equivalences
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

Chapter 2 – Fundamentals of Logic

Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference The Use of Quantifiers Quantifiers, Definitions, and the Proofs of Theorems Summary

Introduction Logic: rules to validate an argument is correct or not correct. The logic of mathematics is applied to decide whether one statement follows from, or is a logical consequence of, one or more other statements.

2.1Basic Connectives and Truth Tables Terminology: –Assertions 斷言 : in a form of sentences; –Statements 敘述 (or Propositions 命題 ): verbal or written assertions are declarative sentences that are either true or false – but not both.

Example Example: we use the lowercase letters of the alphabet (such as p, q, and r) to represent these statements. p: Combinatorics is a required course for sophomores 二年級. q: Margaret Mitchell wrote Gone with the Wind. r: = 5.

Example: we do not regard sentences such as the exclamation 叫喊 –“What a beautiful evening!” or the command –“Get up and do your exercises.” as statements. The preceding statements represented by p, q, and r are considered to be primitive statements 原始命題, for there is really no way to break them down into anything simpler.

Introduction New statements can be obtained from primitive statements in two ways. –Transform a given statement p into the statement  p, which denotes its negation 否定 and is read “Not p”. 非 p (Negation statements) –Combine two or more statements into a compound statement, using logical connectives. (Compound statements 複合敘述 )

4 logical connectives: Conjunction 連結 且 : The conjunction of the statements p, q is denoted by p  q, which is read “p and q”. Disjunction 分離 或 : The expression p  q denotes the disjunction of the statements p, q and is read “p or q”. Implication 蘊含 推得 : we say that “p implies q” (write p → q) is equal to “If p, then q”, –“p is sufficient for q”, –“p is a sufficient condition for q”, 充分條件 –“p only if q”, p 唯若 q – “q is necessary for p”, and –“q is a necessary condition for p”. q 為 p 之必要條件 –The statement p is called the hypothesis 假設 of the implication; q is called the conclusion 結論.

Introduction Biconditional: The biconditional of two statements p, q, is denoted by p  q (read “p if and only if q” or 若且唯若 “p is necessary and sufficient for q”). 充分 必要條件

Example: p, q, and r are defined as above. p  q : read “Combinatorics is a required course for sophomores, and Margaret Mitchell wrote Gone with the Wind.”. p  q : read “Combinatorics is a required course for sophomores, or Margaret Mitchell wrote Gone with the Wind.”. p → q : read “If combinatorics is a required course for sophomores, then Margaret Mitchell wrote Gone with the Wind.”. p  q (or p iff q): Combinatorics is a required course for sophomores, if and only if Margaret Mitchell wrote Gone with the Wind.”.

Introduction Inclusive and exclusive or (denoted by  and  ): We use the word “or” in the inclusive sense. The exclusive “or” is denoted by “p  q”. The compound statement “p  q” is true if one or the other but not both of the statements p and q is true.

Example p  q – “Combinatorics is a required course for sophomores, or Margaret Mitchell wrote Gone with the Wind, but not both.”.

True Table The judgment of the true or falsity of a (compound or negation) statement is dependent only on the true values of its component statements and can be investigated by truth tables as below for the negation and the different kinds of compound statements:

True Table

Example 2.1: page 49~50

Example 2.1: page 49~50.

Example 2.3: page 51~52. (Especially focus on the decision (or selection) structure in computer programming.) Note: In our everyday language, we often find situations where an implication is used when the intention actually calls for a biconditional. In scientific writing one must make every effort to be unambiguous – when an implication is given, it ordinarily cannot, and should not, be interpreted as a biconditional.

Example 2.4: page 52.

Example 2.5: page 52~53.

Example 2.6: page 53.

邏輯推論

Definition 2.1: A compound statement is called a tautology if it is true for all truth value assignments for its component statements. If a compound statement is false for all such assignments, then it is called a contradiction. (The symbol T 0 to denote any tautology and the symbol F 0 to denote any contradiction.)

2.2Logical Equivalence: The Laws of Logic In all areas of mathematics we need to know when the entities we are studying are equal or essentially the same. Our study of logic is often referred to as the algebra of propositions (as opposed to the algebra of real numbers). In this algebra we shall use the truth tables of the statements (propositions) to develop an idea of when two such entities are essentially the same.

Example 2.7: Evaluate the equivalence of the compound statements  p  q and p → q. (Page 56)

邏輯等價

Definition 2.2: Two statements s1, s2 are said to be logically equivalent, and we write s1  s2, when the statements s1 is true (respectively, false) if and only if the statement s2 is true (respectively, false). (Note that when s1  s2 the statements s1 and s2 provide the same truth tables because s1, s2 have the same truth values for all choices of truth values for their primitive components.)

Example 2.8: page 57. (Note: the results are known as DeMorgan’s Laws)

Example 2.9: page 58. 分配律 (Note: the Distributive Laws of  over  and  over  )

The Laws of Logic: page 59.

Definition 2.3: Let s be a statement. If s contains no logical connectives other than  and , then the dual of s, denoted s d, is the statement obtained from s by replacing each occurrence of  and  by  and , respectively, and each occurrence of T 0 and F 0 by F 0 and T 0, respectively.

Example: 1) If p is any primitive statement, then p d is the same as p – that is, the dual of a primitive statement is simply the same primitive statement. And (  p) d is the same as  p. 2) The statements p   p and p   p are duals of each other whenever p is primitive – and so are the statements p  T 0 and p  F 0. 3) Given the primitive statements p, q, r and the compound statement s: (p   q)  (r  T0), we find that the dual of s is sd: (p   q)  (r  F0).

Theorem 2.1: The Principle of Duality. Let s and t be statements that contain no logical connectives other than  and . If s  t, then sd  td. Note: Alternative way to derive a logical equivalence is to use a tautology of the form “p  q”, in addition to using the truth table for proving “p  q”. For example, page 60 Table 2.11 shows the logical equivalence of “(r  s)→q   (r  s)  q”. Proving “(r  s)→q   (r  s)  q” a tautology can also indicate the logical equivalence of “(r  s)→q” and “  (r  s)  q”.

True Table

Two substitution rules: Suppose that the compound statement P is a tautology. If p is a primitive statement that appears in P and we replace each occurrence of p by the same statement q, then the resulting compound statement P1 is also a tautology. Let P be a compound statement where p is an arbitrary statement that appears in P, and let q be a statement such that q  p. Suppose that in P we replace one or more occurrences of p by q. Then this replacement yields the compound statement P1. Under these circumstances P1  P.

Example 2.10: page 61.

Example 2.10

Example 2.11: page 62.

Example 2.13: page 62~63.

Example 2.13: page 62~63

Example 2.15

Example 2.15: (page 63~64.) Suppose p, q represent the statements. –p: Today is Thanksgiving. –q: Tomorrow is Friday. Then we obtain: –(The implication: p→q) If today is Thanksgiving, then tomorrow is Friday. (TRUE) –(The contrapositive:  q→  p) if tomorrow is not Friday, then today is not Thanksgiving. (Likewise TRUE) –(The converse: q→p) if tomorrow is Friday, then today is Thanksgiving. –(The inverse:  p→  q) if today is not Thanksgiving, then today is not Friday. –Note: (p→q)  (  q→  p), (q→p)  (  p→  q).

Example 2.16: page 64. (Logic simplification)

Example 2.17: page 65.

Example 2.18: page 65~66.