Discrete Math10 min read

Rules of Inference, and the Two That Look Valid but Are Not

An argument can be built entirely out of true statements and still prove nothing. What makes it work is the shape — and two of the shapes that feel most reasonable are the two that fail.

Step 5 of 9in the Discrete Math series

A red build does not tell you what you think#

A project has one rule about its automated checks:

“If the tests fail, the build turns red.”

This morning the build is red.

Did the tests fail? Decide before you read on.

Not necessarily. A red build is also what you get from a lint error, a timed-out runner, or a machine that filled its disk. The rule promised one direction only: failing tests produce a red build. It never said a red build has one cause.

Change one word and the answer flips. The build is green. Did the tests fail?

They did not, and you can be certain of it. If they had failed, the build would be red. It is not red. So they did not fail.

Two questions, same rule, same three sentences of reasoning — and one of them is airtight while the other is worth nothing. The difference is not the subject. It is the shape. This page is a list of the shapes that work, and the two that do not.

What a rule of inference actually is#

An argument is a list of statements you are granting, called the premises, followed by one statement you claim they force, called the conclusion. The conclusion is marked with , which is read “therefore”.

An argument is valid when there is no possible situation in which every premise is true and the conclusion is false. Not “usually holds”. Not one where you cannot think of a counterexample. No such situation exists at all.

A rule of inference is one argument shape that has already been checked and found valid, so you may use it without re-checking. That is the entire point of naming them: a proof made only of named rules is valid because each of its steps already was.

Four connectives and one piece of punctuation carry every rule below:

SymbolSay it asIt means
“and”both are true
“or”at least one is true
¬“not”the opposite
“if … then”a promise: whenever the left holds, the right does
“therefore”everything above this is a premise; this is the conclusion

The eight rules, and what each one costs you#

These eight cover almost every step of a first proof course. Read the middle column as “what you already have” and the right column as “what you are allowed to write next”.

NameYou haveYou may writeThe plain-English version
Modus ponensp → q, and pqthe promise fired
Modus tollensp → q, and ¬q¬pthe promised result never came, so the trigger never happened
Hypothetical syllogismp → q, and q → rp → rtwo promises chain into one
Disjunctive syllogismp ∨ q, and ¬pqtwo options, one ruled out
Additionpp ∨ qone true option makes the whole “or” true, whatever q is
Simplificationp ∧ qp  (or q)take either half of an “and”
Conjunctionp, and qp ∧ qtwo separate truths become one
Resolutionp ∨ q, and ¬p ∨ rq ∨ ra letter and its negation cancel
Simplification takes one, not both

From r ∧ s a single use of simplification gives you r, or it gives you s. It does not hand you both at once, and it does not give you r ∨ s — that one needs addition afterward. Questions about this rule are usually testing whether you know it fires once.

Addition looks like cheating the first time. From “the file is open” you may conclude “the file is open or the server is on fire”. That is a weaker claim, not a stronger one — an “or” only needs one side, and you already have one. Weakening a true statement keeps it true.

Valid and true are different words#

Here is the sentence that costs the most points on this topic: a valid argument with a false premise proves nothing about its conclusion.

Validity is a promise about the shape: if every premise is true, the conclusion has to be. Feed a valid shape one false premise and the promise never comes due. The conclusion might be true. It might be false. The argument has stopped saying.

An argument that is valid and has all-true premises is called sound. Sound is the one that settles anything. Valid is only the shape.

The one-line version

Valid = the shape cannot fail. Sound = the shape cannot fail and the premises are actually true. An exam asking “what does this establish about the conclusion?” after telling you a premise is false wants exactly one answer: nothing.

The two fallacies, and why they feel right#

Both fallacies start from the same true conditional, p → q, and both reach for the direction it never promised.

Affirming the consequentDenying the antecedent
The argumentp → q, and q  ∴ pp → q, and ¬p  ∴ ¬q
It is reallythe converse, assumedthe inverse, assumed
Build examplebuild is red ∴ tests failedtests passed ∴ build is not red
Why it failsq can have other causesq can have other causes
Valid?NoNo

Both are the same mistake wearing different clothes, and the mistake has a name you have already met: the converse and the inverse are not equivalent to the original. Only the contrapositive is — which is why modus tollens, the rule that is the contrapositive in action, is valid while these two are not.

Modus ponens compared with affirming the consequentMODUS PONENS — VALIDp → qthe rulepwhat you observe∴ qThe trigger happened, so the promise fired.AFFIRMING THE CONSEQUENT — NOT VALIDp → qthe ruleqwhat you observe∴ pq can have other causes. The rule never said it could not.
The rule is identical in both panels. The only thing that changed is which line you were handed and which one you concluded.

A worked case. “If n is divisible by 6, then n is divisible by 3. The number n is divisible by 3. ∴ n is divisible by 6.” Both premises are true statements about arithmetic. The conclusion is false for n = 9. A true conditional plus a true second premise, and a false conclusion — which is exactly what invalid means.

And the mirror. “If Dana works every practice problem, Dana passes the quiz. Dana did not work every practice problem. ∴ Dana does not pass.” Dana may have already known the material. The conditional named one route to passing, not the only one.

Resolution — the one rule that cancels#

Resolution is the rule that looks least like the others, and it is the one behind most modern SAT solvers and automated theorem provers.

Take ¬p ∨ q and p ∨ r. One of them contains p, the other contains ¬p. Exactly one of p and ¬p is true, so whichever clause loses its p is left holding its other half — and the other halves are q and r.

¬p ∨ q,   p ∨ r   ∴   q ∨ r

Cancel the letter that appears both plain and negated, then or together everything that is left. The result is called the resolvent. Nothing else is removed, and nothing is turned into an “and”.

Disjunctive syllogism is the special case where one clause is a single letter: from p ∨ q and ¬p, cancelling p leaves q alone.

The four rules for “every” and “some”#

Two more symbols. ∀x is read “for every x”, and ∃x is read “there is some x”. A domain is the collection those x’s are drawn from — the students in a class, the files in a folder.

Four rules move statements between the general and the particular. Two are free. Two carry a condition, and both conditions are ways a tidy-looking proof goes wrong.

NameYou haveYou may writeCondition
Universal instantiation∀x P(x)P(a), for any particular aa is in the domain. That is all.
Universal generalizationP(c) for an arbitrary c∀x P(x)you must not have chosen c, or used any fact about it
Existential instantiation∃x P(x)P(c)c must be a brand-new name
Existential generalizationP(a) for a particular a∃x P(x)a is in the domain. That is all.

Universal instantiation is the workhorse. From “every file that is corrupt fails validation” — ∀x (C(x) → V(x)) — you may write the line C(a) → V(a) about one specific file a. Nothing is assumed about a beyond its being a file.

Existential instantiation needs a fresh name

“Some file is corrupt” tells you a corrupt file exists. It does not tell you which. So you name it something you have never used — and never a name already carrying facts, like the file a from a line above. Reusing a name silently asserts that the two are the same file, which is the most common way a quantified proof goes wrong while looking tidy.

Put them together. Given ∀x (C(x) → V(x)), plus C(a), plus ¬V(b), with a and b two different files: instantiate at a to get C(a) → V(a), then modus ponens gives V(a). Instantiate at b to get C(b) → V(b), then modus tollens on ¬V(b) gives ¬C(b). Both follow. What does not follow is anything about a third file, or that a and b are the only files.

A worked proof, line by line#

A real proof is a stack of these rules, each line naming the rule and the earlier lines it used. Premises:

LineStatementReason
1p → qpremise
2q → rpremise
3¬rpremise
4s ∨ ppremise
5p → rhypothetical syllogism, 1 and 2
6¬pmodus tollens, 5 and 3
7sdisjunctive syllogism, 4 and 6

Read it backward and the shape of the plan appears. To get s out of s ∨ p you need ¬p. To get ¬p by modus tollens you need a conditional ending in something you can deny — and you can deny r. So chain 1 and 2 into p → r first. Working backward from the conclusion is how these proofs are found; working forward is how they are written down.

Count the lines after the premises: three. Questions that ask for the length of the shortest proof are asking you to notice that no rule is wasted — every line here except the conclusion feeds a later one.

The argument that assumes its own conclusion#

One more failure, and it is not a bad rule — it is no rule at all.

“The sequence converges because it has a limit, and it has a limit because it converges.”

Every step is true. The two halves support each other and nothing else. This is circular reasoning, also called begging the question: the conclusion appears among the premises, dressed in different words.

It is harder to catch than the two fallacies because there is no rule being misapplied. The test is mechanical: strike out the conclusion and everything that restates it. If nothing is left, nothing was proved.

Where these go wrong#

  • Reading a conditional both ways. p → q says nothing about what happens when q is true or when p is false. Both fallacies on this page are that one habit.
  • Calling a valid argument true. Validity is about shape. A false premise ends the argument’s claim on you entirely.
  • Applying simplification twice in one line. One use, one half. Take the other half on its own line.
  • Reusing a name in existential instantiation. A fresh letter every time, or you have quietly assumed two things are the same thing.
  • Generalizing from a chosen element. Universal generalization only works if you never used anything special about c. If you picked c because it was convenient, you cannot conclude ∀x.
  • Naming no rule. A line without a justification is not a proof step, even when it is correct. Name the rule and the lines it used.

Test yourself in the free Kestrel Exams app

Discrete Math practice is free and works offline — 16 questions on argument forms, fallacies and quantifier rules alone.

Drill rules of inference →

Frequently asked questions#

What is the difference between a valid argument and a true conclusion?

Validity is a property of the shape: there is no situation where all the premises are true and the conclusion is false. It says nothing about whether the premises are actually true. An argument that is valid and has all-true premises is called sound, and only a sound argument establishes its conclusion. A valid argument with one false premise establishes nothing at all.

Is modus tollens the same as the contrapositive?

They are the same fact used two ways. The contrapositive of p → q is ¬q → ¬p, and it is logically equivalent to the original. Modus tollens applies it: given p → q and ¬q, you may conclude ¬p. That equivalence is exactly why modus tollens is valid, while affirming the consequent — which uses the converse — is not.

Why does affirming the consequent feel correct?

Because in everyday life the effect usually does have the cause you have in mind. If the tests fail the build turns red, and most red builds really are failing tests. Logic asks a stricter question: is there any situation at all where the premises hold and the conclusion fails? One lint error is enough to make the answer yes, and one counterexample settles it.

When do I need a brand-new name in existential instantiation?

Every time. ∃x P(x) says something exists but not which thing, so the name you give it must carry no prior information. Reusing a letter already introduced — especially one from a universal instantiation — asserts that the two objects are the same, which the premise never said. Use a letter that appears nowhere else in the proof.

How many of these rules do I have to memorize?

The eight propositional rules and the four quantifier rules, by name, because exam questions ask you to name the rule a line used. Modus ponens, modus tollens, disjunctive syllogism and simplification cover most steps in practice; hypothetical syllogism and resolution appear in the multi-step proofs; addition and conjunction are easy to recognize but easy to forget the names of.

Suggest a change

Something here not clear? A topic you wish we covered? Tell us. We read every message, and a request is the fastest way to get a guide written — several of these exist because somebody asked.