INTRODUCTION TO LOGIC L. MARIZZA A. BAILEY 1. The beginning of Modern Mathematics Before Euclid, there were many mathematicians that made great progress in the knowledge of numbers, algebra and geometry. However, their work was so scattered and disorganized that much of the work was redundant. A volume of known mathematical concepts was necessary to keep mathematics from stagnating. Euclid was the first known mathematician to try to classify mathematical knowledge into the tiers of axioms, definitions, and theorems. An axiom, or postulate, is a statement which we assume in order to build our model of reality. For example, in planar geometry, we assume that between any two points, we can draw only one line between them. This is something that you have taken for granted since you learned what a point and line was. However, when does a line actually exist? Can you draw a line on your piece of paper? Did you answer yes? Actually, since your paper is not infinite, you could, at most, draw a line segment. Well, then, all we need is an infinite plane. What about on the ground? Can you draw an infinite line on the ground? If we were to draw a infinitely long straight line on the ground, we would come right back where we started. Obviously, this is because we live on a sphere. You may say, That isn t a line. Well, let s define line. If we wanted to define a line segment as the shortest path between the two endpoints, and a line to be it s infinite extension, then lines on a sphere are great circles. However, in spherical geometry, there is no unique line between two points. Consider, for example, the north and south pole. There are infinitely many great circles between the two poles. Below are some examples of axioms, which, given the difference, imply a completely different geometrical universe. Euclidean Geometry: Axiom 5: Given a line and a non-collinear point, there exists exactly one line Date: June 21, 2014. 1
2 parallel to the given line through that point. Spherical Geometry: Axiom 5: Given a line and a non-collinear point, there exist no lines parallel to the given line through that point. Hyperbolic Geometry: Axiom 5: Given a line and a non-collinear point, there exist infinitely lines parallel to the given line through that point. These axioms are necessary to build the geometry of each space, and each axiom yields a completely different geometry. Take a minute to illustrate the postulates above to convince yourself that these axioms are a natural consequence of the geometry they specify. Although, these axioms may make sense after a moments thought and some illustrations, they are meaningless if we haven t defined everything clearly. In Euclidean geometry, we imagine a line to be a straight curve which extends indefinitely in two directions but has no width. However, as soon as non-euclidean spaces were required to model physical reality, the definition of line required generalization. The beauty and art of mathematics is that we can define anything into existence in the mathematical world as long as it is well-defined. The ability to create new definitions allows mathematics to keep growing in order to satisfy some new model constructed to appease physicists, chemists, biologists, programmers, engineers, or just the whim of a mathematician. 2. Why Logic is Necessary To create definitions, axioms or prove theorems based on these definitions and axioms, it is necessary to first learn the art of using precise language and developing infallible arguments. Most people think of logic as the analysis of methods and reasoning, but there is more to logic than this. Logic is not interested in the content of an argument, but rather the form of the argument. Mathematics is about precision of argument. Therefore, the natural aim in studying logic is to make the form of argument precise. All men are mortal. Socrates is a man. Hence, Socrates is mortal. The validity of each premise or conclusion is not important. The logical question to answer is whether or not the premise implies the conclusion. However, the form of the argument above is not precise enough to easily identify the premise or conclusion. In order to better understand why precision in form and language is important, we will visit a well known historic paradox that baffled mathematicians at the time and revolutionized mathematics
3 2.1. Russel s Paradox. Not all of the fields of mathematics followed Euclid s example and continued to axiomatize their concepts. For example, in set theory, rather than develop an axiomatized approach to sets, the definition was loosely given as a collection of objects with a well-defined property. This model of set theory is called Naive Set Theory. Unfortunately, it led to a famous paradox found by Russel in 1902. Are you ready? This is going to be mind bender, so get your math pants on. Problem 1. Let A be the collection of all sets that are not members of themselves. Is A A? In other words, is A in this collection, or not? Solution 1. Let us first suppose A is in this collection. Then by its inherent property, it is a not a member of itself. Thus, it cannot be in this collection. WHAT???? Okay, don t give up. We can still suppose that A is not in this collection. But then it cannot satisfy the property that it is not a member of itself. Therefore it must be a member of itself... which means it is in this collection. Aaaaah! Both assumptions contradict themselves, and there is no other possibility. This can only mean one thing... there is something wrong with the entire model!. And that, my dears, is how axiomatic set theory was born. If you didn t like that, here is a simple analogy I was given by a student. Let C be a club that consists of all students who are not in any clubs. (**) If student A is not in any club, then student A is in club C. However, since student A is now in club C, student A is in a club, and can no longer be in club C. Therefore, student A is not in any club. and we go back to (**) Here is some more food for thought. Consider the following sentence, This sentence is false. What is the validity of this statement? Can we judge the validity, or is this statement a semantic paradox. The analysis of these, and other, paradoxes, has led to various suggestions for avoiding them. 3. Logical Connectives Sentences in logic are constructed by using various unary and binary operators. They are defined by truth tables. In fact, logical sentences are considered equivalent if their truth tables are the same. A logical sentence which is always true is called a tautology. In logic, statements are assigned variables, such as P and Q. A statement may be true, denoted, T, or false, F.
4 4. NOT The simplest of the operators is called negation. Definition 1 (negation). The truth function of the statement is negated. P P Negation yields opposite truth value. 5. AND The most natural and commonly used binary operator is the conjunction, or P and Q operator, is denoted P Q. We use the word and in sentences all the time, and it s important that we understand what they mean. Suppose there was a math club at school that only accepted members which are in upper school and in (Calculus or higher). Four students applied to join the club; Student A: 7th grader in Calculus BC Student B: 8th grader in Pre-Calculus Student C: 6th grader in Algebra 2 Student D: 9th grader in Calculus AB Which of the students above would be admitted into the math club? If you answered D, then you are correct! Move on to the next round. The students above had to satisfy both statements: P: Student is in eighth grade or higher Q: Student is in Calculus or higher
5 Definition 2 (and). The conjunction of two statements is given by the the following truth table and is denoted, P Q. P Q P Q T F F F The AND operator is only true when both statements are true. Label the students above with the case they represent in the logic table. 6. OR Another simple and commonly used binary operator is called or, which includes both statements being true, unlike its brother xor, or exclusive or, which is valid when exactly one statement is true. Let s revisit the math club at school. This time, they change the conditions for entry to include those members which are in upper school or have passed pre-calculus. This time when the four students apply to join the club, more of them are able to join; Student A: 7th grader in Calculus BC Student B: 8th grader in Pre-Calculus Student C: 6th grader in Algebra 2 Student D: 9th grader in Calculus AB Which of the students above would be admitted into the math club now that the conditions have changed? If you answered A,B and D, then you are correct! Move on to the next round. The students above had to satisfy at least one of the statements: P: Student is in eighth grade or higher Q: Student is in Calculus or higher Definition 3 (or). P Q is the notation for P or Q and is defined by the truth table below. P Q P Q T T T F The OR operator is only false when both statements are false. Using these three operators, we can construct a various assortment of logical sentences. Below is an example followed by a few exercises.
6 7. Exercises Example 1. Notice that first two columns represent the independent variables P and Q, which can take on values true or false. Columns are added as the logical statement becomes progressively more complicated. The logical sentence below can be thought of as a the functions, negations and or. P Q Q P Q T T F T Notice that the end truth value has changed and is almost the opposite of the truth table for and, which leads us to the first exercise. Exercise 1. Show that the logical sentence P Q is logically equivalent to (P Q). This tautology is called DeMorgan s Law. P Q P Q P Q P Q (P Q) Exercise 2. Show that the logical sentence P Q is logically equivalent to (P Q). This tautology is called DeMorgan s Law. P Q P Q P Q P Q (P Q)
7 8. Implications Conditional Statements are also commonly used and extraordinarily important in the construction of logical arguments. They consist of a premise and a conclusion. Unfortunately, conditional statements are usually given in ambiguous language where the premise and conclusion are difficult to identify. 8.1. Writing Conditional Statements. Below are some examples of conditional statements. Identify the premise of each statement and write it under the column labeled P. Write the conclusion of each statement under the column labeled Q. Do not worry about the validity of each statement, that will be analyzed next. Statement P Q Only women have babies. Joe needs, at least, a C on the test to pass the class. All Joe needs is a B on the test to pass the class. All babies wear diapers. All of the conditional statements above would be more easily understood if they were of the form, or P = Q If P, then Q 9. Validity of Implications It is easy to be confused about the truth value of a conditional statement. Most people are under the impression that if the premise is false, then the implication is false. This, however, cannot be further from the truth. Consider the following statement: If a number is odd, then it is prime. Now consider the number 3. Does it satisfy the hypothesis? Is it prime? Does the existence of the number 3 show the statement to be false? Now consider the number 2. Does it satisfy the hypothesis? Is it prime? Does the existence of the number 2 show the statement to be false? Now consider the number 4. Does it satisfy the hypothesis? Is it prime? Does the existence of the number 4 show the statement to be false? Suppose I gave you the number 9. Does it satisfy the hypothesis? Is it prime?
8 Does the existence of the number 9 show the statement to be false? This last number is a counterexample to the statement and therefore shows that the statement is not true for all numbers, and,hence, is not a true statement. Thus it is an example which shows the premise to be true and the conclusion to be false which yields a the implication false. Below is the truth table for the binary operator, implication: P Q P = Q T F T F The IMPLICATION operator is only false when the premise is true and conclusion false. 10. Exercises Exercise 3. Compute the truth table for the converse of a conditional statement, Q = P P Q Q = P Exercise 4. Compute the truth table for the contrapositive of a conditional statement, Q = P P Q Q P Q = P
9 Exercise 5. Compute the truth table for the inverse of a conditional statement, P = Q P Q P Q P = Q Exercise 6. Which of the statements has a truth table equivalent to the original statement? Converse, Inverse, or Contrapositive? Exercise 7. The binary logical operator if and only if, or logical equivalence, denoted P Q means (P = Q) (Q = P ). Compute the truth table below. P Q P = Q Q = P (P = Q) (Q = P ) Exercise 8. Compute the following truth table and summarize the results. P Q P = Q P Q (P = Q) ( P Q) Basis Scottsdale E-mail address: mbailey@basisscottsdale.org