Symbolic Logic Ioan Despi [email protected] University of New England July 19, 2013 Outline 1 What is logic? 2 Modus Ponens 3 Features of Rules of Reasoning 4 Necessity in Logic 5 Formal and informal logic 6 Statements 7 Logic Puzzles 8 Basic Concepts 9 Connectives 10 Negation 11 Truth-Tables 12 Logical Equivalence 13 De Morganβs Laws Ioan Despi β Web Programming 2 of 24 What is logic? Logic came from logos[Greek]: sentence, discourse, reason, rule, ratio Logic is the study of the principles of correct reasoning. Many of them, e.g., I principles governing the validity of arguments, that is F whether certain conclusions follow from some given assumptions. Examples: If Tom is an actor, then Tom is rich. Tom is an actor. Therefore, Tom is rich. More: If Deta is in Europe, then Deta is not in China. Deta is in Europe. Therefore, Deta is not in China. Ioan Despi β Web Programming 3 of 24 If π > 3, then π > 2. π > 3. Therefore, π > 2. All Cretans are liars. Ariadna is a Cretan. Therefore, Ariadna is a liar. Modus Ponens These four arguments here are obviously good arguments in the sense that their conclusions follow from the assumptions. If the assumptions of the argument are true, then the conclusion of the argument must also be true. They are all cases of a particular form of argument known as βmodus ponensβ: π βπ If P then Q. π P. Therefore Q. β΄π We shall be discussing validity again later on. Logic is not just concerned with the validity of arguments. Logic also studies I I I consistency, and logical truths, and properties of logical systems such as F F completeness and soundness. But we shall see that these other concepts are also very much related to the concept of validity. Ioan Despi β Web Programming 4 of 24 Features of Rules of Reasoning Modus ponens illustrates two features about the rules of reasoning in logic: 1 Topic-neutrality. I I Modus ponens can be used in reasoning about diverse topics. This is true of all the principles of reasoning in logic. F F F 2 The laws of biology might be true only of living creatures, and the laws of economics are only applicable to collections of agents that enagage in financial transactions, but the principles of logic are universal principles which are more general than biology and economics. Non-contingency, I I I They do not depend on any particular accidental features of the world. The theories in the empirical sciences (physics, biology) are contingent in the sense that they could have been otherwise. The principles of logic, on the other hand, are derived using reasoning only, and their validity does not depend on any contingent features of the world. Ioan Despi β Web Programming 5 of 24 Two Definitions This is what is implied in the definitions of logic by two famous logicians: Figure : Alfred Tarski (1901-1983) Figure : Gottlob Frege (1848-1925) βlogic. . . [is] . . . the name of a discipline which analyzes the meaning of the concepts common to all the sciences, and establishes the general laws governing the concepts. β βTo discover truths is the task of all sciences; it falls to logic to discern the laws of truth. ... I assign to logic the task of discovering the laws of truth, not of assertion or thought.β Ioan Despi β Web Programming 6 of 24 Necessity in Logic The theories in the empirical sciences are contingent in the sense that they could have been otherwise. The principles of logic are derived using reasoning only, and their validity does not depend on any contingent features of the world. Example: I I I I logic tells us that any statement of the form βIf P then Pβ is necessarily true. this principle tells us that a statement such as βif it is snowing, then it is snowingβ must be true. we can easily see that this is indeed the case, whether or not it is actually snowing. even if the laws of physics or weather patterns were to change, this statement will remain true. Thus we say that scientific truths (mathematics aside) are contingent whereas logical truths are necessary. This shows how logic is different from the empirical sciences like physics, chemistry or biology. Ioan Despi β Web Programming 7 of 24 Formal and informal logic One can distinguish between informal and formal logic: Informal logic is used to I I mean the same thing as critical thinking the study of reasoning and fallacies in the context of everyday life. Formal logic is I concerned with formal systems of logic, i.e., F F I specially constructed systems for carrying out proofs, where the languages and rules of reasoning are precisely and carefully defined. Examples: F F Sentential logic (also known as βPropositional logicβ) and Predicate Logic Ioan Despi β Web Programming 8 of 24 Reasons for Studying Formal Logic Formal logic helps us identify I I patterns of good reasoning and patterns of bad reasoning, so we know which to follow and which to avoid. Basic formal logic can help improve critical thinking. Formal systems of logic are also used by I I I I linguists β to study natural languages computer scientists β to research relating to Artificial Intelligence philosophers β to make their reasoning more explicit and precise many other disciplines Ioan Despi β Web Programming 9 of 24 Statements In logic we often talk about the logical properties of statements and how one statement is related to another. There are three main sentence types in English: I I I Declarative sentences are used for assertions, e.g. βShe is here.β Interrogative sentences are used to ask questions, e.g. βIs she here?β Imperative sentences are used for making requests or issuing commands, e.g. βCome here!β In the sequel, we shall only take a statement to be a declarative sentence, i.e., I a complete and grammatical sentence that makes a claim, e.g., F F F F There is no reality, only its reflection. The moon is made of green cheese. Talking brings an audience. Doing brings a profit. Statements can be true or false, and they can be simple or complex. But they must be grammatical and complete sentences. Ioan Despi β Web Programming 10 of 24 Counterexamples and Test These are not statements : I I I I I The Commonwealth of Australia [ A proper name, but not a sentence ] A bridge too far. [ Not a complete sentence ] Sit down! [ A command that is not a complete sentence making a claim ] Are you coming? [ A question ] +*()= [ Ungrammatical ] Test to decide whether something is a statement in English: I given a sentence π, add βit is true that. . . β to the front. F F if the resulting expression is grammatical, then π is a statement. otherwise it is not. Ioan Despi β Web Programming 11 of 24 Logic Puzzles Bob was looking at a photo. Someone asked him βWhose picture are you looking at?β He replied: βI donβt have any brother or sister, but this manβs father is my fatherβs son.β So, whose picture was Bob looking at? The man in the photo is Bobβs son. There was a robbery in which a lot of goods were stolen. The robber(s) left in a truck. It is known that : 1 2 3 Nobody else could have been involved other than A, B and C. C never commits a crime without Aβs participation. B does not know how to drive. So, is A innocent or guilty? A is guilty. Ioan Despi β Web Programming 12 of 24 Basic Concepts A proposition is a statement which is either true or false. A tautology is a proposition which is always true. A contradiction is a proposition which is always false. A compound proposition is build from propositions by the use of connectives and, or, not, implies, and equivalent to. Ioan Despi β Web Programming 13 of 24 Connectives Given two statements (propositions), denoted by π and π respectively, one can use connectives to get the following compound propositions: π β§ π, the conjunction of π and π, meaning βπ and πβ π β¨ π, the disjunction of π and π, meaning βπ or πβ βΌ π, the negation of π, meaning βnot πβ π β π, the implication, meaning βπ implies πβ π β π, the equivalence of π and π, meaning βπ and π are equivalentβ Ioan Despi β Web Programming 14 of 24 Negation The negation of a statement π is a statement whose truth-value is necessarily opposite to that of π. For any English sentence π, you can form its negation by appending βit is not the case thatβ to π to form the longer statement it is not the case that π. In formal logic, the negation of π can be written as βΌ π or ¬ π. A statement and its negation I can never be true together I exhaust all logical possibilities F F they are logically inconsistent with each other. in any situation, one and only one of them must be true. Here are some concrete examples: π βΌπ It is snowing. It is not the case that it is snowing. (i.e., It is not snowing.) 1+1=2 It is not the case that 1 + 1 = 2. (i.e., 1 + 1 is not 2.) Ioan Despi β Web Programming 15 of 24 Logical Values In Propositional Logic there are only two truth-values : T and F, which stand for truth and falsity, respectively. Some textbooks use β1β and β0β in place of βTβ and βFβ. I I To say that a statement has truth-value T is just to say that it is true. To say that its truth-value is F is to say that it is false. The principle of bivalence: a WFF either has truth-value T or F. The principle of excluded middle [tertium non datur] states that for any proposition, either that proposition is true, or its negation is true. The principle of (non-) contradiction states that no statement can be both true and not true (false). Ioan Despi β Web Programming 16 of 24 Truth-Tables They provide one systematic method for determining the validity of sentences or arguments in Sentential (Propositional) Logic. They show how the truth-value of a complex Well-Formed-Formula (WFF) depends on the truth-values of its component WFFs. A truth table is a complete list of the possible truth values of a statement. We use βTβ to mean βtrueβ, and βFβ to mean βfalseβ (though it may be clearer and quicker to use β1β and β0β respectively). I I I with two propositions there are 4 possibilities with three propositions there are 8 possibilities with π propositions there are 2π possibilities. It is a mathematical tradition to split the first column in two - the first half being all Tβs and the second half being all Fβs, then to split the second column into quarters with Tβs in the first quarter, Fβs in the second quarter and so on, then to split the third column, if there is one, into eights with blocks of Tβs and Fβs alternating, and so on. The truth tables can be taken as the precise definitions for the corresponding connectives. Ioan Despi β Web Programming 17 of 24 Truth-Tables Ioan Despi β Web Programming 18 of 24 Truth-Tables π π π πΉ πΉ π π πΉ π πΉ πβ§π π πΉ πΉ πΉ π π π πΉ πΉ Ioan Despi β Web Programming π π π πΉ πΉ π π πΉ π πΉ π π πΉ π πΉ πβπ π πΉ π π πβ¨π π π π πΉ π π π πΉ πΉ. 19 of 24 π π πΉ π π πΉ π πΉ πβπ π πΉ πΉ π βΌπ πΉ π . Logical Equivalence Definition Two (compound) propositions π and π are said to be equivalent or logically equivalent, denoted by π β‘ π or by π β π, iff (i.e., if and only if) they have the same truth values. In other words, for all possible truth values of the component statements, the compound propositions will have the same truth values. Show (βΌ π) β¨ (βΌ π) and βΌ (π β§ π) are equivalent. Ioan Despi β Web Programming 20 of 24 Example Show (βΌ π) β¨ (βΌ π) and βΌ (π β§ π) are equivalent. Solution. π π π πΉ πΉ π π πΉ π πΉ βΌπ πΉ πΉ π π βΌπ πΉ π πΉ π πβ§π π πΉ πΉ πΉ β β intermediate results not necessary but useful βΌ (π β§ π) πΉ π π π β (βΌ π) β¨ (βΌ π) πΉ π π π β exactly same columns (same truth values) Since the last two columns are the same, we conclude (βΌπ) β¨ (βΌπ) and βΌ(π β§ π) are equivalent. Ioan Despi β Web Programming 21 of 24 Example Show βΌ(π β§ π) and (βΌπ) β§ (βΌπ) are not logically equivalent. Solution. This is manifested in the following truth table π π π πΉ πΉ π π πΉ π πΉ βΌπ πΉ πΉ π π βΌπ πΉ π πΉ π πβ§π π πΉ πΉ πΉ βΌ(π β§ π) πΉ π π π β (βΌ π) β§ (βΌπ) πΉ πΉ πΉ π β not exactly same because the corresponding truth values differ (at 2 places). Ioan Despi β Web Programming 22 of 24 Example Show (π β¨ π) β¨ (βΌ π) is a tautology and (π β§ π) β§ (βΌ π) is a contradiction. Solution. From the following truth table π π π πΉ πΉ π π πΉ π πΉ βΌπ πΉ πΉ π π βΌπ πΉ π πΉ π πβ¨π π π π πΉ πβ§π π πΉ πΉ πΉ (π β¨ π) β¨ (βΌ π) π π π π (π β§ π) β§ (βΌ π) πΉ πΉ πΉ πΉ β β β contradiction β tautology We see that (π β¨ π) β¨ (βΌ π) is always true and is thus a tautology and (π β§ π) β§ (βΌ π) is always false and is thus a contradiction. Ioan Despi β Web Programming 23 of 24 De Morganβs Laws Theorem (i) βΌ (π β§ π) is equivalent to (βΌ π) β¨ (βΌ π) , i.e., βΌ (π β§ π) β‘ (βΌ π) β¨ (βΌ π) (ii) βΌ (π β¨ π) is equivalent to (βΌ π) β§ (βΌ π) , i.e., βΌ (π β¨ π) β‘ (βΌ π) β§ (βΌ π) Proof. (i) already done in the first example ; (ii) can be proved likewise. Theorem π β π β‘ (βΌ π) β¨ π. Proof. Can easily be proved by the use of a truth table. Ioan Despi β Web Programming 24 of 24 Logical Equivalences A number of logical equivalences are summarised in the following theorem. Proofs are left as exercises. Theorem Let π, π, π be propositions and denote by β€ and β₯ tautology, respectively contradiction. Then the following logical equivalences hold. 1. Commutative laws πβ§π β‘πβ§π πβ¨π β‘πβ¨π 2. Associative laws (π β§ π) β§ π β‘ π β§ (π β§ π) (π β¨ π) β¨ π β‘ π β¨ (π β¨ π) 3. Distributive laws π β§ (π β¨ π) β‘ (π β§ π) β¨ (π β§ π) π β¨ (π β§ π) β‘ (π β¨ π) β§ (π β¨ π) 4. Identity laws πβ§β€β‘π πβ¨β₯β‘π 5. Negation laws πβ§ βΌ π β‘ β₯ πβ¨ βΌ π β‘ β€ 6. Double Negation law βΌ (βΌ π) β‘ π 7. Idempotent laws πβ§πβ‘π πβ¨πβ‘π 8. Universal bound laws πβ§β₯β‘β₯ πβ¨β€β‘β€ 9. De Morganβs laws βΌ (π β§ π) β‘ (βΌ π) β¨ (βΌ π) βΌ (π β¨ π) β‘ (βΌ π) β§ (βΌ π) 10. Absorption laws π β§ (π β¨ π) β‘ π π β¨ (π β§ π) β‘ π 11. Negations of β€ and β₯ βΌβ€β‘β₯ βΌβ₯β‘β€ Ioan Despi β Web Programming 25 of 24 Examples Example 5. Use the laws of Theorem ?? to verify the logical equivalence βΌ π β§ βΌ π β‘βΌ (π β¨ (βΌ π β§ π)) Solution. Starting with the most complex side, working toward the other side: βΌ (π β¨ (βΌ π β§ π)) β‘ Ioan Despi β Web Programming βΌ ((πβ¨ βΌ π) β§ (π β¨ π)) Distributivity β‘ βΌ (β€ β§ (π β¨ π)) Identity β‘ βΌ (π β¨ π) β‘ βΌ πβ§ βΌ π 26 of 24 De Morgan Conditional Statements The compound proposition implication πβπ is a conditional statement, and can be read as βif π then πβ or βπ implies πβ, or βπ, if πβ. Its precise definition is given by the following truth table π π πβπ π π π πΉ π πΉ πΉ π π πΉ πΉ π . Let us briefly see why the above definition via the truth table is βreasonableβ and is consistent with our day to day understanding of the notion of implications. We observe that the only explicit contradiction to βif π then πβ comes from the case when π is true but π is false, and this explains the only βπΉ β entry in the π β π column. We also note that some people would never use βπ implies πβ to refer to π β π; they would instead use βπ implies πβ to exclusively refer to π β π, i.e., π β π is a tautology. More details on βββ can be found in one of the later lectures. Ioan Despi β Web Programming 27 of 24 Example Example 6. Let π denote βI buy sharesβ and π denote βIβll be richβ. Then π β π means βIf I buy shares then Iβll be richβ. Solution. Let us check row by row the βreasonablenessβ of the truth table for π β π given shortly before. Row 1: βI buy sharesβ (π true) and βIβll be richβ (π true) is certainly consistent with (π β π) being true. Row 2: βI buy sharesβ and βI wonβt be richβ means βIf I buy shares then Iβll be richβ (i.e., π β π) is false. Row 3 and 4: βI donβt buy sharesβ wonβt contradict our statement π β π, regardless of whether Iβll be rich, as obviously there are other ways to get rich. Ioan Despi β Web Programming 28 of 24 Representation Representation π β π β‘ (βΌ π) β¨ π This can easily be proved by the use of the truth table. Note. Obviously a string like π)) β§ β§ β ππ is not a legitimate logical expression. In this unit, we always assume that all the concerned strings of logical expressions are well-formed formulas, or wffs, i.e., the strings are legitimate. Ioan Despi β Web Programming 29 of 24
© Copyright 2026 Paperzz