The term "Hilbert system", or "Hilbert-style" deductive system, is sometimes used to describe a deductive system that generates theorems from axioms and inference rules,[4] [5] [6] especially if the only inference rule is modus ponens[7] [8] —which is identical to how other authors define what they call simply an "axiomatic system of logic",[9] [10] [11] with no adjective connecting it to Hilbert. In this context, "Hilbert systems" are contrasted with natural deduction systems, in which no axioms are used, only inference rules. Alternatively, Troelstra defines a "Hilbert system" as a system with axioms and with
{ → }E
{\forall}I
Most variants of axiomatic systems take a characteristic tack in the way they balance a trade-off between logical axioms and rules of inference.[1] Axiomatic systems can be characterised by the choice of a large number of schemes of logical axioms and a small set of rules of inference. Systems of natural deduction take the opposite tack, including many deduction rules but very few or no axiom schemata. The most commonly studied axiomatic systems have either just one rule of inference modus ponens, for propositional logics or two with generalisation, to handle predicate logics, as well and several infinite axiom schemes. Axiomatic systems for alethic modal logics, sometimes called Hilbert-Lewis systems, additionally require the necessitation rule. Some systems use a finite list of concrete formulas as axioms instead of an infinite set of formulas via axiom schemes, in which case the uniform substitution rule is required.
A characteristic feature of the many variants of axiomatic systems is that the context is not changed in any of their rules of inference, while both natural deduction and sequent calculus contain some context-changing rules. Thus, if one is interested only in the derivability of tautologies, no hypothetical judgments, then one can formalize the axiomatic system in such a way that its rules of inference contain only judgments of a rather simple form. The same cannot be done with the other two deductions systems: as context is changed in some of their rules of inferences, they cannot be formalized so that hypothetical judgments could be avoided not even if we want to use them just for proving derivability of tautologies.
In propositional logic, it is possible to perform proofs axiomatically, which means that certain tautologies are taken as self-evident and various others are deduced from them using modus ponens as an inference rule, and a rule of substitution. Alternatively, one uses axiom schemas instead of axioms, and no rule of substitution is used.
Although axiomatic proof has been used since the famous Ancient Greek textbook, Euclid's Elements of Geometry, in propositional logic it dates back to Gottlob Frege's 1879 Begriffsschrift.[18] Frege's system used only implication and negation as connectives, and it had six axioms, which were these ones:[19] [20]
a\supset(b\supseta)
(c\supset(b\supseta))\supset((c\supsetb)\supset(c\supseta))
(d\supset(b\supseta))\supset(b\supset(d\supseta))
(b\supseta)\supset(\nega\supset\negb)
\neg\nega\supseta
a\supset\neg\nega
These were used by Frege together with modus ponens and a rule of substitution (which was used but never precisely stated) to yield a complete and consistent axiomatization of classical truth-functional propositional logic.
Jan Łukasiewicz showed that, in Frege's system, "the third axiom is superfluous since it can be derived from the preceding two axioms, and that the last three axioms can be replaced by the single sentence
CCNpNqCpq
(\negp → \negq) → (p → q)
p\to(q\top)
(p\to(q\tor))\to((p\toq)\to(p\tor))
(\negp\to\negq)\to(q\top)
Just like Frege's system, this system uses a substitution rule and uses modus ponens as an inference rule. The exact same system was given (with an explicit substitution rule) by Alonzo Church,[21] who referred to it as the system P2,[22] and helped popularize it.
One may avoid using the rule of substitution by giving the axioms in schematic form, using them to generate an infinite set of axioms. Hence, using Greek letters to represent schemata (metalogical variables that may stand for any well-formed formulas), the axioms are given as:[23]
\varphi\to(\psi\to\varphi)
(\varphi\to(\psi\to\chi))\to((\varphi\to\psi)\to(\varphi\to\chi))
(\neg\varphi\to\neg\psi)\to(\psi\to\varphi)
The schematic version of P2 is attributed to John von Neumann, and is used in the Metamath "set.mm" formal proof database. It has also been attributed to Hilbert,[24] and named
l{H}
As an example, a proof of
A\toA
(A1)
(p\to(q\top))
(A2)
((p\to(q\tor))\to((p\toq)\to(p\tor)))
(A3)
((\negp\to\negq)\to(q\top))
And the proof is as follows:
A\to((B\toA)\toA)
(A\to((B\toA)\toA))\to((A\to(B\toA))\to(A\toA))
(A\to(B\toA))\to(A\toA)
A\to(B\toA)
A\toA
The crucial properties of this set of rules are that they are sound and complete. Informally this means that the rules are correct and that no other rules are required. These claims can be made more formal as follows.The proofs for the soundness and completeness of the propositional logic are not themselves proofs in propositional logic; these are theorems in ZFC used as a metatheory to prove properties of propositional logic.
We define a truth assignment as a function that maps propositional variables to true or false. Informally such a truth assignment can be understood as the description of a possible state of affairs (or possible world) where certain statements are true and others are not. The semantics of formulas can then be formalized by defining for which "state of affairs" they are considered to be true, which is what is done by the following definition.
We define when such a truth assignment satisfies a certain well-formed formula with the following rules:
With this definition we can now formalize what it means for a formula to be implied by a certain set of formulas. Informally this is true if in all worlds that are possible given the set of formulas the formula also holds. This leads to the following formal definition: We say that a set of well-formed formulas semantically entails (or implies) a certain well-formed formula if all truth assignments that satisfy all the formulas in also satisfy .
Finally we define syntactical entailment such that is syntactically entailed by if and only if we can derive it with the inference rules that were presented above in a finite number of steps. This allows us to formulate exactly what it means for the set of inference rules to be sound and complete:
Soundness: If the set of well-formed formulas syntactically entails the well-formed formula then semantically entails .
Completeness: If the set of well-formed formulas semantically entails the well-formed formula then syntactically entails .
For the above set of rules this is indeed the case.
(For most logical systems, this is the comparatively "simple" direction of proof)
Notational conventions: Let be a variable ranging over sets of sentences. Let and range over sentences. For " syntactically entails " we write " proves ". For " semantically entails " we write " implies ".
We want to show: (if proves, then implies).
We note that " proves " has an inductive definition, and that gives us the immediate resources for demonstrating claims of the form "If proves, then ...". So our proof proceeds by induction.
Notice that Basis Step II can be omitted for natural deduction systems because they have no axioms. When used, Step II involves showing that each of the axioms is a (semantic) logical truth.
The Basis steps demonstrate that the simplest provable sentences from are also implied by, for any . (The proof is simple, since the semantic fact that a set implies any of its members, is also trivial.) The Inductive step will systematically cover all the further sentences that might be provable—by considering each case where we might reach a logical conclusion using an inference rule—and shows that if a new sentence is provable, it is also logically implied. (For example, we might have a rule telling us that from "" we can derive " or ". In III.a We assume that if is provable it is implied. We also know that if is provable then " or " is provable. We have to show that then " or " too is implied. We do so by appeal to the semantic definition and the assumption we just made. is provable from, we assume. So it is also implied by . So any semantic valuation making all of true makes true. But any valuation making true makes " or " true, by the defined semantics for "or". So any valuation which makes all of true makes " or " true. So " or " is implied.) Generally, the Inductive step will consist of a lengthy but simple case-by-case analysis of all the rules of inference, showing that each "preserves" semantic implication.
By the definition of provability, there are no sentences provable other than by being a member of, an axiom, or following by a rule; so if all of those are semantically implied, the deduction calculus is sound.
(This is usually the much harder direction of proof.)
We adopt the same notational conventions as above.
We want to show: If implies, then proves . We proceed by contraposition: We show instead that if does not prove then does not imply . If we show that there is a model where does not hold despite being true, then obviously does not imply . The idea is to build such a model out of our very assumption that does not prove .
Thus every system that has modus ponens as an inference rule, and proves the following theorems (including substitutions thereof) is complete:
p\to(\negp\toq)
(p\toq)\to((\negp\toq)\toq)
p\to(q\to(p\toq))
p\to(\negq\to\neg(p\toq))
\negp\to(p\toq)
p\top
p\to(q\top)
(p\to(q\tor))\to((p\toq)\to(p\tor))
The first five are used for the satisfaction of the five conditions in stage III above, and the last three for proving the deduction theorem.
=As an example, it can be shown that as any other tautology, the three axioms of the classical propositional calculus system described earlier can be proven in any system that satisfies the above, namely that has modus ponens as an inference rule, and proves the above eight theorems (including substitutions thereof). Out of the eight theorems, the last two are two of the three axioms; the third axiom,
(\negq\to\negp)\to(p\toq)
For the proof we may use the hypothetical syllogism theorem (in the form relevant for this axiomatic system), since it only relies on the two axioms that are already in the above set of eight theorems.The proof then is as follows:
q\to(p\toq)
(q\to(p\toq))\to((\negq\to\negp)\to(q\to(p\toq)))
(\negq\to\negp)\to(q\to(p\toq))
(\negp\to(p\toq))\to((\negq\to\negp)\to(\negq\to(p\toq)))
(\negp\to(p\toq))
(\negq\to\negp)\to(\negq\to(p\toq))
(q\to(p\toq))\to((\negq\to(p\toq))\to(p\toq))
((q\to(p\toq))\to((\negq\to(p\toq))\to(p\toq)))\to((\negq\to\negp)\to((q\to(p\toq))\to((\negq\to(p\toq))\to(p\toq))))
(\negq\to\negp)\to((q\to(p\toq))\to((\negq\to(p\toq))\to(p\toq)))
((\negq\to\negp)\to((q\to(p\toq))\to((\negq\to(p\toq))\to(p\toq))))\to
(((\negq\to\negp)\to(q\to(p\toq)))\to((\negq\to\negp)\to((\negq\to(p\toq))\to(p\toq))))
((\negq\to\negp)\to(q\to(p\toq)))\to((\negq\to\negp)\to((\negq\to(p\toq))\to(p\toq)))
(\negq\to\negp)\to((\negq\to(p\toq))\to(p\toq))
((\negq\to\negp)\to((\negq\to(p\toq))\to(p\toq)))\to(((\negq\to\negp)\to(\negq\to(p\toq)))\to((\negq\to\negp)\to(p\toq)))
((\negq\to\negp)\to(\negq\to(p\toq)))\to((\negq\to\negp)\to(p\toq))
(\negq\to\negp)\to(p\toq)
=We now verify that the classical propositional calculus system described earlier can indeed prove the required eight theorems mentioned above. We use several lemmas proven here:
(DN1)
\neg\negp\top
(DN2)
p\to\neg\negp
(HS1)
(q\tor)\to((p\toq)\to(p\tor))
(HS2)
(p\toq)\to((q\tor)\to(p\tor))
(TR1)
(p\toq)\to(\negq\to\negp)
(TR2)
(\negp\toq)\to(\negq\top)
(L1)
p\to((p\toq)\toq)
(L3)
(\negp\top)\top
p\to(\negp\toq)
p\to(\negq\top)
(\negq\top)\to(\negp\to\neg\negq)
p\to(\negp\to\neg\negq)
\neg\negq\toq
(\neg\negq\toq)\to((\negp\to\neg\negq)\to(\negp\toq))
(\negp\to\neg\negq)\to(\negp\toq)
p\to(\negp\toq)
(p\toq)\to((\negp\toq)\toq)
(p\toq)\to((\negq\top)\to(\negq\toq))
(\negq\toq)\toq
((\negq\toq)\toq)\to(((\negq\top)\to(\negq\toq))\to((\negq\top)\toq))
((\negq\top)\to(\negq\toq))\to((\negq\top)\toq)
(p\toq)\to((\negq\top)\toq)
(\negp\toq)\to(\negq\top)
((\negp\toq)\to(\negq\top))\to(((\negq\top)\toq)\to((\negp\toq)\toq))
((\negq\top)\toq)\to((\negp\toq)\toq)
(p\toq)\to((\negp\toq)\toq)
p\to(q\to(p\toq))
q\to(p\toq)
(q\to(p\toq))\to(p\to(q\to(p\toq)))
p\to(q\to(p\toq))
p\to(\negq\to\neg(p\toq))
p\to((p\toq)\toq)
((p\toq)\toq)\to(\negq\to\neg(p\toq))
p\to(\negq\to\neg(p\toq))
\negp\to(p\toq)
\negp\to(\negq\to\negp)
(\negq\to\negp)\to(p\toq)
\negp\to(p\toq)
p\top
p\to(q\top)
(p\to(q\tor))\to((p\toq)\to(p\tor))
If a formula is a tautology, then there is a truth table for it which shows that each valuation yields the value true for the formula. Consider such a valuation. By mathematical induction on the length of the subformulas, show that the truth or falsity of the subformula follows from the truth or falsity (as appropriate for the valuation) of each propositional variable in the subformula. Then combine the lines of the truth table together two at a time by using "(is true implies) implies ((is false implies) implies)". Keep repeating this until all dependencies on propositional variables have been eliminated. The result is that we have proved the given tautology. Since every tautology is provable, the logic is complete.
It is possible to define another version of propositional calculus, which defines most of the syntax of the logical operators by means of axioms, and which uses only one inference rule.
Let,, and stand for well-formed formulas. (The well-formed formulas themselves would not contain any Greek letters, but only capital Roman letters, connective operators, and parentheses.) Then the axioms are as follows:
+ Axioms | |||
Name | Axiom Schema | Description | |
---|---|---|---|
\phi\to(\chi\to\phi) | Add hypothesis, implication introduction | ||
(\phi\to(\chi\to\psi))\to((\phi\to\chi)\to(\phi\to\psi)) | Distribute hypothesis \phi | ||
\phi\land\chi\to\phi | Eliminate conjunction | ||
\phi\land\chi\to\chi | |||
\phi\to(\chi\to(\phi\land\chi)) | Introduce conjunction | ||
\phi\to\phi\lor\chi | Introduce disjunction | ||
\chi\to\phi\lor\chi | |||
(\phi\to\psi)\to((\chi\to\psi)\to(\phi\lor\chi\to\psi)) | Eliminate disjunction | ||
(\phi\to\chi)\to((\phi\to\neg\chi)\to\neg\phi) | Introduce negation | ||
\phi\to(\neg\phi\to\chi) | Eliminate negation | ||
\phi\lor\neg\phi | Excluded middle, classical logic | ||
(\phi\leftrightarrow\chi)\to(\phi\to\chi) | Eliminate equivalence | ||
(\phi\leftrightarrow\chi)\to(\chi\to\phi) | |||
(\phi\to\chi)\to((\chi\to\phi)\to(\phi\leftrightarrow\chi)) | Introduce equivalence |
The inference rule is modus ponens:
\phi, \phi\to\chi | |
\chi |
The following is an example of a (syntactical) demonstration, involving only axioms and :
Prove:
A\toA
Proof:
(A\to((B\toA)\toA))\to((A\to(B\toA))\to(A\toA))
Axiom with
\phi=A,\chi=B\toA,\psi=A
A\to((B\toA)\toA)
Axiom with
\phi=A,\chi=B\toA
(A\to(B\toA))\to(A\toA)
From (1) and (2) by modus ponens.
A\to(B\toA)
Axiom with
\phi=A,\chi=B
A\toA
From (3) and (4) by modus ponens.
Let a demonstration be represented by a sequence, with hypotheses to the left of the turnstile and the conclusion to the right of the turnstile. Then the deduction theorem can be stated as follows:
If the sequence
\phi1, \phi2, ..., \phin, \chi\vdash\psi
has been demonstrated, then it is also possible to demonstrate the sequence
\phi1, \phi2, ..., \phin\vdash\chi\to\psi
This deduction theorem (DT) is not itself formulated with propositional calculus: it is not a theorem of propositional calculus, but a theorem about propositional calculus. In this sense, it is a meta-theorem, comparable to theorems about the soundness or completeness of propositional calculus.
On the other hand, DT is so useful for simplifying the syntactical proof process that it can be considered and used as another inference rule, accompanying modus ponens. In this sense, DT corresponds to the natural conditional proof inference rule which is part of the first version of propositional calculus introduced in this article.
The converse of DT is also valid:
If the sequence
\phi1, \phi2, ..., \phin\vdash\chi\to\psi
has been demonstrated, then it is also possible to demonstrate the sequence
\phi1, \phi2, ..., \phin, \chi\vdash\psi
If
\phi1, ..., \phin\vdash\chi\to\psi
then
1:
\phi1, ..., \phin, \chi\vdash\chi\to\psi
2:
\phi1, ..., \phin, \chi\vdash\chi
and from (1) and (2) can be deduced
3:
\phi1, ..., \phin, \chi\vdash\psi
by means of modus ponens, Q.E.D.
The converse of DT has powerful implications: it can be used to convert an axiom into an inference rule. For example, by axiom AND-1 we have,
\vdash\phi\wedge\chi\to\phi,
\phi\wedge\chi\vdash\phi,
\phi\wedge\chi | |
\phi |
It is common to include in an axiomatic system for logic only axioms for implication and negation. Given these axioms, it is possible to form conservative extensions of the deduction theorem that permit the use of additional connectives. These extensions are called conservative because if a formula φ involving new connectives is rewritten as a logically equivalent formula θ involving only negation, implication, and universal quantification, then φ is derivable in the extended system if and only if θ is derivable in the original system. When fully extended, an axiomatic system will resemble more closely a system of natural deduction.
\forallx(\phi\to\existsy(\phi[x:=y]))
\forallx(\phi\to\psi)\to\existsx(\phi)\to\psi
x
\psi
introduction:
\alpha\to(\beta\to\alpha\land\beta)
elimination left:
\alpha\wedge\beta\to\alpha
elimination right:
\alpha\wedge\beta\to\beta
introduction left:
\alpha\to\alpha\vee\beta
introduction right:
\beta\to\alpha\vee\beta
elimination:
(\alpha\to\gamma)\to((\beta\to\gamma)\to\alpha\vee\beta\to\gamma)
Because axiomatic logical systems have very few deduction rules, it is common to prove metatheorems that show that additional deduction rules add no deductive power, in the sense that a deduction using the new deduction rules can be converted into a deduction using only the original deduction rules.
Some common metatheorems of this form are:
\Gamma;\phi\vdash\psi
\Gamma\vdash\phi\to\psi
\Gamma\vdash\phi\leftrightarrow\psi
\Gamma\vdash\phi\to\psi
\Gamma\vdash\psi\to\phi
\Gamma;\phi\vdash\psi
\Gamma;lnot\psi\vdashlnot\phi
\Gamma\vdash\phi
\Gamma
\Gamma\vdash\forallx\phi
Following are several theorems in propositional logic, along with their proofs (or links to these proofs in other articles). Note that since (P1) itself can be proved using the other axioms, in fact (P2), (P3) and (P4) suffice for proving all these theorems.
(HS1)
(q\tor)\to((p\toq)\to(p\tor))
(L1)
p\to((p\toq)\toq)
(1)
((p\toq)\to(p\toq))\to(((p\toq)\top)\to((p\toq)\toq))
(2)
(p\toq)\to(p\toq)
(3)
((p\toq)\top)\to((p\toq)\toq)
(4)
(((p\toq)\top)\to((p\toq)\toq))\to((p\to((p\toq)\top))\to(p\to((p\toq)\toq)))
(5)
(p\to((p\toq)\top))\to(p\to((p\toq)\toq))
(6)
p\to((p\toq)\top)
(7)
p\to((p\toq)\toq)
(DN1)
\neg\negp\top
(DN2)
p\to\neg\negp
See proofs.
(L2)
(p\to(q\tor))\to(q\to(p\tor))
(1)
(p\to(q\tor))\to((p\toq)\to(p\tor))
(2)
((p\toq)\to(p\tor))\to((q\to(p\toq))\to(q\to(p\tor)))
(3)
(p\to(q\tor))\to((q\to(p\toq))\to(q\to(p\tor)))
(4)
((p\to(q\tor))\to((q\to(p\toq))\to(q\to(p\tor))))\to(((p\to(q\tor))\to(q\to(p\toq)))\to((p\to(q\tor))\to(q\to(p\tor))))
(5)
((p\to(q\tor))\to(q\to(p\toq)))\to((p\to(q\tor))\to(q\to(p\tor)))
(6)
q\to(p\toq)
(7)
(q\to(p\toq))\to((p\to(q\tor))\to(q\to(p\toq)))
(8)
(p\to(q\tor))\to(q\to(p\toq))
(9)
(p\to(q\tor))\to(q\to(p\tor))
(HS2)
(p\toq)\to((q\tor)\to(p\tor))
(1)
(q\tor)\to((p\toq)\to(p\tor))
(2)
((q\tor)\to((p\toq)\to(p\tor)))\to((p\toq)\to((q\tor)\to(p\tor)))
(3)
(p\toq)\to((q\tor)\to(p\tor))
(TR1)
(p\toq)\to(\negq\to\negp)
(TR2)
(\negp\toq)\to(\negq\top)
(1)
(\negp\toq)\to(\negq\to\neg\negp)
(2)
\neg\negp\top
(3)
(\neg\negp\top)\to((\negq\to\neg\negp)\to(\negq\top))
(4)
(\negq\to\neg\negp)\to(\negq\top)
(5)
(\negp\toq)\to(\negq\top)
(L3)
(\negp\top)\top
(1)
\negp\to(\neg\neg(q\toq)\to\negp)
(2)
(\neg\neg(q\toq)\to\negp)\to(p\to\neg(q\toq))
(3)
\negp\to(p\to\neg(q\toq))
(4)
(\negp\to(p\to\neg(q\toq)))\to((\negp\top)\to(\negp\to\neg(q\toq)))
(5)
(\negp\top)\to(\negp\to\neg(q\toq))
(6)
(\negp\to\neg(q\toq))\to((q\toq)\top)
(7)
(\negp\top)\to((q\toq)\top)
(8)
q\toq
(9)
(q\toq)\to(((q\toq)\top)\top)
(10)
((q\toq)\top)\top
(11)
(\negp\top)\top