
Math 0413 Appendix A.0 Logic Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another. This type of logic is called propositional. Definition A sentence with truth value (True/False, T/F) is called a proposition (or a statement). Types of mathematical operations: • Nullary. It has no arguments. • Unary. It has one argument. Arithmetic examples: −a, 1=a. • Binary. It has two arguments. Arithmetic examples: a + b, a − b, a × b, a ÷ b, ab. • Ternary. It has three arguments. • n-ary. It has n arguments. Many mathematical operations can be treated as functions of the corresponding number of arguments. For example, in Arithmetic the addition a + b, being a binary operation, can be defined as a function of two arguments (variables) f(a; b) = a + b. In logic arguments of a function are propositions. The domain of the function is finite and made of all possible combinations of truth values (T and F) of corresponding propositions. It is discrete and finite. The range of a function is either T, or F, or both T and F. The range is also discrete and finite. Because domain and range both are finite the total number of possible functions has to be finite. The following examples explain the concept. Example 1. Consider a proposition P. We want to define the set of all functions of P. The proposition P has two truth values T and F. The list of all possible truth values is T and F. So, the domain of a function is a set of two values. Each function has to be defined at these two values. For example, two possible functions are f1(T ) = T , f1(F ) = T and f2(T ) = T , f2(F ) = F . These functions are different since f1(F ) 6= f2(T ). What is the total number of functions of P? For each of two truth values in the domain there are two truth values in the range. The total number of combinations is 22 = 4. Therefore, there are four different functions of one argument P. The following table lists all of them 1 P j f1 f2 f3 f4 T j TTFF F j TFTF Example 2. Consider two propositions P and Q and all functions f(P; Q). Each of propositions has two truth values T and F. The list of all possible combinations (pairs) of truth values for P and Q is (T,T), (T,F), (F,T), and (F,F). So, the domain of a function of P and Q is a set of four pairs of truth values. Each function has to be defined at these pairs. For each of four pairs in the domain there are two values in the range. The total number of possible combinations is 24 = 16. Therefore, there are sixteen different functions of two arguments P and Q. Example 3. Consider three propositions P, Q, and R and all functions f(P; Q; R). Each of propositions has two truth values T and F. The list of all possible combinations (triplets) of truth values is (T,T,T), (T,T,F), (T,F,T), (T,F,F), (F,T,T), (F,T,F), (F,F,T), and (T,F,F). So, the domain of a function is a set of eight triplets. For each of eight values in the domain there are two values in the range. The total number of possible combinations is 28 = 256. Therefore, there are 256 different functions of three propositions. Now let's analyze types of operations in terms of functions. Unary Unary operation is a function of one proposition P. As it was shown above there are four such functions. Let's look at their table again and emphasize a nontrivial function: P j f1 f2 f3 f4 T j TT F F F j TF T F The functions f1 and f4 are constant (f1 = T , f4 = F ) and hence trivial. The function f2 is also trivial since f2(P ) = P . The only nontrivial function of one argument is f3 and hence it is special. In logic it is called negation and denoted by ∼ P (or :P ). Please remember this function. 2 Binary It is defined on the four pairs of truth values of two proposition P and Q. Those pairs are (T;T ), (T;F ), (F; T ), and (F; F ). Therefore, the domain of a function contains four points. For each point a function can attain two values either T or F. Hence the total number of all possible binary functions is 24 = 16. Here is the table of them: PQ j f1 f2 f3 f4 f5 f6 f7 f8 TT j T T T T T T T T TF j T T T T F F F F FT j T T F F T T F F FF j T F T F T F T F PQ j f9 f10 f11 f12 f13 f14 f15 f16 TT j FFFFFFFF TF j TTTTFFFF FT j TTFFTTFF FF j TFTFTFTF The functions f9 − f16 are negations of the functions f1 − f8 and can be removed (f16 is negation to f1, f15 is negation to f2, and etc.) The function f1 = T is constant, f4 = P , f6 = Q. The only nontrivial functions are f2, f3, f5, f7, and f8, and they have special names and notations that have to be remembered: f8 is called logic AND (conjunction) and denoted by P ^ Q f2 is called logic OR (disjunction) and denoted by P _ Q f5 is called conditional (implication) and denoted by P ) Q f7 is called biconditional (double implication) and denoted by P , Q We omitted f3 which is another conditional Q ) P because it is similar to f5. Sometimes f10 is called exclusive OR and denoted by P Y Q. We are not going to use it here since it is just a negation of f7. A conditional proposition can be expressed as "If P then Q", where P is called a hypothesis and Q is called a conclusion. 3 Ternary It contains three propositions and its domain is made of 23 = 8 triplets of truth values of the propositions. The total number of all possible ternary functions is 28 = 256. This number is huge and there is no way to list and remember them all. So, this way is not productive. A productive way is to represent a ternary function as a combination of unary and binary functions. The same is true for any function with the number of arguments greater than three. That is why in logic we do not define operations with the number of arguments greater than two. Although functions of three and more arguments are under consideration. Logic operations and their truth tables A table which is similar to the previous tables and representing one logic operation is called a truth table for the logic operation. Below are truth tables for one unary and all four binary logic operations that have to be memorized Truth table for ∼ P : P j ∼ P T j F F j T Truth table for P ^ Q: PQ j P ^ Q TT j T TF j F FT j F FF j F Truth table for P _ Q: PQ j P _ Q TT j T TF j T FT j T FF j F 4 Truth table for P ) Q: PQ j P ) Q TT j T TF j F FT j T FF j T Truth table for P , Q: PQ j P , Q TT j T TF j F FT j F FF j T Compound propositions Binary logic operations are called connectives. A proposition made of several propositions and containing unary and binary operations is called a compound proposition or a formula. Primitive propositions that do not contain unary or binary operations are called atoms. Order of operations In compound propositions the following order of operations is applied: • Negation • Logic AND precedes logic OR In other cases use parentheses to specify the order of operations. Example. ∼ P ^ Q _ R is not the same as ∼ P ^ (Q _ R) or ∼ (P ^ Q) _ R. Example. Find the truth table for the compound proposition ∼ P _ Q 5 Solution: PQ j ∼ P ∼ P _ Q TT j FT TF j FF FT j TT FF j TT Equivalent propositions Two propositions are equivalent if their truth tables are the same. Example. Show that ∼ P _ Q is equivalent to P ) Q. Solution: The truth table for P ) Q is PQ j P ) Q TT j T TF j F FT j T FF j T which equals to truth table ∼ P _ Q in the previous example. Hence these two propositions are equivalent. Alternative solution: Construct the truth table for the compound proposition (∼ P _ Q) , (P ) Q) and show that its last column contains only T values. Example. By constructing truth tables prove De Morgan's Law (∼(P _ Q)) , (∼P ^ ∼Q), where the sign , means equivalence. Solution: Truth table: PQP _ Q ∼(P _ Q) ∼P ∼Q ∼P ^ ∼Q TTTFFFF TFTFFTF FTTFTFF FFFTTTT The fourth and seventh columns are equivalent. Hence, De Morgan's Law is true. Alternative solution: Construct the truth table for the compound proposition (∼(P _ Q)) , (∼P ^ ∼Q) and show that its last column contains only T values. 6 Definition [1] A compound proposition that is true regardless of the truth values of its atoms is called a tautology. Example. By constructing truth table show that the proposition (P ^ Q) ) P is a tautology.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-