Propositional Logic Arunesh Ramalingam (M.S. CpE) Basic Connectives and Truth tables: The system of logic is used to provide a mathematical proof of a given situation or to develop algorithms for programs. The logic of mathematics is used to decide whether a statement follows from or is a consequence of one or more other given statements. The study of logic is often called the Algebra of Propositions. Statements or propositions are verbal or written assertions that are declarative sentences and are either true or false, but not both. They are represented by lower case letters of alphabets. Exclamations and commands are not regarded as statements. A sentence whose truth value cannot be determined is not considered a statement. It is referred to as an open statement, e.g., Number x is an integer. The truth value of the statement depends on the value assigned to the variable x. Simple statements which cannot be further broken down into simpler statements are called primitive statements. One or more primitive statements can be combined to form compound statements. There are two ways of creating new statements from existing ones. Negation – (NOT “ ”: NOT Statement 1). The compound statement is true if Statement 1 is false. It is false if Statement 1 is true. Combining two or more statements into a compound statement using logical connectives. (a) Conjunction - (AND “ ”: Statement 1 AND Statement 2). The compound statement is true if both Statement 1 AND Statement 2 are true. (b) Disjunction – (OR “ ”: Statement 1 OR Statement 2). The compound statement is true if either Statement 1 OR Statement 2 OR both are true. (XOR “ ”: Statement 1 XOR Statement 2). The compound statement is true if either Statement 1 or Statement 2 is true but not if both are true. (c) Implication – (“ ” if then, sufficient condition, necessary condition, only if: If Statement 1 Then Statement 2). The hypothesis of the implication (statement1) implies the conclusion (statement 2).The compound statement is true except when Statement 1 is true and Statement 2 is false. (d) Biconditional – (“ ” if and only if, necessary and sufficient condition: Statement 1 if and only if Statement 2). The compound statement is true when both Statement 1 and Statement 2 are true or both are false. The compound statement is false if both Statement 1 and Statement 2 have different truth values. The implication and the Biconditional are not the same. Though in everyday language this difference is generally ignored, the ambiguity must be removed in scientific writing. An Implication should not be interpreted as a Biconditional. If a compound statement is true for all the truth value assignments for its component statements then the compound statement is called a tautology (To). If the compound statement is false for all the truth value assignments for its component statements then the compound statement is called a contradiction (Fo). The ideas of tautology and implication can be used to explain the concept of an valid argument. Any argument starts with a list of given statements called premises and a statement called the conclusion of the argument for the proof of a valid argument it is required to show that if each of the premises (p1, p2…pn) is a true statement , then the conclusion statement q follows logically and is also a true statement. This can be mathematically represented as: (p1 p2 … p n) q. The hypothesis is the conjunction of the n premises. If any one of p1, p2…pn is false, then irrespective of the value of q the implication is true. As a result, if each of the premises is assigned a truth value of 1 for true and if it is found that under these circumstances q also has a truth value of 1 then the implication is a tautology and the argument is said to be a valid argument. Logical Equivalence: The Laws of Logic Two statements are said to be logically equivalent when the first statement is true (or false) when the second statement is correspondingly true (or false). It is denoted as Statement 1 Statement 2. We use the truth tables of the statements (or propositions) to develop an idea of when two such entities are logically equivalent, that is, essentially the same. When two statements are not logically equivalent it is denoted symbolically as Statement 1 Statement 2. Using the concept of logical equivalence the connective for implication of primitive statements can be expressed in terms of negation and disjunction as shown: (p q) ( p q). The Biconditional connective can be represented as: (p q) (p q) (q p) or (p q) ( p q) ( q p). Thus the implication and Biconditional connectives can be removed from compound statements. The concepts of logical Page 1 of 5 equivalence, tautology, contradiction can be used to formulate a few laws as shown in Table 1 for the algebra of propositions. Sl. no Symbolic Notation 1. p 2. 4. q) ( (p q) ( p p 5. p p p p q) Commutative Laws q) (q p) (p q) (q p) (q r) (p q) (q r) (p q) (q r) (q r) (p q) (p p p p p Fo p p To p p To p Domination Laws To p Fo Fo p (p Inverse Laws Fo To (p r) Identity Laws p p Distributive Laws r) Indempotent Laws p p 9. r (p p p Associative Laws r q) p 7. 8. (p DeMorgan’s Laws q) (p 6. 10. Law of Double Negation p (p 3. Name of the law q) p q) p Absorption Laws Table 1. The Laws of Logic.[1] The dual of a given statement ‘s’ that contains no logical connectives other than ‘sd‘ obtained by replacing every occurrence of by and by t then sd and vice versa. The principle of duality states that if s and is the statement and each occurrence of To by Fo td . The Substitution rules: (1) Assume a compound statement P is a tautology. If we replace every occurrence of primitive statement p in P by the same statement q then the new compound statement P1 , thus formed, is also a tautology. (2) Assume a compound statement P that contains an arbitrary statement p. Let q be any other statement such that q p. if one or more occurrences of p are replaced by q, then the new statement P1, thus formed is such that P1 Consider an implication p P. q, then the statement q p is called the contrapositive of the said implication. The implication (q p) and is called the converse of (p q). We have, (q p) ( p q). The implication ( p q) is called the inverse of (p q). A true implication (p q) does not require its converse to be true , but necessitates that the contrapositive ( q p) is true . Also, (p q) (q p) and ( p q) ( q p). Logical Implication: Rules of Inference Consider any two arbitrary statements p and q. If (p q) is a tautology then p logically implies q, denoted by p q, and the implication is called the logical implication. The rules of inference arise from logical implications. The need for these rules is: (1) For logical inference we need to consider the conclusions of only the cases where all the premises have a truth value of 1. So it eliminates the construction of large truth tables. Page 2 of 5 (2) They are fundamental in the development of validation of a conclusion q from the premises p 1, p2…pn in an implication (p1 Sl. No. 1. p2 Rule of Inference p pq … p n) q. Related Logical Implication Name of the Rule [ p ( p q )] q Rule of Detachment ( Modus Ponens) [( p q) (q r )] ( p r ) Law of the Syllogism [( p q ) q] p Modes Tollens q 2. pq qr 3. pr pq q 4. p p Conjunction q 5. pq pq p 6. q p Fo p 7. pq p 8. p pq 9. pq p (q r ) 10. r pr qr 11. ( p q) r pq rs pr [( p q) p] q (p Fo) p ( p q) p p pq Rule of Disjunctive Syllogism Rule of Contradiction Rule of Conjunctive Simplification Rule of Disjunctive Amplification [( p q) [ p (q r )]] r Rule of Conditional Proof [( p r ) (q r )] [( p q) r ] Rule for Proof by Cases [( p q) (r s) ( p r )] (q s ) Rule of the Constructive Dilemma q s Page 3 of 5 12. pq rs q s [( p q) (r s) (q s)] (p r ) Rule of the Destructive Dilemma p r Table 2. The Rules of Inference.[1] Quantifiers and their Use: A declarative statement, whose truth value cannot be determined, cannot be classified as a statement. It is called an open statement if it satisfies the following conditions: Contains one or more variables It is not a statement It would become a statement, that is, obtain a truth value of 1 or 0 when the variables contained in it are replaced with values from a range of allowable choices. All the allowable choices put together constitute what is called the “Universe of Discourse” or the Universal Set. The notations used to represent open statements with one variable and two variables are p(x), q(x), r(x) etc. and p(x, y), q(x, y), r(x, y), etc. respectively. When a substitution for an occurrence of the variable is made from the universal set, the same substitution needs to be made for every occurrence of the variable. Some of the substitutions make the open statement true while some of them make it false. It is possible to consider a subset of the universal set as the new universal set, or a particular open statement, such that all substitutions from the universal set produce the same truth value of the open statement, that is , either a 1 or 0. This gives rise to two types of quantifiers: Essential Quantifiers which can be described in the following different ways: “for some x”, “for some x, y”, “for at least one x”, “there exists an x such that”. It is denoted by x. For example, for some x, p(x) would be written as x, p(x). Universal Quantifiers which can be described in the following different ways: “for all x”, “for all x, y”, “for every x”. It is denoted by p(x). x, y or x, y. For example, for all x, p(x) would be written as x, The variable in the open statement is called the free variable, because as it varies through all the values in the universal set the truth value of the open statement also varies. In contrast to this the statement x, p(x) has a fixed truth value. So, the variable is called bound variable, in the sense it is bound to the essential quantifier. For a given universe, two open statements p(x) and q(x) are said to be logically equivalent, denoted by, x [p(x) q(x)], when the Biconditional p(a) q(a) is true for each substitution ‘a’ from the given universe. If the implication p(a) q(a) is true for every ‘a’ in the given universe then we say that p(x) logically implies q(x) denoted by , x [p(x) q(x)]. Considering the open statements p(x) and q(x) defined for a particular universe and the universally quantified statement general definitions: (1) The contrapositive of (2) The converse of (3) The inverse of x [p(x) x [p(x) x [p(x) q(x)] is q(x)] is q(x)] is x[ x [q(x) x[ p(x) q(x) x [p(x) q(x)] we have a few p(x)]. p(x)]. q(x)]. It had been pointed out that the difference between an implication and a Biconditional should be clearly understood. Traditional mathematical definitions are exceptions, where implications can be interpreted as Biconditional. For example, an even integer is defined as follows: “Every integer x is even if it is divisible by 2.” Now consider the open statements p(x): x is an even integer and q(x): x is divisible by 2. From the definition of an even integer it can be interpreted that: Page 4 of 5 x [p(x) q(x)] and x [q(x) p(x)]. Thus the intension of the definition is x [p(x) q(x)]. This ambiguity is accepted only in traditional mathematical definitions and need to be avoided in scientific writing. References: [1] Discrete and combinatorial mathematics: An Applied Introduction - Ralph P. Grimaldi. [2] Propositional Logic Terms and Symbols : Peter Suber http://www.earlham.edu/~peters/courses/log/terms2.htm [3] Argumentative Writing &Propositional Logic http://www.swifty.com/VB/logic/prop1.htm [4] Boolean Propositional Logic http://www.rbjones.com/rbjpub/logic/log003.htm Page 5 of 5