
Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary Equivalence and Implication Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February 14, 2018 Alice E. Fischer Laws of Logic. 1/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 1 Properties of Propositions Logical Equivalence Contradictions and Tautologies 2 Logical Equivalences 3 Practice with Boolean Operators and Algebra 4 Implication Necessary and Sufficient Conditions Inside out and Backwards 5 Summary Alice E. Fischer Laws of Logic. 2/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Properties of Propositions Logical Equivalence Contradictions and Tautologies Alice E. Fischer Laws of Logic. 3/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Logical Equivalence: ≡ Two propositions are logically equivalent (≡) if they have the same outcomes under all input conditions. We can determine whether two propositions are equivalent( ≡) by comparing the last column in the truth tables for the two statements. P Q P _ Q Q _ P T T T T T F T T F T T T F F F F For example, The column for P _ Q is the same as the column for Q _ P, so the two propositions are equivalent . Alice E. Fischer Laws of Logic. 4/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Example: The Supervisor's Critique Do you remember John and his elevator design from last time? John's supervisor looked at his logic and told him \It's too complex, O is just the opposite of M". Simplify! So John thought a bit and added a column with a simpler formula to his truth table. (O ^ ∼M) _ O M ∼O ∼M O ^ ∼M ∼O ^ M (∼O ^ M) O ⊕ M T T F F F F F F T F F T T F T T F T T F F T T T F F T T F F F F Indeed, the boss was right. They are equivalent! Alice E. Fischer Laws of Logic. 5/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Contradictions A contradiction is a proposition that is always false, no matter what the input truth values are. For example, this is a contradiction: An odd number, X, equals 2 * some even number, Y. And this is a contradiction: P ^ ∼P Let P be All dogs are black. All dogs are black and not (all dogs are black). A contradiction can be symbolized by c. Alice E. Fischer Laws of Logic. 6/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Tautologies A tautology is a proposition that is always true, no matter what the input truth values are. For example: Let Q be the proposition Today is Tuesday. Then this is a tautology: Q _ ∼Q Today is Tuesday or today is not Tuesday. A tautology can be symbolized by t. Alice E. Fischer Laws of Logic. 7/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary Logical Equivalences A set of rules for logical calculation can be proven from the definitions using truth tables. They will be presented in the following slides. These laws are analogs of the laws for algebra and for sets that you already know. They are essential in making logical proofs and several are also important in programming. The following slides define the laws for symbolic logic. The corresponding set-theory law(s) will be given at the bottom of each slide. Alice E. Fischer Laws of Logic. 8/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 1. Commutative Laws Both and and or are commutative, that is, the left and right sides can be reversed without changing the meaning of the proposition. P ^ Q ≡ Q ^ P P _ Q ≡ Q _ P This is important in programming. Set theory: \ and [ are commutative. Given sets A and B, A \ B ≡ B \ A A [ B ≡ B [ A Alice E. Fischer Laws of Logic. 9/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 2. Associative Laws Both and and or are associative operators, that is, you may parenthesize the expression any way you wish without changing its meaning. (P ^ Q) ^ R ≡ P ^ (Q ^ R) (P _ Q) _ R ≡ P _ (Q _ R) This is important in programming. Set theory: \ and [ are associative. Given sets P, Q, and R, (P \ Q) \ R ≡ P \ (Q \ R) (P [ Q) [ R ≡ P [ (Q [ R) Alice E. Fischer Laws of Logic. 10/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 3. Distributive Laws Both and and or can be distributed over the other operator. P ^ (Q _ R) ≡ (P ^ Q) _ (P ^ R) P _ (Q ^ R) ≡ (P _ Q) ^ (P _ R) This is important in programming. Set theory: \ and [ can be distributed over each other. Given sets P, Q, and R, P \ (Q [ R) ≡ (P \ Q) [ (P \ R) P [ (Q \ R) ≡ (P [ Q) \ (P [ R) Alice E. Fischer Laws of Logic. 11/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 4. Identity Laws The identity laws are based on the definitions of and and or. P ^ t ≡ P P _ c ≡ P Set Theory: The set identity laws are based on definitions of the Universal set and the empty set. Given set A, A \ U ≡ A A [ ; ≡ A Alice E. Fischer Laws of Logic. 12/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 5. Negation Laws The negation laws are based on the definitions of and, or, and not. P _ ∼P ≡ t P ^ ∼P ≡ c Set Theory: Complement Laws The set complement laws are based on definitions of the Universal set, empty set, and complement. Given set A, A [ Ac ≡ U A \ Ac ≡ ; Alice E. Fischer Laws of Logic. 13/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 6. Double Negative Law The double-negative law is based on the definitions of not. ∼ (∼P) ≡ P Set Theory: Double Complement Law This is based on the definitions of complement. Given set A, (Ac )c ≡ A Alice E. Fischer Laws of Logic. 14/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 7. Idempotent Laws and, or are idempotent, meaning that the trivial computations have no effect and can be repeated without changing the meaning of the expression. P ^ P ≡ P P _ P ≡ P Set Theory: intersection and union are idempotent. Given set A, A \ A ≡ A A [ A ≡ A Alice E. Fischer Laws of Logic. 15/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 8. Universal Bound Laws A contradiction and anything is a contradiction. A tautology or anything is a tautology. P ^ c ≡ c P _ t ≡ t The shortcut evaluation of logical operators in C is based on these. Set Theory: The empty set is as small as you can get and the universal set is as large as you can get. Given set A, A \ ; ≡ ; A [ U ≡ U Alice E. Fischer Laws of Logic. 16/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 9. DeMorgan's Laws To distribute not over and, change the and to or. To distribute not over or, change the or to and. ∼ (P ^ Q) ≡ ∼P _ ∼Q ∼ (P _ Q) ≡ ∼P ^ ∼Q These laws are very important in programming and in databases. Set Theory: To distribute complement over \, change the \ to [. To distribute complement over [, change the [ to \. Given sets A; B, (A \ B)c ≡ Ac [ Bc (A [ B)c ≡ Ac \ Bc Alice E. Fischer Laws of Logic. 17/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 10. Absorption Laws A truth table can be used to verify these absorptions. P _ (P ^ Q) ≡ P P ^ (P _ Q) ≡ P These laws are important in proofs. Set Theory: Given sets A; B, A [ (A \ B) ≡ A That is, A [ a subset of A is still A. A \ (A [ B) ≡ A That is, A \ a superset of A is still A. Alice E. Fischer Laws of Logic. 18/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 11. Negations of t and c The negation of a tautology is a contradiction and vice versa. ∼ t ≡ c ∼ c ≡ t Set Theory: The complement of the Universal set is the empty set, and vice versa. Uc ≡ ; ;c ≡ U Alice E. Fischer Laws of Logic. 19/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary Practice This section contains three logical expressions to simplified by applying the rules, and one law to prove using truth tables. Alice E. Fischer Laws of Logic. 20/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 1. Proving DeMorgan's Law Construct a truth table to prove that ∼(P ^ Q) ≡ ∼P _ ∼Q P Q P ^ Q ∼(P ^ Q) ∼P ∼Q (∼P _ ∼Q) T T T F F F F T F F T F T T F T F T T F T F F F T T T T Compare the contents of the fourth and seventh columns.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages35 Page
-
File Size-