% The house layer of the engine paper, as in the AHM and GRH papers of the programme, after the GAI-MUA papers % (00 campaign/styles/rs-header.tex): leading, colours, running heads, the title block, headings, the theorem % environments, the Lean anchors, the references list. Article form: sections numbered through the paper, statements % numbered within sections, proofs ending with a square. \linespread{1.06} \setlength{\parskip}{0pt} \setlength{\emergencystretch}{3em} % an overfull line is a gate failure: stretch, never overrun \clubpenalty=10000 \widowpenalty=10000 \displaywidowpenalty=10000 \setcounter{tocdepth}{2} \AtBeginDocument{\urlstyle{same}} \numberwithin{equation}{section} \definecolor{engteal}{HTML}{0B5F63} % the darkest teal of the AURORA scale (7.0 : 1 on white) \definecolor{engrule}{HTML}{A7C2C5} \definecolor{enggrey}{HTML}{4A575B} \hypersetup{colorlinks=true,linkcolor=engteal,citecolor=engteal,urlcolor=engteal,filecolor=engteal, bookmarksdepth=3,pdfstartview=FitH} % Running heads: the author on left-hand pages, the short title on right-hand pages, the folio outside. \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \fancyhead[CE]{\footnotesize\scshape\ENGauthor} \fancyhead[CO]{\footnotesize\itshape\ENGshorttitle} \fancyhead[LE,RO]{\footnotesize\thepage} \fancypagestyle{engfirst}{\fancyhf{}\fancyfoot[C]{\footnotesize\thepage}} \makeatletter % amsart restores \topskip from \normaltopskip when it sets a page style (OpenShurik, 11-19): set both. No stretch: % on a short page of the flush-bottom layout every finite stretch is set by the same ratio, and a stretchable % \topskip then opens a gap above the first line; the stretch belongs between the statements (below). \setlength{\normaltopskip}{10pt}\setlength{\topskip}{\normaltopskip} % ---- the title block --------------------------------------------------------------------------------------------- % Above: version and date on the left, DOI (once assigned) and licence on the right, a hairline beneath. Then title, % subtitle, author, one line with affiliation, e-mail and ORCID iD; then the abstract, MSC and keywords at 85 % of % the measure. \newcommand{\ENGmaketitle}[1]{% \thispagestyle{engfirst}% \begingroup\parindent\z@ \vspace*{-6mm}% {\footnotesize\color{enggrey}\ENGversion\enspace\textperiodcentered\enspace\ENGdate\hfill \ifx\ENGdoi\@empty\else\href{https://doi.org/\ENGdoi}{doi:\ENGdoi}\enspace\textperiodcentered\enspace\fi \href{https://creativecommons.org/licenses/by/4.0/}{\ENGlicence}\par}% \vspace{1.4mm}{\color{engrule}\hrule height .4pt}% \vspace{12mm}% \begin{center} {\fontsize{17.28}{21.5}\selectfont\bfseries\ENGtitle\par}% \vspace{2.8mm}% {\fontsize{12}{15.2}\selectfont\itshape\ENGsubtitle\par}% \vspace{6.5mm}% {\normalsize\scshape\ENGauthor\par}% \vspace{1.4mm}% {\footnotesize\href{\ENGaffiliationurl}{\ENGaffiliation}\enspace\textperiodcentered\enspace \href{mailto:\ENGemail}{\ENGemail}\enspace\textperiodcentered\enspace\url{\ENGorcid}\par}% \end{center} \vspace{5.5mm}% {\leftskip .075\textwidth \rightskip .075\textwidth \fontsize{9.5}{12.4}\selectfont{\scshape Abstract.}\enspace\ignorespaces #1\par \vspace{2.4mm}% \footnotesize\textit{2020 Mathematics Subject Classification.}\enspace\ENGmsc.\par \vspace{.4mm}% \textit{Key words and phrases.}\enspace\ENGkeywords.\par}% \vspace{2mm}% \endgroup} % ---- parts and headings -------------------------------------------------------------------------------------------- % A part has a page of its own (layout gate L1): its number in small capitals, its name and a summary of one sentence, % between two short hairlines. Sections are numbered through the paper. \newcounter{engpart} \renewcommand{\theengpart}{\Roman{engpart}} \fancypagestyle{engpart}{\fancyhf{}} \newcommand{\ENGpart}[3]{% #1 label, #2 the name, #3 the summary \clearpage\thispagestyle{engpart}% \refstepcounter{engpart}\label{#1}% \phantomsection\addcontentsline{toc}{part}{\texorpdfstring{\protect\engtocpart{\theengpart}{#2}}{Part \theengpart. #2}}% \vspace*{.26\textheight}% \begin{center} {\color{engrule}\rule{.28\textwidth}{.4pt}}\par\vspace{3.2mm}% {\small\scshape\color{engteal}Part \theengpart}\par\vspace{1.6mm}% {\fontsize{15}{18.5}\selectfont\bfseries #2\par}\vspace{3.4mm}% {\color{engrule}\rule{.28\textwidth}{.4pt}}\par\vspace{6mm}% \begin{minipage}{.72\textwidth}\centering\small\itshape #3\end{minipage}\par \end{center} \clearpage} % Contents, as in the Annals and in AHM III: parts in small capitals, "Part I." in a box of its own; every number in a % box of fixed width, so that the numbers of one level stand on one vertical, the titles of one level begin on one % vertical and a title that runs over hangs under itself; at least 1.5em between a title and its page number, the % page numbers flush right in a box of their own; "Appendix A." in a wider box; unnumbered entries at the margin. % The section box (2.4em) holds the two-digit numbers of this paper ("18."), as in AHM II. \def\@pnumwidth{1.9em} \newdimen\eng@tocgap \eng@tocgap=1.5em \newcommand{\engtocpart}[2]{\hb@xt@5.5em{Part~#1.\hfil}#2} \def\l@part#1#2{\addpenalty{-\@highpenalty}\addvspace{.9em\@plus.2em}% \begingroup\parindent\z@\leftskip5.5em\rightskip\@pnumwidth\@plus4em\advance\rightskip\eng@tocgap \parfillskip-\rightskip\hyphenpenalty\@M \leavevmode\hskip-5.5em{\scshape #1}\nobreak\hskip\eng@tocgap\@plus1fill\nobreak \hb@xt@\@pnumwidth{\hfil#2}\par\endgroup\nobreak\vskip.15em} % amsart's \@tocline: #1 level, #2 space above, #3 indent, #4 width of the number box, #5 font; the entry, the page. \def\@tocline#1#2#3#4#5#6#7{\ifnum#1>\c@tocdepth\else \par\addpenalty\@secpenalty\addvspace{#2}% \begingroup\hyphenpenalty\@M\@tempdima#4\relax \parindent\z@\leftskip#3\relax\advance\leftskip\@tempdima \rightskip\@pnumwidth\@plus4em\advance\rightskip\eng@tocgap\parfillskip-\rightskip #5\leavevmode#6\nobreak\hskip\eng@tocgap\@plus1fill\nobreak\hb@xt@\@pnumwidth{\hfil\normalfont#7}\par \endgroup\fi} \def\l@section{\@tocline{1}{.3em\@plus.1em}{\z@}{2.4em}{}} \def\l@subsection{\@tocline{2}{\z@}{2.4em}{3.1em}{}} \def\l@subsubsection{\@tocline{3}{\z@}{5.5em}{\z@}{}} % The entry: the number in its box; "Appendix A." in a wider box; an entry without a number at the margin. \def\eng@tocentry#1#2#3{\@ifempty{#2}{\hskip-\leftskip}{\@ifempty{#1}% {\hskip-\@tempdima\hb@xt@\@tempdima{#2.\hfil}}% {\hskip-\@tempdima\hb@xt@6.2em{#1~#2.\hfil}}}#3} \def\tocsection{\eng@tocentry} \def\tocsubsection{\eng@tocentry} \def\tocsubsubsection{\eng@tocentry} \def\tocappendix{\eng@tocentry} \def\@secnumfont{\bfseries} % A heading is never followed by fewer than four lines on its page (layout gate P2). \eng@needspace starts a new page % when less than #1 is left; unlike \needspace it inserts no penalty, so it never invites a short page by itself. A % section heading is usually followed at once by a subsection heading, hence the larger reserve. \def\eng@needspace#1{\par\begingroup\setlength{\dimen@}{#1}\dimen@ii\pagegoal\advance\dimen@ii-\pagetotal \ifdim\dimen@>\dimen@ii\ifdim\dimen@ii>\z@\newpage\fi\fi\endgroup} \def\section{\eng@needspace{9\baselineskip}\@startsection{section}{1}{\z@}{1.75\linespacing\@plus.4\linespacing\@minus.2\linespacing}% {.7\linespacing}{\normalfont\fontsize{12.5}{15}\selectfont\bfseries\boldmath\raggedright}} \def\subsection{\eng@needspace{8\baselineskip}\@startsection{subsection}{2}{\z@}{1.15\linespacing\@plus.3\linespacing\@minus.1\linespacing}% {.4\linespacing}{\normalfont\normalsize\bfseries\boldmath\raggedright}} % \ENGkeep{n} keeps the next n lines together without inviting a short page (a statement that opens with a lead-in). \newcommand{\ENGkeep}[1]{\eng@needspace{#1\baselineskip}} \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{.8\linespacing\@plus.3\linespacing}% {-.6em}{\normalfont\normalsize\itshape}} % ---- statements ---------------------------------------------------------------------------------------------------- % Theorems, propositions, lemmas and corollaries in italics; definitions, remarks, notation and examples upright. % One counter for all, within the section ("Theorem 7.3"). \newtheoremstyle{engplain}{.9\baselineskip plus .25\baselineskip minus .1\baselineskip}% {.9\baselineskip plus .25\baselineskip minus .1\baselineskip}{\itshape}{}{\bfseries}{.}{.5em} {\thmname{#1}\thmnumber{ #2}\thmnote{\ (\mdseries #3)}} \newtheoremstyle{engdefinition}{.9\baselineskip plus .25\baselineskip minus .1\baselineskip}% {.9\baselineskip plus .25\baselineskip minus .1\baselineskip}{\normalfont}{}{\bfseries}{.}{.5em} {\thmname{#1}\thmnumber{ #2}\thmnote{\ (\mdseries #3)}} \newtheoremstyle{engremark}{.6\baselineskip plus .2\baselineskip minus .05\baselineskip}% {.6\baselineskip plus .2\baselineskip minus .05\baselineskip}{\normalfont}{}{\itshape}{.}{.5em} {\thmname{#1}\thmnumber{ #2}\thmnote{\ (#3)}} % Each environment that shares the counter has an alias counter (aliascnt), so that hyperref and % cleveref see its own name ("Lemma 4.5"), not that of the shared counter. \newcommand{\ENGsharedthm}[2]{\newaliascnt{#1}{theorem}\newtheorem{#1}[#1]{#2}\aliascntresetthe{#1}} \theoremstyle{engplain} \newtheorem{theorem}{Theorem}[section] \ENGsharedthm{proposition}{Proposition} \ENGsharedthm{lemma}{Lemma} \ENGsharedthm{corollary}{Corollary} \theoremstyle{engdefinition} \ENGsharedthm{definition}{Definition} \ENGsharedthm{construction}{Construction} \ENGsharedthm{principle}{Principle} \theoremstyle{engremark} \ENGsharedthm{remark}{Remark} \ENGsharedthm{example}{Example} % ---- Lean anchors -------------------------------------------------------------------------------------------------- % \lean{GaiMua.Subtopos.region_sound} (several names separated by commas) ties the statement in which it stands to % the declarations of the engine's Lean library that prove it. Nothing is printed in the text; the anchors are % written, with the number and the page of the statement, to \jobname.lnk, from which Appendix C is set and against % which the anchor gate checks the axiom audit of the library (out/software/axiom-audit.json: trusted theorems only). % The anchor follows the statement, outside its group, so the number of the last statement is kept % globally at the end of each statement environment (an equation inside it has ended by then). \newwrite\eng@lnk \AtBeginDocument{\immediate\openout\eng@lnk=\jobname.lnk\relax} \def\eng@laststmt{}\def\eng@lastkind{} \newcommand{\eng@track}[2]{\AddToHook{env/#1/end}{\xdef\eng@laststmt{\@currentlabel}\gdef\eng@lastkind{#2}}} \eng@track{theorem}{Theorem}\eng@track{proposition}{Proposition}\eng@track{lemma}{Lemma} \eng@track{corollary}{Corollary}\eng@track{definition}{Definition}\eng@track{construction}{Construction} \eng@track{principle}{Principle}\eng@track{remark}{Remark}\eng@track{example}{Example} % \lean[key]{names} anchors the statement or section labelled key instead. % The row is written at once (\immediate): a deferred write would leave a node in the vertical list, which a page % break can carry to the top of the next page, where it keeps the following skip from being discarded. The page is % not known at that moment; tools/build.py reads it from the .aux file, by the hyperref anchor of the statement % ("proposition.2.2") or by the label. \newcommand{\lean}[2][]{\ifx\relax#1\relax \immediate\write\eng@lnk{\string\ENGleanrow{\eng@lastkind}{\eng@laststmt}{}{\detokenize{#2}}}% \else \immediate\write\eng@lnk{\string\ENGleanrowref{#1}{}{\detokenize{#2}}}% \fi\ignorespaces} % Appendix C as printed: one row per anchored statement, read from generated/lean-anchors.tex, which tools/build.py % writes from the anchors until the pages are stable, and keeps in the source, so that the source package compiles to % the same paper without the build. The rows are read into a token list first: \input cannot stand inside an % alignment. \newtoks\eng@rows \newread\eng@in \newcommand{\ENGanchorrow}[4]{#1 & #2 & #3 & {\footnotesize\ttfamily\raggedright #4}\\} \newcommand{\ENGanchortable}{\IfFileExists{generated/lean-anchors.tex}{% \global\eng@rows{}% \openin\eng@in=generated/lean-anchors.tex\relax \begingroup\endlinechar=-1 \loop\unless\ifeof\eng@in \read\eng@in to\eng@line \ifx\eng@line\@empty\else\global\eng@rows\expandafter{\the\expandafter\eng@rows\eng@line}\fi \repeat \endgroup\closein\eng@in \begin{longtable}{@{}l l r >{\raggedright\arraybackslash}p{.62\textwidth}@{}}\toprule Statement & & Page & Lean declarations\\\midrule\endhead \the\eng@rows\bottomrule\end{longtable}}{}} % ---- references ---------------------------------------------------------------------------------------------------- % tools/refs.py writes generated/references.tex from ledger/refs.yaml, one \bibitem per verified entry. \renewcommand{\bibliofont}{\small\raggedright} % ragged, as in the GAI-MUA papers: DOIs and URLs do not stretch lines \makeatother \endinput