Propositional Logic - University of Iowa
Propositional Logic - University of Iowa
Propositional Logic - University of Iowa
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
22c:188 (CS:4350) <strong>Logic</strong> in Computer ScienceChristoph StickselDepartment <strong>of</strong> Computer Science<strong>University</strong> <strong>of</strong> <strong>Iowa</strong>August 22, 2012
<strong>Logic</strong>al Form <strong>of</strong> ArgumentsIf the train arrives late and there are no taxis at thestation then John is late for his meeting. John is notlate for his meeting. The train did arrive late.Therefore, there were taxis at the station.If it is raining and Jane does not have her umbrella withher, then she will get wet. Jane is not wet. It is raining.Therefore, Jane has her umbrella with her.If p and not q, then r. Not r. p Therefore, q.p ∧ ¬q → r ¬r pq
Atomic Declarative Sentences1. The sum <strong>of</strong> the numbers 3 and 5 equals 8.2. Jane reacted violently to Jack’s accusations.3. Every natural number greater than 2 is the sum <strong>of</strong> two primes.4. All Martians like pepperoni on their pizza.5. Albert Camus était un écrivain français.6. Die Würde des Menschen ist unantastbar.
Syntax <strong>of</strong> <strong>Propositional</strong> <strong>Logic</strong>◮ Atomic Sentence:Every propositional atom p, q, r, . . . , p 1 , p 2 , . . . and theconstants ⊤ and ⊥ are well-formed formulas.◮ Negation:If Φ is a well-formed formula, then so is ¬Φ.◮ Conjunction:If Φ and Ψ are well-formed formulas, then so is Φ ∧ Ψ.◮ Disjunction:If Φ and Ψ are well-formed formulas, then so is Φ ∨ Ψ.◮ Implication:If Φ and Ψ are well-formed formulas, then so is Φ → Ψ.Φ ::= ⊤ | ⊥ | p | (¬Φ) | (Φ ∧ Φ) | (Φ ∨ Φ) | (Φ → Φ)Operator precedence: ¬ > ∧ > ∨ > →Implication is right-associative
From Declarative Sentences to <strong>Propositional</strong> <strong>Logic</strong>1. If the sun shines today, then it won’t shine tomorrow.2. Today it will rain or shine, but not both.3. If the barometer falls, then either it will rain or it will snow.4. Robert was jealous <strong>of</strong> Yvonne, or he was not in a good mood.5. If a request occurs, then either it will eventually beacknowledged or the requesting process won’t ever be able tomake progress.6. Cancer will not be cured unless its cause is determined and anew drug for cancer is found.7. My sister wants a black and white cat.
Formulas and Binding PrioritiesOperator precedence: ¬ > ∧ > ∨ > →Implication is right-associative1. ¬p ∧ q → r2. (p → q) ∧ ¬(r ∨ p → q)3. ¬p → ¬r ∧ q → s4. p ∨ q → ¬p ∨ r5. p ∨ q ∧ r