inference rules

overview

inference rules are the fundamental patterns that allow us to derive valid conclusions from given premises. these are the building blocks of deductive reasoning - when the premises are true and the rule is applied correctly, the conclusion must be true.

unlike fallacies, which represent invalid reasoning patterns, inference rules preserve truth: they guarantee that if you start with true premises, you’ll end with true conclusions.

core inference rules

basic patterns

the four most fundamental inference rules in propositional logic:

  • modus ponens - affirming the antecedent: PQ,PQP \rightarrow Q, P \vdash Q
  • modus tollens - denying the consequent: PQ,¬Q¬PP \rightarrow Q, \neg Q \vdash \neg P
  • hypothetical syllogism - chain rule: PQ,QRPRP \rightarrow Q, Q \rightarrow R \vdash P \rightarrow R
  • disjunctive syllogism - elimination by negation: PQ,¬PQP \lor Q, \neg P \vdash Q

additional rules

other important inference patterns:

  • conjunction introduction: P,QPQP, Q \vdash P \land Q
  • conjunction elimination: PQPP \land Q \vdash P (and PQQP \land Q \vdash Q)
  • disjunction introduction: PPQP \vdash P \lor Q (and QPQQ \vdash P \lor Q)
  • constructive dilemma: (PQ)(RS),PRQS(P \rightarrow Q) \land (R \rightarrow S), P \lor R \vdash Q \lor S
  • destructive dilemma: (PQ)(RS),¬Q¬S¬P¬R(P \rightarrow Q) \land (R \rightarrow S), \neg Q \lor \neg S \vdash \neg P \lor \neg R

notation and terminology

standard notation

symbolmeaningread as
\vdashtherefore, entails”therefore” or “proves”
PQP \rightarrow Qimplication”if P then Q”
¬P\neg Pnegation”not P”
PQP \land Qconjunction”P and Q”
PQP \lor Qdisjunction”P or Q”

rule structure

every inference rule has the same basic structure:

premise₁, premise₂, ..., premiseₙ ⊢ conclusion

the horizontal line (or ⊢ symbol) separates premises (above) from conclusion (below).

validity vs soundness

validity

an inference rule is valid if whenever all premises are true, the conclusion must be true. validity is about the logical form, not the content.

valid example:

if socrates is human, then socrates is mortal
socrates is human
therefore, socrates is mortal

soundness

an argument is sound if it’s both valid and all premises are actually true.

sound example (valid + true premises):

if water reaches 100°c, then it boils
water has reached 100°c
therefore, water boils

unsound example (valid but false premise):

if the earth is flat, then ships disappear hull-first
the earth is flat  ← false premise
therefore, ships disappear hull-first

truth preservation

inference rules preserve truth through logical necessity:

  1. premises → assumed or proven to be true
  2. rule application → mechanical transformation following logical pattern
  3. conclusion → necessarily true if premises are true

this creates chains of reasoning where each step is guaranteed to preserve truth.

common misconceptions

confusing validity with truth

  • misconception: “the conclusion is false, so the reasoning is invalid”
  • reality: validity depends only on logical form, not actual truth values
  • example: valid reasoning can lead to false conclusions if premises are false

reversing inference rules

  • misconception: “if P→Q and Q is true, then P is true”
  • reality: most inference rules don’t work in reverse
  • correct: this is the affirming the consequent fallacy fallacy

assuming symmetry

  • misconception: “if the rule works one way, it works the other way”
  • reality: logical inference is directional
  • example: from “all birds fly” and “eagles are birds” we get “eagles fly”, but not the reverse

applications

theorem proving

inference rules form the basis of formal mathematical proofs:

given: x > 0, y > 0
rule: if a > 0 and b > 0, then a * b > 0
conclusion: x * y > 0

programming logic

conditional statements in code follow inference patterns:

if user.is_authenticated() and user.has_permission('read'):
    return data
# modus ponens: condition met → action executed

everyday reasoning

we use inference rules constantly in daily life:

if it's raining, i'll take an umbrella
it's raining
therefore, i'll take an umbrella

automated reasoning

expert systems and ai use inference rules to derive new facts:

rule: if temperature > 38°c then fever = true
fact: patient temperature = 39°c
inference: patient has fever

learning progression

beginners

  1. start with modus ponens - the most intuitive rule
  2. learn modus tollens - reasoning backwards
  3. practice identifying valid vs invalid patterns
  4. understand the difference between validity and soundness

intermediate

  1. master hypothetical syllogism for chaining implications
  2. learn disjunctive syllogism for elimination reasoning
  3. study how rules combine in longer proofs
  4. recognize common fallacies that superficially resemble valid rules

advanced

  1. explore rules of replacement and equivalence transformations
  2. study metalogical properties (completeness, consistency)
  3. learn natural deduction and sequent calculus systems
  4. understand how inference rules extend to predicate logic

relationship to other topics

with logical constructs

inference rules operate on logical constructs like implication, conjunction, and disjunction. understanding these operators is prerequisite to understanding inference.

with argument types

inference rules are the mechanism by which deductive arguments guarantee their conclusions. they don’t apply to inductive or abductive reasoning.

with fallacies

many formal fallacies are invalid inference patterns that superficially resemble valid rules. learning valid rules helps identify invalid ones.

practical exercises

identifying patterns

given these statements, what can you validly conclude?

  1. if the database is corrupted, then queries fail
  2. queries are not failing
  3. therefore: ?

answer: the database is not corrupted (modus tollens)

chaining inferences

from these premises:

  1. if it’s monday, then sarah works
  2. if sarah works, then the office is open
  3. it’s monday
  4. therefore: ?

answer: the office is open (modus ponens + hypothetical syllogism)

implementation notes

for developers building reasoning systems:

rule representation

class InferenceRule:
    def __init__(self, premises, conclusion):
        self.premises = premises
        self.conclusion = conclusion

    def apply(self, facts):
        if all(premise.matches(facts) for premise in self.premises):
            return self.conclusion.instantiate(facts)
        return None

forward vs backward chaining

  • forward chaining: apply rules to known facts to derive new facts
  • backward chaining: start with goal and work backwards to find supporting facts

references

formal treatments

  • mendelson, “mathematical logic” - comprehensive coverage
  • shoenfield, “mathematical logic” - advanced treatment
  • van dalen, “logic and structure” - modern approach

practical applications

  • russell & norvig, “artificial intelligence” - ai reasoning systems
  • clocksin & mellish, “programming in prolog” - logic programming
  • genesereth & nilsson, “logical foundations of ai” - knowledge representation

see also

══════════════════════════════════════════════════════════════════
on this page