Knaph

The course as a book

Logic Level 5: All, Some and the Things Inside a Claim

Look inside a claim - at the things it is about and what it says of them - and write "all" and "some" in symbols, check arguments with small made-up worlds, and prove them step by step.

Inside a Claim

What the Letters Hide

All dogs bark. Rex is a dog. So Rex barks. Everyone can see that this argument is good. Can the logic we have so far see it too? Let us try, and find out what is missing.

Try it with letters

Give each claim a letter, as in Levels 2 to 4. P: All dogs bark. Q: Rex is a dog. R: Rex barks. The argument is now P, Q, so R.

Now hunt for a bad row, as in Level 3: premises true, conclusion false. Nothing stops it. The three letters are separate claims, so P and Q can be true while R is false.

PQRRow
TTFpremises true, conclusion false: a bad row

So the table calls the argument invalid. A Level 4 proof does no better: no rule takes P and Q to R. Yet the argument is valid. If all dogs bark and Rex is a dog, Rex must bark.

Three claims about Rex and dogs, each turned into one letter, P, Q and R, with a red note that the letters share nothing.

What the letters threw away

Look inside the claims. The word dog is in the first claim and in the second. The name Rex is in the second and in the third. The word bark is in the first and in the third.

Those repeated words are the reason the argument works. A letter turns a whole claim into one block, so every shared word disappears. P, Q and R look like three strangers.

A grid with three rows, one per claim, and three columns, dog, Rex and bark, showing which words each claim uses and which claims share a word.

The argument is valid because of how the claims are built inside, not because of how they are joined.

What we need

We need four things. A name for one thing, such as Rex. A way to write what is said about a thing, such as is a dog. The words all and some. And symbols for them, so that tables and proofs can use them.

People have worked on this for a long time. About 350 BC, Aristotle listed the valid patterns of arguments with all, some and none: the syllogisms. In 1879, in his book Begriffsschrift, Gottlob Frege wrote all and some as symbols and joined them with the letters logic you know.

That joined logic is Level 5. We go in steps: names and what is said of them, all and some, English into symbols, small worlds, proofs, and the word is. Then we can see inside a claim.

Careful

The bad row does not make the dog argument invalid. It only shows that the letters are too coarse to see why it is valid.

Try it at home

  1. Write a new argument of the same kind: "All birds have wings. Tweety is a bird. So Tweety has wings." Underline each repeated word in a different colour.
  2. Give your argument the letters P, Q and R. Find the bad row. Does it make your argument bad?
  3. Change the argument to "All dogs bark. Rex barks. So Rex is a dog." Is it valid? Look for a barking animal that is not a dog.

Words to know

  • bad row - a row of the truth table where every premise is true and the conclusion is false
  • name - a word that picks out one thing, such as Rex
  • syllogism - an old pattern of argument with all, some or none, first listed by Aristotle

Big idea

Letters hide the inside of a claim, and some arguments are valid because of that inside. To see them we need names, words for what is said of things, and all and some.

Lesson page →

Names and Predicates

"Rex is a dog." "Fido is a dog." "Tom is a dog." Three claims, one pattern. The first two are true. The third is false, because Tom is a cat. How can we write the part that stays the same apart from the part that changes?

Names

A name picks out one thing. We write it as a small letter, from a to w. A key says which thing: r: Rex means that r stands for Rex. A name must pick out exactly one thing. "Dogs" is not a name, because it means many things. "Rex" is a name: one dog.

Our small world is a park with three animals. The key starts with a domain line, the things we are talking about. The next module says more about it.

Domain: animals in the park
r: Rex
f: Fido
t: Tom

A park with three animals as circles named r, f and t: Rex and Fido are dogs, Tom is a cat, and only Rex barks.

Predicates

Now the part that changes. Take "Rex is a dog" and take the name out: "___ is a dog". A claim with a gap is a predicate. We write it Dx: x is a dog. The letter x only marks the gap. Capital letters are predicates, small letters are names.

Dx is not yet a claim, because it is not true or false. Fill the gap with a name and it becomes one. Dr is read "Rex is a dog". It is true. Dt is read "Tom is a dog". It is false.

The pattern 'blank is a dog' with the names Rex and Tom dropped into the blank: Rex gives Dr, which is true, and Tom gives Dt, which is false.

Add a second predicate, Bx: x barks. Now check six claims in the park. The predicate letter comes first, then the name.

ClaimRead asTrue?
DrRex is a dogtrue
DfFido is a dogtrue
DtTom is a dogfalse
BrRex barkstrue
BfFido barksfalse
BtTom barksfalse

A key for everything

Every translation starts with a key. A key now has three kinds of line: the domain, the names, and the predicates.

Domain: animals in the park
r: Rex, f: Fido, t: Tom
Dx: x is a dog
Bx: x barks

With this key, Br says Rex barks, and Bf says Fido barks. Br is true and Bf is false: each is a true or false claim, like a letter P, but now with its inside showing.

Careful

Dx on its own says nothing. It is not true and not false until a name fills the gap. And D is not d: a capital letter is a predicate, a small letter is a name.

Try it at home

  1. Pick three things in your room. Give each a name and write a key line for it, such as l: my lamp.
  2. Write a predicate for your things, such as Wx: x is made of wood. Fill the gap with each name. Which claims are true?
  3. Write a key with a domain line, three names and two predicates. Ask a friend to read your claims aloud.

Words to know

  • name - a small letter, a to w, that picks out exactly one thing
  • predicate - a claim with a gap, such as Dx: x is a dog
  • key - the list that says what the domain, the names and the predicates mean
  • domain - the things we are talking about

Big idea

A name picks out one thing and a predicate is a claim with a gap. Fill the gap with a name and you have a claim that is true or false.

Lesson page →

Claims About Two Things

Ana likes Ben. Does Ben like Ana? Not always. Liking can go one way. A predicate with one gap cannot say who likes whom. How do we write a claim with two things in it?

Two gaps

Some claims connect two things: likes, is taller than, lives next to. Such a predicate has two gaps. We write Lxy: x likes y. It is a two-place predicate, also called a relation.

Fill both gaps with names and you have a claim. Order matters: the first name fills the first gap. Lab is "Ana likes Ben". Lba is "Ben likes Ana". These are different claims, and one can be true while the other is false.

Domain: three friends
a: Ana, b: Ben, c: Cara
Lxy: x likes y

Three friends as circles named a, b and c, with arrows for likes: Ana likes herself, Ana likes Ben, and Ben likes Cara.

In the picture an arrow goes from the one who likes to the one who is liked.

ClaimRead asTrue?
LabAna likes Bentrue
LbaBen likes Anafalse
LbcBen likes Caratrue
LcbCara likes Benfalse
LaaAna likes herselftrue
LccCara likes herselffalse

The same name twice, and three places

You may put the same name in both gaps. Laa is "Ana likes Ana", that is, Ana likes herself. It is a loop in the picture. With Txy: x is taller than y, the claim Taa is always false: nobody is taller than themselves.

Some predicates have three gaps. Bxyz: x is between y and z. Then Bbac says Ben is between Ana and Cara. The first name is the one in the middle.

One relation or two claims?

Take "Ana and Ben are tall". It says Ana is tall and Ben is tall. That is two claims, Ta and Tb, and each can stand alone.

Now take "Ana and Ben are married to each other". We cannot split it. "Ana is married to each other" means nothing. It is one claim with a relation, Mab.

Two panels: Ana and Ben are tall splits into two separate claims, Ta and Tb, while Ana and Ben are married to each other stays one claim, Mab.

So watch the word and. Does it join two claims, or does it sit inside one relation?

Careful

Do not read Lab as "b likes a". The first name is the one that does the liking.

Try it at home

  1. Write Lxy: x likes y for three people you know. Draw an arrow for each like. Is every arrow answered by another?
  2. Write down Lab and Lba for two real people. Can one be true and the other false?
  3. Find three English sentences with two things in them, such as "Oslo is north of Rome". Write a key and the formula for each.

Words to know

  • relation - a predicate with two or more gaps, such as Lxy: x likes y
  • two-place predicate - a predicate with two gaps; the first name fills the first gap
  • order - Lab and Lba are different claims

Big idea

A relation has two gaps and the order of the names matters: Lab and Lba are different claims.

Lesson page →

Connectives Meet Predicates

"Rex barks but Fido does not." "If Ana likes Ben, Ben likes Ana." "Neither Ana nor Ben is tall." You know how to join claims with connectives. Do they still work when each piece has a name and a predicate inside?

The same connectives

A claim like Br or Lab, a predicate with every gap filled by a name, is atomic: it is the smallest claim we write. An atomic claim is true or false, like a letter P. So ¬ (not), ∧ (and), ∨ (or), → (if-then) and ↔ (if and only if) join atomic claims exactly as before.

Domain: animals in the park
r: Rex, f: Fido
Bx: x barks

In the pictured park, Rex barks and Fido does not. Check four claims.

A park with two dogs as circles named r and f: Rex has the tag B because he barks, Fido has no tag because he is silent.

EnglishFormulaTrue?
Rex barks but Fido does notBr ∧ ¬Bftrue
Rex or Fido barksBr ∨ Bftrue
If Rex barks, Fido barksBr → Bffalse
Rex barks just when Fido doesBr ↔ Bffalse

With relations too

Relations join in the same way. "If Ana likes Ben, Ben likes Ana" is Lab → Lba. "Ana likes Ben and Ben likes Cara" is Lab ∧ Lbc.

"Neither Ana nor Ben is tall" says both are not tall. With Tx: x is tall, write ¬Ta ∧ ¬Tb. De Morgan's law gives the same claim as ¬(Ta ∨ Tb): not even one of them is tall.

Proofs still work

Level 4's proofs work on these claims, because a proof only looks at the connectives. Here is a proof with Lab → Lba and Lab. Ask first: what do we want? Lba. What gives it? If-out, →E.

#LineWhy
1Lab → Lbapremise
2Labpremise
3Lba→E 1, 2

Here is another, with Br ∨ Bf and ¬Br: Rex or Fido barks, and Rex does not, so Fido does.

A three-line proof: Rex barks or Fido barks, Rex does not bark, so Fido barks, by the rule or-out, DS, from lines 1 and 2.

There is still something we cannot say: "every dog barks". The next module adds it.

Careful

"Neither Ana nor Ben is tall" is ¬Ta ∧ ¬Tb, not ¬Ta ∨ ¬Tb. The or version only says that at least one of them is not tall.

Try it at home

  1. Write a key for two friends and one predicate, such as Sx: x swims. Write four claims with ¬, ∧, ∨ and →.
  2. Say "neither Ana nor Ben swims" in two ways, and check that both mean the same.
  3. Write a two-line argument with Lab → Lba and Lab, and name the rule that proves Lba.

Words to know

  • atomic claim - a predicate with every gap filled by a name, such as Br or Lab
  • connective - a symbol that joins claims: ¬ ∧ ∨ → ↔

Big idea

Predicates with names in them are atomic claims, and the connectives and proofs of Level 4 work on them just as they work on letters.

Lesson page →

All and Some

For Every x

"Everyone in this class is friendly." The claim is not about Ana, or Ben, or Cara alone. It is about all of them at once. We have names for single things. How do we write a claim about every thing?

A placeholder called x

In Level 5 so far we wrote Fa for "Ana is friendly". Now take "everyone is friendly". It says: pick any child you like, and that child is friendly. The words "any child" work like the word "it": they stand for whichever thing we pick.

In logic the placeholder is a letter, usually x. It is called a variable. A variable is not a name. The name a picks out Ana, always. The variable x waits: it can stand for any thing in the domain.

The symbol ∀ is read "for every". So ∀x is read "for every x", and ∀x Fx is read "for every x, x is friendly". Here is the key we use.

Domain: children in a class
a: Ana, b: Ben, c: Cara
Fx: x is friendly, Gx: x is glad

The formula ∀x Fx in big letters, with the words for every x under the symbol ∀x and the words x is friendly under Fx.

When is it true?

∀x Fx is true when every thing in the domain is friendly. We check them one by one: Ana, Ben, Cara. If all three pass, the claim is true.

One thing that fails is enough to make it false. That thing is a counterexample, just as in Level 1: one black swan breaks "all swans are white".

A class of three children, Ana, Ben and Cara, as circles. All three carry the tag F for friendly, and Ana and Ben carry the tag G for glad, but Cara does not.

In the pictured class, Ana, Ben and Cara are all friendly, so ∀x Fx is true. Only Ana and Ben are glad, so ∀x Gx is false. Cara is the counterexample.

Saying two things about every thing

We can say more than one thing about each thing. ∀x(Fx ∧ Gx) is read "for every x, x is friendly and x is glad". Every thing must have both. The brackets hold the two parts together.

FormulaRead aloudTrue in the class?
∀x Fxfor every x, x is friendlytrue
∀x Gxfor every x, x is gladfalse (Cara)
∀x(Fx ∧ Gx)for every x, x is friendly and gladfalse (Cara)

Check the last row twice. Ana and Ben are both friendly and glad. But the claim covers every child, and Cara is not glad, so one counterexample is enough.

Careful

The letter x is not a name. ∀x Fx does not talk about a thing called x. It talks about every thing in the domain, one after another.

Try it at home

  1. Pick a group, such as your family. Write a Domain line and a predicate, such as Wx: x wears glasses. Check ∀x Wx one person at a time.
  2. Write one "everyone ..." claim that is true in your group and one that is false. For the false one, name the counterexample.
  3. Read ∀x(Fx ∧ Gx) aloud in your own words, then say what one failing thing would do to it.

Words to know

  • variable - a letter, such as x, that stands for any thing in the domain; it is not a name
  • ∀ (for every) - the symbol that says every thing in the domain has what follows
  • counterexample - one thing that fails, so the "for every" claim is false

Big idea

∀x Fx says every thing in the domain is F. It is true when nothing fails, and one counterexample makes it false.

Lesson page →

There Is at Least One

"Someone in this class is friendly." Is it enough that one child is friendly? What if all of them are? We need a symbol for "some" that does not stretch or shrink.

At least one

The symbol ∃ is read "there is at least one ... such that". So ∃x Fx is read "there is at least one x such that x is friendly".

As in Level 1, "some" means at least one. Maybe one, maybe more, maybe all. A thing that makes ∃x Fx true is a witness: we point at it and say, "this one is friendly".

Domain: children in a class
a: Ana, b: Ben, c: Cara
Fx: x is friendly, Gx: x is glad

The same class of three children, but now only Ana and Ben carry the tag F for friendly, and Cara has no tag.

In this class ∃x Fx is true, and Ana and Ben are both witnesses. One witness would be enough. ∀x Fx is false, because Cara is not friendly.

When is it false?

∃x Fx is false only when we search every thing and find no witness. If nobody in the class is friendly, ∃x Fx is false.

Notice the difference. To show ∀x Fx true we must check every thing. To show ∃x Fx true we need only find one.

One thing with both, or two things

Now say two things. ∃x(Fx ∧ Gx) means there is at least one x such that x is friendly and x is glad. It needs one thing with both.

∃x Fx ∧ ∃x Gx means: there is a friendly thing, and there is a glad thing. They may be two different things. Each ∃x reaches only the claim next to it.

The class again. Ana carries the tag F for friendly, Ben carries the tag G for glad, and Cara has no tag. Nobody carries both.

FormulaTrue in this class?Why
∃x Fx ∧ ∃x GxtrueAna is friendly, Ben is glad
∃x(Fx ∧ Gx)falseno one is friendly and glad

So the two formulas are not the same claim. The second one is stronger: it needs a single thing with both.

Careful

Some does not mean "not all". ∃x Fx is still true when every thing is F. And ∃x(Fx ∧ Gx) is not the same as ∃x Fx ∧ ∃x Gx.

Try it at home

  1. Use your own group and a predicate. Find a witness for ∃x Wx, where Wx: x wears glasses. If there is none, say so: the claim is false.
  2. Write a world of three things where ∃x Fx ∧ ∃x Gx is true but ∃x(Fx ∧ Gx) is false.
  3. Say aloud, in two different ways, what ∃x Fx means. Check that neither way says "exactly one".

Words to know

  • ∃ (there is at least one) - the symbol that says at least one thing in the domain has what follows
  • witness - a thing that makes an "at least one" claim true
  • some - in logic, at least one: perhaps one, perhaps many, perhaps all

Big idea

∃x Fx says at least one thing in the domain is F. One witness makes it true, and it stays true if all are F.

Lesson page →

Everything in What?

"Everyone has a phone." In one class this is true. In a whole town it is false. The words did not change. What did?

The domain

When we say "everyone", we never mean everyone that exists. We mean everyone in some group. That group is the domain: the things that ∀x and ∃x talk about.

So every key starts with a Domain line. Here is one. Px: x has a phone.

Domain: children in this class
a: Ana, b: Ben, c: Cara
Px: x has a phone

A class of three children, Ana, Ben and Cara. All three carry the tag P for has a phone.

∀x Px is read "for every x, x has a phone". In this domain all three have a phone, so it is true.

Same formula, other domain

Now change only the domain: people in the town. It has Ana, Ben, Cara and also Dan, a baby, who has no phone.

A town of four people: Ana, Ben and Cara carry the tag P for has a phone, and Dan, a baby, has no tag.

The formula ∀x Px is the same, but now ∀x Px ranges over four people, and Dan is a counterexample. So it is false.

Domain∀x Px∃x Px
children in this classtruetrue
people in the townfalsetrue

A claim with ∀ or ∃ has a truth value only once the domain is fixed. Without a domain, "everyone" is not clear.

Two rules for a domain

First, a domain is never empty. It has at least one thing. Second, every name in the key names a thing in the domain. If the domain is the children in this class, then Ana must be in the class.

A domain can be numbers too. Take Domain: whole numbers 0, 1, 2 ... (see sets) and Ex: x is even. Then ∀x Ex is false, because 1 is odd, and ∃x Ex is true, because 2 is even.

Every key we have written has a Domain line. Now you know what it is for.

Careful

Never leave the domain out. "Everyone has a phone" is neither true nor false until we say everyone in what.

Try it at home

  1. Write a Domain line for your street, then Hx: x has a garden. Is ∀x Hx true? Is ∃x Hx true?
  2. Take the claim "everyone is over 10 years old". Find a domain where it is true and a domain where it is false.
  3. Check a key you wrote: does every name in it name a thing in the domain?

Words to know

  • domain - the collection of things that ∀ and ∃ talk about; written first in a key
  • range over - a quantifier ranges over the things in the domain
  • empty domain - a domain with no things: not allowed in this course

Big idea

∀x and ∃x talk about the things in the domain. The same formula can be true in one domain and false in another.

Lesson page →

How Far a Quantifier Reaches

∀x(Fx → Gx) and ∀x Fx → Gx look almost the same. Only the brackets differ. Do they say the same? And is the second one even a claim? We must ask how far a quantifier reaches.

The reach of a quantifier

A quantifier reaches over what comes right after it. With brackets, it reaches over everything inside them. Without brackets, it reaches over only the short piece next to it, such as Fx or ¬Fx. The reach is called its scope.

Two formulas with a blue bar under the part each ∀x reaches. In the first, the bar covers all of ∀x(Fx → Gx). In the second, the bar covers only ∀x Fx, and a red bar marks the last Gx, which lies outside the reach.

In ∀x(Fx → Gx), the ∀x reaches over Fx → Gx, so both x are bound: the quantifier ties them. Read it: for every x, if x is friendly then x is glad.

In ∀x Fx → Gx, the ∀x reaches only Fx. The x in Gx is outside, so it is free. Its main connective is →, the step done last, as in Level 4.

Free means no claim

A formula with a free variable is not a claim. Compare "it is red": red what? We cannot say true or false until we say what "it" is. Likewise Gx has no truth value: x stands for nothing. So ∀x Fx → Gx is not a claim.

Put a name there instead and it is a claim: ∀x Fx → Ga means "if everyone is friendly, Ana is glad". The brackets matter.

Not everything, or nothing

Scope also separates two formulas with ¬. Take Domain: children in a class, and Fx: x is friendly.

¬∀x Fx is "not: for every x, x is friendly", so "not everything is friendly". ∀x ¬Fx is "for every x, x is not friendly", so "nothing is friendly".

The class of Ana, Ben and Cara. Ana and Ben carry the tag F for friendly, and Cara does not.

FormulaRead aloudTrue?
¬∀x Fxnot everything is friendlytrue (Cara)
∀x ¬Fxnothing is friendlyfalse (Ana)

They are different claims. Later we will see exactly how ¬ and the quantifiers swap.

Careful

Brackets after a quantifier change the meaning. ∀x(Fx → Gx) is a claim, but ∀x Fx → Gx is not: its last x is free.

Try it at home

  1. Put a bar under the reach of each quantifier in ∃x(Fx ∧ Gx) and in ∃x Fx ∧ Gx. Which x is free?
  2. Say in plain English: "not everyone came" and "nobody came". Write each with Cx: x came.
  3. Choose a formula with a free variable. Add a quantifier or a name to make it a claim.

Words to know

  • scope - the part of a formula that a quantifier reaches over
  • bound variable - a variable inside the reach of a quantifier that uses its letter
  • free variable - a variable outside any such reach; a formula with one is not a claim

Big idea

A quantifier reaches over its brackets, or over the next atomic claim. A variable it does not reach is free, and then the formula is not a claim.

Lesson page →

English into All and Some

All as an If

"All dogs bark." The quick way to write it is: for every x, x is a dog and x barks. But read that back aloud. Is it what we meant? How do we write a claim about all the dogs, or some of the dogs, when the domain holds other animals too?

All dogs: an if

Our domain is all the animals in a park, not only dogs. Rex and Fido are dogs. Tom is a cat. "All dogs bark" is about the dogs only.

Try ∀x(Dx ∧ Bx). It reads "for every x, x is a dog and x barks". That says every animal in the park is a barking dog, Tom too. We did not mean that.

Say it as a rule instead: take any animal; if it is a dog, then it barks. That is ∀x(Dx → Bx).

Domain: animals in the park
r: Rex, f: Fido, t: Tom
Dx: x is a dog, Bx: x barks, Mx: x meows

A park with three animals as circles: Rex and Fido carry the tags D for dog and B for barks, and Tom carries the tag M for meows.

In this park ∀x(Dx → Bx) is true. Check Tom: Dt is false, and an if with a false first part is true (truth tables). Tom does not break the rule. But ∀x(Dx ∧ Bx) is false, because Tom is not a dog.

Some dogs: an and

"Some dogs bark" says at least one animal is both a dog and a barker: ∃x(Dx ∧ Bx).

Why not ∃x(Dx → Bx)? Look at a second park, where Rex and Fido do not bark. Tom is not a dog, so Dt → Bt is true, and Tom is a witness. So ∃x(Dx → Bx) is true, yet no dog barks.

The same park, but now only Tom has a tag, M for meows. Rex and Fido are dogs that do not bark.

The rule of thumb: ∀ goes with →, and ∃ goes with ∧.

Two panels. The left one says all dogs bark is written with for every and an if. The right one says some dogs bark is written with there is and an and.

No dogs, and dogs that don't

"No dogs meow" means any dog does not meow: ∀x(Dx → ¬Mx). "Some dogs don't bark" means at least one dog is a non-barker: ∃x(Dx ∧ ¬Bx). The same rule holds. Here they are in the second park.

FormulaSaysTrue in the second park?
∀x(Dx → Bx)all dogs barkfalse (Rex)
∃x(Dx ∧ Bx)some dog barksfalse
∀x(Dx → ¬Mx)no dog meowstrue
∃x(Dx ∧ ¬Bx)some dog doesn't barktrue (Rex)

Always read a translation back in English before you trust it.

Careful

∀x(Dx ∧ Bx) is not "all dogs bark". It says everything in the domain is a barking dog.

Try it at home

  1. Pick a group, such as the animals in a zoo. Write "All lions sleep" and "Some lions sleep" with a key. Say each back in words.
  2. Make up a small world where ∃x(Dx → Bx) is true but no dog barks. What kind of thing is the witness?
  3. Write "No cats bark" and "Some cats don't bark". Which one uses →?

Words to know

  • ∀ with → - "all D are B" is written ∀x(Dx → Bx): any thing that is D is also B
  • ∃ with ∧ - "some D are B" is written ∃x(Dx ∧ Bx): one thing that is both
  • witness - a thing that makes an ∃ claim true

Big idea

Write "all D are B" as ∀x(Dx → Bx) and "some D are B" as ∃x(Dx ∧ Bx): ∀ goes with →, ∃ goes with ∧.

Lesson page →

Not All and Not Any

"Not all that glitters is gold." Does it say that nothing which glitters is gold? It does not. "Nobody came" and "not everybody came" also sound close, but they say very different things. How do we put "not" in front of ∀ and ∃?

A big and, a big or

Take a domain of just two things, Ana and Ben. Then "for every x, Fx" says Fa ∧ Fb: both are F. And "there is at least one x with Fx" says Fa ∨ Fb: at least one is F. So ∀ is a big and, and ∃ is a big or.

Now put a ¬ in front. In Level 4 we met De Morgan's rules: ¬(P ∧ Q) says the same as ¬P ∨ ¬Q, and ¬(P ∨ Q) says the same as ¬P ∧ ¬Q.

A world of two children. Only Ana carries the tag F for friendly. Beside it, the claims turned into Fa and Fb joined by and, and by or, with their truth values.

That gives two rules, true for a domain of any size. ¬∀x Fx says the same as ∃x ¬Fx: not everything is F, so something is not F. ¬∃x Fx says the same as ∀x ¬Fx: there is no F thing, so everything is not F.

Two rows. Not for every x, Fx equals there is an x with not Fx. Not there is an x with Fx equals for every x, not Fx. The not moves in, and the quantifier swaps.

Nobody came, not everybody came

Here is the key, and some English put through the two rules.

Domain: people invited to a party
Cx: x came

EnglishFormulaSame as
Nobody came¬∃x Cx∀x ¬Cx: everybody did not come
Not everybody came¬∀x Cx∃x ¬Cx: somebody did not come

"Nobody came" and "not everybody came" are different claims. If Ana came and Ben stayed home, the second is true and the first is false.

"Not all that glitters is gold" is ¬∀x(Gx → Ox), where Gx is "x glitters" and Ox is "x is gold". It means some glittering thing is not gold. It does not mean nothing glittering is gold.

The opposite of an all

What is the opposite of "All dogs bark"? Start with ¬∀x(Dx → Bx). Swap: ∃x ¬(Dx → Bx). An if is false only when its first part is true and its second false (truth tables), so ¬(Dx → Bx) says Dx ∧ ¬Bx. The opposite is ∃x(Dx ∧ ¬Bx): some dog does not bark.

It is not "no dogs bark", which is ∀x(Dx → ¬Bx). In the pictured park Rex barks and Fido does not, so the opposite is true and "no dogs bark" is false.

A park with Rex and Fido, both tagged D for dog, and Tom, a cat. Only Rex carries the tag B for barks.

Try it at home

  1. Take three friends and the claim "everyone has eaten". Write its opposite in two ways, with ¬∀ and with ∃, and say both aloud.
  2. Write "nobody is late" with ¬∃ and with ∀. Say why the two are the same.
  3. Find the opposite of "all swans are white" and write it with a key.

Words to know

  • quantifier negation - the rules that move a ¬ past ∀ or ∃ and swap the quantifier
  • De Morgan's rules - ¬(P ∧ Q) = ¬P ∨ ¬Q, and ¬(P ∨ Q) = ¬P ∧ ¬Q
  • opposite of an all - "some thing is not": ¬∀x Fx = ∃x ¬Fx

Big idea

¬∀x Fx says the same as ∃x ¬Fx, and ¬∃x Fx says the same as ∀x ¬Fx: move the ¬ across the quantifier and swap ∀ and ∃.

Lesson page →

Only, A and Anyone

"Only members vote." Does it mean all members vote? Does it mean some members vote? English hides quantifiers in small words: only, a, anyone. How do we find them and write them out?

Only

"Only members vote" says: if someone votes, that someone is a member. It does not say every member votes. It says nobody outside the members votes. So it is ∀x(Vx → Mx).

The other way round, ∀x(Mx → Vx), says "all members vote". That is a different claim.

Domain: people in a club
a: Ana, b: Ben, c: Cara, d: Dan
Mx: x is a member, Vx: x votes

A club of four people as circles. Ana, Ben and Dan carry the tag M for member. Ana and Dan also carry the tag V for votes. Cara has no tag.

In the pictured club, Ana and Dan vote and both are members, so ∀x(Vx → Mx) is true. Ben is a member who does not vote, so ∀x(Mx → Vx) is false. "Only members vote" is true here, and "all members vote" is false.

A and anyone

The small word "a" can mean all or some. "A dog is an animal" is a rule about every dog: ∀x(Dx → Ax). "A dog is barking outside" is about one case: ∃x(Dx ∧ Bx). Here Dx is "x is a dog", Ax is "x is an animal" and Bx is "x is barking outside". Ask yourself: a rule, or one case?

"Anyone" is the same. In "Anyone can join" it means everyone: ∀x Jx. In "If anyone shouts, Ben wakes" it means someone: ∃x Sx → Wb. One shouter is enough to wake Ben. The key: Sx is "x shouts", Wx is "x wakes", b is Ben. The ∃x reaches only Sx.

Two panels. Anyone can join is written with for every x, Jx. If anyone shouts, Ben wakes is written with there is an x, Sx, then an if, then Wb.

Read it back

Take "Everyone who likes Ana is kind". Key: a is Ana, Lxy is "x likes y", Kx is "x is kind". The group we speak of is the people who like Ana: Lxa. What we say of them is Kx. So it is ∀x(Lxa → Kx). Read back: "for every x, if x likes Ana, then x is kind". Order matters: Lax would mean Ana likes x.

A checklist for any sentence:

StepDo
1Find the quantifier word: all, only, a, anyone, no
2Find the group, and what is said of it
3Write ∀ with →, or ∃ with ∧
4Read the formula back in English: is it the same sentence?

Careful

"Only members vote" is not ∀x(Mx → Vx). That says every member votes.

Try it at home

  1. Write "Only adults can drive" with a key. Check it with a small world of four people, one a child who does not drive.
  2. Write two sentences that begin with "a", one meaning all and one meaning some. Translate both.
  3. Take "Everyone Ana likes is kind". Write it, then write the same sentence with the roles swapped. Say how they differ.

Words to know

  • only - "only D are B" is ∀x(Bx → Dx): anything that is B is D
  • anyone - can mean everyone (∀x Jx) or someone (∃x Sx → Wb)
  • reading back - turning a formula into English to see if it says what we meant

Big idea

Find the hidden quantifier, write the group in the if (∀) or the and (∃), and read the formula back in English.

Lesson page →

Everyone Likes Someone

"Everyone has a mother." True. Swap the words around: "Someone is everyone's mother." Absurd. Same two quantifiers, new order, new meaning. Does the order of quantifiers matter?

Two orders

Domain: people in a small club
a: Ana, b: Ben, c: Cara
Lxy: x likes y

We put two quantifiers in front of Lxy and read from the outside in. ∀x∃y Lxy is read "for every x there is a y such that x likes y": everyone likes someone, maybe a different someone each time. ∃y∀x Lxy is read "there is a y such that every x likes y": one person whom everyone likes.

The formula for every x there is a y, x likes y read from the outside in as everyone likes someone, and the formula there is a y for every x, x likes y read as one person everyone likes.

In the first world Ana likes Ben, Ben likes Cara, and Cara likes Ana. Everyone likes someone, so ∀x∃y Lxy is true. But nobody is liked by all three, so ∃y∀x Lxy is false.

Three friends in a circle of arrows: an arrow from Ana to Ben, from Ben to Cara, and from Cara to Ana.

One way only

In the second world Ana and Ben like Cara, and Cara likes herself. Cara is liked by all three, so ∃y∀x Lxy is true. ∀x∃y Lxy is true too: everyone likes someone, namely Cara.

Three friends. An arrow from Ana to Cara, from Ben to Cara, and a loop from Cara to herself.

So ∃y∀x Lxy gives ∀x∃y Lxy: if one person is liked by all, everyone likes someone. It never goes the other way. The first world has ∀x∃y Lxy true and ∃y∀x Lxy false.

In everyday words

Take Domain: all people, and Mxy: x is the mother of y. "Everyone has a mother" is ∀y∃x Mxy: for every y there is an x who is y's mother. "Someone is everyone's mother" is ∃x∀y Mxy. The first is true, the second false.

Two quantifiers of the same kind swap freely. ∀x∀y Lxy says the same as ∀y∀x Lxy, and ∃x∃y Lxy the same as ∃y∃x Lxy. Only a mixed pair, ∀ with ∃, changes meaning when swapped.

Careful

Do not swap a ∀ and an ∃ because the words look alike. "Everyone has a mother" is true; "someone is everyone's mother" is not.

Try it at home

  1. Draw four dots for four friends and arrows for "likes". Make ∀x∃y Lxy true and ∃y∀x Lxy false.
  2. Say "everyone has a friend" and "someone is everyone's friend" aloud. Write each with a key.
  3. Make a world where both ∀x∃y Lxy and ∃y∀x Lxy are true. How many people liked by all do you need?

Words to know

  • quantifier order - which quantifier comes first; read from the outside in
  • ∀x∃y - for every x there is a y: the y may change with x
  • ∃y∀x - there is one y that fits every x

Big idea

∃y∀x Lxy gives ∀x∃y Lxy, but ∀x∃y Lxy does not give ∃y∀x Lxy: the order of ∀ and ∃ changes the claim.

Lesson page →

Small Worlds

Building a Small World

"Everyone in the club is friendly." True or false? We cannot say, until we know which club. To test a claim we need a place for it to be about. What does such a place have to contain, and how do we check a claim in it?

A model has three parts

A model, or small world, is a tiny made-up place where a claim is either true or false. It has three parts. First, a domain: the things in it. Second, which thing each name stands for. Third, which things each predicate fits; for a two-place predicate, which ordered pairs fit.

Domain: people in a small club
a: Ana, b: Ben, c: Cara
Fx: x is friendly, Lxy: x likes y

Here is one model for that key.

PartIn our model
DomainAna, Ben, Cara
Namesa is Ana, b is Ben, c is Cara
F fitsAna, Ben
L fits the pairs(Ana, Ben), (Ben, Cara)

The pair (Ana, Ben) is in order: Ana likes Ben. Nobody likes Ana, and Cara likes no one. Here is the same model as a picture.

A club of three people, Ana, Ben and Cara, as circles. Ana and Ben carry the tag F for friendly. An arrow goes from Ana to Ben and another from Ben to Cara, for who likes whom.

Checking a claim

Work from the inside out, one step at a time.

An atomic claim: look it up. Fa is true, because Ana is on the F list. Lba is false, because the pair (Ben, Ana) is not on the L list.

A connective: use its truth table. Fa → Fb is true: both parts are true.

∀x Fx checks every thing. Cara is not friendly, so it is false. One thing is enough to break an all.

∃x Fx hunts for one witness. Ana is friendly, so it is true.

∃x Lxc asks: does anyone like Cara? Ben does, so Ben is a witness, and it is true.

Two quantifiers

Check ∀x∃y Lxy from the outside in. It says: for every x, there is some y that x likes. So take each x in turn, and hunt for a y.

A list of the three people. For Ana the picture shows Ben as a y she likes, for Ben it shows Cara, and for Cara it shows that nobody is liked, marked as a failure.

Cara likes no one, so one x has no y. The claim is false in this model. We found out by checking the small world, not by guessing.

Careful

A name stands for one thing in the domain, and a predicate must say, for every thing, whether it fits. A world with a gap is not a model.

Try it at home

  1. Draw a small club of three people on paper. Write a domain, three names, one predicate list and one list of pairs.
  2. Check ∀x Fx, ∃x Fx and ∃x Lxa in your model. Mark each witness or breaker.
  3. Change one pair so that ∀x∃y Lxy becomes true. Which pair did you add?

Words to know

  • model - a small made-up world: a domain, what each name is, what each predicate fits
  • domain - the things the world holds
  • witness - a thing that makes an ∃ claim true

Big idea

A model is a domain, who each name is, and which things (or pairs) each predicate fits. A claim is checked step by step: ∀ looks at every thing, ∃ hunts for one.

Lesson page →

A World That Breaks It

In Level 3 a bad row of a truth table broke an argument: all premises true, conclusion false. With all and some, there is no table. Instead we build a small world. How do we build one that breaks an argument?

Valid, and a counter-model

An argument is valid when the conclusion is true in every world where all the premises are true. So one world with true premises and a false conclusion shows it is invalid. That world is a counter-model: the bad row, grown up.

Take this argument.

Domain: animals
Dx: x is a dog, Ax: x is an animal, Bx: x barks

∀x(Dx → Ax)
∃x(Ax ∧ Bx)
So ∃x(Dx ∧ Bx)

In words: all dogs are animals, some animals bark, so some dogs bark. It sounds fine. Build a world: two things, Rex and Sam. Rex is a dog and does not bark. Sam is a seal, an animal that barks, and not a dog.

Two animals as circles. Rex has the tags D for dog and A for animal. Sam the seal has the tags A for animal and B for barks.

Check it twice

Premise 1, ∀x(Dx → Ax): Rex is a dog and an animal; Sam is not a dog, so the if is true. True.

Premise 2, ∃x(Ax ∧ Bx): Sam is an animal that barks. True.

Conclusion, ∃x(Dx ∧ Bx): Rex is a dog but does not bark; Sam barks but is not a dog. No witness. False.

Every premise is true, the conclusion is false: the argument is invalid.

How to build one

Do not guess. Make the conclusion false first, then make the premises true. Take "All dogs are animals, so all animals are dogs", that is ∀x(Dx → Ax), so ∀x(Ax → Dx).

The conclusion is false if one thing is an animal and not a dog. Add Tom. Now premise 1: Tom is not a dog, so the if is true. Done. One thing is enough.

A world with one thing only, Tom, with the tag A for animal and no tag D. A note says all dogs are animals is true here, all animals are dogs is false.

Small worlds are often enough. If you can build none, perhaps the argument is valid.

Careful

Check every premise and the conclusion in your world. One premise left unchecked is how a wrong counter-model slips in.

Try it at home

  1. Break "Some animals bark, some animals sleep, so some animals bark and sleep" with a world of two things.
  2. Try to build a counter-model for "All dogs are animals, Rex is a dog, so Rex is an animal". Where do you get stuck?
  3. Write one invalid argument of your own and build its small world.

Words to know

  • counter-model - a world where every premise is true and the conclusion is false
  • valid - the conclusion is true in every world where all the premises are true

Big idea

To show an argument invalid, build a small world with every premise true and the conclusion false: make the conclusion false first, then the premises true.

Lesson page →

Old Syllogisms, New Letters

Aristotle, about 350 BC, listed the argument shapes of "all", "some" and "no". They were the first logic. Now we can write them with ∀ and ∃ and test each one with a small world. Which still stand? And does "all" promise that the group has members?

A valid syllogism

"All A are B, all B are C, so all A are C." In symbols:

∀x(Ax → Bx)
∀x(Bx → Cx)
So ∀x(Ax → Cx)

Try to break it. Make the conclusion false: some thing is A and not C. Call it t. Premise 1 gives Bt. Premise 2 gives Ct. But t is not C. No world can do this, so it is valid.

Now an invalid one. Key: Px: x is a puppy, Dx: x is a dog, Sx: x sleeps. "All puppies are dogs, some dogs sleep, so some puppies sleep."

∀x(Px → Dx)
∃x(Dx ∧ Sx)
So ∃x(Px ∧ Sx)

Build a world: Pip, a puppy that does not sleep, and Rex, a dog that sleeps and is not a puppy.

Two animals as circles. Pip has the tags P for puppy and D for dog. Rex has the tags D for dog and S for sleeps.

The empty group

Premise 1: Pip is a puppy and a dog; Rex is not a puppy, so the if is true. Premise 2: Rex is a dog that sleeps. Conclusion: no thing is a sleeping puppy. False. Invalid.

Now a surprise. "All A are B, so some A are B." Aristotle counted this valid. Take one thing, Tom, with no tags at all. Say A means "is a unicorn in this room".

A world with one thing, Tom, and no tags. Nothing is a unicorn and nothing is blue. A note says all A are B is true, some A are B is false.

∀x(Ax → Bx) is true: Tom is not A, so the if is true. ∃x(Ax ∧ Bx) is false: no witness. So the argument is invalid in modern logic.

Who is right?

"All unicorns in this room are blue" is true when the room has none: nothing breaks it. Aristotle assumed that no group is empty, so for him "all" promised at least one.

Boole in 1854, and Frege in 1879, let a group be empty. Then ∀ promises nothing. If you want "some" too, say it: ∃x Ax ∧ ∀x(Ax → Bx).

Careful

"All A are B" does not say there are any A. It says nothing is A without being B.

Try it at home

  1. Write "All cats are animals, all animals eat, so all cats eat" with a key. Try to break it.
  2. Break "All A are B, all C are B, so all A are C" with a world of two things.
  3. Name a group that is empty where you are. Is "all of them are happy" true?

Words to know

  • syllogism - an argument of two premises about all, some or no, with three groups
  • empty group - a group with no members in the world

Big idea

Syllogisms are tested with small worlds: some stand, some break. Modern logic lets a group be empty, so "all A are B" does not give "some A are B".

Lesson page →

No Table for All

Level 3 had a promise: list every row, and you know. Can we list every small world? Worlds can hold one thing, or ten, or endlessly many. So what can we say about an argument whose breaking world is endless?

An argument with no small breaker

Key: Domain: things; Lxy: x is less than y. Here is an argument.

∀x∃y Lxy
∀x∀y∀z((Lxy ∧ Lyz) → Lxz)
So ∃x Lxx

Premise 1: every thing has an arrow out. Premise 2: if x is less than y, and y is less than z, then x is less than z. The conclusion: some thing is less than itself.

Can a finite world break it? Start anywhere, and follow the arrows. Each thing has an arrow out, so the walk never stops. The world is finite, so the walk must come back to a thing it has seen. Here the walk goes a, b, c, and then b again.

Three things in a world, a, b and c. Arrows go from a to b, from b to c, and from c back to b. The walk from a returns to b, which it has already seen.

The endless world

Take that walk: b to c, and c back to b. Premise 2 chains the two arrows: b to c and c to b give b to b. So some thing has an arrow to itself, and the conclusion is true. No finite world, of any size, breaks the argument.

Is it valid, then? No. Take the whole numbers 0, 1, 2 ... (see natural numbers) with "less than". Every number has a bigger one. Less than chains. No number is less than itself.

The whole numbers 0, 1, 2 and 3 as circles with an arrow from each to the next, and three dots after. An endless world where every number has a bigger one.

Both premises are true, the conclusion is false. A counter-model, but an endless one.

What this teaches

Trying worlds of size 1, 2, 3 ... never finds this one, and it would never finish. So we cannot test validity by trying worlds. In 1936 Church and Turing showed more: no machine test for validity always answers. Proofs still help, and that is the next module.

A short note for later: the logic is not weak. It only cannot be tested by a table.

Careful

An argument with no small counter-model is not yet valid. Check endless worlds too.

Try it at home

  1. Draw a world with three things where every thing has an arrow out. Follow the arrows from a. Where do you come back?
  2. In that world, add the arrows the chain rule needs. What do you get?
  3. Say why the whole numbers 0 to 9 with "less than" do not make premise 1 true.

Words to know

  • finite - with a number of things you could count and finish
  • endless world - a model with infinitely many things, like the whole numbers

Big idea

Worlds come in every size, even endless, so no table can list them. An argument can be broken only by an endless world, so validity cannot be checked by trying worlds.

Lesson page →

Proofs with All and Some

Using an All

In Level 4 a proof moved from claim to claim with rules for and, or, if and not. But "All dogs bark" has an all inside it. How does a proof get from an all down to one thing, and from one thing up to a some?

All-out: from every thing to one

Four new rules join the old ones. The first two are easy. All-out (∀E) says: if every x is F, then a is F, for any name a. An all is true of each thing, so it is true of the thing we name.

Here is the Rex argument from the start of this level. Level 4 could not prove it. Now it takes four lines.

Domain: animals in the park
r: Rex
Dx: x is a dog, Bx: x barks

#LineWhy
1∀x(Dx → Bx)premise
2Drpremise
3Dr → Br∀E 1
4Br→E 3, 2

A four-line proof. Lines 1 and 2 are premises: all dogs bark, and Rex is a dog. Line 3, Rex being a dog gives Rex barks, is written by all-out on line 1. Line 4, Rex barks, is arrow-E on lines 3 and 2.

Line 3 reads the all as one if-then about Rex: if Rex is a dog, Rex barks. Line 4 is →E from Level 4. The name may be any name, even one already in the proof. Here we picked r because the premise Dr talks about Rex.

Some-in: from one thing to a some

Some-in (∃I) goes the other way. If a is F, then there is at least one F, and a is the witness. We replace a name by x and put ∃x in front.

Take Ana and Ben. Ana likes Ben: Lab. Then someone likes Ben, and Ana likes someone.

#LineWhy
1Labpremise
2∃x Lxb∃I 1
3∃x Lax∃I 1

A three-line proof. Line 1 is the premise, Ana likes Ben. Line 2, someone likes Ben, and line 3, Ana likes someone, are both written by some-in on line 1.

Line 2 replaces a by x: someone likes Ben. Line 3 replaces b by x: Ana likes someone. One line gave two different somes. The rule may replace some or all of the copies of one name, but only one name at a time.

From all to some

Put the two rules together. Suppose everyone is friendly. Then someone is friendly.

#LineWhy
1∀x Fxpremise
2Fa∀E 1
3∃x Fx∃I 2

A three-line proof. Line 1 says everyone is friendly. Line 2, a is friendly, comes by all-out. Line 3, someone is friendly, comes by some-in.

This works because a domain is never empty. There is at least one thing to call a. If a domain could be empty, an all would be true and a some false.

Careful

From Lab, ∃x Lxx is wrong. ∃I replaces one name, so it cannot turn a and b into the same x. From Laa you may write ∃x Lxx.

Try it at home

  1. Copy the Rex proof. Cover lines 3 and 4 and rebuild them from the premises.
  2. Let Cx mean x is a cat, Px mean x purrs, and k be Kit. Prove Pk from ∀x(Cx → Px) and Ck.
  3. From Lab, write two different ∃ lines. Then try to reach ∃x Lxx and see why it fails.

Words to know

  • all-out (∀E) - from ∀x Fx, write Fa for any name a
  • some-in (∃I) - from Fa, write ∃x Fx; replace some or all copies of one name
  • witness - the thing named in the line that ∃I starts from

Big idea

All-out takes an all down to any named thing. Some-in lifts a named thing up to a some.

Lesson page →

Proving an All

To prove an all, we cannot check every thing in the domain. In maths we write "take any number n" and show it for n. When does a name stand for any thing at all, and when does it not?

All-in and the fresh name

All-in (∀I) goes from Fa to ∀x Fx. It is safe only if a is fresh: a stands for any thing at all, and we know nothing special about it. The rule has three conditions on a.

  • a is in no premise.
  • a is in no assumption that is still open.
  • a is not in ∀x Fx.

A name in a premise is special: the premise says something about that very thing.

A proof with a fresh name

We prove this. Every friendly person is glad. Every glad person is helpful. So every friendly person is helpful.

Domain: people in the class
Fx: x is friendly, Gx: x is glad, Hx: x is helpful

∀x(Fx → Gx)
∀x(Gx → Hx)
So ∀x(Fx → Hx)

The goal is an all, so the plan is: take any a, and prove Fa → Ha. That is an if-then, so we use a box.

#LineWhy
1∀x(Fx → Gx)premise
2∀x(Gx → Hx)premise
3│ Faassume
4│ Fa → Ga∀E 1
5│ Ga→E 4, 3
6│ Ga → Ha∀E 2
7│ Ha→E 6, 5
8Fa → Ha→I 3-7
9∀x(Fx → Hx)∀I 8

A nine-line proof. Two premises, then a box from line 3 to line 7 that assumes a is friendly and reaches a is helpful. Line 8 closes the box with arrow-I. Line 9, everyone friendly is helpful, is written by all-in on line 8.

Check line 9. The name a is in no premise. It is in no open assumption, because the box closed at line 8. It is not in ∀x(Fx → Hx). So a is fresh and ∀I is allowed.

The mistake that breaks it

Look at a proof that fails. Ana is friendly, so everyone is friendly?

#LineWhy
1Fapremise
2∀x Fx∀I 1

A two-line proof. Line 1 is the premise, Ana is friendly. Line 2, everyone is friendly, is marked red, because all-in on line 1 uses the name a, which is in the premise.

Line 1 is about Ana, so a is not just any thing. The same fault hides inside a box: assume Fa, write ∀x Fx, close the box. There a is in an assumption still open. The conclusion is false, so the rule must stop it.

Careful

A name in a premise or in an open assumption is not fresh. Never use ∀I on it.

Try it at home

  1. Say each condition on a in your own words. Why does each one matter?
  2. Rebuild the nine-line proof. Mark the line where a first appears and the line where the box closes.
  3. Think of a maths proof that starts "take any number n". Which line would be ∀I?

Words to know

  • all-in (∀I) - from Fa, write ∀x Fx, if a is fresh
  • fresh name - a name in no premise, no open assumption, and not in the result
  • take any - the plain-words way to say: use a fresh name

Big idea

To prove an all, take a fresh name a, prove the claim for a, then close with all-in.

Lesson page →

Using a Some

Someone took the cake. We do not know who, but we can say something about them. How can a proof use a some, when no one thing is named?

Some-out: give one of them a name

Some-out (∃E) works like a detective. "Someone took the cake. Call that person a. All we know is that a took it." We open a box that assumes Fa, reach a claim C, and close the box. Then we may write C outside.

a must be fresh: a is in no earlier line, a is not in ∃x Fx, and a is not in C. The name is only a label for "one of them". The last condition is the key: C must not talk about a.

We prove: someone is friendly and glad, so someone is friendly.

Domain: people at the party
Fx: x is friendly, Gx: x is glad

#LineWhy
1∃x(Fx ∧ Gx)premise
2│ Fa ∧ Gaassume
3│ Fa∧E 2
4│ ∃x Fx∃I 3
5∃x Fx∃E 1, 2-4

A five-line proof. Line 1 says someone is friendly and glad. A box from line 2 to line 4 assumes a is friendly and glad, then reaches someone is friendly. Line 5 repeats that claim outside the box by some-out on line 1 and the box.

Line 5 cites two things: the some, line 1, and the whole box, 2-4. Check a. It is in no earlier line. It is not in line 1. It is not in ∃x Fx. So a is fresh.

A longer proof

Now an all and a some together. Everyone friendly is glad. Someone is friendly. So someone is glad.

#LineWhy
1∀x(Fx → Gx)premise
2∃x Fxpremise
3│ Faassume
4│ Fa → Ga∀E 1
5│ Ga→E 4, 3
6│ ∃x Gx∃I 5
7∃x Gx∃E 2, 3-6

A seven-line proof. Two premises, then a box from line 3 to line 6 that assumes a is friendly and reaches someone is glad. Line 7, someone is glad, is written by some-out on line 2 and the box.

Inside the box we use a freely. At line 6 the claim ∃x Gx has no a in it, so it may leave. The box is a private room for a.

The mistake that breaks it

Here a is not fresh. Someone is friendly. Ana is glad, with a: Ana in the key. So someone is friendly and glad? We call the friendly one a, but a is already Ana.

#LineWhy
1∃x Fxpremise
2Gapremise
3│ Faassume
4│ Fa ∧ Ga∧I 3, 2
5│ ∃x(Fx ∧ Gx)∃I 4
6∃x(Fx ∧ Gx)∃E 1, 3-5

A six-line proof. Line 6 is marked red. It uses some-out with the name a, but a is already in the premise on line 2, so a is not fresh.

The friendly person may be Ben. Ana may be glad and not friendly. Then the premises are true and the conclusion is false. Line 6 breaks the rule: a is in line 2.

Careful

If C mentions a, or a was in an earlier line, ∃E is not allowed.

Try it at home

  1. Rebuild the five-line proof. Say aloud why the name a is fresh.
  2. Prove ∃x Gx from ∃x(Fx ∧ Gx). Which line is inside the box?
  3. Change the name in the red proof to a fresh one. What can you no longer do on line 4?

Words to know

  • some-out (∃E) - from ∃x Fx and a box from Fa to C, write C
  • fresh name - a name in no earlier line, not in the some, not in C
  • box - a private room where the assumption holds

Big idea

To use a some, call one of them a fresh name, reason in a box, and leave with a claim that does not mention that name.

Lesson page →

Swapping All and Some

Earlier in this level we said "not all" means "some are not", and "not any" means "all are not". We checked it in small worlds. Can we now prove it?

Not any gives all-not

First, nobody is friendly, so everyone is not friendly. We show ¬∃x Fx ⊢ ∀x ¬Fx. The goal is an all, so we take any a and prove ¬Fa, by ¬I: assume Fa, reach ⊥.

#LineWhy
1¬∃x Fxpremise
2│ Faassume
3│ ∃x Fx∃I 2
4│ ⊥¬E 3, 1
5¬Fa¬I 2-4
6∀x ¬Fx∀I 5

A six-line proof. The premise says nobody is friendly. A box from line 2 to line 4 assumes a is friendly and reaches a contradiction. Line 5 writes a is not friendly, and line 6 writes everyone is not friendly, by all-in.

At line 6, a is not in the premise, in no open assumption, and not in ∀x ¬Fx. So a is fresh.

All-not gives not any

Now back. We show ∀x ¬Fx ⊢ ¬∃x Fx. To prove a not, assume ∃x Fx and reach ⊥. Inside, we use the some with ∃E.

#LineWhy
1∀x ¬Fxpremise
2│ ∃x Fxassume
3│ │ Faassume
4│ │ ¬Fa∀E 1
5│ │ ⊥¬E 3, 4
6│ ⊥∃E 2, 3-5
7¬∃x Fx¬I 2-6

A seven-line proof with a box inside a box. The outer box assumes someone is friendly. The inner box assumes a is friendly and reaches a contradiction. Line 6 leaves the inner box by some-out. Line 7 writes nobody is friendly.

At line 6, a is in no earlier line, not in ∃x Fx, and not in ⊥.

QN, the shortcut

Now we may use a shortcut: quantifier negation (QN). It swaps both ways.

  • ¬∀x Fx and ∃x ¬Fx
  • ¬∃x Fx and ∀x ¬Fx

The other pair is proved too. Here is ¬∀x Fx ⊢ ∃x ¬Fx. It uses IP: assume the opposite of the goal, and reach ⊥.

#LineWhy
1¬∀x Fxpremise
2│ ¬∃x ¬Fxassume
3│ │ ¬Faassume
4│ │ ∃x ¬Fx∃I 3
5│ │ ⊥¬E 4, 2
6│ ¬¬Fa¬I 3-5
7│ FaDNE 6
8│ ∀x Fx∀I 7
9│ ⊥¬E 8, 1
10∃x ¬FxIP 2-9

A ten-line proof. The premise says not everyone is friendly. The outer box assumes nobody is not friendly. Inside, a small box reaches a contradiction, so a is friendly, so everyone is, and that clashes with the premise. Line 10 closes by IP.

The last pair follows the second proof above. F may be longer: ¬∃x(Dx ∧ Bx) gives ∀x ¬(Dx ∧ Bx). QN also works inside a line, like Level 4's DeM.

Here is a short proof. Everyone who passed got a badge. Not everyone got a badge. So someone did not pass.

Domain: people in the class
Tx: x passed, Bx: x got a badge

#LineWhy
1∀x(Tx → Bx)premise
2¬∀x Bxpremise
3∃x ¬BxQN 2
4│ ¬Baassume
5│ Ta → Ba∀E 1
6│ ¬TaMT 5, 4
7│ ∃x ¬Tx∃I 6
8∃x ¬Tx∃E 3, 4-7

An eight-line proof. Line 3 turns not everyone got a badge into someone did not, by QN. A box from line 4 to line 7 takes that someone as a, and reaches someone did not pass. Line 8 leaves the box by some-out.

Line 3 is QN on line 2. After that, take a, use the all, and leave with ∃E.

Careful

¬∀x Fx is not ∀x ¬Fx. Not everyone is friendly does not say that no one is.

Try it at home

  1. Say ¬∀x Fx and ∃x ¬Fx aloud. Why are they the same claim?
  2. Use QN to turn ¬∃x(Fx ∧ Gx) into an all.
  3. Copy the first proof. Hide line 5 and rebuild it from the box.

Words to know

  • quantifier negation (QN) - swap ¬∀ with ∃¬ and ¬∃ with ∀¬, in both directions
  • contradiction (⊥) - a claim and its not at once
  • shortcut - a rule we proved, so we may use it at once

Big idea

Not all is some not, and not any is all not. Both swaps are proved from the quantifier rules, so QN is a shortcut.

Lesson page →

Identity and the Big Picture

The Same Thing

At dawn there is a bright light low in the sky: the Morning Star. After sunset there is another: the Evening Star. For ages people used two names. In 1892 Frege asked a puzzle about them. How can a logic say that two names are one thing?

Two names, one thing

A name picks out one thing, but two names may pick out the same thing. Both stars are the planet Venus.

Domain: objects in the sky
a: the Morning Star, b: the Evening Star
Hx: x is bright

We write a = b: a is the same thing as b. We write a ≠ b for ¬ a = b: they are two different things. Frege saw in 1892 that "a = b" can be news, even though both names name Venus.

Two name tags, a and b, point to one circle. The circle is the planet Venus, so a = b is true.

Two rules for equals

Equals-in (=I) needs no earlier line. At any time you may write a = a: a thing is the same as itself.

Equals-out (=E) uses a = b. From a = b and a line with a in it, you may write that line again with some or all of the a's changed to b. It also works the other way, from b to a. This is Leibniz's idea: the same thing has the same properties.

We prove: the Morning Star is bright, and it is the Evening Star, so the Evening Star is bright.

#LineWhy
1Hapremise
2a = bpremise
3Hb=E 1, 2

A three-line proof. Line 1 says a is bright. Line 2 says a equals b. Line 3, b is bright, is written by equals-out on lines 1 and 2.

Now a small proof that equals works both ways: from a = b we get b = a.

#LineWhy
1a = bpremise
2a = a=I
3b = a=E 1, 2

A three-line proof. Line 1 says a equals b. Line 2, a equals a, is equals-in. Line 3, b equals a, is equals-out: line 1 changes the first a of line 2 to b.

The two "is" of English

English uses "is" for two jobs. Say which one before you write the formula. Let t be Mark Twain, c be Samuel Clemens (the same man) and Wx: x is a writer.

EnglishJob of "is"Formula
Mark Twain is Samuel Clemenstwo names, one thingt = c
Mark Twain is a writersays something of himWt
Mark Twain is not Jane Austentwo different thingst ≠ j

Careful

"Mark Twain is a writer" is not an = claim. Only "is" between two names means =.

Try it at home

  1. Write one more pair of names for one thing (a person with a nickname). Give the key, then write the = claim.
  2. Let Gx: x is a good singer, s: Sam, p: Pat, with s = p. Prove Gp from Gs.
  3. For each "is" in a news headline, decide: = or a predicate?

Words to know

  • a = b - a and b are two names for one thing
  • a ≠ b - short for ¬ a = b: two different things
  • equals-in (=I) - write a = a at any time
  • equals-out (=E) - from a = b and a line with a, write the line with b

Big idea

Two names can name one thing. Equals-in writes a = a, and equals-out swaps names that are equal.

Lesson page →

Counting with Same

"Two children swam." "At most one child swam." "Only Ana swam." None of these has a word like all or some. Yet logic can say each of them, if it can say when two things are the same. How?

At least two

Domain: children at the pool
a: Ana
Sx: x swam

Try ∃x∃y(Sx ∧ Sy). It is not enough. The x and the y may be one child, counted twice. We must add that they are different:

∃x∃y((Sx ∧ Sy) ∧ x ≠ y)

Read it aloud: there are x and y, both swam, and x is not y. With one swimmer this is false. With two it is true.

At most one, and exactly one

At most one says that any two swimmers are one child: ∀x∀y((Sx ∧ Sy) → x = y). If nobody swam, it is true, because no pair of swimmers exists to break it.

Exactly one is at least one plus at most one: ∃x(Sx ∧ ∀y(Sy → y = x)). Read it: there is a swimmer x, and every swimmer y is x.

Two boxes joined by a plus. At least one, there is a swimmer, and at most one, any two swimmers are the same, together say exactly one swimmer.

"Ana is the only one who swam" is Sa ∧ ∀x(Sx → x = a): Ana swam, and anyone who swam is Ana. Russell, in 1905, read "the" in the same way: "the king of France is bald" says there is exactly one king, and he is bald.

Test them in small worlds

Take Ana, Ben and Cara. We test four claims in worlds where one, two or three of them swam.

Three small worlds of Ana, Ben and Cara. In the first only Ana swam, in the second Ana and Ben swam, in the third all three swam. Under each world is the verdict on at least two and on at most one.

ClaimOnly AnaAna, BenAll threeOnly Ben
at least twofalsetruetruefalse
at most onetruefalsefalsetrue
exactly onetruefalsefalsetrue
Sa ∧ ∀x(Sx → x = a)truefalsefalsefalse

Check one cell. Only Ben swam: at most one is true, because any two swimmers are Ben. But Sa is false, so the last claim is false.

Careful

∃x∃y(Sx ∧ Sy) does not say two children swam. The x and the y can be one child.

Try it at home

  1. Write "at least two" with the x ≠ y missing. Find a world with one swimmer where it is true.
  2. Write "Ben is the only one who swam", then check it in a world where Ben and Cara swam.
  3. Say "at most two swam" in words, then try writing it with three variables.

Words to know

  • at least two - two things that are not the same
  • at most one - any two such things are one thing
  • exactly one - at least one and at most one

Big idea

With = and ≠ we can count: at least two, at most one, exactly one, and "the only one".

Lesson page →

All and Some in Maths

Every number has a bigger number. Is there a biggest number? These two claims sound alike, but they differ only in the order of two quantifiers. Maths uses that order all the time. Where?

Order, with numbers

Domain: whole numbers 0, 1, 2, ...
y > x: y is bigger than x, y + y: y added to itself

The domain is the natural numbers. Both y > x and y + y are given: we do not define them. Now two claims.

∀x∃y y > x: for every x there is a y bigger than x. True. Take y = x + 1.

∃y∀x y > x: there is a y bigger than every x. False. The x may be y itself, and y > y is false. There is no biggest number.

Two number lines. On the left every number has an arrow to a bigger one, so every number has a bigger one is true. On the right one number would need arrows from all numbers below it and itself, which is false.

Even, in symbols

"n is even" says n is two equal halves added: ∃y n = y + y. For 6, the witness is 3. For 0 it is 0.

Take any, call it

A maths proof uses our two fresh-name rules without saying so. "Take any number n" is all-in (∀I): we know nothing special about n. "Call it k" is some-out (∃E): k is a number we know only has the property.

We sketch: the sum of two even numbers is even. The steps are in words, with the rule beside each.

StepRule
Take any m and n. Suppose both are even.assume (a box)
m is even: some y has m = y + y. Call it k.∃E, box opens
n is even: call it j, so n = j + j.∃E, box opens
Then m + n = (k + j) + (k + j).arithmetic
So some y has m + n = y + y: y is k + j.∃I
That does not mention k or j. Both ∃E boxes close.∃E
If both are even, the sum is even.→I
m and n were any numbers, so it holds for all.∀I

Eight steps of a maths proof, each with its rule. Take any m and n is an assumption, call it k and call it j are some-out, the sum step is some-in, and the last line closes with if-then-in and all-in.

Careful

∃y∀x y > x is not the same as ∀x∃y y > x. The first needs one y that works for every x.

Try it at home

  1. Swap the quantifiers in "everyone has a mother" and say what the new claim means.
  2. Write "n is a multiple of 3" using ∃y, = and +.
  3. Read a short maths proof and mark each "take any" and "call it".

Words to know

  • take any n - all-in: n is a fresh name
  • call it k - some-out: k is a fresh name for one witness
  • ∃y n = y + y - n is even

Big idea

∀x∃y and ∃y∀x differ: every number has a bigger one, but no number is bigger than all. In maths, take any is ∀I and call it is ∃E.

Lesson page →

A Long Proof with All and Some

A chess club has three facts. Every keen member entered the tournament. Every member is keen. Some member is a junior. Does it follow that everyone entered, and some junior did? We will prove it, line by line, with every tool of this level.

Key, plan and proof

Domain: members of a chess club
Kx: x is keen, Tx: x has entered the tournament, Jx: x is a junior

Premises: ∀x(Kx → Tx), ∀x Kx and ∃x Jx. Conclusion: ∀x Tx ∧ ∃x(Jx ∧ Tx).

Plan. The conclusion is an and, so we prove each half and join them with ∧I. For the all half we get Ka, then Ta, then ∀I. For the some half we use ∃E on the junior, and ∃I inside the box.

#LineWhy
1∀x(Kx → Tx)premise
2∀x Kxpremise
3∃x Jxpremise
4Ka∀E 2
5Ka → Ta∀E 1
6Ta→E 5, 4
7∀x Tx∀I 6
8│ Jbassume
9│ Tb∀E 7
10│ Jb ∧ Tb∧I 8, 9
11│ ∃x(Jx ∧ Tx)∃I 10
12∃x(Jx ∧ Tx)∃E 3, 8-11
13∀x Tx ∧ ∃x(Jx ∧ Tx)∧I 7, 12

A thirteen-line proof. Lines 1 to 3 are the premises. Lines 4 to 7 reach all members entered by all-out, if-then-out and all-in. A box from line 8 to line 11 uses the junior and reaches some junior entered. Line 12 leaves the box by some-out. Line 13 joins both halves.

Check every name

Line 7 uses ∀I on a. The name a is in no premise, in no open assumption and not in ∀x Tx. Fresh. Line 12 uses ∃E on b. The name b is in no earlier line and not in ∃x Jx. The claim leaving, ∃x(Jx ∧ Tx), has no b. Fresh. Neither name is in the key.

Can all three be true?

A proof does not say the premises hold. A world can. In this world all three premises are true, so they can be believed together.

A small world of three club members, Ana, Ben and Eva. All three are keen and all three entered the tournament. Only Eva is a junior. All three premises are true here.

The big picture

A logic with names, predicates, ∀, ∃ and = is called first-order logic. Checklist for a long proof: write the key with its domain, translate, plan from the conclusion, prove, then check each fresh name and each rule.

Gödel showed in 1930 that every valid argument of this logic has a proof. Level 6 asks why. Church and Turing showed in 1936 that no machine can test every argument for validity.

Careful

Never put the name a in the key and then use it for ∀I. A fresh name is not in the key.

Try it at home

  1. Cover lines 4 to 7 and rebuild them from the premises.
  2. Change premise 3 to "some member is not keen" and say which line of the proof stops working.
  3. Write your own club puzzle with one all and one some, then find its plan.

Words to know

  • plan - the steps chosen before the lines are written
  • first-order logic - logic with names, predicates, ∀, ∃ and =
  • consistent - the premises can all be true in one world

Big idea

A long proof is a plan carried out line by line, with each fresh name checked. First-order logic: a proof exists for every valid argument, but no machine can always decide.

Lesson page →