% ============================================================================== % preamble/macros.tex % Mathematical Environments, Notations & Canonical Symbols of Cas 6 % ============================================================================== % --- Color Palette for Mathematical Enclosures --- \definecolor{ThmBlue}{RGB}{15, 65, 125} \definecolor{ThmBg}{RGB}{247, 250, 255} \definecolor{LemCyan}{RGB}{18, 105, 125} \definecolor{LemBg}{RGB}{245, 252, 253} \definecolor{PropPurple}{RGB}{90, 35, 110} \definecolor{PropBg}{RGB}{252, 248, 254} \definecolor{DefGreen}{RGB}{25, 100, 55} \definecolor{DefBg}{RGB}{247, 253, 249} \definecolor{ProofBorder}{RGB}{140, 150, 165} \definecolor{ProofBg}{RGB}{254, 254, 255} \definecolor{TodoBorder}{RGB}{200, 50, 25} \definecolor{TodoBg}{RGB}{255, 250, 248} \definecolor{ConormalBorder}{RGB}{20, 50, 100} \definecolor{ConormalBg}{RGB}{248, 250, 254} \definecolor{ConormalHeader}{RGB}{20, 50, 100} % --- Shared Counter for Unified Continuous Math Statements --- \newcounter{mathstatement}[section] \renewcommand{\themathstatement}{\thesection.\arabic{mathstatement}} % --- Hierarchical Equation Numbering (AMS/arXiv Standard: Chapter.Equation) --- \numberwithin{equation}{section} % ============================================================================== % Pure Geometric Monochrome Mathematical Enclosures (Constructivist Semiotics) % ============================================================================== \newcommand{\gutterDist}{10pt} \newcommand{\leadInText}{12pt} \newcommand{\statementLineWidth}{0.6pt} \newlength{\statementTitleWidth} \newcommand{\formatStatementTitle}[2]{% \ifstrempty{#2}{% {\normalfont\bfseries #1 \themathstatement}% }{% \sbox0{{\normalfont\bfseries #1 \themathstatement}\hspace{6pt}\rule[0.55ex]{12pt}{\statementLineWidth}\hspace{6pt}}% \sbox2{\textmd{\itshape #2}}% \ifdim\wd2>\dimexpr\linewidth - \leadInText - 3pt - \wd0\relax \usebox0\begin{varwidth}[t]{\dimexpr\linewidth - \leadInText - 3pt - \wd0\relax}\raggedright\textmd{\itshape #2}\strut\end{varwidth}% \else \usebox0\usebox2% \fi }% } \newcommand{\headerDef}[1]{% \par\noindent% \begin{tikzpicture}[baseline={(0,0)}] \path (0, -0.15) rectangle (\linewidth, 0.35); \draw[overlay, line width=\statementLineWidth, black] (-\gutterDist, 0.08) -- (\leadInText, 0.08); \node[anchor=base west, inner sep=0pt] at (\leadInText + 3pt, 0) {% \formatStatementTitle{Definition}{#1}% }; \end{tikzpicture}\par\vspace{3pt}% } \newcommand{\headerLem}[1]{% \par\noindent% \begin{tikzpicture}[baseline={(0,0)}] \path (0, -0.15) rectangle (\linewidth, 0.35); \draw[overlay, line width=\statementLineWidth, black] (-\gutterDist, -0.35) -- (-\gutterDist, 0.08) -- (\leadInText, 0.08); \node[anchor=base west, inner sep=0pt] at (\leadInText + 3pt, 0) {% \formatStatementTitle{Lemma}{#1}% }; \end{tikzpicture}\par\vspace{3pt}% } \newcommand{\headerProp}[1]{% \par\noindent% \begin{tikzpicture}[baseline={(0,0)}] \path (0, -0.15) rectangle (\linewidth, 0.35); \draw[overlay, line width=\statementLineWidth, black] (-\gutterDist, -0.9) -- (-\gutterDist, 0.08) -- (\leadInText, 0.08); \node[anchor=base west, inner sep=0pt] at (\leadInText + 3pt, 0) {% \formatStatementTitle{Proposition}{#1}% }; \end{tikzpicture}\par\vspace{3pt}% } \newcommand{\headerCor}[1]{% \par\noindent% \begin{tikzpicture}[baseline={(0,0)}] \path (0, -0.15) rectangle (\linewidth, 0.35); \draw[overlay, line width=\statementLineWidth, black] (-\gutterDist, -0.6) -- (-\gutterDist, 0.08) -- (\leadInText, 0.08); \node[anchor=base west, inner sep=0pt] at (\leadInText + 3pt, 0) {% \formatStatementTitle{Corollary}{#1}% }; \end{tikzpicture}\par\vspace{3pt}% } \newcommand{\headerThm}[1]{% \par\noindent% \begin{tikzpicture}[baseline={(0,0)}] \path (0, -0.15) rectangle (\linewidth, 0.35); \draw[overlay, line width=\statementLineWidth, black] (-\gutterDist, -1.4) -- (-\gutterDist, 0.08) -- (\leadInText, 0.08); \node[anchor=base west, inner sep=0pt] at (\leadInText + 3pt, 0) {% \formatStatementTitle{Theorem}{#1}% }; \end{tikzpicture}\par\vspace{3pt}% } \tcbset{ closeSegment/.style={ bottom=2pt, overlay unbroken and last={ \draw[line width=\statementLineWidth, black] ([xshift=-\leadInText]frame.south east) -- ([xshift=\gutterDist]frame.south east); } }, noCloseSegment/.style={ bottom=1pt, overlay unbroken and last={} } } % --- Stylized Theorem Environment (thmbox) --- % Usage: \begin{thmbox}[Optional Title]{label_key} ... \end{thmbox} (starred version * suppresses closing bracket) \NewDocumentEnvironment{thmbox}{ s O{} m O{} }{% \refstepcounter{mathstatement}% \tcbset{thmboxstyle/.style={ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{4pt}, after=\par\vspace{4pt}, top=0pt, bottom=2pt, left=0pt, right=0pt, fontupper=\rmfamily, overlay unbroken and last={ \draw[line width=\statementLineWidth, black] ([xshift=-\leadInText]frame.south east) -- ([xshift=\gutterDist]frame.south east) -- ([xshift=\gutterDist, yshift=1.4cm]frame.south east); } }}% \IfBooleanTF{#1}{\tcbset{thmboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{noclose}{\tcbset{thmboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{open}{\tcbset{thmboxstyle/.append style={noCloseSegment}}}{}% }% }% \begin{tcolorbox}[thmboxstyle]% \headerThm{#2}% \ifstrempty{#3}{}{\label{#3}}% }{% \end{tcolorbox}% } % --- Stylized Lemma Environment (lemmabox) --- % Usage: \begin{lemmabox}[Optional Title]{label_key} ... \end{lemmabox} (starred version * suppresses closing segment) \NewDocumentEnvironment{lemmabox}{ s O{} m O{} }{% \refstepcounter{mathstatement}% \tcbset{lemboxstyle/.style={ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{4pt}, after=\par\vspace{4pt}, top=0pt, bottom=2pt, left=0pt, right=0pt, fontupper=\rmfamily, closeSegment }}% \IfBooleanTF{#1}{\tcbset{lemboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{noclose}{\tcbset{lemboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{open}{\tcbset{lemboxstyle/.append style={noCloseSegment}}}{}% }% }% \begin{tcolorbox}[lemboxstyle]% \headerLem{#2}% \ifstrempty{#3}{}{\label{#3}}% }{% \end{tcolorbox}% } % --- Stylized Proposition Environment (propbox) --- % Usage: \begin{propbox}[Optional Title]{label_key} ... \end{propbox} (starred version * suppresses closing segment) \NewDocumentEnvironment{propbox}{ s O{} m O{} }{% \refstepcounter{mathstatement}% \tcbset{propboxstyle/.style={ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{4pt}, after=\par\vspace{4pt}, top=0pt, bottom=2pt, left=0pt, right=0pt, fontupper=\rmfamily, closeSegment }}% \IfBooleanTF{#1}{\tcbset{propboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{noclose}{\tcbset{propboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{open}{\tcbset{propboxstyle/.append style={noCloseSegment}}}{}% }% }% \begin{tcolorbox}[propboxstyle]% \headerProp{#2}% \ifstrempty{#3}{}{\label{#3}}% }{% \end{tcolorbox}% } % --- Stylized Corollary Environment (corbox) --- % Usage: \begin{corbox}[Optional Title]{label_key} ... \end{corbox} (starred version * suppresses closing segment) \NewDocumentEnvironment{corbox}{ s O{} m O{} }{% \refstepcounter{mathstatement}% \tcbset{corboxstyle/.style={ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{4pt}, after=\par\vspace{4pt}, top=0pt, bottom=2pt, left=0pt, right=0pt, fontupper=\rmfamily, closeSegment }}% \IfBooleanTF{#1}{\tcbset{corboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{noclose}{\tcbset{corboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{open}{\tcbset{corboxstyle/.append style={noCloseSegment}}}{}% }% }% \begin{tcolorbox}[corboxstyle]% \headerCor{#2}% \ifstrempty{#3}{}{\label{#3}}% }{% \end{tcolorbox}% } % --- Stylized Definition Environment (defbox) --- % Usage: \begin{defbox}[Optional Title]{label_key} ... \end{defbox} (starred version * suppresses closing segment) \NewDocumentEnvironment{defbox}{ s O{} m O{} }{% \refstepcounter{mathstatement}% \tcbset{defboxstyle/.style={ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{4pt}, after=\par\vspace{4pt}, top=0pt, bottom=2pt, left=0pt, right=0pt, fontupper=\rmfamily, closeSegment }}% \IfBooleanTF{#1}{\tcbset{defboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{noclose}{\tcbset{defboxstyle/.append style={noCloseSegment}}}{% \ifstrequal{#4}{open}{\tcbset{defboxstyle/.append style={noCloseSegment}}}{}% }% }% \begin{tcolorbox}[defboxstyle]% \headerDef{#2}% \ifstrempty{#3}{}{\label{#3}}% }{% \end{tcolorbox}% } % --- Stylized QED Symbol Aligned with Theorem Margins --- \newlength{\qedSquareSize} \setlength{\qedSquareSize}{6.5pt} \renewcommand{\qedsymbol}{% \begin{tikzpicture}[baseline={(0,0)}] \useasboundingbox (0, 0pt) rectangle (\qedSquareSize, \qedSquareSize); \draw[line width=\statementLineWidth, black] (\gutterDist, 0pt) rectangle (\gutterDist + \qedSquareSize, \qedSquareSize); \end{tikzpicture}% } % --- Stylized Proof Environment (proofbox) --- % Usage: \begin{proofbox}[Optional Reference Heading] ... \end{proofbox} \newenvironment{proofbox}[1][Proof]{% \begin{tcolorbox}[ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{3pt}, after=\par\vspace{4pt}, top=0pt, bottom=2pt, left=0pt, right=0pt, fontupper=\small\rmfamily ]% \noindent{\itshape\color{black}Proof.\ }\ignorespaces% }{% \par\hfill\qedsymbol% \end{tcolorbox}% } % --- Stylized Remark Environment (rembox) --- % Usage: \begin{rembox}[Optional Title] ... \end{rembox} \newenvironment{rembox}[1][]{% \begin{tcolorbox}[ enhanced, breakable, frame hidden, interior hidden, before=\par\vspace{6pt}, after=\par\vspace{6pt}, top=2pt, bottom=2pt, left=0pt, right=0pt, overlay={ \draw[line width=1.0pt, black] ([xshift=-\gutterDist]frame.north west) -- ([xshift=-\gutterDist]frame.south west); }, fontupper=\small\rmfamily ]% \noindent\textbf{\itshape Remark\ifstrempty{#1}{}{~---~\textmd{\itshape #1}}.\,}\ignorespaces% }{% \end{tcolorbox}% } % --- Dedicated Cartouche: Conormal Decomposition Signature (conormalbox) --- % Usage: \begin{conormalbox}{System Name} ... \end{conormalbox} \newenvironment{conormalbox}[1]{% \begin{tcolorbox}[ enhanced, breakable, frame hidden, interior hidden, boxrule=0pt, top=4pt, bottom=4pt, left=0pt, right=0pt, before=\par\vspace{8pt}, after=\par\vspace{8pt}, overlay={ \draw[line width=1.2pt, black] ([xshift=-\gutterDist]frame.north west) -- ([xshift=-\gutterDist]frame.south west); }, fontupper=\small\rmfamily ]% \noindent{\bfseries $\blacktriangleright$~Normal Cone Decomposition: #1}\par\vspace{3pt}% \hrule height 0.6pt\vspace{6pt}% }{% \end{tcolorbox}% } % --- Dedicated Cartouche: Algorithmic Specification (algobox) --- % Usage: \begin{algobox}{Algorithm Title} ... \end{algobox} \newcounter{algorithm} \newenvironment{algobox}[1]{% \refstepcounter{algorithm}% \begin{tcolorbox}[ enhanced, breakable, frame hidden, interior hidden, boxrule=0pt, top=4pt, bottom=4pt, left=0pt, right=0pt, before=\par\vspace{8pt}, after=\par\vspace{8pt}, overlay={ \draw[line width=1.2pt, black] ([xshift=-\gutterDist]frame.north west) -- ([xshift=-\gutterDist]frame.south west); }, fontupper=\small\rmfamily ]% \noindent{\bfseries $\blacktriangleright$~Algorithm~\thealgorithm: #1}\par\vspace{3pt}% \hrule height 0.6pt\vspace{6pt}% }{% \end{tcolorbox}% } % --- Code-Quote Styled TODO Block for Drafting (todoblock) --- % Usage: \begin{todoblock}{Descriptive Title of the Work to be Done} ... \end{todoblock} \newenvironment{todoblock}[1]{% \begin{tcolorbox}[ enhanced, breakable, colback=TodoBg, colframe=TodoBorder, arc=2pt, boxrule=0.5pt, leftrule=3.5pt, top=3pt, bottom=3pt, left=8pt, right=8pt, fonttitle=\small\ttfamily\bfseries\color{TodoBorder}, title={>>> [TODO / DRAFTING DIRECTIVE: #1]}, colbacktitle=TodoBg, attach title to upper={\par\vspace{2.5pt}\hrule height 0.4pt\vspace{2.5pt}}, fontupper=\small\sffamily ]% }{% \par\vspace{2pt}\hfill\textit{\tiny\color{TodoBorder}[Must be eliminated before final submission]}% \end{tcolorbox}% } % --- Standard Mathematical Fields --- \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\C}{\mathbb{C}} % --- Phase Spaces & Symplectic Geometry --- \newcommand{\Pext}{\mathcal{P}_{\mathrm{ext}}} \newcommand{\omegaext}{\omega_{\mathrm{ext}}} \newcommand{\Hext}{\mathcal{H}_{\mathrm{ext}}} \newcommand{\omegaD}{\omega_0} \newcommand{\SigmaNull}{\Sigma_0} % --- Fulton-MacPherson & Stratified Geometry --- \newcommand{\QFM}{\mathbf{Q}[N]} \newcommand{\XFM}{X[N]} \newcommand{\PiN}{\Pi(N)} \newcommand{\LeafPairs}{\operatorname{LeafPairs}} \newcommand{\Trees}{\operatorname{Trees}(N)} \newcommand{\Mcoll}{\mathbf{M}_C} % --- Invariants of the Lie-Bargmann Algebra --- \newcommand{\Ptot}{\mathbf{P}_{\mathrm{tot}}} \newcommand{\Ltot}{\mathbf{L}_{\mathrm{tot}}} \newcommand{\Gboost}{\mathbf{G}} \newcommand{\Mtot}{M_{\mathrm{tot}}} \newcommand{\Rcdm}{\mathbf{R}_{\mathrm{cdm}}} % --- Conormal Operators & Sundman Transformations --- \newcommand{\Vapex}{V_{\mathrm{apex}}} \newcommand{\VapexHier}{V_{\mathrm{apex}}^{\mathrm{hier}}} \newcommand{\VapexScreened}{V_{\mathrm{apex}}^{\mathrm{screened}}} \newcommand{\Bounce}{\mathcal{B}_C} \newcommand{\Rext}{\mathcal{R}_{\mathrm{ext}}} \newcommand{\CutoffTheta}{\Theta} % --- Lie-Poisson & Differential Brackets --- \newcommand{\poisson}[2]{\left\{ #1, #2 \right\}} \newcommand{\extpoisson}[2]{\left\{ #1, #2 \right\}_{\mathrm{ext}}} \newcommand{\hamvf}[1]{X_{#1}} \newcommand{\inner}[2]{\left\langle #1, #2 \right\rangle} \newcommand{\norm}[1]{\left\| #1 \right\|} \newcommand{\abs}[1]{\left| #1 \right|} % ============================================================================== % Constructivist Monochrome Table of Contents Architecture (Single-Page Layout) % ============================================================================== \makeatletter \renewcommand{\contentsname}{Table of Contents} %Format section and subsection numbers in fixed-width boxes for hanging alignment \def\tocsection#1#2#3{% \ifx\\#2\\% #3% \else \ifx\\#1\\% \hangindent 1.3em\hangafter=1\relax \hb@xt@ 1.3em{#2.\hfil}#3% \else \ignorespaces#1 #2.\hspace{0.45em}#3% \fi \fi } \def\tocsubsection#1#2#3{% \ifx\\#2\\% #3% \else \hb@xt@ 1.75em{#2.\hfil}#3% \fi } % Redefine \@starttoc: Constructivist monochrome header + pure black clickable links \def\@starttoc#1#2{% \begingroup \hypersetup{linkcolor=black}% \setTrue{#1}% \par\removelastskip\vskip\z@skip \@nobreakfalse \leftskip\z@\rightskip\z@ \parindent\z@\relax \begin{center}% \vspace*{-4pt}% {\large\bfseries\color{black} #2}% \par\vspace{3pt}% {\color{black}\rule{0.16\linewidth}{0.5pt}}% \par\vspace{6pt}% \end{center}% \makeatletter \@input{\jobname.#1}% \if@filesw \expandafter\newwrite\csname tf@#1\endcsname \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax \fi \global\@nobreakfalse \endgroup } % Override amsart's \@tocline: 9.0pt/8.0pt monochrome typography with hanging indent \def\@tocline#1#2#3#4#5#6#7{\relax \ifnum #1>\c@tocdepth % drop \else \ifnum #1=1 % Section (Chapter level) \par\addvspace{3.2pt plus 0.4pt minus 0.4pt}% \begingroup \parindent\z@ \leftskip\z@ \rightskip 1.8em plus 1fil\relax \parfillskip -1.8em\relax \noindent {\bfseries\color{black}\fontsize{9.0}{10.5}\selectfont #6}% \nobreak\leaders\hbox to 0.48em{\hss\raisebox{0.12ex}{\tiny\color{BorderGray}.}\hss}\hfill\nobreak \hb@xt@ 1.8em{\hss{\bfseries\color{black}\fontsize{9.0}{10.5}\selectfont #7}}% \par\nobreak \endgroup \addvspace{0.5pt}% \else % Subsection level \par\addvspace{0.2pt}% \begingroup \parindent -1.75em\relax \leftskip 3.05em\relax \rightskip 1.8em plus 1fil\relax \parfillskip -1.8em\relax \noindent {\normalfont\color{black}\fontsize{8.0}{9.3}\selectfont #6}% \nobreak\leaders\hbox to 0.42em{\hss\raisebox{0.1ex}{\tiny\color{BorderGray}.}\hss}\hfill\nobreak \hb@xt@ 1.8em{\hss{\normalfont\color{black}\fontsize{8.0}{9.3}\selectfont #7}}% \par \endgroup \fi \fi } \makeatother