Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

23
Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe

Transcript of Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Page 1: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Chapter 2: Syntax and Symbolization

80-210: Logic & Proofs

July 2, 2009

Karin Howe

Page 2: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Syntax = grammar of a logical statement

• Two different categories of basic expressions: – Atomic formulae

• Sentences that have no logically relevant internal structure• Examples:

– The cat is in the teapot.– The cat is all wet.

– Logical connectives• Serve to connect formulae (atomic or otherwise) to create

more complex formulas.• Examples:

– Cats are a lot of trouble but they are also a lot of fun.– If the cat is in the teapot, then it is both mad and wet.

Page 3: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Types of logical connectives

• Conjunction– "and"

• Disjunction– "or"

• Conditionals– "if … then"

• Negation– "not"

Page 4: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Conjunctions

• Recall that conjunctions usually involve the word "and"

• However, conjunctions may also be expressed using any one of a number of (logical) synonyms for "and"– but, however, moreover, although, yet, even

though, …

Page 5: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Symbolizing Conjunctions

• Example: The cat is wet and mad.1. Standardize: The cat is wet and the cat is

mad.

2. Loglish: W and M

3. Symbolize: (W & M)

• The two parts of a conjunction are called the right conjunct and the left conjunct

Page 6: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Practice With Conjunctions

• My husband has many fine qualities, but he has one serious hangup. ~ letter to 'Dear Abby"

• War is cruel and you cannot refine it. ~ General William Sherman

• I May Be Fat, But You're Ugly–And I Can Diet!~ bumper sticker

• Santa Claus is alive and well and living in Argentina.~ bumper sticker

Page 7: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

The Two-Chunk Rule

• The Two Chunk Rule says: Once more than one logical connective symbol is necessary to translate a statement, there must be punctuation that identifies the main connective of a symbolic statement. In addition, there cannot be any part of a statement in symbols that contains more than two statements, or chunks of statements, without punctuation

• Examples:– A– (A & B)– (A & B C) A

• Why do we care??– WFFs– Finding the main connective

• But why do we care about the main connective?– Truth tables (and truth trees)– Derivations

Page 8: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

WFFs and Parse Trees

• WFF = well formed formulae

• Parse trees• Example: ((P & Q) (R S))

Page 9: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Disjunctions

• Recall that disjunctions usually involve the word "or"

• However, disjunctions may also be expressed using any one of a number of (logical) synonyms for "or"– either/or, and/or

Page 10: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Disjunctions: Exclusive vs. Inclusive

• You can have either cherries or pickles on your ice cream.

• Two ways you can interpret this:– Pick one - cherries or pickles– You can have both! (yuck!)

• We will take "or" in the inclusive sense (thus and/or is just shorthand for inclusive "or")

• If need be, we can represent exclusive "or" as follows:– You can have either chocolate sauce or pickles on your ice

cream, but not both.

Page 11: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Symbolizing Disjunctions

• Example: Either the cat is wet or mad.1.Standardize: Either the cat is wet or the cat is

mad.

2.Loglish: W or M

3.Symbolize: (W M)

• The two parts of a disjunction are called the right disjunct and the left disjunct

Page 12: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Practice With Disjunctions

• This woman must be either mad or drunk.~ Plautus dialogue

• Either that man's a fraud or he's your brother. ~ Plautus

• I can either run the country or control Alice–not both.~ Theodore Roosevelt

• They'd better lost the attitude and listen to their dad, or they won't get diddly crap.~ newspaper, lottery winner discussing her grandchildren

Page 13: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Conditionals

• Recall that conditionals usually involve the phrase "if … then"

• However, conditionals may also be expressed using any one of a number of (logical) synonyms for "if … then"– provided (that), given (that), should, will result in, only

if, is a necessary condition for, is a sufficient condition for

Page 14: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Symbolizing Conditionals

• Example: If the cat is wet, then it is mad.1. Standardize: If the cat is wet, then the cat is mad.

2. Loglish: if W then M

3. Symbolize: (W M)

• The two parts of a conditional are called the antecedent and the consequent– antecedent appears before the – consequent comes after the

Page 15: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Tricky Conditionals

• Necessary Conditions– P is a necessary condition for Q

– Rewritten as: If Q, then P

– Symbolized as: Q P

– Mnemonic: neceSSary conditions come second

• Sufficient Conditions– P is a sufficient condition for Q

– Rewritten as: If P, then Q

– Symbolized as: P Q

– Mnemonic: suFFicient conditions come first

Page 16: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Tricky Conditionals, con't

• "only if"– P only if Q– Rewritten as: If P, then Q– Symbolized as: P Q

• "unless"– P unless Q– Rewritten as: If not Q, then P– Symbolized as: Q P

Page 17: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Practice With Conditionals

• I am extraordinarily patient provided I get my own way in the end.~ Margaret Thatcher

• If 14-year-olds had the vote, I'd be President. ~ Evil Knievel

• If the Grand Jury calls me back I will be glad to cooperate fully if my immunity is extended.~ CREEP operative

• If the axioms could be so selected that they were necessarily true, then, if the deductions were valid, the truth of the theorems would be guaranteed.~ logician James Carney

Page 18: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Negations

• Recall that negations usually involve the word "not"

• However, negations may also be expressed using any one of a number of (logical) synonyms for "not"– It is not true that, it is false that, no, never, isn't (won't,

didn't, etc.), it is not the case that, unless (equivalent to "if not"), without (equivalent to "but not"), neither/nor (equivalent to "it is false that either/or")

Page 19: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Symbolizing Negations

• Example: The cat is not wet.1. Standardize: It is not the case that the cat is wet.

2. Loglish: not W

3. Symbolize: W

Page 20: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Practice With Negations

• [Read my lips], no new taxes~ presidential candidate George Bush (senior)

• I am not a crook.~ Richard Nixon

• Now we shall have duck eggs, unless it is a drake.~ Hans Christian Anderson

• If God didn't want them sheared, he wouldn't have made them sheep.~ Eli Wallach in "The Magnificent Seven"

Page 21: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

More Practice

• Possession of a hot plate in the dorms is not illegal. (L = possession of a hot plate in the dorms is legal)~ student newspaper

• Kiss me, and a handsome prince will appear.~ Wizard of Id

• Marvin's being busted for "pot" possession is a sufficient condition for his being dropped from the team.

• Nancy's scoring above 1,000 on the GRE is a necessary condition for her admission to graduate school.

• It is illegal to feed or harass alligators.~ Everglades sign

Page 22: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.

Final Note: Parentheses: To Drop, or Not To Drop

• (P & Q) (R S)– ((P & Q) (R S))

A & B C D– (((A & B) C) D)

A B C & D – (A (B (C & D)))

• Procedure for re-inserting parentheses:1. First, insert parentheses around every occurrence of & and its two

conjuncts, starting with the rightmost & and ending with the leftmost 2. Next, insert parentheses in the same fashion for each and its two

disjuncts, from rightmost occurrence first, to the leftmost occurrence last3. Finally, insert parentheses for each , and its antecedent and consequent,

from rightmost occurrence first, to the leftmost occurrence last

Page 23: Chapter 2: Syntax and Symbolization 80-210: Logic & Proofs July 2, 2009 Karin Howe.