Propositional Logic Yimei Xiang yxiang@fas.harvard.edu 11 February 2014 1 Review Recursive definition Set up the basis Generate new members with rules Exclude the rest Subsets vs. proper subsets Sets of sets, and power sets is a subset rather than a member of {S} Proof with set-theoretic equalities format strictly follow the laws and never skip any step. For each of the following sentences, how would you represent its meaning with set-theoretic notions? (1) a. a set professors in Harvard Linguistics. b. Gennaro is a professor in Harvard Linguistics. c. Obama is a professor in Harvard Linguistics. 1
2 Connectives and their meanings Preliminary notions: Sentential (or propositional) connectives Sentential (or propositional) variables: p Constants: signs that have a permanent non-variable meaning Truth-value: Every decalarative sentence has one and only one truth-value. In a two-valued logic, each atomic statement is assumed to have assigned to it one of the truth values: 1 (also called true) or 0 (false). Truth-functional: A connective which has the property of making the truth-value of the compound expression it creates computable from the truth-values of the simple sentences it connects is truth-functional. (All formal reltaions between sentences that are treated in propositional logic are truth-functional.) (2) a. There is a blizzard and I feel good. b. Since there is a blizzard, I feel good. Connectives and their meanings Table 1: Connectives in propositional logic Connectives Compose proposition with connectives Translation negation p (the negation of p) it is not the case that p conjunction (p q) (conjunction of p and q) p and q disjunction (p q) (disjunction of p and q) p and/or q implication (p q) (implication of p and q) if p, then q equivalence (p q) (equivalence of p and q) p if and only if (iff.) q Sidenotes: Negation and conjunction can also be represented as and &, respectively. The primary disjunction is an inclusive disjunction; in natural language, or can also be interpreted as an exclusive disjunction (notation: ): an exclusive disjunction is true iff. only one of the disjuncts is true. (3) You money or your life! Exercise 1: Translate the following sentences into propositional logic. some of the questions could have multiple answers. Note that (4) a. It is not the case that Guy comes if Peter or Harry comes. b. John is not only stupid but nasty too. c. Nobody laughed or applauded. d. Charles and Elsa are brother and sister or nephew and niece. 2
3 Syntax of propositional logic Vocabulary (5) a. Infinitely many sentential variables: p, q, r, s, t, p 1, q 1,...p 2, q 2... b. The logical connectives:,,,, c. Parentheses: ( ) d. These and no other signs occur in the expressions of propositional logic Well-formed formulas (wffs): grammatically correct expressions (6) A recursive definition for wff in a language L: a. Every propositional letter in the vocabulary of L is a wff in L. b. If p is a wff in L, then p is too. c. If p and q are wffs in L, then so are (p q), (p q), (p q), and (p q). d. Only that which can be generated by the clauses (a)-(c) in a finite number of steps is a formula in L. The recursive definition enables us to associate a unique construction tree with each wff. Exercise 2: Draw the construction tree of ((p q) ( r s)) Exercise 3: Following the recursive definition for wff., identify whether each of the string below is a wff or not. (7) a. ( p) b. p c. p q d. (p q) 3
Abbreviations (make formulas easier to read and do not carry any danger of ambiguity): (8) Abbreviation rules a. The outermost parentheses need not be explicitly mentioned. p q is (p q) b. The conjunction and disjunction symbols apply to as little as possible. p q r s is ((p q) ( r s)) c. When one connective symbol is used repeatedly, grouping is to the right. p q r is p (q r) p q r is p (q r) Exercise 4: Add parentheses to the following wffs. (9) a. p q r s b. p q r (p q r) 4 Semantics of propositional logic 4.1 Truth tables Truth tables of propositional connectives Table 2: Truth tables p q p p q p q p q p q 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 1 1 More about implications: In p q, p is called antecedent, and q is called consequent. p q is truth-functionally equivalent to p q: antecedent false or consequent true. In propositional logic, the implication is treated only truth-functionally; the antecedent and the consequent do not have to have a causal relation. (10) a. If Harvard is in Cambridge then Cambridge has no university. b. If Obama is the current president of USA, then Boston is in MA. Exercise 5: Can you make a truth table for the exclusive disjunction? 4
4.2 Logical equivalence p and q are said to be (logically) equivalent just in case for every valuation V, we have: V(p) = V(q) Other representing methods for logical equivalence: a. For every valuation V, we have V(p q) = 1. b. = p q Exercise 6: Why? Are the following pairs of formulas/sentences (logically) equivalent? (11) a. p p b. p (12) a. If Gennaro is a professor of Harvard Linguistics, then his office is in Boylston Hall. b. If Jim is a professor of Harvard Linguistics, then his office is in Boylston Hall. (13) a. If Gennaro is a professor of Harvard Linguistics, then his office is in Boylston Hall. b. It is not the case that [Gennaro is a professor of Harvard linguistics, and his office isnt in Boylston Hall]. 5
4.3 Tautology, contradiction, contingency Tautology (Always true) p is a tautology iff p is a constant function with value True (1). Contradiction (Always false) If p is a tautology, then p is a contradiction. (14) p p (It is raining and it is not raining) Contingency: (Sometimes true and sometimes false) p is a contingency iff p is a contingency. A selected list of tautologies (redundant brackets are omitted) (15) Associative and commutative laws for,, (16) Distributive laws a. (p (q r)) ((p q) (p r)) b. (p (q r)) ((p q) (p r)) (17) Negation a. p p b. (p q) (p q) c. (p q) ((p q) ( p q)) (18) De Morgan s laws a. (p q) ( p q) b. (p q) ( p q) (19) Other a. p p Excluded middle b. (p p) Contradiction c. (p q) ( q p) Contraposition d. ((p q) r) (p (q r)) Exportation Two ways of determining whether a wff. is a tautology. Truth-table method We investigate every possible combination of truth-values for the simple sentences and then check the resulting truth-value of the complex expression. Indirect reasoning We assume that the expression we are interested in is false. If this assumption does NOT lead to a contradiction, we know that we do not have a tautology. However, if our first assumption that the expression is false leads to a contradiction (i.e. it is not possible for the expression to be false), we have a tautology. Some typical examples: 6
a. ((p q) r) p b. p p Exercise 7: (20) Use truth-tables and indirect reasoning to determine whether ((p q) (q p)) is a tautology. (21) Determine whether (((p q r) ((p q) r)) is a tautology. 7