Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Relations and multiple quantifiers

Everything quantified so far has had one place, so a formula could say what all things are like and never how any two of them stand to each other.

Relations fix that, and they bring the first genuinely hard thing in the subject with them. Once two quantifiers can appear in one formula, their order matters, and the difference between one order and the other is the difference between a triviality and a claim nobody can prove. English marks this distinction badly, which is why "everyone loves someone" is ambiguous in a way that xyLxy is not. This lesson makes the order precise, gives the rules for pushing a negation through a string of quantifiers, and ends with the place where the distinction earns its living, the definition of a limit.

Relations

A two-place predicate takes two names: Lab for "a loves b", Gab for "a is greater than b", Rab for "a read b". Order inside the predicate is fixed by convention and never symmetric by default, so Lab and Lba are different formulas and must be, since love famously runs one way as often as two.

Three-place predicates are equally legal, Bxyz for "x is between y and z", and everything below works the same way for them. Most of the useful cases have two places.

With relations available, properties of relations become formulas rather than English descriptions, and this is where the notation starts to pay. A relation R is reflexive when xRxx, symmetric when xy(RxyRyx), and transitive when xyz((RxyRyz)Rxz). "Is the same age as" satisfies all three; "is taller than" is transitive and neither reflexive nor symmetric; "is a sibling of" is symmetric and, on the usual reading, not transitive, since a person is not their own sibling and the relation chains oddly through half-siblings.

Order matters

Take the domain to be the positive integers and Gxy to mean x>y. Then

xyGyx

says that for every integer there is a larger one, which is true. Swap the quantifiers:

yxGyx

says that some single integer is larger than every integer, which is false, and not slightly false. The formulas differ only in the order of two symbols, and the reason for the difference is that in the first the choice of y may depend on x, while in the second y is fixed before x is considered and must work for all of them.

That is the whole rule and it is worth stating plainly: an inner quantifier may depend on an outer one, never the reverse. yx is a stronger claim than xy, and it entails it, while the converse fails.

Quantifiers of the same kind do commute. xy and yx say the same thing, and so do xy and yx. Only mixed pairs are order-sensitive, and only those need care.

Example. With a domain of three people, a, b and c, suppose a loves b, b loves c, and c loves a, and nobody loves anyone else. Evaluate xyLxy and yxLxy.

The first says everybody loves somebody. Check each person: a loves b, b loves c, c loves a, so it is true. The second says somebody is loved by everybody, which requires a single person loved by all three. b is loved only by a, c only by b, a only by c, so it is false. One small domain separates the two formulas, and building such a domain is the whole method of the next lesson.

Now you. In the same situation, evaluate xyLxy and say what it claims.

Answer

It claims somebody loves everybody, and it is false: each person loves exactly one other. Note it is a different claim from yxLxy, which was about being loved by everybody. The order of the variables inside L matters as much as the order of the quantifiers.

Pushing a negation through

Two laws relate the quantifiers, and they are De Morgan's laws again in a new setting.

¬xφx¬φ¬xφx¬φ

In words: denying that everything is F is asserting that something is not F, and denying that anything is F is asserting that everything is not F. The connection to De Morgan is exact. Over a finite domain of three objects, xFx is FaFbFc and xFx is FaFbFc, so the quantifier laws are the propositional ones with the conjunction and disjunction stretched to any length, including an infinite one.

Applied repeatedly, they push a negation all the way inside: each quantifier it passes flips, and the negation lands on the matrix at the end. So

¬xy(FxGxy)xy¬(FxGxy)xy(Fx¬Gxy)

using the fifth lesson's rule for negating a conditional at the last step. This is the standard first move in any proof by contradiction involving quantifiers, and doing it mechanically rather than by intuition is what stops "not every" from turning into "none".

Example. Negate "every student read some book on the list", and say what a refutation must produce.

Write it as x(Sxy(ByRxy)). Pushing the negation in: x¬(Sxy(ByRxy)), then x(Sx¬y(ByRxy)), then

x(Sxy(By¬Rxy))

So a refutation must produce one student such that every book on the list went unread by that student. Not a student who missed one book: a student who read none of them. The mechanical negation says exactly what evidence would settle the question, which is usually the reason for doing it.

Now you. Negate xy(FyGxy) and read the result in words.

Answer

xy(Fy¬Gxy): for every x there is some F that x does not stand in G to. If Gxy is "x has read y" and Fy is "y is on the list", the original says someone read everything on the list and the negation says everyone missed something on it.

Translating with restrictions

Most English quantification is restricted to a kind of thing, and the eighth lesson's two patterns still do the work: a universal takes a conditional, an existential takes a conjunction. With relations, those patterns nest.

"Every student read a book" is x(Sxy(ByRxy)): the outer universal takes a conditional, the inner existential a conjunction. "Some student read every book" is x(Sxy(ByRxy)), with the same two patterns in the other order. Writing them side by side is the best drill available, since each mistake produces a formula that says something clearly wrong rather than something merely odd.

English is genuinely ambiguous here and the notation is not, which cuts both ways. "Every student read a book" most naturally means each read some book or other, but it can mean there is one particular book they all read, and only the formula distinguishes them. When translating a real document, translating both readings and asking which was meant is often the most useful thing a logician does.

The definition of a limit

The most consequential quantifier order in mathematics is in the definition of continuity, and it is worth seeing because it shows the difference doing real work rather than making a point about love or integers.

A function f is continuous on a set when

ε>0xδ>0y(|x-y|<δ|f(x)-f(y)|<ε)

and uniformly continuous when the δ moves in front of the x:

ε>0δ>0xy(|x-y|<δ|f(x)-f(y)|<ε)

Everything else is identical. In the first, δ may depend on where you are; in the second, one δ must work everywhere at once. By the rule above, uniform continuity implies continuity and not conversely.

The gap is real and numbers show it. Take f(x)=x2 on the whole real line with ε=1. Near x=1 a step of δ=0.001 is ample: 1.0012-12=0.002001, comfortably under 1. Near x=1000 the same step fails, since 1000.0012-10002=2.000001, which is over 1. To keep the output change under 1 near x=1000 the step must be under about 1/2000, and as x grows the required δ shrinks without limit. So no single δ serves every x: the function is continuous everywhere and not uniformly continuous. Squaring is a familiar operation, and the difference between two orderings of two quantifiers is what separates two of its properties.

Example. State, with quantifiers, what it takes for f to fail to be uniformly continuous.

Negate the definition and push the negation in. ε becomes ε, δ becomes δ, the two s become s, and the conditional becomes a conjunction:

ε>0δ>0xy(|x-y|<δ|f(x)-f(y)|ε)

For f(x)=x2 this is what the numbers above exhibit: with ε=1, whatever δ is offered, a pair of points that close together can be found far enough out to move the output by at least 1.

Now you. "Every lock in the building has a key that opens it" and "there is a key that opens every lock in the building". Write both, and say which entails the other.

Answer

With Lx for locks, Ky for keys and Oyx for "y opens x", the first is x(Lxy(KyOyx)) and the second is y(Kyx(LxOyx)). The second entails the first, since a master key opens each lock in turn. The first does not entail the second, as a building with different keys for each door shows.

What is still missing

The language is now expressive enough for the working mathematics of the rest of this course and for most careful English. What has not been said is what any of it means precisely. "True in the domain of positive integers" was used freely above, and "false" was justified by pointing at three people and a loving relation, which is persuasive rather than exact.

The gap matters because the truth table method has quietly died. A formula with quantifiers has no finite list of valuations to run through: the domain may be infinite, and there are infinitely many domains. So the third lesson's decision procedure is gone and something must replace it, both for saying what truth in a structure is and for the practical business of refuting an invalid argument. That is the next lesson.