LogicGates.org Open the simulatorSimulator

Rules of inference

The valid patterns of reasoning that proofs are built from, each with its form, an everyday example and a truth table check, followed by the fallacies that look like them and a proof written step by step.

Arguments, validity and rules

An argument is a list of statements, the premises, followed by a conclusion, marked with ∴ ("therefore"). It is valid when the conclusion is true in every case where all the premises are true. Validity is about form, not content: replace the letters with any statements you like and a valid form stays valid.

A rule of inference is a short valid form that is worth a name. Each one below was checked by listing every row of its truth table when this page was built. Written as a single statement, each is also a tautology: modus ponens becomes (p → q) ∧ p → q, true in every row.

The rules

Rule Premises Conclusion
Modus ponens p → q, p ∴ q
Modus tollens p → q, ¬q ∴ ¬p
Hypothetical syllogism p → q, q → r ∴ p → r
Disjunctive syllogism p ∨ q, ¬p ∴ q
Addition p ∴ p ∨ q
Simplification p ∧ q ∴ p
Conjunction p, q ∴ p ∧ q
Resolution p ∨ q, ¬p ∨ r ∴ q ∨ r
Constructive dilemma p → q, r → s, p ∨ r ∴ q ∨ s
Destructive dilemma p → q, r → s, ¬q ∨ ¬s ∴ ¬p ∨ ¬r

Modus ponens

Also called affirming the antecedent, →-elimination

p → q
p
∴ q
If the kettle is on, the water will boil.
The kettle is on.
Therefore, the water will boil.

From a conditional and its antecedent, conclude its consequent.

✓ Valid: checked on all 4 rows. See the truth table

Modus tollens

Also called denying the consequent

p → q
¬q
∴ ¬p
If the file was saved, it is on the disk.
It is not on the disk.
Therefore, the file was not saved.

From a conditional and the negation of its consequent, conclude the negation of its antecedent.

✓ Valid: checked on all 4 rows. See the truth table

Hypothetical syllogism

Also called chain rule, transitivity

p → q
q → r
∴ p → r
If it snows, the roads are icy.
If the roads are icy, the bus is late.
Therefore, if it snows, the bus is late.

Two conditionals that link up chain into one.

✓ Valid: checked on all 8 rows. See the truth table

Disjunctive syllogism

Also called elimination

p ∨ q
¬p
∴ q
The key is in my coat or in my bag.
It is not in my coat.
Therefore, it is in my bag.

Rule out one side of an OR and the other side must hold.

✓ Valid: checked on all 4 rows. See the truth table

Addition

Also called disjunction introduction

p
∴ p ∨ q
It is Tuesday.
Therefore, it is Tuesday or it is raining.

Anything true stays true with an OR attached, whatever the other side says.

✓ Valid: checked on all 4 rows. See the truth table

Simplification

Also called conjunction elimination

p ∧ q
∴ p
The shop is open and it sells bread.
Therefore, the shop is open.

If both parts of an AND are true, each part is true on its own.

✓ Valid: checked on all 4 rows. See the truth table

Conjunction

Also called conjunction introduction

p
q
∴ p ∧ q
The door is locked.
The alarm is set.
Therefore, the door is locked and the alarm is set.

Two statements that are each true can be joined with AND.

✓ Valid: checked on all 4 rows. See the truth table

Resolution

p ∨ q
¬p ∨ r
∴ q ∨ r
It is raining or it is sunny.
It is not raining or I take an umbrella.
Therefore, it is sunny or I take an umbrella.

Two ORs that disagree about p cancel it out. This one rule drives automated theorem provers and SAT solvers.

✓ Valid: checked on all 8 rows. See the truth table

Constructive dilemma

p → q
r → s
p ∨ r
∴ q ∨ s
If I take the train, I read.
If I drive, I listen to the radio.
I take the train or I drive.
Therefore, I read or I listen to the radio.

Two conditionals and an OR of their antecedents give an OR of their consequents.

✓ Valid: checked on all 16 rows. See the truth table

Destructive dilemma

p → q
r → s
¬q ∨ ¬s
∴ ¬p ∨ ¬r
If the server is up, the page loads.
If the cache is warm, the page is fast.
The page does not load or it is not fast.
Therefore, the server is not up or the cache is not warm.

Modus tollens applied to two conditionals at once.

✓ Valid: checked on all 16 rows. See the truth table

Fallacies: the invalid look-alikes

A formal fallacy is an argument form that looks like a rule but is not valid: some row makes every premise true and the conclusion false. One such row, a counterexample, is enough to sink it.

Affirming the consequent

Often mistaken for modus ponens

p → q
q
∴ p
If it rained, the grass is wet.
The grass is wet.
Therefore, it rained.

The grass could be wet from a sprinkler: q can be true for reasons other than p.

✗ Invalid: counterexample p false, q true. See the truth table

Denying the antecedent

Often mistaken for modus tollens

p → q
¬p
∴ ¬q
If it rained, the grass is wet.
It did not rain.
Therefore, the grass is not wet.

The conditional says nothing about what happens when p is false.

✗ Invalid: counterexample p false, q true. See the truth table

Affirming a disjunct

Often mistaken for disjunctive syllogism

p ∨ q
p
∴ ¬q
She speaks French or she speaks Spanish.
She speaks French.
Therefore, she does not speak Spanish.

The OR of logic is inclusive, so both sides can be true.

✗ Invalid: counterexample p true, q true. See the truth table

Printable rules of inference chart

Every rule above as premises and a conclusion, with the three fallacies marked invalid, on one sheet for printing or revision.

Rules of inference chart: the premises and conclusion of 10 valid rules, modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism, addition, simplification, conjunction, resolution, constructive dilemma, destructive dilemma, and 3 invalid fallacies such as affirming the consequent Click to download: Rules of inference chart

How to write a proof with rules of inference

A truth table can check any argument, but it doubles in size with every letter. A proof reaches the conclusion in a few lines instead: list the premises, then add one line at a time, each following from earlier lines by a rule of inference or by replacing part of a line with something logically equivalent. The proof ends when the conclusion appears.

Take this argument:

The train is running or I take the bus.
It is snowing and the train is not running.
If I take the bus, I am late.
If I am late, I call ahead.
Therefore, I call ahead, and it is snowing.

t: the train is running; b: I take the bus; s: it is snowing; l: I am late; c: I call ahead.

Line Statement Justification
1 t ∨ b Premise
2 s ∧ ¬t Premise
3 b → l Premise
4 l → c Premise
5 ¬t ∧ s Commutative law, 2
6 ¬t Simplification, 5
7 b Disjunctive syllogism, 1, 6
8 b → c Hypothetical syllogism, 3, 4
9 c Modus ponens, 8, 7
10 s Simplification, 2
11 c ∧ s Conjunction, 9, 10

Line 11 is the conclusion, so the argument is valid. Every step was checked when this page was built: the lines it cites entail it, and it has the exact shape of the rule it names. Line 5 uses the commutative law to swap the sides of ∧, since simplification here keeps the left part. The full truth table agrees, over all 32 rows.

Some habits that make proofs easier to find:

  • Break conjunctions apart with simplification early; single letters are easier to use.
  • Look for a conditional whose antecedent you have (modus ponens) or whose consequent you can deny (modus tollens).
  • Chain conditionals with hypothetical syllogism before applying them.
  • Work backwards from the conclusion: ask which rule could produce it, and what that rule needs.
  • Rewrite with equivalences when a line is in the wrong shape, for example p → q as ¬q → ¬p (the contrapositive).

Resolution and computers

Resolution deserves a word of its own. Rewrite every premise and the negation of the conclusion as ORs of letters and negated letters (conjunctive normal form), then resolve pairs of clauses until the empty clause, a contradiction, appears. That one rule is complete for proving that a set of clauses is unsatisfiable, which is why it, and descendants of it, run inside theorem provers and the SAT solvers used to verify chips.

Questions

What are rules of inference?

Rules of inference are valid argument forms: patterns such as "p → q and p, therefore q" whose conclusion is true whenever all the premises are true, whatever statements the letters stand for. A proof is a chain of steps, each justified by one of these rules applied to earlier lines.

What is the difference between modus ponens and modus tollens?

Both start from a conditional p → q. Modus ponens adds p and concludes q: it affirms the antecedent. Modus tollens adds ¬q and concludes ¬p: it denies the consequent. They are the two valid ways to use a conditional; the two mirror images, affirming the consequent and denying the antecedent, are fallacies.

What does modus ponens mean?

Modus ponens is Latin for "the way that affirms", short for modus ponendo ponens, "the way that affirms by affirming". Modus tollens is "the way that denies", from modus tollendo tollens. The names describe what the second premise does to the conditional.

How do you know a rule of inference is valid?

Check its truth table: in every row where all the premises are true, the conclusion must be true too. Equivalently, (premises joined with ∧) → conclusion must be a tautology. Every rule on this page was checked that way when the page was built, and the calculator will check any argument you type.

What is the difference between a rule of inference and a logical equivalence?

A rule of inference works in one direction on whole lines: from p ∧ q you may infer p, but not the reverse. A logical equivalence works in both directions and may replace any part of a statement, because both sides always have the same truth value. Proofs use both.

Is a valid argument always true?

No. Validity is about form: if the premises are true, the conclusion must be. "If the moon is cheese, it is edible; the moon is cheese; so it is edible" is valid modus ponens with a false premise. An argument that is valid and has true premises is called sound, and its conclusion is true.