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

¬P,PQ,PQ,PQ,xP(x),xP(x).\neg P,\quad P\land Q,\quad P\lor Q,\quad P\Rightarrow Q, \quad \forall x\,P(x),\quad \exists x\,P(x).

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 P,QP,Q, infer PQP\land Q; from a conjunction, infer either component.
  • From PP, infer PQP\lor Q, and similarly from QQ. From PQP\lor Q and deductions of RR from each alternative, infer RR.
  • A deduction of QQ under an additional assumption PP gives PQP\Rightarrow Q after discharging PP. From PP and PQP\Rightarrow Q, infer QQ (modus ponens).
  • A deduction of contradiction under PP gives ¬P\neg P. From P,¬PP,\neg P, infer contradiction; from contradiction infer any formula. Classical logic also permits eliminating double negation.
  • From xP(x)\forall x\,P(x), infer P(t)P(t) for an admissible term tt. To infer xP(x)\forall x\,P(x), prove the instance for an arbitrary object not occurring freely in undischarged assumptions.
  • From P(t)P(t), infer xP(x)\exists x\,P(x). 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 .

Quantifier order

The statement xyP(x,y)\forall x\,\exists y\,P(x,y) allows the chosen yy to depend on xx. The statement yxP(x,y)\exists y\,\forall x\,P(x,y) requires one choice valid for every xx. They need not be equivalent.

References