Rules of inference: every rule with its form, a truth-table check, examples and practice problems
Rules of inference are the valid steps of a logical proof: patterns such as modus ponens, “if p then q; p; so q”, that always lead from true premises to a true conclusion. About ten rules cover most proofs in a logic or discrete math course.
This guide lists every common rule with its form, a plain-English example and a link that checks it in a free argument checker. It then shows the fallacies that look like rules, works through four proofs step by step in the discrete-maths style, and ends with practice problems and answers.
What makes a rule of inference valid
An argument is valid when there is no possible situation in which all its premises are true and its conclusion is false. A rule of inference is an argument form that is valid whatever statements are put in for its letters. That can be checked with a truth table: list every combination of true and false, find the rows where all the premises are true, and look at the conclusion on those rows.
For modus ponens, the premises are p → q and p, and the conclusion is q. Row 0 has p and q both false:
| # | p | q | premise p → q | premise p | conclusion q |
|---|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE | FALSE | TRUE |
| 2 | TRUE | FALSE | FALSE | TRUE | FALSE |
| 3 | TRUE | TRUE | TRUE | TRUE | TRUE |
Computed by the Tangibool engine
Both premises are true only on row 3, and the conclusion is true there, so the rule is valid. Another way to say the same thing: the conditional “premises imply conclusion”, ((p → q) ∧ p) → q, is a tautology, true on every row. Every rule in the table below has a tautology of this kind behind it.
Rules of inference are one-way steps: from the premises you may write the conclusion, but not the other way round. That makes them different from logical equivalences such as De Morgan's laws, which can be applied in either direction; the section on rules of replacement below covers those.
The rules of inference at a glance
Each form links to the argument validity checker with the premises and conclusion filled in. The symbol ∴ means “therefore”.
| Rule | Form | In words | Example |
|---|---|---|---|
| Modus ponens | p → q, p ∴ q | If p then q; p; so q. | If it rains, the ground is wet. It rains. So the ground is wet. |
| Modus tollens | p → q, ¬q ∴ ¬p | If p then q; not q; so not p. | If it rains, the ground is wet. The ground is dry. So it did not rain. |
| Hypothetical syllogism | p → q, q → r ∴ p → r | Chain two conditionals. | If I study, I pass. If I pass, I graduate. So if I study, I graduate. |
| Disjunctive syllogism | p ∨ q, ¬p ∴ q | One of two holds; not the first; so the second. | The key is in the bag or the car. It is not in the bag. So it is in the car. |
| Addition | p ∴ p ∨ q | Anything true makes “it or anything” true. | It is Monday. So it is Monday or it is raining. |
| Simplification | p ∧ q ∴ p | From “both”, take one. | It is cold and windy. So it is cold. |
| Conjunction | p, q ∴ p ∧ q | Two true statements make a true “and”. | It is cold. It is windy. So it is cold and windy. |
| Resolution | p ∨ q, ¬p ∨ r ∴ q ∨ r | Cancel a statement against its negation. | I take the bus or I walk. I do not take the bus or I am late. So I walk or I am late. |
| Constructive dilemma | p → q, r → s, p ∨ r ∴ q ∨ s | Two conditionals, one of their hypotheses holds. | If I drive, I pay for parking. If I take the train, I buy a ticket. I drive or take the train. So I pay for parking or buy a ticket. |
| Destructive dilemma | p → q, r → s, ¬q ∨ ¬s ∴ ¬p ∨ ¬r | Two conditionals, one of their conclusions fails. | Using the same two conditionals: I did not pay for parking or did not buy a ticket. So I did not drive or did not take the train. |
Some textbooks, following Irving Copi, also list absorption, p → q ∴ p → (p ∧ q): if p gives q, then p gives p and q together.
The rules one group at a time
Rules for “if … then”
Modus ponens (“the way that affirms”) is the rule every proof uses most: once a conditional and its hypothesis are established, its conclusion follows. Modus tollens (“the way that denies”) runs the conditional backwards through its conclusion: if the conclusion fails, the hypothesis must have failed too. It is the logic behind proof by contrapositive, which the guide to converse, inverse and contrapositive covers. Hypothetical syllogism chains two conditionals that share a middle term, which is how long proofs link their steps. The worked examples for modus ponens, modus tollens and the hypothetical syllogism show each one's full truth table.
Rules for “or”
Disjunctive syllogism is elimination: of two options, one is ruled out, so the other remains. It works whether the “or” is inclusive or exclusive, as long as the option it denies is one of the two. Addition looks odd at first, because it adds an option nobody mentioned, but it is safe: if p is true, “p or anything” is true. It is useful when a later step needs an “or”. Resolution generalises disjunctive syllogism: two “or” statements, one containing p and the other ¬p, combine into one statement without p. It is the single rule that many automated theorem provers and SAT solvers are built on. See the disjunctive syllogism example.
Rules for “and”
Simplification takes one part of a conjunction, and conjunction joins two established statements. They are the bookkeeping rules of a proof: most steps either split an “and” into its parts or build one up.
Dilemmas
A dilemma combines two conditionals with an “or”. In the constructive form, one of the hypotheses holds, so one of the conclusions does. In the destructive form, one of the conclusions fails, so one of the hypotheses does. When both conclusions are the same, the constructive dilemma becomes a proof by cases: if p gives q and r gives q, and p or r holds, then q holds. See the constructive dilemma example.
Fallacies that look like rules
Three argument forms look like rules of inference but are not valid. Each has a counterexample: a row where every premise is true and the conclusion is false.
| Fallacy | Form | Counterexample | Why it fails |
|---|---|---|---|
| Affirming the consequent | p → q, q ∴ p | p = F, q = T | q can be true for another reason. |
| Denying the antecedent | p → q, ¬p ∴ ¬q | p = F, q = T | q can be true even without p. |
| Affirming a disjunct | p ∨ q, p ∴ ¬q | p = T, q = T | An inclusive “or” allows both. |
Here is the truth table of affirming the consequent, set up like the one for modus ponens above:
| # | p | q | premise p → q | premise q | conclusion p |
|---|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE | TRUE | TRUE |
Computed by the Tangibool engine
Both premises are true on rows 1 and 3. On row 1 the conclusion p is false: the ground is wet (q) because of a sprinkler, and it did not rain (p). One such row is enough to make the form invalid, and the conditional behind it, ((p → q) ∧ q) → p, is not a tautology. The worked examples for affirming the consequent and denying the antecedent go through both fallacies.
Using rules of inference: four proofs step by step
A proof lists one statement per line, each a premise or the result of a rule applied to earlier lines, ending with the conclusion. Each proof below names the rule and the lines it uses, and its first link checks the whole argument at once.
Proof 1: modus tollens, then disjunctive syllogism, then modus ponens
Premises: if the server is down, the website is offline. The website is not offline. The server is down or the database is locked. If the database is locked, an alert is sent. Conclusion: an alert is sent. With d for “the server is down”, w for “the website is offline”, l for “the database is locked” and a for “an alert is sent”:
| Step | Statement | Reason |
|---|---|---|
| 1 | d → w | Premise |
| 2 | ¬w | Premise |
| 3 | ¬d | Modus tollens, 1 and 2 |
| 4 | d ∨ l | Premise |
| 5 | l | Disjunctive syllogism, 4 and 3 |
| 6 | l → a | Premise |
| 7 | a | Modus ponens, 6 and 5 |
The argument validity checker confirms the conclusion follows from the four premises.
Proof 2: resolution twice
Premises: p ∨ q, ¬p ∨ r and ¬q ∨ r. Conclusion: r.
| Step | Statement | Reason |
|---|---|---|
| 1 | p ∨ q | Premise |
| 2 | ¬p ∨ r | Premise |
| 3 | q ∨ r | Resolution on p, 1 and 2 |
| 4 | ¬q ∨ r | Premise |
| 5 | r ∨ r, that is r | Resolution on q, 3 and 4 |
In words: either p or q holds, and each of them leads to r, so r holds. That is a proof by cases written as resolution; the checker agrees.
Proof 3: simplification and conjunction
Premises: p ∧ q and q → r. Conclusion: p ∧ r.
| Step | Statement | Reason |
|---|---|---|
| 1 | p ∧ q | Premise |
| 2 | p | Simplification, 1 |
| 3 | q | Simplification, 1 |
| 4 | q → r | Premise |
| 5 | r | Modus ponens, 4 and 3 |
| 6 | p ∧ r | Conjunction, 2 and 5 |
Proof 4: hypothetical syllogism, then modus tollens
Premises: if it rains, the match is cancelled. If the match is cancelled, the club refunds the tickets. The club did not refund the tickets. Conclusion: it did not rain. With r, c and f for the three statements:
| Step | Statement | Reason |
|---|---|---|
| 1 | r → c | Premise |
| 2 | c → f | Premise |
| 3 | r → f | Hypothetical syllogism, 1 and 2 |
| 4 | ¬f | Premise |
| 5 | ¬r | Modus tollens, 3 and 4 |
When an argument is not valid
If no sequence of rules reaches the conclusion, the argument may simply be invalid, and a counterexample settles it faster than a failed search for a proof. Take the premises p → q, q → r and r, with the conclusion p. The argument validity checker reports that the conclusion does not follow and gives the row p = F, q = F, r = T: all three premises are true and p is false. It is affirming the consequent in a longer chain: r being true says nothing about where it came from. The counterexamples lesson shows how to read such a row back into words.
One special case runs the other way. If the premises contradict each other, every conclusion follows, because there is no row where all the premises are true: from p and ¬p, anything follows. The argument is valid but useless, and the inconsistent premises example and the pitfall on inconsistent assumptions explain why a checker should warn about it.
Rules of replacement
Many proof systems also allow rules of replacement: logical equivalences that may replace any part of a line, in either direction, because they never change its truth value. The usual list includes:
- De Morgan's laws: ¬(p ∧ q) ≡ ¬p ∨ ¬q, and ¬(p ∨ q) ≡ ¬p ∧ ¬q (De Morgan)
- double negation: ¬¬p ≡ p (double negation)
- implication: p → q ≡ ¬p ∨ q (implication elimination)
- contraposition: p → q ≡ ¬q → ¬p
- commutation, association and distribution of ∧ and ∨ (distributive law)
- exportation: (p ∧ q) → r ≡ p → (q → r)
The difference matters. A rule of inference such as simplification may be applied only to a whole line: from p ∧ q you may write p, but you may not drop part of (p ∧ q) → r. A rule of replacement may be applied anywhere inside a line.
Practice problems with answers
- Name the rule. If the alarm is set, the light is red. The light is not red. So the alarm is not set. Answer: modus tollens.
- Name the rule. Either the file is missing or the path is wrong. The file is not missing. So the path is wrong. Answer: disjunctive syllogism.
- Valid or not? If you study, you pass. You passed. So you studied. Answer: not valid. It is affirming the consequent, and the counterexample is a student who passed without studying.
- Name the rule. It is cold and windy. So it is cold. Answer: simplification.
- Valid or not? p ∨ q and ¬q ∨ r, therefore p ∨ r. Answer: valid, by resolution on q. The checker agrees.
- Valid or not? If it is a weekday, the shop is open. If it is a holiday, the shop is open. It is a weekday or a holiday. So the shop is open. Answer: valid, a constructive dilemma with the same conclusion twice, or a proof by cases; checked.
- Prove it. From p → q, q → r and p, derive r. Answer: modus ponens on p → q and p gives q; modus ponens on q → r and q gives r. Or chain the conditionals first with hypothetical syllogism, then use modus ponens once.
The argument validity practice set has more, with answers checked by the engine.
Common mistakes
- Using a fallacy as a rule. Affirming the consequent and denying the antecedent are the two that look most like modus ponens and modus tollens.
- Applying a rule of inference inside a line. Simplification and addition work on whole lines only.
- Treating an exclusive “or” as inclusive, or the reverse. Disjunctive syllogism is safe either way; concluding ¬q from p ∨ q and p is safe only for an exclusive “or”.
- Skipping steps. In a written proof each line should follow from earlier lines by one named rule. A checker confirms the whole argument; the proof shows why.
- Proving from inconsistent premises. If the premises cannot all be true, the argument proves nothing about the world.
Frequently asked questions
What are rules of inference?
Valid argument forms used as steps in a proof: patterns such as modus ponens and modus tollens that always lead from true premises to a true conclusion.
How many rules of inference are there?
It depends on the textbook. Most discrete math courses list eight or nine: modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism, addition, simplification, conjunction and resolution, often with the constructive and destructive dilemmas. Irving Copi's widely used logic textbook lists nine rules of inference, absorption among them, and ten rules of replacement.
What is the difference between modus ponens and modus tollens?
Modus ponens affirms the hypothesis to get the conclusion: p → q and p give q. Modus tollens denies the conclusion to get the negated hypothesis: p → q and ¬q give ¬p.
How do you know a rule of inference is valid?
Make the truth table of its premises and conclusion. If every row where all the premises are true also has a true conclusion, the rule is valid; equivalently, “premises imply conclusion” is a tautology.
What is resolution in logic?
The rule that combines p ∨ q and ¬p ∨ r into q ∨ r. It is the basis of most automated provers and SAT solvers.
What is the difference between a rule of inference and a rule of replacement?
A rule of inference is a one-way step applied to whole lines. A rule of replacement is an equivalence that may replace any part of a line, in either direction.
What are rules of inference used for in discrete math?
To write proofs: each step of a proof applies one rule to earlier statements, and the same rules underlie proofs by contradiction, by contrapositive and by cases.
Related pages
- Guides: valid vs sound arguments
- Worked examples: modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism, constructive dilemma, affirming the consequent, denying the antecedent, inconsistent premises
- Lesson 8: arguments and validity and Lesson 9: counterexamples
- Glossary: valid argument, premise, conclusion, counterexample
- The argument validity checker and the argument validity practice set
Written by Muaz Notiar. The Tangibool engine (semantics tangibool-semantics/1, engine 1.0.0) computed the 2 truth tables marked “Computed by the Tangibool engine”, and the 24 tool results the guide links to were re-run through the tools' own code in the build of and match what the text says. © 2026 Foreranger LTD.