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.

Logic

Judge an argument by its form: truth tables, natural deduction, quantifiers and proof technique, and the gap between an argument being valid and being true.

Arguments, validity and form

Two people disagree about whether a conclusion really follows from what was said, and nothing in the words themselves settles it.

That is the problem this subject solves. Not whether a claim is true, which is usually a question for chemistry or history or the accounts, but whether accepting some claims commits you to another one. The answer turns out to depend on the shape of the argument and on nothing else, and shapes can be written down, listed and checked. Everything in the fourteen lessons that follow is machinery for doing that check, and this lesson fixes what the check is meant to test.

What an argument is

An argument here is not a quarrel. It is a set of statements, the premises, offered in support of one further statement, the conclusion. A calm paragraph in a contract and a shouted claim can have the same argument in them.

A statement is a sentence that is true or false. "The Thames flows through London" is one. "Close the door", "what time is it" and "if only I had known" are not, because they make no claim that could be right or wrong. That is a real restriction, worth stating up front: the machinery only judges arguments whose parts are true or false.

English marks the parts with signposts. "Therefore", "so", "hence" and "it follows that" introduce conclusions; "because", "since" and "given that" introduce premises. The order on the page means nothing, so "Socrates is mortal, since all men are mortal and he is a man" is the same argument written backwards.

Two things that look like arguments are not. An explanation takes an agreed fact and says why it happened: "the bridge collapsed because the bearings seized" is not trying to convince anyone the bridge collapsed. And a confident chain of assertions with no support relation is a description. The test is whether one statement is being offered as a reason for another.

Validity is an impossibility claim

Here is the central definition, and everything else in the subject depends on getting it exactly right.

An argument is valid if and only if there is no possible situation in which all its premises are true and its conclusion is false.

Read what that does and does not say. It does not say the premises are true. It does not say the conclusion is true. It says the combination "premises all true, conclusion false" cannot happen, which is a claim about what is possible, not about what is the case. Validity is the guarantee that truth is transmitted: feed true premises into a valid argument and a true conclusion must come out. Feed false ones in and the guarantee is silent.

So testing validity means trying to imagine the bad combination. Take: "All whales are fish. All fish are mammals. Therefore all whales are mammals." Both premises are false and the conclusion is true, but that is not the question. The question is whether any situation could make both premises true while leaving the conclusion false, and none could: if every whale is among the fish and every fish is among the mammals, every whale is among the mammals. The argument is valid.

Now take: "If the company committed fraud, the quarterly figures would be unusually smooth. The figures are unusually smooth. Therefore the company committed fraud." Both premises might well be true, and so might the conclusion. But the bad combination is easy to picture: a genuinely stable business with a small product range produces smooth figures with no fraud anywhere. Premises true, conclusion false. The argument is invalid, and it stays invalid even in the cases where the company did commit fraud.

The four combinations

Since validity and truth are independent, it pays to see how they combine. Of the four pairings of premise truth with conclusion truth, three are open to a valid argument and one is not. True premises with a true conclusion is the ordinary good case. False premises with a false conclusion is fine too, since such an argument fails on its facts rather than its logic. False premises with a true conclusion is the whales case above. The single forbidden pairing is true premises with a false conclusion, and it is forbidden by the definition itself, which is what makes validity worth having.

Invalid arguments can show all four, including true premises with a true conclusion, which is the trap. "Paris is the capital of France, therefore water is a compound of hydrogen and oxygen" has a true premise and a true conclusion and no connection whatever between them. Checking that the premises and the conclusion are all true tells you nothing about whether the argument works.

Example. Build an argument that is valid, has at least one false premise, and has a true conclusion.

Start from a form known to transmit truth, then feed it a falsehood that happens to land somewhere true. "All metals conduct electricity. Graphite is a metal. Therefore graphite conducts electricity." The second premise is false, since graphite is a form of carbon, a non-metal. The conclusion is true, since graphite conducts well enough to be used for the brushes in electric motors. And the argument is valid: if everything metallic conducted and graphite were metallic, graphite would conduct. Validity was never a claim about the premises.

Now you. Build an argument that is invalid, has two true premises, and has a true conclusion.

Answer

Any pair of unrelated truths with a truth tacked on works, for instance "Mercury is the closest planet to the Sun. Iron rusts. Therefore the Danube flows into the Black Sea." All three statements are true and nothing supports anything. A subtler version: "If a solid is a metal it conducts. Graphite conducts. Therefore graphite is not an insulator." True premises, true conclusion, and the reasoning is the invalid pattern from the fraud example.

Soundness

Validity is a low bar on its own, because it never asks whether the premises are true. The property that actually matters in argument is soundness: an argument is sound when it is valid and all its premises are in fact true. A sound argument has a true conclusion, guaranteed, and that is exactly what a proof is.

The division of labour is the point. Logic owns validity completely and can settle it by inspection of form. Nothing in logic can settle whether "all metals conduct electricity" is true; that is measurement. So an argument is attacked in one of two quite different ways, and confusing them wastes everybody's time. Either you deny a premise, which is a dispute about the world, or you deny that the conclusion follows, which is a dispute about form. "Your figures are wrong" and "your figures do not show that" are different objections and need different evidence.

This subject is entirely about the second kind, which is a narrow speciality: most bad arguments in the wild fail on their premises rather than their form. The last lesson comes back to that honestly.

Form is what does the work

Look again at the whales argument. Nothing about whales, fish or mammals was used. Replace those three words with any others and the guarantee survives:

All A are B. All B are C. Therefore all A are C.

Validity is a property of this form, and every argument with this shape, on any subject, in any language, is valid. That is the discovery the subject is built on, and it was Aristotle's, in the Prior Analytics of around 350 BCE. His decisive move was the one just made: writing letters where the terms go, so that an argument can be studied without knowing what it is about.

Contrast the invalid argument. Its form is: if P then Q; Q; therefore P. Every argument of that shape is invalid, including the ones with true conclusions, because the shape carries the fault. This is why logic can be taught at all: there are not infinitely many arguments to memorise, only a stock of forms and a method for the forms nobody has catalogued.

Refutation by parallel form

The most useful practical consequence: if validity depends only on form, then two arguments with the same form stand or fall together. So to show that an argument is invalid, exhibit another argument of the same form whose premises are plainly true and whose conclusion is plainly false. That parallel argument cannot be valid, so neither can the original, and the person you are arguing with does not have to grant anything about the original subject matter.

Suppose someone argues: "Every economy that raised interest rates in 2022 saw inflation fall by 2024. Inflation in Japan fell by 2024. So Japan raised interest rates in 2022." Rather than argue about Japanese monetary policy, hand back the parallel: "Everyone with flu has a temperature. This patient has a temperature. So this patient has flu." The premise is true and the conclusion does not follow, since a hundred other things raise a temperature. Same form, obviously broken, argument over. The method has one requirement: the parallel must genuinely share the form rather than merely feel similar, and if the original says "some" where the parallel says "all", the refutation fails and will be seen to fail.

Example. Refute by parallel form: "If a country has a large trade deficit, its currency will weaken. The pound weakened. So the United Kingdom has a large trade deficit."

The form is: if P then Q; Q; therefore P. Substitute something where the second step is transparently bad. "If it snowed last night, the roof is wet. The roof is wet. So it snowed last night." The roof is wet because it rained, or because someone hosed it down. True premises, false conclusion, same shape, so the original is invalid. Notice that the United Kingdom does in fact run a large trade deficit. The conclusion is true and still does not follow, which is exactly the distinction this lesson is drilling.

Now you. Refute by parallel form: "No one who trains properly gets injured. Ferrer was injured. So Ferrer did not train properly."

Answer

Careful: this one is valid. The form is: no A is B; x is B; therefore x is not A. If no properly trained person is ever injured and Ferrer was injured, he cannot be among the properly trained. No parallel with true premises and a false conclusion exists, and trying to build one is a good way to convince yourself. The first premise is wildly false, so the argument is unsound, but its form is impeccable, and attacking the premise is the only line available.

Forms worth knowing by name

Four propositional forms account for most everyday reasoning, and they come in two valid pairs and two invalid impostors that differ from them by one word.

Modus ponens is: if P then Q; P; therefore Q. Valid, and the workhorse of every calculation and every application of a rule. Modus tollens is: if P then Q; not Q; therefore not P. Valid, and the engine of testing: a hypothesis predicts something, the something fails to appear, the hypothesis goes.

The impostors change one word each. Affirming the consequent is: if P then Q; Q; therefore P. Invalid, and the most common fault in reasoning about evidence, being the fraud argument, the flu argument and the trade deficit argument all at once. Denying the antecedent is: if P then Q; not P; therefore not Q. Also invalid. "If you inherit the gene you will get the disease. She did not inherit it. So she will not get it." Other causes remain.

Two more, both valid. Disjunctive syllogism: P or Q; not P; therefore Q. And hypothetical syllogism: if P then Q; if Q then R; therefore if P then R, which is how long chains of reasoning are stitched together.

Example. Name the form and say whether it is valid: "If the alloy contains nickel, the sample is magnetic. The sample is not magnetic. Therefore the alloy contains no nickel."

The second premise denies the consequent, so this is modus tollens, and it is valid. Any situation making both premises true has a non-magnetic sample, and a nickel-bearing alloy would have been magnetic, so there is no nickel. Whether it is sound is a separate question, and here the first premise is doubtful, since austenitic stainless steels contain about 8 per cent nickel and are essentially non-magnetic. The argument is valid and unsound, and only the second half of that verdict is metallurgy.

Now you. Name the form and say whether it is valid: "If the server were down, the dashboard would be blank. The server is not down. Therefore the dashboard is not blank."

Answer

Denying the antecedent, and invalid. The premise says a downed server is one way to get a blank dashboard, not the only way, so a broken query or an expired token leaves the premises true and the conclusion false.

Where the guarantee stops

Everything so far has demanded an absolute guarantee, and most real reasoning cannot supply one. "The last four hundred swans I saw were white, so the next one will be white" has premises that make the conclusion likely without forcing it, which is why Australia was a surprise. Such arguments are inductive, and they are judged on a different scale, strength rather than validity, one that belongs to probability and statistics rather than to logic. Deductive validity buys certainty and pays for it by never telling you anything the premises did not already contain.

Two edge cases fall out of the definition and are worth meeting now rather than in the middle of a proof. If the premises contradict each other, no situation makes them all true, so the forbidden combination cannot arise and the argument is valid whatever the conclusion says. And if the conclusion cannot be false, the same holds for any premises at all. Both feel wrong and both follow from the definition, which is a sign that it is doing work rather than restating intuition.

The tools of this lesson are already useful, and they do not scale. Nothing here says what to do with an argument whose form nobody has named, and the parallel-form method needs a fresh flash of invention every time. To go further, forms must be written in a language precise enough to compute with, which means fixing a small set of connectives whose meaning never varies. That is the next lesson.

The language of propositions

The previous lesson found that validity depends on form, and then had to describe forms in English, which is the language whose vagueness caused the problem in the first place.

"He will resign or the board will force him out, and the shares will fall" has two readings, and they are not equivalent: one says a disjunction and a fall both hold, the other says either he resigns or the board acts and the shares fall together. Ordinary punctuation does not separate them. Before any form can be tested mechanically, the forms have to be written in a notation where that ambiguity cannot arise. This lesson builds that notation for the part of logic that treats whole statements as unanalysed blocks, and fixes the symbols used for the rest of the subject.

Atoms

Start by deciding what will not be analysed. A simple statement, or atom, is one containing no other statement as a part: "the shares fell", "Titan has a nitrogen atmosphere", "the alloy contains nickel". Each is written as a capital letter, and which letter is a free choice, though a mnemonic one saves work later: S for the shares, N for the nickel.

A compound statement is built from simpler ones with a connective: "the shares fell and the bond yields rose" contains two statements. Propositional logic studies exactly the structure that compounding creates, and it deliberately sees nothing inside an atom. "Socrates is a man" is a single letter to it, with no visible parts, which is the limitation that eventually forces the eighth lesson.

Choosing the atoms is the first real decision in any translation. Take them too coarse and structure the argument depends on disappears; take them too fine and you invent structure the English does not have. The rule of thumb: an atom should contain no word from the connective list below.

The five connectives

Five symbols do all the work, and each has a fixed meaning that never varies with context.

Negation, ¬P, is read "not P", and it is true exactly when P is false. English hides negation in many places: "it is not the case that", the prefix in "unhappy", the verb in "she denied it", and the quiet negation in "she failed to arrive".

Conjunction, PQ, is "P and Q", true when both parts are true. It is not only carried by "and". "But", "however", "although", "yet", "while" and a plain semicolon are all conjunctions as far as truth is concerned. "She is qualified but inexperienced" is true in exactly the circumstances that "she is qualified and she is inexperienced" is true. The contrast that "but" conveys is real and it makes no difference to truth, so the notation drops it. That is the first of several deliberate losses.

Disjunction, PQ, is "P or Q", and it is inclusive: true when either part is true and also when both are. English sometimes means the exclusive version, "one or the other but not both", as in "the set menu comes with soup or salad". Logic fixes the inclusive reading as the meaning of and writes the exclusive one explicitly as (PQ)¬(PQ) when it is wanted. Latin had two separate words, vel for the inclusive and aut for the exclusive, and the symbol is the first letter of vel.

The conditional, PQ, is "if P then Q". P is the antecedent and Q the consequent. Its truth conditions are strange enough to deserve their own lesson, which is the fourth.

The biconditional, PQ, is "P if and only if Q", true when the two sides have the same truth value. It is the standard form of a definition and of a mathematical criterion: a number is even if and only if it is divisible by two.

Truth-functionality, and what will not fit

Behind all five sits one restriction that decides what this language can and cannot say. A connective is truth-functional when the truth value of the compound depends on nothing but the truth values of its parts. Give me the value of P and the value of Q and I can compute PQ without knowing what either says.

Plenty of English connectives fail this. "She resigned because the audit failed" cannot be evaluated from the two truth values alone: both parts can be true with the causal claim false, if she resigned for unrelated reasons. Causation is not a truth function, and neither is "before", since "he left before she arrived" and "she arrived before he left" can differ in truth while their parts do not change. Nor is "it is likely that", "the manager believes that", "it is obligatory that" or "it would have been the case that". Each has a whole branch of logic devoted to it, and none is here.

This exclusion is what makes the machinery of the next three lessons possible. Truth-functional connectives can be tabulated exhaustively, and tabulation is the whole method. The price is that any argument turning on causation, time, belief or obligation has that content flattened out of it in translation, and a valid formal argument may correspond to a bad English one for exactly that reason. Keeping track of what was thrown away is part of using the tool honestly.

Scope, brackets and the main connective

The ambiguity that opened this lesson is a question of scope: which connective governs which parts. Brackets settle it. (PQ)R says the disjunction and R both hold; P(QR) says either P holds or the conjunction does. Those are different claims, and later lessons will show a case where one is true and the other false.

Every well-formed formula has one main connective, the one applied last when the formula was built and the one applied first when it is taken apart. Finding it is the first move in any analysis, and the procedure is mechanical: strip any outermost bracket pair, then the connective not enclosed in any remaining brackets is the main one. In ¬(PQ) the main connective is the negation, so the formula denies a conjunction. In ¬PQ it is the conjunction, so the formula asserts one thing and denies another. Those two are not equivalent, and mixing them up is the commonest translation error there is.

To reduce bracket clutter there is a precedence order: ¬ binds most tightly, then , then , then , and binds least. So ¬PQR means ((¬P)Q)R. Precedence is a convenience and never a defence: when a formula is hard to read, put the brackets in.

Example. Find the main connective of ¬(PQ)(R¬S), and say what kind of statement it is.

There is no outermost bracket pair enclosing the whole formula, so scan for a connective outside all brackets. The first ¬ applies to (PQ) only, and and ¬S sit inside the second bracket pair. The is the only connective outside every bracket, so it is the main connective and the formula is a disjunction. Its left disjunct denies a conditional and its right asserts a conjunction.

Now you. Find the main connective of (PQ)¬(RS).

Answer

The arrow. The is inside the first bracket pair and the inside the second, so only sits outside both, and the formula is a conditional whose consequent is a negated biconditional.

Translating

Translation is where care is repaid, and a few English constructions cause nearly all the trouble.

"Only if" is not "if". "You may vote only if you are registered" does not say registration gets you a vote; it says a vote requires registration. So "P only if Q" is PQ, with the part after "only if" as the consequent, exactly opposite to the placement in "P if Q", which is QP. Combining the two gives the reason "if and only if" is a biconditional.

"Unless" means "if not". "The flight leaves unless the fog thickens" is ¬FL, and since that is equivalent to LF, translating "unless" as is also correct. Readers argue about whether "unless" is exclusive; treat it as inclusive unless the sentence says otherwise, and note the choice.

"Neither P nor Q" is ¬P¬Q, both denied. "Not both P and Q" is ¬(PQ), which is weaker: it permits either one alone. The difference between those two formulas is a law with a name, and it arrives in the fifth lesson.

"Provided that", "given that" and "assuming that" all introduce an antecedent, so they behave like "if". A sufficient condition is an antecedent and a necessary condition is a consequent, which the fourth lesson makes precise.

Example. Translate: "The contract is valid unless it was signed under duress, but it is void if either party lacked capacity."

Atoms: V for the contract being valid, D for it being signed under duress, C for either party lacking capacity. Take the clauses in turn. "Valid unless D" is "if not D then valid", so ¬DV. "But" is a conjunction. "It is void if C" puts the antecedent second, so it is C¬V, using ¬V for void, since void and valid are contradictories here. The whole translation is

(¬DV)(C¬V)

Note what the translation had to decide: that "void" is the negation of "valid" rather than a third state, and that "either party lacked capacity" is one atom rather than a disjunction over two parties. Both choices are defensible and both are choices, which is why translation is judgement rather than calculation.

Now you. Translate: "The alarm sounds only if the door is open or the glass is broken, and it does not sound now."

Answer

Atoms: A for the alarm sounding, D for the door being open, G for the glass being broken. "Only if" puts its clause in the consequent, giving A(DG), and the second clause is ¬A. The whole is

(A(DG))¬A

A common error is to write (DG)A, which claims an open door sets the alarm off, something the sentence never says.

Two more habits worth forming

Negations of compounds repay slowing down. "It is not true that the fee is refundable and the deadline is fixed" is ¬(RF), not ¬R¬F. The English is denying a package, and denying a package leaves both individual claims open.

Scope over "and" inside a negation catches almost everyone, and so does the English habit of dropping repeated subjects. "The valve is neither open nor stuck" expands to two atoms with two negations, and "the valve is not open or stuck" is genuinely ambiguous in English between ¬(OS) and ¬OS. When the source is ambiguous, the honest thing is to translate both and note that the argument may depend on which was meant.

Example. Translate "not both of the tanks are full" and "neither tank is full", and say how they differ.

With A and B for the two tanks being full, the first is ¬(AB) and the second is ¬A¬B. They differ in the case where exactly one tank is full: the first sentence is then true and the second false. So the second implies the first and not the other way round, which is the general relation between denying a conjunction and conjoining two denials.

Now you. Translate "the report is neither timely nor accurate" and "the report is not both timely and accurate", and give a situation that separates them.

Answer

With T and A: the first is ¬T¬A, the second is ¬(TA). A report that is timely but inaccurate separates them, making the second true and the first false.

What the language now has, and what it lacks

There is now a syntax: atoms, five connectives, brackets, a precedence order, and a translation practice with its known traps. Every formula built by those rules is well formed, and every well-formed formula has exactly one main connective and one unambiguous reading.

What is missing is any way to evaluate one. Nothing so far says whether (A(DG))¬A can be true, or whether one formula follows from another. The connectives were chosen to be truth-functional precisely so that this can be answered by computation rather than by intuition, and the computation is a table with 2n rows for n atoms. That is the next lesson, and it makes validity decidable for everything this language can say.

Truth tables

The previous lesson built a language for writing forms down and gave no way at all to evaluate one.

That gap closes here, and it closes completely. Because every connective was chosen to be truth-functional, a formula's value depends on nothing but the values of its atoms, and there are only finitely many ways to assign those. Listing them all is the whole method. Validity, consistency and equivalence all become questions about a finished table, answerable by looking, and for a while that feels like the end of the subject rather than the third lesson of it.

A row is a possible situation

A valuation assigns true or false to every atom in a formula. With one atom there are two valuations, with two there are four, and in general n atoms give 2n, since each atom doubles the count. A truth table is the list of all of them with the formula's value worked out in each.

The link to the first lesson is direct. Validity was defined as the impossibility of true premises with a false conclusion, "impossible" meaning across all possible situations. In propositional logic a possible situation is exactly a valuation, because the only thing a formula can see is which atoms are true. So the vague quantifier over situations becomes a finite list of rows, and a definition that looked philosophical becomes an inspection.

That is a real narrowing, worth saying out loud. A row where P is "the alloy contains nickel" and Q is "the alloy contains no nickel" is counted as possible, because the notation cannot see that they conflict. Propositional logic only knows about situations in the sense of assignments to letters, and any impossibility living inside the atoms is invisible to it.

The five tables

The connectives are defined by these tables and by nothing else. All the rest of the subject is consequences of them.

PQ¬PPQPQPQPQ
TTFTTTT
TFFFTFF
FTTFTTF
FFTFFTT

Four of the five columns match ordinary English closely enough to need no defence. Negation flips. A conjunction needs both. A disjunction needs at least one, and its bottom row is the only false one. A biconditional is true when the two sides agree, which is the top and bottom rows.

The conditional column is the odd one. It is false in exactly one row, the one where the antecedent is true and the consequent false, and it counts as true in both rows where the antecedent is false. That means "if the moon is made of cheese then Paris is in Spain" comes out true. There are reasons for this, and they take a lesson, which is the fourth. For now, take the column as given and notice its shape: a conditional is a promise that is broken only by a true antecedent with a false consequent.

Building a table

A compound formula is evaluated by working outward from the atoms, one column per subformula, ending with the main connective. The discipline is to give each column its own space rather than trying to do it in one's head.

Take (P¬Q)(¬PQ). Four rows, since there are two atoms.

PQ¬QP¬Q¬P¬PQwhole
TTFFFTF
TFTTFFF
FTFFTTF
FFTFTTF

The final column is false in every row. Notice how it happened: the left conjunct picks out exactly the row where P is true and Q false, and the right conjunct is false in exactly that row, so nothing survives. That is worth seeing rather than just recording, because it is the reason the formula is a contradiction rather than a fact about it.

Three kinds of formula

The final column of a table can come out three ways, and the three names are used constantly.

A tautology is true in every row. P¬P is one, and so is (PQ)(QP), which surprises people: whichever way the values fall, at least one of the two conditionals has a false antecedent or a true consequent, so at least one is true. A tautology says nothing about the world, since no situation can falsify it, and that emptiness is exactly why it is safe to assert anywhere.

A contradiction is false in every row, like the formula just tabulated, or the plain P¬P.

A contingency is true in some rows and false in others, which is what almost every useful statement is. "It is raining" tells you something precisely because it rules out situations.

A formula is satisfiable when at least one row makes it true, so tautologies and contingencies are satisfiable and contradictions are not. A set of formulas is consistent when some single row makes them all true at once. Consistency is not the same as everything being individually satisfiable: P, PQ and ¬Q are each satisfiable on their own and no row makes all three true together.

Example. Classify P(QP).

Two atoms, four rows. When P is true, the inner conditional QP has a true consequent, so it is true, and the whole conditional has a true consequent and is true. When P is false, the whole conditional has a false antecedent, so it is true by the third and fourth rows of the conditional table. Every row comes out true, so it is a tautology. It is worth pausing on how little it says: a true statement is implied by anything at all.

Now you. Classify (PQ)(¬P¬Q).

Answer

A contradiction. The right conjunct is true only in the row where both atoms are false, and the left conjunct is false in exactly that row, so no row makes the whole thing true.

The test for validity

Here is the payoff. To test an argument, tabulate every premise and the conclusion over the same rows, then look for a row where every premise is true and the conclusion is false. If there is one, the argument is invalid and that row is a counterexample, a fully specified situation you can describe out loud. If there is no such row, the argument is valid, with no cleverness required.

Take: "If the reactor is scrammed, the pumps run. Either the pumps are not running or the valve is open. The valve is not open. So the reactor is not scrammed." With S, P and V the argument is SP, ¬PV, ¬V, therefore ¬S. Three atoms, so eight rows.

SPVSP¬PV¬V¬S
TTTTTFF
TTFTFTF
TFTFTFF
TFFFTTF
FTTTTFT
FTFTFTT
FFTTTFT
FFFTTTT

Scan the three premise columns for a row of all Ts. Only the last row qualifies, and its conclusion column is T. No row has true premises with a false conclusion, so the argument is valid. Note how thin the result is: seven of the eight rows were thrown out by the premises, and the verdict rests on one surviving row.

Example. Test: P(QR), ¬Q, therefore R.

Look for a row making both premises true and R false. Try R false and Q false, which satisfies the second premise. Then QR is false, so the first premise demands that P be false, and P false makes it true. So the row P false, Q false, R false has both premises true and the conclusion false. The argument is invalid, and the counterexample is concrete: nothing is on, the conditional holds vacuously, and R never had to be true.

Now you. Test: (PQ)R, ¬R, P, therefore ¬Q.

Answer

Valid. Suppose the conclusion is false, so Q is true. With P true from the third premise, PQ is true, so the first premise forces R true, contradicting ¬R. No row can make the premises true with the conclusion false, so there is no counterexample.

Entailment, and a symbol for it

When no valuation makes a set of formulas Γ true while making φ false, Γ entails φ, written

Γφ

and read "Γ entails φ", or "φ is a semantic consequence of Γ". Validity of an argument is exactly entailment of its conclusion by its premises. With nothing on the left, φ says φ is a tautology.

The symbol matters because a second one arrives in the sixth lesson: , for what can be derived by a fixed set of rules. One is about tables, the other about proofs, and the fact that they coincide is the deepest result in propositional logic rather than an obvious identity.

Two facts fall straight out of the definition and settle the puzzles from the first lesson. An inconsistent set entails everything, since it makes no row true and so has no row with true premises at all. And a tautology is entailed by anything, since no row makes it false.

The short cut

Eight rows are tedious and sixteen are worse, so in practice the table is almost never drawn in full. Instead, assume the argument is invalid and try to build the offending row directly. Set the conclusion false, then work through the premises forcing values as far as they will go. If you reach a contradiction on every branch, no such row exists and the argument is valid. If you complete a row without contradiction, that row is a counterexample.

That is what the last two exercises did, and the saving grows fast: the second exercise settled a three-atom argument in two lines instead of eight rows, and the same reasoning handles ten atoms without ever mentioning 1024.

The method needs care in one place. When a premise leaves a genuine choice, both branches must be tried before declaring validity. A disjunction with neither side forced is the usual case: PQ with nothing else known splits into P true and P false with Q true, and abandoning one branch is how a counterexample gets missed.

Example. Test PQ, PR, QR, therefore R, by the short cut.

Set R false. The second premise then forces P false and the third forces Q false, since a true antecedent with a false consequent would break them. But the first premise needs one of P and Q to be true, and both have just been forced false. Every branch closes, so no counterexample row exists and the argument is valid. Eight rows never had to be written, and the reasoning shows which premises did the work.

Now you. Test PQ, RS, PR, therefore QS.

Answer

Invalid. Set the conclusion false by making S false, which forces R false through the second premise, which forces P true through the third, which forces Q true through the first. The row P true, Q true, R false, S false makes all three premises true and the conclusion false. Sixteen rows would have found the same thing more slowly.

What the table costs

The table method is complete, mechanical and guaranteed to terminate, which puts propositional logic in a rare position: its validity problem is decidable, and a procedure exists that answers every instance in finite time.

The trouble is the finite time. Rows double with each atom, so 10 atoms give 1024 rows, 20 give 1,048,576, and 30 give 1,073,741,824. At a million rows a second that last one takes about 18 minutes, and 60 atoms, still a small argument by the standards of a real legal document or circuit, would take roughly 36 years at a billion rows a second. Doubling defeats hardware improvements: buying a machine ten times faster buys about three more atoms.

There is a second complaint, and it is the one that shapes the rest of the subject. A completed table certifies that no counterexample exists without showing why the conclusion follows. It gives no argument you could present to somebody, no insight into which premise did the work, and no way to reuse a step in the next problem. It is a verdict rather than a proof.

The response to both complaints is the same: reason with the formulas instead of enumerating their rows. That needs rules for transforming formulas while preserving truth, which is the fifth lesson, and rules for deriving conclusions line by line, which is the sixth. Before either, one column of the table above still needs explaining, and the next lesson is about that column alone.

The conditional

One column of the previous lesson's table was handed over without justification, and it is the column almost every argument in the world runs through.

The conditional is the connective of rules, laws, predictions, promises, contracts and proofs. It is also the only one whose truth table offends people on first sight, because it counts "if the moon is made of cheese then Paris is in Spain" as true. This lesson shows that the table is forced rather than chosen, sets out honestly what it fails to capture, and then works through the practical consequences: necessary and sufficient conditions, converse and contrapositive, and the two fallacies that account for most bad reasoning about evidence.

The row nobody disputes and the two that follow

Start from what is not controversial. "If you pass the exam, you get the certificate" is broken by exactly one situation: you passed and got nothing. Passing and receiving is the promise kept. So PQ must be false when P is true and Q false, and true when both are true. Those two rows are fixed by the meaning of "if" in any reading.

The dispute is over the two rows where P is false. You did not pass. Was the promise kept or broken? The natural answer is that it was neither, that the question does not arise. But the language of the second lesson has no third value, and every connective in it is a function from the values of the parts to a value for the whole. Something must go in those rows.

There are only four ways to fill two rows, so enumerate them and see which survives. Filling both with false gives a connective true only when P and Q are both true, which is PQ: asserting "if you pass you get the certificate" would then assert that you passed. Filling the false-true row with false and the false-false row with true gives the biconditional, so "if" would mean "if and only if", making "if it rains the match is cancelled" claim that nothing else could cancel it. Filling the false-true row with true and the false-false row with false gives a connective whose value is just Q, so the antecedent would be idle and "if P then Q" would say no more than Q.

Each of the three is plainly wrong. The remaining option, true in both rows where the antecedent is false, is the material conditional, and it is the only truth-functional candidate left standing. A conditional with a false antecedent is called vacuously true, and the name is a fair description: nothing has been claimed, so nothing has been broken.

What the material conditional gets wrong

Being the only candidate does not make it a good model of English "if", and pretending otherwise is how logic gets a reputation for sophistry. Three consequences are genuinely uncomfortable, and all three are tautologies you can verify in four rows.

First, ¬P(PQ): a false statement implies anything. Second, Q(PQ): a true statement is implied by anything. Third, (PQ)(QP): for any two statements whatever, one implies the other. Take "the reactor is scrammed" and "the price of tin is rising", and one of the two conditionals joining them is true, which no English speaker would accept.

The reason is that the material conditional records only a pattern of truth values, and English "if" claims a connection. Counterfactuals show the gap most sharply. "If this bridge had been built in steel, it would have survived" and "if this bridge had been built in steel, it would have collapsed anyway" have the same false antecedent, so both are vacuously true as material conditionals, while engineers can disagree about which is right for good reasons. Whole logics exist for that, and the honest position is that is a deliberately crude tool: it is exactly right for the conditionals of mathematics and formal rules, and approximate for conditionals about causes, times and possibilities.

Necessary and sufficient

The vocabulary that goes with the conditional is worth getting exactly right, because it is used constantly in law, engineering and mathematics and confused just as often.

P is a sufficient condition for Q when PQ: having P is enough for Q. Q is a necessary condition for P in the same situation: without Q you cannot have P. A single conditional therefore states both facts at once, and which word you reach for depends only on which end you look from.

Being a square is sufficient for being a rectangle, and being a rectangle is necessary for being a square. Passing the medical is necessary for a pilot's licence and nowhere near sufficient. When a condition is both necessary and sufficient, the biconditional holds, and that is what a definition asserts: an integer is even if and only if it is divisible by two, which is two conditionals in one symbol.

Example. "A valid contract requires consideration." Which is consideration, necessary or sufficient, and what conditional does the sentence assert?

"Requires" marks a necessary condition, so with V for validity and C for consideration the sentence is VC: if the contract is valid, consideration was present. Equivalently, no consideration means no valid contract. It plainly does not say CV, since a contract can have consideration and fail for a dozen other reasons, and a lawyer who read it that way would be badly wrong.

Now you. "Only members may use the pool." Express it as a conditional, and say which condition is which.

Answer

With U for using the pool and M for membership, it is UM. Membership is necessary for use and not sufficient, since the pool can be closed. "Only" always introduces the consequent, which is the same rule as "only if" from the second lesson.

Converse, contrapositive and inverse

Three formulas can be built from PQ by swapping and negating, and exactly one of them is equivalent to it.

The converse is QP, which is a different claim. The inverse is ¬P¬Q, also different, and in fact the converse of the converse. The contrapositive is ¬Q¬P, and it is equivalent to the original: check the four rows and the two columns match everywhere. The converse and the inverse are equivalent to each other and to neither of the other two.

The equivalence of a conditional with its contrapositive is a working tool rather than a curiosity. "If the sample contains chloride, the silver nitrate test goes cloudy" and "if the test stays clear, there is no chloride" are the same statement, and the second is often the easier one to use, since it is the one a negative test licenses. A whole proof technique is built on this and arrives in the thirteenth lesson.

The converse error is so common it has a name in every field. "All fraudulent accounts look smooth" does not give "all smooth accounts are fraudulent". "Every case of the disease shows this marker" does not give "everyone with the marker has the disease", and the gap between those two is the entire subject of diagnostic testing.

The two fallacies, seen in the table

The first lesson named affirming the consequent and denying the antecedent as invalid. The table now shows exactly why, and shows that they are the same mistake twice.

Affirming the consequent argues PQ, Q, therefore P. Look for a row with both premises true and the conclusion false: P false and Q true does it, since a false antecedent makes the conditional vacuously true and the second premise is satisfied. One row is all it takes.

Denying the antecedent argues PQ, ¬P, therefore ¬Q. The same row refutes it: P false, Q true makes both premises true and the conclusion false. The two fallacies are refuted by one valuation, which is a hint that they are the same error, namely reading as . Both would be valid if the conditional really were a biconditional, and people commit them because ordinary conversation often does mean a biconditional. "If you tidy your room you can have ice cream" is normally understood to promise no ice cream otherwise, which is precisely the reading logic refuses.

Example. A test for a condition is positive in every case of the condition. A patient tests positive. What follows?

With C for having the condition and T for a positive test, the premise is CT and the fact is T. That is affirming the consequent, and nothing follows about C. What would follow from a negative test is ¬C, by modus tollens, which is why a highly sensitive test is used to rule a condition out rather than in. Numbers make the point sharper: if the condition affects 1 in 1000 people and the test has a 5 per cent false positive rate, then among 100,000 people about 100 have the condition and test positive, while about 4995 of the rest test positive anyway, so a positive result is wrong roughly 98 times in 100.

Now you. "If the shipment cleared customs, the tracking page shows a customs event. The tracking page shows no customs event." What follows, and by which form?

Answer

That the shipment did not clear customs, by modus tollens: CE with ¬E gives ¬C. This is valid, unlike the previous example, and the difference is only which of the two the premise denies.

Why this is hard for people

There is direct evidence about how badly untrained reasoners handle the conditional, and it is one of the most replicated results in psychology.

Peter Wason's selection task, from 1966, lays four cards on a table showing D, K, 3 and 7. Each card has a letter on one side and a number on the other. The rule is: if a card has a D on one side, it has a 3 on the other. Which cards must be turned over to find out whether the rule is broken?

The correct answer is D and 7. The rule is D3, and only one combination breaks it, a D with a non-3 on the back. Turning D can reveal exactly that. Turning 7 can too, since a D behind the 7 is a D without a 3. Turning 3 is useless, because whatever is behind it, no rule is broken: the rule never said only D cards carry 3s, and thinking otherwise is affirming the consequent. Turning K is useless, because the rule says nothing about non-D cards.

Fewer than one in ten participants get this right. Most turn D alone, or D and 3, choosing the card that could confirm the rule rather than the card that could break it. The interesting part is what fixes it: Griggs and Cox in 1982 posed the same task as a bar checking that anyone drinking beer is over 18, with cards reading "beer", "cola", "22" and "16". About three quarters of participants then chose correctly, which is "beer" and "16", the exact same logical form. The structure was never the problem; the abstraction was.

Example. In the drinking version, why is the "22" card the one that matches the useless "3" card?

The rule is: drinking beer implies over 18. The "22" card is a person over 18, so it satisfies the consequent, and whatever they are drinking the rule stands, since over-18s may drink anything. Turning it can produce no violation, which is exactly the position of the "3" card. Checking it is affirming the consequent dressed as diligence.

Now you. The rule is "if a package is marked fragile, it must be shipped by air". Four packages are on the bench: one marked fragile, one not marked, one already loaded on a plane, one already loaded on a truck. Which two must be checked?

Answer

The one marked fragile, to see how it is shipped, and the one on the truck, to see whether it is marked fragile. The unmarked package is unconstrained by the rule and the one on the plane cannot break it, whatever its marking.

Where this leaves the language

The conditional is now fully understood as a truth function, with its uses and its known distortions. The same four rows license modus ponens and modus tollens, refute their two impostors, and turn "necessary", "sufficient" and "only" into placements of an arrow.

The next question is what else the tables license. A conditional and its contrapositive have identical columns, which means either can replace the other anywhere without changing any truth value, and that is a far more powerful observation than it looks. If formulas with identical columns are interchangeable, logic can be done by substitution and calculation rather than by row-counting, and long formulas can be pushed into standard shapes. That is the next lesson.

Equivalence and normal forms

A conditional and its contrapositive came out with identical truth table columns in the previous lesson, and that observation is worth far more than the fact itself.

If two formulas are true in exactly the same rows, then no argument, no matter how long, can tell them apart, and either may be swapped for the other anywhere it appears. That licenses doing logic the way algebra is done: by rewriting, in steps, each step justified by a law. This lesson sets out the laws, shows how any formula can be pushed into one of two standard shapes, and finishes with the surprising fact that one connective is enough to express everything the language can say.

Equivalence, and why substitution is safe

Two formulas are logically equivalent, written φψ, when they have the same truth value under every valuation. Equivalently, φψ is a tautology, since a biconditional is true exactly when its sides agree. The two definitions are the same statement read from the table and from the formula.

Equivalence licenses substitution: replacing any subformula by an equivalent one leaves the value of the whole unchanged, in every row. This follows from truth-functionality and nothing else. A connective sees only the truth values of its parts, so if a part is swapped for something with the same value in every row, no connective above it can notice. Whole chains of rewriting are therefore safe, which is the property that makes calculation possible.

Note carefully what equivalence is not. It is not sameness of meaning: 2+2=4 and Fermat's last theorem are both tautologies of arithmetic and nobody would call them the same claim. Within propositional logic, where the only thing visible is a column of Ts and Fs, equivalence is as fine a distinction as the machinery can draw, and the loss is the same one the second lesson noted when "but" became .

The laws

Ten laws do nearly all the work. Each can be checked in four or eight rows, and doing that once for each is the best hour available in this subject.

LawStatement
Double negation¬¬PP
CommutativityPQQP, and the same for
Associativity(PQ)RP(QR), and the same for
IdempotencePPP, PPP
De Morgan¬(PQ)¬P¬Q, ¬(PQ)¬P¬Q
DistributionP(QR)(PQ)(PR), and with and swapped
AbsorptionP(PQ)P, P(PQ)P
ImplicationPQ¬PQ
ContrapositionPQ¬Q¬P
BiconditionalPQ(PQ)(QP)

Two of these deserve a second look. De Morgan is the law behind the second lesson's warning about "neither" and "not both": denying a conjunction gives a disjunction of denials, not a conjunction of them. It generalises the informal rule for negating English, that a negation pushed inward flips "and" to "or" and back.

Distribution is the one where the analogy with school algebra fails. In arithmetic, multiplication distributes over addition and addition does not distribute over multiplication. In logic both directions hold, so P(QR)(PQ)(PR) as well. That symmetry is what makes it possible to convert freely between the two normal forms below.

Two more equivalences follow from the laws and are used constantly: ¬(PQ)P¬Q, which says a conditional is denied by asserting its antecedent and denying its consequent, and P(QR)(PQ)R, called exportation, which is how a rule with two conditions gets split or joined.

Pushing negations inward

The first thing to do with any formula is tidy it, and there is a standard destination for the tidying. A formula is in negation normal form when negations apply to atoms and to nothing else, so no ¬ sits in front of a bracket.

Getting there is a fixed procedure with no choices in it. Replace every using the biconditional law, then every using the implication law, then push each remaining negation inward with De Morgan, cancelling double negations as they appear. The procedure always terminates, because each De Morgan step moves a negation strictly closer to an atom and there are only finitely many places left to go.

Example. Simplify ¬(P(Q¬R)) until no negation applies to anything but an atom.

De Morgan on the outer negation gives ¬P¬(Q¬R). De Morgan again on the second disjunct gives ¬P(¬Q¬¬R), and double negation finishes it as

¬P(¬QR)

Three steps, each one law, and the result is in negation normal form.

Now you. Bring ¬(P(QR)) to negation normal form.

Answer

Implication turns the inside into ¬P(QR), so the formula is ¬(¬P(QR)). De Morgan gives ¬¬P¬(QR), and a second De Morgan with double negation gives

P(¬Q¬R)

which says what the English would: the antecedent holds and the consequent fails.

Two standard shapes

Rewriting is more useful when it has a destination. Two shapes are standard.

A formula is in disjunctive normal form, or DNF, when it is a disjunction of conjunctions of literals, a literal being an atom or its negation. (P¬Q)(QR)¬P is in DNF. It is in conjunctive normal form, or CNF, when it is a conjunction of disjunctions of literals, and each of those disjunctions is called a clause.

The two shapes answer different questions at a glance. A DNF is satisfiable exactly when one of its conjunctions is free of an atom together with that atom's negation, so satisfiability is read off by inspection. A CNF is a tautology exactly when every clause contains some atom alongside its negation, so being a tautology is read off by inspection. Neither shape makes both questions easy, which is a hint about how hard the underlying problems are.

Reading a normal form off the table

Every formula has both forms, and no ingenuity is needed to find them, because the truth table hands them over directly.

For DNF, take each row where the formula is true and write the conjunction of literals describing that row, with an atom that is true appearing plain and one that is false appearing negated. Each such conjunction is true in its own row and false in every other, so their disjunction is true in exactly the rows the formula is. For CNF, work from the false rows instead, writing for each one the clause that rules it out by negating every literal of the row. Each clause is false only in its own row, so the conjunction is false in exactly the rows the formula is.

A formula true in no row has an empty DNF, and one true in every row has an empty CNF, which is the sensible boundary case rather than a defect.

Example. Put (PQ)(QR) into disjunctive normal form.

Its table has eight rows and the formula is true in four of them: all three atoms false; P and Q false with R true; P false with Q and R true; and all three true. Writing each row as a conjunction gives

(¬P¬Q¬R)(¬P¬QR)(¬PQR)(PQR)

which is correct and clumsy. The first two rows agree except on R, and R is true in one and false in the other, so together they say ¬P¬Q whatever R does. The last two agree except on P, so together they say QR. The formula reduces to

(¬P¬Q)(QR)

and that pairing-off of rows that differ in one atom is exactly the simplification that circuit designers do with Karnaugh maps.

Now you. Put PQ into disjunctive normal form.

Answer

It is true in two rows, both atoms true and both false, so the DNF is

(PQ)(¬P¬Q)

One connective is enough

A set of connectives is functionally complete when every truth function can be written using only those. Since every formula has a DNF, and a DNF uses only ¬, and , that set is complete: the two-line argument is the whole proof, and it also covers every truth function of any number of arguments, because the DNF construction never cared how many atoms there were.

The set shrinks. De Morgan turns PQ into ¬(¬P¬Q), so can go and {¬,} is complete. The implication law turns ¬PQ into PQ, so {¬,} is complete too.

It shrinks to one. Write PQ for "not both", the connective now called NAND. Then ¬P is PP, and PQ is (PQ)(PQ), and with negation and conjunction available everything else follows. Henry Sheffer published this in 1913, and Charles Sanders Peirce had found it in 1880 in work that stayed unpublished until 1933. Its dual, NOR, works the same way, and of the sixteen binary truth functions those two are the only ones that are complete on their own. Emil Post settled the general question in 1921, classifying exactly which sets are complete.

This is not a curiosity. It is why NAND gates are the cheapest way to build hardware: one gate type, repeated, can compute any Boolean function, and integrated circuits are built out of exactly that repetition. It is also why flash memory is called NAND flash, after the gate arrangement of its cells.

Example. Express PQ using only .

By De Morgan, PQ¬(¬P¬Q), and "not both" is what already means, so ¬(¬P¬Q) is ¬P¬Q. Substituting the NAND form of each negation gives

(PP)(QQ)

Three gates, and a check on the row where both are false confirms it: each inner NAND gives true, and true NAND true is false, which is what PQ should be.

Now you. How many of the sixteen binary truth functions are functionally complete on their own?

Answer

Two, NAND and NOR. Every other binary function fails to be complete, most obviously , , and , all of which give true when both inputs are true and so can never produce a formula false everywhere.

Where calculation runs out

Normal forms are the input to real machinery. Satisfiability of a CNF formula, the SAT problem, was the first problem shown NP-complete, by Stephen Cook in 1971 and independently by Leonid Levin, so every problem in NP can be encoded as a CNF and solved by a SAT solver. Modern solvers handle industrial instances with millions of clauses, and they are used to verify processor designs and to plan schedules, all of it downstream of the conversion in this lesson.

The honest limit is that conversion itself can explode. Distributing to turn a DNF into a CNF can square the number of clauses at each step, and formulas exist whose smallest CNF is exponentially larger than the original. The standard fix, Tseytin's transformation of 1970, introduces a new atom for each subformula and produces a CNF of linear size that is satisfiable exactly when the original is, which is enough for a solver even though it is not equivalent to the original.

And the deeper limit is unchanged from the previous lesson. Everything here still rests on columns of a table, whether or not the table is written out. Nothing yet lets you argue from premises to a conclusion in steps that a reader could follow and check. That is what the next lesson builds, and the equivalences here become the justification for its rules.

Rules of inference

A truth table certifies that no counterexample exists and gives no account of why the conclusion follows, which is the difference between a verdict and a proof.

There is a second reason to want something better, and it is arithmetic: the previous lessons' method doubles in size with every atom, so an argument with thirty atoms is a billion rows. This lesson replaces enumeration with derivation. A derivation is a numbered list of formulas, each one either a premise or the result of applying a stated rule to earlier lines, ending at the conclusion. Nobody has to trust the writer, because every line names what it came from, and checking a derivation is mechanical even when finding it was not.

The system built here is natural deduction, designed by Gerhard Gentzen in 1934 with the explicit aim of matching how mathematicians actually argue. Its organising idea is that each connective gets exactly two rules: one to introduce it and one to eliminate it.

The shape of a derivation

A derivation is written in three columns: the line number, the formula, and the justification, which names the earlier lines used and the rule applied. Premises are justified by the word "premise" and by nothing else.

Here is the smallest interesting one, the chain from the first lesson. From PQ, QR and P, derive R.

#FormulaJustification
1PQpremise
2QRpremise
3Ppremise
4Q1, 3, E
5R2, 4, E

Two things are worth noticing before any rule is stated. Each new line is a formula that must be true whenever the lines it cites are true, which is the only property a rule needs. And the derivation is checkable line by line without ever considering the argument as a whole, which is exactly what a table cannot offer.

When the premises Γ yield φ by such a derivation, write Γφ, read "Γ proves φ". Keep it firmly apart from Γφ from the third lesson, which was about rows of a table. One is a claim about what can be written down with these rules, the other about what is true in every valuation, and the relation between them is the subject of the end of the next lesson.

Rules for conjunction

Conjunction is the easiest connective and shows the pattern.

Conjunction introduction (I): from φ and ψ on any two earlier lines, write φψ. Conjunction elimination (E): from φψ, write either φ or ψ.

Both are justified by the table. The introduction rule is sound because the only row where a conjunction is false is one where a conjunct is false, so if both conjuncts are true on their lines, the conjunction cannot be false. The elimination rule is sound because a true conjunction has both parts true.

That justification is the pattern for every rule below, and it is why the system is not a set of conventions. A rule is admitted only if it can never take you from true lines to a false one, and the truth tables are the court of appeal.

Rules for the conditional

Conditional elimination (E) is modus ponens: from φψ and φ, write ψ. It is sound because the only row where a conditional is true with its antecedent true has the consequent true as well, which is a restatement of the single false row of the conditional table.

There is no introduction rule here yet. To write a conditional you must be able to suppose its antecedent, and supposing needs machinery that the next lesson supplies. Until then the system can take conditionals apart and cannot build them, which is a real gap and worth feeling rather than patching.

Three further rules about conditionals are derived: each can be reconstructed from the basic ones, and each is used often enough to be worth naming. Modus tollens (MT): from φψ and ¬ψ, write ¬φ. Hypothetical syllogism (HS): from φψ and ψχ, write φχ. Disjunctive syllogism (DS): from φψ and ¬φ, write ψ.

Calling them derived matters for a reason that will return in the next lesson. A small set of basic rules is easier to prove things about, and a large set is easier to work with, so systems keep the basic set minimal and then license the convenient ones once. Nothing is lost either way.

Example. Derive R from the premises (PQ)R, P, SQ and S.

The conclusion is the consequent of the first premise, so the target is its antecedent, PQ. P is already given, and Q is one step from the last two premises.

#FormulaJustification
1(PQ)Rpremise
2Ppremise
3SQpremise
4Spremise
5Q3, 4, E
6PQ2, 5, I
7R1, 6, E

The strategy generalises: look at what the conclusion is a part of, and work backwards to what would deliver it. Derivations are found from both ends and written forwards.

Now you. Derive D from AB, BC, ¬C and AD.

Answer
#FormulaJustification
1ABpremise
2BCpremise
3¬Cpremise
4ADpremise
5AC1, 2, HS
6¬A5, 3, MT
7D4, 6, DS

Rules for disjunction

Disjunction introduction (I): from φ, write φψ for any ψ at all. This looks like cheating. From "the sample is copper" it licenses "the sample is copper or the moon is hollow", which no sensible person would say.

It is nevertheless sound, and the table shows why immediately: a disjunction is true whenever either side is true, so a true line cannot yield a false disjunction. What offends is not the truth of the conclusion but its uselessness, and logic guarantees only truth preservation. The rule earns its place because a disjunction is the input to disjunctive syllogism and to argument by cases, so manufacturing one deliberately is often the step that makes a proof go through.

Elimination for disjunction is the hard one, because knowing φψ tells you almost nothing on its own. The honest rule is argument by cases: show that the conclusion follows from φ and also from ψ. That needs suppositions again, so like conditional introduction it waits for the next lesson. Disjunctive syllogism is the poor relation available in the meantime, and it works only when one disjunct can be ruled out.

Rules for negation and the biconditional

Double negation elimination (¬¬E): from ¬¬φ, write φ. Its converse, introducing a double negation, is equally sound, and both follow from the one-line table for ¬¬P.

Introducing a negation properly means proving that an assumption leads to disaster, which again waits for the next lesson. So negation, like the conditional and the disjunction, currently has an elimination rule and no introduction rule, and the pattern of what is missing is now unmistakable.

The biconditional is handled by trading it for two conditionals. Biconditional elimination (E): from φψ, write φψ, or write ψφ. Biconditional introduction (I): from φψ and ψφ, write φψ. This one is available now because it does not need a supposition, only two conditionals already in hand, though in practice those conditionals will have come from the next lesson's machinery.

Example. Derive ¬B from (AB)C, A and ¬C.

Modus tollens on the first and third premises gives the negation of the antecedent, and the rest is reading what that negation says.

#FormulaJustification
1(AB)Cpremise
2Apremise
3¬Cpremise
4¬(AB)1, 3, MT
5¬A¬B4, De Morgan
6¬¬A2, double negation
7¬B5, 6, DS

Lines 5 and 6 use equivalences from the previous lesson as rewriting steps, which is legitimate because equivalent formulas are interchangeable everywhere. Many textbooks list those equivalences among the rules for exactly this reason, and the derivation is shorter for it.

Now you. Derive QS from PQ, RS and PR.

Answer
#FormulaJustification
1PQpremise
2RSpremise
3PRpremise
4P3, E
5R3, E
6Q1, 4, E
7S2, 5, E
8QS6, 7, I

Finding a derivation

The rules say what may be written; they do not say what to write, and that is a genuine difficulty rather than a lack of practice. Three habits cover most cases.

Work backwards from the conclusion. If it is a conjunction, plan to get both halves and use I. If it is an atom sitting as the consequent of a premise, plan to get that premise's antecedent. If it appears as a disjunct, plan to eliminate the other disjunct.

Take every premise apart as far as it goes. Conjunctions should be split immediately, biconditionals turned into their two conditionals, and double negations removed, because a formula buried inside a compound cannot be used.

Watch for a negation among the premises. It is almost always there to fire modus tollens or disjunctive syllogism, and spotting which premise it is aimed at usually unlocks the problem.

Example. Derive S from PQ, PR, ¬R and QS.

S is the consequent of the fourth premise, so the target is Q. Q is the right-hand side of the biconditional, so it will come from P, and P comes from the second and third premises.

#FormulaJustification
1PQpremise
2PRpremise
3¬Rpremise
4QSpremise
5P2, 3, DS
6PQ1, E
7Q6, 5, E
8S4, 7, E

Disjunctive syllogism at line 5 works with the negated disjunct on the right, which is fine: the rule cares that one disjunct is denied, not which.

Now you. Derive C from AB, ¬A, BD and DC.

Answer
#FormulaJustification
1ABpremise
2¬Apremise
3BDpremise
4DCpremise
5B1, 2, DS
6BD3, E
7D6, 5, E
8C4, 7, E

What the system cannot yet do

Count the gaps. Conjunction has both rules. The biconditional has both. The conditional, the disjunction and the negation each have an elimination rule and no way to be introduced, apart from the disjunction's near-useless one.

The consequence is severe. This system cannot derive PP, the most obvious tautology there is, because with no premises there is nothing to eliminate and no way to build an arrow. It cannot prove any tautology at all from no premises. It cannot use a disjunction except by killing one side. Whatever else it is, it is not complete.

Every one of those gaps has the same cause. Building a conditional requires reasoning under a supposition you do not believe; building a negation requires assuming something in order to wreck it; using a disjunction requires taking each case in turn as a temporary assumption. Suppositions are the missing machinery, and they need a bookkeeping discipline, since a formula proved under an assumption must not escape and be used as though it had been proved outright. That discipline, and the two most important proof techniques in mathematics that come out of it, are the next lesson.

Assumptions, conditional proof and reductio

The previous lesson ended with a system that could take conditionals, disjunctions and negations apart and had no way to build any of them, so it could not even derive PP.

Everything missing has one cause. To prove a conditional you must reason from its antecedent without believing it. To prove a negation you must assume the thing you are denying and watch it fail. To use a disjunction you must take each case in turn. All three are suppositions, and a supposition is dangerous: whatever is proved under it is proved only under it, and letting such a line escape would let anything be proved from nothing. The bookkeeping that keeps suppositions in their place is what this lesson adds, and with it the system becomes complete.

Suppositions and discharge

A subproof begins with an assumption, made freely and with no justification, and runs until it is closed. Lines inside it are written shifted to the right, and here they carry a bar. When the subproof is closed, the assumption is discharged: it is no longer in force, and the conclusion drawn from it survives only in a form that mentions it explicitly.

The scope rule is absolute. Once a subproof is closed, none of its lines may be cited again, and only the conclusion the closing rule produces remains available. A line proved under an assumption depends on that assumption, and dragging it out into the main proof would be exactly the error of treating a supposition as a fact.

Everything else stays as before. Lines are numbered, each carries its justification, and a checker verifies the derivation without needing to know how it was found.

Conditional proof

Conditional introduction (I): assume φ, derive ψ, close the subproof, and write φψ, citing the range of lines.

That is what a mathematician means by "suppose x is even" at the start of a proof, and it is why the technique is called conditional proof. Its soundness is the conditional's table read from the other side: the conditional can only fail when the antecedent is true and the consequent false, and the subproof shows that if the antecedent holds the consequent follows, so that row is unreachable.

From PQ and QR, derive PR, which is hypothetical syllogism proved rather than assumed.

#FormulaJustification
1PQpremise
2QRpremise
3Passumption
4Q1, 3, E
5R2, 4, E
6PR3-5, I

Line 6 is the first line in the whole subject that depends on no assumption beyond the premises, having been built out of lines that did. Note also that P, Q and R never had to be true: the derivation shows what would follow if P were.

Subproofs nest, which is how a conditional with a conditional inside it gets proved. From no premises at all, derive P(Q(PQ)).

#FormulaJustification
1Passumption
2│ │ Qassumption
3│ │ PQ1, 2, I
4Q(PQ)2-3, I
5P(Q(PQ))1-4, I

Line 3 cites line 1, which is legitimate because the outer subproof is still open there. The reverse never is: after line 5 nothing may cite lines 1 to 4.

Example. Derive PP from no premises.

#FormulaJustification
1Passumption
2PP1-1, I

Two lines, and the subproof does no work at all: assume P, and P is immediately available, so the conditional follows. The tautology that defeated the previous lesson's system falls out the moment assumptions are allowed.

Now you. Derive P(QR) from the single premise (PQ)R.

Answer
#FormulaJustification
1(PQ)Rpremise
2Passumption
3│ │ Qassumption
4│ │ PQ2, 3, I
5│ │ R1, 4, E
6QR3-5, I
7P(QR)2-6, I

This is the exportation equivalence of the fifth lesson, now derived instead of tabulated.

Reductio ad absurdum

Negation introduction (¬I): assume φ, derive a contradiction, close the subproof, and write ¬φ. A contradiction here means any formula together with its negation, or the symbol used to mark that they have both appeared.

The reasoning is that a set of true statements cannot contain a contradiction, so if adding φ produced one, φ was not true. This is reductio ad absurdum, in use since Euclid, and the twelfth lesson of Mathematical Foundations used it to show that no fraction squares to 2.

From PQ and P¬Q, derive ¬P.

#FormulaJustification
1PQpremise
2P¬Qpremise
3Passumption
4Q1, 3, E
5¬Q2, 3, E
64, 5
7¬P3-6, ¬I

The mirror-image rule is the one that makes the system classical. Indirect proof, or negation elimination: assume ¬φ, derive a contradiction, and conclude φ. Strictly this is ¬I followed by double negation elimination, and it is worth naming separately because it is the standard way to prove something positive that resists a direct attack.

One further rule follows from contradiction and is worth stating because it startles people: from , anything at all may be inferred. This is ex falso quodlibet, and it is the derivation-level version of the third lesson's result that an inconsistent set entails everything. The system is not being reckless; it is recording that once your premises contradict each other, they have stopped constraining anything.

Example. Derive ¬Q from ¬(PQ) and P.

#FormulaJustification
1¬(PQ)premise
2Ppremise
3Qassumption
4PQ2, 3, I
51, 4
6¬Q3-5, ¬I

The shape is worth memorising, since it is how nearly every negative conclusion is reached: assume the positive version, build the thing that was denied, and collect the contradiction.

Now you. Derive ¬P from P(Q¬Q).

Answer
#FormulaJustification
1P(Q¬Q)premise
2Passumption
3Q¬Q1, 2, E
4Q3, E
5¬Q3, E
64, 5
7¬P2-6, ¬I

Argument by cases

Disjunction elimination (E): given φψ, if a subproof assuming φ reaches χ and another assuming ψ also reaches χ, then χ follows.

This is the rule the previous lesson could not state, and it is the one that makes a disjunction useful rather than merely true. Its soundness is direct: any row making the disjunction true makes at least one disjunct true, and either way χ comes out true.

From PQ, PR and QR, derive R.

#FormulaJustification
1PQpremise
2PRpremise
3QRpremise
4Passumption
5R2, 4, E
6Qassumption
7R3, 6, E
8R1, 4-5, 6-7, E

Everyday reasoning uses this constantly without naming it. A doctor who says the pain is either a strain or a stress fracture, and that either way the treatment is rest, has argued by cases, and the conclusion holds without ever settling which case is real.

Proving what looks unprovable

With assumptions available, tautologies can be derived from no premises whatever, and the case worth working through is the law of excluded middle, P¬P, since there is nothing to start from and no obvious first move.

#FormulaJustification
1¬(P¬P)assumption
2│ │ Passumption
3│ │ P¬P2, I
4│ │ 1, 3
5¬P2-4, ¬I
6P¬P5, I
71, 6
8¬¬(P¬P)1-7, ¬I
9P¬P8, ¬¬E

The despised disjunction introduction of the previous lesson does the work twice, at lines 3 and 6, which is what it is for. And line 9 is where the system commits itself: intuitionistic logic, developed by Brouwer and formalised by Heyting around 1930, keeps every other rule here and rejects double negation elimination, with the result that P¬P is not provable in it. That is not a fringe position, since it corresponds to demanding a construction rather than a mere absence of contradiction, and it is the logic underlying proof assistants. Classical logic, used throughout this course, accepts line 9.

Example. Derive (PQ)(PR) from P(QR).

Argue by cases on the premise. If P, then PQ and PR both follow by disjunction introduction, so the conjunction follows. If QR, then Q gives PQ and R gives PR, so the conjunction follows again. Both cases reach the same formula, so disjunction elimination delivers it. That is the distribution law of the fifth lesson, proved rather than tabulated, and the proof works for reasons a reader can follow, which the table never gave.

Now you. Show, in outline, how to derive ¬P¬Q from ¬(PQ).

Answer

Indirect proof. Assume ¬(¬P¬Q). Assume P: then assume Q, giving PQ and a contradiction with the premise, so ¬Q, so ¬P¬Q by I, contradicting the outer assumption. So ¬P, which gives ¬P¬Q again and contradicts the outer assumption once more. Therefore the outer assumption fails and ¬P¬Q follows by double negation elimination. The shape is the same as the excluded middle derivation, which is no accident: this half of De Morgan is not provable intuitionistically either.

Soundness and completeness

There are now two relations between premises and conclusion. Γφ says no valuation makes the premises true and the conclusion false. Γφ says a derivation exists. One is about tables, the other about writing lines on a page, and there is no reason in advance for them to agree.

They agree exactly, and the two halves have names.

Soundness: if Γφ then Γφ. Every derivable conclusion is genuinely entailed. The proof is an induction on the length of the derivation, and the work is the check already done for each rule as it was introduced: no rule takes you from true lines to a false one, so nothing false can be reached. Soundness is what makes a derivation worth anything, since without it the rules could prove nonsense.

Completeness: if Γφ then Γφ. Every valid argument has a derivation. This one is not obvious at all, since it says that a fixed handful of rules suffices for every valid argument in the language, including ones nobody has thought of. Emil Post established it for propositional logic in 1921, and Gödel proved the far harder version for predicate logic in 1929, which the eleventh lesson returns to.

Together they say and pick out the same pairs, so the semantic notion of validity and the syntactic notion of provability coincide. That licenses the practical habit of using whichever is easier: a countermodel to show invalidity, a derivation to show validity, and no worry that the two methods might disagree.

Propositional logic is therefore finished, and its limits are exact: sound, complete, and decidable by a table that is exponentially large. What it cannot do is see inside an atom. "All men are mortal, Socrates is a man, so Socrates is mortal" is three unrelated letters to it, and the most famous valid argument in the subject comes out invalid. Fixing that means breaking sentences open, and it is the next lesson.

Predicates and quantifiers

The most famous valid argument in the subject comes out invalid in the system built so far, and that is not a small defect.

"All men are mortal. Socrates is a man. Therefore Socrates is mortal." Propositional logic sees three sentences with no connective in any of them, so it assigns three unrelated letters and finds a valuation making the first two true and the third false. The verdict is invalid, and it is wrong. The failure is not in the rules of the previous lessons but in the language: the form that makes the argument work lies inside the sentences, where atoms have no parts to look at. This lesson opens them up, and the price is a much richer notation that will take the next four lessons to pay off.

Inside an atomic sentence

Split a simple sentence into what it is about and what it says. "Socrates is a man" mentions one individual and applies one property. Write individuals with lower-case letters near the start of the alphabet, called names or constants: s for Socrates, a for the alloy. Write properties with capital letters, called predicates: M for being a man, F for being mortal.

An atomic formula is a predicate followed by the right number of names, so "Socrates is a man" is Ms and "Socrates is mortal" is Fs. The number a predicate takes is fixed, and the choice of letter is arbitrary, though a mnemonic saves effort later.

Predicates of more than one place are what make the notation powerful, and they arrive in the next lesson: Lab for "a loves b", Gab for "a is greater than b". For now everything is one-place, which is enough for the syllogism and for most of the traps.

Note what has already changed. Propositional logic could see that "Socrates is a man" and "Plato is a man" were different sentences and nothing else; the notation now shows they share a predicate, and that shared structure is what an argument about all men can grab hold of.

Variables and the domain

To say something about every individual rather than a named one, a placeholder is needed. Variables are lower-case letters from the end of the alphabet, x, y, z, and Fx on its own is not a statement: it has no truth value until something fills x.

Filling it is what the quantifiers do. The universal quantifier x says the formula after it holds for every individual, and the existential quantifier x says it holds for at least one. So xFx says everything is mortal and xFx says something is.

Every quantified statement is implicitly about some collection, the domain of discourse, and the same formula changes truth value as the domain changes. xFx is false if the domain is all things and true if the domain is all people. Fixing the domain is part of stating the problem, and forgetting to fix it is a standard source of fake disagreements. When the domain is everything, restrictions must be written into the formula itself, which is what the next section is about.

"At least one" is the exact reading of . It does not mean exactly one, and it does not suggest that not all. xFx is true when everything is F, in the same way that PQ is true when both hold, and for the same reason: logic takes the weaker reading and makes you write the stronger one out.

The two translations

Nearly everything in this lesson rests on two patterns, and getting them the wrong way round is the single most common error in the subject.

All F are G is x(FxGx): take anything at all, and if it is F then it is G. Some F are G is x(FxGx): there is something that is both.

The connectives cannot be swapped, and it pays to see exactly what goes wrong. Writing x(FxGx) for "all ravens are black" claims that everything in the domain is a raven and black, which makes a claim about ravens into a claim about the universe. Writing x(FxGx) for "some ravens are black" is worse in a subtler way: a conditional is true whenever its antecedent is false, so if the domain contains a single non-raven the formula is true, whatever colour ravens are. Neither error changes the sentence slightly; both destroy it.

The reason for the asymmetry is that needs to let irrelevant things through, and the conditional does that by being vacuously true of them, while needs to pin down one thing that satisfies both conditions, and only a conjunction does that.

Example. Translate, with the domain being everything: "Every alloy containing nickel is magnetic" and "some alloys containing nickel are not magnetic".

With Ax for being an alloy containing nickel and Mx for being magnetic, the first is x(AxMx) and the second is x(Ax¬Mx). Note that the second is the exact denial of the first: it says there is a counterexample, which is precisely what refuting a universal claim requires, and austenitic stainless steels are that counterexample in the real world.

Now you. Translate "no reptile is warm-blooded" and "some reptiles are venomous".

Answer

With Rx for reptile, Wx for warm-blooded, Vx for venomous: the first is x(Rx¬Wx), which can equally be written ¬x(RxWx), and the second is x(RxVx). The two forms of the first say the same thing, and the next lesson gives the law that converts one into the other.

The four categorical forms

Aristotle worked with four sentence forms, and they are still the best drill for translation. They are labelled with vowels from the Latin affirmo and nego.

FormEnglishTranslation
AAll F are Gx(FxGx)
ENo F is Gx(Fx¬Gx)
ISome F is Gx(FxGx)
OSome F is not Gx(Fx¬Gx)

A and O are exact denials of each other, and so are E and I. That is the whole content of the traditional square of opposition, minus the parts that depend on the assumption discussed below. Recognising which of the four an English sentence is saying is most of the work of translating it, and the misleading English is worth watching: "all that glitters is not gold" is an E claim in intent and an A claim with a negation in form, and only context resolves it.

Now the syllogism. "All men are mortal. Socrates is a man. So Socrates is mortal" becomes x(MxFx), Ms, therefore Fs, and the validity is visible: the universal premise applies to Socrates in particular, giving MsFs, and modus ponens finishes it. The eleventh lesson makes that instantiation an official rule.

Existential import, and a count

Aristotle's system assumes that the terms in a syllogism are not empty: talk of ravens presupposes that ravens exist. Modern logic drops that assumption, so x(FxGx) comes out true when nothing is F at all. "Every unicorn in this room is on fire" is true, vacuously, in a room with no unicorns.

This is not a quibble, and the difference can be counted. A categorical syllogism has three terms and two premises, each premise and the conclusion being one of the four forms, arranged in one of four figures, which gives 4×4×4×4=256 possible forms. Under modern semantics, exactly 15 are valid. Under Aristotle's assumption that every term is non-empty, 24 are, the extra 9 being exactly those that draw a "some" conclusion from two universal premises.

The most useful of the nine is easy to see: from "all F are G" and "all G are H" it concludes "some F is H". If there are no Fs, both premises hold vacuously and the conclusion is false, so the inference needs the extra assumption. Modern logic makes you state it, writing xFx as an extra premise when the argument depends on it, which is the honest arrangement: the assumption is often true and it should be visible.

Example. Is "all trespassers will be prosecuted, and nobody has trespassed, therefore somebody will be prosecuted" valid?

No. The first premise is x(TxPx) and the second is ¬xTx. In a domain where nothing is a trespasser, the first premise is vacuously true, the second is true, and xPx can be false. The premises are consistent and the conclusion fails, which is exactly the situation Aristotle's assumption rules out by fiat and modern logic allows.

Now you. Under modern semantics, is "all F are G, all G are H, therefore some F is H" valid, and what single premise would make it so?

Answer

It is invalid: an empty F makes both premises vacuously true and the conclusion false. Adding xFx repairs it, since then some individual is F, and the two conditionals carry it through G to H.

Scope, free and bound

A quantifier governs a stretch of formula, its scope, marked by brackets exactly as in propositional logic. In x(FxGx) the scope is the whole conditional. In xFxGx it is Fx alone, and the x in Gx is left dangling.

An occurrence of a variable inside the scope of a quantifier using that variable is bound; one that is not is free. A formula with a free variable is not a statement and has no truth value, the way x>3 has none until x is fixed. A formula with no free variables is a sentence, and only sentences are true or false. Checking that a translation has no free variables is the fastest error check there is, and it catches the misplaced bracket above immediately.

Placing the negation is the other half of scope. ¬xFx says not everything is F; x¬Fx says everything fails to be F. The first is far weaker, and mixing them up turns "not all snakes are venomous" into "no snake is venomous". The rule that relates them is the subject of the next lesson.

Example. Translate "not every alloy containing nickel is magnetic" and say how it relates to the earlier translation.

It is ¬x(AxMx), the denial of the earlier A form. It is equivalent to x(Ax¬Mx), the O form, which is the useful shape because it says what to go and look for: one alloy, containing nickel, not magnetic.

Now you. Which of ¬x(RxVx) and x(Rx¬Vx) says "no reptile is venomous"?

Answer

The first. The second says some reptile is not venomous, which is far weaker and is compatible with many venomous ones. The pair is the E and O forms, and confusing them is the same error as confusing "none" with "not all".

What this buys and what it costs

The language now has names, predicates, variables, two quantifiers and the whole propositional apparatus on top. The syllogism is valid in it, the four categorical forms are expressible, and the empty-term assumption that Aristotle left implicit is now something you write down or leave out deliberately.

The cost arrives with the next lesson. As soon as predicates take two places, a formula can carry two quantifiers, and their order changes what is said: everyone loving someone is a different claim from someone being loved by everyone. English handles that ambiguity badly, mathematics depends on it completely, and the notation is about to make it exact.

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.

Models and countermodels

Quantified formulas have been called true and false for two lessons without anything saying what those words mean once a domain is involved.

For propositional logic the answer was a row of a table, and there were finitely many rows. Here there is no such list: a domain may hold any number of things, including infinitely many, and there are infinitely many domains to consider. So the truth table method is gone, and with it the guarantee that any question can be settled by grinding. What replaces it is the notion of a model, which makes truth precise, and the practice of building countermodels, which is how invalidity gets shown in practice.

What an interpretation supplies

An interpretation, also called a structure or a model, has three parts.

A domain: a non-empty set of objects the quantifiers range over. Non-empty is a stipulation rather than a discovery, made so that xFxxFx comes out valid, and it is worth knowing it is a convention that could have gone the other way.

An object for each name: the constant s picks out one member of the domain. Two names may pick out the same object, and an object may have no name at all.

An extension for each predicate: for a one-place predicate, the set of domain members it is true of; for a two-place one, the set of ordered pairs. The extension is all there is to a predicate. F does not mean "is a fish" in an interpretation; it just is a set, and calling it fishhood is a comment for the reader.

That is deliberately spare, and the spareness is the point. Logic is checking whether the conclusion follows under every way of filling those slots, so it must not care what the slots are filled with.

Truth in a model

With an interpretation fixed, every sentence gets a truth value by a recursion that runs through its structure.

An atomic sentence Fa is true when the object named by a is in the extension of F, and Rab is true when the pair of objects named sits in the extension of R. The connectives behave exactly as in the truth tables of the third lesson, so φψ is true when both parts are, and so on for the rest.

The quantifiers are the new part. xφ is true when φ holds of every member of the domain, and xφ is true when it holds of at least one, where "holds of an object" means the object is temporarily treated as the value of x. Over a finite domain this is a finite check, and over an infinite one it is a definition rather than a procedure: it says what truth is without saying how to establish it.

Take a domain of three people, {1,2,3}, with Lxy for "x likes y" whose extension is the pairs (1,2), (2,3) and (3,1), and Hx true of 1 and 2 only. Then x¬Hx is true, witnessed by 3. xyLxy is true, since each person likes one other. yxLxy is false, since being liked by everyone would need three incoming arrows and each person has exactly one. Nothing here required inspiration; each answer was read off the extensions.

Countermodels

The eighth lesson's definition of validity carries over word for word, with interpretations in place of rows: an argument is valid when no interpretation makes every premise true and the conclusion false. So to show an argument invalid, produce one such interpretation. It is called a countermodel, and it settles the question permanently, the way a single counterexample destroys a universal claim.

This is the workhorse skill of predicate logic, and it has a method rather than requiring inspiration.

Start with the smallest domain that could work, usually one or two objects. Write down what the conclusion being false requires. Write down what each premise being true requires. Fill in the extensions to satisfy all of it, adding objects only when forced. Then check every premise and the conclusion against the finished interpretation, because a countermodel that does not actually work is worse than none.

Example. Show that x(FxGx) and xGx do not entail xFx.

The conclusion is false when nothing is F, so try an empty extension for F. The first premise is then vacuously true, since no object has to pass the test. The second premise needs something in G. So take the domain {1}, the extension of F empty, the extension of G containing 1.

Check: x(FxGx) holds because F1 is false, making the conditional true. xGx holds because G1 is true. xFx fails because F is empty. One object settles it. Reading it in English: every fish is a mammal is true when there are no fish, something is a mammal is true, and nothing is a fish.

Now you. Show that x(FxGx) and x(HxGx) do not entail x(FxHx).

Answer

Take the domain {1}, with F and G both true of 1 and H empty. The first premise holds since G1 is true, the second holds vacuously since H is empty, and the conclusion fails since F1 is true and H1 is false. A one-object domain is enough, and the English version is that all cats are mammals and all dogs are mammals do not make all cats dogs.

Countermodels with relations

Relations need slightly larger domains, and the quantifier order of the previous lesson is where they are needed most.

Example. Show that xyRxy does not entail yxRxy.

The premise needs every object to relate to something; the conclusion must fail, so no single object may be related to by everything. Two objects suffice. Take the domain {1,2} with R holding of the pairs (1,2) and (2,1) and no others.

Check the premise: 1 relates to 2 and 2 relates to 1, so every object relates to something. Check the conclusion: for it to hold, some object must be related to by both. Object 1 qualifies only if R11 and R21 both hold, and R11 is absent; object 2 qualifies only if R12 and R22 hold, and R22 is absent. So the conclusion is false and the argument is refuted. In English, everyone has a friend does not give that someone is everyone's friend.

Now you. Show that a transitive relation need not be reflexive, by giving a model of xyz((RxyRyz)Rxz) in which xRxx fails.

Answer

Take the domain {1,2} with R empty. Transitivity holds vacuously, since no pair is in R at all, and R11 fails. If an empty relation feels like a cheat, use {1,2} with R holding only of (1,2): transitivity still holds because no chain of two steps exists, and R11 still fails. Both are legitimate, and the empty one is quicker.

How big must a countermodel be

Small, usually. Many invalid arguments are refuted by one object, most of the rest by two or three, and a good rule is to try each size in turn rather than starting with something elaborate.

The number of interpretations to check at each size is finite and grows fast: with a domain of n objects, a one-place predicate has 2n possible extensions and a two-place one has 2n2, so a two-object domain with one binary relation already offers 16 choices and a three-object domain offers 512. That is why the guided method beats enumeration.

There is an honest limit. Not every satisfiable formula has a finite model. Take the conjunction of three sentences: x¬Rxx, saying nothing relates to itself; xyz((RxyRyz)Rxz), transitivity; and xyRxy, saying everything relates to something. The positive integers with Rxy as x<y satisfy all three. No finite domain can: brute force over all relations on domains of one, two, three and four objects finds zero models, and the reason generalises, since starting anywhere and following the relation gives an endless chain of distinct objects, distinct because a repeat would make something related to itself by transitivity.

So searching for countermodels is not a decision procedure. It is a method that usually works quickly and can fail to terminate, and the theory says that this cannot be repaired.

What cannot be done

Propositional logic was decidable: the table always finished. First-order logic is not. Alonzo Church and Alan Turing showed independently in 1936 that no algorithm decides whether an arbitrary first-order formula is valid, which settled Hilbert's Entscheidungsproblem in the negative and, in Turing's case, produced the machine model of computation on the way to the answer.

What survives is weaker and still useful. Validity is semi-decidable: the derivations can be enumerated mechanically, so a search that tries all of them will find a proof if one exists. If the formula is valid you eventually get a proof; if it is not, the search may run for ever, and no signal tells you which situation you are in. That asymmetry is exactly what makes automated theorem provers behave the way they do.

There is one important special case. Monadic first-order logic, with only one-place predicates and no relations, is decidable, and the categorical syllogisms of the eighth lesson live inside it, which is why the count of valid forms could be computed by exhausting a finite list of possibilities. Adding a single two-place predicate loses the property.

Example. Why is producing a countermodel a complete method for showing invalidity but not for showing validity?

Because invalidity is an existential claim and validity is a universal one. One interpretation with true premises and a false conclusion establishes invalidity outright, and no amount of failing to find one establishes validity, since the interpretations are unbounded in size and number. Establishing validity therefore needs a proof about all interpretations at once, which is what a derivation supplies.

Now you. An argument survives your search through every domain of one, two and three objects. What have you established?

Answer

Nothing decisive, only that any countermodel needs four objects or more, or that none exists. The search is evidence and not proof, and the correct next move is to try to derive the conclusion instead.

Where this leaves things

Truth in a model is now defined, invalidity has a practical test, and the limits of that test are known: countermodels are usually small, sometimes impossible, and searching for one never certifies validity.

That last gap is what the next lesson fills. Derivation was the answer for propositional logic when tables became unwieldy, and it is the answer here for a stronger reason, since the semantic method has stopped being a procedure at all. Four rules for the quantifiers turn out to be enough, and two of them need restrictions that look fussy until you see what happens without them.

Proof with quantifiers

Searching for a countermodel can establish that an argument fails and can never establish that it succeeds, so predicate logic needs derivations even more than propositional logic did.

The previous lesson closed with the reason: the semantic method is no longer a procedure, since domains are unbounded and no algorithm decides validity. Derivation still works. The system of the sixth and seventh lessons carries over unchanged, and four rules are added, one to introduce and one to eliminate each quantifier. Two of the four are as simple as anything in the subject. The other two carry restrictions, and this lesson spends most of its length on those restrictions, because without them the system proves that everything is everything.

Universal elimination

Universal elimination (E): from xφ, write φ with any name substituted for x throughout.

If everything is mortal then Socrates is, and so is the alloy, and so is anything else you can name. The rule is sound because the premise says the formula holds of every object in the domain, and a name picks out one of them. There is no restriction: the name may be new or already in use, and it may be one that occurs in the premises, since instantiating a universal claim to something you already know about is exactly what the claim licenses.

Existential introduction

Existential introduction (I): from a formula containing a name, write the existential formula got by replacing that name with a variable and binding it.

If Socrates is mortal then something is. Soundness is immediate: the named object is a witness. Note that the rule may replace some or all occurrences of the name, so from Laa, "a loves a", you may infer xLxx, that someone loves themselves, or xLxa, that someone loves a, and the two are different claims.

Those two rules alone settle the argument that broke propositional logic.

#FormulaJustification
1x(MxFx)premise
2Mspremise
3MsFs1, E
4Fs3, 2, E

Four lines for the mortality of Socrates, which propositional logic could not do at all.

Universal introduction, and its restriction

To prove that everything is F, prove it of an arbitrary object.

Universal introduction (I): from φ containing a name a, write xφ with x replacing a, provided a appears in no premise and in no assumption still open.

The proviso is the whole rule. It makes a genuinely arbitrary: nothing anywhere in the proof said anything special about it, so whatever was shown of it could have been shown of any object, and the generalisation is safe. This is exactly what a mathematician means by "let n be an arbitrary integer", and the restriction is the formal version of the discipline of not smuggling in extra assumptions about n.

Drop the proviso and the system collapses. From the premise Fa, meaning that this particular alloy is magnetic, I would give xFx, that everything is magnetic. The name a occurs in a premise, so it is not arbitrary, and the restriction blocks exactly this.

Now the syllogism in full generality: from "all M are F" and "all S are M", derive "all S are F".

#FormulaJustification
1x(MxFx)premise
2x(SxMx)premise
3Saassumption
4SaMa2, E
5Ma4, 3, E
6MaFa1, E
7Fa6, 5, E
8SaFa3-7, I
9x(SxFx)8, I

Line 9 is legal because by then the assumption introducing a has been discharged: a occurs in no premise and in no open assumption. Applying I at line 7 instead would have been illegal, since the assumption at line 3 was still in force and it did say something special about a, namely that it was S. That is the single most common error in quantifier proofs, and the timing is the whole of it.

Example. Derive x(FxHx) from x(FxGx) and x(GxHx).

#FormulaJustification
1x(FxGx)premise
2x(GxHx)premise
3Faassumption
4FaGa1, E
5Ga4, 3, E
6GaHa2, E
7Ha6, 5, E
8FaHa3-7, I
9x(FxHx)8, I

The shape is identical to the syllogism, which is the point: one derivation covers every argument of that form.

Now you. Derive xGx from x(FxGx).

Answer
#FormulaJustification
1x(FxGx)premise
2FaGa1, E
3Ga2, E
4xGx3, I

Line 4 is legal because a was introduced by E from a premise that does not itself contain a, so nothing special was ever said about it.

Existential elimination, and its restriction

Knowing that something is F does not tell you which thing, so the rule cannot simply hand over a name. It works like argument by cases with a single case.

Existential elimination (E): given xφ, open a subproof assuming φ with a fresh name substituted for x, derive some conclusion ψ, and close it, writing ψ. The fresh name must not occur in any premise, in any earlier line still available, or in ψ itself.

The name is a temporary label for whatever the witness is, in the way a mathematician writes "let n be such an integer" and then never assumes anything further about it. The requirement that ψ not contain the name is what stops the label from escaping into a conclusion where it would look like a real reference.

Here is what the restriction prevents. Suppose "something is odd", xOx, and "something is even", xEx. Taking a name from each with the same letter a gives Oa and Ea, then OaEa, then x(OxEx): something is both odd and even. Freshness fails at the second step, since a already occurred, and that single requirement is all that stands between the system and arithmetic nonsense.

The other half of the restriction blocks a subtler leak. If the conclusion of the subproof were allowed to contain the fresh name, then from xFx one could assume Fb, conclude Fb, and export it, ending with a claim about a particular object that was never given.

Example. Derive x(SxPx) from x(MxPx) and x(SxMx). This is the syllogism Darii.

#FormulaJustification
1x(MxPx)premise
2x(SxMx)premise
3SbMbassumption, b fresh
4Sb3, E
5Mb3, E
6MbPb1, E
7Pb6, 5, E
8SbPb4, 7, I
9x(SxPx)8, I
10x(SxPx)2, 3-9, E

Line 9 is the crucial one. The existential is introduced inside the subproof, which removes the name b before the subproof closes, so line 10 satisfies the requirement that the conclusion be free of the fresh name. Almost every E proof ends this way.

Now you. Derive xGx from xFx and x(FxGx).

Answer
#FormulaJustification
1xFxpremise
2x(FxGx)premise
3Fbassumption, b fresh
4FbGb2, E
5Gb4, 3, E
6xGx5, I
7xGx1, 3-6, E

Both restrictions at once

The instructive proof is the one from the previous lesson's quantifier ordering, since it uses all four rules and both restrictions.

From yxRxy, derive xyRxy.

#FormulaJustification
1yxRxypremise
2xRxbassumption, b fresh
3Rab2, E
4yRay3, I
5yRay1, 2-4, E
6xyRxy5, I

Line 5 is legal because yRay contains a but not the fresh name b. Line 6 is legal because a occurs in no premise and in no open assumption, having been introduced only by an instantiation.

Now try the converse, which the previous lesson refuted with a two-object countermodel, and watch the rules refuse. From xyRxy you may instantiate to yRay, then assume Rab with b fresh. To reach xRxb you would need I on a, but you are inside a subproof whose assumption Rab contains a, so a is not arbitrary and the rule is blocked. The proof cannot be completed, which is what soundness guarantees: the rules never prove something a countermodel refutes.

Example. What is wrong with this derivation of xFx from xFx: line 1 the premise, line 2 Fa from line 1 by E, line 3 xFx from line 2 by I?

Two things, and either alone is fatal. Line 2 misuses E, which does not simply produce a line with a name in it; it requires a subproof whose conclusion is free of the fresh name. And line 3 misuses I, since a was introduced by an assumption still in force and so is not arbitrary. The result, that something being F makes everything F, is the standard demonstration of why both restrictions exist.

Now you. From xFx and xGx, is x(FxGx) derivable? If not, give a countermodel.

Answer

Not derivable, and it is invalid. Take the domain {1,2} with F true of 1 only and G true of 2 only. Both premises hold and the conclusion fails. Any attempted derivation must take a witness for each premise, and the freshness requirement forces two different names, which then cannot be conjoined into one claim.

Strategy

Quantifier proofs have a standard order of operations, and following it turns most exercises into bookkeeping.

Strip the quantifiers off the premises first. Universals come off by E, and the name to instantiate to should be chosen by looking at the conclusion, since instantiating to the wrong name is the usual reason a proof stalls. Existentials come off by opening an E subproof at once, with a name used nowhere else.

Then look at the conclusion and plan backwards. A universal conclusion means the proof will end with I, so aim at the matrix with an arbitrary name and check at the end that the name really was arbitrary. An existential conclusion means it will end with I, so aim at the matrix with any name you can get. A negated quantifier should be pushed inward with the laws of the ninth lesson before anything else, since ¬ is unusable and the ¬ it equals is not.

What the system is worth

The four rules, added to the propositional system of the seventh lesson, give a complete proof system for first-order logic. Gödel proved this in his doctoral dissertation of 1929, published in 1930: every valid first-order argument has a derivation. Soundness holds too, and by the same style of argument as before, checking each rule against the definition of truth in a model.

Completeness and undecidability sit side by side without conflict, and the combination is worth stating precisely because it is easy to garble. Every valid formula has a proof, and the proofs can be enumerated by machine, so a search will eventually find one if it exists. What no algorithm can do is tell you in advance, or after any finite time, whether the search is going to succeed. Validity is provable when it holds and not detectable when it fails.

One thing is still missing from the language, and it shows up in counting. Nothing so far can say that there are at least two things of some kind: xFxyFy is satisfied by a single object named twice, because two variables may take the same value. Saying that two objects are different needs a predicate the notation does not yet have, and that is the next lesson.

Identity, number and descriptions

Nothing in the language so far can say that there are two of something, and the reason is a detail about variables that is easy to miss.

xFxyFy looks as though it asserts two Fs and does not. Two variables may take the same value, so a domain containing a single object satisfies it. Counting, superlatives, "only", and the word "the" all turn out to need one further predicate, and adding it completes the language that mathematics and most careful writing actually use.

The identity predicate

Add a two-place predicate written x=y, with xy as shorthand for ¬x=y. Unlike every other predicate, its extension is not free to vary: in every interpretation, a=b is true exactly when a and b name the same object in the domain. That is what makes it a logical symbol rather than a piece of vocabulary.

Two rules govern it in derivations. Identity introduction: a=a may be written on any line, with no premises, since every object is itself. Identity elimination, also called Leibniz's law: from a=b and any formula containing a, write the formula with b substituted for some or all occurrences of a. If Hesperus is Phosphorus, whatever is true of one is true of the other.

The word "same" is doing exact work here and is worth separating from ordinary use. Two cars off the same production line are "the same" colloquially and are two objects, so ab. Identity in logic means one object with two names, which is why identity statements can be informative: "Hesperus is Phosphorus" told astronomers that the morning star and the evening star are one planet, Venus, and Frege built his 1892 theory of sense and reference on exactly that puzzle.

Counting

With identity, number becomes expressible, one quantity at a time.

At least two Fs: xy(FxFyxy). The final clause is the entire content, since without it the formula says only that something is F.

At most one F: xy((FxFy)x=y). Any two Fs turn out to be the same one. Note this is true when there are no Fs at all, which is correct: at most one includes none.

Exactly one F: the conjunction of "at least one" and "at most one", or more compactly

x(Fxy(Fyy=x))

which says something is F and everything that is F is that thing. This is used often enough to have its own abbreviation, !xFx.

Exactly two Fs: xy(FxFyxyz(Fz(z=xz=y))). The pattern is clear and so is its cost: each further number needs a longer formula, and "exactly ten" is unpleasant to write. The language can express every particular finite number and has no way to talk about number in general, which is what arithmetic is for.

Example. Translate "Mars has exactly two moons".

With the domain everything and Mx for being a moon of Mars,

xy(MxMyxyz(Mz(z=xz=y)))

The claim is true: Phobos and Deimos, both found by Asaph Hall in August 1877, are the only two. Notice how the last clause does all the closing off. Without it the formula would say at least two, which Jupiter and its dozens of moons would satisfy just as well.

Now you. Translate "there is at most one solution", using Sx for being a solution.

Answer
xy((SxSy)x=y)

It is true when there is no solution, which is what "at most" should mean. To rule that out as well you would conjoin xSx, giving exactly one.

Only, and superlatives

Identity is also what turns exclusivity into a formula. "Only Socrates is wise" says Socrates is wise and nothing else is: Wsx(Wxx=s). The second conjunct is the same closing-off move as in "exactly one", with a name in place of the variable.

"Everyone except Ann passed" needs both directions: x(xaPx)¬Pa. Leaving off the second conjunct is the usual error, and it loses the part of the English that people actually care about.

Superlatives are comparisons closed off with identity. "Socrates is the wisest" is x(xsWsx), taking Wxy as "x is wiser than y": wiser than everything other than himself. The exception clause is needed because nothing is wiser than itself, and a formula reading xWsx would be false for that reason alone.

Russell on "the"

Definite descriptions are the classic application, and the analysis is due to Bertrand Russell, in "On Denoting", published in Mind in 1905.

The puzzle: "the present King of France is bald" appears to be about somebody, and France has had no king since 1848. If the phrase names nothing, the sentence should be neither true nor false, which breaks the assumption that every sentence has a truth value. If it is false, then its negation, "the present King of France is not bald", should be true, and that seems just as bad.

Russell's move was to deny that "the King of France" is a name at all. The sentence is a quantified claim with three parts: something is King of France, at most one thing is, and that thing is bald.

x(Kxy(Kyy=x)Bx)

Now the sentence is simply false, because its first conjunct is, and no gap in the truth values opens. Nothing has gone missing: the existence claim that the English quietly carries has been written out where it can be inspected.

The negation puzzle dissolves into a scope distinction the notation makes visible. Putting the negation inside gives x(Kxy(Kyy=x)¬Bx), which says there is such a king and he is not bald, and is false. Putting it outside gives ¬x(KxBx), which says it is not the case that there is a unique bald king, and is true. English writes both as "the present King of France is not bald" and the formulas cannot be confused, which is the clearest example in the subject of formalisation resolving an ambiguity rather than merely recording one.

Example. Translate "the author of Waverley was Scottish", and say what makes it true or false.

With Ax for being an author of Waverley and Sx for Scottish,

x(Axy(Ayy=x)Sx)

It is true, since exactly one person wrote Waverley, Walter Scott, who published it anonymously in 1814, and he was Scottish. Had the novel been written by two people in collaboration, the second conjunct would fail and the sentence would come out false rather than half true, which is Russell's analysis behaving as designed.

Now you. Translate "only Ann and Ben passed", using Px and the names a and b.

Answer
PaPbx(Px(x=ax=b))

The first two conjuncts say they passed and the third closes off the list. Whether ab needs stating depends on the reading; the English clearly implies it, so a careful translation adds it.

What identity does not fix

First-order logic with identity is the standard language of mathematics, and it has a definite ceiling that is worth knowing rather than discovering later.

It can say "there are exactly seven Fs" for any particular number, with a formula that grows with the number. It cannot say "there are finitely many Fs". That is not a failure of ingenuity: it follows from the compactness theorem, which says that if every finite subset of a set of sentences has a model then the whole set does. Suppose some sentence were true in exactly the finite domains. Add to it the sentences "there are at least two things", "there are at least three things", and so on. Every finite subset of that collection is satisfiable, by a domain big enough for the largest one mentioned, so compactness says the whole infinite collection has a model, and that model is infinite while satisfying a sentence supposed to be true only in finite domains. The assumption fails, so no such sentence exists.

The same argument shows that first-order logic cannot pin down the natural numbers uniquely: any first-order theory of arithmetic with an infinite model has models of every infinite size, by the Löwenheim-Skolem theorems. These are limits on the language rather than on the proof rules, and they are the reason mathematicians reach for second-order formulations when they want to characterise a structure exactly, at the cost of losing completeness.

Example. Why can "there are exactly three Fs" be written but not "there are finitely many Fs"?

Because the first is a single claim about a fixed number and can be written out in full with three existentials and a closing clause, while the second is an infinite disjunction, "exactly none or exactly one or exactly two, and so on", and a formula must be finite. The compactness argument above shows that no finite formula can do the same work by a cleverer route.

Now you. A theory says the domain has at least n members, for every n. Can it have a finite model?

Answer

No. A domain of k members falsifies the sentence demanding at least k+1, so no finite domain satisfies them all. Every finite subset of the theory does have a model, which is exactly the situation compactness is about: it guarantees an infinite model exists, and it is the step used in the argument above.

Where the machinery ends

The language is now complete for the purposes of this course: connectives, quantifiers, relations, identity, and a proof system that is sound and complete for all of it.

What has not yet been shown is the machinery doing the job it was built for. Mathematicians do not write derivations in this notation; they write proofs in English, using a handful of recurring strategies. Every one of those strategies is an instance of a rule established in the last six lessons, and seeing that correspondence is what makes the formal work pay. That is the next lesson.

Proof technique

Mathematicians do not write derivations in the notation of the previous lessons, and they are not being sloppy.

A published proof is written in English, with symbols where they help, and it leaves out every step a competent reader can supply. What makes it a proof rather than a persuasive essay is that each of its moves corresponds to a rule already established here, so the gaps are known to be fillable. This lesson goes through the standard techniques and names the rule behind each, which is the point where the machinery starts paying for itself. It closes with induction, which is the exception: a technique that is indispensable and is not a rule of logic.

Direct proof

The plainest structure assumes the hypothesis and reasons to the conclusion. Formally it is conditional proof from the seventh lesson: assume the antecedent, derive the consequent, discharge.

Claim: the sum of two odd integers is even. An odd integer is by definition 2k+1 for some integer k, so take 2k+1 and 2m+1. Their sum is 2k+2m+2=2(k+m+1), and k+m+1 is an integer, so the sum is even.

Three features are worth naming because they recur. The proof began by replacing the word "odd" with its definition, which is the only move that ever gets a proof started. It used letters for arbitrary integers, so the conclusion generalises by universal introduction, and the restriction from the eleventh lesson is satisfied because nothing was assumed about k or m. And it ended by checking that the result matched the definition of the target property, which is the step careless proofs omit.

Contraposition

Some claims resist a frontal attack. To show that if n2 is even then n is even, the hypothesis n2=2k gives nothing to factor.

Prove the contrapositive instead. By the fifth lesson, PQ and ¬Q¬P are equivalent, so proving one proves the other, and the swap is licensed by substitution rather than by taste. So assume n is odd: n=2k+1 gives n2=4k2+4k+1=2(2k2+2k)+1, which is odd. Done, and the direct version was never attempted.

The technique is worth reaching for whenever the hypothesis is an existence-free negative claim or the conclusion is a negation, since those are the shapes that leave nothing to manipulate. And it must be kept apart from proving the converse, QP, which is a different statement and proves nothing about the original.

Example. Prove that if mn is odd then both m and n are odd.

The conclusion is a conjunction, so its negation is a disjunction and a direct attack would need cases. Contraposition is cleaner: assume not both are odd, so at least one is even, say m=2k. Then mn=2kn, which is even. That establishes the contrapositive and therefore the claim. Note the use of De Morgan to turn "not both odd" into "at least one even", which is the fifth lesson's law doing quiet work in an ordinary sentence.

Now you. Prove that if n3 is even then n is even.

Answer

Contrapositive: assume n is odd, so n=2k+1. Then n3=(2k+1)3=8k3+12k2+6k+1=2(4k3+6k2+3k)+1, which is odd. So an even n3 forces an even n.

Contradiction

Proof by contradiction assumes the negation of the target and derives an impossibility, which is negation introduction followed by double negation elimination. It is the technique that most needs the classical rule of the seventh lesson, and it is why intuitionists restrict it.

Claim: log23 is irrational. Suppose it were rational, so log23=p/q with p and q positive integers. Then 2p/q=3, and raising both sides to the power q gives

2p=3q

The left side is even, since p1. The right side is odd, since a product of odd numbers is odd. An integer cannot be both, so the assumption fails and log23 is irrational. The whole proof is four lines, and the only fact it needs is that 2 and 3 have different parities.

Two cautions. First, a proof by contradiction should end at a genuine contradiction, a formula and its negation, not at something merely surprising. Second, contradiction is often used where a direct proof exists and is clearer: if the assumed negation is never really used, the proof is direct with a wrapper around it, and removing the wrapper improves it.

Cases

Argument by cases is disjunction elimination: establish a disjunction that covers all possibilities, then derive the conclusion from each disjunct.

Claim: n2+n is even for every integer n. Either n is even or it is odd, which is an instance of excluded middle and exhausts the possibilities. If n=2k, then n2+n=4k2+2k=2(2k2+k), even. If n=2k+1, then n2+n=(4k2+4k+1)+(2k+1)=4k2+6k+2=2(2k2+3k+1), even. Both cases give the same conclusion, so it holds.

The discipline is that the cases must be exhaustive, and that failing to check one is the standard error. They need not be exclusive: overlapping cases are fine, since the rule asks only that each disjunct yield the conclusion.

Example. Prove that n2+n is even without cases, and say which is better.

Factor it: n2+n=n(n+1), a product of consecutive integers, one of which must be even, so the product is even. This is shorter and it explains why the result holds, while the case proof only verifies that it does. When both are available, prefer the one that exhibits the reason.

Now you. Prove that for every integer n, n3-n is divisible by 3, using cases on the remainder of n on division by 3.

Answer

Every integer is 3k, 3k+1 or 3k+2. Factor first: n3-n=(n-1)n(n+1), three consecutive integers. If n=3k the middle factor is divisible by 3; if n=3k+1 then n-1=3k is; if n=3k+2 then n+1=3k+3 is. In every case one factor carries the 3, so the product does.

Existence, uniqueness and counterexample

An existence proof is existential introduction: produce an object and verify it. Such proofs come in two kinds, and the difference matters. A constructive proof exhibits the thing; a non-constructive one shows that it must exist without producing it.

The standard illustration: are there irrational numbers a and b with ab rational? Consider 22. Either it is rational, in which case a=b=2 works, or it is irrational, in which case take a=22 and b=2, giving ab=22=2, which is rational. Either way such a pair exists, and the proof does not say which case holds. It runs on excluded middle, and an intuitionist rejects it for exactly that reason.

A uniqueness proof is the second half of the twelfth lesson's "exactly one": assume two objects both have the property and show they are identical. Existence and uniqueness are separate obligations and a proof owing both must discharge both.

A counterexample refutes a universal claim, and the ninth lesson's negation law says why one is enough: ¬xφ is x¬φ, so refuting "all" requires producing exactly one. A nineteenth-century conjecture held that every odd composite number is a prime plus twice a square. It holds for 9, for 15, for 21 and for every odd composite up to 5775. It fails at 5777, and again at 5993, and at no other number below 12,000. One number ends the conjecture, and no amount of prior agreement rescues it.

Induction, and why it is not a rule of logic

Mathematical induction proves S(n) for every natural number by proving S(0) and proving S(n)S(n+1) for arbitrary n. The second part is conditional proof and the first is a single check, so both halves are familiar. What is not familiar is the step from those two to the universal conclusion.

That step is not licensed by any rule in this course. From S(0) and n(S(n)S(n+1)), the rules of the eleventh lesson give S(1), then S(2), then S(3), one at a time and never all of them, because a derivation is finite. The universal conclusion needs an extra principle, and in the standard treatment it is an axiom: the induction schema of Peano arithmetic, one axiom for each formula S, asserting exactly that the two halves give the universal claim.

So induction is a truth about the natural numbers rather than a truth of logic. It holds because the natural numbers are generated by starting at zero and adding one, with nothing else in there, and a structure without that property does not support it. Recognising this is what stops induction from looking circular: it is not being derived, it is being assumed, and assuming it is what fixes which structure is being talked about.

The eleventh lesson's completeness theorem still applies to the logic, so anything that genuinely follows from the Peano axioms has a derivation. What Gödel showed in 1931 is that the axioms do not settle everything: any consistent system strong enough for arithmetic leaves true statements about the natural numbers unprovable within it. That is a limit on axiom systems, not on the proof rules, and the last lesson returns to it.

Example. Prove by induction that the sum of the first n positive integers is n(n+1)/2.

Base case: for n=1 the sum is 1 and 1×2/2=1. Inductive step: assume the sum to n is n(n+1)/2. Then the sum to n+1 is n(n+1)/2+(n+1)=(n+1)(n+2)/2, which is the formula with n+1 in place of n. Both parts hold, so the formula holds for every n. Note the assumption in the step is about one particular n, not about all of them, and confusing those two is what makes induction look like question-begging.

Now you. Where exactly does a proof by induction use conditional proof, and where does it use the extra axiom?

Answer

Conditional proof appears in the inductive step, where S(n) is assumed and S(n+1) derived, then discharged into S(n)S(n+1), which is then generalised. The extra axiom is used at the very end, to pass from the base case and the universally quantified conditional to nS(n), and no rule of first-order logic licenses that step.

What a finished proof owes the reader

A proof is complete when every step is one a reader could expand into the rules of this course, and that is a lower standard than writing them out and a much higher one than sounding convincing.

Three checks catch most failures. Every term used has been defined or is standard. Every case has been covered, and the cases exhaust the possibilities. Every quantifier the proof generalises over was genuinely arbitrary, which is the eleventh lesson's restriction and the source of the classic error of proving something about "an arbitrary n" after assuming n was prime.

That is the whole of the formal apparatus, applied. What remains is the harder question the subject has been postponing since the first lesson: whether an argument that passes every test here is therefore a good argument. It is not, and the reasons are worth a lesson.

Validity against truth

Thirteen lessons have built a test that an argument either passes or fails, and passing it is worth much less than it looks.

The first lesson separated validity from truth and promised to come back to the separation. Here it is. A valid argument guarantees only that truth is transmitted, so from false premises it guarantees nothing at all, and the machinery has no opinion whatever about premises. Worse, the step from English into the notation is a judgement that no procedure makes, and most real disputes are decided there. This lesson is about the boundary of the subject: what the tools cannot do, what fails outside their reach, and what the training is nevertheless for.

Formalisation is a judgement

Every method in this course starts from a formula, and nothing in the course produces one. Turning "the contract is void if either party lacked capacity" into a formula required deciding that void is the negation of valid, that "either party lacked capacity" is one predicate rather than two, and that the "if" is material. Each decision is defensible and each could go differently, and the verdict on the argument can turn on any of them.

This is not a gap waiting to be filled by better software. English carries tense, causation, modality, presupposition, and speaker intention, and the notation has none of those. When "she resigned because the audit failed" becomes a conjunction, the causal claim, which was the whole point of the sentence, is simply gone. A formal argument can therefore come out valid while the English it was drawn from is worthless, and the fault lies in the translation, where no rule was broken because there are no rules.

The practical consequence is that formalising is where the care belongs. Fixing the atoms, choosing a domain, deciding whether "or" is exclusive and whether "all" carries existential import: those choices should be written down and defended, since anything hidden there cannot be caught later.

Equivocation, and what a formula exposes

The classic failure of translation is equivocation: the same word doing two jobs, so a single letter stands for two claims.

Nothing is better than eternal happiness. A ham sandwich is better than nothing. Therefore a ham sandwich is better than eternal happiness. The argument looks like a chain of comparisons and the conclusion is absurd, and the notation says exactly where the fault is. The first premise is a quantified claim: ¬xBxe, nothing at all is better than eternal happiness. The second treats "nothing" as though it were a name, Bhn, when what it actually says is that having a sandwich beats having nothing, a comparison between two options rather than a claim about every object. So the two premises never share a term, no chain exists, and the argument cannot be written down in any way that makes it look valid.

That is the most useful thing formalisation does. It does not merely test arguments; it forces a shared vocabulary onto them, and a great many bad arguments cannot survive being written out with their terms fixed.

Example. "The law says all men are equal. Sarah is not a man. So the law does not apply to her." Where does it fail?

On equivocation. "Man" in the first premise means human being, and in the second it means male, so a single predicate letter cannot serve both without misrepresenting one of them. Write Hx for human and Mx for male, and the premises become x(HxEx) and ¬Ms, which share no term and yield nothing. Formalising with two letters instead of one both diagnoses the error and shows that the argument has no valid reading.

Now you. "A feather is light. What is light cannot be dark. So a feather cannot be dark." Where does it fail?

Answer

The same way: "light" means low in weight in the first premise and bright in the second. Two predicates are needed, Lx for lightweight and Bx for bright, and with them the premises are La and x(Bx¬Dx), which do not connect. There is no valid argument here to salvage.

Valid and worthless

Two ways for a valid argument to be useless are worth separating.

The first is unsoundness: a false premise. "All metals conduct, graphite is a metal, so graphite conducts" was valid in the first lesson and rested on a false premise, and its conclusion happens to be true, which is luck rather than proof. Nothing in this course examines premises, so validity is a certificate about the connection and never about the content.

The second is circularity. Begging the question assumes what it sets out to prove, and the striking fact is that such an argument is valid: PP is derivable in one line, and any argument with its conclusion among its premises passes every test in this course. Yet nobody is persuaded by "capital punishment is wrong because it is immoral to execute people", and rightly so. What is wrong with it is not logical but dialectical: an argument is meant to move someone from premises they accept to a conclusion they do not, and a circular one has nothing to move with. Validity was never a measure of persuasive force, and this is the sharpest demonstration of the gap.

Both failures point the same way. Once an argument is valid, all the remaining work is on its premises, and that work belongs to whatever field the premises are about.

Example. "Every drug that passed a randomised trial is safe. This drug passed a randomised trial. So it is safe." Where should an objection go?

Not at the form, which is the syllogism of the eleventh lesson and impeccable. The first premise is false as stated, since trials are powered to detect common harms and routinely miss rare ones, which is why withdrawals happen after approval. An objection aimed at the reasoning would be answered by writing out the derivation; an objection aimed at the premise cannot be, and it is the one that wins.

Now you. "If the policy worked, unemployment would have fallen. Unemployment fell. So the policy worked." Where should an objection go?

Answer

At the form. This is affirming the consequent, and it stays invalid however true the premises are, since unemployment falls for many reasons. Here the right move is the parallel-form refutation of the first lesson rather than a dispute about the figures, and noticing which of the two situations you are in is the practical payoff of the whole subject.

Fallacies that have no form

The two fallacies named in the first lesson, affirming the consequent and denying the antecedent, are formal: they are bad shapes, and the shape is enough to condemn any instance. Most fallacies people actually meet are not like that.

Ad hominem attacks the arguer rather than the argument. Straw man refutes a weakened version of the opponent's claim. False dilemma presents two options as exhaustive when they are not, which is a claim about the world rather than a mistake in reasoning about the disjunction. Appeal to authority cites someone whose expertise does not cover the claim. Slippery slope asserts a chain of consequences without supporting the links.

Each of these can be written as a valid argument with a suppressed premise, and that is the useful way to see them. A false dilemma is a perfectly good disjunctive syllogism whose disjunctive premise is false. A slippery slope is a chain of conditionals, valid by hypothetical syllogism, with unsupported links. An appeal to authority is a valid modus ponens whose conditional premise, that this person's endorsement makes it true, is what needs defending. The label names which premise to attack, and calling something a fallacy without saying which premise fails is empty.

Example. "Either we cut the budget or the department closes. We will not cut the budget. So the department closes." Is this valid, and is it good?

Valid: it is disjunctive syllogism. Whether it is good depends entirely on the first premise, and the phrasing invites a false dilemma, since raising revenue, merging departments and deferring the decision are all missing. Attacking the reasoning would be a waste of effort; the argument's whole weight is on a premise that has been asserted rather than shown.

Now you. "Every economist who has looked at this says the policy will work, so it will work." Reconstruct it as a valid argument and say which premise carries the risk.

Answer

Suppressed premise: if every economist who has examined a policy says it will work, it will work. With that, the argument is modus ponens and valid. The suppressed conditional is where the risk sits, since it ignores selection in who examined it and the record of expert consensus in that field. The reconstruction turns a vague appeal to authority into a specific claim that can be argued about.

Reconstructing real arguments

Almost no real argument states all its premises. An argument with a suppressed premise is an enthymeme, and reconstructing one is a routine part of using logic outside a textbook.

The rule is charity: supply the premise that makes the argument valid and is most plausible, rather than the one easiest to demolish. "Socrates is a man, so he is mortal" needs "all men are mortal", not "everything named Socrates is mortal", and reading it the second way would be a cheap victory over nobody.

Charity has a limit, though, and it is where the technique earns its keep. If the only premise that makes an argument valid is one nobody would accept once it is stated, the reconstruction has not been unfair; it has exposed what the argument was relying on while it stayed unstated. That is the whole value of writing suppressed premises down.

The limits inside logic itself

Even where the tools apply cleanly, three results mark the boundary, and all three are from the twentieth century.

First-order validity is undecidable, by Church and Turing in 1936. There is no procedure that answers every question of the form "is this valid", though proofs of valid arguments can always be found eventually.

Arithmetic is incomplete, by Gödel in 1931. Any consistent, effectively axiomatised system strong enough to express arithmetic contains true statements about the natural numbers that it cannot prove, and it cannot prove its own consistency. This does not say logic is broken or that truth is subjective; it says that no fixed list of axioms captures every arithmetical truth, which is a limit on axiom systems and a precise one.

Truth is not definable in the language it is about, by Tarski in 1933. A language rich enough to talk about arithmetic cannot contain its own truth predicate, on pain of the liar sentence, "this sentence is false", which is true if false and false if true. Tarski's response, that truth for a language is defined in a stronger metalanguage, is the reason logicians are careful about which language a claim is being made in. Russell's paradox of 1901, about the set of all sets that are not members of themselves, forced the same kind of restriction on set theory.

Logics that give something up

Classical logic is a choice, and its rivals are not confusions. Each drops one thing to buy another.

Intuitionistic logic drops double negation elimination, so excluded middle is not provable and a proof of existence must produce a witness. It is the logic of proof assistants for exactly that reason. Relevance logics drop ex falso quodlibet, so a contradiction no longer entails everything, which is useful when reasoning from databases known to contain some inconsistency. Many-valued and fuzzy logics drop bivalence, admitting degrees or a third value, for vagueness and for cases where truth is genuinely undefined. Modal logics add operators for necessity and possibility, and their conditionals can capture what the material one could not.

The existence of alternatives does not mean anything goes. Each is a precisely specified system with its own soundness and completeness results, and choosing between them is choosing which inferences you are prepared to license.

What the training is for

The honest summary is that this subject provides one thing completely and nothing else. It settles, exactly and permanently, whether a conclusion follows from stated premises. It has nothing to say about whether the premises are true, whether the formalisation was faithful, whether the argument is worth making, or whether the person making it is trustworthy.

That is still a great deal. Knowing that validity and truth are independent stops the two most common errors in public argument: taking a true conclusion as evidence of good reasoning, and taking bad reasoning as evidence of a false conclusion. Knowing the difference between a conditional and its converse is most of what is needed to read a diagnostic test or a piece of legislation. Being able to negate a quantified claim tells you what evidence would actually settle a dispute, which is the most useful single habit in the course.

And the discipline of writing an argument out until its suppressed premises are visible is what turns a disagreement about reasoning, which logic can settle, into a disagreement about facts, which the world can settle. Most arguments were always about the second kind, and the point of fourteen lessons on form is to find out which kind you are in.

Logic, from libre.university