Unformatted text preview: Formal Logic Formal
Statements and Truth Tables Propositional Logic Quantifiers and Predicates Statements and Truth Tables Statements Connectives and Truth Values A statement is any sentence that is either true or statement false. We represent them using letters like A, B, C, …. …. A statement A can be modified by negation, statement negation meaning not A, and written as A'. and A'. Two statements can be combined using Two connectives. We will be using the connectives ∧, connectives We ∨, → and ↔ Statements and Truth Tables Statements Conjunction A ∧B Read as A and B and Is true only in the case that A and B are both true. Is Otherwise it is false. Statements and Truth Tables Statements Disjunction A ∨B Read as A or B or Is true if either of A and B is true, including the Is possibility that both are true. possibility Statements and Truth Tables Statements Conditional A →B Read as A implies B, or as if A then B. implies if We will learn the true meaning of the conditional We very shortly. very Statements and Truth Tables Statements Biconditional A↔B Read as A if and only if B, or as A iff B, or as if iff A and B are equivalent. and We will learn the true meaning of the We biconditional very shortly. biconditional Statements and Truth Tables Statements Truth tables tables used to analyze the truth or falsity of complex used statements. A T F A' F T A T T F F B T F T F A∧B T F F F A T T F F B T F T F A∨B T T T F Statements and Truth Tables Statements Truth tables Look at the truth table for conditional: Look A T T F F B T F T F A→B T F T T Note the last two lines result in "true". Why? Note Statements and Truth Tables Statements Truth tables F→T is true and F→F is true is is Consider the statement "If it rains tomorrow, I'll Consider use an umbrella". use The next day is sunny, yet I'm walking around The under an umbrella. under I'm obviously insane, but did I lie when I made I'm the statement? the Statements and Truth Tables Statements Truth tables F→T is true and F→F is true is is No. The statement "If it rains tomorrow, I'll use No. an umbrella" says absolutely nothing about what I'd be doing if it doesn't rain. I'd Therefore F→T is true Therefore is Similarly, F→F is true Similarly, is Statements and Truth Tables Statements Truth tables Here's the truth table for the biconditional: A T T F F B T F T F A↔ B T F F T Building a Truth Table Building
AB TT TF FT FF ↑↑↑ B' A∨B' ↑ (A∨B) (A∨B)' A∨B' → (A∨B)' ↑ ↑↑
F F F T ↑ F T F T T T F T T T T F F F T T Statements and Truth Tables Statements Truth tables and wellformed formulas (wff's) A wellformed formula (wff) is any legitimate wellformed is expression involving statement symbols, the connectors, and parentheses (to clarify precedence) connectors, e.g. – A ∨ B' → (A ∨ B)' e.g. We can use truth tables to analyze the meaning of We such wff's. That is, to see when it's true and when it's false. it's Tautologies Tautologies A tautology is any statement that must tautology always be true. always
A ∨ A' A' A tautology therefore is a fundamental tautology logical truth. logical A contradiction is any statement that contradiction must always be false. must A ∧ A' A' Tautologies Here are some fundamental truths: A ∨B ↔ B ∨A A ∧B ↔ B ∧A (A ∨ B) ∨ C ↔ A ∨ (B ∨ C) (A ∧ B) ∧ C ↔ A ∧ (B ∧ C) commutative laws (comm) commutative associative laws (assoc) associative laws A ∨ (B ∧ C) ↔ (A ∨ B) ∧ (A ∨ C) A ∧ (B ∨ C) ↔ (A ∧ B) ∨ (A ∧ C) A ∨F ↔ A A ∨ A' ↔ T
distributive laws (dist) distributive laws laws A ∧ T ↔ A identity laws (iden) laws A ∧ A' ↔ F complement laws (comp) Tautologies Tautologies And here's another important one: (A ∨ B)' ↔ A' B' A' B' (A ∧ B)' ↔ A' ∨ B' A' B'
These are known as De Morgan's Laws These De Propositional Logic Propositional
Generally, formal logic is handled by a mathematical system known as the propositional calculus. propositional The basic principle is that of an argument: a argument conjecture that a set of statements (called the hypotheses) implies another statement (the hypotheses implies conclusion). conclusion Propositional Logic Propositional
A proof sequence is a series of wff's that proof are either hypotheses, or can be derived by applying the propositional calculus' derivation rules to previous wff's. derivation rules A proof is a proof sequence that ends proof with the desired conclusion of the argument. Propositional Logic Propositional We divide the derivation rules into two types: types: equivalence rules
• Equivalence rules, some of which we saw earlier, Equivalence are rules that say two wff's are equivalent, and therefore interchangeable therefore inference rules rules
• Inference rules represent wff's that can logically be Inference concluded from one or more other wff's concluded Equivalence Rules Equivalence
P ∨Q P ∧Q (P ∨ Q) ∨ R (P ∧ Q) ∧ R (P ∨ Q)' (P ∧ Q)' P →Q P P↔Q Q ∨P Q ∧P P ∨ (Q ∨ R) P ∧ (Q ∧ R) P' ∧ Q' P' ∨ Q' P' ∨ Q (P')' Commutative (comm) Associative (assoc) DeMorgan's Laws DeMorgan's (DeMorgan) (DeMorgan) Implication (imp) Double Negation (dn) (P → Q) ∧ (Q → P) definition of equivalent definition (equ) (equ) Inference Rules
From We Can Derive Name (abbreviation) P, P → Q P → Q, Q' P, Q P ∧Q P Q P' P ∧Q P, Q P ∨Q modus ponens (mp) modus tollens (mt) conjunction (con) simplification (sim) addition (add) Propositional Logic Propositional The various equivalence laws we have The seen can be used to "massage" a statement that can be used by the inference rules to help arrive at the conclusion. Let's look at an example of a proof. Consider the argument Consider A ∧ (B → C) ∧ [(A ∧ B) → (D ∨ C')] ∧ B → D ')] Propositional Logic Propositional Why did we choose this example? because it's not obvious because we can't even figure out what it because says says yet I claim that it is very, very true. How do I show this? Propositional Logic Propositional A ∧ (B → C) ∧ [(A ∧ B) → (D ∨ C')] ∧ B → D ')] We could prove this by using a truth table, but such a table would require how many rows and columns? (Answer: 16 rows, 13 columns) But what is the argument actually saying? But Propositional Logic Propositional A ∧ (B → C) ∧ [(A ∧ B) → (D ∨ C')] ∧ B → D [( But what is the argument actually saying? But "If A and B are both true and B being true implies that C is true AND both A and B being true implies that either C AND is false or D is true is MEANS that D must be true. MEANS Confusing, eh? Confusing, Perhaps, but it happens to be true. Why? Perhaps, Propositional Logic Propositional 1 2 3 4 5 6 7 8 A ∧ (B → C) ∧ [(A ∧ B) →(D ∨ C')] ∧ B → D ')]
A (B → C) (B (A ∧ B) → (D ∨ C') (A B C A ∧B D ∨ C' C' ∨ D hypothesis hypothesis hypothesis hypothesis modus ponens on steps 4 and 2 law of conjunction on steps 1 and 4 modus ponens on steps 6 and 3 commutative law 7 law of implication 8 !!!!! modus ponens on steps 5 and 9 9 C →D 10 D QED The Deduction Method The
Some theorems are very difficult to prove using only the tools we have mentioned so far. mentioned Consider constructing the proof Consider corresponding to the wff P T (Q T R) È È The only hypothesis is P. The We need to somehow prove from P that We Q T R. È The Deduction Method The But look at P T (Q T R) È È But P T (Q T R) ↔ P' ∨ (Q T R) È È È P' P' ∨ (Q T R) ↔ P' ∨ (Q' ∨ R) È P' P' ∨ (Q' ∨ R) ↔ (P' ∨ Q') ∨ R Q' (P' ∨ Q') ∨ R ↔ (P' ∨ Q')' T R Q' Q' È (P' ∨ Q')' T R ↔ P ∧ Q T R È Q' È So proving P T (Q T R) is the same as proving P È È So ∧Q T R È This is called the Deduction Method This Deduction The Deduction Method The
Let's prove that (P → Q) ∧ (Q → R) → (P → R) By the Deduction Method, this is the same as proving (P → Q) ∧ (Q → R) ∧ P → R 1. 2. 3. 4. 5. P →Q Q →R P Q R hypothesis hypothesis hypothesis mp 3, 1 3, mp 4, 2 4, The Hypothetical Syllogism The
(P → Q) ∧ (Q → R) → (P → R) Now that we have proven the above, we Now can use it as a justification for a step in a proof. proof. We call the above rule the hypothetical We syllogism (hs). While it's really a theorem, we'll just While refer to it as an ordinary inference rule. refer Predicate Logic Predicate
Thus far, we have considered absolute statements: e.g. P = I am tired. am But we often want to make more general statements statements Everyone is tired. Some people are tired. Quantifiers and Predicates Quantifiers
Ordinary propositions are very limited; they typically refer to specific situations. they We can speak with greater generality by We the use of quantifiers and predicates. quantifiers predicates Quantifiers and Predicates Quantifiers A quantifier is either the universal quanifier: (∀ x) universal which represents the statement for all which all elements elements OR the existential quantifier: (∃ x) existential which represents the statement there exists an which element element Quantifiers and Predicates Quantifiers
A predicate is any statement about a predicate general element under consideration. general For example, x > 0, which states that which some number is greater than zero. some Another example, "x is even or odd," Another is ," which states that some whole number is either even or it's odd. either Quantifiers and Predicates Quantifiers As you can see, when we use predicates and quantifiers, we are always talking about a domain of interpretation (also domain called the universe) that we limit our universe that predicate to. predicate Quantifiers and Predicates Quantifiers
Consider the following predicate: Consider P(x) ∨ Q(x) An interpretation is the specification An of a universe universe
• for example, the positive integers and a meaning to P and Q:
• let's say P(x) is x is even and Q(x) is x is is odd odd Quantifiers and Predicates Quantifiers
Now consider the quantification: Now (∀ x) (P(x) ∨ Q(x)) An interpretation of this statement is all positive integers are either even or odd positive Under this interpretation, the statement is clearly true. clearly Quantifiers and Predicates Quantifiers
But suppose we assigned to P(x) the meaning x is even and to Q(x) the is meaning x is greater than 10 is Under this interpretation, the statement (∀ x) (P(x) ∨ Q(x)) is false! (Because clearly 7, for example, is neither even nor greater than 10. greater Quantifiers and Predicates Quantifiers
Or suppose we assigned the even/odd even/odd meaning to P and Q, but we changed our but universe to all positive real numbers. universe Under this interpretation, the statement (∀ x) (P(x) ∨ Q(x)) is false! (Because clearly 2.35, for example, is neither even or odd. or Quantifiers and Predicates Quantifiers
What is the relationship between the quantifiers ∀ x and ∃ x? Think about the predicate wff Think (∀ x)P(x) which says that for all x, P(x) is true. But is But ((∀ x)P(x))' = (∀ x)P'(x) ? (( Quantifiers and Predicates Quantifiers
Is ((∀ x)P(x))' = (∀ x)P'(x) ? (( The lefthand side says that it is untrue that P(x) holds for every x. The righthand side says that for every x, P(x) doesn't hold. doesn't These are different statements. These For example, the statement that it is true to say that every integer is odd is false, but it is that but false to say that every integer is odd. every Quantifiers and Predicates Quantifiers What does ((∀ x)P(x))' mean? What (( ))' mean? It is false that P(x) is true for all x. Why would this be? Why Because there exists some x for which P(x) doesn't hold. This is (∃ x)P'(x) Therefore ((∀ x)P(x))' = (∃ x)P'(x) (( Quantifiers and Predicates Quantifiers ((∀ x)P(x))' = (∃ x)P'(x) (( ((∃ x)P(x))' = (∀ x)P'(x) (( Quantifiers and Predicates Quantifiers
So we see that the universe and the meanings of predicates can have great impact on the truth of a particular statement. truth Some statements however, are true no matter what the interpretation. Consider (∀ x) (P(x) ∨ P'(x)). P' Is there ANY interpretation under which this Is statement is false? (Answer: no) We say that such statements are valid We valid statements. Quantifiers and Predicates Quantifiers Consider (∀ x) (P(x) ∨ Q(x)). Consider Is there an interpretation under which this Is statement is true? (Answer: yes) But that is not enough to make the statement valid. valid Quantifiers and Predicates Quantifiers How about (∀ x) (P(x)) → (∃ x) (P(x)) ? )) Quantifiers and Predicates Quantifiers How about
(∀ x) (P(x) ∨ Q(x)) ↔ (∀ x) (P(x)) ∨ (∀ x) (Q(x)) ? )) )) Can you think of an interpretation under which this is true? P(x) = x is even which is Can you think of an interpretation under which this is false? P(x) = x is even which is
Q(x) = x is odd is Q(x) = x is even is ...
View
Full Document
 Spring '10
 landis
 Logic, wff, Truth Tables Statements, È P

Click to edit the document details