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

## Presentation on theme: "Chapter 2 – Fundamentals of Logic. Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference."— 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: 2 + 3 = 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.

Similar presentations