Propositional Logic: Semantics Alice Gao Lecture 4, September 19, 2017 Semantics 1/56
Announcements Semantics 2/56
The roadmap of propositional logic Semantics 3/56
FCC spectrum auction — an application of propositional spectrums to sell to telecoms? Semantics https://www.youtube.com/watch?v=u1-jJOivP70 Talk by Kevin Leyton-Brown determine that it is unsatisfjable.) in a very short amount of time? (determine that a formula is satisfjable or The problem comes down to, how many satisfjability problems can I solve telecoms? Could I lower your price and still manage to get useful logic broadcasters to go ofg air, could I repackage the spectrums and sell to A computational problem in the buy back auction: If I pay these 2 auctions: To repurpose radio spectrums 4/56 • one to buy back spectrums from broadcasters • the other to sell spectrums to telecoms
Learning goals By the end of this lecture, you should be able to and satisfjable formula). using a truth table and/or a valuation tree. contradiction or a satisfjable formula. Semantics 5/56 • Evaluate the truth value of a formula • Defjne a (truth) valuation. • Determine the truth value of a formula by using truth tables. • Determine the truth value of a formula by using valuation trees. • Determine and prove whether a formula has a particular property • Defjne tautology, contradiction, and satisfjable formula. • Compare and contrast the three properties (tautology, contradiction, • Prove whether a formula is a tautology, a contradiction, or satisfjable, • Describe strategies to prove whether a formula is a tautology, a
The meaning of well-formed formulas To interpret a formula, we have to give meanings to the propositional variables and the connectives. A propositional variable has no intrinsic meaning; it gets a meaning via a valuation. A (truth) valuation is a function 𝑢 ∶ 𝒬 ↦ { F , T } from the set of all proposition variables 𝒬 to { F , T } . It assigns true/false to every propositional variable. truth valuation 𝑢 . Semantics 6/56 Two notations: 𝑢(𝑞) and 𝑞 𝑢 both denote the truth value of 𝑞 under the
Truth tables for connectives T F T T F T F F F F F T T T T T T Semantics T T The unary connective ¬ : 𝛽 𝛽 (¬𝛽) T F F T The binary connectives ∧ , ∨ , → , and ↔ : 𝛾 T (𝛽 ∧ 𝛾) (𝛽 ∨ 𝛾) (𝛽 → 𝛾) (𝛽 ↔ 𝛾) F F F F 7/56
Truth value of a formula otherwise Semantics otherwise F otherwise F otherwise F Fix a truth valuation 𝑢 . Every formula 𝛽 has a value under 𝑢 , denoted 𝛽 𝑢 , 8/56 F F determined as follows. 1. 𝑞 𝑢 = 𝑢(𝑞) . if 𝛽 𝑢 = F 2. (¬𝛽) 𝑢 = { T if 𝛽 𝑢 = T if 𝛽 𝑢 = 𝛾 𝑢 = T 3. (𝛽 ∧ 𝛾) 𝑢 = { T if 𝛽 𝑢 = T or 𝛾 𝑢 = T 4. (𝛽 ∨ 𝛾) 𝑢 = { T if 𝛽 𝑢 = F or 𝛾 𝑢 = T 5. (𝛽 → 𝛾) 𝑢 = { T if 𝛽 𝑢 = 𝛾 𝑢 6. (𝛽 ↔ 𝛾) 𝑢 = { T
Evaluating a formula using a truth table F T T F F T F F T F T T F T T T F T F F T T T T T T Semantics T T Example. T The truth table of ((𝑞 ∨ 𝑟) → (𝑟 ∧ 𝑠)) . 𝑞 𝑟 𝑠 (𝑞 ∨ 𝑟) (𝑟 ∧ 𝑠) ((𝑞 ∨ 𝑟) → (𝑟 ∧ 𝑠)) F F F F F F T F T F F T F T F T F F F 9/56
Evaluating a formula using a truth table Build the truth table of ((𝑞 → (¬𝑟)) → (𝑟 ∨ (¬𝑞))) . Semantics 10/56
Understanding the disjunction and the biconditional 𝛽 Semantics biconditional? an exclusive OR? T F T T T F T T F T F T 𝛾 (𝛽 ∨ 𝛾) Exclusive OR Biconditional F F F F T F T T 11/56 • What is the difgerence between an inclusive OR (the disjunction) and • What is the relationship between the exclusive OR and the
Understanding the conditional → Assume that proposition 𝑞 defjned below is true. 𝑞 : If Alice is rich, she will pay your tuition. If Alice is rich, will she pay your tuition? a. Yes b. No c. Maybe If Alice is not rich, will she pay your tuition? a. Yes b. No c. Maybe Semantics 12/56
Understanding the conditional → F Semantics connectives ∧ , ∨ and ¬ . Does this alternative formula make sense? compare to the truth value of the conclusion? statement ever be contradicted?) show that I broke my promise? T T Alice is rich T F T T T F T F F If Alice is rich, she will pay your tuition. Alice will pay your tuition. 13/56 • Suppose that the implication is a promise that I made. How can you • If the premise is false, is the statement true or false? (Will the • When the conclusion is true, is the statement true or false? • When the premise is true, how does the truth value of the statement • Convert 𝑞 → 𝑟 into a logically equivalent formula which only uses the
Another example of structural induction { F , T } . 1. If 𝛽 is a propositional variable, then 𝑢 assigns it a value of T or F (by the defjnition of a truth valuation). 2. If 𝛽 has a value in { F , T } , then (¬𝛽) also does, as shown by the truth table of (¬𝛽) . 3. If 𝛽 and 𝛾 each has a value in { F , T } , then (𝛽 ⋆ 𝛾) also does for every binary connective ⋆ , as shown by the corresponding truth tables. By the principle of structural induction, every formula has a value. By the unique readability of formulas, we have proved that a formula has only one truth value under any truth valuation 𝑢 . QED Semantics 14/56 Theorem: Fix a truth valuation 𝑢 . Every formula 𝛽 has a value 𝛽 𝑢 in Proof: The property for 𝑆(𝛽) is “ 𝛽 has a value 𝛽 𝑢 in { F , T } ”.
Tautology, Contradiction, Satisfjable Semantics Properties of formulas 15/56 A formula 𝛽 is a tautology if and only if for every truth valuation 𝑢 , 𝛽 𝑢 = T . A formula 𝛽 is a contradiction if and only if for every truth valuation 𝑢 , 𝛽 𝑢 = F . A formula 𝛽 is satisfjable if and only if there exists a truth valuation 𝑢 such that 𝛽 𝑢 = T .
Relationships among the properties Divide the set of all formulas into 3 mutually exclusive and exhaustive sets. We know two things about these sets: the formula’s truth table. Which of the following statements is true? a. In set 3, every formula is false in every row of the formula’s truth table. b. In set 2, every formula is true in at least one row and false in at least one row of the formula’s truth table. c. Sets 2 and 3 contain exactly the set of satisfjable formulas. d. Two of (a), (b), and (c) are true. e. All of (a), (b), and (c) are true. Semantics Properties of formulas 16/56 • A formula is in set 1 if and only if the formula is true in every row of • A formula is in set 3 if and only if it is a contradiction.
Examples 1. ((((𝑞 ∧ 𝑟) → (¬𝑠)) ∧ (𝑞 → 𝑟)) → (𝑞 → (¬𝑠))) 2. ((((𝑞 ∧ 𝑟) → 𝑠) ∧ (𝑞 → 𝑟)) → (𝑞 → 𝑠)) 3. (𝑞 ∨ 𝑟) ↔ ((𝑞 ∧ (¬𝑟) ∨ ((¬𝑞) ∧ 𝑟)) 4. (𝑞 ∧ (¬𝑞)) Semantics Properties of formulas 17/56
How to determine the properties of a formula Semantics Properties of formulas 18/56 • Truth table • Valuation tree • Reasoning
Valuation Tree Rather than fjll out an entire truth table, we can analyze what happens if Properties of formulas Semantics tree . T 𝑞 → 𝑞 T F → 𝑞 𝑞 T → 𝑞 ¬𝑞 𝑞 → F T 𝑞 → T 𝑞 𝑞 ∨ 𝑞 𝑞 𝑞 ∧ T we plug in a truth value for one variable. ¬ T F ¬ F T 𝑞 𝑞 ∨ F 𝑞 ∧ F F 𝑞 ∧ 𝑞 𝑞 𝑞 ∨ T T 19/56 We can evaluate a formula by using these rules to construct a valuation
Example of a valuation tree If 𝑢(𝑟) = F , it yields ( F → (¬𝑠)) and then T . (Check!). Properties of formulas Semantics Thus every valuation makes the formula true, as required. Simplifjcation yields (( F → (¬𝑠)) ∧ T ) → T and eventually T . ((( F ∧ 𝑟) → (¬𝑠)) ∧ ( F → 𝑟)) → ( F → (¬𝑠)) , Suppose 𝑢(𝑞) = F . We get If 𝑢(𝑟) = T , this yields ((¬𝑠) → (¬𝑠)) and then T . (Check!). Example. (((𝑟 → (¬𝑠)) ∧ 𝑟) → (¬𝑠)) . Based on the truth tables for the connectives, the formula becomes ((( T ∧ 𝑟) → (¬𝑠)) ∧ ( T → 𝑟)) → ( T → (¬𝑠)) . Suppose 𝑢(𝑞) = T . We put T in for 𝑞 : tautology by using a valuation tree. Show that (((𝑞 ∧ 𝑟) → (¬𝑠)) ∧ (𝑞 → 𝑟)) → (𝑞 → (¬𝑠))) is a 20/56
Reasoning about the properties I found a valuation for which the formula is false. Does the formula have Properties of formulas Semantics MAYBE NO YES MAYBE NO YES MAYBE NO YES I found a valuation for which the formula is true. Does the formula have each property below? MAYBE NO each property below? YES NO MAYBE YES NO MAYBE YES 21/56 • Tautology • Contradiction • Satisfjable • Tautology • Contradiction • Satisfjable
Examples 1. ((((𝑞 ∧ 𝑟) → (¬𝑠)) ∧ (𝑞 → 𝑟)) → (𝑞 → (¬𝑠))) 2. ((((𝑞 ∧ 𝑟) → 𝑠) ∧ (𝑞 → 𝑟)) → (𝑞 → 𝑠)) 3. (𝑞 ∨ 𝑟) ↔ ((𝑞 ∧ (¬𝑟)) ∨ ((¬𝑞) ∧ 𝑟)) 4. (𝑞 ∧ (¬𝑞)) Semantics Properties of formulas 22/56
Recommend
More recommend