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 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 Thus two statements will give us 22 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 Truth table for sentence ∼ P : T F F T 2.3 The Disjunction and Conjunction of a Statement For two statements P and Q, the disjunction of P and Q is P ∨ Q (P or Q). P Q P ∨ Q T T T Fact: P ∨ Q is true if at least one of P and Q is true T F T F T T F 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 Q P ⇒ Q T T T An implication is a statement P ⇒ Q : If P , then Q (or P implies Q). T F F F T T F F T 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 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) ⇒ Q(x) T T T An implication is a statement P (x) ⇒ Q(x) : If P (x), then Q(x). T F F F T T F F T Note that P (x) and Q(x) are open sentences. P (x) ⇒ Q(x) is an implication, thus it is a statement. 2 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 ) Ex: P ∨ (∼ P ) with the truth table: T F 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) ⇐⇒ ∼ ((∼ P ) ∨ Q) ⇐⇒ (∼ (∼ P )) ∧ (∼ Q) ⇐⇒ P ∧ (∼ Q). 2.10 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.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us