
lplfitch
나는 Fitch 스타일로 자연 공제 증명을 조판하기 위해 패키지를 사용하고 있습니다 . 수식 왼쪽이 아닌 세로 막대 왼쪽에 줄 번호를 매기고 싶습니다.
개략적으로, 내가 얻고 싶은 것은 다음과 같습니다.
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
다음은 실제 예입니다.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{lplfitch}
\begin{document}
\fitchprf{
\pline[1.]{\forall x (Fx\supset Axf)}[H]\\
\pline[2.]{\forall x(Fx\supset Afx)}[H]\\
\pline[3.]{Fi}[H]}{
\pline[4.]{Fi\supset Aif}[\lalle{1, i}]\\
\pline[5.]{Aif}[\life{3}{4}]\\
\pline[6.]{Fi\supset Afi}[\lalle{2, i}]\\
\pline[7.]{Afi}[\life{5}{6}]\\
\pline[8.]{Aif\land Afi}[\landi{5}{7}]
}
\end{document}
다음과 같은 결과가 생성됩니다.
| 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
답변1
이 답변은 사용 방법을 보여줍니다.화필줄 왼쪽에 줄 번호를 배치하는 문제의 증명을 조판하는 방법과 nd
정의된 추론 규칙이 논리적 연결에 적절한 기호를 사용하도록 환경을 수정하는 방법.
기본적으로 패키지는 이러한 기호를 하드 코딩하고 \wedge
의미 체계 대신 를 사용합니다 \land
. 조건부에는 를 사용합니다 \Rightarrow
. 이 경우 의미론적 대안은 없습니다. 를 사용하여 말굽을 하드 코딩하는 대신 \supset
추가 의미 매크로를 추가하여 \lif
사용합니다.
여기서 유일하게 까다로운 부분은 고양이 코드 변경과 관련이 있는데, 내가 무엇을 하고 있는지 모르기 때문에 그게 어려울 뿐입니다. 그러나 .sty
작품을 복사하여 붙여넣는 것은 놀라운 일입니다.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fitch}
% modified from fitch.sty
{\chardef\x=\catcode`\*
\catcode`\*=11
\global\let\nd*astcode\x}
\catcode`\*=11
\def\nd*init{%
\let\open\nd*open%
\let\close\nd*close%
\let\hypo\nd*hypo%
\let\have\nd*have%
\let\hypocont\nd*hypocont%
\let\havecont\nd*havecont%
\let\by\nd*by%
\let\guard\nd*guard%
\def\ii{\by{$\lif$I}}%
\def\ie{\by{$\lif$E}}%
\def\Ai{\by{$\forall$I}}%
\def\Ae{\by{$\forall$E}}%
\def\Ei{\by{$\exists$I}}%
\def\Ee{\by{$\exists$E}}%
\def\ai{\by{$\land$I}}%
\def\ae{\by{$\land$E}}%
\def\ai{\by{$\land$I}}%
\def\ae{\by{$\land$E}}%
\def\oi{\by{$\lor$I}}%
\def\oe{\by{$\lor$E}}%
\def\ni{\by{$\lnot$I}}%
\def\ne{\by{$\lnot$E}}%
\def\be{\by{$\bot$E}}%
\def\nne{\by{$\lnot\lnot$E}}%
\def\r{\by{R}}%
}
\catcode`\*=\nd*astcode
\let\lif\supset
\begin{document}
\[
\begin{nd}
\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}
\end{nd}
\]
\end{document}