\documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{hyperref} \usepackage[sets,operations,nn,colors]{cora-macs} \title{The \texttt{cora-macs} Package} \author{Tobias Ladner, Lukas Koller\\ TUM - Cyber-Physical Systems Group\\ \texttt{\small tobias.ladner@tum.de, lukas.koller@tum.de}} \date{2024-10-25} \begin{document} \maketitle \begin{abstract} The \texttt{cora-macs} package provides tools for working with continuous sets, operations, neural networks, and color schemes tailored for use in the context of cyber-physical systems. This document serves as the official documentation for the package, detailing the available commands and options. \end{abstract} \tableofcontents \section{Introduction} The \texttt{cora-macs} package is designed to assist in the representation and manipulation of various mathematical objects such as sets, intervals, zonotopes, and operations often encountered in cyber-physical systems analysis. It also includes predefined color schemes based on the TUM corporate design and other custom colors. \section{Installation} To install the \texttt{cora-macs} package, follow these steps: \begin{enumerate} \item Place the \texttt{cora.sty} file in your working directory or in a directory where LaTeX can find it (e.g., in the local \texttt{texmf} tree). \item Include the package in your LaTeX document with the command: \begin{verbatim} \usepackage{cora} \end{verbatim} \end{enumerate} \section{Package Options} The \texttt{cora-macs} package provides several options that can be passed when loading the package. These options control the inclusion of different sets of commands. \begin{itemize} \item \texttt{sets}: Includes commands for continuous set notation and operations. \item \texttt{operations}: Includes commands for various mathematical operations. \item \texttt{nn}: Includes commands for working with neural networks. \item \texttt{colors}: Defines a set of colors specific to the \texttt{cora-macs} package. \item \texttt{tumcolors}: Defines TUM-specific colors. \end{itemize} Example usage: \begin{verbatim} \usepackage[sets, operations]{cora} \end{verbatim} \section{Commands and Environments} \subsection{Sets (\texttt{sets} option)} When the \texttt{sets} option is enabled, the package provides several commands for defining and manipulating continuous sets. \begin{itemize} \item \texttt{\textbackslash contSet\{name\}}: Defines a set in calligraphic font, e.g., $\contSet{A}$. \item \texttt{\textbackslash shortContSet[abbr]\{content\}\{set\}}: Defines a short-hand notation for continuous sets with optional abbreviation. \item \texttt{\textbackslash defContSet\{elements\}\{conditions\}}: Defines a set using the format $\{x \mid \text{conditions}\}$. \item \texttt{\textbackslash defContSetSplit\{elements\}\{conditions\}}: Defines a set with split conditions for better formatting in large equations. \item \texttt{\textbackslash shortI\{a\}\{b\}}: Defines a closed interval $[a, b]$. \item \texttt{\textbackslash defZ}: Defines a zonotope. \item \texttt{\textbackslash defPZ}: Defines a polynomial zonotope. \end{itemize} \subsection{Operations (\texttt{operations} option)} Enabling the \texttt{operations} option introduces a variety of operations that are useful in mathematical and cyber-physical systems contexts. \begin{itemize} \item \texttt{\textbackslash operator\{name\}\{args\}}: Defines a custom operator with the given name and arguments. \item \texttt{\textbackslash opEnclose\{set1\}\{set2\}}: Encapsulates a set within another. \item \texttt{\textbackslash opIntervalEnclosure\{interval\}}: Specifies an interval enclosure. \item \texttt{\textbackslash opProject\{dimension\}}: Projects a set onto a given dimension. \item \texttt{\textbackslash diag\{matrix\}}: Produces the diagonal matrix of the given input. \end{itemize} \subsection{Neural Networks (\texttt{nn} option)} The \texttt{nn} option introduces commands related to neural networks, including notation for layers, inputs, outputs, and propagations. \begin{itemize} \item \texttt{\textbackslash NN}: Represents the symbol for a neural network $\NN$. \item \texttt{\textbackslash nnLayer\{layer\}\{input\}}: Represents a neural network layer with a specified input. \item \texttt{\textbackslash nnInput}, \texttt{\textbackslash nnOutput}: Notation for input and output points in a neural network. \end{itemize} \subsection{Colors (\texttt{colors} and \texttt{tumcolors} options)} The \texttt{colors} and \texttt{tumcolors} options define a variety of colors that can be used in your documents. \begin{itemize} \item \texttt{\textbackslash definecolor\{CORAcolorReachSet\}}: A predefined color for reachability sets (blue). \item \texttt{\textbackslash definecolor\{TUMblue\}}: TUM corporate blue color. \end{itemize} \section{Examples} Here are some examples demonstrating how to use the commands from the \texttt{cora-macs} package. \subsection{Set Notation} \begin{verbatim} \contSet{X} = \shortContSet{a}{b}{X} \end{verbatim} This code will produce $\contSet{X} = \left_X$. \subsection{Operations} \begin{verbatim} \diag{A} = \operator{diag}{A} \end{verbatim} This code will produce $\diag{A} = \text{\normalfont\small diag}(A)$. \subsection{Neural Networks} \begin{verbatim} \NN(\nnInput) = \nnLayer{1}{\nnInput} \end{verbatim} This code will produce $\NN(\nnInput) = L_1(\nnInput)$. \section{Concluding Remarks} The \texttt{cora-macs} package offers a comprehensive set of tools for researchers working in cyber-physical systems. By providing a consistent notation and color scheme, this package simplifies the process of documenting complex mathematical objects and operations. For more information, visit the \href{https://www.ce.cit.tum.de/cps}{TUM CPS Group website}. \end{document}