next up previous
Next: About this document Up: My Home Page

Examples of Predicate Logic Formulas

Only dogs bark.

Rephrase: It barks only if it is a dog.

Or equivalently: If it barks, then it is a dog.

displaymath278

Everyone has a father.

displaymath279

Nobody is infallible.

displaymath280

Implicit Quantification

Sometimes the formal representation of a statement requires quantifiers, even though none of the telltale words ``all'', ``some'', etc. is present.

For example,

If a number is an integer, then it is a rational number
looks like a conditional statement, but is more accurately formalized as a universal statement,

displaymath281

Rephrasing the informal statement makes the use of a quantifier explicit.

Every integer is a rational number

Existential quantification can also be implicit.

The number 24 can be written as a sum of two even integers.

displaymath282

Domains and Predicates

There are different ways of specifying the domain of a predicate variable.

(1) Explicitly indicate the domain:

displaymath283

(2) Represent the domain by a predicate:

displaymath284

where tex2html_wrap_inline326 is meant to be true if, and only if, x is an element of D.

A statement

displaymath285

is said to be vacuously true or true by default if P(x) is false for every x.

This implies that a statement

displaymath286

is true whenever the domain D is empty, which reminds me of a tale (perhaps apocryphal) about the mathematician who proved all these wonderful properties about a special class of groups, of which it was ultimately proven that no groups were in this class ...

Multiple Quantifiers

Quantifiers can be nested, with alternations between universal and existential quantifiers.

Everybody loves somebody.
Somebody loves everybody.
These statements have similar structure, but with different order of quantifiers.

eqnarray199

Such statements are often difficult to evaluate.

Are the two statements equivalent?

Does one of them imply the other?

Consider two similar statements,

eqnarray201

where Z denotes the domain of integers.

Limits and Nested Quantifiers

Informally, a number L is the limit of a sequence

displaymath287

if the values tex2html_wrap_inline342 become arbitrarily close to L as n gets larger.

This concept can be formally defined in predicate logic as follows.

displaymath288

The logical complexity of this formula (two alternations of quantifiers) explains why most students find it hard to understand the concept of a limit.

Note that a formula

displaymath289

is just a shorthand for

displaymath290

Evaluation of Complex Formulas

The truth value of complex formulas with quantifiers may be difficult to determine.

Every even number is the sum of two primes.

displaymath291

displaymath292

The difficulty with evaluation of quantified statements, and a key difference between predicate and propositional logic, is that variables denote elements of some domain, which may be infinite.

For instance, a universal statement tex2html_wrap_inline348 is true if P(x) is true for all possible values of x.

If the given domain is infinite, e.g., the set of the integers or the real numbers, there are infinitely many cases to consider!

Angels and Devils

Sometimes it's helpful to pit an angel, whose job it is to make a formula true, against a devil, who attempts to make a formula false.

The two opponents scan a given formula, the angel making a move on an existential quantifier, whereas the devil takes his turn on a universal quantifier.

Each move consists of choosing a value for the quantified variable in question, dropping the quantifier, and applying the chosen substitution to the remaining formula.

Example.

displaymath293

  1. Faced with tex2html_wrap_inline354 , the devil chooses x=1,000.
  2. The angel gets tex2html_wrap_inline358 and chooses y=1,001.
  3. The game ends with the proposition 1,001 > 1,000, which is true. The angel wins.

The angel wins whenever the final proposition is true. Otherwise the devil wins.

More Challenging Game

Every integer has a (integer) square root.

displaymath294

  1. The devil begins and chooses x=4.
  2. The angel gets tex2html_wrap_inline366 and chooses y=2
  3. The result is a true proposition, tex2html_wrap_inline370 . The angel wins.
Poor strategy on the devil's part! Another try:

  1. The devil begins by choosing x=3.
  2. The angel gets tex2html_wrap_inline374 and chooses y=1.
  3. The result is a false proposition, tex2html_wrap_inline378 . The devil wins.
This is a winning strategy for the devil! The angel has no chance (in this case).

It's All Strategy

If there is a winning strategy for the devil, the original formula is false.

displaymath295

We have seen a winning strategy for the devil: choose x=3 (or x=5, or x=19, etc).

If there is a winning strategy for the angel, the original formula is true.

displaymath296

A winning strategy for the angel is to choose the number n+1 for y, whenever the devil has initially chosen n for x.

Logical Equivalence and Consequence

Some relationships hold between formulas just on the basis of their syntactical form, regardless of the meaning of the predicates.

Examples are more generalized forms of the logical equivalences from propositional logic.

displaymath297

displaymath298

That is, if two propositional formulas are logically equivalent, one may replace propositional formulas by arbitrary predicate logic formulas: the resulting formulas are still equivalent.

Other equivalences derive from more subtle connections between quantifiers and propositional connectives.

displaymath299

Negations of Quantified Statements

The negation of a universal statement is logically equivalent to an existential statement:

displaymath300

Not all students drink.
Some student does not drink.

The negation of an existential statement is logically equivalent to a universal statement:

displaymath301

No student failed the course.
All students passed the course.

The above equivalences indicate that only one of the two quantifiers is really needed.

Arguments about Dracula

Recall that a logical argument is a sequence of statements, of which the last one is called the conclusion, while all the others are called hypotheses.

An argument is valid if the conclusion is a logical consequence of the (conjunction of all the) hypotheses.

Example.

(1) Everyone is afraid of Dracula.
(2) Dracula is afraid only of me.
Therefore I am Dracula.

Is this argument valid?




next up previous
Next: About this document Up: My Home Page

Steve Skiena
Tue Aug 24 23:27:26 EDT 1999