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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
|
% \iffalse meta-comment
%
% grundgesetze: LaTeX2e package for typesetting begriffsschrift
% in the of Gottlob Frege's _Grundgesetze der Arithmetik_ (Jena 1893/1903)
%
% Copyright (C) 2003-2014 by Josh Parsons <josh.parsons@ccc.ox.ac.uk>,
% Marcus Rossberg <marcus.rossberg@uconn.edu>,
% J.J. Green <j.j.green@gmx.co.uk>,
% Richard G. Heck, Jr. <richard_heck@brown.edu>,
% and Agust’n Rayo <arayo@mit.edu>
%
% This package is based on begriff.sty, originally written by
% Josh Parsons in 2003, 2005.
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
% General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
% USA.
%
% \fi
%
% \CheckSum{569}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%
% \iffalse % this is a METACOMMENT !
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{grundgesetze}
%<package> [2014/06/16 1.02 grundgesetze package]
%
%<*driver>
\documentclass[a4paper,10pt,draft]{ltxdoc}
\OnlyDescription % <- comment out to include style code listing at the end of the document
\usepackage[bguq=5]{grundgesetze}
% \usepackage{grundgesetze}
\usepackage{begriff}
\usepackage{fge}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{placeins}
\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
\renewcommand{\quad}{{\hskip1em plus 2em}}
\begin{document}
\DocInput{grundgesetze.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{grundgesetze.sty}
% \title{\emph{Grundgesetze.sty} for \LaTeX2e\ Documentation}
% \author{Marcus Rossberg \\
% University of Connecticut \\
% \texttt{marcus.rossberg@uconn.edu}}
% \date{Version \fileversion{} \filedate}
% \maketitle
% \setcounter{StandardModuleDepth}{1}
%
% \noindent
% \emph{Grundgesetze.sty} is a \LaTeX2e\ package for typesetting
% Gottlob Frege's \emph{begriffs\-schrift} [concept-script] formalism
% in the style of his \emph{Grundgesetze der Arithmetik}
% (1893/1903). \emph{Grundgesetze.sty} was developed for the 2013 English
% edition.\footnote{Gottlob Frege: \emph{Basic Laws of Arithmetic}.
% Translated and edited by Philip A. Ebert and Marcus Rossberg. Oxford 2013.}
% The package is based on Josh Parsons's \emph{begriff.sty} which renders
% the formalism in the style of Frege's earlier work,
% \emph{Begriffsschrift} (1879). It was amended by Richard~G.~Heck~Jr.,
% J.\,J.~Green, Agust\'in~Rayo, and Marcus~Rossberg. Thanks to
% Philip Ebert for testing and suggestions. Note that Frege's
% defined function symbols are not rendered by this package, but
% by J.\,J.~Green's \emph{fge.sty}.
%
% \section{Options}
%
% At present the only package option is |bguq|, which causes the package
% to use the |bguq| font for an alternative universal quantifier
% (concavity), and this option accepts a value (being the size to be used,
% as in |bguq=6|, the default being 5). Of course, one must have the
% |bguq| font installed to use this option, but it is included in recent
% versions of the big \TeX\ distributions.
%
% \section{Basic Commands}
%
% \DescribeMacro{\GGhorizontal}
% \indent The horizontal, $\GGhorizontal$
%
% \DescribeMacro{\GGnot}
% The negation-stroke, $\GGnot$
%
% \DescribeMacro{\GGconditional}
% Conditional-stroke: called as |\GGconditional{p}{q}}| yields
% $\GGconditional{p}{q}$ (i.e., `$p\supset q$')
%
% \DescribeMacro{\GGquant}
% Concavity: called as |\GGquant{\mathfrak a}| gives
% $\GGquant{\mathfrak a}$ (i.e., universal quantifier,
% `$\mathfrak{a}$' is the quantified variable)
%
% \DescribeMacro{\GGjudge}
% Judgement-stroke, $\GGjudge$
%
% \DescribeMacro{\GGdef}
% Definition-stroke, $\GGdef$
%
% \DescribeMacro{\GGbracket}
% Automatically scaling brackets, |\GGbracket{\ldots}| yields
% $\GGbracket{\ldots}$ (see examples)
%
% \DescribeMacro{\GGsqbracket}
% Analogous square brackets, $\GGsqbracket{\ldots}$
%
% A complete list of commands and synonymns in
% the package can be found in Table~\ref{table:allmacros}, and
% the lengths parameterising the appearance of the output in
% Table~\ref{table:lengths}.
%
% \subsection{Examples}
%
% \begin{itemize}
%
% \item
%\begin{verbatim}
%\GGjudge \GGquant{\mathfrak a} \mathfrak a = \mathfrak a
%\end{verbatim}
% yields
% \begin{equation*}
% \GGjudge \GGquant{\mathfrak a} \mathfrak a = \mathfrak a
% \end{equation*}
%
%
% \item
%\begin{verbatim}
%\GGjudge \GGnot \GGquant{\mathfrak F} \GGnot
% \GGquant{\mathfrak a} \mathfrak{Fa}
%\end{verbatim}
% yields
% \begin{equation*}
% \GGjudge \GGnot \GGquant{\mathfrak F} \GGnot
% \GGquant{\mathfrak a} \mathfrak{Fa}
% \end{equation*}
%
% \item
%\begin{verbatim}
%\GGjudge \GGconditional{(\GGhorizontal p)}{p}
%\end{verbatim}
% yields
% \begin{equation*}
% \GGjudge \GGconditional{(\GGhorizontal p)}{p}
% \end{equation*}
%
% \item
%\begin{verbatim}
%\GGjudge \GGbracket{\GGconditional{p}{q}} =
% \GGbracket{\GGconditional{\GGnot q}{\GGnot p}}
%\end{verbatim}
% yields
% \begin{equation*}
% \GGjudge \GGbracket{\GGconditional{p}{q}} =
% \GGbracket{\GGconditional{\GGnot q}{\GGnot p}}
% \end{equation*}
%
% \end{itemize}
%
% There are further examples, including Frege's basic laws of logic,
% available for download on \texttt{www.frege.info}.
%
%
% \section{Advanced Typesetting}
%
% \subsection{Left-alignment of terminal forumlae:
% \texttt{\textbackslash GGterm}\label{term}}
%
% Conditional-strokes, negation-strokes, and concavities that are
% embedded in conditionals can result in a ragged appearance of the
% formula:
%
% \begin{itemize}
%
% \item
%\begin{verbatim}
%\GGjudge\GGconditional{p}{\GGconditional{q}{p}}
%\end{verbatim}
% yields:
% \begin{equation*}
% \GGjudge\GGconditional{p}{\GGconditional{q}{p}}
% \end{equation*}
%
% \item
%\begin{verbatim}
%\GGjudge\GGconditional{Fa}
% {\GGnot \GGquant{\mathfrak a} \GGnot F \mathfrak a}
%\end{verbatim}
% yields:
% \begin{equation*}
% \GGjudge\GGconditional{Fa}
% {\GGnot \GGquant{\mathfrak a} \GGnot F \mathfrak a}
% \end{equation*}
%
%% \end{itemize}
%
% In Frege's original work, the component formulae of conditionals
% are left-aligned. This can be achieved by marking ``terminal formulae''
% using the command |\GGterm{|$\langle\text{math}\rangle$|}|; the length
% |\GGlinewidth| specifies the distance of the terminal formula from
% the left end of the whole formula (typically, `\,$\GGjudge\!$'):
%
% \begin{itemize}
%
% \item
%\begin{verbatim}
%\setlength{\GGlinewidth}{9.2pt} \GGjudge
%\GGconditional
% {\GGterm{p}}
% {\GGconditional{\GGterm{q}}
% {\GGterm{p}}}
%\end{verbatim}
% yields:
% \begin{equation*}
% \setlength{\GGlinewidth}{9.2pt}
% \GGjudge\GGconditional{\GGterm{p}}{\GGconditional{\GGterm{q}}{\GGterm{p}}}
% \end{equation*}
%
% \item
%\begin{verbatim}
%\setlength{\GGlinewidth}{25.2pt}
%\GGjudge\GGconditional{\GGterm{Fa}}
% {\GGnot \GGquant{\mathfrak a} \GGnot
% \GGterm{F \mathfrak a}}
%\end{verbatim}
% yields:
% \begin{equation*}
% \setlength{\GGlinewidth}{25.2pt}
% \GGjudge\GGconditional{\GGterm{Fa}}
% {\GGnot \GGquant{\mathfrak a} \GGnot
% F \mathfrak a}
% \end{equation*}
%
% \end{itemize}
%
% \begin{table}[ph]
% \begin{center}
% \begin{tabular}{lp{7mm}l}
% \toprule
% negation-stroke & \GGnot & 4.4pt\\
% conditional-stroke & $\GGconditional{}{}$ & 4.4pt \\
% concavity & $\GGquant{}$ & 11.6pt \\
% judgement-stroke: & \GGjudge & \\
% \hspace{10pt}present & & add .4pt\\
% \hspace{10pt}not present & & subtract 2pt\\
% \bottomrule
% \end{tabular}
% \end{center}
% \caption{Lengths of embedded symbols\label{table:embedded}}
% \end{table}
%
% The correct values for |\GGlinewidth| for each formula can be
% determined by adding up the lengths
% of the embedded symbols, as given in Table~\ref{table:embedded},
% or by using a GUI that allows producing \LaTeX\ and XML code for
% \emph{begriffsschrift} formulae via mouse-click and that will
% calculate and output the correct values. The GUI is available for
% download on \texttt{www.frege.info}.
%
% \subsection{Adding horizontal lengths manually:
% \texttt{\textbackslash GGnonot}, etc.}
%
% Readability is sometimes aided by moving, e.g., negations to the
% right end of the horizontal in a complex formula. For instance,
% Frege nearly always preferred the rendering displayed on the right
% in these types of formulae:
%
% \begin{center}
% \begin{tabular}{rp{20mm}p{20mm}}
% (a) &
% \GGjudge\GGconditional{\GGquant{\mathfrak a}
% \GGnot f(\mathfrak a)}{\GGnot\GGnoquant f(a)} &
% \GGjudge\GGconditional{\GGquant{\mathfrak a}
% \GGnot f(\mathfrak a)}{\GGnoquant\GGnot f(a)}\\ \addlinespace[10pt]
%
% (b) &
% \GGjudge\GGconditional{\GGquant{\mathfrak a}
% \GGconditional{f(\mathfrak a)}{g(\mathfrak a)}}
% {\GGconditional{\GGnoquant f(a)}{\GGnoquant g(a)}} &
% \GGjudge\GGconditional{\GGquant{\mathfrak a}
% \GGconditional{f(\mathfrak a)}{g(\mathfrak a)}}
% {\GGnoquant\GGconditional{f(a)}{g(a)}}\\ \addlinespace[10pt]
%
% (c) &
% \GGjudge\GGconditional{\GGnot\GGnonot f(a)}
% {\GGconditional{\GGnonot f(b)}{\GGnot a=b}} &
% \GGjudge\GGconditional{\GGnonot\GGnot f(a)}
% {\GGconditional{\GGnonot f(b)}{\GGnot a=b}}
% \end{tabular}
% \end{center}
%
% The right-hand formulae are produced by inserting commands
% for horizontals of the appropriate length directly at the
% position where the ``space'' should appear. The three
% right-hand formulae above are created in this way:
% \begin{itemize}
% \item[(a)] \begin{verbatim}\GGjudge \GGconditional
% {\GGquant{\mathfrak a} \GGnot f(\mathfrak a)}
% {\GGnoquant \GGnot f(a)}\end{verbatim}
% \item[(b)] \begin{verbatim}\GGjudge \GGconditional
% {\GGquant{\mathfrak a}
% \GGconditional{f(\mathfrak a)}{g(\mathfrak a)}}
% {\GGnoquant \GGconditional{f(a)}{g(a)}}\end{verbatim}
% \item[(c)] \begin{verbatim}\GGjudge \GGconditional
% {\GGnonot \GGnot f(a)}
% {\GGconditional{\GGnonot f(b)}{\GGnot a=b}}\end{verbatim}
% \end{itemize}
%
% \section{Comparison and compatibility with \emph{begriff.sty}}
%
% Josh Parsons's \emph{begriff.sty}, on which \emph{grundgesetze.sty}
% is based, is closer in appearance to Frege's formalism as it is
% presented in Frege's first book, \emph{Begriffs\-schrift} (1879).
% The corresponing commands were given different names so that both
% pack\-ages can be used in the same \TeX~document; see Table~\ref{table:compat}.
%
% \begin{table}[hp]
% \begin{tabular}{lp{16mm}p{13mm}l}
% \toprule
% \multicolumn{2}{l}{\emph{begriff.sty}} &
% \multicolumn{2}{l}{\emph{grundgesetze.sty}} \\
% command & symbol & symbol & command \\
% \midrule
% |\BGcontent| & \BGcontent &
% \GGhorizontal & |\GGhorizontal| \\
% |\BGnot| & \BGnot &
% \GGnot & |\GGnot| \\
% |\BGconditional{p}{q}| & $\BGconditional{p}{q}$ &
% $\GGconditional{p}{q}$ & |\GGconditional{p}{q}| \\
% |\BGquant{\mathfrak a}| & $\BGquant{\mathfrak a}$ &
% $\GGquant{\mathfrak a}$ & |\GGquant{\mathfrak a}| \\
% |\BGassert| & \BGassert &
% \GGjudge & |\GGjudge| \\
% |\BGbracket{\ldots}| & $\BGbracket{\BGconditional{p}{q}}$ &
% $\GGbracket{\GGconditional{p}{q}}$ & |\GGbracket{\ldots}| \\
% \bottomrule
% \end{tabular}
% \caption{Compatibility with \emph{begriff.sty}\label{table:compat}}
% \end{table}
%
% \noindent Also note the differences in alignment between
% |\BGbracket| and |\GGbracket| as shown in Table~\ref{table:align}
%
% \begin{table}[hp]
% \begin{tabular}{ll}
% |\BGbracket| &
% $
% \setlength{\BGlinewidth}{28.4pt}
% \BGassert (\spirituslenis{\varepsilon}f(\varepsilon) =
% \spirituslenis{\alpha}g(\alpha)) =
% \BGquant{\mathfrak{a}}
% \BGbracket{\BGconditional{
% \BGnot\BGconditional{
% \BGnot\mathfrak{a}=\spirituslenis{\alpha}g(\alpha)
% }{
% \BGterm{\mathfrak{a}=\spirituslenis{\varepsilon}f(\varepsilon)}
% }
% }
% {\BGterm{f(\mathfrak{a}) = g(\mathfrak{a})}}}
% $ \\
% ~\\
% |\GGbracket|: \hspace{5mm} &
% $
% \GGjudge(\spirituslenis{\varepsilon}f(\varepsilon) =
% \spirituslenis{\alpha}g(\alpha)) =
% \GGquant{\mathfrak{a}}
% \GGbracket{\GGconditional{
% \GGnot\GGconditional{
% \GGnot\mathfrak{a}=\spirituslenis{\alpha}g(\alpha)
% }{
% \GGnonot \mathfrak{a}=\spirituslenis{\varepsilon}f(\varepsilon)
% }
% }
% {\GGnonot\GGnonot\GGnonot f(\mathfrak{a}) = g(\mathfrak{a})}}
% $
% \end{tabular}
% \caption{\texttt{\textbackslash BGbracket} and
% \texttt{\textbackslash GGbracket} alignment
% \label{table:align}}
% \end{table}
%
% \subsection{Conversion of a \emph{begriff.sty} document into a
% \emph{grundgesetze.sty} document}
%
% A straightforward way to convert the a \LaTeX\ document that uses
% \emph{begriff.sty} into one that uses \emph{grundgesetze.sty} without
% manually exchanging the commands is to find and replace (using wrap
% search) ``|\BG|" by ``|\GG|". Synonyms have been added to
% \emph{grundgesetze.sty} to allow the use of all \emph{begriff.sty}
% commands ``translated" in this way (see Table~\ref{table:allmacros}).
%
% \begin{table}[hp]
% \begin{tabular}{p{39mm}p{12mm}p{58mm}}
% \toprule
% command & symbol & synonym / comment\\
% \midrule
% |\GGterm{\ldots}| & & (marks terminal formula)\\
% |\GGhorizontal| & \GGhorizontal & |\GGcontent|\\
% |\GGjudge| & \GGjudge & |\GGassert|\\
% |\GGjudgelong| & \GGjudgealone &
% |\GGjudgealone|, |\GGassertlong|, |\GGassertalone|\\
% |\GGjudgevar{|$\langle\text{\emph{length}}\rangle$|}| &
% \GGjudgevar{6pt} &
% |\GGassertvar{|$\langle\text{\emph{length}}\rangle$|}|
% (variable horizontal length, here: 6pt)\\
% |\GGdef| & $\GGdef$\\
% |\GGdeflong| & \GGdefalone & |\GGdefalone|\\
% |\GGdefvar{|$\langle\text{\emph{length}}\rangle$|}| &
% \GGdefvar{6pt} & (variable horizontal length, here: 6pt)\\
% |\GGnot| & \GGnot & |\GGneg| \\
% |\GGnotalone| & \GGnotalone & (standalone negation-stroke)\\
% |\GGdnot| & \GGdnot & (standalone double negation-stroke)\\
% |\GGconditional{p}{q}| & $\GGconditional{p}{q}$ \\
% |\GGquant{\mathfrak a}| & $\GGquant{\mathfrak a}$\\
% |\GGall{a}| & $\GGall{a}$ & |\GGquant{\mathfrak a}|\\
% |\GGbracket{\ldots}| & \GGbracket{\ldots} &
% (automatically scaling brackets)\\
% |\GGsqbracket{\ldots}| & \GGsqbracket{\ldots} & (ditto square brackets)\\
% |\GGnonot| & \GGnonot & horizontal of |\GGnot| length\\
% |\GGnoquant| & \GGnoquant & horizontal of |\GGquant| length\\
% |\GGnoboth| & \GGnoboth &
% horizontal of length: |\GGnot| plus |\GGquant| \\
% |\GGnonotalone| & \GGnonotalone &
% horizontal of |\GGnotalone| length \\
% |\GGnodnot| & \GGnodnot &
% horizontal of |\GGdnot| length\\
% |\GGoddspace| & \GGoddspace &
% horizontal of length: |\GGquant| minus |\GGnot|\\
% |\GGtinyspace| & \GGtinyspace &
% horizontal of length: |\GGquant| minus twice |\GGnot|)\\
% |\GGtiniestspace| & \GGtiniestspace &
% horizontal of length: thrice |\GGnot| minus |\GGquant|\\
% \bottomrule
% \end{tabular}
% \caption{All commands (and synonyms) defined by the
% package\label{table:allmacros}}
% \end{table}
%
% \begin{table}[hp]
% \begin{tabular}{lp{22mm}p{56mm}}
% \toprule
% length & default value & explanation \\
% \midrule
% |\GGthickness| & 0.4pt & thickness of horizontal and vertical lines\\
% |\GGquantthickness| & {$0.75 \times$ |\GGthickness|} &
% thickness of the line of the quantifier ``dish''. Note that
% this value is unused if the |bguq| option has been selected\\
% |\beforelen| & 2.4pt &
% length of horizontal before quantifier, conditional, and negation\\
% |\GGafterlen| & 2pt &
% length of horizontal after quantifier, conditional, negation,
% judgement-, and definition-stroke\\
% |\GGspace| & 3pt &
% space between right end of horizontal and terminal formula\\
% |\GGlift| & 2pt &
% lift of horizontal from baseline\\
% |\GGlinewidth| & (n/a) &
% total length from left end of formula (typically,
% `|\GGjudge|') and the beginning of the terminal formula
% (see \S\ref{term})\\
% \bottomrule
% \end{tabular}
% \caption{Length parameters and their default values\label{table:lengths}}
% \end{table}
%
% \FloatBarrier
% \StopEventually{}
%
% \section{The \dst{} modules}
%
% The following modules are used in the implementation to direct
% \dst{} in generating the external files:
% \begin{center}
% \begin{tabular}{ll}
% driver & produce a documentation driver file \\
% package & produce a package file \\
% \end{tabular}
% \end{center}
%
% \section{The Implementation}
%
% \subsection{Lengths and thicknesses}
%
% \begin{macro}{\GGthickness}
% Thickness of lines
% \begin{macrocode}
\newlength{\GGthickness}
\setlength{\GGthickness}{0.4pt}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGquantthickness}
% Thickness of lines for quantifier-curvature
% \begin{macrocode}
\newlength{\GGquantthickness}
\setlength{\GGquantthickness}{0.75\GGthickness}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGafterlen}
% Additional length after a quantifier, conditional, negation, or
% assertion
% \begin{macrocode}
\newlength{\GGafterlen}
\setlength{\GGafterlen}{2pt}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGbeforelen}
% Additional length before a quantifier, conditional, or negation
% \begin{macrocode}
\newlength{\GGbeforelen}
\setlength{\GGbeforelen}{2.4pt}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGspace}
% Space inserted before a formula
% \begin{macrocode}
\newlength{\GGspace}
\setlength{\GGspace}{3pt}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGlift}
% Lift from baseline
% \begin{macrocode}
\newlength{\GGlift}
\setlength{\GGlift}{2pt}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGlinewidth}
% Total width of diagram
% \begin{macrocode}
\newlength{\GGlinewidth}
\setlength{\GGlinewidth}{\linewidth}
% \end{macrocode}
% \end{macro}
%
% \subsection{Options}
%
% \begin{macro}{bguq}
% The |bguq| option causes the package to use the |bguq| font,
% providing an alternative universal quantification stroke. Of
% course, one must have the |bguq| font installed, but it is
% included in recent versions of the big \TeX\ distributions.
% \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=grundgesetze,prefix=grundgesetze@}
\DeclareStringOption{bguq}[5]
% \end{macrocode}
% \end{macro}
% Process the key-value options
% \begin{macrocode}
\ProcessKeyvalOptions{grundgesetze}
% \end{macrocode}
% If the |bguq| option has been chosen the require the |bguq| package
% and pass the option value (the size) as the package option
% \begin{macrocode}
\ifx\grundgesetze@bguq\@empty
\else
\RequirePackage[\grundgesetze@bguq]{bguq}
\fi
% \end{macrocode}
%
% \subsection{The main part of the code}
% \begin{macrocode}
\typeout{Grundgesetze Begriffsschrift: June 2014}
\ifx\grundgesetze@bguq\@empty
\typeout{Universal quantifier by qbezier}
\else
\typeout{Universal quantifier by bguq at size \grundgesetze@bguq}
\fi
% \end{macrocode}
% \begin{macro}{\GGbracket}
% Variable-sized parenthesis
% \begin{macrocode}
\newcommand{\GGbracket}[1]{%
\setbox0=\hbox{\ensuremath{#1}}%
\dimen0=0.5\dp0%
\addtolength{\dimen0}{-1\GGlift}%
\raisebox{-\dimen0}{%
\ensuremath{\left(\raisebox{\dimen0}{\box0}\right)}}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGsqbracket}
% Variable-sized square parenthesis
% \begin{macrocode}
\newcommand{\GGsqbracket}[1]{%
\setbox0=\hbox{\ensuremath{#1}}%
\dimen0=0.5\dp0%
\addtolength{\dimen0}{-1\GGlift}%
\raisebox{-\dimen0}{%
\ensuremath{\left[\raisebox{\dimen0}{\box0}\right]}}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGterm}
% Generate a terminal node with fill-line to the left
% \begin{macrocode}
\newcommand{\GGterm}[1]{\unskip%
\setbox0=\hbox{%
\setlength{\GGlinewidth}{0pt}%
\raisebox{\GGlift}{%
\vrule height \GGthickness width \GGafterlen depth 0pt
}%
\ensuremath{\hskip\GGspace #1}%
}%
\raisebox{\GGlift}{%
\vrule height \GGthickness width \GGlinewidth depth 0pt
}%
\box0%
\setlength{\GGlinewidth}{0pt}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGconditional}
% Generate a conditional |\GGconditional{antecedent}{consequent}|
% \begin{macrocode}
\newcommand{\GGconditional}[2]{\unskip%
\addtolength{\GGlinewidth}{-\GGbeforelen}%
\setbox0=\hbox{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\raisebox{\GGlift}{%
\vrule height 0.49\baselineskip depth 0.425\baselineskip width 0pt
\vrule height \GGthickness width \GGafterlen depth 0pt
}%
\ensuremath{\hskip\GGspace #1}%
}%
\setbox1=\hbox{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
% strut -- depth of conditional here!
\raisebox{\GGlift}{%
\vrule height 0pt depth 0.425\baselineskip width 0pt%
\vrule height \GGthickness width \GGafterlen depth 0pt}%
\ensuremath{\hskip\GGspace #2}%
}%
\dimen0=0pt%
\addtolength{\dimen0}{\dp1}%
\addtolength{\dimen0}{\ht0}%
\addtolength{\dimen0}{\lineskip}%
\hbox{%
\raisebox{\GGlift}{%
\vrule width \GGbeforelen height \GGthickness depth 0pt%
\kern-\GGthickness%
\vrule width \GGthickness height \GGthickness depth \dimen0
}%
\vtop{\box1\box0}%
}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGjudge}
% Generate a judgement-stroke
% \begin{macrocode}
\newcommand{\GGjudge}[0]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\addtolength{\GGlinewidth}{-\GGthickness}%
\raisebox{\GGlift}{%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height \GGthickness width \GGafterlen}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGassert}
% Synonym
% \begin{macrocode}
\newcommand{\GGassert}{\GGjudge}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGjudgealone}
% Generate stand-alone judgement-stroke
% \begin{macrocode}
\newcommand{\GGjudgealone}[0]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\addtolength{\GGlinewidth}{-\GGthickness}%
\raisebox{\GGlift}{%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height \GGthickness width 12pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% Synonyms
% \begin{macro}{\GGassertalone}
% \begin{macrocode}
\newcommand{\GGassertalone}{\GGjudgealone}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGjudgelong}
% \begin{macrocode}
\newcommand{\GGjudgelong}{\GGjudgealone}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGassertlong}
% \begin{macrocode}
\newcommand{\GGassertlong}{\GGjudgealone}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGjudgevar}
% Generate a judgement-stroke of variable length
% \begin{macrocode}
\newcommand{\GGjudgevar}[1]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\addtolength{\GGlinewidth}{-\GGthickness}%
\raisebox{\GGlift}{%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height \GGthickness width #1}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGassertvar}
% Synonym
% \begin{macrocode}
\newcommand{\GGassertvar}[1]{\GGjudgevar{#1}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGdef}
% Generate a definition stroke
% \begin{macrocode}
\newcommand{\GGdef}[0]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\addtolength{\GGlinewidth}{-\GGthickness}%
\raisebox{\GGlift}{%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height 0pt width \GGafterlen%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height \GGthickness width \GGafterlen}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGdefalone}
% Generate a stand-alone definition stroke
% \begin{macrocode}
\newcommand{\GGdefalone}[0]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\addtolength{\GGlinewidth}{-\GGthickness}%
\raisebox{\GGlift}{%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height 0pt width \GGafterlen%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height \GGthickness width 12pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGdeflong}
% Synonym
% \begin{macrocode}
\newcommand{\GGdeflong}{\GGdefalone}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGdefvar}
% Generate a definition stroke of variable length
% \begin{macrocode}
\newcommand{\GGdefvar}[1]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\addtolength{\GGlinewidth}{-\GGthickness}%
\raisebox{\GGlift}{%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height 0pt width \GGafterlen%
\vrule width \GGthickness height 5pt depth 5pt%
\vrule depth 0pt height \GGthickness width #1}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGhorizontal}
% Generate a horizontal
% \begin{macrocode}
\newcommand{\GGhorizontal}[0]{%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\raisebox{\GGlift}{%
\vrule depth 0pt height \GGthickness width 12pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGcontent}
% Synonym
% \begin{macrocode}
\newcommand{\GGcontent}{\GGhorizontal}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnot}
% Generate a negation stroke
% \begin{macrocode}
\newcommand{\GGnot}[0]{\unskip%
\addtolength{\GGlinewidth}{-\GGbeforelen}%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\raisebox{\GGlift}{%
\vrule width \GGbeforelen height \GGthickness depth 0pt%
\kern-\GGthickness%
\vrule width \GGthickness height \GGthickness depth 3pt%
\vrule depth 0pt height \GGthickness width \GGafterlen}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnonot}
% Generate a horizontal of negation-stroke length
% to format Frege's negation symbol right-aligned include |\GGnot| in
% the scope of |\GGterm| --- to compensate alignment include |\GGnonot|
% in that place in front of formulae that to not contain a negation
% right before the content-formula
% \begin{macrocode}
\newcommand{\GGnonot}[0]{\unskip%
\addtolength{\GGlinewidth}{-\GGbeforelen}%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\raisebox{\GGlift}{%
\vrule width \GGafterlen height \GGthickness depth 0pt%
\vrule width \GGthickness height \GGthickness depth 0pt%
\vrule width \GGafterlen height \GGthickness depth 0pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnotalone}
% Generate a stand-alone negation stroke
% \begin{macrocode}
\newcommand{\GGnotalone}[0]{\unskip%
\raisebox{\GGlift}{%
\vrule width 4.2pt height \GGthickness depth 0pt%
\kern-\GGthickness%
\vrule width \GGthickness height \GGthickness depth 3pt%
\vrule depth 0pt height \GGthickness width 3.8pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnonotalone}
% Generate a horizontal of |\GGnotalone| length
% \begin{macrocode}
\newcommand{\GGnonotalone}[0]{\unskip%
\raisebox{\GGlift}{%
\vrule width 4.2pt height \GGthickness depth 0pt%
\kern-\GGthickness%
\vrule width \GGthickness height \GGthickness depth 0pt%
\vrule depth 0pt height \GGthickness width 3.8pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGdnot}
% Generate a double-negation for stand-alone use (cmp. Gg I, p. 69a)
% \begin{macrocode}
\newcommand{\GGdnot}[0]{\unskip%
\raisebox{\GGlift}{%
\vrule width 1.5\GGbeforelen height \GGthickness depth 0pt%
\kern-\GGthickness%
\vrule width \GGthickness height \GGthickness depth 3pt%
\vrule depth 0pt height \GGthickness width 1.5\GGafterlen%
\vrule width \GGthickness height \GGthickness depth 3pt%
\vrule depth 0pt height \GGthickness width 1.5\GGafterlen}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnodnot}
% Generate a a horizontal of |\GGdnot| length
% \begin{macrocode}
\newcommand{\GGnodnot}[0]{\unskip%
\raisebox{\GGlift}{%
\vrule width 1.5\GGbeforelen height \GGthickness depth 0pt%
\kern-\GGthickness%
\vrule width \GGthickness height \GGthickness depth 0pt%
\vrule depth 0pt height \GGthickness width 1.5\GGafterlen%
\vrule width \GGthickness height \GGthickness depth 0pt%
\vrule depth 0pt height \GGthickness width 1.5\GGafterlen}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGquant}
% Generate a concavity (universal quantifier). The glyph consists
% of some line strokes and a concavity; if the |bguq| package option
% has been used then this is rendered using the |bguq| font; otherwise
% a Bezier curve is drawn with |\qbezier|.
% \begin{macrocode}
\newcommand{\GGquant}[1]{\unskip%
\addtolength{\GGlinewidth}{-\GGbeforelen}%
\addtolength{\GGlinewidth}{-7.2pt}%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\hbox{%
\raisebox{\GGlift}{%
\vrule width \GGbeforelen height \GGthickness depth 0pt%
\ifx\grundgesetze@bguq\@empty% use qbezier
\setlength{\unitlength}{1pt}%
\kern-\GGthickness%
\begin{picture}(8,0)(0,0)%
\linethickness{\GGquantthickness}%
\qbezier[100](0.3,0.2)(1,-2)(4,-2)%
\qbezier[100](4,-2)(7,-2)(7.7,0.2)%
\end{picture}%
\kern-8pt%
\kern-\GGthickness
\vbox{%
\hbox to 8pt {\hskip1pt\hskip\GGthickness\hss$_{#1}$\hss}\vskip1pt
}%
\else% use the bguq font
\ensuremath\bguq
\kern-\bguqwidth
\vbox{%
\hbox to \bguqwidth%
{\hfill$\scriptstyle{#1}$\hfill}%
\vskip1pt}%
\fi
\vrule width \GGafterlen height \GGthickness depth 0pt}%
}%
\hskip\GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnoquant}
% Generate a horizontal of concavity length
% \begin{macrocode}
\newcommand{\GGnoquant}[0]{\unskip%
\addtolength{\GGlinewidth}{-\GGbeforelen}%
\addtolength{\GGlinewidth}{-7.2pt}%
\addtolength{\GGlinewidth}{-\GGafterlen}%
\raisebox{\GGlift}{%
\vrule width \GGafterlen height \GGthickness depth 0pt%
\vrule depth 0pt height \GGthickness width 7.6pt%
\vrule width \GGafterlen height \GGthickness depth 0pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGoddspace}
% Generate a horizontal line of the length of a concavity minus
% the length of a negation/conditional
% \begin{macrocode}
\newcommand{\GGoddspace}[0]{\unskip%
\addtolength{\GGlinewidth}{-7.2pt}%
\raisebox{\GGlift}{%
\vrule width 7.2pt height \GGthickness depth 0pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGtinyspace}
% Generate a horizontal line of the length of a concavity minus
% twice the length of a negation/conditional
% \begin{macrocode}
\newcommand{\GGtinyspace}[0]{\unskip%
\addtolength{\GGlinewidth}{-2.8pt}%
\raisebox{\GGlift}{%
\vrule width 2.8pt height \GGthickness depth 0pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGtiniestspace}
% Generate a horizontal line three times the length of a
% of a negation or conditional minus a quantifier
% \begin{macrocode}
\newcommand{\GGtiniestspace}[0]{\unskip%
\addtolength{\GGlinewidth}{-1.6pt}%
\raisebox{\GGlift}{%
\vrule width 1.6pt height \GGthickness depth 0pt}%
\hskip \GGspace%
}
% \end{macrocode}
% \end{macro}
%
% \subsection{Convenience functions}
%
% \begin{macro}{\GGif}
% Synonym for |\GGconditional|
% \begin{macrocode}
\newcommand{\GGif}[2]{\GGconditional{#1}{#2}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGifp}
% Treat premise as a terminal node
% \begin{macrocode}
\newcommand{\GGifp}[2]{\GGconditional{\GGterm{#1}}{#2}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGifc}
% Treat conclusion as a terminal node
% \begin{macrocode}
\newcommand{\GGifc}[2]{\GGconditional{#1}{\GGterm{#2}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGifb}
% Treat both as terminal nodes
% \begin{macrocode}
\newcommand{\GGifb}[2]{\GGconditional{\GGterm{#1}}{\GGterm{#2}}}
\newcommand{\GGneg}[0]{\GGnot}
\newcommand{\GGall}[1]{\GGquant{\mathfrak{#1}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GGnoboth}
% Convenience shortcut for ``formatting trick"
% \begin{macrocode}
\newcommand{\GGnoboth}[0]{\GGnonot\GGnoquant}
% \end{macrocode}
% \end{macro}
%
% The next line goes into all files and in addition prevents \dst{}
% from adding any further code from the main source file (such as a
% character table).
% \begin{macrocode}
\endinput
% \end{macrocode}
%
% \DeleteShortVerb{\|}
% \Finale
|