Mathematics → Logic
Mathematical logic is the study of formal reasoning — the rules by which conclusions follow necessarily from premises. It underlies every proof in mathematics and every program in computer science.
A proposition is a declarative statement that is either true or false, but not both. We denote propositions with letters like and their truth values with (true) or (false).
"7 is prime" — proposition (true). "x + 1 = 5" — not a proposition (truth depends on x). "Read this!" — not a proposition (imperative).
Propositions are combined using connectives to form compound propositions:
The implication is often the most counterintuitive: a false hypothesis makes the whole statement vacuously true. "If the moon is made of cheese, then 2+2=5" is a true implication.
A truth table lists all possible truth values for a compound proposition. For variables there are rows.
| p | q | p → q | p ↔ q |
|---|---|---|---|
| T | T | T | T |
| T | F | F | F |
| F | T | T | F |
| F | F | T | T |
Given , three related implications arise — only the contrapositive is logically equivalent to the original:
Converse
Not equivalent
Inverse
Not equivalent
Contrapositive
Logically equivalent ✓
Original
Definition — Logical Equivalence
Double Negation
Contrapositive
De Morgan 1
De Morgan 2
Implication
Absorption
A proposition that is always true is a tautology (e.g. ). One that is always false is a contradiction (e.g. ).
Propositional logic treats propositions as atomic. Predicate logic (first-order logic) adds variables, predicates, and quantifiers — allowing statements about entire domains.
A predicate is a proposition-valued function: is true for , false for .
"Not all integers are even" is the same as "there exists an integer that is not even."
A rule of inference is a valid argument form — a pattern that guarantees the conclusion is true whenever the premises are true.
Modus Ponens
Modus Tollens
Hypothetical Syl.
Disjunctive Syl.
Addition
Simplification
The symbol means "therefore." Modus Ponens is the most fundamental rule: if we know is true, and we know , we can conclude .
Next: Number Theory →