Predicates and Quantifiers
(Content adapted from Critchlow & Eck)
In propositional logic, we can let stand for "Roses are red" and stand for "Violets are blue." Then will stand for "Roses are red and violets are blue." But we lose a lot in the translation into logic. Since propositional logic only deals with truth values, there's nothing we can do with and in propositional logic that has anything to do with roses, violets, or color. To apply logic to such things, we need predicates. The type of logic that uses predicates is called predicate logic, or, when the emphasis is on manipulating and reasoning with predicates, predicate calculus.
A predicate is a kind of incomplete proposition, which becomes a proposition when it is applied to some entity (or, as we'll see later, to several entities). In the proposition "the rose is red," the predicate is is red. By itself, "is red" is not a proposition. Think of it as having an empty slot, that needs to be filled in to make a proposition: "— is red." In the proposition "the rose is red," the slot is filled by the entity "the rose," but it could just as well be filled by other entities: "the barn is red"; "the wine is red"; "the banana is red." Each of these propositions uses the same predicate, but they are different propositions and they can have different truth values.
If is a predicate and is an entity, then stands for the proposition that is formed when is applied to . If represents "is red" and stands for "the rose," then is "the rose is red." If is the predicate "is mortal" and is "Socrates," then is the proposition "Socrates is mortal."
Now, you might be asking, just what is an entity anyway? I am using the term here to mean some specific, identifiable thing to which a predicate can be applied. Generally, it doesn't make sense to apply a given predicate to every possible entity, but only to entities in a certain category. For example, it probably doesn't make sense to apply the predicate "is mortal" to your living room sofa. This predicate only applies to entities in the category of living things, since there is no way something can be mortal unless it is alive. This category is called the domain of discourse for the predicate.1
We are now ready for a formal definition of one-place predicates. A one-place predicate, like all the examples we have seen so far, has a single slot which can be filled in with one entity:
A one-place predicate associates a proposition with each entity in some collection of entities. This collection is called the domain of discourse for the predicate. If is a predicate and is an entity in the domain of discourse for , then denotes the proposition that is associated with by . We say that is the result of applying to .
We can obviously extend this to predicates that can be applied to two or more entities. In the proposition "John loves Mary," loves is a two-place predicate. Besides John and Mary, it could be applied to other pairs of entities: "John loves Jane," "Bill loves Mary," "John loves Bill," "John loves John." If is a two-place predicate, then denotes the proposition that is obtained when is applied to the entities and . Note that each of the "slots" in a two-place predicate can have its own domain of discourse. For example, if represents the predicate "owns," then will only make sense when is a person and is an inanimate object. An example of a three-place predicate is " gave to ," and a four-place predicate would be " bought from for dollars." But keep in mind that not every predicate has to correspond to an English sentence.
When predicates are applied to entities, the results are propositions, and all the operators of propositional logic can be applied to these propositions just as they can to any propositions. Let be the predicate "is red," and let be the two-place predicate "loves." If , , , , and are entities belonging to the appropriate categories, then we can form compound propositions such as:
Quantifiers
Let's go back to the proposition with which we started this section: "Roses are red." This sentence is more difficult to handle than it might appear. We still can't express it properly in logic. The problem is that this proposition is not saying something about some particular entity. It really says that all roses are red (which happens to be a false statement, but that's what it means). Predicates can only be applied to individual entities.
Many other sentences raise similar difficulties: "All persons are mortal." "Some roses are red, but no roses are black." "All math courses are interesting." "Every prime number greater than two is odd." Words like all, no, some, and every are called quantifiers. We need to be able to express similar concepts in logic.
Suppose that is a predicate, and we want to express the proposition that is true when applied to any entity in the domain of discourse. That is, we want to say "for any entity in the domain of discourse, is true." In predicate logic, we write this in symbols as . The symbol, which looks like an upside-down A, is usually read "for all," so that is read as "for all , ." (It is understood that this means for all in the domain of discourse for .) For example, if is the predicate "is red" and the domain of discourse consists of all roses, then expresses the proposition "All roses are red." Note that the same proposition could be expressed in English as "Every rose is red" or "Any rose is red."
Now, suppose we want to say that a predicate, , is true for some entity in its domain of discourse. This is expressed in predicate logic as . The symbol, which looks like a backwards E, is usually read "there exists," but a more exact reading would be "there is at least one." Thus, is read as "There exists an such that ," and it means "there is at least one in the domain of discourse for for which is true." If, once again, stands for "is red" and the domain of discourse is "roses," then could be expressed in English as "There is a red rose" or "At least one rose is red" or "Some rose is red." It might also be expressed as "Some roses are red," but the plural is a bit misleading since is true even if there is only one red rose. We can now give the formal definitions:
Suppose that is a one-place predicate. Then is a proposition, which is true if and only if is true for every entity in the domain of discourse for . And is a proposition which is true if and only if there is at least one entity, , in the domain of discourse for for which is true. The symbol is called the universal quantifier, and is called the existential quantifier.
The in and is a variable. (More precisely, it is an entity variable, since its value can only be an entity.) Note that a plain —without the or —is not a proposition. is neither true nor false because is not some particular entity, but just a placeholder in a slot that can be filled in with an entity. would stand for something like the statement " is red," which is not really a statement in English at all. But it becomes a statement when the is replaced by some particular entity, such as "the rose." Similarly, becomes a proposition if some entity is substituted for the , giving .2
An open statement is an expression that contains one or more entity variables, which becomes a proposition when entities are substituted for the variables. (An open statement has open "slots" that need to be filled in.) and " is red" are examples of open statements that contain one variable. If is a two-place predicate and and are variables, then is an open statement containing two variables. An example in English would be " loves ." The variables in an open statement are called free variables. An open statement that contains as a free variable can be quantified with or . The variable is then said to be bound. For example, is free in and is bound in and . The free variable in becomes bound in and in .
Note that is still an open statement, since it contains as a free variable. Therefore, it is possible to apply the quantifier or to , giving and . Since all the variables are bound in these expressions, they are propositions. If represents " loves ," then is something like " loves everyone," and is the proposition, "There is someone who loves everyone." Of course, we could also have started with : "There is someone who loves ." Applying to this gives , which means "For every person, there is someone who loves that person." Note in particular that and do not mean the same thing. Altogether, there are eight different propositions that can be obtained from by applying quantifiers, with six distinct meanings among them.
(From now on, I will leave out parentheses when there is no ambiguity. For example, I will write instead of and instead of . Furthermore, I will sometimes give predicates and entities names that are complete words instead of just letters, as in and . This might help to make examples more readable.)
Translating between Predicate Logic and English
In predicate logic, the operators and laws of Boolean algebra still apply. For example, if and are one-place predicates and is an entity in the domain of discourse, then is a proposition, and it is logically equivalent to . Furthermore, if is a variable, then is an open statement, and is a proposition. So are and . Obviously, predicate logic can be very expressive. Unfortunately, the translation between predicate logic and English sentences is not always obvious.
Let's look one more time at the proposition "Roses are red." If the domain of discourse consists of roses, this translates into predicate logic as . However, the sentence makes more sense if the domain of discourse is larger—for example if it consists of all flowers. Then "Roses are red" has to be read as "All flowers which are roses are red," or "For any flower, if that flower is a rose, then it is red." The last form translates directly into logic as . Suppose we want to say that all red roses are pretty. The phrase "red rose" is saying both that the flower is a rose and that it is red, and it must be translated as a conjunction, . So, "All red roses are pretty" can be rendered as .
Here are a few more examples of translations from predicate logic to English. Let represent " is happy," let represent " is a computer," and let represent " owns ." (The domain of discourse for consists of people, and the domain for consists of inanimate objects.) Then we have the following translations:
- Jack owns a computer: . (That is, there is at least one thing such that Jack owns that thing and that thing is a computer.)
- Everything Jack owns is a computer: .
- If Jack owns a computer, then he's happy: .
- Everyone who owns a computer is happy: .
- Everyone owns a computer: . (Note that this allows each person to own a different computer. The proposition would mean that there is a single computer which is owned by everyone.)
- Everyone is happy: .
- Everyone is unhappy: .
- Someone is unhappy: .
- At least two people are happy: . (The stipulation that is necessary because two different variables can refer to the same entity. The proposition is true even if there is only one happy person.)
- There is exactly one happy person: . (The first part of this conjunction says that there is at least one happy person. The second part says that if and are both happy people, then they are actually the same person. That is, it's not possible to find two different people who are happy.)
Logical Equivalence
To calculate in predicate logic, we need a notion of logical equivalence. Clearly, there are pairs of propositions in predicate logic that mean the same thing. Consider the propositions and , where represents " is happy." The first of these propositions means "Not everyone is happy," and the second means "Someone is not happy." These statements have the same truth value: If not everyone is happy, then someone is unhappy and vice versa. But logical equivalence is much stronger than just having the same truth value. In propositional logic, logical equivalence is defined in terms of propositional variables: two compound propositions are logically equivalent if they have the same truth values for all possible truth values of the propositional variables they contain. In predicate logic, two formulas are logically equivalent if they have the same truth value for all possible predicates.
Consider and . These formulas make sense for any predicate , and for any predicate they have the same truth value. Unfortunately, we can't—as we did in propositional logic—just check this fact with a truth table: there are no subpropositions, connected by , , etc, out of which to build a table. So, let's reason it out: To say is true is just to say that it is not the case that is true for all possible entities . So, there must be some entity for which is false. Since is false, is true. But saying that there is an for which is true is just saying that is true. So, the truth of implies the truth of . On the other hand, if is false, then is true. Since is true for every , is false for every ; that is, there is no entity for which the statement is true. But this just means that the statement is false. In any case, then, the truth values of and are the same. Since this is true for any predicate , we will say that these two formulas are logically equivalent and write .
A similar argument would show that . These two equivalences, which explicate the relation between negation and quantification, are known as De Morgan's Laws for predicate logic. (They are closely related to De Morgan's Laws for propositional logic; see the exercises.) These laws can be used to help simplify expressions. For example,
It might not be clear exactly why this qualifies as a "simplification," but it's generally considered simpler to have the negation operator applied to basic propositions such as , rather than to quantified expressions such as . For a more complicated example:
De Morgan's Laws are listed in the following figure along with two other laws of predicate logic. The other laws allow you to interchange the order of the variables when two quantifiers of the same type (both or ) occur together. can be any one-place predicate, and can be any two-place predicate.
De Morgan | |
Interchange | |
To define logical equivalence in predicate logic more formally, we need to talk about formulas that contain predicate variables, that is, variables that act as place-holders for arbitrary predicates in the same way that propositional variables are place-holders for propositions and entity variables are place-holders for entities. With this in mind, we can define logical equivalence and the closely related concept of tautology for predicate logic.
Let be a formula of predicate logic which contains one or more predicate variables. is said to be a tautology if it is true whenever all the predicate variables that it contains are replaced by actual predicates. Two formulas and are said to be logically equivalent if is a tautology, that is if and always have the same truth value when the predicate variables they contain are replaced by actual predicates. The notation asserts that is logically equivalent to .
Exercises
Simplify each of the following propositions. In your answer, the operator should be applied only to individual predicates.
Answer
Answer
Answer
Answer
Answer
Answer
Answer
, or
Answer
Give a careful argument to show that the second of De Morgan's laws for predicate calculus, , is valid.
Answer
[Note that this question used to be about the equivalence of and , but that argument is detailed in the text.] Suppose that . Consider any entity in the domain of discourse. If were true, then we would have , but that contradicts our assumption. Therefore, holds. Since the choice of was arbitrary, we may conclude that .
Conversely, suppose that . If we also assume that is true, then that says that there is some entity such that is true. However, by our first assumption, we know that (since holds for all entities ). This is a contradiction, so if is true then is also true. This concludes the argument that the two expressions are equivalent.
Find the negation of each of the following propositions. Simplify the result; in your answer, the operator should be applied only to individual predicates.
Answer
Answer
Answer
Answer
Suppose that the domain of discourse for a predicate contains only two entities. Show that is equivalent to a conjunction of two simple propositions, and is equivalent to a disjunction. Show that in this case, De Morgan's Laws for propositional logic and De Morgan's Laws for predicate logic actually say exactly the same thing. Extend the results to a domain of discourse that contains exactly three entities.
Answer
If the domain of discourse is , then the expression means the same as . Similarly, means . The De Morgan laws for the quantifiers are then exactly the De Morgan laws for and : , and similarly for the dual statement.
If the domain has three entities, , then means , and means . Again, the De Morgan laws for the quantifiers can easily be seen to be equivalent to those for and . This observation extends to any finite domain of discourse.
Let stand for " is happy," where the domain of discourse consists of people. Express the proposition "There are exactly three happy people" in predicate logic.
Answer
We can express "there are at least three happy people" with . That is, there are three people , , and that are all happy, and none of them are equal to each other (they are "pairwise distinct"). To require that there are exactly three happy people, we may add the extra condition . This says that, in addition, if there were any other happy person , then they would have to be one of the three already listed.
Let stand for " has taken ," where the domain of discourse for consists of students and the domain of discourse for consists of math courses (at your school). Translate each of the following propositions into an unambiguous English sentence:
Answer
Every student has taken every math course.
Answer
Every student has taken at least one math course.
Answer
Every math course has been taken by at least one student.
Answer
There is a student who has taken a math course.
Answer
There is a student who has taken all of the math courses.
Answer
There is a math course that all of the students have taken.
Let stand for "You can fool person at time ." Translate the following sentence into predicate logic: "You can fool some of the people all of the time, and you can fool all of the people some of the time, but you can't fool all of the people all of the time."
Answer
Translate each of the following sentences into a proposition using predicate logic. Make up any predicates you need. State what each predicate means and what its domain of discourse is.
- All crows are black.
Answer
Let the domain of discourse be all birds, and consider the predicates meaning " is a crow$ and meaning " is black." The sentence is then .
- Any white bird is not a crow.
Answer
To the previous answer add the predicate meaning " is white." The sentence is .
- Not all politicians are honest.
Answer
If the domain of discourse is just politicians and means that " is honest," then the sentence is .
However, if we take the domain to be larger (such as all people), then we also need a predicate to mean that " is a politician." Now the sentence becomes . Equivalently, we may write —"There is a politician who is not honest."
- All green elephants have purple feet.
Answer
One choice is to have the domain be all elephants, with the predicates for " is green" and for " has purple feet." In this case, the sentence is . Other solutions are possible.
- There is no one who does not like pizza.
Answer
Let the domain of discourse be all people, and the predicate means that " likes pizza." The sentence is then expressed by . This can also be written —"Everyone likes pizza."
- Anyone who passes the final exam will pass the course.
Answer
Take the domain to be all students. If the predicates are for " passes the final exam" and for " passes the course", then our sentence is .
- If is any positive number, then there is a number such that .
Answer
If the domain of discourse is the real numbers, then we are saying .
- All crows are black.
The sentence "Someone has the answer to every question" is ambiguous. Give two translations of this sentence into predicate logic, and explain the difference in meaning.
Answer
Let the domains be people () and questions (), and use the predicate to mean " has the answer to ." One translation is ; that is, there is a single person who knows all of the answers. Another translation is , which says that, for each question, someone knows the answer, although it might be different people for different questions.
The sentence "Jane is looking for a dog" is ambiguous. One meaning is that there is some particular dog—maybe the one she lost—that Jane is looking for. The other meaning is that Jane is looking for any old dog—maybe because she wants to buy one. Express the first meaning in predicate logic. Explain why the second meaning is not expressed by . In fact, the second meaning cannot be expressed in predicate logic. Philosophers of language spend a lot of time thinking about things like this. They are especially fond of the sentence "Jane is looking for a unicorn," which is not ambiguous when applied to the real world. Why is that?
Answer
The first meaning is expressed by . For the second meaning, the given expression would say that Jane is looking for all dogs—for any that is a dog, Jane is looking for it. That would be exhausting for Jane. The problem with the second meaning, and the unicorn version, is that just because Jane is looking for the thing does not mean that there is such a thing in the domain of discourse, so a quantifier over that domain will not suffice.
- In the language of set theory, which will be introduced in the next chapter, we would say that a domain of discourse is a set, , and a predicate is a function from to the set of truth values. The definition should be clear enough without the formal language of set theory, and in fact you should think of this definition—and many others—as motivation for that language.↩
- There is certainly room for confusion about names here. In this discussion, is a variable and is an entity. But that's only because I said so. Any letter could be used in either role, and you have to pay attention to the context to figure out what is going on. Usually, , , and will be variables.↩