inference rules
on this page
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:
- modus tollens - denying the consequent:
- hypothetical syllogism - chain rule:
- disjunctive syllogism - elimination by negation:
additional rules
other important inference patterns:
- conjunction introduction:
- conjunction elimination: (and )
- disjunction introduction: (and )
- constructive dilemma:
- destructive dilemma:
notation and terminology
standard notation
symbol | meaning | read as |
---|---|---|
therefore, entails | ”therefore” or “proves” | |
implication | ”if P then Q” | |
negation | ”not P” | |
conjunction | ”P and Q” | |
disjunction | ”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:
- premises → assumed or proven to be true
- rule application → mechanical transformation following logical pattern
- 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
- start with modus ponens - the most intuitive rule
- learn modus tollens - reasoning backwards
- practice identifying valid vs invalid patterns
- understand the difference between validity and soundness
intermediate
- master hypothetical syllogism for chaining implications
- learn disjunctive syllogism for elimination reasoning
- study how rules combine in longer proofs
- recognize common fallacies that superficially resemble valid rules
advanced
- explore rules of replacement and equivalence transformations
- study metalogical properties (completeness, consistency)
- learn natural deduction and sequent calculus systems
- 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?
- if the database is corrupted, then queries fail
- queries are not failing
- therefore: ?
answer: the database is not corrupted (modus tollens)
chaining inferences
from these premises:
- if it’s monday, then sarah works
- if sarah works, then the office is open
- it’s monday
- 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
- logical constructs - the operators used in inference rules
- deductive arguments - arguments that use inference rules
- formal fallacies - invalid inference patterns
- reasoning frameworks - broader argumentation systems
══════════════════════════════════════════════════════════════════