Mathematics | Predicates and Quantifiers | Set 1
Prerequisite : Introduction to Propositional Logic
Consider the following example. We need to convert the following sentence into a mathematical statement using propositional logic only.
"Every person who is 18 years or older, is eligible to vote."
The above statement cannot be adequately expressed using only propositional logic. The problem in trying to do so is that propositional logic is not expressive enough to deal with quantified variables. It would have been easier if the statement were referring to a specific person. But since it is not the case and the statement applies to all people who are 18 years or older, we are stuck.
Therefore we need a more powerful type of logic.
Predicate logic is an extension of Propositional logic. It adds the concept of predicates and quantifiers to better capture the meaning of statements that cannot be adequately expressed by propositional logic.
What is a predicate?
Consider the statement, “ is greater than 3″. It has two parts. The first part, the variable , is the subject of the statement. The second part, “is greater than 3”, is the predicate. It refers to a property that the subject of the statement can have.
The statement “ is greater than 3″ can be denoted by where denotes the predicate “is greater than 3” and is the variable.
The predicate can be considered as a function. It tells the truth value of the statement at . Once a value has been assigned to the variable , the statement becomes a proposition and has a truth or false(tf) value.
In general, a statement involving n variables can be denoted by . Here is also referred to as n-place predicate or a n-ary predicate.
- Example 1: Let denote the statement “ > 10″. What are the truth values of and ?
Solution: is equivalent to the statement 11 > 10, which is True.
is equivalent to the statement 5 > 10, which is False.
- Example 2: Let denote the statement ““. What is the truth value of the propositions and ?
Solution: is the statement 1 = 3 + 1, which is False.
is the statement 2 = 1 + 1, which is True.
What are quantifiers?
In predicate logic, predicates are used alongside quantifiers to express the extent to which a predicate is true over a range of elements. Using quantifiers to create such propositions is called quantification.
There are two types of quantification-
1. Universal Quantification- Mathematical statements sometimes assert that a property is true for all the values of a variable in a particular domain, called the domain of discourse. Such a statement is expressed using universal quantification.
The universal quantification of for a particular domain is the proposition that asserts that is true for all values of in this domain. The domain is very important here since it decides the possible values of . The meaning of the universal quantification of changes when the domain is changed. The domain must be specified when a universal quantification is used, as without it, it has no meaning.
Formally, The universal quantification of is the statement " for all values of in the domain" The notation denotes the universal quantification of . Here is called the universal quantifier. is read as "for all ".
- Example 1: Let be the statement “ > “. What is the truth value of the statement ?
Solution: As is greater than for any real number, so for all or .
2. Existential Quantification- Some mathematical statements assert that there is an element with a certain property. Such statements are expressed by existential quantification. Existential quantification can be used to form a proposition that is true if and only if is true for at least one value of in the domain.
Formally, The existential quantification of is the statement "There exists an element in the domain such that " The notation denotes the existential quantification of . Here is called the existential quantifier. is read as "There is atleast one such such that ".
- Example : Let be the statement “ > 5″. What is the truth value of the statement ?
Solution: is true for all real numbers greater than 5 and false for all real numbers less than 5. So .
Now if we try to convert the statement, given in the beginning of this article, into a mathematical statement using predicate logic, we would get something like-
Here, P(x) is the statement "x is 18 years or older and, Q(x) is the statement "x is eligible to vote".
Notice that the given statement is not mentioned as a biconditional and yet we used one. This is because Natural language is ambiguous sometimes, and we made an assumption. This assumption was made since it is true that a person can vote if and only if he/she is 18 years or older. Refer Introduction to Propositional Logic for more explanation.
Other Quantifiers –
Although the universal and existential quantifiers are the most important in Mathematics and Computer Science, they are not the only ones. In Fact, there is no limitation on the number of different quantifiers that can be defined, such as “exactly two”, “there are no more than three”, “there are at least 10”, and so on.
Of all the other possible quantifiers, the one that is seen most often is the uniqueness quantifier, denoted by .
The notation states "There exists a unique such that is true".
Quantifiers with restricted domains
As we know that quantifiers are meaningless if the variables they bind do not have a domain. The following abbreviated notation is used to restrict the domain of the variables-
> 0, > 0.
The above statement restricts the domain of , and is a shorthand for writing another proposition, that says , in the statement.
If we try to rewrite this statement using an implication, we would get-
Similarly, a statement using Existential quantifier can be restated using conjunction between the domain restricting proposition and the actual predicate.
- Restriction of universal quantification is the same as the universal quantification of a conditional statement.
- Restriction of an existential quantification is the same as the existential quantification of conjunction.
Definitions to Note:
1. Binding variables- A variable whose occurrence is bound by a quantifier is called
a bound variable. Variables not bound by any quantifiers are called free variables.
2. Scope- The part of the logical expression to which a quantifier is applied is called
the scope of the quantifier.
This topic has been covered in two parts. The second part of this topic is explained in another article – Predicates and Quantifiers – Set 2
This article is contributed by Chirag Manwani. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.