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,
and
2) CCpCqrCCpqCpr as a theorem or an axiom schema,
and
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.