Propositional Logic Introduction and Syntax
Alice Gao
Lecture 2
CS 245 Logic and Computation Fall 2019 Alice Gao 1 / 30
Propositional Logic Introduction and Syntax Alice Gao Lecture 2 - - PowerPoint PPT Presentation
Propositional Logic Introduction and Syntax Alice Gao Lecture 2 CS 245 Logic and Computation Fall 2019 Alice Gao 1 / 30 Outline Learning goals Propositions and Connectives Propositional Language Revisiting the learning goals CS 245
CS 245 Logic and Computation Fall 2019 Alice Gao 1 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 2 / 30
▶ Determine whether an English sentence is a proposition. ▶ Determine whether an English sentence is a simple or
▶ Determine whether a propositional formula is atomic and/or
▶ Draw the parse tree of a well-formed propositional formula. ▶ Given a propositional formula with no parentheses, make it a
CS 245 Logic and Computation Fall 2019 Alice Gao 3 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 4 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 5 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 6 / 30
▶ The sum of 3 and 5 is 8. ▶ The sum of 3 and 5 is 35. ▶ Goldbach’s conjecture: Every even number greater than 2 is
CS 245 Logic and Computation Fall 2019 Alice Gao 7 / 30
▶ Question: Where shall we go to eat? ▶ Command: Please pass the salt. ▶ Sentence fragment: The dogs in the park ▶ Non-sensical: Green ideas sleep furiously. ▶ Paradox: This sentence is false.
CS 245 Logic and Computation Fall 2019 Alice Gao 8 / 30
▶ A compound proposition is formed by means of logical
▶ A simple proposition is not compound and cannot be further
CS 245 Logic and Computation Fall 2019 Alice Gao 9 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 10 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 11 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 12 / 30
▶ The inclusive sense of “A or B or both” ▶ The exclusive sense of “A or B but not both”
CS 245 Logic and Computation Fall 2019 Alice Gao 13 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 14 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 15 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 16 / 30
▶ The negation is a unary connective. It only applies to one
▶ All other connectives are binary connectives. They apply to
▶ And, Or, and Equivalence are symmetric. The order of the
▶ Implication is not symmetric. If A then B, and if B then A
CS 245 Logic and Computation Fall 2019 Alice Gao 17 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 18 / 30
▶ Proposition symbols: 𝑞, 𝑟, 𝑠, … . ▶ Connective symbols: ¬, ∧, ∨, →, ↔.
▶ Punctuation symbols: ( and ).
CS 245 Logic and Computation Fall 2019 Alice Gao 19 / 30
▶ expressions are fjnite strings of symbols. Examples: 𝑞, 𝑞𝑟, (𝑠),
▶ The length of an expression is the number of occurrences of
▶ empty expression: an expression of length 0, denoted by 𝜇. ▶ two expressions 𝑣 and 𝑤 are equal if they are of the same
▶ an expression is read from left to right.
CS 245 Logic and Computation Fall 2019 Alice Gao 20 / 30
▶ 𝑣𝑤 denotes the result of concatenating two expressions 𝑣, 𝑤 in
▶ 𝑤 is a segment of 𝑣 if 𝑣 = 𝑥1𝑤𝑥2 where 𝑣, 𝑤, 𝑥1, 𝑥2 are
CS 245 Logic and Computation Fall 2019 Alice Gao 21 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 22 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 23 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 24 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 25 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 26 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 27 / 30
CS 245 Logic and Computation Fall 2019 Alice Gao 28 / 30
▶ ¬𝑞 ∨ 𝑟 ▶ 𝑞 ∧ 𝑟 ∨ 𝑠 ▶ 𝑞 → 𝑟 ↔ 𝑞 ▶ ¬𝑞 → 𝑞 ∧ ¬𝑟 ∨ 𝑠 ↔ 𝑟
CS 245 Logic and Computation Fall 2019 Alice Gao 29 / 30
▶ Determine whether an English sentence is a proposition. ▶ Determine whether an English sentence is a simple or
▶ Determine whether a propositional formula is atomic and/or
▶ Draw the parse tree of a well-formed propositional formula. ▶ Given a propositional formula with no parentheses, make it a
CS 245 Logic and Computation Fall 2019 Alice Gao 30 / 30