The Deductive Calculus and Its Metatheorems/A Deductive Calculus for First-Order Logic

Lesson 4.12,049 words

A Deductive Calculus for First-Order Logic

A proof must be finite and mechanically checkable. A Hilbert-style calculus meets both demands: six schemas of logical axioms, a single rule of inference (modus ponens), and the syntactic consequence relation they generate.

╌╌╌╌

The semantic account of first-order logic answers what follows from a set of hypotheses: holds when every structure satisfying all of also satisfies . That definition quantifies over all structures and all variable assignments, an uncountable search with no obvious stopping point.1 A proof settles the same question by finite, inspectable means. The syntactic counterpart is a deductive calculus whose proofs are finite strings, checkable without insight.

Two constraints fix the design.2 A proof must be finite, because it is an object handed from one person to another, and an infinite set of hypotheses cannot be handed over whole. A proof must also be effectively checkable: verifying that a purported proof contains no fallacy must be a mechanical procedure, not a matter of flashes of insight. In particular, the set of proofs from no hypotheses should be decidable, so that the provable-from-nothing formulas can be effectively listed by generating all strings and sorting proofs from non-proofs.

To keep the two levels apart we reserve the word deduction for the formal object and leave proof for the ordinary mathematical arguments (in English) that we make about deductions. A deduction lives in the object language; our reasoning about deductions lives in the meta-language.

The two levels kept apart throughout: ordinary mathematical reasoning in the meta-language studies the formal calculus below it.

Deductions from a rule of inference

Fix a first-order language. We will select an infinite set of formulas, the logical axioms, and one rule of inference. For a set of formulas, a formula counts as a theorem of if and only if it is obtainable from by applying the rule finitely many times.

The single rule is modus ponens: from and , infer .

The choice of and of the rules is far from unique; every deductive calculus trades axioms against rules. Taking forces many rules of inference; the opposite extreme, taken here, keeps a single rule and pays for it with an infinite axiom set.

Checking a purported deduction is the mechanical procedure the design demanded: scan the sequence once, verifying each line locally.

Algorithm:CheckDeduction(α0,,αn; Γ)\textsc{CheckDeduction}(\alpha_0, \dots, \alpha_n;\ \Gamma) — verify a purported deduction
  1. 1
    for each k0,1,,nk \gets 0, 1, \dots, n do
  2. 2
    if αkΓΛ\alpha_k \in \Gamma \cup \Lambda then accept line kk
  3. 3
    else if some i,j<ki, j < k have αj=(αiαk)\alpha_j = (\alpha_i \to \alpha_k) then accept line kk
  4. 4
    else reject the sequence
  5. 5
    accept the sequence as a deduction of αn\alpha_n

Line-by-line acceptance needs membership in to be checkable; for that is arranged below by giving the axioms a purely syntactic definition, and for hypotheses it holds whenever is decidable.

The word theorem now lives on two levels. Inside the object language, is a theorem of when . In the meta-language, statements about deductions (each proved in English) are also called theorems; when the distinction matters we call the latter metatheorems.

A deduction is a construction sequence: it records how is obtained from the base set by applying modus ponens zero or more times. This resembles building a wff from atoms, with two differences. Modus ponens is partial (its domain is only pairs of the form ), and it can produce a shorter formula from longer ones. The deeper difference is that the set of theorems is not freely generated: a theorem has many deductions, and its construction tree is not unique.3 An induction principle still holds.

Every metatheorem below that quantifies over all theorems of is proved by exhibiting a set of the right shape and invoking this principle.

Substitution

The logical axioms depend on substituting a term for a variable, so we pin that operation down first. For a formula , a variable , and a term , the expression is the result of replacing by at every free occurrence of in . Officially this is a recursion on (with an auxiliary recursion on terms for the atomic case).4

For example , and : the inside is bound and untouched.

Substitution alone is not always safe. Take and substitute for :

The antecedent is true in any structure whose universe has two or more elements. The consequent is false in every structure, since holds always. So this instance of the plausible-looking schema if holds of everything, it holds of is nearly always false. The fault is capture: the substituted was seized by the quantifier already present.

Variable capture. Substituting the term for the free variable sends it under a quantifier that binds the same letter, changing its meaning.

To exclude capture we define when a term may be substituted at all.

Two easy cases: is always substitutable for itself, and any whose variables all avoid is substitutable for in . The word choice is deliberate: even when is not substitutable, is still formed by replacing every free with . Substitutability is a licensing condition on the axioms, not on the operation. It coincides with the free for condition studied for the substitution lemma.

The logical axioms

Before listing we widen each schema to its generalizations. A wff is a generalization of iff for some and variables ; the case makes every wff a generalization of itself. The logical axioms are all generalizations of wffs of the following six forms, where are variables and are wffs.

GroupSchemaReads as
1tautologiesthe sentential content
2, with substitutable for in instantiation of a universal
3 distributes over
4, with not free in vacuous quantification
5reflexivity of equality
6, atomic, replaces by at some placesequals substitute into atoms

Groups 5 and 6 are included only when the language carries equality. The list is not meant to look natural; each group is justified below. Group 2 encodes the meaning of the quantifier; groups 3 and 4 exist precisely to make the generalization theorem go through; groups 5 and 6 are exactly enough to prove the properties of equality.

The six axiom schemas as one reference card, grouped by the fragment of the logic each governs: sentential, quantifier, and equality.

Deciding whether a formula is a group-2 axiom means matching it against and checking substitutability. Both halves have to hold.

Tautologies as axioms

Group 1 needs spelling out, because tautology was defined for sentential logic. Split the wffs into prime formulas (atomic formulas and those of the form ) and nonprime formulas (the and ). Every wff is built from prime formulas by the two operations for and . Now treat the prime formulas as sentence symbols. A wff is in axiom group 1 iff, read this way, it is a tautology of sentential logic in the connectives . No replacement is needed; the prime formulas already are first-order wffs.

The prime / nonprime split behind group 1. Prime formulas become the sentence symbols; the two connectives rebuild every wff on top of them.

For example, the contraposition tautology , with and , yields the group-1 axiom

Its truth table has four rows (two prime formulas), and every row comes out true.

By contrast and are not tautologies: their quantified prime formulas can independently take either truth value, even though both are in fact valid for quantifier-level reasons.

Taking all tautologies as axioms is more than needed. The tautologies form a decidable set (which matters for the enumerability theorem in soundness and completeness), but there is no known fast decision procedure for them. One could instead take a polynomial-time-decidable subset of tautologies as axioms and derive the rest by modus ponens.

Deducibility as tautological implication

First-order formulas are now also sentential wffs (over the prime formulas), so sentential concepts apply to them. If tautologically implies then logically implies , but not conversely: logically implies , yet does not tautologically imply it, because and are distinct prime formulas.5

The following metatheorem reduces the whole deductive calculus to sentential tautological implication from .

The proof uses sentential compactness for a possibly uncountable language, since we never assumed the first-order language has only countably many symbols.

A worked deduction

Consider deducing, from no hypotheses, that a property holds of implies it holds of some element:

The existential is an abbreviation: is . The deduction has three lines.

#FormulaJustification
1axiom group 2: instance of with
2axiom group 1: contraposition tautology
3, i.e. modus ponens, lines 1 and 2

Line 1 is a group-2 instantiation: substituting the term for the quantified in gives , and is substitutable for there. Line 2 is a tautology by the truth table above. One application of modus ponens closes the deduction. The same three formulas, drawn as a pedigree tree, show modus ponens as a single node with the two axioms as inputs.

The same deduction as a pedigree tree; the two axioms feed one modus ponens node whose output is the theorem. Squashing the tree gives the linear deduction above.

Generalizing to prepends quantifiers, licensed by the generalization theorem. The derived rules replace these hand-drawn trees with reusable moves.

The choice of a syntactic axiom set

It might seem cleaner to take the set of all valid formulas as . Two objections rule it out.6 First, validity is a semantic notion, defined by quantifying over structures and truth. To prove that the validities are effectively enumerable we need to have a finitary, syntactic definition, one that inspects only the arrangement of symbols. Second, we want to be decidable, and the set of validities is not decidable (Church's theorem, reached in the incompleteness chapter). The six schemas meet both demands: membership in is a mechanical syntax check, run group by group.

The design succeeds only if the syntactic relation matches the semantic relation . That two-way match is the content of the soundness and completeness theorems. The metatheorems (deduction theorem, generalization, the derived rules) make the calculus usable by hand.

Footnotes

  1. Enderton, §2.2. Logical implication is truth in all models under all assignments; the deductive calculus of §2.4 is its finitary syntactic counterpart.
  2. Enderton, §2.4, opening remarks on what constitutes a proof: finiteness and effective checkability, with the promised compactness and enumerability theorems (proved in §2.5) as the necessary and sufficient conditions for finite proofs of logical implication to exist.
  3. Enderton, §2.4; contrast with the free generation of wffs in §1.4 and §2.3. A theorem never has a unique deduction, so its construction tree is not unique, unlike a formula's formation tree.
  4. Enderton, §2.4, Substitution; the atomic case is elaborated as Exercise 1 of that section.
  5. Enderton, §2.4, third remark on tautologies, and Exercise 3: a truth assignment on prime formulas extends to all wffs exactly as in Chapter 1, so tautological implication entails logical implication. Theorem 24B then reduces deducibility from to tautological implication from .
  6. Enderton, §2.4, Final Comments; the meta-language / object-language separation is Enderton's Figure 8.

╌╌ END ╌╌