2.1 Simle & Comound Proositions 1 2.1 Simle & Comound Proositions Proositional Logic can be used to analyse, simlify and establish the equivalence of statements. A knowledge of logic is essential to the study of mathematics. In order to rove theorems, the rules of logic must be known. In logic, the rocess of establishing the validity of a deduction is called an argument. In mathematics, the deduced statement whose truth is to be established is called a theorem and the rocess of establishing its validity is called a roof. Aristotle (384-322B.C.) has been called the father of traditional logic as he is generally credited with being the first to develo a framework of logical knowledge. He believed that logical thought according to his methods was the only certain way of attaining scientific knowledge. The organisation and formalisation of logic and the deductive reasoning rocess as a branch of mathematics (rather than hilosohy) was carried out largely by De Morgan (1806-1871) and Boole (1815-1864). They believed that the use of language was a major hindrance to the reasoning rocess. Thus they devised a system of symbolic logic in which the validity of a deduction deends entirely on the form or structure of the thought rocesses involved (and no knowledge of the subject matter in question is necessary). Conclusions are then reached by maniulating the symbols according to a set of rules. Practical alications of roositional logic include the efficient oeration of comuter-based exert systems where the user may hrase questions differently or answer in different ways and yet the comuter can decide when the answers are logically equivalent. A roosition is a statement for which it is immediately decidable whether it is true (T ) or false (F ) but not both. T and F are called the truth values of a roosition. Questions, commands and exclamations are not roositions. Examles: Proositions: 1 : The year 1973 was a lea year (read as 1 is the roosition that the year... ). 2 : 7 is a rime number. 3 : It is raining. Statements which are not roositions: s 1 : Maths is fun. s 2 : n is a rime number. s 3 : He is the President of the United States. Note that s 1 is a subjective judgement and hence is not a roosition. Statements that involve ronouns or variables (such as s 2, s 3 ) are not readily decidable as true or false and are therefore not roositions. However, as soon as the ronoun or variable is secified these statements become roositions such statements are called redicates (or sometimes oen sentences). Given any roosition, there is an associated roosition called the negation of. This is denoted by and read as not. The negation,, of a roosition always has recisely the oosite truth value to that of itself, i.e. when is true, is false and vice versa. Examles: From above 1 : The year 1973 is not a lea year. 2 : 7 is not a rime number. 3 : It is not raining. 4 : 2n = n 2 for some ositive integer n. 4 : 2n n 2 for all ositive integers n.
2.1 Simle & Comound Proositions 2 Note: sometimes or is used to denote not. Simle roositions can be combined to give comound roositions using connectives. Examles: Simle roositions: 1 : It is raining. 2 : I am wet. Comound roositions: 3 : It is raining and I am wet. 4 : It is raining or I am wet. 5 : It is raining and I am not wet. The symbol is used for and ; the symbol is used for or. Thus 3 could be written as 1 2, 4 could be written as 1 2 and 5 as 1 2. q is called the conjunction of and q, whereas q is called the disjunction of and q. Note that is the inclusive or, i.e. q is true whenever at least one of the roositions, q is true, including the ossibility that both are true. 1 Thus, q has the truth value F only when and q both have value F. A truth table summarises or lists the ossible truth values for a roosition. It is best to list the ossibilities systematically to ensure none have been missed. To construct a truth table for a T F F T Table 1: Truth table for. q q T T T T F T F T T F F F Table 2: Truth table for q. q q T T T T F F F T F F F F Table 3: Truth table for q. comound or comlex formulae, work out the truth values for the various comonents and work u to the formula ste by ste. 1 The word or is sometimes used to mean the exclusive or in general usage. For instance, you may have tea or coffee generally means that you may have tea or you may have coffee, but you may not have both.
2.1 Simle & Comound Proositions 3 Examle: q q ( q) T T T F T F T F F T T F F F F T Table 4: Truth table for ( q). q q ( ) ( q) T T F F F T F F T F F T T F F F F T T T Table 5: Truth table for ( ) ( q). In the examle above, it is evident that the truth values of ( ) ( q) are exactly the same as those of ( q), i.e. when and q are both true, ( ) ( q) is false, as is ( q) and so on. ( ) ( q) and ( q) are said to be logically equivalent, denoted ( ) ( q) ( q). As an illustration of this equivalence suose is the roosition Mary attended class yesterday and q is the roosition John attended class yesterday. Then ( q) means neither Mary nor John attended class yesterday and ( ) ( q) means that both Mary and John skied class yesterday. The following is a list of equivalent formulae: Commutative Laws: q q q q Associative Laws: ( q) r (q r) ( q) r (q r) Idemotent Laws: Distributive Laws: (q r) ( q) ( r) (q r) ( q) ( r) Double Negation Law: ( ) De Morgan s Laws: ( q) q ( q) q All of these equivalences can be verified using truth tables.
2.1 Simle & Comound Proositions 4 Such equivalences allow many formulae to be simlified. Examles: 1. ( q) ( q) q. 2. (q ) ( q ( )) ( q ) q ( ) q. Some formulae are either always true or always false. Formulae which are always true are called tautologies; whereas formulae which are always false are called contradictions. For instance, is a tautology and is a contradiction. Truth tables can be used to verify these assertions. T F T F F T T F Table 6: Truth table for and. Examle: The truth table for (q ) shows it to be a tautology. q q (q ) T T F T T T F F F T F T T T T F F T T T Table 7: Truth table for (q ). In the following, suose t is a tautology, c is a contradiction and is any roosition. Tautology Laws: t t t t c Contradiction Laws: c c c c t (Once again truth tables can be used to verify these laws.) Examle: Reconsider the exression (q ) it can be maniulated using the equivalences above to give (q ) ( q) ( ) q t q t where t is a tautology. Thus, (q ) has been shown to a tautology (without recourse to a truth table).
2.1 Simle & Comound Proositions 5 Note on Sets An analogy can be drawn between roositional logic and set algebra. Suose A, B, C are sets and (x), q(x), r(x) are roositions 2 where (x) : x is an element of A, q(x) : x is an element of B, r(x) : x is an element of C. Now x A B is equivalent to (x A and x B) which corresonds to (x) q(x). Likewise, x A B is equivalent to (x A or x B) which A which corresonds to (x). In this analogy, x is an element of the null set ({} or ), corresonds to a contradiction and x is an element of the universal set, U, to a tautology. All the laws seen reviously, carry over to the algebra of sets. The Use of Logic in Circuits Consider an electronic circuit with various switches that may be on (closed) or off (oen). Current will flow along a articular ath when the switches are closed. Current will flow from the inut to the outut when all switches along some ath from inut to outut are closed. Let c,, q, r be the following roositions: c: current flows from inut to outut, : current flows through switch, q: current flows through switch q, r: current flows through switch r, and consider the circuits given below and overleaf. 1. Suose there are two switches in the circuit connected in arallel. q Current flows from inut to outut when alone is closed, or q alone is closed or both switches are closed. Here c q. 2 (x), q(x), r(x) are used here instead of, q, r to stress that these are statements about x. Recall that a statement containing a variable cannot be described as being true or false until the value of the variable is known. The set of all values of x for which (x) is true is then called the truth set of (x).
2.1 Simle & Comound Proositions 6 2. Suose there are two switches in the circuit connected in series. q Current will only flow from inut to outut when both and q are closed. Here c q. 3. Suose three switches are connected as shown below. q Here c q r. r 4. Suose three switches are connected as shown below. q r Here c (q r).