Several times in my studies, I've come across Hilbert-style proof systems for various systems of logic, and when an author says, "Theorem: $\varphi$ is provable in system $\cal H$," or "Theorem: the following axiomatizations of $\cal H$ are equivalent: ...," I usually just take the author's word as an oracle instead of actually trying to construct a Hilbert-style proof (can you blame me?). However, I would like to change this habit and least be in a position where I could check these claims in principle.

On the few occasions where I actually did try to construct a (not-so-short) Hilbert-style proof from scratch, I found it easier to first construct a proof in the corresponding natural deduction system, show that the natural deduction system and the Hilbert system were equivalent, and then try to deconstruct the natural deduction system into a Hilbert-style proof (in the style of Anderson and Belnap). The problem with that (apart from being tortuous) is that I would need the natural deduction system first, and it's not always obvious to me how to construct the natural deduction system given the axioms (sometimes it's not so bad; it's easy to see, for instance, that $(A \rightarrow (A \rightarrow B)) \rightarrow (A \rightarrow B)$ corresponds to contraction; but it's not always that easy...).

So I'm wondering: are there "standard tricks" for constructing Hilbert-style proofs floating around out there? Or are there tricks for constructing a corresponding natural deduction system given a set of Hilbert axioms? Or is it better to just accept proof-by-oracle?

  • $\begingroup$ J. Jay Zeman has some notes on condensed detachment here clas.ufl.edu/users/jzeman/modallogic/chapter01.htm. Reading through them, they look comprehensive. $\endgroup$ Jun 12, 2013 at 15:43
  • $\begingroup$ If you don't have the deduction metatheorem, if the system has modus ponens, you can still use the resolution theorem (if |-C$\alpha$$\beta$, then "From |-$\alpha$, infer |-$\beta$".) For many axioms of Hilbert systems you can derive several rules of inference for each axiom if you do this as much as possible. You can also combine these rules in certain cases. Then you can see certain formulas as provable, and use those derived rules (and combinations of them) to help you construct Hilbert style proofs. I got this idea from looking at old papers of Wajsberg. $\endgroup$ Jul 31, 2013 at 3:51
  • $\begingroup$ Every-time I think about this question it seems harder and harder to answer. I currently have Prover9 running trying to prove EEpEqrEEpqr, and EEpqEqp in an axiomatic system which gives me ready-made access to a Natural Deduction system and working with negations pose no major difficulty, at least to my mind. I can prove both of those in the natural deduction system, but Prover9 has run for 10,778 seconds now, and generated over 1.8 billion theorems. It hasn't gotten either theorem. On top of this, there's the whole problem lurking in the background of writing proofs with variable functors. $\endgroup$ Sep 11, 2013 at 4:33
  • $\begingroup$ And I'm just talking about propositional calculi here. $\endgroup$ Sep 11, 2013 at 4:35
  • $\begingroup$ I am currently implementing a Hilbert-style proof checker and the basics of ZFC with it (in the math folder). I wrote all proofs without going through natural deduction first and it went fine :) $\endgroup$
    – V. Semeria
    Apr 14, 2018 at 12:40

12 Answers 12


Regarding "tricks for constructing a corresponding natural deduction system given a set of Hilbert axioms": Constructing natural deduction systems corresponding to axiomatic propositional or first-order systems isn't too hard when most of the axioms have fairly clear 'meanings', but I think it gets a bit tricker with nonclassical logics. Pelletier & Hazen's Natural Deduction gives a good overview of some different types of natural deduction systems. See, in particular, §2.3, pp. 6–12, The Beginnings of Natural Deduction: Jaśkowski and Gentzen (and Suppes) on Representing Natural Deduction Proofs. I think that there are three types of natural deduction systems that should be considered (in order of increasing ease of translation from the natural deduction system to the axiomatic system): Gentzen-style; Fitch-style (Jaśkowski's first method); and Suppes-style (Jaśkowski's second method).

Gentzen-style Natural Deduction

Gentzen-style natural deduction use proof trees composed of instances of inference rules. Inference rules typically look like this:

$$ \begin{array}{c} A \quad B \\ \hline A \land B \end{array}\land I \qquad \begin{array}{c} A \\ \hline A \lor B \end{array}\lor I \qquad \begin{array}{c} [A] \\ \vdots \\ B \\ \hline A \to B \end{array}\to I $$

A significant difference between axiomatic systems and Gentzen-style natural deduction is that intermediate deductions can be cited by any later line in an axiomatic system, but can only used once in a proof tree. For instance, to prove $(P \land Q) \land P$ from $P \land Q$ requires three instances of the assumption $P \land Q$ in a proof tree:

$$ \frac{\displaystyle \frac{\displaystyle \frac{[P \land Q]}{Q} \quad \frac{[P \land Q]}{P}}{Q \land P} \quad \frac{[P \land Q]}{P} }{ (Q \land P) \land P } $$

There's no way to reuse the intermediate deduction of $P$ from $P \land Q$. A naïve translation of a proof tree into corresponding axiomatic deductions will probably be pretty verbose with lots of repeated work (but it would be easy to check for and eliminate redundant deductions in the axiomatic proof). A very nice benefit of these systems, however, is that it is very easy to determine where a rule can be applied, and whether a formula is "in-scope" for use as a premise. Fitch-style and Suppes-style systems are more complicated in this regard.

Fitch-style Natural Deduction Systems

Fitch-style natural deduction systems for propositional logic have a type of subproof for conditional introduction. These capture "Suppose $\phi$. … $\psi$. Therefore (no longer supposing $\phi$), $\phi \to \psi$.) Even in this simplest type of subproof, the natural deduction has proof-construction rules about how lines in subproofs may be cited (e.g., a line outside of a subproof can't cite lines within the subproof). Still, unlike proof trees, some reusability is gained. For instance, in the Barwise & Etchemendy's Fitch (from Language, Proof, and Logic), would simplify the proof by reusing the deduction of $P$ from $P \land Q$:

    • $P \land Q$ Assume.
    • $P$ by conjunction elimination with 1.
    • $Q$ by conjunction elimination with with 1.
    • $Q \land P$ by conjunction introduction with 2 and 3.
    • $(Q \land P) \land P$ by conjunction introduction with 2 and 4.

Some presentations allow for conditional introduction from any line top-level line within a subproof. In these presentations, not only can intermediate deductions be reused, but entire subproofs:

    • $P \land Q$ Assume.
    • $P$ by conjunction elimination with 1.
    • $Q$ by conjunction elimination with with 1.
  1. $(P \land Q) \to P$ by conditional introduction with 1–3.
  2. $(P \land Q) \to Q$ by conditional introduction with 1–3.

In the first-order case, not only are there subproofs for conditional introduction, but there are subproofs for introducing new 'temporary' individuals (e.g., generic instances for universal introduction, or witnesses for existential elimination). These subproofs require special rules about where the individual of concern may appear.

Kenneth Konyndyk's Introductory Modal Logic gives Fitch-style natural deduction systems for T, S4, and S5. In addition to a condtional introduction, these have modal subproofs for necessity-introduction, and those subproofs require special rules for reiterating formulae into the subproof. For instance, in T, only a modal formula $\Box \phi$ can be reiterated into a subproof, and when it does, the $\Box$ is dropped. That is, when $\Box \phi$ is outside a subproof, $\phi$ can be reiterated in (but only through one 'layer' of subproof). In S4, $\Box\phi$ can still be reiterated into a modal subproof, but the $\Box$ need not be dropped. In S5 both $\Box\phi$ and $\Diamond\phi$ can be reiterated into a modal subproof, and neither modality needs to be dropped.

The point to all this is that in the propositional case, many Hilbert-style axioms correspond nicely to Fitch-style natural deduction style rules, but it seems that the nicest cases are those for boolean connectives. E.g.,

$$ A \to \left( A \lor B \right) $$


$$ A \to \left( B \to (A \land B)\right) $$

turn into "left disjunction introduction" and "conjunction introduction" pretty easily. However, more complicated axiom schemata (such as what would be used for universal introduction, or modal necessitation) that really require new types of subproofs for good natural deduction treatment are trickier to handle nicely.

Suppes-style Natural Deduction Systems

There are, of course, other formalizations of natural deduction than Fitch's. Some of these might make for easier translation from axiomatic systems. For instance, consider a proof of $(A \to (B \to (A \land B))) \land (B \to (A \to (A \land B)))$. In a Fitch-style proof, the left conjunct, $A \to \dots$, would have to be proved in a subproof assuming $A$ containing a subproof containing $B$:

    • Assume $A$.
      • Assume $B$.
      • $A \land B$ by conjunction introduction with 1 and 2.
    • $B \to (A \land B)$ by conditional introduction with 2–3.
  1. $A \to (B \to (A \land B))$ by conditional introduction with 1–4.

Then another five lines are needed to get $B \to (A \to (A \land B))$, and an eleventh for the final conjunction introduction. In Suppes's system, this is shorter (eight lines) because any in-scope assumption can be discharged by conditional introduction, so we can "get out of the subproofs" in different orders:

  1. {1} $A$ Assume.
  2. {2} $B$ Assume.
  3. {1,2} $A \land B$ $\land$-introduction with 1 and 2.
  4. {1} $B \to (A \land B)$ $\to$-introduction with 3.
  5. {} $A \to (B \to (A \land B))$ $\to$-introduction with 4.
  6. {2} $A \to (A \land B)$ $\to$-introduction with 3.
  7. {} $B \to (A \to (A \land B))$ $\to$-introduction with 4.
  8. {} $(A \to (B \to (A \land B))) \land (B \to (A \to (A \land B)))$ $\land$-introduction with 5 and 7.

(Note: some implementations of Fitch's system allow this for conditional introduction as well. E.g., in Fitch from Barwise and Etchemendy's Language, Proof and Logic conditional introduction can cite a subproof that starts with an assumption $A$ and contains lines $B$ and $C$ to infer both $A \to B$ and $A \to C$.)

To use this approach, each inference rule must also specify how the set of tracked assumptions for its conclusion is determined based on the premises of the rule. For most rules, the assumptions of a conclusion are just the union of the assumptions of the premises. Conditional introduction is the obvious exception. This approach also specifies that only lines with empty assumption sets are theorems.

This "tracking" approach, though, can be used for other properties too. The same considerations apply: each rule must specify how the tracked properties of the conclusion are computed from the premises, and the proof system must define which sentences are theorems.

For instance, in a system for first-order logic, the set of new individuals (for universal generalization or existential elimination) can be tracked, with most rules giving their conclusion the "union of the premises' individuals", with existential elimination and universal introduction the exceptions. Theorems are those sentences with an empty set of individuals and an empty set of assumptions.

This approach works nicely for modal logics, too. A Suppes-style proof system for K, for instance, in addition to tracking assumptions, tracks a "modal context", which is a natural number or $\infty$. The modal context indicates how many "necessitation contexts" we're in (intuitively, how many times we should be able to apply necessity introduction to a formula). In terms of Kripke semantics, the modal context is how far removed from the designated world we are. Sentences without any assumptions have context $\infty$, corresponding to the $\vdash \phi / \vdash \Box\phi$ rule. The inference rules require that their premises have compatible modal contexts (i.e., all non-$\infty$ modal contexts are the same). The default modal propagation is that the context of the conclusion is the same as the minimum context of the premises. The exceptions are that $\Box$ introduction subtracts 1, and $\Box$ elimination adds 1. Theorems are those sentences that have no assumptions and modal context $\infty$.

  1. {1} (0) $\Box P$ Assume.
  2. {2} (0) $\Box (P \to Q)$ Assume.
  3. {1} (1) $P$ $\Box$-elimination with 1.
  4. {2} (1) $P \to Q$ $\Box$-elimination with 2.
  5. {1,2} (1) $Q$ $\to$-elimination with 3 and 4.
  6. {1,2} (0) $\Box Q$ $\Box$-introduction with 5.
  7. {2} (0) $\Box P \to \Box Q$ $\to$-introduction with 6.
  8. {} ($\infty$) $\Box(P \to Q) \to (\Box P \to \Box Q)$ $\to$-introduction with 7.

In Suppes-style proof systems, the question is no longer about reiteration rules, about about property tracking and propagation rules. The purposes are similar, but in practice, certain kinds of axiomatic systems might be easier to translate into one kind or another.

  • 1
    $\begingroup$ It's not far along enough to promote as an answer, but some of my academic work in proof translation should eventually help in addressing one of your questions, i.e., being able to write the natural deduction version of a proof and get back the axiomatic version. Maybe I'll come back and update my answer in a few months! :) $\endgroup$ Apr 29, 2013 at 0:40
  • 1
    $\begingroup$ @DougSpoonwood To the first comment: (i) In my experience, natural deduction systems usually do not include a replacement rule, but just a pair of rule for each logical symbol, replacement (though valid) probably wouldn't be available there. (ii) even if replacement were available, we needed $(A\to(B\to(A\land B)))\land (B\to(A\to(A\land B)))$, where the the final antecedent on each conjunct is $A\land B$, but using replacement on the first and applying conjunction introduction would result in $A\land B$ and $B\land A$, but we want $A\land B$ and $A\land B$. $\endgroup$ Jun 9, 2013 at 12:41
  • 1
    $\begingroup$ @DougSpoonwood Ah, the E was “equivalence,“ and A was not “and”; that makes things clearer. The first formula, CCpqEpq still isn't a theorem though—just let p be false and q be true, then Cpq is true, and Epq is false, so CCpqEpq is false. $\endgroup$ Jun 11, 2013 at 4:37
  • 1
    $\begingroup$ @JoshuaTaylor I awarded the bonus, because otherwise the bonus gets lost completely, and the answer has prommise and to support you with your academic work, see also math.stackexchange.com/questions/465640/… $\endgroup$
    – Willemien
    Aug 20, 2013 at 9:12
  • 1
    $\begingroup$ @Willemien Thanks! I hadn't looked at this question for a while, and didn't know there was a bounty on it. I'm not averse to updating it over time; are there some particular questions or topics that you're hoping for more elaboration upon? Also, thanks for the reference to the other question! $\endgroup$ Aug 20, 2013 at 13:12

It's a long list of postings, a lot of it in Polish notation that is hard to read. Anyway, the systematic way to do it is to define a translation algorithm from derivations in ND to derivations in axiomatic logic. This is done in my recent "Elements of Logical Reasoning" section 3.6.(c). ND is there written in SC notation with the open assumptions displayed at the left of a turnstile.

I don't know if anyone ever mastered fully axiomatic logic. Russell was very bad at it, didn't even notice that one of his axioms was in fact a theorem! I needed the translation to be able to produce some of the more elaborate axiomatic derivations. Would be nice if someone implemented the algorithm.

  • 2
    $\begingroup$ I find two difficulties with this answer. First what the translation algorithm is can vary in the first place. Why? Because there exist different meta-proofs of the meta-deduction theorem... the posts I've written for this question use a slightly different procedure than what I did here in May 2014 math.stackexchange.com/questions/90340/… . Second, such an algorithm has to exist in the first place. There is no such algorithm for say Lukasiewicz infinite or three-valued logic. $\endgroup$ May 11, 2014 at 5:20
  • 1
    $\begingroup$ @Doug Spoonwood The standard method to construct a Hilbert Style proof from a Natural Deduction proof is so called Bracket Abstraction. It appeared for example in Curry and Feys, Combinatory Logic, 1958. But you are probably right, there might be some correspondence between different takes on the deduction theorem and different takes on Bracket Abstraction. Did not yet see it from this perspective, interesting. $\endgroup$
    – user4414
    Dec 14, 2020 at 0:14

What works quite well, for small examples, is iterative deepening search strategy. This strategy will have the additional benefit, that it finds smaller proofs first. A little Prolog program that does such a search is seen here:

:- use_module(library(term/herbrand)).

hilbert(B, 'ax-mp'(P,Q,A), N) :-
   N > 0, M is N-1,
   hilbert((A->B), P, M),
   hilbert(A, Q, M).
hilbert((A->_->A), 'ax-1', _).
hilbert(((A->B->C)->(A->B)->(A->C)), 'ax-2', _).

sto/1 is a constraint, that puts the argument under subject to occurs check. This is to avoid that cyclic propositional formulas are created during proof search. Here is an example proof, found by this program:

1   ax-2    (p->(u->p)->p)->(p->u->p)->p->p
2   ax-1    p->(u->p)->p
3 1,2   ax-mp   (p->u->p)->p->p
4   ax-1    p->u->p
5 3,4   ax-mp   p->p

Edit 14.12.2020:
There is a sequel, not using the Jekejeke Prolog specific sto/1 anymore, but rather the ISO core standard unify_with_occurs_check/2:

hilbert(B, 'ax-mp'(P,Q,A), N) :-
   N > 0, M is N-1,
   hilbert((A->B), P, M),
   hilbert(A, Q, M).
hilbert(X, 'ax-1', _) :- 
   unify_with_occurs_check(X, (A->_->A)).
hilbert(X, 'ax-2', _) :- 
   unify_with_occurs_check(X, ((A->B->C)->(A->B)->(A->C))).

In propositional logic, the deduction metatheorem gives you a procedure to convert (a fair amount, at least) natural deduction proofs into Hilbert style proofs, given that the Hilbert system has

1) CqCpq as a theorem or an axiom schema,


2) CCpCqrCCpqCpr as a theorem or an axiom schema,


3) You can join axiom schema to the Hilbert-style system which you obtain from using the deduction metatheorem on the natural deduction inference rules for the connectives A, K, E, (and see the added part for N... it works a bit differently), or you already have those formulas as axioms as theorems. For instance, for the disjunction elimination (or A-out) rule we first insist that on a rule which doesn't say anything about subproofs, but instead uses conditionals (which is "basically equivlaent" by the conditional introduction rule to a subproof rule). So, in sequent notation the appropriate A-out rule goes

Apq, Cpr, Cqr |-r.

Thus, by using the deduction metatheorem a few times, we can obtain the axiom schema CApqCCprCCqrr, which allows us to rewrite a proof (o. k. this isn't the whole proof) like (Apq, CpCqq, CqCqq, Cqq) which uses the A-out rule as (Aab, CaCbb, CbCbb, CAabCCaCbbCCbCbbCbb, CCaCbbCCbCbbCbb, CCbCbbCbb, Cbb), which supposing we have Aab, CaCbb, and CbCbb consists of a proof which now just uses modus ponens and the new axiom schema.

Since all axiom schema obtained from natural deduction rules come as conditionals, this means that all steps in a natural deduction proof can get rewritten such that every step is either an instance of axiom (or theorem) schema, or follows from instances of axiom schema by modus ponens. The in-most subproofs get rewritten first. Note that each subproof in a natural deduction proof in a Fitch-Jaskowski style proof has only one assumption.

As a better example, for the natural deduction proof:

 1 |  Kab assumption
 2 || a assumption
 3 || b 1 K-out-right (Kpq|-q)
 4 |  Cab 2-3 C-in
 5    CKabCab

we'll first want to ignore any parts were we used the C-in rule unless we introduce assumptions after using C-in rule. We used the K-out rule in step 3, so we'll need to convert the deduction of that into a form that uses modus ponens only. So, we'll need the axiom schema CKpqq. Thus, the modus-ponens only natural deduction version goes without any uses of the C-in rule:

 1' |  Kab assumption
 2' || a assumption
 3' || CKabb instance of CKpqq
 4' || b 1, 3 modus ponens

Then lines 1-4 can converted using axiom schema 1) and 2) into CaKab, Caa, CaCKabb, and Cab as follows:

 1  | Kab assumption
 2  | CKabCaKab 1) q/Kab, p/a
 3  | CaKab 1, 2 modus ponens (see 1' above)
 4  | CaCCaaa 1) q/a, p/Caa (meaning q is substituted with a in axiom schema 1)
 5  | CCaCCaaaCCaCaaCaa 2) p/a, q/Caa, r/a
 6  | CCaCaaCaa 4, 5 modus ponens
 7  | CaCaa 1) q/a, p/a
 8  | Caa 6, 7 modus ponens (see 2' above)
 9  | CKabb instance of CKpqq
 10 | CCKabbCaCKabb 1) q/CKabb, p/a
 11 | CaCKabb 9, 10 modus ponens (see 3' above)
 12 | CCaCKabbCCaKabCab 2) p/a, q/Kab, r/b
 13 | CCaKabCab 11, 12 modus ponens
 14 | Cab 3, 13 modus ponens (see 4' above)

Now, using 1) and 2) we can derive CKabKab in 5 steps. And we can derive each of CKabCKabCaKab, CKabCaKab, CKabCaCCaaa, CKabCCaCCaaaCCaCaaCaa, CKabCCaCaaCaa, CKabCaCaa, CKabCaa, CKabCKabb, CKabCCKabbCaCKabb, CKabCaCKabb, CKabCCaCKabbCCaKabCab, CKabCCaKabCab, CKabCab using the deduction metatheorem and axiom schema 1) and 2), in 3 steps.

If the consequent y of one of these formulas Cxy is an instance axiom schema, then we can derive Cxy by writing:

 a: y instance of axiom schema.
 b: CyCxy instance of axiom schema 1)
 c: Cxy a, b modus ponens.

If the consequent y of one of these formulas Cxy is a result of modus ponens in the previous scoped proof, then we already have Cjx and CjCxy in the new proof where j is the assumption of the subproof (here j is Kab). The antecedent of CCpCqrCCpqCpr is CpCqr, which suggests the following steps:

 d: CCjCxyCCjxCjy instance of axiom schema 2)
 e: CCjxCjy d, CjCxy modus ponens since you have CjCxy in the new derivation
 f: Cjy e, Cjx modus ponens, since you have Cjx in the new derivation

Once you expand that out, you have a complete proof in the pure Hilbert style axiom system using only the axiom schema, the uniform rule of substitution, and modus ponens... which takes up 44 lines of text.

Added: Negations

Let's say your negation introduction (N-in) rule reads:

"From a derivation which starts with p and ends with KqNq, we may infer Np [emphasis added]." or more shortly, "p, ..., KqNq|-Np" ("..." could come as empty and p could be the same as KqNq).

So, with that rule, you can write a natural deduction proof like the following:

 1 |  a assumption
 2 || Na assumption
 3 || KaNa 2, 1 K-in
 4 |  NNa 2-3 N-in
 5    CaNNa 1-4 C-in

But, that comes as fairly useless when looking for a proof which we can use the procedure from the demonstration of the deduction metatheorem on. So, let's try something different:

 1 |  a assumption
 2 || Na assumption
 3 || KaNa 2, 1 K-in
 4 |  CNaKaNa 2-3 C-in

But, what use is step 4? Well, consider the following derivation, which I'll post since you might not have seen its theorem before.

 1 |  CpKqNq assumption
 2 || p assumption
 3 || KqNq 2, 1 C-out
 4 |  Np 2-3 N-in
 5    CCpKqNqNp 1-4 C-in

Thus, CNaKaNa is the antecedent of a substitution instance of CCpKqNqNp, where p/Na, q/a. So, you can use CCpKqNqNp as an axiom schema for changing a natural deduction proof which uses a negation introduction rule into a modus ponens only proof. For our particular example we can then write:

 1 |  a assumption
 2 || Na assumption
 3 || CaCNaKaNa axiom schema CpCqKpq, p/a, q/Na
 4 || CNaKaNa 1, 3 modus ponens
 5 || KaNa 2, 4 modus ponens
 6 |  CNaKaNa 2-5 C-in
 7 |  CCNaKaNaNNa schema CCpKqNqNp, p/Na, q/a
 8 |  NNa 6, 7 modus ponens
 9    CaNNa 1-8 C-in

Thus using the conversion procedure we can obtain:

 1  | a assumption
 2  | CaCNaa 1), p/a, q/Na
 3  | CNaa 1, 2 modus ponens (CNa1 above)
 4  | CNaCCNaNaNa 1) p/Na, q/CNaNa
 5  | CCNaCCNaNaNaCCNaCNaNaCNaNa 2) p/Na, q/CNaNa, r/Na     
 6  | CCNaCNaNaCNaNa 4, 5 modus ponens
 7  | CNaCNaNa 1), p/Na, q/Na
 8  | CNaNa 7, 6 modus ponens (CNa2 above)
 9  | CCaCNaKaNaCNaCaCNaKaNa 1), p/CaCNaKaNa, q/Na
 10 | CaCNaKaNa schema CpCqKpq p/a, q/Na
 11 | CNaCaCNaKaNa 9, 10 modus ponens (CNa3 above)
 12 | CCNaCaCNaKaNaCCNaaCNaCNaKaNa 2), p/Na, q/a, r/CNaKaNa
 13 | CCNaaCNaCNaKaNa 11, 12 modus ponens
 14 | CNaCNaKaNa 3, 13 modus ponens (CNa4 above)
 15 | CCNaCNaKaNaCCNaNaCNaKaNa 2) p/Na, q/Na, r/KaNa
 16 | CCNaNaCNaKaNa 14, 15 modus ponens
 17 | CNaKaNa 8, 16 modus ponens (CNa5 above, as well as 6 above)
 18 | CCNaKaNaNNa axiom schema CCpKqNqNp, p/Na, q/a (7 above)
 19 | NNa 17, 18 modus ponens (8 above)

Then applying the conversion procedure again, you can get CaNNa for any system which has the following axiom/theorem schema set {CqCpq, CCpCqrCCpqCpr, CpCqKpq, CCpKqNqNp} and modus ponens as a rule of inference.

If your negation-out rule reads "From NNp, (you may) infer p", then the axiom/theorem schema you'll want is CNNpp, and in that case things work out more like how the other connectives work out.

On the other hand, if your negation-out rule reads something like "Np, ..., KqNq|-p", then you can use CCNpKqNqp (I'll supply a proof if you like) as the axiom/theorem schema for the modus ponens only proof, and things work out like the negation-introduction rule above.

Also, if you convert a bunch of formulas like this, you might want to start using symbols as shorthands at points in the proof for particular formulas, such as letter Greek letters stand for Cpq or CCprApr or #, %, ^, or whatever for KAprCpr.


The standard method to construct a Hilbert Style proof from a Natural Deduction proof is so called Bracket Abstraction. It appeared for example in Curry and Feys, Combinatory Logic, 1958. You can extract a Lambda Expression from a Natural Deduction proof for example:

     -------- (id)
      p |- p 
   ------------ (->I)
    p |- q -> p
   ---------------- (->I)
   |- p -> q -> p

The (id) corresponds to a variable in a Lambda Expression and the (->) corresponds to abstraction in a Lambda Expression. The above proof has the Lambda Expression λx.λy.x. For more details see the Curry-Howard isomorphism.

Bracket Abstraction can turn a Lambda Expression into an SKI Expression. And an SKI Expression corresponds to a Hilbert Style proof. But Bracket Abstraction can be difficult. One attempt might lead to S(KK)I which is this odd proof:

1. ax-2: (p -> p -> q -> p) -> (p -> p) -> p -> q -> p
2. ax-1: (p -> q -> p) -> p -> p -> q -> p
3. ax-1: p -> q -> p
4. ax-mp(2, 3): p -> p -> q -> p
5. ax-mp(1, 4): (p -> p) -> p -> q -> p
6. ax-0: p -> p
7. ax-mp(5, 6): p -> q -> p

If a little bit more is invested into the Bracket Abstraction the result might be the combinator K, and thus telling us that the Natural Deduction proof is already a Hilbert Style axiom in a certain axiomsystem.

Braket Abstraction can be put on the computer like here.


If I've understood its proof correctly, and I will admit that I can't do much more than see that the proof does work, if you have Cpp, CCpqCCqrCpr, CCpqCCrpCrq (equivalently CCqpCCprCqr), then what Zeman calls the principle of semi-semisubstitutivity will hold, and others have called something else (Halleck mentions Anderson and Belnap knowing it and calling it something else... but you've only mentioned them in connection to the Deduction Theorem here... if I understand the proof correctly, semi-substitutivity of implication can hold without the Deduction Thereom). I don't understand it to the point where I know how to use it and provide you with an example at this point.


The simplest "trick" here might seem like no trick at all... but I think it too useful to pass up. You could get on a computer and use an automated theorem prover like Prover9, and its companion Mace4. Then you read the deductions that the automated theorem prover gives you. I want to emphasize that I'm NOT suggesting that you take the proof/counterexample generated by the computer as necessarily true or some sort of oracle. You just use the automated theorem prover to check and see if the claim does hold. In other words, study carefully the symbols the automated theorem prover gives you. Perhaps you'll even learn how to better create proofs of your own for Hilbert systems this way.


I guess the first thing we want to recall here goes that if we want to prove theorem "t" in a Hilbert-system with modus ponens and uniform substitution as the only rules of inference, then we have to find Cxt as a theorem and x as a theorem. If we have more rules of inference, then things become more complicated. However, if we can confine our attention to the family of systems MP with just modus ponens and uniform substitution as rules of inference for a moment, I think we can get more insight into things. Since in MP we need to find x, we basically want to find some lemma to prove t. Consequently, your question then your excellent question becomes "if wanting to prove theorem t in a Hilbert system, how do we get good lemmas to help prove t?"

If we have the deduction meta-theorem, then we can clearly generate a whole class of lemmas. But, as my first answer and your excellent question indicate, the deduction meta-theorem generates all too many lemmas and enough of them don't seem all that good in proving a theorem t. The deduction meta-theorem for a system with {CqCpq, CCpCqrCCpqCpr} as its axioms doesn't just generate 2/3 of its theorems as substitution instances of CqCpq and CCpCqrCCpqCpr, it also will generate a substitution instance of the theorem of identity Cpp, as well as possibly other instances of CqCpq or CCpCqrCCpqCpr. On top of that, the deduction meta-theorem isn't always provable in an MP system. For instance, the three systems with axiom sets {CCpqCCqrCpr}, {CpCNpq}, and {CCNppp} don't have the deduction meta-theorem available. Well, my intuition tells me that you won't have it in {CCpqCCqrCpr}, but I know that you won't have it in {CpCNpq} and {CCNppp}.

For {CCNppp}, only formulas which can get obtained via substitution exist. No detachable formulas exist in such a system. How do I know this? Given the (meta) derivable rule of inference of condensed detachment for any MP system, it follows that every theorem of {CCNppp} is nothing more than a substitution instance of {CCNppp}. The antecedent of CCNppp is CNpp, and if CCNppp is the only axiom available, then the form of CCNppp must match the form of CNpp by substitution in some way. But, that is absurd, and thus nothing can get detached from CCNppp. So, only substitution instances of CCNppp exist in {CCNppp}. We can somewhat similarly reason that every theorem which can get obtain via detachment in {CpCNpq} is a substitution instance of the sequence S (CpCNpq, CNCpCNpqr, CNCNCpCNpqrs, CNCNCNCpCNpqrst, ...), since if theorem b appears later than theorem a in S, then if we assume b as the major premise in some theorem Dba, where D indicates the condensed detachment operation, we have an absurdity. So, the deduction meta-theorem won't hold.

Condensed detachment, once understood, will give you the most general theorems L available for an MP system, in the sense that all other theorems T of that MP system come as dervivable from the set of theorems of L, while the converse fails. If I understand condensed detachment correctly, given any two theorems condensed detachment also mechanically gives you a theorem of L, though it might take some practice with it to observe this.

So, basically for MP systems condensed detachment will generate what appears like a manageable set of lemmas to prove any theorem t. Yes, condensed detachment, given a countable infinity of variables, can generate a countable infinity of theorems. But, condensed detachment generates only the most general theorems, and probably can get said to generate theorems more slowly than the deduction metatheorem, possibly making it easier to find relevant lemmas for a theorem you want to prove in an MP system.

If you want a simple exercise to help you get started here in investigating propositional Hilbert-systems, I'll say that for {CCpqCCqrCpr} we can derive CCpqCCCprsCCqrs. I'll put a hint which makes things easier in the comments below.

  • $\begingroup$ You can derive CCpqCCCprsCCqrs from CCpqCCqrCpr using just one lemma and condensed detachment. $\endgroup$ Jun 13, 2013 at 1:18

I use Polish notation.

I think we would do better to look at particular examples in order to get a handle on this question. How you can construct a proof varies to some extent depending on the Hilbert system you're looking at. Some Hilbert systems, like the definition-free equivalential calculus, as well as definition-free Hilbert systems with only the Sheffer stroke "D" as a connective don't even have modus ponendo ponens or C-detachment "C$\alpha$$\beta$, $\alpha$ $\vdash$ $\beta$" as a usable rule of inference (modus ponendo ponens and other rules of inference may hold as valid, but you can't ever use them). You have to use a rule like

"D$\alpha$D$\beta$$\gamma$, $\alpha$ $\vdash$ $\gamma$" or

"D$\alpha$D$\beta$$\gamma$, $\alpha$ $\vdash$ $\beta$", and you have no definitions with which to represent the material conditional.

At the outset though you can probably almost always, apply the "primitive" rules of inference of the system on the axioms to get derivable rules of inference. You can think of the rules of inference as object logic formulas in a way, and then apply uniform substitution on the rules. And, for any system with C-detachment, you have a transitivity of rules...

"If $\alpha$, ..., $\chi$ $\vdash$ $\pi$ is a rule,

If $\pi$ $\vdash$ $\omega$ is also a rule, then

$\alpha$, ..., $\chi$ $\vdash$ $\omega$ is a rule"

Consequently, by substitution and this transitivity of such rules, you can sometimes derive even more rules without deriving any more formulas of the system. If you use such rules to prove something from the axioms, and you kept track of what substitutions you made in the rules, then you have a blueprint for writing a proof using the primitive inference rules of the system.

Basically you can construct proofs in Hilbert systems using derived rules of inference, which for at least some, if not most theorems come as easier to use than the axioms. Conditional introduction is or at least can get thought of as an example of just one such rule. How the rules get derived (or would get derived) gives you clues as to how you would construct such a proof. If you want to construct a proof from the primitive inference rules of the system (often modus ponendo ponens), consequently, you can prove what you want to using derived rules of inference, and then use construction procedures that the proofs of the derived rule of inferences outline to generate a proof from the primitive inference rule of the system.

A large class of derived rules includes rules of replacement (distinguished from the rule of uniform substitution). How the replacement rules work depends on the connectives that you have at work. If you have the material conditional "C", in Polish notation, and the theses (logical theorems OR axioms) CCpCqrCqCpr, and CCpqCCqrCpr, then anytime you have two conditional Cxy and Cyx (example CCpCqrCqCpr and CCqCprCpCqr are such a pair), you can replace any subformula x of a formula X with y in a formula which just has conditional symbols. I know because I've read this in Merrie Bergmann's An Introduction to Many-Valued Logic and Fuzzy Logic.

Now you might think no derived rule of inference can surprise you and it an uninteresting topic to study. But, I will try and convince you otherwise...

The implicational calculus (only the material conditional) can get axiomatized as follows:

1 CCpqCCqrCpr

2 CpCqp

3 CCCpqpp

CCpCqrCqCpr does come as derivable (you can run a theorem prover for this). Now from 2 q/Cpq we get

4 CpCCpqp

Consequently, we have a rule of replacement for statement letters, because we have 3 and 4. In particular, every statement letter in the implicational calculus "x" can get replaced by CCxyx. From CCpqCCqrCpr and the considerations barely outlined above it consequently follows that CCCCpqpqCCqrCpr is a thesis of the implicational calculus.

I repeat, statement letters in some logical theories can get replaced by other formulas un-uniformly and you still end up with logical theorems.

You can also study the sub-subsystems of the theory. For example, you can study what you can derive just from CCpqCCqrCpr and detachment or axioms 1 and 2 under detachment or any of those possible combinations. This can give you ready made formulas you can use anytime you have those theses or a set of those theses.

This note by no means come as comprehensive in general with respect to derivable rules of inference in Hilbert systems... or the many different ways in which you can construct Hilbert-style proofs.

Generalized Hypothetical Syllogism (GHS): From C$\alpha$C$\beta$...C$\pi$$\chi$, as well as C$\chi$$\omega$ we may infer C$\alpha$C$\beta$...C$\pi$$\omega$.

So, given these axioms:

1 CCpqCCqrCpr

2 CCpCqrCqCpr (these two come as needed for the proof of the derived rule to work)

3 CKpqp

4 CpCqKpq

By GHS on 4 and 3 we obtain:

5 CpCqp

The proof of the derived rule GHS starts (it requires induction for the full proof)

D1 CaCbc given

D2 Ccd given

D3 CCbcCCcdCbd (by axiom 1)

D4 CCcdCCbcCbd (by a derivable rule from 1 and 2)

D5 CCbcCbd D2, D4 detachment

D6 CaCbd (by the rule "from C$\alpha$$\beta$, C$\beta$$\gamma$ $\vdash$ C$\alpha$$\gamma$ using D1 and D5)

The derivable rule used to get D4 isn't necessary, since you can get it just from the sense of CCpCqrCqCpr and detachment. But, either way, D1-D6 gives us a plan to construct a pure detachment proof from 1-4 above.

As an axiom 1:

1 CCpqCCqrCpr as an axiom 2:

2 CCpCqrCqCpr as an axiom 3:

3 CKpqp as an axiom 4:

4 CpCqKpq

Now CpCqKpq has form CaCbc, and CKpqp has form Ccd. Since we want something with form CCbcCCcdCbd first, and the suggestion of the proof of GHS says we start with that, we substitute p/q, q/Kpq, r/p in CCpqCCqrCpr and obtain

5 CCqKpqCCKpqpCqp

Next we would use the derivable rule to get this instance of D4. But, building it up requires far more work than we need to do, since D4 comes as a commutation of D3. So, correspondingly we make substitutions in CCpCqrCqCpr so that 5 becomes the antecedent... p/CqKpq, q/CKpqp, r/Cqp yields

6 CCCqKpqCCKpqpCqpCCKpqpCCqKpqCqp Now we may detach the consequent of 6, because of 5

7 CCKpqpCCqKpqCqp

7 has the form of D4 and thus 3 has the form of D2, and consequently we detach 8.

8 CCqKpqCqp

D1 here becomes axiom 4. Thus we want to make 4 the antecedent of 1 first. So, in 1 q/CqKpq yields

9 CCpCqKpqCCCqKpqrCpr by detachment from 8 and 4 we then obtain

10 CCCqKpqrCpr

Now we substitute r/Cqp getting 11

11 CCCqKpqCqpCpCqp

And last we detach the consequent of 11, because of 8 yielding 12.

12 CpCqp

Most, if not all texts, can barely even scratch the surface of this topic.

Flipping what people do with natural deduction systems the other around, you can even derive rules using I'd call the Detachment Theorem as a schema for deriving rules of inference:

"From $\Gamma$ $\vdash$ C$\alpha$$\beta$, we may infer {$\Gamma$, $\alpha$} $\vdash$ $\beta$." Where "$\vdash$" indicates the symbol of assertion within a theory. This gives you a set of hints for derivable rules of inference. The consequences of doing this and its potential power, in my opinion, comes as enormous (though it doesn't give you every possible rule of inference of a system, it gives you a scheme for hints for new rules). If you combine this with the rule of uniform substitution, you can get hints for entirely new rules from substituting in conditionals. You don't need to detach anything to see hints for new, and derivable rules of inference if you have detachment, rules of inference for a propositional calculus.

For instance, suppose that you have some propositional calculus where detachment is NOT a primitive logical rule of inference, but you have Cpp as a thesis. Then by substitution you can obtain CCpqCpq. It follows that you have a relationship between the weak law of identity and detachment given The Detachment Theorem.


To construct a corresponding natural deduction for a propositional calculus with just the material conditional and negation, prove the following four wffs for the Hilbert-Frege (Frege clearly did this sort of thing before Hilbert) system. For other connectives you might want to look into the definitions used (which at least usually imply logical equivalences) or prove the relevant wffs which correspond to natural deduction rules.

Recursive Letter Prefixing 1 CaCba.
Self-Distrubtion           2 CCaCbcCCabCac.
Conjunction Introduction   3 CaCbKab.
Negation Elimination       4 CCNaKbNba.

Now try to keep the variables used in a natural deduction proof which come from a hypothesis or assumption separate from those which come from the axioms. If you do this, you can use condensed detachment within a natural deduction proof. Dx.y indicates a condensed detachment. Substitution only comes as permissible for lower case letters belonging to the sequence (a, b, ..., n, o) but not for letters belonging to the sequence (p, q, ..., y, z). Ci x-y indicates a conditional introduction from step x to step y.

If you want to do this I suggest you use two notebooks present so you can refer to what you've already done. If I did this in my notebooks I'd have the first section in grey in one notebook, then the second section in another, the third section in the first notebook, and so on until I have the axiomatic proof. This way I can keep track of what I want to discharge. Using nicknames like above probably would come as easier than the numerals in proof annotations, and using a non-letter symbol for condensed detachment also, but I won't do that here. Here's an example:

hypothesis   5  !   CNpq
hypothesis   6  !@  CNpNq
hypothesis   7  !@# Np
D6.7*8       8  !@# Nq
D5.7*9       9  !@# q
D3.9*10      10 !@# CaKqa  (or CbKqb if you prefer that)
D10.8*11     11 !@# KqNq
Ci 7-11      12 !@  CNpKqNq
D4.12*13     13 !@  p
Ci 6-13*14   14 !  CCNpNqp
Ci 5-14*15   15 CCNpqCCNpNqp

Now for the "#" scope. Cx-y refers to "x" and "y" in the immediately preceding set-up for an axiomatic proof. We won't need to get C7-7, because 7 only gets used to get to 8 and 9, and we already have C7-8 and C7-9 within the !@ scope.

hypothesis   5  !  CNpq (this is C7-9)
hypothesis   6  !@ CNpNq (this is C7-8)
D1.2*7       7  !@ CaCbCcKbc
D2.7*8       8  !@ CCabCaCcKbc
D8.5*9       9  !@ CNpCaKqa (this is C7-10)
D2.9*10     10  !@ CCNpaCNpKqa
D10.6*11    11  !@ CNpKqNq (this is 12, which is C7-11)
D4.11*12    12  !@ p
Ci 6-12*13  13  ! CCNpNqp
Ci 5-13*14  14  CCNpqCCNpNqp

Proofs usually don't get shorter when applying this procedure, but they don't usually seem to blow up to a length all too much longer than a natural deduction proof without derived rules of inference. Anytime we had D2.x we can use 9 in the next section as the major premise or the "x" part of Dx.y .

hypothesis   5 ! CNpq
theorem*6    6 ! Caa (this enables C6-6)
D1.D1.3*7    7 ! CdCaCbCcKbc (this enables C6-7)
D1.2*8       8 ! CaCCbCcdCCbcCbd
D2.8*9       9 ! CCaCbCcdCaCCbcCbd
D9.7*10     10 ! CeCCabCaCcKbc (this enables C6-8)
D2.10*11    11 ! CCeCabCeCaCcKbc
D1.5*12     12 ! CaCNpq (this enables C6-5)
D11.12*13   13 ! CaCNpCbKqb (this enables C6-9)
D9.13*14    14 ! CaCCNpbCNpKqb (this enables C6-10)
D1.4*15     15 ! CaCCNbKcNcb
D2.15*16    16 ! CCaCNbKcNcCab  
D14.14*17   17 ! CCNpbCNpKqb (this enables C6-11)
D16.17*18   18 ! CCNpNqp  (this is 13)
Ci 5-18*19  19 CCNpqCCNpNqp

Some steps do come as unneeded, but I'll leave them in. Now, we can switch back to allowing substitutions for all lower case variables if we like. So, now here's the axiomatic proof:

axiom       1 CpCqp. (this enables C5-12)
axiom       2 CCpCqrCCpqCpr.
axiom       3 CpCqKpq.
axiom       4 CCNpKqNqp.
D2.1*5      5 CCpqCpp.
D5.1*6      6 Cpp. (this enables C5-5)
D1.6*7      7 CpCqq. (this enables C5-6)
D1.3*8      8 CpCqCrKqr.
D1.8*9      9 CpCqCrCsKrs.
D1.9*10    10 CpCqCrCsCtKst. (this enables C5-7)
D1.2*11    11 CpCCqCrsCCqrCqs. 
D1.11*12   12 CpCqCCrCstCCrsCrt. (this enables C5-8)
D2.11*13   13 CCpCqCrsCpCCqrCqs.
D1.13*14   14 CpCCqCrCstCqCCrsCrt. (this enables C5-9)
D2.14*15   15 CCpCqCrCstCpCqCCrsCrt.
D15.10*16  16 CpCqCCrsCrCtKst. (this enables C5-10)
D2.11*17   17 CCpCqCrsCpCCqrCqs.
D17.16*18  18 CpCCqCrsCqCrCtKst. (this enables C5-11)
D2.18*19   19 CCpCqCrsCpCqCrCtKst.
D19.1*20   20 CCrsCqCrCtKst. (this enables C5-13)
D15.20*21  21 CCpqCrCCpsCpKqs. (this enables C5-14)
D1.4*22    22 CpCCNqKrNrq.
D1.22*23   23 CpCqCCNrKsNsr. (this enables C5-15)
D17.23*24  24 CpCCqCNrKsNsCqr. (this enables C5-16)
D2.21*25   25 CCCpqrCCpqCCpsCpKqs 
D25.21*26  26 CCpqCCprCpKqr (this enables C5-17)
D2.24*27   27 CCpCqCNrKsNsCpCqr
D27.26*28  28 CCNpqCCNpNqp

I've never understood why so many people say that Natural Deduction systems, or Sequent systems are easier to use. Perhaps that is because I am a software developer, and writing sequences of instructions is second nature to me. I shudder to even think about a 50 line proof in that format. You would need an entire wall to write it.

First, assume that you can use any existing theorem -- you do not need to prove directly from the axioms. That can make a simple proof take thousands of lines. If the proof is close to the axioms, you can go back and insert them into your proof.

Second, if you have an axiom or theorem of the nature p & q -> xxx, or p -> (q -> xxx) and assuming that you have Modus Ponens and Adjunction in the system, you can also assume that there are corresponding rules of the form p, q |- xxx since those are trivial to prove. Just because Hilbert / Frege style systems usually only have one or two rules as axioms, that doesn't mean that there can't be thousands of derived rules. That can substantially shorten proofs.

Once you get a proof, it is just a bit of bookkeeping to go back and clean that up. You don't need to clutter your head with it. Just apply adjunction (if needed) to the previous lines and then apply Modus Ponens. Or apply Modus Ponens twice. But, that is just a bunch of make work.

Third, most people write Hilbert style proofs using a format such as

N. [expression] [vague comment justifying expression]

I use a more formal approach. I write

N. Ax #. {1,2} [expression]

Where Ax # is the axiom or theorem used for the line, and {1,2} are the line(s) required to use that axiom or theorem. This makes verifying a proof much easier. It also clarifies in your mind exactly what you are doing. I go even further, Here is a proof that I recently wrote in the positive fragment of Classical Logic

Rl 1. p, p -> q >- q

Ax 1. q -> (p -> q)
Ax 2. (p -> (q -> r)) -> ((p -> q) -> (p -> r))
Ax 4. p -> (q -> p & q)

Th  4. (p -> q) -> ((p -> r) -> (p -> q & r))
  1. Rl 1. {Ax 4, Ax 1} p -> (q -> (r -> q & r))
  2. Rl 1. {1, Ax 2}    (p -> q) -> (p -> (r -> q & r))
  3. Th 2. {2, Ax 2}    (p -> q) -> ((p -> r) -> (p -> q & r))

Here, in line 1, I am stating that a substitution instance of Rl 1 is justified by substitution instances of Ax 4 and Ax 1 (and yes, the order of Ax 4 and Ax 1 is significant). Without that, that proof would have been four lines longer. When writing this, I do know, of course, what my intended substitutions actually are. But, I don't have to write it out in tedious detail. But, again, once you have the proof, to clean it up, just add lines for Ax 4, Ax 1, and Ax 2 importing the axioms (and supplying the substitution instances). If you are writing proofs for a class, that will almost certainly be necessary (because you have to show your work, and make the substitutions explicit).

While I have written proofs in this fashion for years, I have recently written a theorem verifier to catch errors. It only works because of the precision that I use when writing proofs. Sorry, it is a work in progress, and is not publicly available at this time. It is only bare bones at the moment, I just added threading and some errors causes it to randomly abort. It actually handles a lot more than this, including searching for truth table models, testing models, and so forth. It also manages my citations, can export my work in multiple forms, including LaTeX. However, simply being precise about writing proofs can help a lot. Keep in mind that if you are not using a Natural Deduction system that the Deduction Theorem may not be available.

Also, when appropriate use local definitions. Those can change a proof line that is 150 characters long into something like 20 or 30. That can substantially improve readability. I write them like this inside of a proof since they are definitions local to a proof and not global to the entire system.

1. Df A. A := p & (p -] q) -] ((p -] p) -] q)

Then, I use A (or whatever) instead of the full expression. At the end of the proof, whatever definitions are still in use need to be reversed out.

Finally, for God's sake, use a computer! Even if you don't have a theorem verifier, you can read what you wrote much better, you can quickly make changes easily. That makes a big difference. If you are writing using LaTeX I have released a CTAN logix package that provides a few thousand extra symbols and environments to automatically format proofs in this (and other) manner. LuaLaTeX or XeLaTeX must be used because Unicode is a necessity.

And, like with everything else, practice helps a lot. Hope this helps.


Use Curry-Howard. Instead of explaining what it is, I'll just apply it and show (and explain) how it works, while doing so.

In here, and the following, I will use $⊃$ for the conditional operator instead of $→$.

Let $W$ be a proof of $(a ⊃ a ⊃ b) ⊃ a ⊃ b$. We will write this in the following way: $$W: (a ⊃ a ⊃ b) ⊃ a ⊃ b,$$ and do so, similarly, for other proofs. We adopt the convention that $⊃$ brackets to the right, e.g. $$c ⊃ d ⊃ e = c ⊃ (d ⊃ e).$$

Given proofs $g: c ⊃ d$ and $h: c$, we will write $gh: d$ as the proof obtained by modus ponens. Here, we adopt the convention that bracketing occurs to the left, e.g. $$ghk = (gh)k.$$

Thus, given $f: a ⊃ a ⊃ b$, we have $Wf: a ⊃ b$. Given $x: a$, then we have $Wfx: b$. But $fx: a ⊃ b$ and $fxx: b$. Therefore, we equate $Wfx = fxx$.

One of the Hilbert axioms is $K: a ⊃ b ⊃ a$. Suppose $x: a$ and $y: b$. Then $Kx: b ⊃ a$ and, $Kxy: a$. Similarly, we set the two proofs of $a$ equal: $Kxy = x$.

Another of the Hilbert axioms is $S: (a ⊃ b ⊃ c) ⊃ (a ⊃ b) ⊃ a ⊃ c$. Letting $f: a ⊃ b ⊃ c$, then we have $Sf: (a ⊃ b) ⊃ a ⊃ c$. Letting, $g: a ⊃ b$, we have $Sfg: a ⊃ c$. Finally, letting $x: a$, we have $Sfgx: c$. But we also have $fx: b ⊃ c$ and $gx: b$. Therefore, $fx(gx): c$. So, we equate the two proofs: $Sfgx = fx(gx)$.

As an example, if $I = SKK$, then $Ix = SKKx = Kx(Kx) = x$. Thus, if $x: a$, then $Ix: a$ and, working backwards, we have $I: a ⊃ a$. The Hilbert "axiom" $I$ is therefore provable as $SKK$, which consists of step 1 = $S$ (an instance of axiom $S$), step 2 = $K$ (an instance of axiom $K$), step 3 $SK$ (modus ponens applied to steps 1 and 2), step 4 = $K$ (another instance of axiom $K$) and step 5 = $SKK$ (modus ponens applied to steps 3 and 4).

With this in place, we may write $$Wxy = xyy = xy(Iy) = SxIy = Sx(KIx)y = SS(KI)xy,$$ define $W = SS(KI)$ and conclude that this $W$ is a proof of the proposition. Laid out in full: $$\begin{array}{ll} S:& (e ⊃ d ⊃ f) ⊃ (e ⊃ d) ⊃ e ⊃ f\\ S:& (a ⊃ c ⊃ b) ⊃ (a ⊃ c) ⊃ a ⊃ b\\ SS:& (e ⊃ d) ⊃ e ⊃ f\\ K:& d ⊃ e ⊃ d\\ I:& a ⊃ a\\ KI:& e ⊃ d\\ SS(KI):& e ⊃ f \end{array}$$ where $$c = a,\quad d = a ⊃ a,\quad e = a ⊃ c ⊃ b = a ⊃ a ⊃ b,\quad f = a ⊃ b$$ ensure that the modus ponens steps at $SS$, $KI$ and $SS(KI)$ match up correctly.

To prove $$B: (b ⊃ c) ⊃ (a ⊃ b) ⊃ a ⊃ c,$$ we let $f: b ⊃ c$, $g: a ⊃ b$ and $x: a$. Then, we have $gx: b$ and $(f∘g)x = f(gx): a$, with $f ∘ g: a ⊃ c$. So, we equate $Bfg = f ∘ g$ and $Bfgx = f(gx)$.

Working backwards, we have: $$f(gx) = Kfx(gx) = S(Kf)gx,$$ so we can also write $Bfg = f ∘ g = S(Kf)g$ and $Bf = S(Kf)$.

Working backwards, further, we have $$S(Kf) = KSf(Kf) = S(KS)Kf.$$ Therefore, we may set $B = S(KS)K = S ∘ K$, and this serves as the desired proof. In line-by-line form, it's 7 lines: 2 $S$ axioms, 2 $K$ axioms and 3 modus ponens.

Now, this time we prove $$C: (a ⊃ b ⊃ c) ⊃ b ⊃ a ⊃ c.$$ Start with $f: a ⊃ b ⊃ c$, $x: b$ and $y: a$. Then $fy: b ⊃ c$ and $fyx: c$, and we set $Cfxy = fyx$. Working backwards, we get $$Cfxy = fyx = fy(Kxy) = Sf(Kx)y,$$ so we may set $Cfx = Sf(Kx)$. Compare to $Bfx = S(Kf)x$. Compare that, also, to $S(Kf)(Kg)$. In the forwards direction, we have $$S(Kf)(Kg)x = Kfx(Kgx) = fg = K(fg)x,$$ so we could actually add in an optimization rule, here, too: $S(Kf)(Kg) = K(fg)$.

Continuing on, we have $$Sf(Kx) = B(Sf)Kx = B(Sf)Kx,$$ so we could set $Cf = B(Sf)K = Sf ∘ K$. Finally, we have $$B(Sf)K = BBSfK = BBSf(KKf) = S(BBS)(KK)f.$$ So, we could adopt the definition $C = S(BBS)(KK)$ and treat this as the desired proof.

If $φ(x): b$ is a proof that involves the hypothetical $x: a$, then we may "discharge" the hypothetical to obtain a proof $λx·φ(x): a ⊃ b$, where: $$\begin{array}{ll} λx·x &= I,\\ λx·u &= Ku,\\ λx·uv &= S(λx·u)(λx·v). \end{array}$$ where $u$ is independent of $x$, in the second clause. To match up the last two clauses consistently, for the case where $u$ and $v$ are both independent of $x$ requires the above-mentioned optimization rule $S(Ku)(Kv) = K(uv)$. So, in effect, the second clause takes precedence over the third.

Further optimizations can be done. In particular, if $u: a$, then $S(Ku)I: a$ and $S(Ku)Ix = Kux(Ix) = ux$. So, we treat $u = S(Ku)I$. This corresponds to adding the clause $$λx·ux = u,$$ if $u$ is independent of $x$.

Optimizations for $B$, $C$ and $W$ can also be added: $$λx·uv = Bu(λx·v)$$ if $u$ is independent of $x$, $$λx·uv = C(λx·u)v$$ if $v$ is independent of $x$, $$λx·ux = W(λx·u).$$ Note that the optimization $λx·ux = x$, when $u$ is independent of $x$ then becomes $W(Ku) = u$. So, in effect: $W ∘ K = I$.

Now, let's take a look at a few examples involving conjunctions.

Start with the axioms $$A: a ⊃ b ⊃ a∧b,\quad π_0: a∧b ⊃ a,\quad π_1: a∧b ⊃ b.$$ First, if $x: a$ and $y: b$, then we define $(x,y) = Axy: a∧b$. Then, noting that $π_0(x,y): a$ and $π_1(x,y): y$, we postulate the equations $$π_0(x,y) = x,\quad π_1(x,y) = y.$$ Second, if $z: a ∧ b$, then $π_0 z: a$ and $π_1 z: b$, therefore $(π_0 z, π_1 z): a ∧ b$. So, we also postulate that $$(π_0z, π_1 z) = z\quad (z: a ∧ b).$$

We can then generalize $λ$ to include ordered pairs by setting $$λ(x,y)·φ(x,y,(x,y)) = λz·φ(π_0z,π_1z,z),$$ where the optimization $(π_0z,π_1z) = z$ is built into the rule, by having all occurrences of $(x,y)$ separated out in $φ(x,y,z)$ and replaced by $z$.

Note, in particular, that $$λ(x,y)·x = π_0,\quad λ(x,y)·y = π_1.$$

To prove $a ∧ b ⊃ b ∧ a$, let $x: a$, $y: b$, then $(y,x): b ∧ a$, and $(x,y): a ∧ b$. Therefore, $$λ(x,y)·(y,x) = λz·(π_1z,π_0z) = λz·A(π_1z)(π_0z) = S(BAπ_1)π_0.$$

To prove $$(c ⊃ a) ⊃ (c ⊃ b) ⊃ c ⊃ a∧b,$$ we set $f: c ⊃ a$, $g: c ⊃ b$, $x: c$. Then we have $fx: a$, $gx: b$ and $(fx,gx): a ∧ b$. Thus, we can define $$⟨f,g⟩ = λx·(fx,gx) = λx·A(fx)(gx) = S(BAf)g: c ⊃ a ∧ b.$$

Continuing on, we have $$λf·λg·⟨f,g⟩ = λf·λg·S(BAf)g = BS(BA): (c ⊃ a) ⊃ (c ⊃ b) ⊃ c ⊃ a∧b.$$

Other proofs of note may be similarly laid out: $$ ⋀ = λf·λx·λy·f(x,y) = C(BBB)A: (c∧a ⊃ b) ⊃ c ⊃ a ⊃ b,\\ ⋁ = λg·λ(x,y)·gxy = C(BS(CBπ_0))π_1: (c ⊃ a ⊃ b) ⊃ c∧a ⊃ b, $$ with the corresponding rules $⋀fxy = f(x,y)$ and $⋁g(x,y) = gxy$.

In particular $$⋁(BS(BA)): (c ⊃ a)∧(c ⊃ b) ⊃ c ⊃ a∧b.$$

For the converse, we apply $B$: $$Bπ_0: (c ⊃ a∧b) ⊃ c ⊃ a,\quad Bπ_1: (c ⊃ a∧b) ⊃ c ⊃ b,$$ therefore $$⟨Bπ_0,Bπ_1⟩: (c ⊃ a∧b) ⊃ (c ⊃ a)∧(c ⊃ b),$$ which establishes the equivalence of $(c ⊃ a)∧(c ⊃ b)$ and $c ⊃ a∧b$.

At this point, we bring in the axioms $$O: (a ⊃ c) ⊃ (b ⊃ c) ⊃ a∨b ⊃ c,\quad σ_0: a ⊃ a∨b,\quad σ_1: b ⊃ a∨b,$$ define $[f,g] = Ofg: a∨b ⊃ c$, for $f: a ⊃ c$ and $g: b ⊃ c$, and postulate the identities $$ [f,g] ∘ σ_0 = f,\quad [f,g] ∘ σ_1 = g,\\ [h ∘ σ_0, h ∘ σ_1] = h\quad (h: a∨b ⊃ c). $$

An example proof would be of the proposition $$(a∨b)∧c ⊃ a∨(b∧c).$$ We start with $x: a$, $y: b$, $z: c$. Then $σ_0x: a∨(b∧c)$, $(y,z): b∧c$, $σ_1(y,z): a∨(b∧c)$. Thus,

$$ λx·σ_0x = σ_0: a ⊃ a∨(b∧c),\quad λy·σ_1(y,z) = λy·σ_1(Ayz) = Bσ_1(CAz): b ⊃ a∨(b∧c),\\ [λx·σ_0x,λy·σ_1(y,z)] = [σ_0,Bσ_1(CAz)]: a∨b ⊃ a∨(b∧c). $$ Let $w: a∨b$. Then $(w,z): (a∨b)∧c$ and $$ [σ_0,Bσ_1(CAz)]w: a∨(b∧c), λ(w,z)·[σ_0,Bσ_1(CAz)]w: (a∨b)∧c ⊃ a∨(b∧c). $$ This works out to the following $$\begin{align} λ(w,z)·[σ_0,Bσ_1(CAz)]w &= λ(w,z)·Oσ_0(Bσ_1(CAz))w\\ &= λv·Oσ_0(Bσ_1(CA(π_1v)))(π_0v)\\ &= S(B(Oσ_0)(B(Bσ_1)(B(CA)π_1)))π_0\\ &= S(Oσ_0 ∘ Bσ_1 ∘ CA ∘ π_1)π_0. \end{align}$$

Laid out line-by-line, with the $(\_) ∘ (\_)$ lemma used, the proof has the following form: $$\begin{array}{ll} S:& (f ⊃ d ⊃ g) ⊃ (f ⊃ d) ⊃ f ⊃ g\\ O:& (a ⊃ g) ⊃ (b ⊃ g) ⊃ a∨b ⊃ g\\ σ₀:& a ⊃ a∨e\\ O σ₀:& (b ⊃ g) ⊃ a∨b ⊃ g\\ B:& (e ⊃ g) ⊃ (b ⊃ e) ⊃ b ⊃ g\\ σ₁:& e ⊃ a∨e\\ B σ₁:& (b ⊃ e) ⊃ b ⊃ g\\ O σ₀ ∘ B σ₁:& (b ⊃ e) ⊃ a∨b ⊃ g\\ C:& (b ⊃ c ⊃ e) ⊃ c ⊃ b ⊃ e\\ A:& b ⊃ c ⊃ b∧c\\ C A:& c ⊃ b ⊃ e\\ O σ₀ ∘ B σ₁ ∘ C A:& c ⊃ a∨b ⊃ g\\ π₁:& d∧c ⊃ c\\ O σ₀ ∘ B σ₁ ∘ C A ∘ π₁:& d∧c ⊃ a∨b ⊃ g\\ S (O σ₀ ∘ B σ₁ ∘ C A ∘ π₁):& (f ⊃ d) ⊃ f ⊃ g\\ π₀:& d∧c ⊃ d\\ S (O σ₀ ∘ B σ₁ ∘ C A ∘ π₁) π₀:& f ⊃ g = (a∨b)∧c ⊃ a∨(b∧c) \end{array}$$ where $$d = a∨b = a∨b,\quad e = b∧c = b∧c,\quad f = d∧c = (a∨b)∧c,\quad g = a∨e = a∨(b∧c)$$ ensures the matching for the modus ponens steps and the $(\_) ∘ (\_)$ steps.

More examples involving the proof of distributivity for conjunction and disjunction and negation may be found here Distributivity (And Negation). Negation, can be introduced with the axiom $$Z: (¬a ⊃ ¬b) ⊃ b ⊃ a,$$ but I won't talk about it in depth here. Another example involving negation is here Proof Of A Negation Formula. Providing an internal language, similar to that laid out above, for the $Z$ axiom or other properties of negation would require going outside the Typed λ-Calculus and Combinatory Logic and the original formulations of Curry-Howard into something larger involving "continuations", such as the λμ-Calculus. It's one of many alternative formulations posed in the literature and I don't see any sign of the literature settling on an overall consensus.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .