1=Propositions. Logical Connectives. =1=Truth Values and Truth Tables. =1
Total Page:16
File Type:pdf, Size:1020Kb
Revision on propositional logic: Propositions. Logical Connectives. Truth values and truth tables. Propositional formulae. Tautologies. Logical equivalence. Logical consequence. Logical correctness of propositional arguments. Valentin Goranko DTU Informatics August 2010 V Goranko Propositions and propositional logical connectives Proposition: statement which can be assigned a (unique) truth value: true or false. Propositional logical connectives: • negation: not, denoted by :; • conjunction: and, denoted by ^ (or, sometimes by &); • disjunction: or, denoted by _; • implication: if . then . , denoted by !; • biconditional: . if and only if . , denoted by $. Examples of composite propositions: • \It is not the case that two plus two equals five.” • \Two plus two equals five and/or the sun is hot." • \If two plus two equals five then the sun is hot." • \Two plus two equals five if and only if the sun is hot." \Mary is not clever or, if Mary likes logic then Mary is clever and Mary is not lazy." V Goranko The propositional connectives as truth value functions Each propositional connective acts on the truth values of the component propositions in a precise way: • :A is true if and only if A is false. • A ^ B is true if and only if both A and B are true. • A _ B is true if and only if either of A or B (possibly both) is true. • A ! B is true if and only if A is false or B is true, i.e. if the truth of A implies the truth of B. • A $ B is true if and only if A and B have the same truth-values. V Goranko Truth tables These rules can be summarized in the following truth tables, where T stands for `true' and stands for 'false': p :p T F F T p q p ^ q p _ q p ! q p $ q T T T T T T T F F T F F F T F T T F F F F F T T V Goranko Computing the truth value of a proposition Suppose that \Mary is clever.": T; \Mary is lazy.": F; \Mary likes logic.": T To compute the truth value of the composite proposition: \Mary is not clever or, if Mary likes logic then Mary is clever and Mary is not lazy." we first write it in a symbolic form, by introducing symbolic names for the atomic propositions occurring in it: A:\ Mary is clever." B:\ Mary is lazy." C:\ Mary likes logic." V Goranko Then, the proposition can be written symbolically as: (:A) _ (C ! (A ^ :B)): Now, we compute its truth value step by step, applying the truth-tables of the respective logical connectives: (:T) _ (T ! (T ^ :F)) = F _ (T ! (T ^ T)) = F _ (T ! T) = F _ T = T: V Goranko Propositional formulae Propositional constants: > which represents a true proposition, and ? which represents a false proposition. Propositional variables: variables that range over propositions. Usually denoted by p; q; r, possibly with indices. Inductive definition of propositional formulae: 1. Every propositional constant and every propositional variable is a propositional formula. 2. If A is a propositional formula then :A is a propositional formula. 3. If A; B are propositional formulae then (A _ B), (A ^ B), (A ! B), (A $ B) are propositional formulae. Examples: >; :>; p; :p; ::p; (p _:q); (p1 ^ :(p2 !:p1)) Outermost pairs of parentheses will often be omitted. V Goranko Construction trees, subformulae, main connectives Construction tree: a tree with nodes labelled with propositional constants, variables, and propositional connectives, such that: 1. Every leaf is labelled by a propositional constant or variable. 2. Propositional constants and variables label only leaves. 3. Every node labelled with : has exactly one successor node. 4. Every node labelled with any of ^; _; !; $ has exactly two successor nodes - left and right successor. Every construction tree defines a formula C, built starting from the leaves and going towards the root, by applying at every node the formula construction rule corresponding to the label at that node. The formulae constructed in the process are the subformulae of C. The propositional connective labelling the root of the construction tree of a formula C is the main connective of C. V Goranko Truth tables of propositional formulae Example: (p _:(q ^ :r)) ! ::r p q r :r ::r q ^ :r :(q ^ :r) p _:(q ^ :r) (p _:(q ^ :r)) ! ::r T T T F T F T T T T T F T F T F T F T F T F T F T T T T F F T F F T T F F T T F T F T T T F T F T F T F F T F F T F F F V Goranko Simplified truth tables p q r (p _: (q ^ : r)) !:: r T T T TTTTFFTTTFT T T F TTFTTTFFFTF T F T TTTFFFTTTFT T F F TTTFFTFFFTF F T T FTTTFFTTTFT F T F FFFTTTFTFTF F F T F F F V Goranko Tautologies Tautology (or, propositionally valid formula): a formula that obtains truth value T for every assignment of truth values to the occurring variables. Notation: j= A. Examples: j= p _:p, j= :(p ^ :p), j= ((p ^ (p ! q)) ! q) Testing tautologies with truth-tables: p q p ! q p ^ (p ! q) (p ^ (p ! q)) ! q T T T T T T F F F T F T T F T F F T F T V Goranko Contradictions, satisfiable formulae Contradiction is a formula that always takes truth value F. Examples: p ^ :p, :((p ^ q) ! p) Thus, the negation of a tautology is a contradiction and the negation of a contradiction is a tautology. A formula is satisfiable if it is not a contradiction. Example: p, p ^ :q, etc. V Goranko Logical equivalence of propositional formulae Propositional formulae A and B are logically equivalent, denoted A ≡ B, if they obtain the same truth value under any truth valuation (of the variables occurring in them). Examples: :(p ^ q) ≡ :p _:q p q : (p ^ q) : p _: q T T FTTT FTFFT T F TTFF FTTTF F T TFFT TFTFT F F TFFF TFTTF p ^ (p _ q) ≡ p ^ p ≡ p p q p ^ (p _ q) p ^ p T T TTTTT TTT T F TTTTF TTT F T FFFTT FFF F F FFFFF FFF V Goranko Some basic properties of logical equivalence I A ≡ B iff j= A $ B: I ≡ is an equivalence relation. I Moreover, ≡ is a congruence with respect to the propositional connectives, i.e.: B if A ≡ B then :A ≡ :B, and B if A1 ≡ B1 and A2 ≡ B2 then (A1 • A2) ≡ (B1 • B2), where • 2 f^; _; !; $g. Theorem for equivalent replacement: Let A; B; C be any propositional formulae p be a propositional variable. If A ≡ B then C(A=p) ≡ C(B=p). V Goranko Some important logical equivalences • Idempotency: p ^ p ≡ p; p _ p ≡ p: • Commutativity: p ^ q ≡ q ^ p; p _ q ≡ q _ p: • Associativity: (p ^ (q ^ r)) ≡ ((p ^ q) ^ r); (p _ (q _ r)) ≡ ((p _ q) _ r): Note that this property allows us to omit the parentheses in multiple conjunctions and disjunctions. • Absorption: p ^ (p _ q) ≡ p; p _ (p ^ q) ≡ p: • Distributivity: p ^ (q _ r) ≡ (p ^ q) _ (p ^ r); p _ (q ^ r) ≡ (p _ q) ^ (p _ r): V Goranko Other useful logical equivalences • A _:A ≡ >; A ^ :A ≡ ?; • A ^ > ≡ A; A ^ ? ≡ ?; • A _ > ≡ >; A _ ? ≡ A. • A ! B ≡ :A _ B. • A $ B ≡ (A ! B) ^ (B ! A). • A ! B ≡ :B !:A. V Goranko Propositional logical consequence A propositional formula C is a logical consequence from the propositional formulae A1;:::; An, denoted A1;:::; An j= C; if C is true whenever all A1;:::; An are true, i.e., every assignment of truth-values to the variables occurring in A1;:::; An; C which renders the formulae A1;:::; An true, renders the formula C true, too. If A1;:::; An j= C, we also say that C follows logically from A1;:::; An, and that A1;:::; An logically imply C. Logical consequence is reducible to validity: A1;:::; An j= C iff A1 ^ ::: ^ An j= C iff j= (A1 ^ ::: ^ An) ! C. V Goranko Testing propositional consequence with truth tables I p; p ! q j= q p q p p ! q q T T T T T T F T F F F T F T T F F F T F I p ! r; q ! r j= (p _ q) ! r p q r p ! r q ! r p _ q (p _ q) ! r T T T T T T T T T F F F T F T F T T T T T T F F F T T F F T T T T T T F T F T F T F F F T T T F T F F F T T F T V Goranko Valid rules of propositional inference A rule of propositional inference (for short, inference rule) is a scheme: P ;:::; P 1 n ; C where P1;:::; Pn; C are propositional formulae. The formulae P1;:::; Pn are called premises of the inference rule, and C is its conclusion. An inference rule is valid if its conclusion logically follows from the premises. A propositional inference is an instance of a rule, where propositions are uniformly replaced by the propositional variables. A propositional inference is logically correct (or, valid) if it is an instance of a valid inference rule. V Goranko Propositional inference: examples I Consider the propositional inference: Mary is singing. If Mary is singing, then Mary is happy. Mary is happy.