280wk12_x4

280wk12_x4 - Logic Logic is a tool for formalizing...

This preview shows pages 1–3. Sign up to view the full content.

Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and pro- grams) epistemic logic: for reasoning about knowledge The simplest logic (on which all the rest are based) is propositional logic . It is intended to capture features of arguments such as the following: Borogroves are mimsy whenever it is brillig. It is now brillig and this thing is a borogrove. Hence this thing is mimsy. Propositional logic is good for reasoning about conjunction, negation, implication (“if . . . then . . . ”) Amazingly enough, it is also useful for circuit design program verification 1 Propositional Logic: Syntax To formalize the reasoning process, we need to restrict the kinds of things we can say. Propositional logic is particularly restrictive. The syntax of propositional logic tells us what are legit- imate formulas. We start with primitive propositions . Think of these as statements like It is now brillig This thing is mimsy It’s raining in San Francisco n is even We can then form more complicated compound proposi- tions using connectives like: • ¬ : not • ∧ : and • ∨ : or • ⇒ : implies • ⇔ : equivalent (if and only if) 2 Examples: • ¬ P : it is not the case that P P Q : P and Q P Q : P or Q P Q : P implies Q (if P then Q ) Typical formula: P ( ¬ P ( Q ( R P ))) 3 Wffs Formally, we define well-formed formulas ( wffs or just formulas ) inductively (remember Chapter 2!): The wffs consist of the least set of strings such that: 1. Every primitive proposition P, Q, R, . . . is a wff 2. If A is a wff, so is ¬ A 3. If A and B are wffs, so are A B , A B , A B , and A B 4

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Disambiguating Wffs We use parentheses to disambiguate wffs: P Q R can be either ( P Q ) R or P ( Q R ) Mathematicians are lazy, so there are standard rules to avoid putting in parentheses. In arithmetic expressions, × binds more tightly than +, so 3 + 2 × 5 means 3 + (2 × 5) In wffs, here is the precedence order: ◦ ¬ ◦ ∧ ◦ ∨ ◦ ⇒ ◦ ⇔ Thus, P Q R is P ( Q R ); P ∨ ¬ Q R is P (( ¬ Q ) R ) P ∨ ¬ Q R is ( P ( ¬ Q )) R With two or more instances of the same binary con- nective, evaluate left to right: P Q R is ( P Q ) R 5 Translating English to Wffs To analyze reasoning, we have to be able to translate English to wffs. Consider the following sentences: 1. Bob doesn’t love Alice 2. Bob loves Alice and loves Ann 3. Bob loves Alice or Ann 4. Bob loves Alice but doesn’t love Ann 5. If Bob loves Alice then he doesn’t love Ann First find appropriate primitive propositions: P : Bob loves Alice Q : Bob loves Ann Then translate: 1. ¬ P 2. P Q 3. P Q 4. P ∧ ¬ Q (note: “but” becomes “and”) 5. P ⇒ ¬ Q 6 Evaluating Formulas Given a formula, we want to decide if it is true or false.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern