Definition
First-order logic and inference rules
Primitive logical syntax, quantifiers, equality, and rules for classical mathematical inference.
First-order logic specifies how statements are formed and how conclusions follow from assumptions. Variables stand for objects; a chosen language supplies relation symbols and, if needed, constants and function symbols. Atomic statements are equalities or applications of relation symbols. Formulas are built using
The quantifiers mean “for every object” and “there exists an object” in the domain of discourse. An occurrence of a variable is bound within its quantifier's scope and free otherwise. A formula with no free variables is a sentence. Substitution must avoid turning a free variable into a bound one.
Inference rules
A classical natural-deduction presentation permits the following rules. Assumptions may be used while they remain open, and a discharged assumption is removed from the hypotheses of the resulting conclusion.
- From , infer ; from a conjunction, infer either component.
- From , infer , and similarly from . From and deductions of from each alternative, infer .
- A deduction of under an additional assumption gives after discharging . From and , infer (modus ponens).
- A deduction of contradiction under gives . From , infer contradiction; from contradiction infer any formula. Classical logic also permits eliminating double negation.
- From , infer for an admissible term . To infer , prove the instance for an arbitrary object not occurring freely in undischarged assumptions.
- From , infer . To use an existential statement, introduce a fresh witness, deduce a conclusion independent of that witness, and discharge the witness assumption.
- Equality is reflexive, and equal terms may be substituted for one another in formulas.
These are foundational rules, not theorems requiring a prior mathematical structure. Particular theories add nonlogical axioms, such as those governing sets.
Quantifier order
The statement allows the chosen to depend on . The statement requires one choice valid for every . They need not be equivalent.