CS0441 lecture notes (review of 1.1-1.4, continuation of 1.5)

Propositional versus Predicate Logic

Predicate calculus separates out the referring expression from the rest of the proposition so that you can reason with the two separately:  Every president of the US was powerful.  Clinton was a president of the US.  Therefore, Clinton was powerful.

·        How can you represent “Clinton was powerful” in each type of logic?

·        What else does predicate logic give you?

Hints to remember:

  • First translate a sentence using a non-trivial universe of discourse for each variable, then change the universe of discourse of "anything" and add extra stuff to the logical expression.  For instance, if the sentence is "No dogs love all types of dogfood." then you can start with ~$x"y(love(x,y)) where x is a dog and y is a type of dogfood.  Then you change the universe of discourse to "anything" and change the logical expression to ~$x"y(dog(x) ^ (dogfood-type(y) -> love(x,y))))
  • When translating a quantified noun phrase such as "all dogs," put the qualifying predicate in the antecedent of an implication: "All dogs go to heaven" becomes "x (dog(x) -> go-to-heaven(x)).
  • When translating a quantified noun phrase such as "some idiot," put the qualifying predicate inside a conjunction: "Some idiot  woke me up" becomes $x (idiot(x) ^ woke-me-up(x)).
  • Once a quantifier is combined with a predicate, it is just a proposition like any other - so it can be inside logical operators (Translate “Life is hard and everyone dies”)
  • It is also typical to combine several predicates inside a quantifier using the logical operators – what is an example?

Proofs and Rules of inference

Whenever you have a tautology of the form A-> B, then you have a rule of inference.  Given a proposition A, you can infer B. 

 

Proofs are often shown using a multi-column format, where one column is propositions and the next  two columns are the rule of inference (or its name, if it is famous enough to have one) and the line number of the propositions it is applied to.  If the proposition is given initially, then one writes “Given” or “Hypothesis” as its justification. 

 

Suppose you are given Foo and Foo->Baz and are asked to prove Foo^Baz.  Here is the proof:

 

Line

Proposition

Justification

Applied to

1

Foo

Given

 

2

Foo -> Baz

Given

 

3

Baz

[P^(P->Q)] -> Q  Modeus Ponens

1,2

4

Foo ^ Baz

P^Q -> P^Q Conjunction

1,3

 

Practice with formal “theorem proving”

You can work forwards from the givens or backwards from the to-be-proved proposition.  

 

Example: Given

  • Randy works hard
  • If Randy works hard, then he is a dull boy.
  • If Randy is a dull boy, then he will not get the job

Prove

  • Randy will not get the job

 

Let

  • P = Randy works hard
  • ?

 

 

Proposition

Justification

Applied to

1

P

Given

 

?