Debian Codegraph @

texmf-dist/source/latex/temporal-logic/temporal-logic.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: temporal-logic.dtx
4 %
5 % Copyright (C) 2026 Dominik Schmid
6 %
7 % This work may be distributed and/or modified under the
8 % conditions of the LaTeX Project Public License, either version 1.3c
9 % of this license or (at your option) any later version.
10 % The latest version of this license is in
11 % http://www.latex-project.org/lppl.txt
12 % and version 1.3c or later is part of all distributions of LaTeX
13 % version 2005/12/01 or later.
14 %
15 % This work has the LPPL maintenance status "maintained".
16 %
17 % The current maintainer of this work is Dominik Schmid
18 % <[email protected]>.
19 %
20 % This work consists of the files temporal-logic.dtx and temporal-logic.ins
21 % and the derived file temporal-logic.sty.
22 %
23 % \fi
24 %
25 % \iffalse
26 %<*driver>
27 \documentclass{l3doc}
28 \usepackage{temporal-logic}
29 \usepackage{tabularray}
30 \begin{document}
31 \DocInput{\jobname.dtx}
32 \end{document}
33 %</driver>
34 % \fi
35 %
36 % \title{temporal-logic}
37 % \author{Dominik Schmid}
38 % \date{Version 1.0}
39 %
40 % \maketitle
41 % \setlength{\parindent}{0ex}
42 % \tolerance=1
43 % \emergencystretch=\maxdimen
44 % \hyphenpenalty=10000
45 % \hbadness=10000
46 %
47 % \begin{documentation}
48 %
49 % \begin{abstract}
50 % The \emph{temporal-logic} package defines functions for rendering temporal
51 % operators defined in \emph{Linear Temporal Logic} (LTL)\footnote{Pnueli, A.
52 % (1977). The temporal logic of programs. In: 18th Annual Symposium on
53 % Foundations of Computer Science (SFCS 1977). IEEE.
54 % \url{https://doi.org/10.1109/SFCS.1977.32}.}, \emph{Metric
55 % Temporal Logic} (MTL)\footnote{Alur, R., Henzinger, T. A. (1993). Real-time
56 % logics: Complexity and expressiveness. In: Proceedings of the Fifth Annual
57 % Symposium on Logic in Computer Science (LICS 1990). Elsevier.
58 % \url{https://doi.org/10.1006/inco.1993.1025}.}, \emph{Metric
59 % First-order Temporal Logic} (MFOTL)\footnote{Basin, David, Klaedtke, Felix,
60 % Müller, Samuel, and Zălinescu, Eugen. (2015). Monitoring Metric First-order
61 % Temporal Properties. In: Journal of the ACM (J. ACM). Association for
62 % Computing Machinery. \url{https://doi.org/10.1145/2699444}.}, and the
63 % \emph{Counting Metric First-order Temporal Binding Logic}
64 % (CMFTBL)\footnote{Schallau, T., Naujokat, S., Kullmann, F., Howar, F.
65 % (2024). Tree-Based Scenario Classification. In: NASA Formal Methods (NFM
66 % 2024). Lecture Notes in Computer Science, vol 14627. Springer, Cham.
67 % \url{https://doi.org/10.1007/978-3-031-60698-4\_15}.}. The package defines
68 % various functions with variants in order to include or omit optional
69 % parameters of the operators like the optional interval.
70 % \end{abstract}
71 %
72 % \clearpage
73 % \tableofcontents
74 % \clearpage
75 %
76 % \section{Introduction}
77 % \subsection{Basic usage}
78 % This package defines the symbols used in Temporal logics as
79 % \emph{MathOperators}. Therefore, the symbols, as well as the commands, have
80 % to be used in math mode. To use normal text in the parameters \cs{mathrm}
81 % or \cs{text} may be used.
82 %
83 % The symbols come in two variants: A standalone version for mentioning logic
84 % symbols in text without additional formula spacing and a formula version,
85 % also providing additional parameters. The formula version should always be
86 % preferred over the standalone symbols in formulas as they provide
87 % additional spaces and explicitly enforce the correct usage of superscript
88 % and subscript via mandatory parameters. The naming scheme of the operators
89 % is chosen such that each command reflects the name of the temporal operator
90 % prefixed with a ``tl'' for \textit{temporal logic}. Standalone symbols, as
91 % described in Sect.~\ref{sec:standalone_symbols}, are prefixed with
92 % ``tlop''. Those prefixes are necessary to prevent name clashes with
93 % built-in \LaTeX{} commands.
94 %
95 % \subsection{Package options}
96 % \label{sec:options}
97 % Each operator is available as a \emph{bold}, \emph{calligraphic}, and
98 % \emph{symbolic} version (if available). Details are described in
99 % sections~\ref{sec:future_ltl}--\ref{sec:additional_operators} The displayed
100 % version can be switched by passing an optional package option:
101 %
102 % \begin{function}{
103 % displaymode=bold,
104 % displaymode=caligraphic,
105 % displaymode=symbol}
106 % \begin{syntax}
107 % Bold display mode
108 % Caligraphic display mode
109 % Symbol display mode (default)
110 % \end{syntax}
111 % \end{function}
112 %
113 % For brevity, \texttt{displaymode=} can be omitted.
114 %
115 % The superscripts and subscripts are automatically captured by
116 % \texttt{mathrm} / \texttt{mathit}. To switch bewteen roman and italic
117 % display, the \texttt{scriptmode} can be passed:
118 %
119 % \begin{function}{
120 % scriptmode=roman,
121 % scriptmode=italic}
122 % \begin{syntax}
123 % Roman script mode (default)
124 % Italic script mode
125 % \end{syntax}
126 % \end{function}
127 %
128 % For brevity, \texttt{scriptmode=} can be omitted. This setting can be
129 % locally overridden by capturing the individual parameters into another
130 % \texttt{mathrm} / \texttt{mathit}.
131 %
132 % \subsection{Manual structure}
133 % This manual is structured as follows. First, the symbols for \emph{Future
134 % LTL} and \emph{Past LTL} are introduced in Sect.~\ref{sec:future_ltl} and
135 % Sect.~\ref{sec:past_ltl}. The additional intervals from \emph{MTL} are
136 % described in Sect.~\ref{sec:mtl_extension}. The operators introduced
137 % in \emph{MFOTL} and \emph{CMFTBL} are described in
138 % Sect.~\ref{sec:mfotl_extension} and Sect.~\ref{sec:cmftbl_extension}.
139 % Additional operators are defined in Sect.~\ref{sec:additional_operators}.
140 % Section~\ref{sec:usage} shows the usage of the symbols in formulas.
141 % Section~\ref{sec:standalone_symbols} closes the
142 % command definitions with the standalone symbols for usage in text.
143 %
144 % \clearpage
145 % \section{Symbol definitions}
146 % \subsection{Future LTL symbols}
147 % \label{sec:future_ltl}
148 % \emph{Future LTL}, or simply \emph{LTL}, defines operators to argue about
149 % the future. This includes the following operators.
150 % \begin{function}{
151 % \tlnext,
152 % \tlfinally,
153 % \tleventually,
154 % \tlglobally,
155 % \tluntil,
156 % \tlrelease,
157 % \tlweakuntil,
158 % \tlstrongrelease,
159 % \tlmightyrelease}
160 % \begin{syntax}
161 % \cs{tlnext} \cs{varphi}
162 % \cs{tlfinally} \cs{varphi}
163 % \cs{tleventually} \cs{varphi}
164 % \cs{tlglobally} \cs{varphi}
165 % \cs{varphi} \cs{tluntil} \cs{psi}
166 % \cs{psi} \cs{tlrelease} \cs{varphi}
167 % \cs{varphi} \cs{tlweakuntil} \cs{psi}
168 % \cs{psi} \cs{tlstrongrelease} \cs{varphi}
169 % \cs{psi} \cs{tlmightyrelease} \cs{varphi}
170 % \end{syntax}
171 % \end{function}
172 %
173 % \noindent
174 % The symbols get rendered according to the selected display mode
175 % (cf.~Sect.~\ref{sec:options}). The symbols and the common semantics of the
176 % operators are listed below:
177 %
178 % \vspace{\baselineskip}
179 % \noindent
180 % \begin{tblr}{
181 % colspec={lcccX},
182 % width=\textwidth,
183 % rowsep={3pt}
184 % }
185 % \textbf{Command} &
186 % \textbf{Bold} &
187 % \textbf{Textual} &
188 % \textbf{Symbolic} &
189 % \textbf{Semantics}\\
190 %
191 % \cs{tlnext} &
192 % $\tlboldnext \varphi$ &
193 % $\tlletternext \varphi$ &
194 % $\tlsymbnext \varphi$ &
195 % $\varphi$ must hold at the next state.\\
196 %
197 % {\cs{tlfinally} \\ \cs{tleventually}} &
198 % {$\tlboldfinally \varphi$} &
199 % {$\tlletterfinally \varphi$} &
200 % {$\tlsymbfinally \varphi$} &
201 % $\varphi$ must hold at least once in the future.\\
202 %
203 % \cs{tlglobally} &
204 % $\tlboldglobally \varphi$ &
205 % $\tlletterglobally \varphi$ &
206 % $\tlsymbglobally \varphi$ &
207 % $\varphi$ must hold from now for the entire trace.\\
208 %
209 % \cs{tluntil} &
210 % $\varphi \tlbolduntil \psi$ &
211 % $\varphi \tlletteruntil \psi$ &
212 % $\varphi \tlsymbuntil \psi$ &
213 % $\varphi$ must hold at least until $\psi$ holds, which must hold at the
214 % current or a future position.\\
215 %
216 % \cs{tlrelease} &
217 % $\psi \tlboldrelease \varphi$ &
218 % $\psi \tlletterrelease \varphi$ & $\psi \tlsymbrelease \varphi$ &
219 % $\varphi$ must hold until and including the point where $\psi$ first
220 % becomes true. If $\psi$ never becomes true, $\varphi$ must remain true
221 % for the entire trace.\\
222 %
223 % \cs{tlweakuntil} &
224 % $\varphi \tlboldweakuntil \psi$ &
225 % $\varphi \tlletterweakuntil \psi$ & $\varphi \tlsymbweakuntil \psi$ &
226 % $\varphi$ must hold at least until $\psi$ holds. If $\psi$ never
227 % becomes true, $\phi$ must remain true for the entire trace.\\
228 %
229 % {\cs{tlstrongrelease} \\ \cs{tlmightyrelease}} &
230 % $\psi \tlboldstrongrelease \varphi$ &
231 % $\psi \tlletterstrongrelease \varphi$ &
232 % $\psi \tlsymbstrongrelease \varphi$ &
233 % $\varphi$ must hold until and including the point where $\psi$ first
234 % becomes true, which must hold at the current or a future position.\\
235 % \end{tblr}
236 %
237 % \clearpage
238 % \subsection{Past LTL symbols}
239 % \label{sec:past_ltl}
240 % \emph{Past LTL} defines operators analogous to \emph{Future LTL} to argue
241 % about the past. The symbols are identical but are filled solid black.
242 % \begin{function}{
243 % \tlyesterday,
244 % \tlprevious,
245 % \tlonce,
246 % \tlhistorically,
247 % \tlsince,
248 % \tlbackto,
249 % \tlweaksince,
250 % \tltrigger}
251 % \begin{syntax}
252 % \cs{tlyesterday} \cs{varphi}
253 % \cs{tlprevious} \cs{varphi}
254 % \cs{tlonce} \cs{varphi}
255 % \cs{tlhistorically} \cs{varphi}
256 % \cs{varphi} \cs{tlsince} \cs{psi}
257 % \cs{psi} \cs{backto} \cs{varphi}
258 % \cs{varphi} \cs{tlweaksince} \cs{psi}
259 % \cs{psi} \cs{tltrigger} \cs{varphi}
260 % \end{syntax}
261 % \end{function}
262 %
263 % \vspace{\baselineskip}
264 % \noindent
265 % \begin{tblr}{
266 % colspec={lcccX},
267 % width=\textwidth,
268 % rowsep={3pt}
269 % }
270 % \textbf{Command} &
271 % \textbf{Bold} &
272 % \textbf{Textual} &
273 % \textbf{Symbolic} &
274 % \textbf{Semantics}\\
275 %
276 % {\cs{tlyesterday} \\ \cs{tlprevious}} &
277 % $\tlboldyesterday \varphi$ &
278 % $\tlletteryesterday \varphi$ &
279 % $\tlsymbyesterday \varphi$ &
280 % $\varphi$ must have held at the previous state.\\
281 %
282 % \cs{tlonce} &
283 % $\tlboldonce \varphi$ &
284 % $\tlletteronce \varphi$ &
285 % $\tlsymbonce \varphi$ &
286 % $\varphi$ must have held at least once in the past.\\
287 %
288 % \cs{tlhistorically} &
289 % $\tlboldhistorically \varphi$ &
290 % $\tlletterhistorically \varphi$ &
291 % $\tlsymbhistorically \varphi$ &
292 % $\varphi$ must have held until now for the entire past trace.\\
293 %
294 % \cs{tlsince} &
295 % $\varphi \tlboldsince \psi$ &
296 % $\tllettersince \varphi$ &
297 % $\tllettersince \varphi$ &
298 % $\varphi$ must have held since $\psi$ has held, which must have held at
299 % the current or a past state.\\
300 %
301 % \cs{tlbackto} &
302 % $\psi \tlboldbackto \varphi$ &
303 % $\tlletterbackto \varphi$ &
304 % $\tlsymbbackto \varphi$ &
305 % $\varphi$ must have held since and including the point where $\psi$ was
306 % true the last time. If $\psi$ never was true, $\varphi$ must have been
307 % true for the entire past trace.\\
308 %
309 % \cs{tlweaksince} &
310 % $\varphi \tlboldweaksince \psi$ &
311 % $\tlletterweaksince \varphi$ &
312 % $\tlsymbweaksince \varphi$ &
313 % $\varphi$ must have held since $\psi$ has held. If $\psi$ never was true,
314 % $\varphi$ must have been true for the entire past trace.\\
315 %
316 % \cs{tltrigger} &
317 % $\psi \tlboldtrigger \varphi$ &
318 % $\tllettertrigger \varphi$ & $\tlsymbtrigger \varphi$ &
319 % $\varphi$ must have held since and including the point where $\psi$ was
320 % true the last time, which must have held at the current or a past state.\\
321 % \end{tblr}
322 %
323 % \clearpage
324 % \subsection{MTL extension}
325 % \label{sec:mtl_extension}
326 % The \emph{Future LTL} and \emph{Past LTL} operators may be extended with an
327 % optional interval to form \emph{full MTL}, or simply \emph{MTL}.
328 % \begin{function}{
329 % \tlnext,
330 % \tlfinally,
331 % \tleventually,
332 % \tlglobally,
333 % \tluntil,
334 % \tlrelease,
335 % \tlweakuntil,
336 % \tlstrongrelease,
337 % \tlmightyrelease,
338 % \tlyesterday,
339 % \tlprevious,
340 % \tlonce,
341 % \tlhistorically,
342 % \tlsince,
343 % \tlbackto,
344 % \tlweaksince,
345 % \tltrigger}
346 % \begin{syntax}
347 % \begin{tabular}{lc}
348 % \cs{tlnext}\oarg{Interval} & $\tlnext[[0,1]]$\\
349 % \cs{tlfinally}\oarg{Interval} & $\tlfinally[[0,1]]$\\
350 % \cs{tleventually}\oarg{Interval} & $\tleventually[[0,1]]$\\
351 % \cs{tlglobally}\oarg{Interval} & $\tlglobally[[0,1]]$\\
352 % \cs{tluntil}\oarg{Interval} & $\tluntil[[0,1]]$\\
353 % \cs{tlrelease}\oarg{Interval} & $\tlrelease[[0,1]]$\\
354 % \cs{tlweakuntil}\oarg{Interval} & $\tlweakuntil[[0,1]]$\\
355 % \cs{tlstrongrelease}\oarg{Interval} & $\tlstrongrelease[[0,1]]$\\
356 % \cs{tlmightyrelease}\oarg{Interval} & $\tlmightyrelease[[0,1]]$\\
357 % \cs{tlyesterday}\oarg{Interval} & $\tlyesterday[[0,1]]$\\
358 % \cs{tlprevious}\oarg{Interval} & $\tlprevious[[0,1]]$\\
359 % \cs{tlonce}\oarg{Interval} & $\tlonce[[0,1]]$\\
360 % \cs{tlhistorically}\oarg{Interval} & $\tlhistorically[[0,1]]$\\
361 % \cs{tlsince}\oarg{Interval} & $\tlsince[[0,1]]$\\
362 % \cs{tlbackto}\oarg{Interval} & $\tlbackto[[0,1]]$\\
363 % \cs{tlweaksince}\oarg{Interval} & $\tlweaksince[[0,1]]$\\
364 % \cs{tltrigger}\oarg{Interval} & $\tltrigger[[0,1]]$\\
365 % \end{tabular}
366 % \end{syntax}
367 % \end{function}
368 %
369 % \noindent The semantics of the intervals are commonly defined as follows:
370 % The trace is only evaluated in the given interval. An empty interval is
371 % considered to be $[0, \infty)$ for future and $(\infty, 0]$ for past
372 % operators. The first component of the interval always indicates the earlier
373 % state for both future and past operators. Unmatched brackets can be
374 % generated using an extra group: \cs{tlnext[\{[0,$\infty$)\}]} $\implies
375 % \tlnext[{[0,\infty)}]$.
376 %
377 % \subsection{MFOTL extension}
378 % \label{sec:mfotl_extension}
379 % \emph{MFOTL} introduces the first-order quantifiers $\exists$ and
380 % $\forall$.
381 % This package does not provide additional symbols, as the built-in ones
382 % already contained in \LaTeX{} may be used.
383 %
384 % \begin{function}{
385 % \exists,
386 % \forall}
387 % \begin{syntax}
388 % \begin{tabular}{lc}
389 % \cs{exists} & $\exists$\\
390 % \cs{forall} & $\forall$\\
391 % \end{tabular}
392 % \end{syntax}
393 % \end{function}
394 %
395 % \clearpage
396 % \subsection{CMFTBL extension}
397 % \label{sec:cmftbl_extension}
398 % \emph{CMFTBL} extends \emph{MFOTL} by the operators \emph{minPrevalence},
399 % \emph{maxPrevalence}, their past forms, and the \emph{bind} operator.
400 %
401 % \begin{function}{
402 % \tlminprevalence,
403 % \tlpastminprevalence,
404 % \tlmaxprevalence,
405 % \tlpastmaxprevalence,
406 % \tlbind}
407 % \begin{syntax}
408 % \begin{tabular}{lc}
409 % \cs{tlminprevalence}\marg{Percentage}\oarg{Interval} &
410 % $\tlminprevalence{0.8}[[0,1]]$\\
411 %
412 % \cs{tlpastminprevalence}\marg{Percentage}\oarg{Interval} &
413 % $\tlpastminprevalence{0.8}[[0,1]]$\\
414 %
415 % \cs{tlmaxprevalence}\marg{Percentage}\oarg{Interval} &
416 % $\tlmaxprevalence{0.8}[[0,1]]$\\
417 %
418 % \cs{tlpastmaxprevalence}\marg{Percentage}\oarg{Interval} &
419 % $\tlpastmaxprevalence{0.8}[[0,1]]$\\
420 %
421 % \cs{tlbind}\marg{Valuation}\marg{Variable} &
422 % $\tlbind{v.id}{i}$\\
423 % \end{tabular}
424 % \end{syntax}
425 % \end{function}
426 %
427 % \noindent
428 % The symbols only have a symbolic representation and get rendered
429 % independent from the selected display mode (cf.~Sect.~\ref{sec:options}).
430 % The symbols and the semantics of the operators are listed below:
431 %
432 % \vspace{\baselineskip}
433 % \noindent
434 % \begin{tblr}{
435 % colspec={lcX},
436 % width=\textwidth,
437 % rowsep={3pt}
438 % }
439 % \textbf{Command} &
440 % \textbf{Symbolic} &
441 % \textbf{Semantics}\\
442 %
443 % \cs{tlminprevalence} &
444 % $\tlminprevalence{p}[I] \varphi$ & $\varphi$ must hold in at least
445 % fraction $p$ of the future states in the interval $I$.\\
446 %
447 % \cs{tlpastminprevalence} &
448 % $\tlpastminprevalence{p}[I] \varphi$ & $\varphi$ must have held in at
449 % least fraction $p$ of the past states in the interval $I$.\\
450 %
451 % \cs{tlmaxprevalence} &
452 % $\tlmaxprevalence{p}[I] \varphi$ & $\varphi$ must hold in at most
453 % fraction $p$ of the future states in the interval $I$.\\
454 %
455 % \cs{tlpastmaxprevalence} &
456 % $\tlpastmaxprevalence{p}[I] \varphi$ & $\varphi$ must have held in at
457 % most fraction $p$ of the past states in the interval $I$.\\
458 %
459 % \cs{tlbind} &
460 % $\tlbind{v.id}{i}$ &
461 % Saves the valuation $v.\mathrm{id}$ to the variable $i$ for later use in
462 % a nested formula, where $v$ already has a new value.
463 % \end{tblr}
464 %
465 % \noindent
466 % \emph{minPrevalence} and \emph{maxPrevalence} take the desired percentage
467 % as another mandatory parameter. These operators may only be defined on
468 % finite traces since they argue about numbers of states. \emph{bind} has no
469 % optional interval but two mandatory arguments: the value to bind and the
470 % target variable.
471 %
472 % \clearpage
473 % \subsection{Additional operators}
474 % \label{sec:additional_operators}
475 % For convenience, the package contains four additional operators:
476 %
477 % \begin{function}{
478 % \tlrise,
479 % \tlfall,
480 % \tlprophecy,
481 % \tlhistory}
482 % \begin{syntax}
483 % \cs{tlrise} \cs{varphi}
484 % \cs{tlfall} \cs{varphi}
485 % \cs{tlprophecy} \cs{varphi}
486 % \cs{tlhistory} \cs{varphi}
487 % \end{syntax}
488 % \end{function}
489 %
490 % \noindent
491 % The symbols only have a symbolic representation and get rendered
492 % independent from the selected display mode (cf.~Sect.~\ref{sec:options}).
493 % The symbols and the semantics of the operators are listed below:
494 %
495 % \vspace{\baselineskip}
496 % \noindent
497 % \begin{tblr}{
498 % colspec={lcX},
499 % width=\textwidth,
500 % rowsep={3pt}
501 % }
502 % \textbf{Command} &
503 % \textbf{Symbolic} &
504 % \textbf{Semantics}\\
505 %
506 % \cs{tlrise} &
507 % $\tlrise \varphi$ &
508 % Holds when $\varphi$ becomes true, i.e. $\varphi$ holds at this time but
509 % did not hold in the immediate past.\\
510 %
511 % \cs{tlfall} &
512 % $\tlfall \varphi$ &
513 % Holds when $\varphi$ becomes false, i.e. $\varphi$ does not hold at this
514 % time but held in the immediate past.\\
515 %
516 % \cs{tlprophecy} &
517 % $\tlprophecy \varphi$ &
518 % Holds when there exists a first moment in the future where $\varphi$
519 % holds, and the moment is in the interval.\\
520 %
521 % \cs{tlhistory} &
522 % $\tlhistory \varphi$ &
523 % Holds when there exists a last moment in the past where $\varphi$ held,
524 % and the moment is in the interval.
525 % \end{tblr}
526 %
527 % \section{Usage in formulas}
528 % \label{sec:usage}
529 % The commands may be directly used in math mode to create composite
530 % formulas. For the unary formulas, the term $\varphi$ should directly
531 % follow the symbol:
532 % \begin{syntax}
533 % \begin{tabular}{ll}
534 % \cs{tleventually}\cs{varphi} & $\tleventually \varphi$\\
535 % \cs{tlglobally}[[0,1]]\cs{varphi} & $\tlglobally[[0,1]] \varphi$
536 % \end{tabular}
537 % \end{syntax}
538 %
539 % \noindent The binary symbols like \emph{until} should be used with two
540 % formulas $\varphi$ and $\psi$ directly before and after the symbol:
541 % \begin{syntax}
542 % \begin{tabular}{ll}
543 % \cs{varphi}\cs{tluntil}\cs{psi} & $\varphi \tluntil \psi$\\
544 % \cs{varphi}\cs{tluntil}[[0,1]]\cs{psi} & $\varphi \tluntil[[0,1]] \psi$
545 % \end{tabular}
546 % \end{syntax}
547 %
548 % \noindent
549 % The \emph{CMFTBL} operators may be used as the unary ones:
550 % \begin{syntax}
551 % \begin{tabular}{ll}
552 % \cs{tlminprevalence}\{0.8\}\cs{varphi} &
553 % $\tlminprevalence{0.8} \varphi$\\
554 %
555 % \cs{tlpastmaxprevalence}\{0.8\}[[0,1]]\cs{varphi} &
556 % $\tlmaxprevalence{0.8}[[0,1]] \varphi$\\
557 %
558 % \cs{tlbind}\{v.id\}\{i\}\cs{varphi} &
559 % $\tlbind{v.id}{i} \varphi$
560 % \end{tabular}
561 % \end{syntax}
562 %
563 % \clearpage
564 % \section{Standalone symbols}
565 % \label{sec:standalone_symbols}
566 % The package defines all symbols as a standalone version as
567 % \emph{MathOperators} without additional spacing around for the usage in
568 % text.
569 %
570 % \begin{function}{
571 % \tlopnext,
572 % \tlopfinally,
573 % \tlopeventually,
574 % \tlopglobally,
575 % \tlopuntil,
576 % \tloprelease,
577 % \tlopweakuntil,
578 % \tlopstrongrelease,
579 % \tlopmightyrelease,
580 % \tlyesterday,
581 % \tlprevious,
582 % \tlonce,
583 % \tlhistorically,
584 % \tlsince,
585 % \tlbackto,
586 % \tlweaksince,
587 % \tltrigger,
588 % \tlopminprevalence,
589 % \tloppastminprevalence,
590 % \tlopmaxprevalence,
591 % \tloppastmaxprevalence,
592 % \tlopbind,
593 % \tloprise,
594 % \tlopfall,
595 % \tlopprophecy,
596 % \tlophistory}
597 % \begin{syntax}
598 % \begin{tabular}{lc}
599 % \cs{tlopnext} & $\tlopnext$\\
600 % \cs{tlopfinally} & $\tlopfinally$\\
601 % \cs{tlopeventually} & $\tlopeventually$\\
602 % \cs{tlopglobally} & $\tlopglobally$\\
603 % \cs{tlopuntil} & $\tlopuntil$\\
604 % \cs{tloprelease} & $\tloprelease$\\
605 % \cs{tlopweakuntil} & $\tlopweakuntil$\\
606 % \cs{tlopstrongrelease} & $\tlopstrongrelease$\\
607 % \cs{tlopmightyrelease} & $\tlopmightyrelease$\\
608 % \cs{tlopyesterday} & $\tlopyesterday$\\
609 % \cs{tlopprevious} & $\tlopprevious$\\
610 % \cs{tloponce} & $\tloponce$\\
611 % \cs{tlophistorically} & $\tlophistorically$\\
612 % \cs{tlopsince} & $\tlopsince$\\
613 % \cs{tlopbackto} & $\tlopbackto$\\
614 % \cs{tlopweaksince} & $\tlopweaksince$\\
615 % \cs{tloptrigger} & $\tloptrigger$\\
616 % \cs{tlopminprevalence\{\}} & $\tlopminprevalence{}$\\
617 % \cs{tloppastminprevalence\{\}} & $\tloppastminprevalence{}$\\
618 % \cs{tlopmaxprevalence\{\}} & $\tlopmaxprevalence{}$\\
619 % \cs{tloppastmaxprevalence\{\}} & $\tloppastmaxprevalence{}$\\
620 % \cs{tlopbind\{\}\{\}} & $\tlopbind{}{}$\\
621 % \cs{tloprise} & $\tloprise$\\
622 % \cs{tlopfall} & $\tlopfall$\\
623 % \cs{tlopprophecy} & $\tlopprophecy$\\
624 % \cs{tlophistory} & $\tlophistory$\\
625 % \end{tabular}
626 % \end{syntax}
627 % \end{function}
628 %
629 % \section{Dependencies}
630 % The package loads the following dependencies:
631 % \begin{itemize}
632 % \item \emph{expl3} For \LaTeX 3 support.
633 % \item \emph{l3keys2e} For package option parsing.
634 % \item \emph{xparse} For parsing the mandatory and optional arguments.
635 % \item \emph{amsmath} For symbol definitions.
636 % \item \emph{tikz} For rendering of symbols.
637 % \end{itemize}
638 % \normalsize
639 %
640 % \clearpage
641 % \section{License}
642 % \begin{center}
643 % Copyright (C) 2026\\
644 % Dominik Schmid\\[\baselineskip]
645 %
646 % This work may be distributed and/or modified under the conditions of the\\ % \LaTeX~Project Public License, either version 1.3c of this license\\
647 % or (at your option) any later version.\\[\baselineskip]
648 %
649 % The latest version of this license is in
650 % \url{http://www.latex-project.org/lppl.txt}\\
651 % and version 1.3c or later is part of all distributions of
652 % \LaTeX~version 2005/12/01 or later.\\[\baselineskip]
653 %
654 % This work has the LPPL maintenance status ''maintained''.\\[\baselineskip]
655 %
656 % The current maintainer of this work is\\
657 % Dominik Schmid <\href{mailto:[email protected]}
658 % {[email protected]>}.\\[\baselineskip]
659 %
660 % This work consists of the files temporal-logic.dtx, temporal-logic.ins,\\
661 % and the derived file temporal-logic.sty.
662 % \end{center}
663 % \clearpage
664 % \section{Sourcecode}
665 % \label{sec:sourcecode}
666 % \end{documentation}
667 % \begin{implementation}
668 % \begin{macrocode}
669 % <*package>
670
671 \ProvidesExplPackage
672 {temporal-logic}
673 { 2026-01-06 }
674 { v1.1 }
675 { Symbols for Temporal Logics }
676
677 \RequirePackage{expl3}
678 \RequirePackage{l3keys2e}
679 \RequirePackage{xparse}
680 \RequirePackage{amsmath}
681 \RequirePackage{tikz}
682
683 \ExplSyntaxOn
684
685 \msg_new:nnn { temporallogic } { multiple-display-modes }
686 { Multiple~display~mode~options~given;~using~the~last~one. }
687
688 \msg_new:nnn { temporallogic } { multiple-script-modes }
689 { Multiple~script~mode~options~given;~using~the~last~one. }
690
691 \int_new:N \g_temporallogic_display_mode_int
692 \int_new:N \g_temporallogic_script_mode_int
693 \int_new:N \g_temporallogic_display_mode_count_int
694 \int_new:N \g_temporallogic_script_mode_count_int
695 \int_const:Nn \c_temporallogic_display_mode_bold { 1 }
696 \int_const:Nn \c_temporallogic_display_mode_letter { 2 }
697 \int_const:Nn \c_temporallogic_display_mode_symbolic { 3 }
698 \int_const:Nn \c_temporallogic_script_mode_roman { 1 }
699 \int_const:Nn \c_temporallogic_script_mode_italic { 2 }
700
701 \keys_define:nn { temporallogic }
702 {
703 displaymode .choice:,
704
705 displaymode / bold .code:n =
706 {
707 \int_gset:Nn \g_temporallogic_display_mode_int
708 { \c_temporallogic_display_mode_bold }
709 \int_gincr:N \g_temporallogic_display_mode_count_int
710 },
711
712 displaymode / letter .code:n =
713 {
714 \int_gset:Nn \g_temporallogic_display_mode_int
715 { \c_temporallogic_display_mode_letter }
716 \int_gincr:N \g_temporallogic_display_mode_count_int
717 },
718
719 displaymode / symbolic .code:n =
720 {
721 \int_gset:Nn \g_temporallogic_display_mode_int
722 { \c_temporallogic_display_mode_symbolic }
723 \int_gincr:N \g_temporallogic_display_mode_count_int
724 },
725
726 % default
727 displaymode .initial:n = symbolic,
728
729 % short forms
730 bold .meta:n = { displaymode = bold },
731 letter .meta:n = { displaymode = letter },
732 symbolic .meta:n = { displaymode = symbolic },
733
734 scriptmode .choice:,
735 scriptmode / roman .code:n =
736 {
737 \int_gset:Nn \g_temporallogic_script_mode_int
738 { \c_temporallogic_script_mode_roman }
739 \int_gincr:N \g_temporallogic_script_mode_count_int
740 },
741 scriptmode / italic .code:n =
742 {
743 \int_gset:Nn \g_temporallogic_script_mode_int
744 { \c_temporallogic_script_mode_italic }
745 \int_gincr:N \g_temporallogic_script_mode_count_int
746 },
747 scriptmode .initial:n = roman,
748
749 % short forms
750 roman .meta:n = { scriptmode = roman },
751 italic .meta:n = { scriptmode = italic },
752 }
753
754 \ProcessKeysOptions { temporallogic }
755
756 \int_compare:nNnT { \g_temporallogic_display_mode_count_int } > { 2 }
757 {
758 \msg_warning:nn { temporallogic } { multiple-display-modes }
759 }
760
761 \int_compare:nNnT { \g_temporallogic_script_mode_count_int } > { 2 }
762 {
763 \msg_warning:nn { temporallogic } { multiple-script-modes }
764 }
765
766
767
768 \cs_new:Nn \__temporal_logic_op_sup_sub:Nnn {
769 \ensuremath {
770 #1
771 \int_case:nnF { \g_temporallogic_script_mode_int }
772 {
773 {
774 \c_temporallogic_script_mode_roman} {
775 \tl_if_empty:nF { #2 } { \c_math_superscript_token
776 { \,\mathrm{#2} } }
777 \tl_if_empty:nF { #3 } { \c_math_subscript_token
778 { \,\mathrm{#3} } }
779 }
780 {
781 \c_temporallogic_script_mode_italic} {
782 \tl_if_empty:nF { #2 } { \c_math_superscript_token
783 { \,\mathit{#2} } }
784 \tl_if_empty:nF { #3 } { \c_math_subscript_token
785 { \,\mathit{#3} } }
786 }
787 }{}
788 \,
789 }
790 }
791 \cs_generate_variant:Nn \__temporal_logic_op_sup_sub:Nnn { cnn }
792
793 \cs_new:Nn \__temporal_logic_op_sup:Nn
794 { \__temporal_logic_op_sup_sub:Nnn { #1 } { #2 } {} }
795 \cs_generate_variant:Nn \__temporal_logic_op_sup:Nn { cn }
796
797 \cs_new:Nn \__temporal_logic_op_sub:Nn
798 { \__temporal_logic_op_sup_sub:Nnn { #1 } { } { #2 } }
799 \cs_generate_variant:Nn \__temporal_logic_op_sub:Nn { cn }
800
801 \cs_new:Nn \__temporal_logic_op:N
802 { \__temporal_logic_op_sup_sub:Nnn { #1 } { } { } }
803 \cs_generate_variant:Nn \__temporal_logic_op:N { c }
804
805 \dim_new:N \__temporal_logic_fht_dim
806 \cs_new:Nn \__temporal_logic_ex: { \dim_use:N \__temporal_logic_fht_dim }
807
808 \cs_new:Nn \__temporal_logic_render_op:n {
809 \dim_set:Nn \__temporal_logic_fht_dim {\fontcharht\font`X}
810 \tikz[execute~at~end~picture={
811 \useasboundingbox (0, 0)
812 rectangle
813 (\__temporal_logic_ex:, \__temporal_logic_ex:);
814 }]{
815 \group_begin:
816 \cs_set_eq:NN \EX \__temporal_logic_ex:
817 #1
818 \group_end:
819 }
820 }
821
822
823
824 \ProvideDocumentCommand \tldisplaymode {} {
825 \int_case:nnF { \g_temporallogic_display_mode_int }
826 {
827 {\c_temporallogic_display_mode_bold} { Bold }
828 {\c_temporallogic_display_mode_letter} { Letter }
829 {\c_temporallogic_display_mode_symbolic} { Symbolic }
830 }{}
831 }
832 \ProvideDocumentCommand \tlscriptmode {} {
833 \int_case:nnF { \g_temporallogic_script_mode_int }
834 {
835 {\c_temporallogic_script_mode_roman} { Roman }
836 {\c_temporallogic_script_mode_italic} { Italic }
837 }{}
838 }
839
840
841
842 % Next
843 \DeclareMathOperator { \tlboldnext } {
844 \ensuremath\mathbf{X}
845 }
846 \DeclareMathOperator { \tlletternext } {
847 \ensuremath\mathcal{X}
848 }
849 \DeclareMathOperator { \tlsymbnext } {
850 \__temporal_logic_render_op:n {
851 \draw
852 (.5*\EX, .5*\EX)
853 circle
854 (.4*\EX);
855 }
856 }
857 \ProvideDocumentCommand { \tlnext } { O{} } {
858 \__temporal_logic_op_sub:cn {
859 \int_case:nnF { \g_temporallogic_display_mode_int }
860 {
861 {\c_temporallogic_display_mode_bold} { tlboldnext }
862 {\c_temporallogic_display_mode_letter} { tlletternext }
863 {\c_temporallogic_display_mode_symbolic} { tlsymbnext }
864 }{}
865 } { #1 }
866 }
867 \ProvideDocumentCommand { \tlopnext } { } { \tlnext\! }
868
869
870
871 % Finally
872 \DeclareMathOperator { \tlboldfinally } {
873 \ensuremath\mathbf{F}
874 }
875 \DeclareMathOperator { \tlletterfinally } {
876 \ensuremath\mathcal{F}
877 }
878 \DeclareMathOperator { \tlsymbfinally } {
879 \__temporal_logic_render_op:n {
880 \draw
881 (.5*\EX, 0) --
882 (.2*\EX, .5*\EX) --
883 (.5*\EX, \EX) --
884 (.8*\EX, .5*\EX) --
885 cycle;
886 }
887 }
888 \ProvideDocumentCommand { \tlfinally } { O{} } {
889 \__temporal_logic_op_sub:cn {
890 \int_case:nnF { \g_temporallogic_display_mode_int }
891 {
892 {\c_temporallogic_display_mode_bold} { tlboldfinally }
893 {\c_temporallogic_display_mode_letter} { tlletterfinally }
894 {\c_temporallogic_display_mode_symbolic} { tlsymbfinally }
895 }{}
896 } { #1 }
897 }
898 \ProvideDocumentCommand { \tlopfinally } { } { \tlfinally\! }
899
900
901
902 % Eventually
903 \DeclareMathOperator { \tlboldeventually } { \tlboldfinally }
904 \DeclareMathOperator { \tllettereventually } { \tlletterfinally }
905 \DeclareMathOperator { \tlsymbeventually } { \tlsymbfinally }
906 \ProvideDocumentCommand { \tleventually } { O{} } {
907 \__temporal_logic_op_sub:cn {
908 \int_case:nnF { \g_temporallogic_display_mode_int }
909 {
910 {\c_temporallogic_display_mode_bold} { tlboldeventually }
911 {\c_temporallogic_display_mode_letter} { tllettereventually }
912 {\c_temporallogic_display_mode_symbolic} { tlsymbeventually }
913 }{}
914 } { #1 }
915 }
916 \ProvideDocumentCommand { \tlopeventually } { } { \tleventually\! }
917
918
919 % Globally
920 \DeclareMathOperator { \tlboldglobally } {
921 \ensuremath\mathbf{G}
922 }
923 \DeclareMathOperator { \tlletterglobally } {
924 \ensuremath\mathcal{G}
925 }
926 \DeclareMathOperator { \tlsymbglobally } {
927 \__temporal_logic_render_op:n {
928 \draw
929 (.15*\EX, .15*\EX)
930 rectangle
931 (.85*\EX, .85*\EX);
932 }
933 }
934 \ProvideDocumentCommand { \tlglobally } { O{} } {
935 \__temporal_logic_op_sub:cn {
936 \int_case:nnF { \g_temporallogic_display_mode_int }
937 {
938 {\c_temporallogic_display_mode_bold} { tlboldglobally }
939 {\c_temporallogic_display_mode_letter} { tlletterglobally }
940 {\c_temporallogic_display_mode_symbolic} { tlsymbglobally }
941 }{}
942 } { #1 }
943 }
944 \ProvideDocumentCommand { \tlopglobally } { } { \tlglobally\! }
945
946
947
948 % Until
949 \DeclareMathOperator { \tlbolduntil } {
950 \medspace\ensuremath\mathbf{U}
951 }
952 \DeclareMathOperator { \tlletteruntil } {
953 \medspace\ensuremath\mathcal{U}
954 }
955 \DeclareMathOperator { \tlsymbuntil } {
956 \medspace\ensuremath\mathcal{U}
957 }
958 \ProvideDocumentCommand { \tluntil } { O{} } {
959 \__temporal_logic_op_sub:cn {
960 \int_case:nnF { \g_temporallogic_display_mode_int }
961 {
962 {\c_temporallogic_display_mode_bold} { tlbolduntil }
963 {\c_temporallogic_display_mode_letter} { tlletteruntil }
964 {\c_temporallogic_display_mode_symbolic} { tlsymbuntil }
965 }{}
966 } { #1 }
967 }
968 \ProvideDocumentCommand { \tlopuntil } { } { \negmedspace\tluntil\! }
969
970
971
972 % Release
973 \DeclareMathOperator { \tlboldrelease } {
974 \medspace\ensuremath\mathbf{R}
975 }
976 \DeclareMathOperator { \tlletterrelease } {
977 \medspace\ensuremath\mathcal{R}
978 }
979 \DeclareMathOperator { \tlsymbrelease } {
980 \medspace\ensuremath\mathcal{R}
981 }
982 \ProvideDocumentCommand { \tlrelease } { O{} } {
983 \__temporal_logic_op_sub:cn {
984 \int_case:nnF { \g_temporallogic_display_mode_int }
985 {
986 {\c_temporallogic_display_mode_bold} { tlboldrelease }
987 {\c_temporallogic_display_mode_letter} { tlletterrelease }
988 {\c_temporallogic_display_mode_symbolic} { tlsymbrelease }
989 }{}
990 } { #1 }
991 }
992 \ProvideDocumentCommand { \tloprelease } { } { \negmedspace\tlrelease\! }
993
994
995
996 % Weak until
997 \DeclareMathOperator { \tlboldweakuntil } {
998 \medspace\ensuremath\mathbf{W}
999 }
1000 \DeclareMathOperator { \tlletterweakuntil } {
1001 \medspace\ensuremath\mathcal{W}
1002 }
1003 \DeclareMathOperator { \tlsymbweakuntil } {
1004 \medspace\ensuremath\mathcal{W}
1005 }
1006 \ProvideDocumentCommand { \tlweakuntil } { O{} } {
1007 \__temporal_logic_op_sub:cn {
1008 \int_case:nnF { \g_temporallogic_display_mode_int }
1009 {
1010 {\c_temporallogic_display_mode_bold} { tlboldweakuntil }
1011 {\c_temporallogic_display_mode_letter} { tlletterweakuntil }
1012 {\c_temporallogic_display_mode_symbolic} { tlsymbweakuntil }
1013 }{}
1014 } { #1 }
1015 }
1016 \ProvideDocumentCommand { \tlopweakuntil } { } { \negmedspace\tlweakuntil\! }
1017
1018
1019
1020 % Strong Release
1021 \DeclareMathOperator { \tlboldstrongrelease } {
1022 \medspace\ensuremath\mathbf{M}
1023 }
1024 \DeclareMathOperator { \tlletterstrongrelease } {
1025 \medspace\ensuremath\mathcal{M}
1026 }
1027 \DeclareMathOperator { \tlsymbstrongrelease } {
1028 \medspace\ensuremath\mathcal{M}
1029 }
1030 \ProvideDocumentCommand { \tlstrongrelease } { O{} } {
1031 \__temporal_logic_op_sub:cn {
1032 \int_case:nnF { \g_temporallogic_display_mode_int }
1033 {
1034 {\c_temporallogic_display_mode_bold} { tlboldstrongrelease }
1035 {\c_temporallogic_display_mode_letter} { tlletterstrongrelease }
1036 {\c_temporallogic_display_mode_symbolic} { tlsymbstrongrelease }
1037 }{}
1038 } { #1 }
1039 }
1040 \ProvideDocumentCommand { \tlopstrongrelease } { }
1041 { \negmedspace\tlstrongrelease\! }
1042
1043
1044
1045 % Mighty Release
1046 \DeclareMathOperator { \tlboldmightyrelease } { \tlboldstrongrelease }
1047 \DeclareMathOperator { \tllettermightyrelease } { \tlletterstrongrelease }
1048 \DeclareMathOperator { \tlsymbmightyrelease } { \tlsymbstrongrelease }
1049 \ProvideDocumentCommand { \tlmightyrelease } { O{} } {
1050 \__temporal_logic_op_sub:cn {
1051 \int_case:nnF { \g_temporallogic_display_mode_int }
1052 {
1053 {\c_temporallogic_display_mode_bold} { tlboldmightyrelease }
1054 {\c_temporallogic_display_mode_letter} { tllettermightyrelease }
1055 {\c_temporallogic_display_mode_symbolic} { tlsymbmightyrelease }
1056 }{}
1057 } { #1 }
1058 }
1059 \ProvideDocumentCommand { \tlopmightyrelease } { }
1060 { \negmedspace\tlmightyrelease\! }
1061
1062
1063
1064 % Yesterday
1065 \DeclareMathOperator { \tlboldyesterday } {
1066 \ensuremath\mathbf{Y}
1067 }
1068 \DeclareMathOperator { \tlletteryesterday } {
1069 \ensuremath\mathcal{Y}
1070 }
1071 \DeclareMathOperator { \tlsymbyesterday } {
1072 \__temporal_logic_render_op:n {
1073 \draw[fill]
1074 (.5*\EX, .5*\EX)
1075 circle
1076 (.4*\EX);
1077 }
1078 }
1079 \ProvideDocumentCommand { \tlyesterday } { O{} } {
1080 \__temporal_logic_op_sub:cn {
1081 \int_case:nnF { \g_temporallogic_display_mode_int }
1082 {
1083 {\c_temporallogic_display_mode_bold} { tlboldyesterday }
1084 {\c_temporallogic_display_mode_letter} { tlletteryesterday }
1085 {\c_temporallogic_display_mode_symbolic} { tlsymbyesterday }
1086 }{}
1087 } { #1 }
1088 }
1089 \ProvideDocumentCommand { \tlopyesterday } { } { \tlyesterday\! }
1090
1091
1092
1093 % Previous
1094 \DeclareMathOperator { \tlboldprevious } { \tlboldyesterday }
1095 \DeclareMathOperator { \tlletterprevious } { \tlletteryesterday }
1096 \DeclareMathOperator { \tlsymbprevious } { \tlsymbyesterday }
1097 \ProvideDocumentCommand { \tlprevious } { O{} } {
1098 \__temporal_logic_op_sub:cn {
1099 \int_case:nnF { \g_temporallogic_display_mode_int }
1100 {
1101 {\c_temporallogic_display_mode_bold} { tlboldprevious }
1102 {\c_temporallogic_display_mode_letter} { tlletterprevious }
1103 {\c_temporallogic_display_mode_symbolic} { tlsymbprevious }
1104 }{}
1105 } { #1 }
1106 }
1107 \ProvideDocumentCommand { \tlopprevious } { } { \tlprevious\! }
1108
1109
1110 % Once
1111 \DeclareMathOperator { \tlboldonce } {
1112 \ensuremath\mathbf{O}
1113 }
1114 \DeclareMathOperator { \tlletteronce } {
1115 \ensuremath\mathcal{O}
1116 }
1117 \DeclareMathOperator { \tlsymbonce } {
1118 \__temporal_logic_render_op:n {
1119 \draw[fill]
1120 (.5*\EX, 0) --
1121 (.2*\EX, .5*\EX) --
1122 (.5*\EX, \EX) --
1123 (.8*\EX, .5*\EX) --
1124 cycle;
1125 }
1126 }
1127 \ProvideDocumentCommand { \tlonce } { O{} } {
1128 \__temporal_logic_op_sub:cn {
1129 \int_case:nnF { \g_temporallogic_display_mode_int }
1130 {
1131 {\c_temporallogic_display_mode_bold} { tlboldonce }
1132 {\c_temporallogic_display_mode_letter} { tlletteronce }
1133 {\c_temporallogic_display_mode_symbolic} { tlsymbonce }
1134 }{}
1135 } { #1 }
1136 }
1137 \ProvideDocumentCommand { \tloponce } { } { \tlonce\! }
1138
1139
1140
1141 % Historically
1142 \DeclareMathOperator { \tlboldhistorically } {
1143 \ensuremath\mathbf{H}
1144 }
1145 \DeclareMathOperator { \tlletterhistorically } {
1146 \ensuremath\mathcal{H}
1147 }
1148 \DeclareMathOperator { \tlsymbhistorically } {
1149 \__temporal_logic_render_op:n {
1150 \draw[fill]
1151 (.15*\EX, .15*\EX)
1152 rectangle
1153 (.85*\EX, .85*\EX);
1154 }
1155 }
1156 \ProvideDocumentCommand { \tlhistorically } { O{} } {
1157 \__temporal_logic_op_sub:cn {
1158 \int_case:nnF { \g_temporallogic_display_mode_int }
1159 {
1160 {\c_temporallogic_display_mode_bold} { tlboldhistorically }
1161 {\c_temporallogic_display_mode_letter} { tlletterhistorically }
1162 {\c_temporallogic_display_mode_symbolic} { tlsymbhistorically }
1163 }{}
1164 } { #1 }
1165 }
1166 \ProvideDocumentCommand { \tlophistorically } { } { \tlhistorically\! }
1167
1168
1169
1170 % Since
1171 \DeclareMathOperator { \tlboldsince } {
1172 \medspace\ensuremath\mathbf{S}
1173 }
1174 \DeclareMathOperator { \tllettersince } {
1175 \medspace\ensuremath\mathcal{S}
1176 }
1177 \DeclareMathOperator { \tlsymbsince } {
1178 \medspace\ensuremath\mathcal{S}
1179 }
1180 \ProvideDocumentCommand { \tlsince } { O{} } {
1181 \__temporal_logic_op_sub:cn {
1182 \int_case:nnF { \g_temporallogic_display_mode_int }
1183 {
1184 {\c_temporallogic_display_mode_bold} { tlboldsince }
1185 {\c_temporallogic_display_mode_letter} { tllettersince }
1186 {\c_temporallogic_display_mode_symbolic} { tlsymbsince }
1187 }{}
1188 } { #1 }
1189 }
1190 \ProvideDocumentCommand { \tlopsince } { } { \negmedspace\tlsince\!}
1191
1192
1193
1194 % Back to
1195 \DeclareMathOperator { \tlboldbackto } {
1196 \medspace\ensuremath\mathbf{B}
1197 }
1198 \DeclareMathOperator { \tlletterbackto } {
1199 \medspace\ensuremath\mathcal{B}
1200 }
1201 \DeclareMathOperator { \tlsymbbackto } {
1202 \medspace\ensuremath\mathcal{B}
1203 }
1204 \ProvideDocumentCommand { \tlbackto } { O{} } {
1205 \__temporal_logic_op_sub:cn {
1206 \int_case:nnF { \g_temporallogic_display_mode_int }
1207 {
1208 {\c_temporallogic_display_mode_bold} { tlboldbackto }
1209 {\c_temporallogic_display_mode_letter} { tlletterbackto }
1210 {\c_temporallogic_display_mode_symbolic} { tlsymbbackto }
1211 }{}
1212 } { #1 }
1213 }
1214 \ProvideDocumentCommand { \tlopbackto } { } { \negmedspace\tlbackto\! }
1215
1216
1217 % Weak Since
1218 \DeclareMathOperator { \tlboldweaksince } {
1219 \medspace\ensuremath\mathbf{WS}
1220 }
1221 \DeclareMathOperator { \tlletterweaksince } {
1222 \medspace\ensuremath\mathcal{WS}
1223 }
1224 \DeclareMathOperator { \tlsymbweaksince } {
1225 \medspace\ensuremath\mathcal{WS}
1226 }
1227 \ProvideDocumentCommand { \tlweaksince } { O{} } {
1228 \__temporal_logic_op_sub:cn {
1229 \int_case:nnF { \g_temporallogic_display_mode_int }
1230 {
1231 {\c_temporallogic_display_mode_bold} { tlboldweaksince }
1232 {\c_temporallogic_display_mode_letter} { tlletterweaksince }
1233 {\c_temporallogic_display_mode_symbolic} { tlsymbweaksince }
1234 }{}
1235 } { #1 }
1236 }
1237 \ProvideDocumentCommand { \tlopweaksince } { } { \negmedspace\tlweaksince\! }
1238
1239
1240
1241 % Trigger
1242 \DeclareMathOperator { \tlboldtrigger } {
1243 \medspace\ensuremath\mathbf{T}
1244 }
1245 \DeclareMathOperator { \tllettertrigger } {
1246 \medspace\ensuremath\mathcal{T}
1247 }
1248 \DeclareMathOperator { \tlsymbtrigger } {
1249 \medspace\ensuremath\mathcal{T}
1250 }
1251 \ProvideDocumentCommand { \tltrigger } { O{} } {
1252 \__temporal_logic_op_sub:cn {
1253 \int_case:nnF { \g_temporallogic_display_mode_int }
1254 {
1255 {\c_temporallogic_display_mode_bold} { tlboldtrigger }
1256 {\c_temporallogic_display_mode_letter} { tllettertrigger }
1257 {\c_temporallogic_display_mode_symbolic} { tlsymbtrigger }
1258 }{}
1259 } { #1 }
1260 }
1261 \ProvideDocumentCommand { \tloptrigger } { } { \negmedspace\tltrigger\! }
1262
1263
1264
1265 % Min-/Max prevalence
1266 \DeclareMathOperator { \tlsymbminprevalence } {
1267 \__temporal_logic_render_op:n {
1268 \draw
1269 (.1*\EX, .9*\EX) --
1270 (.9*\EX, .9*\EX) --
1271 (.5*\EX, .1*\EX) --
1272 cycle;
1273 }
1274 }
1275 \DeclareMathOperator { \tlsymbpastminprevalence } {
1276 \__temporal_logic_render_op:n {
1277 \draw[fill]
1278 (.1*\EX, .9*\EX) --
1279 (.9*\EX, .9*\EX) --
1280 (.5*\EX, .1*\EX) --
1281 cycle;
1282 }
1283 }
1284 \DeclareMathOperator { \tlsymbmaxprevalence } {
1285 \__temporal_logic_render_op:n {
1286 \draw
1287 (.1*\EX, .1*\EX) --
1288 (.9*\EX, .1*\EX) --
1289 (.5*\EX, .9*\EX) --
1290 cycle;
1291 }
1292 }
1293 \DeclareMathOperator { \tlsymbpastmaxprevalence } {
1294 \__temporal_logic_render_op:n {
1295 \draw[fill]
1296 (.1*\EX, .1*\EX) --
1297 (.9*\EX, .1*\EX) --
1298 (.5*\EX, .9*\EX) --
1299 cycle;
1300 }
1301 }
1302 \ProvideDocumentCommand { \tlminprevalence } { m O{} } {
1303 \__temporal_logic_op_sup_sub:cnn { tlsymbminprevalence } { #1 } { #2 }
1304 }
1305 \ProvideDocumentCommand { \tlpastminprevalence } { m O{} } {
1306 \__temporal_logic_op_sup_sub:cnn { tlsymbpastminprevalence } { #1 } { #2 }
1307 }
1308 \ProvideDocumentCommand { \tlmaxprevalence } { m O{} } {
1309 \__temporal_logic_op_sup_sub:cnn { tlsymbmaxprevalence } { #1 } { #2 }
1310 }
1311 \ProvideDocumentCommand { \tlpastmaxprevalence } { m O{} } {
1312 \__temporal_logic_op_sup_sub:cnn { tlsymbpastmaxprevalence } { #1 } { #2 }
1313 }
1314 \ProvideDocumentCommand { \tlopminprevalence } { m }
1315 { \tlminprevalence{#1}\! }
1316 \ProvideDocumentCommand { \tloppastminprevalence } { m }
1317 { \tlpastminprevalence{#1}\! }
1318 \ProvideDocumentCommand { \tlopmaxprevalence } { m }
1319 { \tlmaxprevalence{#1}\! }
1320 \ProvideDocumentCommand { \tloppastmaxprevalence } { m }
1321 { \tlpastmaxprevalence{#1}\! }
1322
1323
1324
1325 % Bind
1326 \DeclareMathOperator { \tlsymbbind } {
1327 \__temporal_logic_render_op:n {
1328 \draw (.5*\EX, \EX) -- (.5*\EX, 0);
1329 \draw
1330 (.2*\EX, .3*\EX) ..
1331 controls (.4*\EX, .2*\EX) ..
1332 (.5*\EX, 0) ..
1333 controls (.6*\EX, .2*\EX) ..
1334 (.8*\EX, .3*\EX);
1335 }
1336 }
1337 \ProvideDocumentCommand { \tlbind } { m m } {
1338 \__temporal_logic_op_sup_sub:cnn { tlsymbbind } { #1 } { #2 }
1339 }
1340 \ProvideDocumentCommand { \tlopbind } { m m } { \tlbind{ {#1} }{ {#2} } }
1341
1342
1343
1344 % Rise
1345 \DeclareMathOperator { \tlsymbrise } {
1346 \__temporal_logic_render_op:n {
1347 \draw
1348 (.1*\EX, .1*\EX) --
1349 (.9*\EX, .9*\EX);
1350 \draw
1351 (.4*\EX, .9*\EX) --
1352 (.9*\EX, .9*\EX) --
1353 (.9*\EX, .4*\EX);
1354 }
1355 }
1356 \ProvideDocumentCommand { \tlrise } { O{} } {
1357 \__temporal_logic_op_sub:cn { tlsymbrise } { #1 }
1358 }
1359 \ProvideDocumentCommand { \tloprise } { } { \tlrise\! }
1360
1361
1362
1363 % Fall
1364 \DeclareMathOperator { \tlsymbfall } {
1365 \__temporal_logic_render_op:n {
1366 \draw
1367 (.1*\EX, .9*\EX) --
1368 (.9*\EX, .1*\EX);
1369 \draw
1370 (.4*\EX, .1*\EX) --
1371 (.9*\EX, .1*\EX) --
1372 (.9*\EX, .6*\EX);
1373 }
1374 }
1375 \ProvideDocumentCommand { \tlfall } { O{} } {
1376 \__temporal_logic_op_sub:cn { tlsymbfall } { #1 }
1377 }
1378 \ProvideDocumentCommand { \tlopfall } { } { \tlfall\! }
1379
1380
1381 % Prophecy
1382 \DeclareMathOperator { \tlsymbprophecy } {
1383 \__temporal_logic_render_op:n {
1384 \draw
1385 (.1*\EX, .1*\EX) --
1386 (.1*\EX, .9*\EX) --
1387 (.9*\EX, .5*\EX) --
1388 cycle;
1389 }
1390 }
1391 \ProvideDocumentCommand { \tlprophecy } { O{} } {
1392 \__temporal_logic_op_sub:cn { tlsymbprophecy } { #1 }
1393 }
1394 \ProvideDocumentCommand { \tlopprophecy } { } { \tlprophecy\! }
1395
1396
1397
1398 % History
1399 \DeclareMathOperator { \tlsymbhistory } {
1400 \__temporal_logic_render_op:n {
1401 \draw
1402 (.9*\EX, .1*\EX) --
1403 (.9*\EX, .9*\EX) --
1404 (.1*\EX, .5*\EX) --
1405 cycle;
1406 }
1407 }
1408 \ProvideDocumentCommand { \tlhistory } { O{} } {
1409 \__temporal_logic_op_sub:cn { tlsymbhistory } { #1 }
1410 }
1411 \ProvideDocumentCommand { \tlophistory } { } { \tlhistory\! }
1412 \ExplSyntaxOff
1413 % </package>
1414 % \end{macrocode}
1415 % \end{implementation}