Propositional Logic Quick Reference

145 downloads 495 Views 102KB Size Report
Propositional Logic Quick Reference. Common Logical Identities. Truth: T ↔ ¬F. Idempotence: (p ∨ p) ↔ p. Idempotence: (p ∧ p) ↔ p. Law of Excluded Middle: ...
Propositional Logic Quick Reference

1

Common Logical Identities

Other Logical Identities

Definition of implication: (¬p ∨ q) ↔ (p → q) Truth: T ↔ ¬F • ¬(¬p ∧ ¬q) ↔ (p ∨ q) Idempotence: (p ∨ p) ↔ p • ((p → q) ∧ (q → p)) ↔ (p ↔ q) Idempotence: (p ∧ p) ↔ p • ((p ∧ q) → r) ↔ (p → (q → r)) Law of Excluded Middle: (p ∨ ¬p) ↔ T • (p → (q → r)) ↔ (p → (¬r → ¬q)) Consistency: (p ∧ ¬p) ↔ F • (p → (q ↔ r)) ↔ ((p ∧ q) ↔ (p ∧ r)) Double Negative: (¬¬p) ↔ p • ((p ∧ q) → r) ↔ ((p ∧ ¬r) → ¬q) Commutativity of And: (p ∧ q) ↔ (q ∧ p)

Proof Techniques

Commutativity of Or: (p ∨ q) ↔ (q ∨ p)

• (p ∧ q) ∨ ¬p ∨ ¬q

• (p ∧ (p → q)) → q (Modus ponens)

• p ∨ (p → q)

• (¬q ∧ (p → q)) → ¬p (Modus tollens)

• (p ↔ q) ∨ (p ↔ ¬q)

Commutativity of Iff: (p ↔ q) ↔ (q ↔ p) Associativity of And: (p ∧ (q ∧ r)) ↔ ((p ∧ q) ∧ r) • ((p ∨ q) ∧ (p → r) ∧ (q → r)) → r Associativity of Or: (p ∨ (q ∨ r)) ↔ ((p ∨ q) ∨ r)

Other Tautologies

Common implication tautologies

A Law of De Morgan: ¬(p ∨ q) ↔ (¬p ∧ ¬q) • (p ∧ q) → (p ∨ q) A Law of De Morgan: ¬(p ∧ q) ↔ (¬p ∨ ¬q) • (p ∧ q) → q Distribution: p ∨ (q ∧ r) ↔ ((p ∨ q) ∧ (p ∨ r)) • p → (p ∨ q) Distribution: p ∧ (q ∨ r) ↔ ((p ∧ q) ∨ (p ∧ r)) • p → (¬p → q) Distribution: (p ∧ q) ∨ r ↔ ((p ∨ r) ∧ (q ∨ r)) • q → (p → q) Distribution: (p ∨ q) ∧ r ↔ ((p ∧ r) ∨ (q ∧ r)) • (p → (q ∧ r)) → (p → q) Definition of T: ((p ∨ T ) ↔ T ) ∧ ((p ∧ T ) ↔ p) • ((p ∨ q) → r) → (p → r) Definition of F: ((p ∨ F ) ↔ p) ∧ ((p ∧ F ) ↔ F ) • (p → q) → (p → (q ∨ r)) Absorption: (p ∧ (p ∨ q)) ↔ p • (p → q) → ((p ∧ r) → q) Absorption: (p ∨ (p ∧ q)) ↔ p • ((p → q) ∨ (r → s)) → ((p ∨ r) → (q ∨ s)) Alt Definition of equivalence: ((¬p ∧ ¬q) ∨ (p ∧ q)) ↔ (p ↔ q) • ((p → q) ∧ (r → s)) → ((p ∧ r) → (q ∧ s)) If-and-only-if-rule: ((p → q) ∧ (¬p → ¬q)) ↔ (p ↔ q) • ((p → (q ∨ r)) ∧ (s → ¬r)) → ((p ∧ s) → q) Contrapositive: (p → q) ↔ (¬q → ¬p) • ((p ↔ (q ∧ r)) ∧ p) → q

2

Duality theorem: Given a tautology not involving →, substitute every F for a T , every T for an F , every ∧ for an ∨, and every ∨ for an ∧. The result is also a tautology, which we call the dual tautology. Any tautology that is its own dual is called self-dual. For example, the Law of the excluded middle is dual to the consistency law, while the double-negative law is self-dual.

Simple sentence that may be right or wrong: You can see your shadow. Attempt to make the sentence true: If the sun is shining and you are outside in the sun and you are not blind and you look in the right direction, you can see your shadow.

There are 2n different propositions that can be constructed from n logical variables. But for each proposition, there are an infinite number of other propositions with the same truth table. p ↔ (p ∨ F ) p ↔ ((p ∨ F ) ∧ T ) p ↔ (((p ∨ F ) ∧ T ) ∨ F ) p ↔ (((p ∨ F ) ∧ T ) ∨ F ) ∧ p p ↔ ...

Core definitions Every proposition is either True (T ) or False (F ), p ¬p Not: T F F T p q p∧q T T T And: T F F F T F F F F p q p∨q T T T Or: T F T T F T F F F Every statement in propositional logic can be written in terms of just ¬, ∧, and ∨, but for convenience, we also define 2 other binary operations. p q p→q T T T If: T F F T F T F F T p q p↔q T T T If-and-Only-If: T F F F T F F F T Actually, all binary operations can be defined from a single operation NAND, p Z q ↔ ¬(p ∧ q), because ¬p ↔ (p Z T ), p ∧ q ↔ (p Z q) Z T , p ∨ q ↔ ((p Z T ) Z (q Z T )),

Notation conventions: To make propositional logic easier for humans to read, we adopt the convention that ¬ always binds to the term immediately to it’s right, so that ¬p ∧ q is that same as (¬p) ∧ q, and different from ¬(p ∧ q). Also, since conjunction and disjunction are associative and commutative, we conventionally omit the parentheses so that p ∧ q ∧ r is the same as (p ∧ q) ∧ r and p ∧ (q ∧ r). Substitution principle: Suppose we have a tautoloty in propositional logic, and that for any variable, we assign a new variable or proposition. If the statement was a tautology before, it remains a tautology after the substitutions. Example: By substitution, p ∨ ¬p can be transformed to (x → y) ∨ ¬(x → y), and then by DeMorgan’s law, (x → y) ∨ (x ∧ ¬y).

Common Logical Fallacies Logical fallacies are errors in reasoning. Every logical proposition that is not a tautology but is asserted to be a tautology is a fallacy. There are an infinite number of possible fallacies, but a few are more commonly asserted. • Circular reasoning: ((a → b) ∧ (b → c) ∧ (c → a)) → a • Hasty generalization to a converse: (p → q) → (q → p) • Hasty generalization to an inverse: (p → q) → (¬p → ¬q) • Affirmation by disjunction (exclusive-or mistake): ((p ∨ q) ∧ p) → ¬q • False dilemma/dichotomy: A famous legal question is “Have you stopped stealing from your company?” Answering this implies the disjunction “You were stealing and have stopped, or you were stealing and have not stopped.” ((p ∧ q) ∨ (p ∧ ¬q)) Choosing either choice implies the witness was stealing: p T T F F

q T F T F

¬q F T F T

p∧q T F F F

p ∧ ¬q F T T T

((p ∧ q) ∨ (p ∧ ¬q)) ↔ p T T T T

However, the hypothesis (p ∧ q) ∨ (p ∧ ¬q) implied by answering the question is not a tautology. There should be a third choice, ¬p, that the witness did not steal. ¬p ∨ (p ∧ q) ∨ (p ∧ ¬q) is a tautology.

3