Module 3: LOGIC LEARNING OUTCOMES: In this lesson, you will be able to: recognize the difference between proposition and mere sentences; express compound proposition using appropriate connectives; give real-life situations in the form of compound propositions; determine the truth value of propositions by constructing truth table; symbolize proposition using connectives; define tautology, contingency, and contradiction; identify if a proposition is tautology, contingency, and contradiction; recognize the antecedent and consequent of conditional statements; write converse, inverse and contrapositive of conditional statements; determine if two propositions are logically equivalent; give real life situations of conditional statements; illustrate an argument using Euler diagram; determine if an argument is valid or invalid using Euler diagram; and state real life arguments that involve quantifiers. 3.1 Propositions The rules of mathematical logic specify methods of reasoning mathematical statements. Greek philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the theoretical base for many areas of mathematics and consequently computer science. It has many practical applications in computer science like design of computing machines, artificial intelligence, definition of data structures for programming languages etc. Propositional Logic is concerned with statements to which the truth values, “true” and “false”, can be assigned. The purpose is to analyze these statements either individually or in a composite manner. Prepositional Logic A proposition is a collection of declarative statements that has either a truth value "true” or a truth value "false". A propositional consists of propositional variables and connectives. What is declarative sentence? simply statements that relay information written in the present tense and expresses a direct statement It can be a simple or compound sentence consists of a subject and a predicate end with period its state a complete thought Example: Identify which of the following is a proposition or mere sentence. If the answer is mere sentence, justify your answer. 1. How do you spot fake news? Answer: Mere sentence. Since it does not satisfy the definition of proposition that ends with a period, how do you spot fake news? Is an interrogative sentence. 2. I exercise my right to vote. Answer: Proposition 3.2 Compound statement To create a compound statement, connectives like and, or, if…then, and if and only if are used. The symbol p, q, r, and s represents simple statements. Below are the symbols used for connectives. Connective And Or If…then If and only if Symbols ⋀ ∨ ⟶ ⟷ Type of statement conjunction Disjunction Conditional Biconditional For negation the symbol is ~ means not. Example: Write the corresponding statement of each proposition if p stands for “Thermodynamics is a branch of Physics.” And q stands for “Thermodynamics deals with the movement of heat.” 1. ~𝑝 Thermodynamics is not a branch of Physics 2. ~𝑞 Thermodynamics does not deals with the movement of heat. 3. 𝑝⋀𝑞 Thermodynamics is a branch of Physics and Thermodynamics does not deals with the movement of heat. 3.3 TRUTH TABLES AND TAUTOLOGIES Truth table- is a mathematical table used to determine if a compound statement is true or false. In a truth table, each statement is typically represented by a letter or variable, like p, q, or r, and each statement also has its own corresponding column in the truth table that lists all of the possible truth values. 1. Negation (not): Opposite truth value from the statement. ~ ¬ Negation P ~𝑝 T F F T 2. Conjunction (and): Only true when both statements are true. ∧ Conjunction P T T F F Q T F T F p∧q T F F F 3. Disjunction (or): Only false when both statements are false. ∨ Disjunction P T T F F Q T F T F p∨q T T T F 4. NOR – Logical NOR (symbolically: ↓)is the exact opposite of OR. It requires both p and q to be False to result in True. ↓ NOR P T T F F Q T F T F p↓q F F F T 5. Conditional (Implication)- Logical implication (symbolically: p→ 𝑞, also known as “if-then”, results True in all cases except the case T → F. Since this can be a little tricky to remember, it can be helpful to note that this is logically equivalent to ¬ p v q (read: not p or q). P T T F F Q T F T F p→q T F T T 6. Biconditional – also known as the logical equality or if and only if (symbolically: ↔), only True if the both statements are true and even both statements are false will results to true. P T T F F Q T F T F p ⟷q T F F T Example 1. Construct a truth table for (𝑞 ∨∼ 𝑝) ∨∼ 𝑞 P q ∼𝑝 𝑞 ∨∼ 𝑝 ∼𝑞 (𝑞 ∨∼ 𝑝) ∨∼ 𝑞 T T F T F T T F F F T T F T T T F T F F T T T T Therefore, this compound statement is a tautology. Remember: A compound statement that is always true is called a tautology. A statement that is always false is called a contradictory or self-contradiction. A statement formed that has true and false is called contingency. 2. Construct a truth table for ∼ (𝑝 ∧ q) P Q 𝑝∧q ∼ (𝑝 ∧ q) T T T F T F F T F T F T F F F T Therefore, this compound statement is contingency. 3. Construct a truth table for (∼ 𝑝 ∨ 𝑞) ∧∼ 𝑞 P Q ∼𝑝 ∼𝑝∨𝑞 ∼𝑞 (∼ 𝑝 ∨ 𝑞) ∧ ∼𝑞 T T F T F F T F F F T F F T T T F F F F T T T T Therefore, this compound statement is contingency. 4. Construct the truth table for [(𝑝 → 𝑞) ∧∼ 𝑞] → ~𝑝 P Q 𝑝→𝑞 ∼𝑞 (𝑝 → 𝑞) ∧∼ 𝑞 ~𝑝 [(𝑝 → 𝑞) ∧∼ 𝑞] → ~𝑝 T T T F F F T T F F T F F T F T T F F T T F F T T T T T Therefore, this compound statement is a tautology. For p, q, and r the truth table is: P q R T T T T T F T F T T F F F T T F T F F F T F F F 3.4 Conditional and related statements As a student, you have deadlines to beat. The professor’s line “If you do not pass your requirements on time, then I will give you a failing mark,” is called a conditional statement. Conditional statements are written in the form of if p, then q or if p, q. The p statement is called antecedent, and the q statement is called the consequent. If the premise and conclusion of a conditional statement is interchanged, it is called converse. Inverse is the negation of both the premise and the conclusion. Negating the converse statements is called contrapositive. Study the example below. Let p stands for “The mass of an object increase” and q stands for “The weight of an object increases”. Write the conditional, converse, inverse, and contrapositive statements using the given notations. Indicate the notation for each statement. Kind Statement Notation Conditional If the mass of an object increases, then its weight increases 𝑝⟶𝑞 Converse If the weight of an object increases, then its mass increases 𝑞⟶𝑝 Inverse If the mass of an object does not increases, then its weight does not increases ~𝑝 ⟶ ~𝑞 Contrapositive If the weight of an object does not increases, then its mass does not increases ~𝑞 ⟶ ~𝑝 3.5 Logical equivalence Two propositions are materially equivalent if they have the same truth values. It also means that they materially imply to each other. If the biconditional that expresses their material equivalence is a tautology, then the two propositions are said to be logically equivalent. In symbol, 𝑝 ≡ 𝑞. Example 1: Show that 𝑝 ⟷ ~~𝑝 are logically equivalent. P ~𝑝 ~~𝑝 𝑝 ⟷ ~~𝑝 T F T T F T F T Since 𝑝 ⟷ ~~𝑝 is a tautology, then the two statements are logically equivalent. In symbols, 𝑝 ≡ ~~𝑝. Example 2: Show that ~(𝑝⋀𝑞) ⟷ (~𝑝⋁~𝑞) are logically equivalent. P q (𝑝⋀𝑞) ~(𝑝⋀𝑞) ~𝑝 ~𝑞 (~𝑝⋁~𝑞) ~(𝑝⋀𝑞) ⟷ (~𝑝⋁~𝑞) T T T F F F F T T F F T F T T T F T F T T F T T F F F T T T T T Since ~(𝑝⋀𝑞) ⟷ (~𝑝⋁~𝑞) is a tautology, then the two statements are logically equivalent. In symbols, ~(𝑝⋀𝑞) ≡ (~𝑝⋁~𝑞) . 3.6 Arguments and Euler Diagrams Exploration: Given the first and second premise identify what will be the conclusion. 1. First premise: If I am eighteen years old, then I can exercise my right to vote. Second premise: I am eighteen years old. Conclusion: _______________________________________________________ 2. First premise: Plastics do not biodegrade. Second premise: Plastics straws cannot be easily recycled. Conclusion: _____________________________________________________ Premises are set of statements. An argument is composed of premises and conclusion. If all the premises are assumed to be valid and the conclusion is true, then the argument is valid. Otherwise, it is invalid. Study the example below. Example 1: First premise: If I am eighteen years old, then I can exercise my right to vote. Second premise: I am eighteen years old. Conclusion: therefore, I can exercise my right to vote. Example 2: First premise: Plastics do not biodegrade. Second premise: Plastics straws cannot be easily recycled. Conclusion: Plastic do not biodegrade, and plastic straws cannot be easily recycled. Leonhard Euler, a Mathematician, used to identify if an argument that has quantifiers is valid or not. Euler diagram is used to show the relationship between two sets. Study the figures below. Example 1: Identify if the argument is valid or invalid by using Euler diagram. All indigenous vegetables are rich in minerals Malunggay is an indigenous vegetables. Therefore, malunggay is rich in minerals. Food rich in minerals Indigenous Vegetables m m m m Therefore the argument is valid. Module 3 Activity 3: LOGIC General instruction: In every activity always indicate your complete name, course and time. Copying or sharing of answer is highly discouraged. You can use bond paper or yellow pad paper in answering the activity. Answers can be handwritten or computer – encoded. If answers are handwritten, it should be legible, otherwise, your score will be deducted. (100points) Part 1: Identify which of the following is a proposition or mere sentence. If the answer is mere sentence, justify your answer. 1. The variable x, y and z are all irrational numbers. Answer: ______________________________________________________________________ 2. Is our professor present today? Answer: _____________________________________________________________________________ 3. Recycle. Answer: ______________________________________________________________________________ 4. 1 + √4 = 5. Answer: _______________________________________________________________________ 5 42𝑥−1 = 64 Answer: _______________________________________________________________________ 6. Any nonzero real number divided by zero is not defined. Answer: _______________________________________________________________________ 7. 𝑓(𝑥) = log 2 𝑥 = 16 Answer: _______________________________________________________________________ 8. 𝑥 + 𝑦 ≥ 12. Answer: _______________________________________________________________________ Answer the following questions. 9. Do you consider all equations propositions? Justify your answer by giving examples. _____________________________________________________________________________________ _______________________________________________________ 10. If an inequality involves two variables, when can it be considered as a proposition when is it not? Justify your answer by giving examples. _____________________________________________________________________________________ _____________________________________________________________________________________ _______________________________________ Part 2: Write the corresponding statement of each proposition if p stands for “Thermodynamics is a branch of Physics.” And q stands for “Thermodynamics deals with the movement of heat.” 1. 𝑞⋁𝑝 ____________________________________________________________ 2. 𝑝 ⟶ 𝑞 ____________________________________________________________ 3. 𝑞 ⟶ 𝑝 ____________________________________________________________ 4. ~(𝑝⋀𝑞) ____________________________________________________________ 5. ~(𝑝⋁𝑞) ____________________________________________________________ Part 3: Identify if each of the following statement as a tautology, contradiction, or contingency by constructing a truth table. 1. ( 𝑞 → ~𝑝) ∨ (𝑞 ∧ ~𝑝) 2. (𝑝 → ~𝑟) ∧ (~𝑝 ↔ 𝑞) Part 4: Write each statement in if-then statement form. Then write its converse, inverse, and contrapositive. 1. Two parallel lines do not have a point of intersection. Statement Conditional Converse Inverse Contrapositive 2. The sum of two even numbers is even. Statement Conditional Converse Inverse Contrapositive 3. An even number is divisible by 2. Statement Conditional Converse Inverse Contrapositive Part 5: Show that ~(𝑝⋁𝑞) ⟷ (~𝑝 → ~𝑞) are logically equivalent. Part 6: Identify if the argument is valid or invalid by using Euler Diagram. 1. All accountants are good at math and all who are good at math are also smart. Leah is good at math. ∴ Leah is smart. 2. Some students of Ramon Magsaysay are smart. Carl is smart. ∴ Carl is a student of Ramon Magsaysay. 3. No proud person is good. All successful people are good. ∴ No proud person is successful. At the end of this module, I have learned that… _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ __________________________________________________________________________________________. HONESTY is the foundation of TRUST.