Quantifier (logic)
Adapted from Wikipedia · Discoverer experience
In logic, a quantifier is a special symbol that tells us how many things in a group meet a certain condition. There are two main types of quantifiers. The universal quantifier, written as ∀, means "for all" or "everything." For example, if we say ∀ x P(x), it means that every single thing in our group has the property P.
The other main type is the existential quantifier, written as ∃, which means "there exists" or "at least one." If we write ∃ x P(x), it means that there is at least one thing in our group that has the property P. These symbols help us make clear and exact statements in logic.
Quantifiers are important because they let us express ideas like "all," "some," and "none" in a precise way. They are used in mathematics, computer science, and many other fields to build careful and accurate arguments. Understanding quantifiers helps us see the exact meaning behind statements that might otherwise be confusing or vague.
Relations to logical conjunction and disjunction
When we have a small set of items, saying "everything has a property" is the same as joining many "and" statements together. For example, if we have the numbers 0 and 1, saying "every number equals its square" means "0 equals 0 squared, and 1 equals 1 squared." This is true because both parts are true.
Sometimes we want to say "at least one thing has a property," which is like joining many "or" statements together. For example, saying "some number equals 5 plus 5" means "either 1 equals 5 plus 5, or 2 equals 5 plus 5, or 3 equals 5 plus 5," and so on.
Main article: logical conjunction
Main article: logical disjunction
Algebraic approaches to quantification
Some mathematicians have created special ways to study logic using algebra. These include relation algebra, which was invented by Augustus De Morgan and worked on by many others. Relation algebra can help understand some logic rules but has limits, like not being able to show very complex statements.
Other algebra methods include cylindric algebra and polyadic algebra, which were developed by different mathematicians to explore logic in new ways. These tools help us understand how logic works in a different style.
Notation
The two most common ways to show quantities in logic are the universal quantifier and the existential quantifier. The symbol "∀", a rotated letter "A", stands for "for all" or "all". The symbol "∃", a rotated letter "E", stands for "there exists" or "exists".
For example, if we have a statement like "Each of Peter's friends either likes to dance or likes to go to the beach (or both)", we can rewrite it using these symbols. Let X be all of Peter's friends, P(x) mean "x likes to dance", and Q(x) mean "x likes to go to the beach". The statement can then be written as ∀ x ∈ X, (P(x) ∨ Q(x)). This reads, "for every x that is a member of X, P applies to x or Q applies to x".
Other ways to write these ideas include:
- ∃ x P
- ∀ x P
These can be read as "there exists a friend of Peter who likes to dance" and "all friends of Peter like to dance", respectively. There are many different symbols and ways to write these ideas, and they all work in similar ways.
Order of quantifiers (nesting)
See also: Quantifier shift
The order of words like "every" and "some" changes the meaning of a sentence. For example:
- For every whole number n, there is a whole number s such that s equals n squared. This is true because every number has a square.
- There is a whole number s such that for every whole number n, s equals n squared. This is false because no single number can be the square of every whole number.
In math, the order of these words matters a lot. For example, in studying how smoothly a line or curve changes, the order of "for every" and "there exists" can change what the sentence means.
Swapping two "for every" words or two "there exists" words in the same part usually doesn’t change the meaning. But swapping a "there exists" with a nearby "for every" can change the meaning.
The deepest the words like "for every" and "there exists" are nested inside each other is called the "quantifier rank".
Equivalent expressions
In logic, we use special symbols to talk about groups of things. The symbol ∀ means "for all." For example, ∀ x P(x) tells us that everything in a certain group has a certain property.
Another symbol, ∃, means "there exists." For example, ∃ x P(x) means that at least one thing in the group has that property.
These symbols help us make clear and exact statements about groups and what is true for the things in them.
Range of quantification
Every quantification involves one specific variable and a domain of discourse or range of quantification of that variable. The range of quantification tells us the set of values that the variable can take. For example, it helps us express the difference between talking about natural numbers and real numbers.
Sometimes, we use a method called guarded quantification to limit what we are talking about. For instance, saying "For some natural number n, n is even and n is prime" means the same as "For some even number n, n is prime." In some mathematical theories, we assume one big domain of discourse from the start. For example, in Zermelo–Fraenkel set theory, variables can refer to any set. Guarded quantifiers help us focus on smaller groups within this big domain.
Formal semantics
Mathematical semantics uses math to study the meaning of expressions in a formal language. It looks at three main parts: how we build expressions using rules, different areas where meanings can exist, and how these two connect, often through a special matching rule.
This article focuses on how we understand quantities in logic. We can think of expressions as having a structure, like a tree. A quantifier has a "scope," and a variable like x is considered "free" if it isn’t inside a part of the expression that locks it down with a quantifier. For example, in the expression
∀ x (∃ y B(x, y)) ∨ C(y, x)
both x and y in C(y, x) are free, while x and y in B(x, y) are bound, meaning they are not free.
When we interpret formulas in logic, we start with a group of individuals, called a domain. A formula with free variables becomes a special kind of function that tells us if something is true or false, depending on the values we choose for those variables.
The universal quantifier, written as ∀, means “for all.” For example, ∀ x P(x) says that the property P is true for every single thing in our domain. The existential quantifier, written as ∃, means “there exists.” So ∃ x P(x) says that there is at least one thing in our domain where the property P is true.
Paucal, multal and other degree quantifiers
Some quantifiers describe special groups of numbers or items. For example, we might want to say "there are many numbers..." or "there are only a few numbers..." These ideas help us talk about groups in a more detailed way.
Mathematicians also use other ways to describe groups, like:
- There are infinitely many elements such that...
- For all but finitely many elements... (sometimes called "for almost all elements...").
- There are uncountably many elements such that...
- For all but countably many elements...
- For all elements in a set of positive size...
- For all elements except those in a very small set...
History
Term logic, also called Aristotelian logic, talked about "All," "Some," and "None" as far back as the 4th century BC. It was closer to everyday speech but harder to study in a formal way.
Later, in 1827, George Bentham wrote about the idea of quantifiers, but his book didn’t get much attention. William Hamilton is said to have created the words "quantify" and "quantification" around 1840. Augustus De Morgan helped popularize these ideas in the mid-1800s.
Gottlob Frege was the first to use quantifiers in a formal way in 1879. He showed how to say that everything or something in a group has a certain property. His work wasn’t well known until later.
Charles Sanders Peirce and his student Oscar Howard Mitchell also created symbols for these ideas in the late 1800s. Their symbols were used by many famous mathematicians and logicians. Over time, new symbols like ∀ were introduced and became common in the 1900s.
Images
Related articles
This article is a child-friendly adaptation of the Wikipedia article on Quantifier (logic), available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.
Safekipedia