I am using the package lplfitch to typeset natural deduction proofs in Fitch style. I would like to number the lines on the left side of the vertical bar instead of on the left of the formula?

Schematically, here is what I'd like to get:

1. |  hypothesis_1
2. |  hypothesis_2
3. |_  hypothesis_3
3. |  deduction_1     rule_1
4. |  deduction_2     rule_2
5. |  deduction_3     rule_3
6. |  deduction_4     rule_4
7. |  deduction_5     rule_5

Here is a working example:

          \pline[1.]{\forall x (Fx\supset Axf)}[H]\\ 
          \pline[2.]{\forall x(Fx\supset Afx)}[H]\\ 
                \pline[4.]{Fi\supset Aif}[\lalle{1, i}]\\ 
                \pline[6.]{Fi\supset Afi}[\lalle{2, i}]\\ 
                \pline[8.]{Aif\land Afi}[\landi{5}{7}]

It produces something like this:

| 1. hypothesis_1
| 2. hypothesis_2
|_3. hypothesis_3
| 4. deduction_1     rule_1
| 5. deduction_2     rule_2
| 6. deduction_3     rule_3
| 7. deduction_7     rule_4
| 8. deduction_8     rule_5

This answer demonstrates how to use fitch to typeset the proof in the question, which puts the line numbers to the left of the line, and how to modify the nd environment so that the inference rules defined use the appropriate symbols for the logical connectives.

By default, the package hard-codes these symbols and uses e.g. \wedge rather than the semantic \land. For the conditional, it uses \Rightarrow. In this case, there is no semantic alternative. Rather than hard-coding the horseshoe with \supset, we add an additional semantic macro, \lif and use that.

The only tricky part of this involves the cat code changes and that's only difficult because I don't know what I'm doing. However, copy-pasting from the .sty works wonders.

% modified from fitch.sty
    \hypo {1} {\forall x (Fx\lif Axf)}
    \hypo {2} {\forall x(Fx\lif Afx)}
    \hypo {3} {Fi}
    \have {4} {Fi\lif Aif}   \Ae{1}
    \have {5} {Aif}             \ie{3,4}
    \have {6} {Fi\lif Afi}   \Ae{2}
    \have {7} {Afi}             \ie{3,6}
    \have {8} {Aif\land Afi}    \ai{5,7}

Fitch-style proof with fitch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.