Propositions
Total Page:16
File Type:pdf, Size:1020Kb
Module 1: Basic Logic Theme 1: Propositions English sentences are either true or false or neither. Consider the following sentences: 1. Warsaw is the capital of Poland. 2. ¾·5 = ¿. 3. How are you? The first sentence is true, the second is false, while the last one is neither true nor false. A statement that is either true or false but not both is called a proposition. Propositional logic deals with such statements and compound propositions that combine together simple propositions (e.g., combining sentences (1) and (2) above we may say “Warsaw is the capital of Poland and ¾·5=¿”). In order to build compound propositions we need rules on how to combine propositions. We Õ Ö denote propositions by lowercase letters Ô, or . Let us define: Ô Õ Ô ^ Õ ¯ The conjunction of and , denoted as , is the proposition Ô aÒd Õ; Õ and it is true when both Ô and are true and false otherwise. Ô Õ Ô _ Õ ¯ The disjunction of and , denoted as , is the proposition Ô ÓÖ Õ; Õ and it is false when both Ô and are false and true otherwise. Ô :Ô Ô ¯ The negation of , denoted either as or , is the proposition It is not true that Ô. = Õ = Ô _ Õ Example 1:LetÔ “Hawks swoop” and “Gulls glide”. Then isthesameas“Hawksswoop or gulls glide”. We also can translate back. For example, the English sentence “it is not true that Ô hawks swoop” can be written as : . Exercise 1A: With the same notation as in the example above write the following propositions sym- bolically: ¯ It is not true that “Hawks swoop and gulls glide”. ¯ “Hawks do not swoop or gulls do not glide”. 1 Theme 2: Truth Tables We can express compound propositions using a truth table that displays the relationships between the truth values of the simple propositions and the compound proposition. In the next three tables we show the truth tables for the negation, conjunction, and disjunction. Observe that any proposition Ì F Ô can take only two values, namely true, denoted ,orfalse, denoted . Therefore, for a com- ^ Õ µ pound proposition consisting of two propositions (e.g., Ô we must consider only four possible F assignments of Ì and . Table 1: The truth table for the negation. Ô :Ô T F F T Table 2: The truth table for the conjunction. Ô Õ Ô ^ Õ TTT TFF FTF FFF Table 3: The truth table for the disjunction. Ô Õ Ô _ Õ TTT TFT FTT FFF In this module we will often use truth tables. To construct a truth table for a statement (e.g., Ô _ Õ Ô Õ : ) containing two propositions, say and , one first builds two columns with all possible vales Õ ´Ì; Ì µ; ´Ì; F µ; ´F; Ì µ; ´F; F µ of Ô and (i.e., ), and then follows already accepted rules of inference Ô _ Õ to determine the truth value of the compound statement (say : ). Exercise 1B: Construct truth tables for the following statements: Ô ^:Ô ¯ ; Ô _:Õ ¯ . 2 Theme 3: Implications ¾ =¾ Ü =4 In mathematics we often deal with conditional statements like: “if Ü , then .Theif–then ! Õ Ô Õ statement is called implication and it is denoted as Ô . It is false when is true and is false and ! Õ true otherwise. The reader may inspect the truth table of Ô in Table 4 below. Table 4: The truth table for the implication. Ô Õ Ô ! Õ TTT TFF FTT FFT ! Õ Ô Õ It is important to emphasize that Ô is false only when is true and is false. In words, truth cannot imply a false statement, but false can imply truth. For example, consider the following statement ¾ if Ü = ¾; ØheÒ Ü =4 =¾ which is true even if the first part of this compound statement is not true, say when Ü . ! Õ Ô In the implication Ô , the proposition is called hypothesis or antecedent and the proposition Ô Õ is known as conclusion or consequent. The conclusion expresses a necessary condition for , while the hypothesis expresses a sufficient condition for Õ to hold. Some other common ways of ! Õ expressing the implication Ô are: Ô Õ ¯ if ,then ; Ô Õ ¯ implies ; Ô Õ ¯ if , ; Ô Õ ¯ only if ; Ô Õ ¯ is sufficient for ; Õ Ô ¯ if ; Õ Ô ¯ whenever ; Õ Ô ¯ is necessary for . Exercise 1C: Make truth tables for the following statements: !:Õ 1. Ô ; Ô ^:Õ µ ! Ö 2. ´ . 3 ! Õ There are some important related implications following from Ô , namely: ! Ô 1. The proposition Õ is called the converse. ! Õ :Õ !:Ô 2. The contrapositive of Ô is ; Ô !:Õ 3. The inverse is : . In Table 5 we compare the truth values of these propositions. Table 5: The truth table for the implication, contrapositive, converse, and inverse. Ô Õ Ô ! Õ :Õ !:Ô Õ ! Ô :Ô !:Õ TTT T T T TFF F T T FTT T F F FFT T T T É We say that two compound propositions È and are logically equivalent if they have the same truth values. We shall write È É or È ¸ É: ! Õ It should be observed from Table 5 that the implication Ô has the same truth values as the Õ !:Ô contrapositive : , but not as the converse and the inverse. Thus we can write Ô ! Õ :Õ !:Ô; Ô ! Õ 6 :Ô !:Õ; Ô ! Õ 6 Õ ! Ô: Example 2: Prove that Ô ! Õ :Ô _ Õ: We use the truth table. Our computation is shown in Table 6. Comparing the second column with the ! Õ :Ô _ Õ last one, we see that the truth values are the same for Ô and , so the above two compound propositions are logically equivalent. Table 6: The truth table for Example 2. Ô Õ Ô ! Õ :Ô :Ô _ Õ TTT F T TFF F F FTT T T FFT T T 4 Exercise 1D: Using the truth table prove that the following propositions are logically equivalent: Ô _ ´Õ ^ Ö µ ´Ô _ Õ µ ^ ´Ô _ Ö µ: In Exercise 1D the reader was asked to prove logical equivalence that is known under the name distributive law. This is an example of many other logical equivalences that we list in Table 7 and prove in the sequel. Table 7: Logical Equivalences Equivalence Name ^ Ì Ô Ô Identity laws Ô _ F Ô _ Ì Ì Ô Domination laws Ô ^ F F _ Ô Ô Ô Idempotent laws Ô ^ Ô Ô ´:Ôµ Ô : Double negation law _ Õ Õ _ Ô Ô Commutative laws Ô ^ Õ Õ ^ Ô _ ´Õ _ Ö µ ´Ô _ Õ µ _ Ö Ô Associative laws Ô ^ ´Õ ^ Ö µ ´Ô ^ Õ µ ^ Ö _ ´Õ ^ Ö µ ´Ô _ Õ µ ^ ´Ô _ Ö µ Ô Distributive laws Ô ^ ´Õ _ Ö µ ´Ô ^ Õ µ _ ´Ô ^ Ö µ ´Ô ^ Õ µ :Ô _:Õ : De Morgan’s laws :´Ô _ Õ µ :Ô ^:Õ All laws listed above can be easily proved using the truth table. The reader is encouraged to try to work out all the truth tables. Having such laws under our belt, we can prove many new logical equivalences without using the truth table. Example 3: Prove that :´Ô _ ´:Ô ^ Õ µµ :Ô ^:Õ :´Ô _ Õ µ: We proceed as follows ´Ô _ ´:Ô ^ Õ µµ :Ô ^:´:Ô ^ Õ µ : De Morgan’s law :Ô ^ ´:´:Ôµ _:Õ µ De Morgan’s law :Ô ^ ´Ô _:Õ µ double negation law ´:Ô ^ Ôµ _ ´:Ô ^:Õ µ distributive law 5 F _ ´:Ô ^:Õ µ :Ô ^ Ô F since ´:Ô ^:Õ µ _ F commutative law ´:Ô ^:Õ µ identity law :´Ô _ Õ µ : De Morgan’s law Thus the above logical equivalence is proved. The above is largely self-explanatory, but a few words of additional information follows: In the first statement above we, naturally, apply De Morgan’s law ´È _ ɵ=:È ^:É É É = :Ô ^ Õ : . In our case, is a compound statement , thus another application É = Ô _:Õ Ô ^ ´Õ _ Ö µ=´Ô ^ Õ µ _ ´Ô ^ Ö µ of De Morgan’s law implies : . Then we “multiply out”, that is, . The rest is simple. A compound proposition is called a tautology if it is always true, no matter what the truth values _:Ô Ì Ô of the propositions (e.g., Ô no matter what is the value of . Why?). A compound proposition is called a contradiction if it is always false, no matter what the truth ^:Ô Ì Ô values of the propositions (e.g., Ô no matter what is the value of . Why?). Finally, a proposition that is neither a tautology nor a contradiction is called a contingency. 6 Theme 4: Predicates and Quantifiers In mathematics we often have to deal with sentences like ¾ : Ü ¾Ü ·½ = ¼ Õ : Ò ; Ô or is a prime number which are not propositions since their values are neither true nor false since the values of the variables Ò È ´Üµ É´Òµ Ü and are not specified. We shall denote such statements as or and call propositional Ò functions or predicates of Ü or . Ü D È More formally, let È be a statement involving the variable that belongs to the set .Then is Ü ¾D È ´Üµ called a propositional function or predicate with respect to D if for each the sentence È is a proposition. The domain D is often called the universe of discourse of . Example 4: The statement above ¾ È ´Üµ: Ü ¾Ü ·½ = ¼ =½ Ü 6=½ É´¿µ É´Òµ Ò is true when Ü and is false for any .