Skip to main content

Subsection 6.2.1 Formal Claims are Easier Than Everyday Claims

It’s often difficult to write completely accurate logical statements about the real world. There are too many exceptions.

For example, we might be tempted to say:

x (Bird(x)  CanFly(x))

While this goes a long way toward describing an interesting fact of nature, it’s not quite true. Penguins can’t fly. Neither can birds that have just been born or ones with crude oil on their wings. The real world is messy. We’ll have more to say about this soon.

But now suppose that, instead of describing the world as it happens to be, we want to specify how the world (or, more likely, some tiny, controllable part of it) must or ought to be. In other words, we are writing a set of specifications or requirements.

For example: I get to decide the rules for passwords on my website. So I might write:

x (Password(x)  (y (Contains(x, y)  Letter(y))  z (Contains(x, z)  Number(z))))

While this might be a bit off-putting for my customers (who’d rather be told, “Every password must contain at least one letter and one number”), it’s a precise specification that I can give to the programmer who will write the code to make sure that every password actually meets the requirement.

Going even farther: in mathematics, we typically make claims that are even more abstract (and thus more general). Our claims don’t talk about something as specific as passwords. They talk about, say, anything we can count. We’ll see that there, the logic that we’ve just described is exactly what we need.

Exercises Exercises

1.

1. Suppose that I wanted to add a new constraint to my password rule. I want to say that no special characters are allowed. Assume the following predicate:

Spec(y): True if y is a special character.

My plan is to modify the specification given above so that it has this form:

x (Password(x) → (∃y (Contains(x, y) ∧ Letter(y)) ∧ ∃z (Contains(x, z) ∧ Number(z)) ∧****))

Consider the following expressions:

I. ∀y (Spec(y) → ¬Contains(x, y))

II. ¬∃y (Spec(y) ∧ Contains(x, y))

III. ∃y (Spec(y) ∧ ¬Contains(x, y))

IV. ∀y (Contains(x, y) → ¬Spec(y))

V. ∀yContains(x, y) → Spec(y))

Which (one or more) of those expressions could not be inserted in place of ****?

  1. Just I.

  2. Just II.

  3. Just III.

  4. II and IV.

  5. III and V.

Answer.
Correct answer is E.
Solution.
Explanation: I, II and IV are equivalent. They all say that there cannot be any special character contained by x. (You can use our identities to prove that they all say the same thing.) III says that there exists a special character that x doesn’t contain. V says that if x doesn’t contain y, then y is a special character. But this isn’t necessarily true. There could be lots of characters that x doesn’t contain.