2 Ch 2: LOGIC

2 Ch 2: LOGIC

2 Ch 2: LOGIC 2.1 Statements A statement is a sentence that is either true or false, but not both. Ex 1: Today is Monday. Ex 2: The integer 3 is e...

69KB Sizes 0 Downloads 22 Views

Recommend Documents

2 First Order Logic
The logical connectives combine propositions to form more complex propo- sitions in .... ial implication connective and

Ch 2 Study Guide Answers
9. biconditional- and on ly (iff); The symbolic form of a biconditional is ... Activity Sheet 2: Logic and Conditional .

2 Innenstadt - Ch. Links Verlag
qEduard Herbert, Josef Höhne, Otho. Orlando Kurz, 1935/1944 p Lerchenauer. Str. 76, Karte D2. Olympiazentrum. Die Bayer

1 Logic: Necessity and sufficiency 2 Logic: the Biconditional
Jan 26, 2011 - Hearken back to the “abstention from pork” example: “if x is a vegetarian, then x abstains from por

Introduction to Logic - CIS008-2 Logic and Foundations of Mathematics
Introduction to Logic. CIS008-2 Logic and Foundations of Mathematics ... 3 Logical Equivalence .... is called a bicondit

2 KVM Switch - INFO-LOGIC EBM 2000
The 2-Port PS/2 KVM Switch lets you manage two PC's with just one set of keyboard, monitor, and mouse. Switch between tw

CH 3–1. Purpose CH 3–2. Background - DAU's
Feb 1, 2017 - engineering discipline, its activities and processes and its practice in defense acquisition programs. ...

COUNCIL HOUSE 2 (CH 2), MELBOURNE CBD : A GREEN
Apr 13, 2005 - The Council House 2 (or CH2) is a leading green building ... Melbourne City Council (MCC) staff, the proj

ch 14 sec1-2 wksht.pdf File
Gavrilo Princip. 8. ultimatum. 9. mobilize. 10. neutrality. Survey Edition Chapter 27 Section 2. 4 * Guided Reading and

2

Ch 2: LOGIC

2.1

Statements

A statement is a sentence that is either true or false, but not both. Ex 1: Today is Monday. Ex 2: The integer 3 is even. Not examples: The equation 3x = 12. This is not a statement b/c it depends on the value of x. There is one value that makes it true, but the sentence is not always true. Every statement has a truth value, namely true T or false F. A sentence containing a variable(s) is called an open sentence. Ex: The integer r is even. Possible truth values are often given in a table called a truth table. Examples: P Truth table for a sentence P: T F P Q T T Truth table for two sentences P and Q: T F F T F F 2 Thus two statements will give us 2 combinations (rows below the one with P and Q) in the table. For three statements we would get 23 combinations, since there are two choices for each of the three statement(either T or F).

2.2

The Negation of a statement

The negation of a statement P is the statement ∼ P : not P . Ex: P : 3 is even. ∼ P : 3 is not even. OR: ∼ P : 3 is odd. Observe that when the statement is false, its negation is true. P ∼P F Truth table for sentence ∼ P : T F T

2.3

The Disjunction and Conjunction of a Statement

For two statements P and Q, the disjunction of P and Q P T Fact: P ∨ Q is true if at least one of P and Q is true T F F

is P ∨ Q (P or Q). Q P∨Q T T F T T T F F

For two statements P and Q, the conjunction of P and Q is P ∧ Q (P and Q).

1

Fact: P ∧ Q is true only if both P and Q are true. P Q P∧Q T T T T F F F T F F F F

2.4

The Implication (or Conditional statement)

P T An implication is a statement P ⇒ Q : If P , then Q (or P implies Q). T F F Ex: A student is currently receiving a B+ just before final exam. Student’s question: Is there a chance that I will get an A in the class? Answer: If you will get an A in the final, then you will receive an A in the

Q T F T F

P⇒Q T F T T

class

Question: Is the conditional statement above true or false? P: You will get an A in the final Q: You will receive an A in the class. P Q P⇒Q T T T T F F F T T F F T The last two statements are still correct since the conditional didn’t say what will happen if the student does not get an A in the final.

There are more ways of expressing P ⇒ Q: If P then Q Q if P P implies Q P is sufficient for Q Q is necessary for P

2.5

More on Implication

This section considers open sentences: P (x) and Q(x), which depend on x. P(x) Q(x) P(x) T T T F An implication is a statement P (x) ⇒ Q(x) : If P (x), then Q(x). F T F F Note that P (x) and Q(x) are open sentences. P (x) ⇒ Q(x) is an implication, thus statement.

2

⇒ Q(x) T F T T it is a

Generally, we write P and Q instead of P (x) and Q(x) for convenience. However, if we want to emphasis that the statements depend on x, then we write P (x) and Q(x).

2.6

The Biconditional

The biconditional of P and Q is P ⇐⇒ Q : (P ⇒ Q) ∧ (Q ⇒ P ), and it means either that P is equivalent to Q, or P if and only if Q. Truth table for P ⇐⇒ Q: P Q P ⇒ Q Q ⇒ P P ⇐⇒ Q T T T T T T F F T F F T T F F F F T T T The biconditional is true when P and Q are either both true, or both false.

2.7

Tautologies and Contradictions

We use logical connectives to make new statements. Logical Connectives: ∼, ∨, ∧, ⇒, ⇐⇒ A compound statement is a statement composed of one or more given statements and at least one logical connective. P ∼P P∨(∼P ) F T Ex: P ∨ (∼ P ) with the truth table: T F T T A compound statement S is called a tautology if it is true for all possible combinations of truth values of its component statements: Ex: The sun rises from the East.– one component Today is Tu or it is not. –2 components. Ex: Let Q and P be two statements. Is (∼ Q) ∨ (P ⇒ Q) a tautology? To check this we look at the truth table: P Q ∼ Q P ⇒ Q (∼ Q) ∨ (P ⇒ Q) T T F T T T F T F T Thus the compound statement is a tautology. F T F T T F F T T T What about P ∧ (∼ P )? Consider the truth table: P ∼ P P ∧ (∼ P) T F F F T F Thus the compound statement is not a tautology. A compound statement that is false for all possible combinations of truth values of its component statements is called a contradiction.

3

2.8

Logical Equivalence

A compound statement can be a tautology, contradiction or neither. If P is a tautology, then ∼ P is a contradiction and vice versa. When negating ∧ we get ∨, and negating ∨ we get ∧. Let R and S be two compound statements. Then R and S are logically equivalent if R and S have the same truth values for all possible combinations of truth values of their components. Ex: Show that R : P ⇒ Q and S : (∼ P ) ∨ Q are logically equivalent. P Q P ⇒ Q ∼ P (∼ P ) ∨ Q T T T F T T F F F F F T T T T F F T T T Thus the compound statements are logically equivalent. This means that R ⇐⇒ S is a tautology, or (P ⇒ Q) ⇐⇒ ((∼ P ) ∨ Q) is a tautology.

2.9

Some Fundamental Properties of Logical Equivalence

(page 49): Thm. 2.18: For statements P, Q, and R, 1. Commutative Laws: (a) P ∨ Q is equivalent to Q ∨ P (b) P ∧ Q is equivalent to Q ∧ P 2. Associative Laws: (a) P ∨ (Q ∨ R) is equivalent to (P ∨ Q) ∨ R (b) P ∧ (Q ∧ R) is equivalent to (P ∧ Q) ∧ R 3. Distributive Laws: (a) P ∨ (Q ∧ R) is equivalent to (P ∨ Q) ∧ (P ∨ R) (b) P ∧ (Q ∨ R) is equivalent to (P ∧ Q) ∨ (P ∧ R) 4. DeMorgan’s Laws: (a) ∼ (P ∨ Q) is equivalent to (∼ P ) ∧ (∼ Q) (b) ∼ (P ∧ Q) is equivalent to (∼ P ) ∨ (∼ Q)

Ex: The statement ∼ (P ⇒ Q) is logically equivalent to P ∧ (∼ Q) Proof: We have the following tautologies (the first one comes from a truth table we’ve done 4

before):

∼ (P ⇒ Q)

2.10

⇐⇒

∼ ((∼ P ) ∨ Q)

⇐⇒

(∼ (∼ P )) ∧ (∼ Q)

⇐⇒

P ∧ (∼ Q).

Quantified Statements

Ex: The following statements have the same meaning, but they are quantified differently: If x is a real number, then x2 ≥ 0. The square of every real number is nonnegative. For every real number x, we have x2 ≥ 0. Each of the the phrases ”‘every”’, ”‘for every”’, ”‘for each”’, and ”‘for all”’ is called the universal quantifier and it is denoted by ∀. Each phrase ”there exists”, ”there is”, ”for some”, ”for at least one” is called the existential quantifier and is denoted by ∃.

NEGATION OF QUANTIFIED STATEMENTS: Negation of universal quantifier: ∼ (∀x ∈ R, x < 0) is equivalent to ∃x ∈ R, x > 0. Generally, if P (x) is an open sentence, then: ∼ (∀x ∈ S, P (x)) is equivalent to ∃x ∈ R, (∼ P (x)). Ex: Let A be a set, with P(A) being powerset of A. P : For every set B ∈ P(A), A \ B 6= ∅. What is its negation? ∼ P : There is a set B ∈ P(A) such that A \ B = ∅.

Negation of existential quantifier: Generally, if P (x) is an open sentence, then: ∼ (∃x ∈ S, P (x)) is equivalent to ∀x ∈ R, (∼ P (x)). Ex: P : There is a real number x, such that x2 = 4. What is its negation? ∼ P : For all real numbers x, x2 6= 4.

2.11

Characterization of Statements

Let’s return to biconditionals: P ⇐⇒ Q = (P ⇒ Q) ∧ (Q ⇒ P ) : If P , then Q and if Q, then P (or simpler: P if and only if Q).

Ex: Let P : x = −3, and let Q : |x| = 3. Consider P ⇐⇒ Q which says x = −3 ⇐⇒ |x| = 3. Statement is F because of (⇐). That is to say that |x| = 3 ⇒ x = −3 is false. If P (x) ⇐⇒ Q(x) we say that P (x) is characterized by Q(x). Note: This means that Q(x) is another way to say P (x), but Q(x) cannot be the definition of P (x). 5