-
Notifications
You must be signed in to change notification settings - Fork 0
/
prooftrees.tex
2199 lines (2037 loc) · 100 KB
/
prooftrees.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\iffalse
%% Copyright 2016-2024 Clea F. Rees
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008-05-04 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Clea F. Rees.
%%
%% This file may only be distributed together with a copy of the package
%% prooftrees.
%%
%% This work consists of all files listed in manifest.txt.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arara: pdflatex: { synctex: true, shell: false }
% arara: biber
% arara: makeindex
% arara: pdflatex: { synctex: true, shell: false }
% arara: pdflatex: { synctex: true, shell: false }
% biber --output_format=bibtex --output_resolve prooftrees.bcf to generate .bib for upload
% sed -i '/1977/s/DATE/YEAR'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fi
\pdfminorversion=7
\RequirePackage{svn-prov}
\ProvidesFileSVN{$Id: prooftrees.tex 10576 2024-11-05 04:45:53Z cfrees $}[v0.9 \revinfo]
\GetFileInfoSVN*
\let\prooftreesdocversion\fileversion
\let\prooftreesdocbase\filebase
\let\prooftreesdocinfo\fileinfo
\let\prooftreesdocdate\filedate
% BEGIN preamble
\documentclass[10pt,british,a4paper,doc2]{ltxdoc}
\usepackage[extract=python]{memoize}
\mmzset{%
prefix={memos/},
include context in ccmemo,
auto=\cref{multiref},
auto=\Cref{multiref},
auto=\labelcref{multiref},
auto=\cpageref{multiref},
auto=\labelcpageref{multiref},
auto=\namecref{ref},
auto=\nameCref{ref},
auto=\namecrefs{ref},
auto=\nameCrefs{ref},
auto=\lcnamecrefs{ref},
auto=\lcnamecrefs{ref},
auto=\crefrange{refrange},
auto=\cpagerefrange{refrange},
auto=\Cpagerefrange{refrange},
mkdir,
}
% \CodelineIndex
% \RecordChanges
% \EnableCrossrefs
\usepackage{babel,geometry,fancyhdr,enumitem}
\usepackage{csquotes}
\MakeAutoQuote{‘}{’}
\MakeAutoQuote*{“}{”}
\usepackage[rm={lining},sf={lining},tt={tabular,lining,monowidth}]{cfr-lm}
\usepackage{microtype}
\usepackage[section]{placeins}
\usepackage[citestyle=authoryear-comp,bibstyle=authoryear,mergedate=basic,isbn=false,url=true,sortcites=true,backend=biber,mincrossrefs=6]{biblatex}
% \bibliography{abbrv, authors, journals-series, pub, lleoedd, phil, ref}
\bibliography{prooftrees_biber.bib}% generate for upload (gweler uchod)
\usepackage{etoolbox,verbatim,parskip,changepage,titling,makeidx}
\usepackage[dvipsnames,svgnames,rgb,x11names]{xcolor}
\usepackage[tableaux]{prooftrees}
\usepackage{mathtools,turnstile,pifont}
\newcommand*{\fycheck}{\text{\ding{52}}}
\newcommand*{\fycross}{\text{\ding{56}}}
\usetikzlibrary{decorations.pathreplacing,arrows.meta,positioning,calc,arrows.meta,fit,backgrounds,tikzmark}
\tikzset{%
nodiad/.style={text=#1, draw=#1, font=\footnotesize\scshape, align=left, shorten >=-1.5pt, shorten <=-1.5pt, {Circle[width=3pt, length=3pt, fill=#1]}-{Circle[width=3pt, length=3pt, fill=#1]}, fill=none},
grwp/.style={fill opacity=.25, fill=#1, rounded corners, draw=#1},
post grwp/.style={fill=white, postaction={fill opacity=.25, fill=#1}, draw=#1, rounded corners},
}
\forestset{%
nyth/.style n args=3{%
tikz+={%
\pgfmathsetmacro\lliw{#2*100/14}
\scoped[on background layer]\node [fit=(.west) (.east) (!F) (!L) (!1) (!11) (!l) (!ll) #1 (#3#2.center), inner xsep=28-2*#2 pt, inner ysep=0pt, draw=WildStrawberry!\lliw!blue, rounded corners] {};
},
},
}
\usepackage{tcolorbox}
\tcbuselibrary{listingsutf8}% if you use skins, you need to disable externalisation for boxes which use the relevant options - gweler nodiadau/tex/tex.se/tcolorbox-coursepacket-exp.tex
%%%%%%%%%%%%%%%%
% Sašo Živanović: https://github.com/sasozivanovic/memoize/issues/31#issuecomment-2424700001
\csappto{tcb@shield@@externalize}{\ifdefined\memoizefalse\memoizefalse\fi}
\tcbset{shield externalize}
%%%%%%%%%%%%%%%%
\usepackage[%
loadHyperref=true,
createIndexEntries=false,
]{doctools}
\usepackage{bookmark}
\hypersetup{%
colorlinks=true,
citecolor={moss},
extension=pdf,
linkcolor={strawberry},
linktocpage=true,
pdfcreator={TeX},
pdfproducer={pdfeTeX},
urlcolor={blueberry}%
}
\usepackage{cleveref}
\makeatletter
% Joseph Wright: from \file{siunitx.sty} ; \url{https://chat.stackexchange.com/transcript/message/64327823#64327823}
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF {2024-11-01}
{% ateb sgwrsio Ulrike Fischer: https://chat.stackexchange.com/transcript/message/66562343#66562343
\NewSocketPlug{refstepcounter}{cleveref}{%
\ifHy@pdfstring\else#1
{%
\firstaid@cref@updatelabeldata{\@currentcounter}%
}%
\fi
}%
\AssignSocketPlug{refstepcounter}{cleveref}%
}{}
\renewcommand*\Describe@Macro[1]{\endgroup
\marginpar{%
\raggedleft\PrintDescribeMacro{#1}\par
\PrintLabelName[\macrolabelfont]{\macrolabelname}%
}%
\expandafter\prooftrees@index{\macrolabelname}{\protect\ttfamily\protect\string\protect#1}\@esphack\ignorespaces}
\renewcommand*\Describe@Env[1]{\endgroup
\marginpar{%
\raggedleft\PrintDescribeMacro{#1}\par
\PrintLabelName[\macrolabelfont]{\envlabelname}%
}%
\expandafter\prooftrees@index{\envlabelname}{#1}\@esphack\ignorespaces}
\newcommand*\DescribeKey{\leavevmode\@bsphack
\begingroup\MakePrivateLetters\Describe@Key}
\newcommand*\Describe@Key[2][key]{\endgroup
\marginpar{%
\raggedleft\PrintDescribeMacro{#2}\par
\PrintLabelName[\macrolabelfont]{\csname #1labelname\endcsname}%
}%
\edef\tempa{\csname #1labelname\endcsname}%
\expandafter\prooftrees@index{\tempa}{#2}\@esphack\ignorespaces}
\newcommand*\DescribeKeys{\leavevmode\@bsphack
\begingroup\MakePrivateLetters\Describe@Keys}
\newif\ifcyntafun
\newcommand*\Describe@Keys[2][key]{\endgroup
\renewcommand*\do[1]{\ifcyntafun ##1\else\\##1\fi\cyntafunfalse}%
\cyntafuntrue
\marginpar{%
\raggedleft\PrintDescribeMacro{ % paid â dileu'r gwagle hwn!!
\expandafter\docsvlist{#2}%
}\par
\PrintLabelName[\macrolabelfont]{\csname #1labelname\endcsname}%
}%
\edef\tempa{\csname #1labelname\endcsname}%
\renewcommand*\do[1]{\expandafter\prooftrees@index{\tempa}{##1}}%
\expandafter\docsvlist{#2}\@esphack\ignorespaces}
\def\get@first#1,#2\@null{#1}
\def\get@rest#1,#2\@null{#2}
\newcommand*\vals[1]{%
\edef\tempa{\expandafter\get@first #1\@null}%
\edef\tempb{\expandafter\get@rest #1\@null}%
\renewcommand*\do[1]{\textbar ##1}%
{\ttfamily = \tempa
\expandafter\docsvlist{\tempb}%
}%
}
\newcommand*\val[1]{{\ttfamily = \meta{#1}}}
\newcommand*\valmarg[1]{{\ttfamily = \marg{#1}}}
\newcommand*\pkg[1]{\textsf{#1}}
\DeclareRobustCommand\macrolabelfont{\normalfont\footnotesize\em\normalcolor}
\newcommand*\macrolabelname{macro}
\newcommand*\PrintLabelName[2][\normalfont\normalsize\normalcolor]{#1#2}
\newcommand*\envlabelname{environment}
\newcommand*\keylabelname{key}
\newcommand*\fkeylistlabelname{Forest keylist}
\newcommand*\fregkeylistlabelname{Forest keylist register}
\newcommand*\foptkeylistlabelname{Forest keylist option}
\newcommand*\freglabelname{Forest register}
\newcommand*\foptlabelname{Forest option}
\newcommand*\fregdimlabelname{Forest dimension register}
\newcommand*\fregcountlabelname{Forest count register}
\newcommand*\fregtokslabelname{Forest toks register}
\newcommand*\fopttokslabelname{Forest toks option}
\newcommand*\fregboollabelname{Forest boolean register}
\newcommand*\foptboollabelname{Forest boolean option}
\newcommand*\fregautotokslabelname{Forest autowrapped toks register}
\newcommand*\foptautotokslabelname{Forest autowrapped toks option}
\newcommand*\fstylelabelname{Forest style}
\newcommand*\pkgoptlabelname{package option}
\newcommand*\pkglabelname{package}
\let\PrintDescribeKey\PrintDescribeMacro
\newcommand*\keyval[1]{\texttt{#1}}
\NewDocumentCommand\keyname { s O {key} m }{%
\texttt{#3}%
\IfBooleanTF {#1}{}{%
\edef\tempa{\csname #2labelname\endcsname}%
\expandafter\prooftrees@index{\tempa}{#3}%
}%
}
\def\prooftrees@index#1#2{%
\index{\doctools@indexHeadFont{#1s}!#2}%
}
\renewenvironment{theindex}
{%
\twocolumn[\section*{\indexname}
\emph{%
Features are sorted by kind.
Page references are given for both definitions and comments on use.}\bigskip
]%
\markboth{\indexname}%
{\indexname}%
\pagestyle{fancyplain}%
\thispagestyle{plain}%
\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem}
{}
\makeatother
\lstdefinestyle{lstcoeden}{% modified from style used by doctools.sty for the latexcode environment
style=lstDocStyleBase,
numbers=none,
stringstyle=\color{doc@stringcolor},
keywordstyle=\color{doc@keywordcolor},
commentstyle=\color{doc@commentcolor},
frame=none,
}
\lstdefinestyle{lstsrc}{%
style=lstDemoStyleLaTeXCode,
stringstyle=\color{doc@stringcolor},
keywordstyle=\color{doc@keywordcolor},
commentstyle=\color{doc@commentcolor},
texcsstyle=\color{doc@keywordcolor},
frame=none,
numbers=left,
moretexcs={forestset,linenumberstyle,ifcsname,ProcessOptions,DeclareOption,ProvidesPackageSVN,bracketset,NewDocumentEnvironment,ExplSyntaxOn,mmzset,ExplSyntaxOff,forest,prooftrees@enw,foresteregister,foresteoption,forestregister,forestoption,PackageError,PackageWarning,PassOptionsToPackage,CurrentOption,@ifpackageloaded,endforest,draw},
}
\geometry{headheight=12pt,marginparwidth=45mm,hmarginratio=4:1,vscale=.8,hscale=.7,verbose}
\newlength\tewadjust
\setlength\tewadjust{\marginparwidth+\marginparsep-\paperwidth+\textwidth+\oddsidemargin+1in}
\tcbset{%
coeden/.style={
colback=doc@demo@backcolor,
colframe=doc@rulecolor,
halign=center,
fonttitle=\sffamily\plstyle\bfseries,
sharpish corners,
list entry={\protect\numberline{\thetcbcounter\textbar}#1},
title={\fbox{\plstyle\thetcbcounter}\hskip 1.5em #1},
float,
floatplacement={!tbp},
},
coeden dew/.style={
coeden=#1,
grow to left by=\tewadjust,
},
cod coeden/.style={
coeden=#1,
listing style=lstcoeden,
},
cod coeden dew/.style={
cod coeden=#1,
grow to left by=\tewadjust,
},
every float=\centering,
}
\NewTColorBox[auto counter, crefname={box}{boxes}, Crefname={Box}{Boxes},]{coeden}{s O {} m }
{%
IfBooleanTF={#1}{coeden dew=#3}{coeden=#3},
#2,
}
\NewTCBListing[use counter from=coeden, crefname={box}{boxes}, Crefname={Box}{Boxes}]{codcoeden}{ s O {} m }
{%
IfBooleanTF={#1}{cod coeden dew=#3}{cod coeden=#3},
listing side text,
halign lower=center,
#2,
}
\NewTCBListing[use counter from=coeden, crefname={box}{boxes}, Crefname={Box}{Boxes}]{codcoedenhir}{ s O {} m }
{%
IfBooleanTF={#1}{cod coeden dew=#3}{cod coeden=#3},
listing above text,
halign lower=center,
#2,
}
\newcommand*{\tnot}{\ensuremath{\mathord{\sim}}}
\newcommand*{\lif}{\ensuremath{\mathbin{\rightarrow}}}
\newcommand*{\liff}{\ensuremath{\mathbin{\leftrightarrow}}}
\DeclareMathSymbol{\aand}{\mathbin}{operators}{38}
\newcommand*\TikZ{Ti\emph{k}Z}
\newcommand*{\elim}{\,\text{E}}
\newcommand*\wff{\emph{wff}}
\newcounter{lliw}
\setcounter{lliw}{0}
\newcounter{rhiflliwnyth}
\setcounter{rhiflliwnyth}{0}
\def\rhiflliw{14}
\colorlet{fylliw}{WildStrawberry!\rhiflliw!blue}
\NewDocumentCommand\nyth { s o }{%
\IfBooleanTF {#1}{%
\stepcounter{lliw}%
}{}%
\IfValueTF {#2}{%
\setcounter{rhiflliwnyth}{#2}%
}{%
\setcounter{rhiflliwnyth}{\value{lliw}}%
}%
\pgfmathsetmacro\rhiflliw{int(\value{rhiflliwnyth}*100/14)}%
\colorlet{fylliw}{WildStrawberry!\rhiflliw!blue}%
\tikz[baseline=(a.base)]{%
\node (a) [circle, fill=fylliw, inner sep=0pt, font=\sffamily, text width=12pt, text depth=0pt, text centered, text=white] {\arabic{rhiflliwnyth}};
}%
}
\NewDocumentCommand\bocsnyth { O {} }{%
\tikz[baseline=(a.base)]{\node (a) [rounded corners, draw=fylliw, text width=15pt, text height=10pt, inner sep=0pt] {#1};
}%
}
\renewcommand\maketitlehookb{%
\begin{center}
Version \prooftreesdocversion{} \prooftreesdocinfo
\end{center}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ExplSyntaxOn
% \NewDocumentCommand \ivals { +m }
% {
% {
% \clist_if_empty:nF { #1 }
% {
% \normalfont
% \itshape
% < \clist_use:nn { #1 } { >\texttt{,} ~ < } >
% }
% }
% }
\keys_define:nn { prooftrees / doc }
{
unknown .code:n = {
\cs_if_free:cT { \l_keys_key_str }
{
\tl_gset:cn { \l_keys_key_str } { #1 }
}
},
}
\NewDocumentCommand \prooftreesdocset { +m }
{
\keys_set:nn { prooftrees / doc } { #1 }
}
\ExplSyntaxOff
\prooftreesdocset{%
bug={\href{https://codeberg.org/cfr/prooftrees/issues}{\textsc{bugtracker}}},
codeberg={\href{https://codeberg.org/cfr/prooftrees}{\textsc{codeberg}}},
github={\href{https://github.com/cfr42/prooftrees}{\textsc{github}}},
ctan={\href{https://ctan.org/}{\textsc{ctan}}},
}
% \newcommand*{\lpack}[1]{\textsf{#1}}
\title{\filebase}
\author{Clea F. Rees\thanks{%
Bug tracker:
\href{https://codeberg.org/cfr/prooftrees/issues}{\url{codeberg.org/cfr/prooftrees/issues}}
\textbar{} Code:
\href{https://codeberg.org/cfr/prooftrees}{\url{codeberg.org/cfr/prooftrees}}
\textbar{} Mirror:
\href{https://github.com/cfr42/prooftrees}{\url{github.com/cfr42/prooftrees}}%
}}
% \date{\fileversion~\filedate}
\date{\prooftreesdocdate}%
\title{\prooftreesdocbase}%
\ExplSyntaxOn
\hook_gput_code:nnn {shipout/lastpage} {.}
{
\property_record:nn {t:lastpage}{abspage,page,pagenum}
}
\cs_new_protected_nopar:Npn \lastpage
{
\property_ref:nn {t:lastpage}{page}
}
% \NewDocumentCommand \plarg {+m} {{\ttfamily (\ivals{#1})}}
\ExplSyntaxOff
% \NewDocumentCommand \istable{m}{\texttt{= \{}\ivals{#1}\texttt{\}}\par\noindent}
% \NewDocumentCommand \isstring{m}{\texttt{= ''}\meta{#1}\texttt{''}\par\noindent}
% \definecolor{strawberry}{rgb}{1.000,0.000,0.502}
% \definecolor{blueberry}{rgb}{0.000,0.000,1.000}
% \definecolor{moss}{rgb}{0.000,0.502,0.251}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}
\fancyhf[lh]{\textit{\leftmark}}
\fancyhf[rh]{\textit{\rightmark}}
\fancyhf[cf]{\textit{--- \thepage{} of \lastpage{} ---}}
\fancypagestyle{fancyplain}{%
\fancyhf{}%
\fancyhf[lh]{\textit{\leftmark}}%
\renewcommand*\headrulewidth{0pt}%
\fancyhf[cf]{\textit{--- \thepage{} of \lastpage{} ---}}}
\fancypagestyle{plain}{%
\fancyhf{}%
\renewcommand*\headrulewidth{0pt}%
\fancyhf[cf]{\textit{--- \thepage{} of \lastpage{} ---}}}
\patchcmd{\sectionmark}{\MakeUppercase}{}{\typeout{sectionmark patched OK!}}{\typeout{sectionmark patch failed!}}
\patchcmd{\tableofcontents}{\MakeUppercase}{}{\typeout{sectionmark patched OK!}}{\typeout{sectionmark patch failed!}}
\patchcmd{\tableofcontents}{\MakeUppercase\contentsname}{}{\typeout{sectionmark patched OK!}}{\typeout{sectionmark patch failed!}}
% Really, why on Earth does Biblatex do something this obnoxious?
% It is all for unilaterally declaring standard LaTeX macros 'deprecated' and trying to replace them with its own less convenient versions.
% It could at least do us the favour of holding some of its much less defensible and much more inconvenient design decisions in equal contempt!!
\defbibheading{bibliography}[\refname]{%
\section*{#1}%
\markboth{#1}{}}
\makeindex
% END preamble
\begin{document}
\newgeometry{headheight=12pt,scale=.8,marginparwidth=0pt,marginparsep=0pt}%
\savegeometry{safonol}%
\setlength\tewadjust{\marginparwidth+\marginparsep}%
\fancyheadoffset[lh]{0pt}% REQUIRED - do NOT remove this line!!
\pagenumbering{arabic}%
\maketitle
\bigskip
\begin{abstract}
\noindent \keyname[pkg]{\pkg{prooftrees}} is a \LaTeXe{} package, based on \keyname[pkg]{\pkg{forest}}, designed to support the typesetting of logical tableaux --- ‘proof trees’ or ‘truth trees’ --- in styles sometimes used in teaching introductory logic courses, especially those aimed at students without a strong background in mathematics.
One textbook which uses proofs of this kind is \textcite{hodges-logic}.
Like \pkg{forest}, \pkg{prooftrees} supports \keyname[pkg]{\pkg{memoize}} out-of-the-box.
\end{abstract}
\bigskip
\begin{figure}[!b]
\begin{adjustwidth}{-3em}{-5em}
\centering
\begin{minipage}[t]{.475\linewidth}
\begin{tableau}
{
to prove={S \liff \lnot T, T \liff \lnot R \sststile{\mathcal{L}}{} S \liff R},
highlight format={text=WildStrawberry},
line no sep=.35em,
just sep=.35em,
wff format={Purple4},
line no format={Purple4},
just format={Purple4},
close format={Purple4},
for tree={edge=Purple4},
close with format={Purple4},
where level=0{%
tikz+={%
\draw [Purple4, thick] (current bounding box.north west) rectangle (current bounding box.south east);
\draw [Purple4, semithick] (.south -| current bounding box.west) -- (.south -| current bounding box.east);
},
}{},
}
[{S \liff \lnot T}, checked, just=pr.
[T \liff \lnot R, checked, just=pr.
[\lnot(S \liff R), checked, just=$\lnot$ conc.
[S, just={$\liff$\elim:!uuu}
[\lnot T , just={$\liff$\elim:!uuuu}
[T, just={$\liff$\elim:!uuuu}
[\lnot R, close={:!uu,!u} , just={$\liff$\elim:!uuuuu}
]
]
[\lnot T
[\lnot \lnot R, checked
[\lnot S, just={$\lnot\liff$\elim:!r111}, highlight line
[R, just={$\lnot\liff$\elim:!r111}, close={:!uuuuu,!u}, highlight line
]
]
[S
[\lnot R
[R, just={$\lnot\lnot$\elim:!uuu}, close={:!u,!c}
]
]
]
]
]
]
]
[\lnot S, just={$\liff$\elim:!uuu}
[\lnot \lnot T, just={$\liff$\elim:!uuuu}, checked
[T, just={$\liff$\elim:!uuuu}
[\lnot R, just={$\liff$\elim:!uuuuu}
[\lnot S, just={$\lnot\liff$\elim:!r111}
[R, just={$\lnot\liff$\elim:!r111}, close={:!uu,!c}
]
]
[S
[\lnot R, close={:!r1111,!u}
]
]
]
]
[\lnot T
[\lnot \lnot R, checked
[T, close={:!uu,!c}, just={$\lnot\lnot$\elim:!uuu}
]
]
]
]
]
]
]
]
\end{tableau}%
\end{minipage}\hfill
\begin{minipage}[t]{.525\linewidth}
\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \Rightarrow (x = y)) \cdot Px) \sststile{\mathcal{L}_1}{} (\exists x)(\forall y)(Py \Leftrightarrow (x = y))},
line no sep=.35em,
just sep=.35em,
wff format={RoyalBlue4},
line no format={RoyalBlue4},
just format={RoyalBlue4},
close format={RoyalBlue4},
for tree={edge=RoyalBlue4},
close with format={RoyalBlue4},
where level=0{%
tikz+={%
\draw [RoyalBlue4, thick] (current bounding box.north west) rectangle (current bounding box.south east);
\draw [RoyalBlue4, semithick] (.south -| current bounding box.west) -- (.south -| current bounding box.east);
},
}{},
}
[{(\exists x)((\forall y)(Py \Rightarrow (x = y)) \cdot Px)}, checked=d, just=pr.
[{\tnot (\exists x)(\forall y)(Py \Leftrightarrow (x = y))}, subs=d, just=$\lnot$ conc.
[{(\forall y)(Py \Rightarrow (d = y)) \cdot Pd}, checked, just={$\exists$\elim:!uu}
[{(\forall y)(Py \Rightarrow (d = y))}, subs=c, just={$\cdot$\elim:!u}
[Pd, just=$\cdot$\elim:!uu
[{\tnot (\forall y)(Py \Leftrightarrow (d = y))}, checked=c, just={$\tnot\exists$\elim:!r11}
[{\tnot (Pc \Leftrightarrow (d = c))}, checked, just={$\tnot\forall$\elim:!u}
[Pc, just={$\tnot\Leftrightarrow$\elim:!u}
[d \neq c, just={$\tnot\Leftrightarrow$\elim:!uu}, name=fred
[{Pc \Rightarrow (d = c)}, checked, just=$\forall$\elim:!r1111, move by=1
[\tnot Pc, close={:!uuu,!c} , just=$\Rightarrow$\elim:!u, wff options=WildStrawberry, !uuu.wff options=WildStrawberry
]
[{d = c}
[d \neq d, close={:!c} , just={$=$:fred,!u}, wff options=red
]
]
]
]
]
[\tnot Pc
[{d = c}
[Pc, just={$=$:!r11111,!u}, close={:!uu,!c}, wff options=blue!50!cyan, !uu.wff options=blue!50!cyan
]
]
]
]
]
]
]
]
]
]
\end{tableau}%
\end{minipage}%
\end{adjustwidth}
\end{figure}
\emph{\bfseries Note that this package requires version 2.1 (2016/12/04) of \keyname[pkg]{\pkg{forest}} \autocite{saso-forest-manual}.
It will not work with versions prior to 2.1.}
\bigskip
\emph{I would like to thank \citeauthor{saso-forest-manual} both for developing \pkg{forest} and for considerable patience in answering my questions, addressing my confusions and correcting my mistakes.
The many remaining errors are, of course, entirely my own.
This package's deficiencies would be considerably greater and more numerous were it not for his assistance.}
\clearpage
\tableofcontents
\section{Raison d'être}\label{sec:raisondetre}
% BEGIN raisondetre
Suppose that we wish to typeset a typical proof tree demonstrating the following entailment
\[
\{P \vee (Q \vee \lnot R), P \lif \lnot R, Q \lif \lnot R\} \sststile{}{} \lnot R
\]
We start by typesetting the tree using \pkg{forest}'s default settings (\cref{fordefaults}) and find our solution has several advantages: the proof is specified concisely and the code reflects the structure of the tree.
\begin{codcoeden}[label=fordefaults,floatplacement=bp!]{\pkg{forest}: default settings}
\begin{forest}
[$P \vee (Q \vee \lnot R)$
[$P \lif \lnot R$
[$Q \lif \lnot R$
[$\lnot\lnot R$
[$P$
[$\lnot P$]
[$\lnot R$]
]
[$Q \vee \lnot R$
[$Q$
[$\lnot Q$]
[$\lnot R$]
]
[$\lnot R$]
]
]
]
]
]
\end{forest}
\end{codcoeden}
It is relatively straightforward to specify a proof using \pkg{forest}'s bracket notation, and the spacing of nodes and branches is automatically calculated.
Despite this, the results are not quite what we might have hoped for in a proof tree.
The assumptions should certainly be grouped more closely together and no edges (lines) should be drawn between them because these are not steps in the proof --- they do not represent inferences.
Preferably, edges should start from a common point in the case of branching inferences, rather than there being a gap.
Moreover, proof trees are often compacted so that \emph{non-branching} inferences are grouped together, like assumptions, without explicitly drawn edges.
Although explicit edges to represent non-branching inferences are useful when introducing students to proof trees, more complex proofs grow unwieldy and the more compact presentation becomes essential.
Furthermore, it is useful to have the option of \emph{annotating} proof trees by numbering the lines of the proof on the left and entering the justification for each line on the right.
\pkg{forest} is a powerful and flexible package capable of all this and, indeed, a good deal more.
It is not enormously difficult to customise particular trees to meet most of our desiderata.
However, it is difficult to get things perfectly aligned even in simple cases, requires the insertion of ‘phantom’ nodes and management of several sub-trees in parallel (one for line numbers, one for the proof and one for the justifications).
The process requires a good deal of manual intervention, trial-and-error and hard-coding of things it would be better to have \LaTeXe{} manage for us, such as keeping count of lines and line references.
\pkg{prooftrees} aims to make it as easy to specify proof trees as it was to specify our initial tree using \pkg{forest}'s default settings.
The package supports a small number of options which can be configured to customise the output.
The code for a \pkg{prooftrees} proof tree is shown in \cref{ptdefaults}, together with the output obtained using the default settings.
\begin{codcoeden}*[label=ptdefaults]{\pkg{prooftrees}: default settings}
\begin{tableau}
{
to prove={\{P \vee (Q \vee \lnot R), P \lif \lnot R, Q \lif \lnot R\} \sststile{}{} \lnot R}
}
[P \vee (Q \vee \lnot R), just=Ass, checked
[P \lif \lnot R, just=Ass, checked
[Q \lif \lnot R, just=Ass, checked, name=last premise
[\lnot\lnot R, just={$\lnot$ Conc}, name=not conc
[P, just={$\vee$ Elim:!uuuu}
[\lnot P, close={:!u,!c}]
[\lnot R, close={:not conc,!c}, just={$\lif$ Elim:!uuuu}]]
[Q \vee \lnot R
[Q, move by=1
[\lnot Q, close={:!u,!c}]
[\lnot R, close={:not conc,!c}, just={$\lif$ Elim:last premise}]]
[\lnot R, close={:not conc,!c}, move by=1, just={$\vee$ Elim:!u}]]]]]]
\end{tableau}
\end{codcoeden}
More extensive configuration can be achieved by utilising \pkg{forest} \autocite{saso-forest-manual} and/or \TikZ{} \autocite{tantau-tikz-pgf-manual} directly.
A sample of supported proof tree styles are shown in \cref{sample}.
The package is \emph{\bfseries not} intended for the typesetting of proof trees which differ significantly in structure.
\clearpage
\thispagestyle{plain}%
\begin{coeden}[label=sample, floatplacement={!bp}, grow to left by=3em, grow to right by=3em]{\pkg{prooftrees}: sample output}
\centering
\begin{tableau}
{
to prove={\{ P \lor (Q \lor \lnot R), P \lif \lnot R, Q \lif \lnot R \} \sststile{}{} \lnot R},
line no sep=.35em,
just sep=.35em,
}
[P \lor (Q \lor \lnot R), just=Ass, checked
[P \lif \lnot R, just=Ass, checked
[Q \lif \lnot R, just=Ass, checked
[\lnot\lnot R, just={Neg conc}
[P, just={$\lor$ Elim:!r1}
[\lnot P, close={:!u,!c}]
[\lnot R, close={:!uu,!c}, just={$\lif$ Elim:!r11}
]
]
[Q \lor \lnot R, checked
[Q, move by=1
[\lnot Q, close={:!u,!c}
]
[\lnot R, close={:!r1111,!c}, just={$\lif$ Elim:!r111}
]
]
[\lnot R, close={:!r1111,!c}, just={$\lor$ Elim:!u}, move by=1
]
]
]
]
]
]
\end{tableau}\hfill
{\renewcommand*\linenumberstyle[1]{#1)}%
\begin{tableau}
{
close with={\ensuremath{\ast}},
just format={text=gray, font=\itshape},
line no format={text=gray},
for tree={
edge path'={(!u.parent anchor) -- +(0,-5pt) -| (.child anchor)},
edge={gray},
},
line no sep=.35em,
just sep=.35em,
}
[P \lor (Q \lor \tnot R), just=Ass, checked
[P \supset \tnot R, just=Ass, checked
[Q \supset \tnot R, just=Ass, checked
[\tnot\tnot R, just={Neg conc}
[P, just={$\lor$ Elim:!r1}
[\tnot P, close={:!u,!c}]
[\tnot R, close={:!uu,!c}, just={$\supset$ Elim:!r11}
]
]
[Q \lor \tnot R, checked
[Q, move by=1
[\tnot Q, close={:!u,!c}]
[\tnot R, close={:!r1111,!c}, just={$\supset$ Elim:!r111}
]
]
[\tnot R, close={:!r1111,!c}, just={$\lor$ Elim:!u}, move by=1
]
]
]
]
]
]
\end{tableau}}
\begin{tableau}
{
not line numbering,
single branches,
close with={\fycross},
check with={\fycheck},
check left,
line no sep=.35em,
just sep=.35em,
}
[P \lor (Q \lor \lnot R), just=Ass, checked
[P \lif \lnot R, just=Ass, checked, grouped
[Q \lif \lnot R, just=Ass, checked, grouped
[\lnot\lnot R, just={Neg conc}, grouped
[P, just={$\lor$ Elim}
[\lnot P, close]
[\lnot R, close, just={$\lif$ Elim}
]
]
[Q \lor \lnot R, checked
[Q, move by=1
[\lnot Q, close]
[\lnot R, close, just={$\lif$ Elim}
]
]
[\lnot R, close, just={$\lor$ Elim}, move by=1
]
]
]
]
]
]
\end{tableau}%
\hfill\begin{tableau}
{
to prove={\{ P \lor (Q \lor \lnot R), P \lif \lnot R, Q \lif \lnot R \} \therefore \lnot R},
close with={\ensuremath{\times}},
highlight format={text=red},
line no sep=.35em,
just sep=.35em,
}
[P \lor (Q \lor \lnot R), just=Ass, checked
[P \lif \lnot R, just=Ass, checked
[Q \lif \lnot R, just=Ass, checked
[\lnot\lnot R, just={Neg conc}, highlight wff
[P, just={$\lor$ Elim:!r1}
[\lnot P, close={:!u,!c}, move by=2]
[\lnot R, close={:!uu,!c}, just={$\lif$ Elim:!r11}, highlight wff, move by=2
]
]
[Q \lor \lnot R, checked
[Q
[\lnot Q, close={:!u,!c}
]
[\lnot R, close={:!r1111,!c}, just={$\lif$ Elim:!r111}, highlight wff
]
]
[\lnot R, close={:!r1111,!c}, just={$\lor$ Elim:!u}, highlight wff
]
]
]
]
]
]
\end{tableau}
\begin{tableau}
{
to prove={(\exists x)(Lx \lor Mx) \sststile{}{} (\exists x) Lx \lor (\exists x) Mx},
highlight format={text=blue!50!cyan},
line no sep=.5em,
just sep=.5em,
}
[(\exists x) (Lx \lor Mx), checked=a, just=Ass
[\lnot ((\exists x) Lx \lor (\exists x) Mx), checked, just=Neg Conc
[La \lor Ma, checked, just={1 $\exists$\elim}
[\lnot (\exists x) Lx, subs=a, just={2 $\lnot\lor$\elim}, highlight line, tikz+/.wrap pgfmath arg={%
\draw [decorate, decoration={brace, mirror}, draw=blue!50!cyan] (!1.south east -| just #1.east) ++(0,5pt) -- (just #1.north east);
}{level()}
[\lnot (\exists x) Mx, subs=a, highlight line
[\lnot La, just={4 $\lnot\exists$\elim}
[\lnot Ma, just={5 $\lnot\exists$\elim}
[La, close={6,8}, just={3 $\lor$\elim}]
[Ma, close={7,8}]
]
]
]
]
]
]
]
\end{tableau}%
\hfill\begin{tableau}
{
for tree={%
plain content,
edge path'={(!u.parent anchor) -- ++(0,-5pt) -| (.child anchor)},
align=center,
edge={rounded corners},
},
not line numbering,
just sep=.5em,
}
[Either Alice saw nobody\\or she didn't see nobody.
[Alice saw nobody., just={$\vee$\elim}, subs=Jones
[Alice didn't see Jones., just={$\forall$\elim}]
]
[Alice didn't see nobody., move by=2, just={$\vee$\elim}
[Alice saw somebody., just={$\lnot\lnot$\elim}, checked=Jones
[Alice saw Jones., just={$\exists$\elim}, before typesetting nodes={for current and ancestors/.wrap pgfmath arg={edge+/.wrap pgfmath arg={red!##1!blue}{100*(level)/#1}, text/.wrap pgfmath arg={red!##1!blue}{100*(level)/#1}}{level}}]
]
]
]
\end{tableau}
\end{coeden}
% END sec:raisondetre
\clearpage
\section{Assumptions \& Limitations}\label{sec:ass}
% BEGIN sec:ass
\pkg{prooftrees} makes certain assumptions about the nature of the proof system, $\mathcal{L}$, on which proofs are based.
\begin{itemize}
\item All derivation rules yield equal numbers of \wff{}s on all branches.
\begin{center}
\begin{tableau}
{
not line numbering,
for tree={plain content},
for root={s sep+=10pt}
}
[\wff[\wff][\wff[\phantom{\wff}, label={[text=Green3]right:{\fycheck}}]]]
[\wff[\wff[\wff]][\wff[\wff, label={[text=Green3]right:{\fycheck}}]]]
[\wff[\wff][\wff[\wff, label={[text=red]right:{\fycross}}]]]
[\wff[\wff[\wff]][\wff[\phantom{\wff}, label={[text=red]right:{\fycross}}]]]
\end{tableau}
\end{center}
If $\mathcal{L}$ fails to satisfy this condition, \pkg{prooftrees} is likely to violate the requirements of affected derivation rules by splitting branches ‘mid-inference’.
\item No derivation rule yields \wff{}s on more than two branches.
\item All derivation rules proceed in a downwards direction at an angle of -90\textdegree{} i.e.~from north to south.
\item Any justifications are set on the far right of the proof tree.
\item Any line numbers are set on the far left of the proof tree.
\item Justifications can refer only to earlier lines in the proof.
\pkg{prooftrees} can typeset proofs if $\mathcal{L}$ violates this condition, but the cross-referencing system explained in \cref{subsec:lo} cannot be used for affected justifications.
\end{itemize}
\pkg{prooftrees} does not support the automatic breaking of proof trees across pages.
Proof trees can be manually broken by using \keyname[fregcount]{line no shift} with an appropriate value for parts after the first (\cref{subsec:go}).
However, horizontal alignment across page breaks will not be consistent in this case.
In addition, \pkg{prooftrees} almost certainly relies on additional assumptions not articulated above and certainly depends on a feature of \pkg{forest} which its author classifies as experimental (\keyname*{do dynamics}).
% END sec:ass
\section{Typesetting a Proof Tree}\label{sec:ee}
% BEGIN sec:ee
After loading \pkg{prooftrees} in the document preamble:
\begin{latexcode}
% in document's preamble
\usepackage{prooftrees}
\end{latexcode}
the \env{prooftree} environment is available for typesetting proof trees.
This takes an argument used to specify a \meta{tree preamble}, with the body of the environment consisting of a \meta{tree specification} in \pkg{forest}'s notation.
The \meta{tree preamble} can be as simple as an empty argument --- \arg{} --- or much more complex.
Customisation options and further details concerning loading and invocation are explained in \cref{sec:llwytho}, \cref{sec:invoke}, \cref{sec:anatomy}, \cref{sec:ops} and \cref{sec:macros}.
In this section, we begin by looking at a simple example using the default settings.
Suppose that we wish to typeset the proof tree for
\[
(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)
\]
and we would like to typeset the entailment established by our proof at the top of the tree.
Then we should begin like this:
\begin{latexcode}
\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
\end{tableau}
\end{latexcode}
That is all the preamble we want, so we move onto consider the \meta{tree specification}.
\pkg{forest} uses square brackets to specify trees' structures.
To typeset a proof, think of it as consisting of nested trees, trunks upwards, and work from the outside in and the trunks down (\cref{nythod}).
\begin{coeden}[label=nythod]{Nested structure of proof tree}
\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)},
just sep*=3,
line no sep*=3,
for root={%
tikz+={%
\foreach \i [evaluate=\i as \j using 100*\i/14, evaluate=\i as \k using (11*(\i-7))-30, evaluate=\i as \m using (11*(7-\i))-30] in {13,...,1}
{%
\ifnum\i<8
\coordinate (p\i) at ([yshift=-1 pt,xshift=\k pt]current bounding box.south);
\else
\ifnum\i<10
\coordinate (p\i) at ([yshift=-1 pt,xshift=\m pt]current bounding box.south);
\else
\ifnum\i=10
\coordinate (p\i) at ([yshift=-1 pt,xshift=\k+40 pt]current bounding box.south);
\else
\coordinate (p\i) at ([yshift=-1 pt,xshift=\k-52 pt]current bounding box.south);
\fi
\fi
\fi
\node [fill=WildStrawberry!\j!blue, circle, font=\sffamily\small, text width=12pt, text centered, text=white, inner sep=0pt] at (p\i) {\i};
\ifnum\i>7
\ifnum\i<10
\coordinate (q\i) at ([xshift=\k+40 pt]current bounding box.south |- p\i);
\node [fill=WildStrawberry!\j!blue, circle, font=\sffamily\small, text width=12pt, text centered, text=white, inner sep=0pt] at (q\i) {\i};
\else
\ifnum\i<13
\ifnum\i>11
\coordinate (q\i) at ([xshift=\m pt]current bounding box.south |- p\i);
\node [fill=WildStrawberry!\j!blue, circle, font=\sffamily\small, text width=12pt, text centered, text=white, inner sep=0pt] at (q\i) {\i};
\fi
\fi
\fi
\fi
}
},
},
for tree={%
s sep+=30pt,
if={((level()>=1)&&(proof_tree_rhifo()==1)))}{%
node options/.wrap pgfmath arg={draw, rounded corners, WildStrawberry!#1!blue}{(level()+proof_tree_toing_by())*100/14},
fill=white,
delay={%
tempcounta=int(level()+proof_tree_toing_by()),
if={(tempcounta)<=7}{% proof_tree_toing_by is zero here
nyth/.wrap pgfmath arg={{(!r211111111112111) (!Luu) (!Luuu) (!11) (!Fuu) (!r21111111111)}{#1}{p}}{tempcounta},
}{%
if={(tempcounta)>9}{%
if={n("!uu")==2}{}{%
tempcounta'+=1,
if={(n()==1)&&(n_children("!u")==2)}{%
nyth/.wrap pgfmath arg={{}{#1}{q}}{tempcounta},
}{%
nyth/.wrap pgfmath arg={{}{#1}{p}}{tempcounta},
},
},
}{%
if={((tempcounta)==8)&&(n()==1)}{%
nyth={(!1111) (!llll) (!lllll)}{8}{p},
!1.nyth={(!111) (!lll) (!llll)}{9}{p},
}{%
if={n()==2}{%
nyth/.wrap pgfmath arg={{(!1)}{#1}{q}}{tempcounta},
tempcounta'+=1,
!1.nyth/.wrap pgfmath arg={{(!1)}{#1}{q}}{tempcounta},
tempcounta'+=1,
!11.nyth/.wrap pgfmath arg={{(!1)}{#1}{p}}{tempcounta},
}{},
},
},
},
},
}{},
},
}
[{(\exists x)((\forall y)(Py \lif x = y) \land Px)}, checked=a, just=Pr., name=pr
[{\lnot (\exists x)(\forall y)(Py \liff x = y)}, subs=a, just=Conc.~neg., name=neg conc
[{(\forall y)(Py \lif a = y) \land Pa}, checked, just=$\exists\elim$:pr
[{(\forall y)(Py \lif a = y)}, subs=b, just=$\land\elim$:!u, name=mark
[Pa, just=$\land\elim$:!uu, name=simple
[{\lnot (\forall y)(Py \liff a = y)}, checked=b, just=$\lnot\exists\elim$:neg conc
[{\lnot (Pb \liff a = b)}, checked, just=$\lnot\forall\elim$:!u
[Pb, just=$\liff\elim$:!u, name=to Pb or not to Pb
[a \neq b, just=$\liff\elim$:!u
[{Pb \lif a = b}, checked, just=$\forall\elim$:mark, move by=1
[\lnot Pb, close={:to Pb or not to Pb,!c}, just=$\lif\elim$:!u