Academy
MathsDiscrete MathematicsLevel 1 Language Of Logic1 Propositional CalculusTautologies, Contradictions, and Contingencies

Tautologies, Contradictions, and Contingencies

Classifying logical statements based on their truth table results.

Classifying Logical Statements

After constructing a truth table for a complex expression, the final column will always fall into one of three categories. These categories tell us whether a statement is a "Universal Truth," a "Logical Impossible," or "Situationally Dependent".


1. Tautology (Always True)

A Tautology is a compound proposition that is True for every possible combination of truth values of its variables. In science and math, these are often referred to as logical identities or "Laws".

  • Example: p¬pp \lor \neg p (The Law of Excluded Middle).
  • Significance: A tautology contains no new "information" about the world because it is true by its very structure.
pp¬p\neg pp¬pp \lor \neg p
TFT
FTT

2. Contradiction (Always False)

A Contradiction (or Absurdity) is a compound proposition that is False for every possible combination of truth values.

  • Example: p¬pp \land \neg p (The Law of Non-Contradiction).
  • Significance: In mathematical proofs, if you assume a premise and reach a contradiction, it proves your initial assumption was wrong (Proof by Contradiction).
pp¬p\neg pp¬pp \land \neg p
TFF
FTF

3. Contingency (Mixed Results)

A Contingency is a proposition that is neither a tautology nor a contradiction. Its truth value depends on the truth values of its individual components. Most everyday statements and logical problems we solve are contingencies.


4. Visualizing with Logic Trees

We can visualize a Tautology as a system where every path leads to a "Green Light" (True), and a Contradiction where every path leads to a "Red Light" (False).

{`graph TD subgraph Tautology_Example T_Start[p ∨ ¬p] --> T_Check{Evaluate} T_Check -- p is T --> T_Out[True] T_Check -- p is F --> T_Out end
subgraph Contradiction_Example
C_Start[p ∧ ¬p] --> C_Check{Evaluate}
C_Check -- p is T --> C_Out[False]
C_Check -- p is F --> C_Out
end`}

5. Checking for Tautologies in Python

In software engineering, checking if a condition is a tautology helps in "Dead Code Elimination"—removing logic that will always (or never) execute.

def is_tautology(expression_func):
    # Test all possible Boolean combinations
    for p in [True, False]:
        if not expression_func(p):
            return False
    return True

# Example 1: p or (not p)
print(f"Is 'p or not p' a tautology? {is_tautology(lambda p: p or not p)}")

# Example 2: p and (not p)
print(f"Is 'p and not p' a tautology? {is_tautology(lambda p: p and not p)}")

Summary Table

TypeFinal Truth ColumnLogical Nature
TautologyAll TLogical Certainty
ContradictionAll FLogical Impossibility
ContingencyMix of T and FConditional/Situational