Manuscript Offprint
arXiv:2611.23003Probabilistic Simple Types for Almost-Sure Termination (Extended Version)
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
University of Bologna, Italy and INRIA Sophia Antipolis, Franceugo.dallago@unibo.ithttps://orcid.org/0000-0001-9200-070X University of Bath, United Kingdom and http://willem.heijltj.esw.b.heijltjes@bath.ac.ukhttps://orcid.org/0009-0001-8941-1150
We thank Georgina Majury for her efforts on a precursor to this work, and the anonymous referees for their comments, in particular those leading to the observations in Section 8.
Probabilistic Simple Types for Almost-Sure Termination (Extended Version)
Abstract
We present a type system for almost-sure termination (AST) in higher-order probabilistic computation. Our vehicle is the recent Functional Machine Calculus (FMC), which combines the lambda-calculus with effectful imperative computation. Importantly for our purpose, it models branching and looping computation with sum types and a typed iterator construct. Our key observation is that by replacing sum types with probability distributions, types ensure that iteration has a non-zero chance of exiting, which then gives AST in a simple and natural way.
Concretely, our type system assigns explicit probability distributions to termination outcomes, allowing probabilistic behaviour to be tracked compositionally at the type level. Types then soundly guarantee almost-sure termination, even in the presence of higher-order functions. The fragment of ground terms, which consists purely of the branching and iteration constructs with probabilistic sampling, is equivalent to finite Markov chains and is positively AST (expected evaluation time is finite). The full calculus is more expressive, which we demonstrate through an example term with infinite expected evaluation time.
ccs
Theory of computation Probabilistic computation
keywords
probabilistic lambda-calculus, type systems, almost-sure termination
1 Introduction
We are interested in applying the toolset of the -calculus, in particular confluent reduction and type systems, to probabilistic computation. In [12] we restored confluence to a probabilistic -calculus, the probabilistic event -calculus (PEL), by decomposing probabilistic choice into a sampling construct and a conditional. Then in [1] and [24], from different inspirations we converged on essentially the same probabilistic type system for the PEL to give lower bounds on the probability of termination. In this paper we further extend the calculus, and develop a type system for almost-sure termination (AST): termination with probability one. In doing so, our objective differs from that of many existing works in this area, which aim to capture as many AST programs as possible [11, 10], or even to study the feasibility of capturing all such programs [28]. Instead, we seek to understand the extent to which almost-sure termination can be obtained and explained in a natural manner, possibly using well-established methods, and guaranteed by a minimal extension to simple types. More powerful methods such as dependent types and intersection types may later build on this along standard lines.
We start from the following observation. Iteration, generally represented by while-loops, repeats a given function until a condition is fulfilled. In the typed case, illustrated below, the function is required to return a sum , where the choice between returning a value or represents the condition. Then evaluates , exits on , and repeats on [6].
\begin{array}[]{@{}r@{}l@{}}f&{}:A\to B+A\\ \hline\cr\mathsf{iter}\,f&{}:A\to B\end{array}With the above rule, as with typed fixed-point combinators, typing no longer guarantees termination. However, we observe that if we replace by a probabilistic sum with a fixed probability , i.e. the probability of choosing is non-zero and does not depend on the input, then is almost-surely terminating (provided of course that is itself terminating). This opens a way to approach almost-sure termination via type systems. A crucial question arises: how can we handle a type constructor such as within a -calculus with probabilistic choice in a compositional and elegant manner?
These considerations illustrate how probabilistic choice is connected to other imperative features such as sequentiality and iteration. Derived from the PEL, the second author has developed a new approach to unifying the -calculus with imperative computation and effects, the Functional Machine Calculus (FMC) [25]. Its most recent instance [26] features branching sequential computation and iteration, providing an ideal vehicle for our present study. In the FMC each branch of the computation is labelled with a choice label , which takes the rôle of a constant, an exception, a case label, or an exit status. For example, the boolean constants and are choice labels. Iteration of a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is written {\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, which evaluates {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and repeats if {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} chooses , terminating for any other choice. The calculus encodes a fair probabilistic choice, which we write as {\vphantom{(}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptN\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
Example 1 (Bernoulli Factory).
The term {\vphantom{(}\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} chooses heads, the choice , with probability , tails with probability , and iterates with probability , to give an overall probability of for and for . We illustrate it as follows; it will remain a running example.
{\vphantom{(}\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\quad=\quad\vbox{\hbox{$\hbox to48.75pt{\vbox to50.8pt{\pgfpicture\makeatletter\hbox{\hskip 0.35004pt\lower 3.59995pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{11.00002pt}{37.5pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 15.22 51.89)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{27.00002pt}{17.5pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 37.36 24.21)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par\lxSVG@begingroup@{_scopebegin=1} \par{}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{{ {{} {} {\lx@inpgf@ignorespaces} {} \lxSVG@fill}} }{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 22.14 74.72 L 22.14 64.94}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{16.0pt}{46.93327pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 22.14 64.94)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 26.94 49.35 L 37.24 36.48}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.62473}{-0.78084}{0.78084}{0.62473}{26.90994pt}{26.36346pt}\lxSVG@begingroup@{transform=matrix(0.62473 -0.78084 0.78084 0.62473 37.24 36.48)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces { {}{}{}}{} {}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 17.34 49.35 L 6.68 36.02}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.6247}{-0.78087}{0.78087}{-0.6247}{4.82411pt}{26.03015pt}\lxSVG@begingroup@{transform=matrix(-0.6247 -0.78087 0.78087 -0.6247 6.68 36.02)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ }}{ } {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{0.64996pt}{29.66656pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 0.9 41.05)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} { {}{}{}}{} {}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 39.48 21.68 L 28.81 8.34}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.6247}{-0.78087}{0.78087}{-0.6247}{20.82411pt}{6.03015pt}\lxSVG@begingroup@{transform=matrix(-0.6247 -0.78087 0.78087 -0.6247 28.81 8.34)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ }}{ } {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{17.73886pt}{9.66656pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 24.55 13.38)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{\lx@inpgf@ignorespaces}{ {}{}{}}{} {}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{{{}{}}}{{}}{{}}{{}}{}{{}}{}{}{} {}{} {}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 49.07 21.68 L 51.03 19.24 C 53.41 16.26 57.28 11.42 59.67 8.43 C 60.88 6.92 66.42 8.3 66.42 12.45 C 66.42 16.27 66.42 22.47 66.42 26.29 L 66.42 65.03 C 66.42 68.86 63.32 71.95 59.5 71.95 L 29.06 71.95 C 25.24 71.95 22.14 68.86 22.14 65.03 L 22.14 64.94}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{16.0pt}{46.93327pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 22.14 64.94)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{}}{} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{32.69064pt}{6.63472pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 45.23 9.18)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}The type system we introduce in this paper, simplified for this introduction to omit inputs and return values, records the probability of terminating with each given choice. A term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is typed as follows, indicating that it may choose with probability from the choices through . For simplicity, we restrict ourselves to rational probabilities, .
{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\cdots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}The type is a probability (sub-)distribution over the choices , written as a formal sum. If the sum probability over through is one, the term is AST. For greater generality, and since our formalism readily incorporates it, we allow probabilities to sum to less than one, with the remainder representing an upper bound to the probability of divergence. We note here that, as a -calculus, the full calculus will have two means of non-termination: iteration with probability one, and higher-order non-terminating terms such as . The type system will address both, and a term is almost-surely terminating if the sum probability of its type is exactly one.
Example 2.
The body of our example term, without the loop, has the following type.
{\vphantom{(}\color[rgb]{0.8,0,0}\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i)\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\mathsf{h}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\mathsf{t}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}Iteration {\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} removes the choice from the possible return choices. In the probabilistic setting, the remaining probabilities must then be renormalized to form a distribution. That is, if has probability (with ), the remaining choices (including divergence) have a total probability of , and must be multiplied by to return the total to one. Typing for iteration is then as follows.
\begin{array}[]{@{}r@{}l@{}}{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}:{\vphantom{)}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\dots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}qj\color[rgb]{0,0,0}}\\ \hline\cr\\[-10.0pt] {\vphantom{(}\color[rgb]{0.8,0,0}M^{j}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{p_{1}}{1-q}}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\dots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{p_{n}}{1-q}}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\end{array}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}=\vbox{\hbox{\hbox to53.57pt{\vbox to57.6pt{\pgfpicture\makeatletter\hbox{\hskip 27.46072pt\lower-38.0pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-9.75006pt}{-26.5pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -13.49 -36.67)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par\lxSVG@begingroup@{_scopebegin=1} {{}}{}{{}}{} {}{}{}{}{{{}{}}}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -25.37 -30.45}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.64018}{-0.76822}{0.76822}{-0.64018}{-18.33556pt}{-22.00269pt}\lxSVG@begingroup@{transform=matrix(-0.64018 -0.76822 0.76822 -0.64018 -25.37 -30.45)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{{}{}}}{{}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-25.46072pt}{-18.61589pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -35.23 -25.76)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}}\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-25.40147pt}{-29.01389pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -35.15 -40.15)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}{}{{}}{} {}{}{}{}{{{}{}}}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 9.93 -29.8}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.31622}{-0.94868}{0.94868}{0.31622}{7.1777pt}{-21.53346pt}\lxSVG@begingroup@{transform=matrix(0.31622 -0.94868 0.94868 0.31622 9.93 -29.8)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{{}{}}}{{}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-5.80002pt}{-18.61589pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -8.03 -25.76)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}}\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{2.09782pt}{-29.01389pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 2.9 -40.15)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}{}{{}}{} {}{}{}{}{{{}{}}}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 25.37 -30.45}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.64018}{-0.76822}{0.76822}{0.64018}{18.33556pt}{-22.00269pt}\lxSVG@begingroup@{transform=matrix(0.64018 -0.76822 0.76822 0.64018 25.37 -30.45)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{15.99994pt}{-18.43535pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 22.14 -25.51)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}}\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{16.65294pt}{-29.01389pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 23.04 -40.15)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@closescope \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{0.0pt}{-36.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 0 -49.81)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par\par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 7.39 11.07 L -7.39 11.07 C -10.45 11.07 -12.92 8.59 -12.92 5.53 L -12.92 -5.53 C -12.92 -8.59 -10.45 -11.07 -7.39 -11.07 L 7.39 -11.07 C 10.45 -11.07 12.92 -8.59 12.92 -5.53 L 12.92 5.53 C 12.92 8.59 10.45 11.07 7.39 11.07 Z M -12.92 -11.07}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-7.34027pt}{-3.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -10.16 -4.73)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 26.57 L 0 14.67}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{10.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 14.67)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}M^{j}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}=\vbox{\hbox{\hbox to66.19pt{\vbox to57.6pt{\pgfpicture\makeatletter\hbox{\hskip 31.80855pt\lower-38.0pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-9.75006pt}{-26.5pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -13.49 -36.67)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par\lxSVG@begingroup@{_scopebegin=1} {{}}{}{{}}{} {}{}{}{}{{{}{}}}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -25.37 -30.45}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.64018}{-0.76822}{0.76822}{-0.64018}{-18.33556pt}{-22.00269pt}\lxSVG@begingroup@{transform=matrix(-0.64018 -0.76822 0.76822 -0.64018 -25.37 -30.45)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{{}{}}}{{}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-25.46072pt}{-18.61589pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -35.23 -25.76)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}}\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-29.80855pt}{-29.22221pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -41.25 -40.43)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}{}{{}}{} {}{}{}{}{{{}{}}}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 9.93 -29.8}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.31622}{-0.94868}{0.94868}{0.31622}{7.1777pt}{-21.53346pt}\lxSVG@begingroup@{transform=matrix(0.31622 -0.94868 0.94868 0.31622 9.93 -29.8)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{{}{}}}{{}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-5.80002pt}{-18.61589pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -8.03 -25.76)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}}\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-2.30925pt}{-29.22221pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -3.2 -40.43)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@closescope \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{0.0pt}{-36.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 0 -49.81)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par {\lx@inpgf@ignorespaces}{{}}{}{{}}{} {}{}{{}}{{}}{{}}{}{{}}{}{}{} {}{}{}{}{{{}{}}} {}{} {}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 9.41 -11.29 C 11.85 -14.22 15.82 -18.98 18.27 -21.92 C 23.52 -28.23 34.59 -26.57 34.59 -19.37 C 34.59 -15.55 34.59 -9.36 34.59 -5.53 L 34.59 14.67 C 34.59 18.49 31.5 21.59 27.67 21.59 L 6.92 21.59 C 3.1 21.59 0 18.49 0 14.67 L 0 13.28}{fill:none} \lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{27.0pt}{-3.25534pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 37.36 -4.5)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 7.39 11.07 L -7.39 11.07 C -10.45 11.07 -12.92 8.59 -12.92 5.53 L -12.92 -5.53 C -12.92 -8.59 -10.45 -11.07 -7.39 -11.07 L 7.39 -11.07 C 10.45 -11.07 12.92 -8.59 12.92 -5.53 L 12.92 5.53 C 12.92 8.59 10.45 11.07 7.39 11.07 Z M -12.92 -11.07}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-7.34027pt}{-3.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -10.16 -4.73)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 26.57 L 0 14.67}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{10.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 14.67)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}}Example 3.
The type for our example term is given by taking the type {\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\mathsf{h}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\mathsf{t}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}} of the body of the loop, removing the element {\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}, and then multiplying the remaining sub-distribution {\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\mathsf{h}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\mathsf{t}\color[rgb]{0,0,0}} by to renormalize it, which yields the following.
{\vphantom{(}\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\textstyle{\frac{2}{3}}\color[rgb]{0,0,0.8}\mathsf{h}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}\mathsf{t}\color[rgb]{0,0,0}}Types for iteration then correctly give the probabilities for each choice. Consider {\vphantom{(}\color[rgb]{0.8,0,0}M^{j}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} where has probability in {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. For any other choice with probability in {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} the chance of {\vphantom{(}\color[rgb]{0.8,0,0}M^{j}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} choosing is given by the following geometric series, generated by choosing immediately, after one iteration, after two iterations, and so forth. The limit of this series is the probability given by the type system.
A Typed Term Calculus for Finite Markov Chains
Further introducing the calculus, we first consider the fragment of ground terms, as follows:
\text{\emph{Ground terms:}}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}M{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}~{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The first three are the control constructs, introduced in [26], which implement branching and iterating computation. The first (a choice {\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}) and the third (a loop {\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}), we have seen. The second is a case {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} which first evaluates {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, and if {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} terminates with then continues with {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, otherwise discarding it. The control constructs reduce by the following rules:
{\vphantom{(}\color[rgb]{0.8,0,0}i\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathrel{\hbox to10.5pt{\vbox to4.5pt{\pgfpicture\makeatletter\hbox{\hskip 0.25pt\lower-2.25pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {}{{}}{} {\lx@inpgf@ignorespaces}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.5pt} \lx@inpgf@ignorespaces{}{ { { \lxSVG@setdash{0.0pt}\lx@inpgf@ignorespaces\lxSVG@miterjoin\lx@inpgf@ignorespaces{} {} {} {} \lxSVG@stroke}} }{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 10.2 0}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{ {{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{7.5pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 10.38 0)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke-dasharray=none,stroke-dashoffset=0.0pt} \lxSVG@begingroup@{stroke-linejoin=miter} \lxSVG@drawpath@unclipped{M 3.07 0 L 0.35 2.4 L 0 0 L 0.35 -2.4 Z}{fill:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}~{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\quad{\vphantom{(}\color[rgb]{0.8,0,0}j\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathrel{\hbox to10.5pt{\vbox to4.5pt{\pgfpicture\makeatletter\hbox{\hskip 0.25pt\lower-2.25pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {}{{}}{} {\lx@inpgf@ignorespaces}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.5pt} \lx@inpgf@ignorespaces{}{ }{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 10.2 0}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{ {{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{7.5pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 10.38 0)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke-dasharray=none,stroke-dashoffset=0.0pt} \lxSVG@begingroup@{stroke-linejoin=miter} \lxSVG@drawpath@unclipped{M 3.07 0 L 0.35 2.4 L 0 0 L 0.35 -2.4 Z}{fill:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}~{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\quad(i\neq j)\qquad\quad{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathrel{\hbox to10.5pt{\vbox to4.5pt{\pgfpicture\makeatletter\hbox{\hskip 0.25pt\lower-2.25pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {}{{}}{} {\lx@inpgf@ignorespaces}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.5pt} \lx@inpgf@ignorespaces{}{ }{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 10.2 0}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{ {{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{7.5pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 10.38 0)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke-dasharray=none,stroke-dashoffset=0.0pt} \lxSVG@begingroup@{stroke-linejoin=miter} \lxSVG@drawpath@unclipped{M 3.07 0 L 0.35 2.4 L 0 0 L 0.35 -2.4 Z}{fill:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}These constructions generalise sequential computation, which uses a single choice , with imperative as {\vphantom{(}\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and sequencing as {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,{\star}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. The choice and case constructs are essentially throw and try/catch of exception handling, with exceptions as choices:
\mathsf{throw}~e~=~{\vphantom{(}\color[rgb]{0.8,0,0}e\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\qquad\mathsf{try}~M~\mathsf{catch}~e~N~=~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,e\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}Since cases are fall-through, they may be iterated to give a standard case switch. A conditional then encodes as below, where cases associate left, {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\,{;}\,j\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}P\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}(M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N)\,{;}\,j\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}P\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. We do need to keep constants and exceptions apart: for the conditional below, if {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} were to use as an exception, it would be caught by {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. A while-loop, below that, is as follows: if {\vphantom{(}\color[rgb]{0.8,0,0}B\color[rgb]{0,0,0}\color[rgb]{0,0,0}} returns , then {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is skipped, the loop exited, and caught to return (success); if {\vphantom{(}\color[rgb]{0.8,0,0}B\color[rgb]{0,0,0}\color[rgb]{0,0,0}} returns , then {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is evaluated, iterating upon .
\begin{array}[]{r@{}l}\mathsf{if}~B~\mathsf{then}~M~\mathsf{else}~N&~=~{\vphantom{(}\color[rgb]{0.8,0,0}B\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\[5.0pt] \mathsf{while}~B~\mathsf{do}~M&~=~{\vphantom{(}\color[rgb]{0.8,0,0}(B\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)^{\star}\color[rgb]{0.8,0,0}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\end{array}The fourth construct {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is the generator {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} of the probabilistic event -calculus [12] restricted to a variable {\vphantom{(}\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. The generator reduces as below: it flips a coin and binds the result, or , to the variable {\vphantom{(}\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}} in {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathrel{\hbox to10.5pt{\vbox to4.5pt{\pgfpicture\makeatletter\hbox{\hskip 0.25pt\lower-2.25pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {}{{}}{} {\lx@inpgf@ignorespaces}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.5pt} \lx@inpgf@ignorespaces{}{ }{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 10.2 0}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{ {{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{7.5pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 10.38 0)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke-dasharray=none,stroke-dashoffset=0.0pt} \lxSVG@begingroup@{stroke-linejoin=miter} \lxSVG@drawpath@unclipped{M 3.07 0 L 0.35 2.4 L 0 0 L 0.35 -2.4 Z}{fill:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}~{\vphantom{(}\color[rgb]{0.8,0,0}\{\top/\color[rgb]{0.8,0,0}a\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\oplus~{\vphantom{(}\color[rgb]{0.8,0,0}\{\bot/\color[rgb]{0.8,0,0}a\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The restricted construct {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}} thus reduces to or with equal probability. Using it, a probabilistic sum encodes as follows.
M\oplus N~=~{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}Example 4.
Our running example term unfolds as a ground term as follows.
{\vphantom{(}\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}\big(\color[rgb]{0.8,0,0}\,\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\,\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)\big){}^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}Remark 5.
The generator {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} represents a fair coin toss, with equal probability for and . We write {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt{}_{p}\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for an unfair coin with probability for and for . This may either be considered a primitive construct generalising {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, or constructed from fair coin tosses with iteration in the way our running example term generates and .
We now turn to types. Deterministic types for the control constructs record the possible terminating choices for a term, as is standard for exception handling. Types are finite sets of choices, written as formal sums {\vphantom{)}\color[rgb]{0,0,0.8}I\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle+}}}{\mathbin{\hbox{\scriptscriptstyle+}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\cdots\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle+}}}{\mathbin{\hbox{\scriptscriptstyle+}}}}\kern 2.0pt\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}; semantically, these are coproducts. We have the following typing rules:
{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}i\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}I\color[rgb]{0,0,0}}\qquad\quad{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}I\cup J\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}I\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}J\color[rgb]{0,0,0}}\qquad\quad{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}I\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}I\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}As in the previous, in the probabilistic setting types become (sub-)distributions {\vphantom{)}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\cdots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} over a set of choices. Ground terms are then typed by the rules in Figure 1, where we write {\vphantom{)}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle+}}}{\mathbin{\hbox{\scriptscriptstyle+}}}}\kern 2.0pt\color[rgb]{0,0,0.8}q_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} for the pointwise addition of two distributions over and {\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}q_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} for the multiplication of each probability in {\vphantom{)}\color[rgb]{0,0,0.8}q_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} by {\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}. A type {\vphantom{)}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} implicitly assigns probability zero to any choice not in , corresponding to the weakened {\vphantom{)}\color[rgb]{0,0,0.8}I\color[rgb]{0,0,0}} in the first rule above. Observe that the probabilistic type system is a direct generalization of the deterministic one.
\begin{array}[]{c@{\qquad}c@{\qquad}c@{\qquad}c}{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}(p_{J}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}q\color[rgb]{0,0,0.8}r\!{}_{J}\color[rgb]{0,0,0.8}){\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}q\color[rgb]{0,0,0.8}r\!{}_{K}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{J}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}qi\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}r\!{}_{J}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}r\!{}_{K}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-q}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}qi\color[rgb]{0,0,0}}(q\neq 1)&{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}\\ \\ \vbox{\hbox{$\hbox to16.8pt{\vbox to64.7pt{\pgfpicture\makeatletter\hbox{\hskip 8.4pt\lower-34.29762pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-6.16702pt}{-33.29762pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -8.53 -46.07)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{{}}{}{{}}{}{ {}{}{}} {}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 0 -31.97}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{-23.10243pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 -31.97)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 5.53 11.07 L -5.53 11.07 C -8.59 11.07 -11.07 8.59 -11.07 5.53 L -11.07 -5.53 C -11.07 -8.59 -8.59 -11.07 -5.53 -11.07 L 5.53 -11.07 C 8.59 -11.07 11.07 -8.59 11.07 -5.53 L 11.07 5.53 C 11.07 8.59 8.59 11.07 5.53 11.07 Z M -11.07 -11.07}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.667pt}{-3.29762pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.07 -4.56)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 41.51 L 0 14.67}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{10.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 14.67)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}&\vbox{\hbox{$\hbox to70.42pt{\vbox to95pt{\pgfpicture\makeatletter\hbox{\hskip 33.69862pt\lower-70.59721pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} {{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{24.0pt}{-24.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 33.21 -33.21)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-32.69862pt}{-49.18056pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -45.25 -68.05)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-31.6843pt}{-67.59721pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -43.84 -93.53)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{12.2834pt}{-49.15277pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 17 -68.01)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{{}}{}{{}}{} {}{}{ {}{}{}} {}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=2.20001pt} \lx@inpgf@ignorespaces{}{{ {{} {} {\lx@inpgf@ignorespaces} {} \lxSVG@fill}} }{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -33.21 -33.21 L -33.21 -56.53}{fill:none} \lxSVG@begingroup@{_scopebegin=1} {\lxSVG@setlinewidth{\pgfinnerlinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lxSVG@begingroup@{stroke=#FFFFFF} \lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -33.21 -33.21 L -33.21 -56.53}{fill:none} }\lxSVG@closescope {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{-24.0pt}{-40.855pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 -33.21 -56.53)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 4.18 0 L -2.51 3.34 L 0 0 L -2.51 -3.34}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\lxSVG@closescope {{}}{}{{}}{} {}{}{{}}{}{{}}{} {}{}{ {}{}{}} {}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=2.20001pt} \lx@inpgf@ignorespaces{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 0 -66.42 M 33.21 -33.21 L 0 -66.42 L 0 -80.78}{fill:none} \lxSVG@begingroup@{_scopebegin=1} {\lxSVG@setlinewidth{\pgfinnerlinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lxSVG@begingroup@{stroke=#FFFFFF} \lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 0 -66.42 M 33.21 -33.21 L 0 -66.42 L 0 -80.78}{fill:none} }\lxSVG@closescope {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{-58.38277pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 -80.78)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 4.18 0 L -2.51 3.34 L 0 0 L -2.51 -3.34}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\lxSVG@closescope {{}}{}{{}}{}{ {}{}{}} {}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=2.20001pt} \lx@inpgf@ignorespaces{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 33.21 -33.21 L 33.21 -56.49}{fill:none} \lxSVG@begingroup@{_scopebegin=1} {\lxSVG@setlinewidth{\pgfinnerlinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lxSVG@begingroup@{stroke=#FFFFFF} \lxSVG@stroke\lxSVG@drawpath@unclipped{M 33.21 -33.21 L 33.21 -56.49}{fill:none} }\lxSVG@closescope {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{24.0pt}{-40.82721pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 33.21 -56.49)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 4.18 0 L -2.51 3.34 L 0 0 L -2.51 -3.34}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\lxSVG@closescope \par{}{{}}{}{{}} {}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 33.21 L 0 3.6}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{2.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 3.6)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{{}}{}{ {}{}{}} {}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 30.22 -20.14}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.83205}{-0.5547}{0.5547}{0.83205}{21.83673pt}{-14.5578pt}\lxSVG@begingroup@{transform=matrix(0.83205 -0.5547 0.5547 0.83205 30.22 -20.14)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{}}{} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{15.40015pt}{-6.65567pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 21.31 -9.21)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 6.01 11.07 L -6.01 11.07 C -9.06 11.07 -11.54 8.59 -11.54 5.53 L -11.54 -5.53 C -11.54 -8.59 -9.06 -11.07 -6.01 -11.07 L 6.01 -11.07 C 9.06 -11.07 11.54 -8.59 11.54 -5.53 L 11.54 5.53 C 11.54 8.59 9.06 11.07 6.01 11.07 Z M -11.54 -11.07}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-7.34027pt}{-3.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -10.16 -4.73)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 38.74 -22.14 L 27.67 -22.14 C 24.62 -22.14 22.14 -24.62 22.14 -27.67 L 22.14 -38.74 C 22.14 -41.8 24.62 -44.28 27.67 -44.28 L 38.74 -44.28 C 41.8 -44.28 44.28 -41.8 44.28 -38.74 L 44.28 -27.67 C 44.28 -24.62 41.8 -22.14 38.74 -22.14 Z M 22.14 -44.28}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{17.49307pt}{-27.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 24.21 -37.94)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}&\vbox{\hbox{$\hbox to64.59pt{\vbox to64.63pt{\pgfpicture\makeatletter\hbox{\hskip 26.26787pt\lower-34.22777pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-25.26787pt}{-31.28334pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -34.96 -43.29)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{{}}{}{{}}{}{ {}{}{}} {}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=2.20001pt} \lx@inpgf@ignorespaces{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -10.97 -28.99}{fill:none} \lxSVG@begingroup@{_scopebegin=1} {\lxSVG@setlinewidth{\pgfinnerlinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lxSVG@begingroup@{stroke=#FFFFFF} \lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -10.97 -28.99}{fill:none} }\lxSVG@closescope {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.35406}{-0.93523}{0.93523}{-0.35406}{-7.93071pt}{-20.94783pt}\lxSVG@begingroup@{transform=matrix(-0.35406 -0.93523 0.93523 -0.35406 -10.97 -28.99)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 4.18 0 L -2.51 3.34 L 0 0 L -2.51 -3.34}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\lxSVG@closescope \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} {}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{\lx@inpgf@ignorespaces}{{}}{}{{}}{} {}{}{{}}{{}}{{}}{}{{}}{}{}{} {}{}{}{}{{{}{}}} {}{} {}{}{{}} {}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 8.89 -14.82 C 10.86 -18.1 14.05 -23.41 16.01 -26.69 C 21.17 -35.28 31.13 -33.21 31.13 -22.49 C 31.13 -18.66 31.13 -12.47 31.13 -8.65 L 31.13 24.21 C 31.13 28.04 28.04 31.13 24.21 31.13 L 6.92 31.13 C 3.1 31.13 0 28.04 0 24.21 L 0 27.67 C 0 23.85 0 17.66 0 13.84 L 0 0}{fill:none} \lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{23.5pt}{-3.45032pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 32.52 -4.77)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 6.01 11.07 L -6.01 11.07 C -9.06 11.07 -11.54 8.59 -11.54 5.53 L -11.54 -5.53 C -11.54 -8.59 -9.06 -11.07 -6.01 -11.07 L 6.01 -11.07 C 9.06 -11.07 11.54 -8.59 11.54 -5.53 L 11.54 5.53 C 11.54 8.59 9.06 11.07 6.01 11.07 Z M -11.54 -11.07}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-7.34027pt}{-3.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -10.16 -4.73)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 41.51 L 0 14.67}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{10.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 14.67)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}&\vbox{\hbox{$\hbox to54.88pt{\vbox to64.87pt{\pgfpicture\makeatletter\hbox{\hskip 27.4417pt\lower-34.47221pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-26.4417pt}{-33.47221pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -36.59 -46.32)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{2.35841pt}{-33.47221pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 3.26 -46.32)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{{}}{}{{}}{}{ {}{}{}} {}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -18.05 -29.49}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.52203}{-0.85294}{0.85294}{-0.52203}{-13.0428pt}{-21.31021pt}\lxSVG@begingroup@{transform=matrix(-0.52203 -0.85294 0.85294 -0.52203 -18.05 -29.49)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{{}}{}{ {}{}{}} {}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 18.05 -29.49}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.52203}{-0.85294}{0.85294}{0.52203}{13.0428pt}{-21.31021pt}\lxSVG@begingroup@{transform=matrix(0.52203 -0.85294 0.85294 0.52203 18.05 -29.49)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 15.22 12.45 L -15.22 12.45 C -18.28 12.45 -20.76 9.98 -20.76 6.92 L -20.76 -6.92 C -20.76 -9.98 -18.28 -12.45 -15.22 -12.45 L 15.22 -12.45 C 18.28 -12.45 20.76 -9.98 20.76 -6.92 L 20.76 6.92 C 20.76 9.98 18.28 12.45 15.22 12.45 Z M -20.76 -12.45}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{0.0pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 0 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-12.1096pt}{-5.3pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -16.76 -7.33)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 41.51 L 0 16.05}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{11.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 16.05)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}\end{array}Figure 1: Typing rules for ground terms, with illustrating diagrams. The double arrows represent multiple branches. In the second rule, the types for {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} divide into overlapping parts {\vphantom{)}\color[rgb]{0,0,0.8}p_{J}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}r\!{}_{J}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, and non-overlapping parts {\vphantom{)}\color[rgb]{0,0,0.8}p_{I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}r\!{}_{K}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, where , , and are pairwise disjoint sets of choices.
In Section 6 we will return to ground terms and prove a Kleene theorem for them: ground terms are equivalent to finite Markov chains, given as probabilistic automata, where states correspond to choices. Then types compute the return distribution of an encoded Markov chain, while type inference is decidable, and terms typed with total distributions are positive AST.
The Probabilistic FMC
The FMC combines the control constructs with the -calculus via the Krivine abstract machine (KAM) [30], which evaluates terms in the context of an argument stack: application pushes and continues as ; abstraction pops (say) and continues as . This gives a canonical interpretation to the (call–by–name) -calculus in terms of stateful and sequential computation, where the stack is the state and computation proceeds sequentially via pop- and push-actions. Together with the control constructs, the FMC then features branching and iterating computation that inputs and outputs a stack.
Emphasizing this perspective, the FMC uses {\vphantom{(}\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for application and {\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for abstraction . With the control constructs and generator as above, the probabilistic FMC is as follows.
{\vphantom{(}\color[rgb]{0.8,0,0}M{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}~{\vphantom{(}\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}Example 6.
Consider the following example term.
{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}x~\,{;}\,~\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\langle y\rangle.\,\color[rgb]{0.8,0,0}{\star}~\,{;}\,~\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\langle y\rangle.\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}It takes a (fair or unfair) coin from the stack as {\vphantom{(}\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, such as our probability running example term, and tosses it. On heads, it deletes the top element on the stack; on tails, it duplicates it. Both branches return with the default choice {\vphantom{(}\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} (“skip”).
Remark 7.
The notion of sequencing in the FMC is fundamentally the same as that of Moggi’s computational metalanguage [34] and Levy’s call–by–push–value [32]:
M\mathbin{\hbox to7.7pt{\vbox to4.7pt{\pgfpicture\makeatletter\hbox{\hskip 0.34999pt\lower-2.34999pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces {}{{}}{} {}{} {}{}{}{{}}{} {}{} {}{}{}{{}}{} {}{}{}{{}}{} {}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@roundcap\lxSVG@begingroup@{stroke-linecap=round} \lx@inpgf@ignorespaces\lxSVG@roundjoin\lxSVG@begingroup@{stroke-linejoin=round} \lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.7pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 -2.77 L 2.77 0 L 0 2.77 M 2.77 -2.77 L 5.53 0 L 2.77 2.77 M 6.23 -1.38 L 9.69 -1.38 M 6.23 1.38 L 9.69 1.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}N~=~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The difference is that the latter return a single value, while the FMC returns the whole stack: \mathsf{return}~M~=~{\vphantom{(}\color[rgb]{0.8,0,0}[M].\,\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. This notion of sequencing further allows the encoding of call–by–value behaviour, both in a deterministic and probabilistic setting; see [25], respectively [24].
For the full calculus, the distribution types of ground terms are extended with types for the input stack and for the return stack of each branch. Types (or computation types) {\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} and stack types {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} are given below; the latter are vectors giving a type for each term, and the former an implication from an input stack type {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} to a formal sum of triples {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}} of an output stack type {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, a probability , and a choice , where the restriction to {\vphantom{)}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}} forms a (sub-)distribution.
\begin{array}[]{l@{\qquad}r@{}l}\text{\emph{Types:}}&{\vphantom{)}\color[rgb]{0,0,0.8}\sigma{\color[rgb]{0,0,0},}~\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}&{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\overline{\tau}{}_{1}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\cdots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\tau}{}_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\\[5.0pt] \text{\emph{Stack types:}}&{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}&{\vphantom{)}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}\tau_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\end{array}\qquad\vbox{\hbox{$\hbox to82.26pt{\vbox to69.14pt{\pgfpicture\makeatletter\hbox{\hskip 40.41183pt\lower-35.29762pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces \par{}{{\lx@inpgf@ignorespaces}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{}}{}{}} \lxSVG@closescope }}} \par{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-4.44446pt}{27.16112pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -6.15 37.58)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-39.41183pt}{-32.29762pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -54.53 -44.69)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{7.15236pt}{-32.29762pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 9.9 -44.69)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.75pt}{-17.5pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.19 -24.21)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par{{}}{}{{}}{}{ {}{}{}} {}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L -30.65 -30.27}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.7115}{-0.70268}{0.70268}{-0.7115}{-22.15013pt}{-21.87544pt}\lxSVG@begingroup@{transform=matrix(-0.7115 -0.70268 0.70268 -0.7115 -30.65 -30.27)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{{}}{}{ {}{}{}} {}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 0 L 30.65 -30.27}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.7115}{-0.70268}{0.70268}{0.7115}{22.15013pt}{-21.87544pt}\lxSVG@begingroup@{transform=matrix(0.7115 -0.70268 0.70268 0.7115 30.65 -30.27)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \par{\lx@inpgf@ignorespaces}{{}}{{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}}{}{}{}{}{} {\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#FF0000} \lxSVG@begingroup@{fill=#FFE6E6} {{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\lxSVG@fillstroke\lxSVG@drawpath@unclipped{M 6.92 12.45 L -6.92 12.45 C -9.98 12.45 -12.45 9.98 -12.45 6.92 L -12.45 -6.92 C -12.45 -9.98 -9.98 -12.45 -6.92 -12.45 L 6.92 -12.45 C 9.98 -12.45 12.45 -9.98 12.45 -6.92 L 12.45 6.92 C 12.45 9.98 9.98 12.45 6.92 12.45 Z M -12.45 -12.45}{} \lx@inpgf@ignorespaces \lxSVG@closescope }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-7.34027pt}{-3.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -10.16 -4.73)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 34.82 L 0 16.05}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{11.59995pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 16.05)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}Since stacks are last-in-first-out, identity terms are of the form {\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}\langle y\rangle.\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}[x].\,\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, reversing the order of variables (and returning the default choice ). Type vectors follow the order of terms, implicitly reversing on the left of an implication, so that identity terms have type {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}; for the given example, {\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}\langle y\rangle.\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}[x].\,\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\sigma\,\tau\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\tau\,\sigma\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}. Types for ground terms as distributions abbreviate computation types with empty type vectors, written {\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0}}.
{\vphantom{)}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\cdots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\quad=\quad{\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\cdots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}Example 8.
In the sequential setting, with a single branch , composition of two terms {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p\star\color[rgb]{0,0,0}} and {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}q\star\color[rgb]{0,0,0}} multiplies their probabilities, {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}(pq)\star\color[rgb]{0,0,0}}.
Example 9.
The term of Example 6 cannot be typed because it features two branches with the same choice {\vphantom{(}\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} but different output stacks (one empty, the other holding two copies of the input {\vphantom{(}\color[rgb]{0.8,0,0}y\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). Adapting it to use distinct choices and instead, and choosing the type for the first input to match our running example, we get the type below (for any type {\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} for {\vphantom{(}\color[rgb]{0.8,0,0}y\color[rgb]{0,0,0}\color[rgb]{0,0,0}}).
{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}x~\,{;}\,~\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\langle y\rangle.\,\color[rgb]{0.8,0,0}i~\,{;}\,~\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\langle y\rangle.\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}j~\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}~(\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{2}{3}}\color[rgb]{0,0,0.8}\mathsf{h}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}\mathsf{t})\,\tau~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{2}{3}}\color[rgb]{0,0,0.8}i~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\,\tau\,\tau\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}j\color[rgb]{0,0,0}}The term expects two inputs: the unfair coin and some argument {\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} for the abstractions {\vphantom{(}\color[rgb]{0.8,0,0}\langle y\rangle\color[rgb]{0,0,0}\color[rgb]{0,0,0}} of each branch (note that since both branches pop from the same input stack, both variables {\vphantom{(}\color[rgb]{0.8,0,0}y\color[rgb]{0,0,0}\color[rgb]{0,0,0}} get the same type). It then produces two possible outputs: with probability the branch with the empty stack, and with probability the branch with two copies of {\vphantom{(}\color[rgb]{0.8,0,0}y\color[rgb]{0,0,0}\color[rgb]{0,0,0}} on the stack.
As the example demonstrates, the type system is quite restrictive: probabilities are fixed, even on inputs. However, the potential of lifting these restrictions is clear, for example by introducing polymorphism (variables) for probabilities, or generalising to dependent types. The purpose of the present paper is not just to establish the basic system of probabilistic simple types for AST, but to offer a clear way forward in probabilistic type systems.
Remark 10.
Our distribution types {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{1}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\cdots{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\tau}{}_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} are a fundamentally different construct than a probability monad [21]: the former features probability distributions at the type level, the latter at the term level. Since sampling is a basic construct, terms in the probabilistic FMC are inherently probabilistic in the way of a probability monad; for example, assuming a base type {\vphantom{)}\color[rgb]{0,0,0.8}\mathbb{Z}\color[rgb]{0,0,0}} of integers, the following term returns or with equal probability, despite having only a trivial probability at the type level.
{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a~\,{;}\,~\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}[2].\,\color[rgb]{0.8,0,0}{\star}~\,{;}\,~\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}[3].\,\color[rgb]{0.8,0,0}{\star}~\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}~\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\mathbb{Z}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}Remark 11.
The Functional Machine Calculus as presented in [25, 26] allows not just one, but multiple argument stacks, which model various state-like effects: mutable store (as a stack of depth one), input/output (as dedicated input-only and output-only stacks), and probabilistic choice (as a probabilistically-generated input stack); see op.cit. for a detailed exposition. The probabilistic FMC is a proper fragment with two stacks: one for the -calculus, and a probabilistic one, viewing the generator construct {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} as popping a value from this stack as . The same technique, sampling from a random stream on the Krivine machine, is used by Ehrhard [17].
After exploring related work in the next section, we will define the calculus (Section 3) and the type system (Section 4), and give our main result, Theorem 28: the probability given by the type of a term is a lower bound on the probability of termination, which implies almost-sure termination if that probability is one (Section 5). The final sections explore the expressiveness of the calculus, demonstrating that ground terms are equivalent to finite Markov chains and thus positive AST (Section 6), and that the full calculus is null AST: while the probability of termination is one, expected runtime is infinite (Section 7).
2 Related Work
Our type system is a conservative extension of our previous systems in [1] and [24] (see Remark 24). While those systems already feature higher-order functions, they do not account for either iteration or recursion.
The literature on semantics and termination properties of probabilistic computation is extensive and includes a wide range of techniques. We mention semantic domains [9, 29, 40], bisimulations and trace semantics [22, 35, 36], probabilistic automata [18, 19], probabilistic coherence spaces [8, 14, 16], program logics [20, 33], and separation logic [4, 27].
Type systems for probabilistic calculi are numerous and diverse as well. We distinguish two kinds. Firstly, there are deterministic or monadic types, which do not feature explicit probabilities at the type level (see Remark 10). These tend to play a supporting role, with probabilistic properties such as AST then guaranteed by construction. Examples are [39], [37] which features coproduct-typed (but not probabilistic) iteration, and [7] which extends Gödel’s with probabilistic generators and iterators that are inherently AST.
Secondly, there are several formal methodologies enforcing AST or PAST in probabilistic -calculi with recursion. These are generally highly expressive, but complex, using involved techniques such as refinement types [3, 31], size types [11], non well founded type systems [13, 15], intersection types [5, 10], guarded refinements [23], or CPS transformations [2]. Such complexity is largely unavoidable: unlike in the deterministic case, probabilistic termination is undecidable even for higher-order programs operating over finite datatypes [28], as exemplified by probabilistic variants of the -calculus and higher-order recursion schemes. Expressiveness thus comes at the expense of simplicity; here, we prioritize simplicity, obtaining a system that constitutes a minimal extension of simple types.
Our approach sets itself apart in two ways. Firstly, from the FMC we inherit the combination of higher-order functions with iteration, rather than recursion (we comment on typing recursion in our system in Appendix A). Secondly, as a direct probabilistic generalisation of coproducts, our probabilistic types are a notion of simple types. We are thus taking a “bottom-up” approach, consciously trading expressiveness for simplicity and extensibility: our simple types are highly restricted in the algorithms they may express, but they arise naturally from typed iteration, and we expect they will extend to more powerful type systems such as polymorphic types, intersection types, and dependent types along standard lines.
It would be interesting to consider continuation-passing translations from our calculus into one with recursion. Generally, these require higher types; for instance, the simply-typed FMC, when translated this way into -calculus, requires System F types. With such a translation for the probabilistic FMC, it would then become possible to compare the expressive power of our system against the approaches mentioned above. This is however out of scope for the present publication.
3 The Probabilistic FMC
For the formal development, we first recall the terms of the probabilistic FMC from the introduction, and then give its operational semantics. The FMC further features a confluent reduction relation [26], which we omit here.
Definition 12.
The terms of the PFMC are given by the following grammar.
{\vphantom{(}\color[rgb]{0.8,0,0}M{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}~{\vphantom{(}\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The constructs are: a variable {\vphantom{(}\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}\color[rgb]{0,0,0}}; a pop {\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} that binds {\vphantom{(}\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}\color[rgb]{0,0,0}} in {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}; a push {\vphantom{(}\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}; a choice {\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}; a case {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}; a loop {\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}; and a generator {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} which binds the variable {\vphantom{(}\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}} in {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
The small-step semantics is given by the Krivine machine [30], which evaluates the -calculus via a single argument stack, with the following extensions. The generator {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} will pop from a stack of boolean values, called a trace, which we will model as being probabilistically generated. Branching computation is implemented via a continuation stack of conditional continuations {\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, where {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} pushes the continuation {\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, and a choice term {\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} discards non-matching continuations {\vphantom{(}\color[rgb]{0.8,0,0}j\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} where until it pops a matching {\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. The machine terminates successfully when it reaches a choice {\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and the continuation stack is empty, at which point it returns the argument stack.
Definition 13.
The functional abstract machine is given by the following data. Traces , argument stacks , and continuation stacks are as follows.
r,s,t~\mathbin{{:}{:}{=}}~\varepsilon~\mid~\bot\,t~\mid~\top\,t\qquad\quad R,S,T~\mathbin{{:}{:}{=}}~\varepsilon~\mid~S\,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\quad K,L~\mathbin{{:}{:}{=}}~\varepsilon~\mid~({\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}})\,KThe states of the machine are four-tuples (t,S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}},K). Its steps or transitions are given in Figure 2. A run is a sequence of steps, written as below. A run is successful if it terminates in a final state (\varepsilon,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}},\varepsilon) with a choice term {\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and empty trace and continuation stack.
\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}s&S&{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr\hline\cr\rule[-5.0pt]{0.0pt}{15.0pt}t&T&{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&L\end{array}Appendix B demonstrates a successful run of the machine for our running example term.
\begin{array}[]{lccr}\mathsf{push}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S&{\vphantom{(}\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr t&S\,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\end{array}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S&{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&({\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}})\,K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\end{array}&\mathsf{select}\\ \\ \mathsf{pop}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S\,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}\{N/\color[rgb]{0.8,0,0}x\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\end{array}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S&{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&({\vphantom{(}\color[rgb]{0.8,0,0}j\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}})\,K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\end{array}&(i\neq j)\quad\mathsf{reject}\\ \\ \mathsf{sequence}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S&{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&({\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}})\,K\end{array}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S&{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&({\vphantom{(}\color[rgb]{0.8,0,0}i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}})\,K\end{array}&\mathsf{iterate}\\ \\ \mathsf{sample}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}\top\,t&S&{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}\{\top/\color[rgb]{0.8,0,0}a\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\end{array}&\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}\bot\,t&S&{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\\ \hline\cr t&S&{\vphantom{(}\color[rgb]{0.8,0,0}\{\bot/\color[rgb]{0.8,0,0}a\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&K\end{array}\end{array}Figure 2: The Abstract Machine
In addition to the machine we give a big-step operational semantics, in the form of an inductively defined evaluation relation that describes the successful runs of the machine directly. Where the machine implements branching computation via the contination stack, the big-step semantics gives a more abstract view as conditional sequential composition.
Definition 14.
The evaluation relation has statements t,S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and is defined inductively by the following rules.
\begin{array}[]{ccc}\varepsilon,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&rs,R,{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\lx@proof@logical@and r,R,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}s,S,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&r,R,{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\lx@proof@logical@and r,R,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}(i\neq j)\\ \\ s,S,{\vphantom{(}\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}s,S\,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&rs,R,{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\lx@proof@logical@and r,R,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}s,S,{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&r,R,{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\lx@proof@logical@and r,R,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}(i\neq j)\\ \\ t,S\,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\{N/\color[rgb]{0.8,0,0}x\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\bot\,t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\{\bot/\color[rgb]{0.8,0,0}a\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\top\,t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\{\top/\color[rgb]{0.8,0,0}a\}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\end{array}The machine and the big-step evaluation relation can be put in correspondence as follows.
Proposition 15 ([26, Proposition 5.4]).
Evaluation characterizes successful machine termination:
t,S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\quad\iff\quad\begin{array}[]{@{(~}r@{~,~}l@{~,~}r@{~,~}r@{~)}}t&S&{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\varepsilon\\ \hline\cr\hline\cr\rule[-5.0pt]{0.0pt}{15.0pt}\varepsilon&T&{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\varepsilon\end{array}The calculus as defined above is deterministic: it externalises the probabilistic component of evaluation to the input trace . To give a probabilistic semantics, we will define an evaluation relation S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} which takes a stack and a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} to a certain kind of distribution , a return family. This is a set of traces with for each an associated pair of a return stack and choice such that t,S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} (effectively, we are only shifting where the trace is considered as a parameter, on the machine versus in the return distribution). Since the probability of a trace is where is the length of , a return family readily gives rise to a probability (sub-)distribution.
A return family collects evaluation results for distinct probabilistic choices, not further evaluation along the same trace: if it has , it should not have any prefix of , nor any trace extending . A return family will therefore be defined over a frontier : a (possibly infinite) set of traces such that no element in is a prefix of another. The probability of a frontier is the sum probability of its traces; observe that by definition, .
\begin{array}[]{l@{}l}\mathsf{pr}(t)&~=~(\frac{1}{2})^{|t|}\quad\text{where $|t|$ is the length of $t$}\\[5.0pt] \mathsf{pr}(F)&~=~\sum_{t\in F}\mathsf{pr}(t)\end{array}Example 16.
The set of traces is a frontier with probability .
A return family then collects a return stack and choice, as a pair , for every trace in a frontier , as below. The frontier over which is defined is written , and the probability of a return family is that of its frontier, .
Definition 17.
A probabilistic evaluation S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} of a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and stack to a return family is given by the evaluation of {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}S}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} with each , as follows.
S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\{(T_{t},i_{t})_{t}\}_{t\in F}\iff\forall t\in F.~(t,S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T_{t},{\vphantom{(}\color[rgb]{0.8,0,0}i_{t}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}})Example 18.
For our running example term we have the evaluation \varepsilon,{\vphantom{(}\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} for the following return family over the frontier of Example 16.
Observe that evaluation is closed under inclusion: if R,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} and then R,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{S}. An evaluation S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} gives a lower bound of for the probability of termination of a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} in the context of a stack .
Definition 19.
The probability of termination of a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} in the context of a stack is the largest probability for any such that S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}.
To work with return families we use the following notation. The sum of two return families is defined if they have disjoint frontiers, , and is the union of their underlying sets . Likewise, inclusion between families is inclusion as sets. We define the following notions below. On the left, and add as a prefix to every trace in , respectively in , and prefixes every stack in with . On the right, restricts a family to the choice while excludes the choice , and collects the stacks in as a set.
\begin{array}[]{r@{}l@{\qquad\qquad}r@{}l}sF&{}~=~\{\,st\mid t\in F\,\}&\mathcal{S}\kern 1.0pt{|}\kern 1.0pti&{}~=~\{\,(S,j)_{t}\in\mathcal{S}\mid j=i\,\}\\[5.0pt] s\mathcal{S}&{}~=~\{\,(S,i)_{st}\mid(S,i)_{t}\in\mathcal{S}\,\}&\mathcal{S}\kern 1.0pt{\setminus}\kern 1.0pti&{}~=~\{\,(S,j)_{t}\in\mathcal{S}\mid j\neq i\,\}\\[5.0pt] S\,\mathcal{T}&{}~=~\{\,(S\,T,i)_{t}\mid(T,i)_{t}\in\mathcal{T}\,\}&\mathsf{stk}(\mathcal{S})&{}~=~\{\,S\mid(S,i)_{t}\in\mathcal{S}\,\}\end{array}We will freely use the following equations.
4 Types
Types for the FMC describe the input/output behaviour of the machine. In the deterministic case, a type {\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} is of the form below left, where the type vector {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\sigma_{1}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}\sigma_{k}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} types the input stack on the machine, and the type vectors {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{m}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} type the return stack for each choice . The type indicates that given an input stack S:{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} the machine will return some choice and stack T:{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{m}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}. For the probabilistic case we replace the formal sum of the return type with a probability distribution, adding a probability for each summand as below right.
{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\overline{\tau}{}_{1}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}{}_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\qquad\qquad\qquad{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\overline{\tau}{}_{1}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\tau}{}_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}We will formalize the return type as a distribution type, a family in a finite set of choice labels, with a type vector {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and a probability for each such that the sum probability over all is at most one. It is thus a combination of a deterministic sum type (the family of type vectors {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and a probability (sub-)distribution over (the family of probabilities ).
Definition 20.
Types, stack types, and distribution types are given as follows.
\begin{array}[]{l@{\qquad}r@{~\coloneqq~}l}\text{types}&{\vphantom{)}\color[rgb]{0,0,0.8}\sigma{\color[rgb]{0,0,0},}~\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}&{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\\ \text{stack types}&{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}&{\vphantom{)}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}\tau_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\\ \text{distribution types}&{\vphantom{)}\color[rgb]{0,0,0.8}\gamma{\color[rgb]{0,0,0},}~\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}&{\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}{}_{i}\color[rgb]{0,0,0.8},p_{i}\color[rgb]{0,0,0.8})_{i}\color[rgb]{0,0,0.8}\}_{i\in I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\quad\text{where}\quad\sum_{i\in I}p_{i}\leq 1\end{array}Recall from the introduction that stack types on the left of an implication {\vphantom{)}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} are implicitly reversed. Distribution types may implicitly expand with zero-probability summands when required by the typing rules (we will highlight the relevant cases in the discussion of the typing rules).
Remark 21.
Our types are a conservative extension of simple types for the -calculus, which embed as follows (see also [25, 26, 24]). The base type becomes {\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}, the type of the default choice {\vphantom{(}\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. The type arrow becomes the operation of adding one further input type {\vphantom{)}\color[rgb]{0,0,0.8}\rho\color[rgb]{0,0,0}} to the inputs of ; i.e. letting \tau={\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} then {\vphantom{)}\color[rgb]{0,0,0.8}\rho\to(\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}. Together, we may view the embedding also as below.
\vphantom{)}\tau_{1}\to\dots\to\tau_{n}\to o\color[rgb]{0,0,0}\quad=\quad{\vphantom{)}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}\dots\tau_{n}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}We introduce the following notation to work with distribution types. The basis \lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor of a distribution type {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} is the set of choices \lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor=I over which it is defined. To recover the informal notation of the introduction, we define the following: the singleton distribution type {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}\color[rgb]{0,0,0.8},p)_{i}\color[rgb]{0,0,0.8}\}\color[rgb]{0,0,0}}, the empty distribution type {\vphantom{)}\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}} with \lfloor{\vphantom{)}\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}}\rfloor=\varnothing, and the (disjoint) sum {\vphantom{)}\color[rgb]{0,0,0.8}\gamma{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\gamma\cup\delta\color[rgb]{0,0,0}} of two distribution types {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} with no choice in common, \lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor\cap\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor=\varnothing. The probability \mathsf{pr}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}) of a distribution type is the sum over its probabilities . Below left, the notation {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\,\delta\color[rgb]{0,0,0}} prefixes the type vector {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} to each {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, and {\vphantom{)}\color[rgb]{0,0,0.8}q\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} multiplies each probability in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} by the probability . Below right, {\vphantom{)}\color[rgb]{0,0,0.8}\delta\kern 1.0pt{|}\kern 1.0pt\color[rgb]{0,0,0.8}I\color[rgb]{0,0,0}} restricts {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} to the choices in , and {\vphantom{)}\color[rgb]{0,0,0.8}\delta\kern 1.0pt{\setminus}\kern 1.0ptI\color[rgb]{0,0,0}} removes them.
\begin{array}[]{r@{}l@{\qquad\qquad}r@{}l}{\vphantom{)}\color[rgb]{0,0,0.8}q\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}&{}~=~{\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}\color[rgb]{0,0,0.8},qp)_{i}\color[rgb]{0,0,0.8}\mid(\overline{\tau}\color[rgb]{0,0,0.8},p)_{i}\color[rgb]{0,0,0.8}\in\delta\,\}\color[rgb]{0,0,0}}&{\vphantom{)}\color[rgb]{0,0,0.8}\delta\kern 1.0pt{|}\kern 1.0pt\color[rgb]{0,0,0.8}I\color[rgb]{0,0,0}}&{}~=~{\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p)_{i}\color[rgb]{0,0,0.8}\in\delta\mid i\in I\,\}\color[rgb]{0,0,0}}\\[5.0pt] {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\,\delta\color[rgb]{0,0,0}}&{}~=~{\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\sigma}\color[rgb]{0,0,0.8}\,\overline{\tau}\color[rgb]{0,0,0.8},p)_{i}\color[rgb]{0,0,0.8}\mid(\overline{\tau}\color[rgb]{0,0,0.8},p)_{i}\color[rgb]{0,0,0.8}\in\delta\,\}\color[rgb]{0,0,0}}&{\vphantom{)}\color[rgb]{0,0,0.8}\delta\kern 1.0pt{\setminus}\kern 1.0ptI\color[rgb]{0,0,0}}&{}~=~{\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p)_{i}\color[rgb]{0,0,0.8}\in\delta\mid i\notin I\,\}\color[rgb]{0,0,0}}\end{array}Finally, the merger {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} of two distribution types is defined if for every i\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor\cap\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor they have the same type vector {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, and is as follows.
{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}~=~{\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}\color[rgb]{0,0,0.8},p\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}q)_{i}\color[rgb]{0,0,0.8}\mid i\in\lfloor\gamma\rfloor\cup\lfloor\delta\rfloor~,\color[rgb]{0,0,0.8}~(\overline{\tau}\color[rgb]{0,0,0.8},p)_{i}\color[rgb]{0,0,0.8}\in\gamma~,\color[rgb]{0,0,0.8}~(\overline{\tau}\color[rgb]{0,0,0.8},q)_{i}\color[rgb]{0,0,0.8}\in\delta\}~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\gamma\kern 1.0pt{\setminus}\kern 1.0pt\lfloor\delta\rfloor~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\delta\kern 1.0pt{\setminus}\kern 1.0pt\lfloor\gamma\rfloor\color[rgb]{0,0,0}}Definition 22.
The typed PFMC (PFMC{}^{\,\mathchoice{\mathbin{\raise 0.60275pt\hbox{\scriptstyle\Rightarrow\oplus}}}{\mathbin{\raise 0.60275pt\hbox{\scriptstyle\Rightarrow\oplus}}}{\mathbin{\raise 0.36165pt\hbox{\scriptscriptstyle\Rightarrow\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow\oplus}}}}) is given by the typing rules in Figure 3, where a context {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}x_{1}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}{\color[rgb]{0,0,0},\dots,}~\color[rgb]{0.8,0,0}x_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} is a finite function from variables to types written as a sequence, and typing judgment {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} assigns a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} the type {\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} in the context {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
\begin{array}[]{l@{\qquad}c@{\qquad}c@{\qquad}r}\mathsf{variable}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}$}}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}}$}}&\mathsf{zero}\\ \\ \mathsf{pop}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}$}}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}$}}&\mathsf{push}\\ \\ \mathsf{choice}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}}$}}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}(p\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}$}}&\mathsf{sequence}\\ \\ \mathsf{expand}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\,\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\,\delta\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}$}}&\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-p}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}(p\neq 1)$}}&\mathsf{iterate}\\ \\ \mathsf{sample}&\lx@intercol\hfil\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}(\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma)\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}(\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\top~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\bot~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}$}}\hfil\lx@intercol\end{array}Figure 3: The typed probabilistic FMC
We will first discuss the typing rules in detail, skipping the variable rule as it is standard.
- The zero rule allows to type any term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} with a type {\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}}, returning the empty sub-distribution, which has sum probability zero. This is necessary to type terms such as {\vphantom{(}\color[rgb]{0.8,0,0}{\star}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\Omega\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, which returns immediately or diverges with equal probability, where we type {\vphantom{(}\color[rgb]{0.8,0,0}\Omega\color[rgb]{0,0,0}\color[rgb]{0,0,0}} with the zero rule.
- The pop and push rules add, respectively remove, the first stack input. With the embedding of the type arrow {\vphantom{)}\color[rgb]{0,0,0.8}\to\color[rgb]{0,0,0}} of the simply-typed -calculus by {\vphantom{)}\color[rgb]{0,0,0.8}\rho\to(\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, these are the standard rules for abstraction and application.
- The choice rule expresses that {\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} immediately returns for the empty stack. Using the expand rule it may be typed {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}}, reflecting that it returns any input stack unchanged.
- The sequence rule reflects that {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} first evaluates {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, with input {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and output either {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} on branch with probability , or a different branch in {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}. In the former case, then {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is evaluated, with input {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and output {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}. The overall term inputs {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and outputs {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, where the merge {\vphantom{)}\color[rgb]{0,0,0.8}\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} requires that whenever {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} have a common branch , the associated stack types are the same. For the special case where , i.e. {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} chooses with probability zero, {\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} is the empty sub-distribution, and the rule becomes as follows. {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}(i\notin\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor)
- The expand rule implements a key principle of stack calculi, stack expansion: if {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} evaluates successfully with a stack {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, then if there are further inputs {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} on the stack, these will be returned unchanged. Recall that input type vectors are reversed, so that in the return type {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\,\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\,\delta\color[rgb]{0,0,0}} the stack {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} is below {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and below each stack in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}.
- The iterate rule requires that the input types {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} of {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} match the output types on branch exactly, and that the probability of choosing is less than one. As with sequence there is a special case where , where the rule becomes as follows. {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}(i\notin\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor)
- The sample rule reflects that {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} behaves like an abstraction which may receive one of two values, {\vphantom{(}\color[rgb]{0.8,0,0}\top\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\top\color[rgb]{0,0,0}} or {\vphantom{(}\color[rgb]{0.8,0,0}\bot\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\bot\color[rgb]{0,0,0}}, which it binds to the variable {\vphantom{(}\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. The term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is typed separately for each possibility, with the same input stack {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}. The return type {\vphantom{)}\color[rgb]{0,0,0.8}(\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma)\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}(\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}} again requires that {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} have the same stack type for any choice they share.
Example 23.
The probabilistic sum {\vphantom{(}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptN\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is typed as follows.
{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma~\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}~\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\top~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\top~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\top~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\top\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\bot~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\bot\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}Using this as an admissible typing rule, our running example is typed as follows.
{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{2}{3}}\color[rgb]{0,0,0.8}\mathsf{h}~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}\mathsf{t}\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i)\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\mathsf{h}~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\mathsf{t}~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\mathsf{h}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}1\mathsf{h}\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\mathsf{t}~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\mathsf{t}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}1\mathsf{t}\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon~\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}~\varepsilon\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}}Remark 24.
The type system is a conservative extension of those of our previous work on probabilistic termination in [1] and [24]. Using the notation of the latter, these feature probabilistic simple types as simple types with the rationals between and as the set of base types, as below left. They embed as below right, where is again the single available choice label.
\vphantom{)}\sigma{\color[rgb]{0,0,0},}~\tau\color[rgb]{0,0,0}~\mathbin{{:}{:}{=}}~p~\mid~\vphantom{)}\sigma\to\tau\color[rgb]{0,0,0}\qquad\qquad\vphantom{)}\tau_{1}\to\dots\to\tau_{n}\to p\color[rgb]{0,0,0}\quad=\quad{\vphantom{)}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}\dots\tau_{n}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}p\star\color[rgb]{0,0,0}}The sequential probabilistic types of [24] are the restriction of the present system to the default choice .
\vphantom{)}\overline{\sigma}\color[rgb]{0,0,0}\overset{p}{\Rightarrow}\vphantom{)}\overline{\tau}\color[rgb]{0,0,0}\quad=\quad{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p\star\color[rgb]{0,0,0}}Remark 25.
An element {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}} of a distribution type gives a lower bound on the probability of terminating with branch . Since our types are a probabilistic form of simple types, which cannot type all normalizing -terms, the bound is necessarily not exact. Consider a term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} which is terminating but not typeable, for example {\vphantom{(}\color[rgb]{0.8,0,0}[\langle y\rangle.\,\color[rgb]{0.8,0,0}[y].\,\color[rgb]{0.8,0,0}{\star}].\,\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}[x].\,\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, a variant of that replaces the function with {\vphantom{(}\color[rgb]{0.8,0,0}{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. Then {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} terminates with probability , but can only be typed by the zero-rule as {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}}, giving a sum probability of zero. The zero-rule allows such terms to be combined with others, and express for instance that {\vphantom{(}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt{\star}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} terminates with probability at least . To obtain exact bounds, one would need a type system that can type all terminating -terms, such as intersection types.
5 Almost-Sure Termination
The intended meaning of the type system is that if {\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} (i.e. {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is closed and requires no inputs to run on the machine) then the probability of termination for {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is at least \mathsf{pr}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}). We will establish this using a reducibility argument in the style of Tait [38], called runnability as it uses the machine rather than reduction. The runnability predicate directly interprets the meaning of types: a runnable term of type {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, given a stack of runnable terms for the types in {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, will probabilistically evaluate to a runnable return family for the type {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, with the key property that \mathsf{pr}(\mathcal{T})\geq\mathsf{pr}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).
Definition 26.
The set \textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}) of runnable terms for a type {\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} is defined as the set of closed terms
\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}})=\{{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~\forall S\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}).~\exists\mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).~S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}~\}where the runnable sets for stack types {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and distribution types {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} are as follows.
\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}\tau_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}})=\{\varepsilon\,{\vphantom{(}\color[rgb]{0.8,0,0}M_{1}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\dots{\vphantom{(}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\mid{\vphantom{(}\color[rgb]{0.8,0,0}M_{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}})\} \textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}{}_{i}\color[rgb]{0,0,0.8},p_{i}\color[rgb]{0,0,0.8})_{i}\color[rgb]{0,0,0.8}\}_{i\in I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}})=\{\mathcal{T}\mid\forall i\in I.~\mathsf{stk}(\mathcal{T}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}})~\wedge~\mathsf{pr}(\mathcal{T}\kern 1.0pt{|}\kern 1.0pti)\geq p_{i}~\}To work with open terms, a substitution map is a finite function from variables to terms, applied to a term as {\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} which replaces every free variable in {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} that is in the domain of with the term {\vphantom{(}\color[rgb]{0.8,0,0}\mu(x)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. For a context \Gamma={\vphantom{(}\color[rgb]{0.8,0,0}x_{1}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau_{1}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}},\dots,{\vphantom{(}\color[rgb]{0.8,0,0}x_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} the set \textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}) is a set of substitution maps that assigns each a runnable term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), as follows.
\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}})~=~\{\mu\mid\forall{\vphantom{(}\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}\in\Gamma.~{\vphantom{(}\color[rgb]{0.8,0,0}\mu(x)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}})\}We are now ready to prove the runnability lemma, that typed terms are runnable.
Lemma 27.
If {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}) then {\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}).
Proof.
See Appendix D. ∎
The runnability lemma directly gives the main theorem of typed almost-sure termination.
Theorem 28.
If {\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} then {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} terminates with probability at least \mathsf{pr}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).
Proof.
Let {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\{(\overline{\tau}{}_{i}\color[rgb]{0,0,0.8},p_{i}\color[rgb]{0,0,0.8})_{i}\color[rgb]{0,0,0.8}\}_{i\in I}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}. By Lemma 27 we have \varepsilon,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} with \mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}), which means that for every , so that \mathsf{pr}(\mathcal{T})\geq\mathsf{pr}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}). ∎
6 Ground Terms and Finite Markov Chains
We have shown that the calculus introduced in this paper enjoys all the expected properties, in particular guaranteeing almost-sure termination. Several natural questions concerning the expressive power of the calculus remain open. Notably, it is of interest to investigate the behavior of the calculus under restrictions to low-order types, or when stronger termination properties than AST, such as positive almost-sure termination (PAST), can be proved. In this section we resume our discussion of ground terms from the introduction.
\text{\emph{Ground terms:}}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}M{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}~{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~\mid~{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}We will show the following properties: one, typing of ground terms is decidable; two, ground terms readily encode as finite Markov chains; and three, finite Markov chains may be encoded as ground terms. These then have the following consequences. The last two properties imply that ground terms are equivalent to finite Markov chains. Next, since finite Markov chains are PAST (if they are AST), also typed ground terms are PAST. Finally, combining the first and last property, for the encoding of a Markov chain as a ground term, type inference calculates the probability of terminating with each final state.
As in the introduction, we may restrict types for ground terms to sub-distributions over choice labels, and abbreviate them by omitting input and return types.
{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\quad\text{\emph{abbreviates}}\quad{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}i_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}i_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}Since ground terms are closed, the typing rules may further omit contexts. Thus restricted, we recover the typing rules from the introduction (with new notation).
{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}(p\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\gamma{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-p}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\delta{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}(p\neq 1)\qquad{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}Proposition 29.
Typing for ground terms is decidable.
Proof.
Immediate by induction on the term. ∎
We will define Markov chains as probabilistic automata, as follows. We write for the set of probability distributions over a set , and write a distribution over as .
Definition 30.
A Markov chain is given by a set of states , a starting state , a set of final states , and a stochastic transition function from non-final states to states.
The translation \llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis from ground terms to Markov chains will take {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} to a chain
\llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis~=~(S_{M},~s_{M},~F_{M},~\delta_{M})where internal states represent subformulas and final states represent choices not captured by a later case construct. We consider chains modulo renaming of internal states, and when combining the translations of two terms we assume their internal states to be disjoint, but final states may overlap. To connect two chains, we use the notation to rename a state, and the notation which replaces all transitions to a (final) state with transitions to .
\delta\{s/i\}(r)~=~\{~p(t\{s/i\})\mid pt\in\delta(r)~\}\qquad\qquad\begin{array}[]{r@{}l}i\{t/i\}&{}=t\\ s\{t/i\}&{}=s\quad(s\neq i)\end{array}The translation \llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}-\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis is then as follows.
\displaystyle\llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis \displaystyle=(\{s,i\},~s,~\{i\},~s\mapsto\{i\kern 1.0pt{\cdot}\kern 1.0pt1\}) \displaystyle\llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis \displaystyle=(S_{M}\kern 1.0pt{\setminus}\kern 1.0pt\{i\}\cup S_{N},~s_{M},~F_{M}\kern 1.0pt{\setminus}\kern 1.0pt\{i\}\cup F_{N},~\delta_{M}\{s_{N}/i\}\cup\delta_{N}) \displaystyle\llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis \displaystyle=(S_{M}\kern 1.0pt{\setminus}\kern 1.0pt\{i\},~s_{M},~F_{M}\kern 1.0pt{\setminus}\kern 1.0pt\{i\},~\delta_{M}\{s_{M}/i\}) \displaystyle\llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis \displaystyle=(\{s,\top,\bot\},~s,~\{\top,\bot\},~s\mapsto\{\textstyle{\frac{1}{2}}\top,\textstyle{\frac{1}{2}}\bot\})Example 31.
For our running example term {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} the translation is as follows.
\begin{array}[]{r@{~}l}{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=&{\vphantom{(}\color[rgb]{0.8,0,0}(\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\[8.0pt] \llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis~=&(~\{a,b,r,s,u,\mathsf{h},\mathsf{t}\}~,~r~,~\{\mathsf{h},\mathsf{t}\}~,\\[3.0pt] &~~a\mapsto\{\textstyle{\frac{1}{2}}r,\textstyle{\frac{1}{2}}b\}~~r\mapsto\{1\mathsf{h}\}\\[3.0pt] &~~b\mapsto\{\textstyle{\frac{1}{2}}s,\textstyle{\frac{1}{2}}u\}~~s\mapsto\{1\mathsf{t}\}\\[3.0pt] &~~u\mapsto\{1r\}~)\end{array}\qquad\qquad\vbox{\hbox{$\hbox to78.98pt{\vbox to94.06pt{\pgfpicture\makeatletter\hbox{\hskip 4.58333pt\lower-28.85715pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{17.35706pt}{45.84723pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 24.02 63.44)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{37.85417pt}{20.52779pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 52.38 28.4)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-2.39468pt}{21.84723pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -3.31 30.23)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{17.65625pt}{-2.15277pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 24.43 -2.98)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{57.13771pt}{-2.15277pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 79.06 -2.98)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-2.58333pt}{-3.47221pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -3.57 -4.8)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{18.19444pt}{-26.85715pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 25.18 -37.16)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \par\lxSVG@begingroup@{_scopebegin=1} \par{}{{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 27.67 89.66 L 27.67 75.76}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{20.0pt}{54.75272pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 27.67 75.76)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 22.89 60.67 L 7.09 41.72}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.64021}{-0.7682}{0.7682}{-0.64021}{5.12431pt}{30.15005pt}\lxSVG@begingroup@{transform=matrix(-0.64021 -0.7682 0.7682 -0.64021 7.09 41.72)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ }}{ } {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-0.11415pt}{36.43047pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -0.16 50.41)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 32.46 60.67 L 47.31 42.85}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.64018}{-0.76823}{0.76823}{0.64018}{34.18973pt}{30.97115pt}\lxSVG@begingroup@{transform=matrix(0.64018 -0.76823 0.76823 0.64018 47.31 42.85)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{}}{} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{32.89651pt}{36.92307pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 45.52 51.09)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 49.61 26.33 L 34.76 8.51}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.6402}{-0.7682}{0.7682}{-0.6402}{25.12428pt}{6.15005pt}\lxSVG@begingroup@{transform=matrix(-0.6402 -0.7682 0.7682 -0.6402 34.76 8.51)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ }}{ } {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{19.61182pt}{12.10182pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 27.14 16.75)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 61.08 26.33 L 75.93 8.51}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.6402}{-0.7682}{0.7682}{0.6402}{54.87572pt}{6.15005pt}\lxSVG@begingroup@{transform=matrix(0.6402 -0.7682 0.7682 0.6402 75.93 8.51)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{}}{} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{53.58252pt}{12.10182pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 74.14 16.75)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 27.46 L 0 11.17}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{8.07216pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 11.17)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces { {}{}{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 27.67 -5.75 L 27.67 -22.89}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{20.0pt}{-16.54291pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 27.67 -22.89)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \par{\lx@inpgf@ignorespaces}{ {}{}{}}{} {}{{{{{}}{ {}{}}{}{}{{}{}}}}}{{}}{}{} {}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 87.81 5.75 L 98.85 18.99 C 100.81 21.34 100.81 25.15 98.85 27.5 L 50.59 85.41 C 48.63 87.76 45.46 87.76 43.5 85.41 L 34.76 74.93}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.64021}{-0.76819}{0.76819}{-0.64021}{25.12425pt}{54.15002pt}\lxSVG@begingroup@{transform=matrix(-0.64021 -0.76819 0.76819 -0.64021 34.76 74.93)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \par \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}In the other direction, we give an interpretation of a finite Markov chain as a ground term. The translation operates as follows, using states as choice labels. Given with starting state and transition , we remove this transition and consider the sub-chains for with new starting state , in which becomes a final state. These are translated inductively to {\vphantom{(}\color[rgb]{0.8,0,0}M_{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. Then is given by a term {\vphantom{(}\color[rgb]{0.8,0,0}M^{s}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, iterating on , where {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is a probabilistic sum that chooses {\vphantom{(}\color[rgb]{0.8,0,0}M_{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} with probability . We formalize this below.
For and let where is the transition function restricted to the domain . Write {\vphantom{(}\color[rgb]{0.8,0,0}p_{1}\color[rgb]{0.8,0,0}M_{1}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\dots\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptp_{n}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for the term that chooses {\vphantom{(}\color[rgb]{0.8,0,0}M_{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} with probability , given inductively below; recall that {\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt{}_{p}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} represents an unfair coin toss, given either as primitive or encoded with and iteration.
{\vphantom{(}\color[rgb]{0.8,0,0}1M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}pM\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptq_{1}\color[rgb]{0.8,0,0}N_{1}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\dots\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptq_{n}\color[rgb]{0.8,0,0}N_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt{}_{p}\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\textstyle{\frac{q_{1}}{1-p}}\color[rgb]{0.8,0,0}N_{1}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\dots\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\textstyle{\frac{q_{n}}{1-p}}\color[rgb]{0.8,0,0}N_{n}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}Then the interpretation of a Markov chain as a term is as follows.
\llbracket C\rrbracket~=~\left\{\begin{array}[]{ll}{\vphantom{(}\color[rgb]{0.8,0,0}s\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\text{if}~s~\in~F\\ \color[rgb]{0.8,0,0}{(p_{1}\llbracket C(t_{1})\rrbracket{\vphantom{(}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\dots\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\color[rgb]{0,0,0}\color[rgb]{0,0,0}}p_{n}\llbracket C(t_{n})\rrbracket)^{s}}&\text{where}~\delta(s)=\{p_{1}t_{1},\dots,p_{n}t_{n}\}\end{array}\right.Example 32.
Consider the following Markov chain , where each arrow has probability , and its typed interpretation , writing {\vphantom{(}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptN\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptP\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for the term {\vphantom{(}\color[rgb]{0.8,0,0}\textstyle{\frac{1}{3}}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\textstyle{\frac{1}{3}}\color[rgb]{0.8,0,0}N\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\textstyle{\frac{1}{3}}\color[rgb]{0.8,0,0}P\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. A fully worked version is in Appendix C.
\vbox{\hbox{ \hbox to78.1pt{\vbox to71.32pt{\pgfpicture\makeatletter\hbox{\hskip 38.8423pt\lower-26.18668pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 8.61 23.62 C 8.61 28.38 4.76 32.23 0 32.23 C -4.76 32.23 -8.61 28.38 -8.61 23.62 C -8.61 18.87 -4.76 15.01 0 15.01 C 4.76 15.01 8.61 18.87 8.61 23.62 Z M 0 23.62}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-2.64294pt}{14.91905pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -3.66 20.64)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -10.96 -11.81 C -10.96 -6.56 -15.21 -2.31 -20.46 -2.31 C -25.7 -2.31 -29.96 -6.56 -29.96 -11.81 C -29.96 -17.06 -25.7 -21.31 -20.46 -21.31 C -15.21 -21.31 -10.96 -17.06 -10.96 -11.81 Z M -20.46 -11.81}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-16.93008pt}{-12.00812pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -23.43 -16.62)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 28.61 -11.81 C 28.61 -7.31 24.96 -3.66 20.46 -3.66 C 15.96 -3.66 12.31 -7.31 12.31 -11.81 C 12.31 -16.31 15.96 -19.96 20.46 -19.96 C 24.96 -19.96 28.61 -16.31 28.61 -11.81 Z M 20.46 -11.81}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{12.62048pt}{-10.68867pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 17.46 -14.79)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-1.72256pt}{36.53606pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -2.38 50.55)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-36.8423pt}{-22.24225pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -50.98 -30.78)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{31.73663pt}{-23.38905pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 43.91 -32.36)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -4.31 16.17 C -12.03 11.71 -15.71 5.33 -15.71 0.02}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.00002}{-1.0}{1.0}{0.00002}{-11.35083pt}{0.011pt}\lxSVG@begingroup@{transform=matrix(0.00002 -1.0 1.0 0.00002 -15.71 0.02)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -10.96 -11.81 C -3.1 -16.35 4.45 -16.35 9.19 -13.61}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.86603}{0.5}{-0.5}{0.86603}{6.64372pt}{-9.83588pt}\lxSVG@begingroup@{transform=matrix(0.86603 0.5 -0.5 0.86603 9.19 -13.61)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 16.38 -4.75 C 16.38 4.69 12.48 11.44 7.42 14.37}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.86601}{0.50002}{-0.50002}{-0.86601}{5.36304pt}{10.38261pt}\lxSVG@begingroup@{transform=matrix(-0.86601 0.50002 -0.50002 -0.86601 7.42 14.37)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 7.46 19.32 C 16.36 14.07 20.55 6.66 20.49 -0.07}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.00877}{-0.99995}{0.99995}{-0.00877}{14.80707pt}{-0.04716pt}\lxSVG@begingroup@{transform=matrix(-0.00877 -0.99995 0.99995 -0.00877 20.49 -0.07)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -20.46 -2.31 C -20.28 7.54 -16.07 14.54 -10.6 17.57}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.87471}{0.48465}{-0.48465}{0.87471}{-7.66338pt}{12.7003pt}\lxSVG@begingroup@{transform=matrix(0.87471 0.48465 -0.48465 0.87471 -10.6 17.57)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 13.4 -15.89 C 4.85 -21.13 -3.41 -21.35 -9.07 -18.28}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.87892}{0.47697}{-0.47697}{-0.87892}{-6.55214pt}{-13.20947pt}\lxSVG@begingroup@{transform=matrix(-0.87892 0.47697 -0.47697 -0.87892 -9.07 -18.28)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 32.23 L 0 44.19}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{1.0}{-1.0}{0.0}{0.0pt}{31.93611pt}\lxSVG@begingroup@{transform=matrix(0.0 1.0 -1.0 0.0 0 44.19)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -28.69 -16.56 L -38.61 -22.29}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.86601}{-0.50002}{0.50002}{-0.86601}{-27.90022pt}{-16.10858pt}\lxSVG@begingroup@{transform=matrix(-0.86601 -0.50002 0.50002 -0.86601 -38.61 -22.29)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 27.51 -15.89 L 38.03 -21.96}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.86601}{-0.50002}{0.50002}{0.86601}{27.48505pt}{-15.86893pt}\lxSVG@begingroup@{transform=matrix(0.86601 -0.50002 0.50002 0.86601 38.03 -21.96)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {}{{}}{}{{}} {{{{{}}{}{}{}{}{{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -23.62 40.91 L -9.85 30.83}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.8069}{-0.59068}{0.59068}{0.8069}{-7.11916pt}{22.28333pt}\lxSVG@begingroup@{transform=matrix(0.8069 -0.59068 0.59068 0.8069 -9.85 30.83)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}}\qquad\begin{array}[]{@{}r@{}l@{}}C~=&(~\{a,b,c,i,j,k\},~a,~\{i,j,k\},\\[3.0pt] &~~a\mapsto\{\textstyle{\frac{1}{3}}b,\textstyle{\frac{1}{3}}c,\textstyle{\frac{1}{3}}i\}~~b\mapsto\{\textstyle{\frac{1}{3}}a,\textstyle{\frac{1}{3}}c,\textstyle{\frac{1}{3}}j\}~~c\mapsto\{\textstyle{\frac{1}{3}}a,\textstyle{\frac{1}{3}}b,\textstyle{\frac{1}{3}}k\}~)\\[10.0pt] \llbracket C\rrbracket~=&{\vphantom{(}\color[rgb]{0.8,0,0}((a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti)^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}i{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}k\color[rgb]{0,0,0}}\end{array}The translations \llparenthesis\kern 1.0pt{\vphantom{(}\color[rgb]{0.8,0,0}-\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\kern 1.0pt\rrparenthesis and above demonstrate the following.
Proposition 33.
Ground terms of the PFMC are equivalent to finite Markov chains.
Markov chains are PAST if they are AST, i.e. if any path may eventually reach a final state. For typed ground terms, which are AST, we then have the following.
Proposition 34.
Typed ground terms with sum probability of the PFMC{}^{\,\mathchoice{\mathbin{\raise 0.60275pt\hbox{\scriptstyle\Rightarrow\oplus}}}{\mathbin{\raise 0.60275pt\hbox{\scriptstyle\Rightarrow\oplus}}}{\mathbin{\raise 0.36165pt\hbox{\scriptscriptstyle\Rightarrow\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow\oplus}}}} are PAST.
Combining type inference for ground terms (Proposition 29) and the translation , we have the following result.
Proposition 35.
Encoding and typing a finite Markov chain computes its return distribution: if {\color[rgb]{0.8,0,0}\llbracket C\rrbracket}:{\vphantom{)}\color[rgb]{0,0,0.8}p_{1}\color[rgb]{0,0,0.8}s{}_{1}\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\kern 1.0pt{\dots}\kern 1.0pt\color[rgb]{0,0,0.8}{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}p_{n}\color[rgb]{0,0,0.8}s{}_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} then terminates in the state with probability .
Proof.
By construction. ∎
7 Moving past PAST
Further exploring the expressive power of the calculus, in this section we demonstrate that typed terms in general might be null AST (NAST), i.e. AST, but not PAST. We will give an example term with infinite expected running time, despite terminating with probability one. Our example relies crucially on higher-order functions. Consider the following term, for a given {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, using the default choice as imperative skip and its case as sequential composition, {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,\star\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
{\vphantom{(}\color[rgb]{0.8,0,0}[M].\,\color[rgb]{0.8,0,0}(\,(\langle f\rangle.\,\color[rgb]{0.8,0,0}[f\,{;}\,f].\,\color[rgb]{0.8,0,0}i)\,\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,\star)^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}With probability it composes the term on the stack with itself and iterates, or it terminates. Evaluating this term on the machine gives the following return family, for the sequence of terms {\vphantom{(}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} given by {\vphantom{(}\color[rgb]{0.8,0,0}M_{0}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and {\vphantom{(}\color[rgb]{0.8,0,0}M_{n+1}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\,{;}\,M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
\{({\vphantom{(}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}},\star)_{\top^{n}\bot}\mid n\in\mathbb{N}\}~=~\{\,({\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}},\star)_{\bot}~,~({\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,M\color[rgb]{0,0,0}\color[rgb]{0,0,0}},\star)_{\top\bot}~,~({\vphantom{(}\color[rgb]{0.8,0,0}(M\,{;}\,M)\,{;}\,(M\,{;}\,M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}},\star)_{\top\top\bot}~,~\dots~\}We may then evaluate the term {\vphantom{(}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} left on the stack by post-composing with {\vphantom{(}\color[rgb]{0.8,0,0}\langle g\rangle.\,\color[rgb]{0.8,0,0}g\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, which pops and runs it, possibly using further base values further down on the stack. If {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} terminates successfully with in steps, {\vphantom{(}\color[rgb]{0.8,0,0}M_{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} takes steps. For example, assuming a natural numbers type {\vphantom{)}\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0}} with primitives zero {\vphantom{(}\color[rgb]{0.8,0,0}0\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0}} and addition {\vphantom{(}\color[rgb]{0.8,0,0}+\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\mathbb{N}\,\mathbb{N}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}, we let {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} be the successor function {\vphantom{(}\color[rgb]{0.8,0,0}[1].\,\color[rgb]{0.8,0,0}+\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\mathbb{N}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}. The term below left then gives the return family below right, taking machine steps (for some small constant ) to compute the number {\vphantom{(}\color[rgb]{0.8,0,0}2^{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0}} from zero and successor. Since the probability of returning {\vphantom{(}\color[rgb]{0.8,0,0}2^{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is , the expected evaluation time on the machine is infinite: the term is not PAST.
{\vphantom{(}\color[rgb]{0.8,0,0}[0].\,\color[rgb]{0.8,0,0}[[1].\,\color[rgb]{0.8,0,0}+\color[rgb]{0.8,0,0}].\,\color[rgb]{0.8,0,0}(\,(\langle f\rangle.\,\color[rgb]{0.8,0,0}[f\,{;}\,f].\,\color[rgb]{0.8,0,0}i)\,\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,\star)^{i}\color[rgb]{0.8,0,0}\,{;}\,\langle g\rangle.\,\color[rgb]{0.8,0,0}g~\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}~\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}\qquad\qquad\{({\vphantom{(}\color[rgb]{0.8,0,0}2^{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}},\star)_{\top^{n}\bot}\mid n\in\mathbb{N}\}The term is typed: for any {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, if {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} is typed {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}} then we have {\vphantom{(}\color[rgb]{0.8,0,0}M^{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}, such as in the case above where {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}={\vphantom{)}\color[rgb]{0,0,0.8}\mathbb{N}\color[rgb]{0,0,0}}. For the loop we then have the following.
\vbox{\hbox{${\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}((\langle f\rangle.\,\color[rgb]{0.8,0,0}[f\,{;}\,f].\,\color[rgb]{0.8,0,0}i)\,\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,\star)^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\sigma\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\sigma\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}(\langle f\rangle.\,\color[rgb]{0.8,0,0}[f\,{;}\,f].\,\color[rgb]{0.8,0,0}i)\,\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,\star\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\sigma\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\sigma\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}i~{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}~\sigma\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\star\color[rgb]{0,0,0}}$}}\qquad\text{where}\quad{\vphantom{)}\color[rgb]{0,0,0.8}\sigma\color[rgb]{0,0,0}}~=~{\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}}The term {\vphantom{(}\color[rgb]{0.8,0,0}\langle g\rangle.\,\color[rgb]{0.8,0,0}g\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}(\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star)\,\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}} takes {\vphantom{(}\color[rgb]{0.8,0,0}M^{n}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}1\star\color[rgb]{0,0,0}} off the stack and evaluates it with an appropriate remaining stack of type {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}. The existence of a typed term that is not PAST then demonstrates the following.
Proposition 36.
The typed probabilistic FMC is not positive almost-surely terminating.
8 Limitations and Prospects
The key to our type system is that it enforces a fixed probability of exiting or continuing for each iteration of a loop. Naturally, this limits expressiveness, as it prevents the typing of iteration with growing or shrinking probabilities, which might nevertheless be AST. Here, we explore how to express such algorithms in the untyped calculus, examine why they cannot be typed, and consider the prospects of lifting this restriction.
Consider an unfair coin toss {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}_{p}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}, using a (further) abbreviated notation {\vphantom{)}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}_{p}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}} for the type {\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}p\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}(1-\color[rgb]{0,0,0.8}p)\bot\color[rgb]{0,0,0}}. We may construct terms with modified probabilities for example as follows.
\displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}[a]_{q}\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,\,{;}\,\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:~{\vphantom{)}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}_{pq}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:~{\vphantom{)}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}_{p^{2}}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}}To alter the probability of exiting a loop during iteration, we make essential use of the higher-order nature of the calculus: we store the intended loop body on the stack, and modify it during iteration. Using the second construction above:
{\vphantom{(}\color[rgb]{0.8,0,0}[M]\,.\,\color[rgb]{0.8,0,0}\,(\langle x\rangle.\,\color[rgb]{0.8,0,0}(x\,\,{;}\,\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}[x\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}x].\,\color[rgb]{0.8,0,0}{\star})^{\star}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The term starts with {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} on the stack; pops and evaluates it; on , it exits the loop; on , it pushes {\vphantom{(}\color[rgb]{0.8,0,0}M\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} to the stack and iterates. The probability to exit the loop squares at each iteration, from to , , , , etc. The probability of non-termination is , which is non-zero e.g. for : the term is not AST.
The reason why the term cannot be typed is subtle: it is because the loop body changes the probability on the stack. The body itself can be typed, for any probability :
{\vphantom{(}\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}(x\,\,{;}\,\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}[x\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}x].\,\color[rgb]{0.8,0,0}{\star})~\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}~(\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}_{q}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot)\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}q\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}(\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}_{q^{2}}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot)\color[rgb]{0,0,0.8}(1-\color[rgb]{0,0,0.8}q)\star\color[rgb]{0,0,0}}But to type the loop requires the same input and output types on the stack, while {\vphantom{)}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}_{q}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}\top{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}_{q^{2}}\kern 2.0pt}\color[rgb]{0,0,0.8}\bot\color[rgb]{0,0,0}} are distinct.
This observation explains how the type system enforces fixed probabilities during iteration: the probabilities of all inputs—the stack—need to remain fixed. This remains a main limitation of the type system, as it also prevents typing similar terms to the above example that are AST, for example one that increases (rather than decreases) the probability of exiting the loop. Finally, the above considerations indicate how the type system might be extended to accommodate iteration with changing probability: by introducing variables for probabilities, and arithmetic functions over them, into the type system, approaching a form of dependent types.
9 Conclusion
We have demonstrated a type system for almost-sure termination in a probabilistic -calculus with iteration, the PFMC{}^{\,\mathchoice{\mathbin{\raise 0.60275pt\hbox{\scriptstyle\Rightarrow\oplus}}}{\mathbin{\raise 0.60275pt\hbox{\scriptstyle\Rightarrow\oplus}}}{\mathbin{\raise 0.36165pt\hbox{\scriptscriptstyle\Rightarrow\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow\oplus}}}}. As a direct probabilistic generalization of the FMC and typed iteration, we believe this to be a natural account of AST. essive power beyond positive AST.
In future work, we intend to further analyse the expressive power of the calculus and fragments of it. At present, being an extension of simple types with fixed probabilities of iteration, it is clear that the expressive power of the typed calculus for real algorithms is limited. Addressing this, we expect that the type system will generalize with polymorphism, dependent types, and intersection types along standard lines. A dependently typed generalisation would be akin to Hoare logic, and might facilitate reasoning about probabilistic termination in theorem provers and give natural ways to include termination evidence in typed imperative programming languages.
References
[1] M. Antonelli, U. Dal Lago, and P. Pistone (2022) Curry and Howard meet Borel. In Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS‘22), pp. 45:1–45:13. External Links: Document Cited by: 1st item, §1, §2, Remark 24.
[2] M. Avanzini, G. Barthe, and U. D. Lago (2021) On continuation-passing transformations and expected cost analysis. Proc. ACM Program. Lang. 5 (ICFP), pp. 1–30. External Links: Document Cited by: §2.
[3] M. Avanzini, U. Dal Lago, and A. Ghyselen (2019) Type-based complexity analysis of probabilistic functional programs. In 34th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS, pp. 1–13. External Links: Document Cited by: §2.
[4] G. Barthe, J. Hsu, and K. Liao (2020) A probabilistic separation logic. Proc. ACM Program. Lang. 4 (POPL), pp. 55:1–55:30. External Links: Document Cited by: §2.
[5] R. Beutner and L. Ong (2021) On probabilistic termination of functional programs with continuous distributions. In Proceedings 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI), S. N. Freund and E. Yahav (Eds.), pp. 1312–1326. External Links: Document Cited by: §2.
[6] S. L. Bloom and Z. Ésik (1993) Iteration theories - the equational logic of iterative processes. EATCS Monographs on Theoretical Computer Science, Springer. External Links: Document, ISBN 978-3-642-78036-3 Cited by: §1.
[7] F. Breuvart, U. Dal Lago, and A. Herrou (2021) On higher-order probabilistic subrecursion. Log. Methods Comput. Sci. 17 (4). External Links: Document Cited by: §2.
[8] R. Crubillé, T. Ehrhard, M. Pagani, and C. Tasson (2017) The free exponential modality of probabilistic coherence spaces. In Foundations of Software Science and Computation Structures - 20th International Conference, FOSSACS 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, J. Esparza and A. S. Murawski (Eds.), Lecture Notes in Computer Science, Vol. 10203, pp. 20–35. External Links: Document Cited by: §2.
[9] F. Dahlqvist and D. Kozen (2020) Semantics of higher-order probabilistic programs with conditioning. Proceedings of the ACM on Programming Languages 4 (POPL), pp. 57:1–57:29. External Links: Document Cited by: §2.
[10] U. Dal Lago, C. Faggian, and S. Ronchi Della Rocca (2021) Intersection types and (positive) almost-sure termination. Proceedings of the ACM on Programming Languages 5 (POPL), pp. 1–32. External Links: Document Cited by: §1, §2.
[11] U. Dal Lago and C. Grellois (2019) Probabilistic termination by monadic affine sized typing. ACM Trans. Program. Lang. Syst. 41 (2), pp. 10:1–10:65. External Links: Document Cited by: §1, §2.
[12] U. Dal Lago, G. Guerrieri, and W. Heijltjes (2020) Decomposing probabilistic lambda-calculi. In Foundations of Software Science and Computation Structures, J. Goubault-Larrecq and B. König (Eds.), LNCS, Vol. 12077, Cham, pp. 136–156. External Links: Document, ISBN 978-3-030-45231-5 Cited by: §1, §1.
[13] U. Dal Lago and L. Padovani (2024) On the almost-sure termination of binary sessions. In Proceedings of the 26th International Symposium on Principles and Practice of Declarative Programming, PPDP, A. Bruni, A. Momigliano, M. Pradella, M. Rossi, and J. Cheney (Eds.), pp. 9:1–9:12. External Links: Document Cited by: §2.
[14] V. Danos and T. Ehrhard (2011) Probabilistic coherence spaces as a model of higher-order probabilistic computation. Inf. Comput. 209 (6), pp. 966–991. External Links: Document Cited by: §2.
[15] A. Das, D. Wang, and J. Hoffmann (2023) Probabilistic resource-aware session types. Proc. ACM Program. Lang. 7 (POPL), pp. 1925–1956. External Links: Document Cited by: §2.
[16] T. Ehrhard and C. Tasson (2019) Probabilistic call by push value. Log. Methods Comput. Sci. 15 (1). External Links: Document Cited by: §2.
[17] T. Ehrhard (2019) Differentials and distances in probabilistic coherence spaces. In 4th International Conference on Formal Structures for Computation and Deduction, FSCD 2019, Dortmund, Germany, June 24-30, 2019, H. Geuvers (Ed.), LIPIcs, Vol. 131, pp. 17:1–17:17. External Links: Document Cited by: Remark 11.
[18] J. Esparza, A. Kucera, and R. Mayr (2004) Model checking probabilistic pushdown automata. In 19th IEEE Symposium on Logic in Computer Science (LICS), pp. 12–21. External Links: Document Cited by: §2.
[19] K. Etessami and M. Yannakakis (2009) Recursive markov chains, stochastic grammars, and monotone systems of nonlinear equations. J. ACM 56 (1), pp. 1:1–1:66. External Links: Document Cited by: §2.
[20] L. M. Ferrer Fioriti and H. Hermanns (2015) Probabilistic termination: soundness, completeness, and compositionality. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, S. K. Rajamani and D. Walker (Eds.), pp. 489–501. External Links: Document Cited by: §2.
[21] M. Giry (1982) A categorical approach to probability theory. In Categorical aspects of topology and analysis (Ottawa, Ont., 1980), Lecture Notes in Math., Vol. 915, pp. 68–85. Cited by: Remark 10.
[22] R. J. v. Glabbeek, S. A. Smolka, and B. Steffen (1995) Reactive, generative and stratified models of probabilistic processes. Inf. Comput. 121 (1), pp. 59–80. External Links: Document Cited by: §2.
[23] S. O. Gregersen, A. Aguirre, P. G. Haselwarter, J. Tassarotti, and L. Birkedal (2024) Almost-sure termination by guarded refinement. Proc. ACM Program. Lang. 8 (ICFP), pp. 203–233. External Links: Document Cited by: §2.
[24] W. Heijltjes and G. Majury (2025) Simple types for probabilistic termination. In 33rd EACSL Annual Conference on Computer Science Logic (CSL), J. Endrullis and S. Schmitz (Eds.), LIPIcs, Vol. 326, pp. 31:1–31:22. External Links: Document Cited by: §1, §2, Remark 21, Remark 24, Remark 24, Remark 7.
[25] W. Heijltjes (2023) The Functional Machine Calculus. Electronic Notes in Theoretical Informatics and Computer Science Volume 1 - Proceedings of MFPS XXXVIII. External Links: Document, Link Cited by: §1, Remark 11, Remark 21, Remark 7.
[26] W. Heijltjes (2025) The Functional Machine Calculus III: Control. Electronic Notes in Theoretical Informatics and Computer Science Volume 5 - Proceedings of MFPS XLI. External Links: Document, ISSN 2969-2431, Link Cited by: §1, §1, §3, Remark 11, Proposition 15, Remark 21.
[27] J. I. Jereb and A. Simpson (2025) Safety, relative tightness and the probabilistic frame rule. In Proceedings of the 41st Conference on the Mathematical Foundations of Programming Semantics, MFPS XLI, University of Strathclyde, Glasgow, UK, June 16-21, 2025, C. Kupke and S. Milius (Eds.), Electronic Notes in Theoretical Informatics and Computer Science, Vol. 5. External Links: Document Cited by: §2.
[28] N. Kobayashi, U. Dal Lago, and C. Grellois (2020) On the termination problem for probabilistic higher-order recursive programs. Log. Methods Comput. Sci. 16 (4). External Links: Document Cited by: §1, §2.
[29] D. Kozen (1981) Semantics of probabilistic programs. J. Comput. Syst. Sci. 22 (3), pp. 328–350. External Links: Document Cited by: §2.
[30] J. Krivine (2007) A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation 20, pp. 199–207. External Links: Document Cited by: §1, §3.
[31] S. Kura and H. Unno (2024) Automated verification of higher-order probabilistic programs via a dependent refinement type system. Proc. ACM Program. Lang. 8 (ICFP), pp. 973–1002. External Links: Document Cited by: §2.
[32] P. B. Levy (2003) Call-by-push-value: A functional/imperative synthesis. Semantic Structures in Computation, Vol. 2, Springer Netherlands. External Links: Document Cited by: Remark 7.
[33] A. McIver, C. Morgan, B. L. Kaminski, and J. Katoen (2018) A new proof rule for almost-sure termination. Proc. ACM Program. Lang. 2 (POPL), pp. 33:1–33:28. External Links: Document Cited by: §2.
[34] E. Moggi (1991) Notions of computation and monads. Information and Computation 93 (1), pp. 55–92. External Links: Document Cited by: Remark 7.
[35] A. Silva and A. Sokolova (2011) Sound and complete axiomatization of trace semantics for probabilistic systems. In Twenty-seventh Conference on the Mathematical Foundations of Programming Semantics, MFPS 2011, Pittsburgh, PA, USA, May 25-28, 2011, M. W. Mislove and J. Ouaknine (Eds.), Electronic Notes in Theoretical Computer Science, Vol. 276, pp. 291–311. External Links: Document Cited by: §2.
[36] E. W. Stark and S. A. Smolka (2000) A complete axiom system for finite-state probabilistic processes. In Proof, Language, and Interaction, Essays in Honour of Robin Milner, G. D. Plotkin, C. Stirling, and M. Tofte (Eds.), pp. 571–596. Cited by: §2.
[37] S. Staton (2017) Commutative semantics for probabilistic programming. In Programming Languages and Systems - 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, H. Yang (Ed.), Lecture Notes in Computer Science, Vol. 10201, pp. 855–879. External Links: Document Cited by: §2.
[38] W.W. Tait (1967) Intensional interpretations of functionals of finite type I. The Journal of Symbolic Logic 32 (2), pp. 198–212. External Links: Document Cited by: §5.
[39] M. Torres-Ruiz, R. Piedeleu, A. Silva, and F. Zanasi (2024) On iteration in discrete probabilistic programming. In 9th International Conference on Formal Structures for Computation and Deduction (FSCD 2024), J. Rehof (Ed.), Leibniz International Proceedings in Informatics (LIPIcs), pp. 20:1–20:21. External Links: Document Cited by: §2.
[40] M. Vákár, O. Kammar, and S. Staton (2019) A domain theory for statistical probabilistic programming. Proc. ACM Program. Lang. 3 (POPL), pp. 36:1–36:29. External Links: Document Cited by: §2.
Appendix A On function composition and recursion
As the introduction set out, typed almost-sure termination arises naturally by replacing the sum in the standard typed iterator with a probabilistic sum. The probabilistic FMC integrates iteration into the -calculus, giving AST in a higher-order setting. The -calculus is however more commonly associated with recursion than iteration. A pertinent question is then whether typed AST is also possible for recursion. Here, we consider the obstacles to typing probabilistic termination in a probabilistic -calculus without branching and iteration. We will use the type system for the probabilistic event -calculus, given by arrow types over probabilities .
{\vphantom{)}\color[rgb]{0,0,0.8}\sigma{\color[rgb]{0,0,0},}~\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}~\mathbin{{:}{:}{=}}~{\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}~\mid~{\vphantom{)}\color[rgb]{0,0,0.8}\sigma\to\tau\color[rgb]{0,0,0}}First, we compare function composition,
against sequencing {\vphantom{(}\color[rgb]{0.8,0,0}f\,{;}\,g\color[rgb]{0,0,0}\color[rgb]{0,0,0}}. The particular problem is to type self-composition, (the Church numeral two). Suppose we have f:{\vphantom{)}\color[rgb]{0,0,0.8}1\to\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, i.e. returns with probability , so that we need f\circ f:{\vphantom{)}\color[rgb]{0,0,0.8}1\to\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}. For input x:{\vphantom{)}\color[rgb]{0,0,0.8}1\color[rgb]{0,0,0}} we get f\,x:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}, as expected, but to apply again we need to modify its type to f:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\to\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}. This may be approached in several ways.
- Using intersection types: we assign a collection of multiple types f:\{{\vphantom{)}\color[rgb]{0,0,0.8}1\to\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}},{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\to\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\}. This is used in [1], among others.
- Using subtyping: we may introduce a subtyping relation that coerces f:{\vphantom{)}\color[rgb]{0,0,0.8}1\to\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} to f:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\to\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} by multiplying all probabilities by a fixed factor, in this case . This is a rather coarse approach, since it ignores the actual flow of computation in a term, and only works as long as the type system does not multiply any probabilities.
- Using polymorphic types: with probabilistic type variables we may assign the type f:{\vphantom{)}\color[rgb]{0,0,0.8}p\to\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}, which instantiates to f:{\vphantom{)}\color[rgb]{0,0,0.8}1\to\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} and f:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\to\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}.
While these are all reasonable ideas, they are not as simple and natural as our current approach using sequential composition and iteration, which has the intrinsic ability to multiply the probabilities of sequential computations:
{\vphantom{(}\color[rgb]{0.8,0,0}f\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\star\color[rgb]{0,0,0}}\qquad\text{and}\qquad{\vphantom{(}\color[rgb]{0.8,0,0}f\,{;}\,f\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}\star\color[rgb]{0,0,0}}Turning to recursion, consider the following two recursive terms and , where 1:{\vphantom{)}\color[rgb]{0,0,0.8}1\color[rgb]{0,0,0}} is a terminating constant and \Omega=(\lambda x.xx)(\lambda x.xx):{\vphantom{)}\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}} diverges.
Analogous to our running example from the introduction, should return with probability , and indeed we are able to assign that as its type:
f:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{2}{3}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}~\vdash~1\oplus(\Omega\oplus f):{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{2}{3}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}However, we are also able to type , which diverges, with any probability :
g:{\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}~\vdash~g\oplus g:{\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}The key problem is that with recursion, termination happens through weakening, i.e. discarding the recursive function call. In , the terminating branch discards the recursive call, while in neither branch does, but this difference is invisible to the type system. Whether a subterm will be discarded during computation is an undecidable property typically tracked using intersection types, and not usually registered in a system of simple types.
A solution, therefore, would need to register the multiple branches of a computation, and which variables are weakened or not. For example, with polymorphism we might have the following types,
f:{\vphantom{)}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}~\vdash~1\oplus(\Omega\oplus f):{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\oplus\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0}}and solve for in the rule for fixed points.
This is an interesting direction to explore, and we may do so in future. However, unlike our approach for iteration, it requires moving beyond simple types, and is beyond the scope of the present work.
Appendix B Running the machine
In Figure 4 we give a successful run of the machine for our running example term, unfolded to its primitives, and the trace .
{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(\mathsf{h}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(\mathsf{t}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\,i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \begin{array}[]{@{(\,}r@{\,,\,}l@{\,,\,}l@{\,,\,}r@{\,)}}\bot\,\bot\,\top&\varepsilon&{\vphantom{(}\color[rgb]{0.8,0,0}(\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\varepsilon\\ \hline\cr\bot\,\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h})~(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\bot\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h})~(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\bot\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\bot\,\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t})~(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\bot\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t})~(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\bot\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\top&\varepsilon&{\vphantom{(}\color[rgb]{0.8,0,0}(\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\varepsilon\\ \hline\cr\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\top&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h})~(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\varepsilon&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\top\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{h})~(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\varepsilon&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\mathsf{h}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(\hbox to13.31pt{\vbox to11.53pt{\pgfpicture\makeatletter\hbox{\hskip 6.65384pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.32083pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.6 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}b\,{;}\,\top\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}\mathsf{t}\,{;}\,\bot\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}i))~(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\varepsilon&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\mathsf{h}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{\vphantom{(}\color[rgb]{0.8,0,0}(i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\ \hline\cr\varepsilon&\varepsilon&\phantom{(}{\vphantom{(}\color[rgb]{0.8,0,0}\mathsf{h}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&\varepsilon\end{array}Figure 4: A complete run of the machine
Appendix C Encoding Markov chains
We elaborate on Example 32, encoding the following Markov chain , where each arrow has probability .
\vbox{\hbox{ \hbox to107.67pt{\vbox to96.93pt{\pgfpicture\makeatletter\hbox{\hskip 53.627pt\lower-34.7226pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 8.61 39.37 C 8.61 44.13 4.76 47.98 0 47.98 C -4.76 47.98 -8.61 44.13 -8.61 39.37 C -8.61 34.61 -4.76 30.76 0 30.76 C 4.76 30.76 8.61 34.61 8.61 39.37 Z M 0 39.37}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-2.64294pt}{26.29999pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -3.66 36.39)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -24.59 -19.69 C -24.59 -14.44 -28.85 -10.18 -34.1 -10.18 C -39.34 -10.18 -43.6 -14.44 -43.6 -19.69 C -43.6 -24.93 -39.34 -29.19 -34.1 -29.19 C -28.85 -29.19 -24.59 -24.93 -24.59 -19.69 Z M -34.1 -19.69}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-26.7867pt}{-17.6986pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -37.06 -24.49)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 42.24 -19.69 C 42.24 -15.18 38.6 -11.54 34.1 -11.54 C 29.6 -11.54 25.95 -15.18 25.95 -19.69 C 25.95 -24.19 29.6 -27.83 34.1 -27.83 C 38.6 -27.83 42.24 -24.19 42.24 -19.69 Z M 34.1 -19.69}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{22.4771pt}{-16.37915pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 31.1 -22.66)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-1.72256pt}{53.6079pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -2.38 74.18)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-51.627pt}{-30.77817pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -71.44 -42.59)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{46.52133pt}{-31.92497pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 64.37 -44.17)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -4.31 31.91 C -21.26 22.12 -29.34 8.12 -29.34 -7.86}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.00002}{-1.0}{1.0}{-0.00002}{-21.20735pt}{-5.67947pt}\lxSVG@begingroup@{transform=matrix(-0.00002 -1.0 1.0 -0.00002 -29.34 -7.86)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -24.59 -19.69 C -7.52 -29.54 8.88 -29.54 22.83 -21.48}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.86603}{0.5}{-0.5}{0.86603}{16.50034pt}{-15.52635pt}\lxSVG@begingroup@{transform=matrix(0.86603 0.5 -0.5 0.86603 22.83 -21.48)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 30.02 -12.63 C 30.02 7.48 21.72 21.86 7.42 30.11}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.86603}{0.5}{-0.5}{-0.86603}{5.36307pt}{21.7636pt}\lxSVG@begingroup@{transform=matrix(-0.86603 0.5 -0.5 -0.86603 7.42 30.11)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 7.46 35.06 C 25.55 24.51 34.19 9.41 34.11 -7.94}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.00429}{-0.99998}{0.99998}{-0.00429}{24.65201pt}{-5.73756pt}\lxSVG@begingroup@{transform=matrix(-0.00429 -0.99998 0.99998 -0.00429 34.11 -7.94)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -34.1 -10.18 C -33.92 10.34 -25.31 24.96 -10.59 33.29}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.87022}{0.49265}{-0.49265}{0.87022}{-7.65172pt}{24.06047pt}\lxSVG@begingroup@{transform=matrix(0.87022 0.49265 -0.49265 0.87022 -10.59 33.29)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 27.04 -23.76 C 9.24 -34.34 -7.8 -34.56 -22.73 -26.19}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.87234}{0.48888}{-0.48888}{-0.87234}{-16.42586pt}{-18.93091pt}\lxSVG@begingroup@{transform=matrix(-0.87234 0.48888 -0.48888 -0.87234 -22.73 -26.19)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 47.98 L 0 67.81}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{1.0}{-1.0}{0.0}{0.0pt}{49.00795pt}\lxSVG@begingroup@{transform=matrix(0.0 1.0 -1.0 0.0 0 67.81)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -42.32 -24.44 L -59.06 -34.1}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.86601}{-0.50002}{0.50002}{-0.86601}{-42.68492pt}{-24.6447pt}\lxSVG@begingroup@{transform=matrix(-0.86601 -0.50002 0.50002 -0.86601 -59.06 -34.1)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 41.15 -23.76 L 58.49 -33.77}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.86601}{-0.50003}{0.50003}{0.86601}{42.26974pt}{-24.40503pt}\lxSVG@begingroup@{transform=matrix(0.86601 -0.50003 0.50003 0.86601 58.49 -33.77)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {}{{}}{}{{}} {{{{{}}{}{}{}{}{{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -39.37 68.19 L -9.85 46.58}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.8069}{-0.59068}{0.59068}{0.8069}{-7.11916pt}{33.66426pt}\lxSVG@begingroup@{transform=matrix(0.8069 -0.59068 0.59068 0.8069 -9.85 46.58)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}}}\qquad\begin{array}[]{l@{}l@{}l}S&{}~=&\{a,b,c,i,j,k\}\\[3.0pt] s&{}~=&a\\[3.0pt] F&{}~=&\{i,j,k\}\\[3.0pt] \delta&{}~=&a\mapsto\{~\textstyle{\frac{1}{3}}b~,~\textstyle{\frac{1}{3}}c~,~\textstyle{\frac{1}{3}}i~\}\\[3.0pt] &&b\mapsto\{~\textstyle{\frac{1}{3}}a~,~\textstyle{\frac{1}{3}}c~,~\textstyle{\frac{1}{3}}j~\}\\[3.0pt] &&c\mapsto\{~\textstyle{\frac{1}{3}}a~,~\textstyle{\frac{1}{3}}b~,~\textstyle{\frac{1}{3}}k~\}\end{array}The interpretation, in stages, is as follows, again writing {\vphantom{(}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptN\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0ptP\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for {\vphantom{(}\color[rgb]{0.8,0,0}\textstyle{\frac{1}{3}}\color[rgb]{0.8,0,0}M\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\textstyle{\frac{1}{3}}\color[rgb]{0.8,0,0}N\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 1.0pt\textstyle{\frac{1}{3}}\color[rgb]{0.8,0,0}P\color[rgb]{0,0,0}\color[rgb]{0,0,0}}.
\displaystyle\llbracket C\rrbracket \displaystyle=~{\vphantom{(}\color[rgb]{0.8,0,0}(\llbracket C(b)\rrbracket\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\llbracket C(c)\rrbracket\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti)^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle=~{\vphantom{(}\color[rgb]{0.8,0,0}((a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\llbracket C(b)(c)\rrbracket\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt\llbracket C(c)(b)\rrbracket\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti)^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle=~{\vphantom{(}\color[rgb]{0.8,0,0}((a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti)^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The type is built up as follows.
\displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}b{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}k\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{4}{9}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{9}}\color[rgb]{0,0,0.8}b{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{9}}\color[rgb]{0,0,0.8}k\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}j\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{8}}\color[rgb]{0,0,0.8}k{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{3}{8}}\color[rgb]{0,0,0.8}j\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{8}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{3}{8}}\color[rgb]{0,0,0.8}k\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{6}}\color[rgb]{0,0,0.8}k{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{6}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}((a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pt(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti)^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}k{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}The interpretation may be illustrated as follows, where the solid edges represent the tree-shape of the probabilistic sums, while the dashed edges represent the loops.
\vbox{\hbox{$\hbox to121.18pt{\vbox to104.03pt{\pgfpicture\makeatletter\hbox{\hskip 33.59035pt\lower-73.22766pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#000000} \lxSVG@begingroup@{fill=#000000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces{\lx@inpgf@ignorespaces}\lx@inpgf@ignorespaces\lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.8pt} \lx@inpgf@ignorespaces {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 49.49 0 C 49.49 6.7 44.06 12.13 37.36 12.13 C 30.66 12.13 25.23 6.7 25.23 0 C 25.23 -6.7 30.66 -12.13 37.36 -12.13 C 44.06 -12.13 49.49 -6.7 49.49 0 Z M 37.36 0}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{19.65973pt}{-3.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 27.2 -4.73)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 11.08 -37.36 C 11.08 -31.24 6.12 -26.28 0 -26.28 C -6.12 -26.28 -11.08 -31.24 -11.08 -37.36 C -11.08 -43.48 -6.12 -48.44 0 -48.44 C 6.12 -48.44 11.08 -43.48 11.08 -37.36 Z M 0 -37.36}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-6.50693pt}{-30.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -9 -42.09)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 85.04 -37.36 C 85.04 -31.66 80.42 -27.04 74.72 -27.04 C 69.02 -27.04 64.4 -31.66 64.4 -37.36 C 64.4 -43.06 69.02 -47.68 74.72 -47.68 C 80.42 -47.68 85.04 -43.06 85.04 -37.36 Z M 74.72 -37.36}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{48.15103pt}{-30.41666pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 66.63 -42.09)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 11.11 -89.66 C 11.11 -83.53 6.13 -78.56 0 -78.56 C -6.13 -78.56 -11.11 -83.53 -11.11 -89.66 C -11.11 -95.8 -6.13 -100.77 0 -100.77 C 6.13 -100.77 11.11 -95.8 11.11 -89.66 Z M 0 -89.66}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-5.89722pt}{-67.24428pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -8.16 -93.05)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{{{}}}{{}}{}{}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{}{}{}{}{}{{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 84.92 -89.66 C 84.92 -84.03 80.36 -79.46 74.72 -79.46 C 69.08 -79.46 64.52 -84.03 64.52 -89.66 C 64.52 -95.3 69.08 -99.87 74.72 -99.87 C 80.36 -99.87 84.92 -95.3 84.92 -89.66 Z M 74.72 -89.66}{fill:none} \lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{48.22047pt}{-68.21649pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 66.72 -94.39)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{23.333pt}{23.70238pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 32.29 32.8)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-32.67517pt}{-29.32541pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -45.21 -40.58)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{74.90965pt}{-30.47221pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 103.65 -42.16)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-33.09035pt}{-68.27205pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -45.79 -94.47)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{75.32483pt}{-67.12524pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 104.23 -92.88)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@begingroup@{_scopebegin=1} {}{{}}{}{{}} {{{{{}}{}{}{}{}{{}}}}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 37.36 L 26.24 11.12}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.7071}{-0.7071}{0.7071}{0.7071}{18.96402pt}{8.03598pt}\lxSVG@begingroup@{transform=matrix(0.7071 -0.7071 0.7071 0.7071 26.24 11.12)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{} {{}}{{}}{{{{}}{{\lx@inpgf@ignorespaces}}{{}}{{}}}{{{{}}{}{}{}{}{{}}}} }{{{{}}{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}{{}}}{{{{}}{}{}{}{}{{}}}} }{{}{}\lx@inpgf@ignorespaces}{{}} {}{}{}{{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {\lx@inpgf@ignorespaces}{{}}{}{{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 25.65 -3.14 C 13.33 -6.65 5.99 -14.23 3.74 -23.17}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.24335}{-0.96994}{0.96994}{-0.24335}{2.70526pt}{-16.74326pt}\lxSVG@begingroup@{transform=matrix(-0.24335 -0.96994 0.96994 -0.24335 3.74 -23.17)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{{}}{{}}{{{{}}{{\lx@inpgf@ignorespaces}}{{}}{{}}}{{{{}}{}{}{}{}{{}}}} }{{{{}}{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}{{}}}{{{{}}{}{}{}{}{{}}}} }{{}{}\lx@inpgf@ignorespaces}{{}} {}{}{}{{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {\lx@inpgf@ignorespaces}{{}}{}{{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 49.07 -3.14 C 61.6 -6.86 69.01 -14.68 71.21 -23.9}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.23254}{-0.9726}{0.9726}{0.23254}{51.46574pt}{-17.26979pt}\lxSVG@begingroup@{transform=matrix(0.23254 -0.9726 0.9726 0.23254 71.21 -23.9)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 37.36 12.13 L 37.36 28.51}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{1.0}{-1.0}{0.0}{27.0pt}{20.60243pt}\lxSVG@begingroup@{transform=matrix(0.0 1.0 -1.0 0.0 37.36 28.51)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{{}} {{{{{}}{}{}{}{}{{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 0 -48.44 L 0 -74.96}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{0.0pt}{-54.17206pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 0 -74.96)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{{}} {{{{{}}{}{}{}{}{{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 74.72 -47.68 L 74.72 -75.86}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.0}{-1.0}{1.0}{0.0}{54.0pt}{-54.82587pt}\lxSVG@begingroup@{transform=matrix(0.0 -1.0 1.0 0.0 74.72 -75.86)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -11.08 -37.36 L -25.22 -37.36}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-1.0}{0.0}{0.0}{-1.0}{-18.22488pt}{-27.0pt}\lxSVG@begingroup@{transform=matrix(-1.0 0.0 0.0 -1.0 -25.22 -37.36)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 85.04 -37.36 L 99.36 -37.36}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{71.80971pt}{-27.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 99.36 -37.36)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -11.11 -89.66 L -24.64 -89.66}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-1.0}{0.0}{0.0}{-1.0}{-17.80971pt}{-64.79984pt}\lxSVG@begingroup@{transform=matrix(-1.0 0.0 0.0 -1.0 -24.64 -89.66)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces {{}}{}{ {}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{}{}{}{}{{}}}}}{{}}{}{}{}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 84.92 -89.66 L 99.94 -89.66}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{72.22488pt}{-64.79984pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 99.94 -89.66)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces \lxSVG@begingroup@{_scopebegin=1} \lxSVG@setdash{3.0pt,2.0pt}{0.0pt}\lxSVG@begingroup@{stroke-dasharray={3.0pt,2.0pt},stroke-dashoffset=0.0pt} \lx@inpgf@ignorespaces {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -5.54 -27.76 C -1.18 -9.96 9.26 0.94 23.4 5.06}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.96011}{0.27962}{-0.27962}{0.96011}{16.91335pt}{3.65533pt}\lxSVG@begingroup@{transform=matrix(0.96011 0.27962 -0.27962 0.96011 23.4 5.06)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ }}{ } {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.45042pt}{-3.90614pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -4.77 -5.4)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 79.88 -28.43 C 75.78 -10.5 65.43 0.65 51.3 5}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.95563}{0.29456}{-0.29456}{-0.95563}{37.075pt}{3.6165pt}\lxSVG@begingroup@{transform=matrix(-0.95563 0.29456 -0.29456 -0.95563 51.3 5)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{}}{} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{50.31111pt}{-4.19046pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 69.62 -5.8)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -5.55 -80.04 C -12 -68.87 -12 -58.13 -7.34 -50.07}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.50037}{0.86581}{-0.86581}{0.50037}{-5.30482pt}{-36.18605pt}\lxSVG@begingroup@{transform=matrix(0.50037 0.86581 -0.86581 0.50037 -7.34 -50.07)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ }}{ } {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-14.25116pt}{-45.38974pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -19.72 -62.81)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 79.82 -80.83 C 86.57 -69.18 86.59 -57.97 81.67 -49.41}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.4986}{0.86684}{-0.86684}{-0.4986}{59.02411pt}{-35.71045pt}\lxSVG@begingroup@{transform=matrix(-0.4986 0.86684 -0.86684 -0.4986 81.67 -49.41)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{}}{} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{61.85704pt}{-45.44115pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 85.59 -62.88)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{}{\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 5.55 -80.04 C 10.73 -51.59 16.7 -35.47 29.48 -13.61}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{0.50471}{0.86328}{-0.86328}{0.50471}{21.30545pt}{-9.83492pt}\lxSVG@begingroup@{transform=matrix(0.50471 0.86328 -0.86328 0.50471 29.48 -13.61)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{11.26318pt}{-33.28099pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 15.58 -46.05)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces{}{}{{}}{}}{}{{}}{} {\lx@inpgf@ignorespaces{}{}{{}}{}}{{\lx@inpgf@ignorespaces}{}\lx@inpgf@ignorespaces}{{}} {\lx@inpgf@ignorespaces}{}{}{{{\lx@inpgf@ignorespaces}}{{\lx@inpgf@ignorespaces}}{{}}} {{{}}{{\lx@inpgf@ignorespaces}}{{}}} {{\lx@inpgf@ignorespaces}}{\lx@inpgf@ignorespaces}{{\lx@inpgf@ignorespaces}}{}{}{}{}{}{}{}{{}}{}{}{}{}{{}}\lxSVG@stroke\lxSVG@drawpath@unclipped{M 69.62 -80.83 C 64.3 -51.95 58.3 -35.82 45.25 -13.6}{fill:none} {{}{{}}{}{}{{}}{{{\lx@inpgf@ignorespaces}}{{{\lx@inpgf@ignorespaces}}{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{-0.50645}{0.86226}{-0.86226}{-0.50645}{32.69908pt}{-9.83224pt}\lxSVG@begingroup@{transform=matrix(-0.50645 0.86226 -0.86226 -0.50645 45.25 -13.6)} \lxSVG@begingroup@{_scopebegin=1} \lxSVG@drawpath@unclipped{M 3.6 0 L -2.16 2.88 L 0 0 L -2.16 -2.88}{stroke:none} \lxSVG@closescope \lxSVG@closescope }}{{\lx@inpgf@ignorespaces}}}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{{}{}}}{{}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{35.87148pt}{-33.54424pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 49.64 -46.42)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} \lxSVG@closescope \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}$}}\qquad\begin{array}[]{l@{}l}{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(N\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptP\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti)^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\[3.0pt] {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptQ\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\[3.0pt] {\vphantom{(}\color[rgb]{0.8,0,0}P\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptR\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\[3.0pt] {\vphantom{(}\color[rgb]{0.8,0,0}Q\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk)^{c}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\\[3.0pt] {\vphantom{(}\color[rgb]{0.8,0,0}R\color[rgb]{0,0,0}\color[rgb]{0,0,0}}&{}~=~{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{b}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}~=~{\vphantom{(}\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\end{array}As the illustration suggests, the formalism may express any probabilistic tree with back-pointers. It may also express directed acyclic graphs, which yields a smaller interpretation of the Markov chain above, though still exponential, in the following term.
{\vphantom{(}\color[rgb]{0.8,0,0}(b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj\,{;}\,c\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{c}\color[rgb]{0.8,0,0})^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}The types work out the same way.
\displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}b{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}c{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{9}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{4}{9}}\color[rgb]{0,0,0.8}c{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}i{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{9}}\color[rgb]{0,0,0.8}j\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{c}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{8}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{3}{8}}\color[rgb]{0,0,0.8}k\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj\,{;}\,c\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{c}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}a{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{3}}\color[rgb]{0,0,0.8}i{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{6}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{6}}\color[rgb]{0,0,0.8}k\color[rgb]{0,0,0}} \displaystyle{\vphantom{(}\color[rgb]{0.8,0,0}(b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0pti\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj\,{;}\,c\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}(a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptb\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptk\,{;}\,b\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}a\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptc\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 1.0ptj)^{c}\color[rgb]{0.8,0,0})^{a}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}} \displaystyle:{\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}i{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}j{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{4}}\color[rgb]{0,0,0.8}k\color[rgb]{0,0,0}}Appendix D Proving the runnability lemma
Here we prove Lemma 27, the runnability lemma. Recall the statement of the Lemma:
Runnability lemma: If {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}) then {\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}).
Proof.
By induction on the typing derivation.
- Variable: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}} By the definition of \textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}) we have {\vphantom{(}\color[rgb]{0.8,0,0}\mu x\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\tau\color[rgb]{0,0,0}}).
- Choice: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}} Note that \textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0}})=\{\varepsilon\} and {\vphantom{(}\color[rgb]{0.8,0,0}\mu i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}={\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for any . We have the evaluation \varepsilon,\varepsilon,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\varepsilon,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} for the empty trace and the empty stack. Then for the frontier we have \varepsilon,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\{(\varepsilon,i)_{\varepsilon}\}, with the singleton return family of and for the empty trace. Since it follows that \{(\varepsilon,i)_{\varepsilon}\}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1i\color[rgb]{0,0,0}}).
- Zero {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}} For any we have \varepsilon,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\varnothing. Vacuously, \varnothing\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}}), since membership is defined by the quantification \forall i\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}0\color[rgb]{0,0,0}}\rfloor while the latter is empty.
- Expand: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\,\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\,\delta\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} Let R\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), S\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). The inductive hypothesis gives the evaluation S,{\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}. For each we have the evaluation below left. By induction on the evaluation relation we get the evaluation below right. t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\qquad t,RS,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,RT,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} This gives RS,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,R\,\mathcal{T}. Since R\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and \mathsf{stk}(\mathcal{T}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), where {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} is the type for in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, we have \mathsf{stk}(R\,\mathcal{T}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\,\overline{\tau}{}_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}). Since also we have R\,\mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\,\delta\color[rgb]{0,0,0}}).
- Push: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}[N].\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} Let S\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). By induction we have {\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\rho\color[rgb]{0,0,0}}) and {\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}), and for the latter the evaluation S\,{\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}. Then for every we have the evaluation below left, from which we construct the derivation below right. t,S\,{\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\qquad\vbox{\hbox{$t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu([N].\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,S\,{\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}$}} Then S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu([N].\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} and {\vphantom{(}\color[rgb]{0.8,0,0}\mu([N].\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).
- Pop: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\langle x\rangle.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} Let S\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\rho\color[rgb]{0,0,0}}), and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). Let \mu^{\prime}=\mu\{{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}/x\}, the substitution map that sends to {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} and every other variable to , so that \mu^{\prime}\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}x\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\rho\color[rgb]{0,0,0}}). By induction we have S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu^{\prime}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}, given by the evaluation below for every , from which we construct the evaluation below right. t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu^{\prime}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\qquad\vbox{\hbox{$t,S\,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(\langle x\rangle.\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu^{\prime}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}$}} Then S\,{\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(\langle x\rangle.\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} and {\vphantom{(}\color[rgb]{0.8,0,0}\mu(\langle x\rangle.\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\rho\,\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).
- Sample: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}(\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma)\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}(\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta)\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\top~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\bot~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} Let R\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}R\color[rgb]{0,0,0}}) and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). Define \mu_{\top}=\mu\{{\vphantom{(}\color[rgb]{0.8,0,0}\top\color[rgb]{0,0,0}\color[rgb]{0,0,0}}/a\} and \mu_{\bot}=\mu\{{\vphantom{(}\color[rgb]{0.8,0,0}\bot\color[rgb]{0,0,0}\color[rgb]{0,0,0}}/a\} so that \mu_{\top}\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\top\color[rgb]{0,0,0}}) and \mu_{\bot}\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}{\color[rgb]{0,0,0},}~\color[rgb]{0.8,0,0}a\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\varepsilon\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\varepsilon\color[rgb]{0,0,0.8}1\bot\color[rgb]{0,0,0}}). By induction we have return families and where R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu_{\top}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{S} and R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu_{\bot}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}, given by the following evaluations for every and . s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu_{\top}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\qquad t,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu_{\bot}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}} For these we have the following derivations. \top\,s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu_{\top}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\hskip 16.38895pt\bot\,t,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(\hbox to10.6pt{\vbox to10.6pt{\pgfpicture\makeatletter\hbox{\hskip 5.3pt\lower-2.8pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-2.24782pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -3.11 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu_{\bot}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}} Then for we have S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(\hbox to14.13pt{\vbox to11.13pt{\pgfpicture\makeatletter\hbox{\hskip 7.06433pt\lower-3.33301pt\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} \lxSVG@begingroup@{stroke=#CC0000} \lxSVG@begingroup@{fill=#CC0000} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.4pt} \lx@inpgf@ignorespaces\nullfont\hbox to0.0pt{\lxSVG@begingroup@{_scopebegin=1} {{}}\lx@inpgf@ignorespaces\hbox{\hbox{{\lxSVG@begingroup@{_scopebegin=1} {{}{}{{ {}{}}}{ {}{}} {{}{{\lx@inpgf@ignorespaces}}}{{}{\lx@inpgf@ignorespaces}}{}{{}{\lx@inpgf@ignorespaces}} {\lx@inpgf@ignorespaces }{{{{\lx@inpgf@ignorespaces}}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@transformcm{1.0}{0.0}{0.0}{1.0}{-3.73132pt}{0.0pt}\lxSVG@begingroup@{transform=matrix(1.0 0.0 0.0 1.0 -5.16 0)} \pgfsys@hbox{58}\lxSVG@closescope }}} \lxSVG@closescope }}} {\lx@inpgf@ignorespaces}{{}}{} {\lx@inpgf@ignorespaces}{{}}{}{}{}{}{{}}{}\lxSVG@begingroup@{_scopebegin=1} \lxSVG@setlinewidth{\the\pgflinewidth}\lxSVG@begingroup@{stroke-width=0.6pt} \lx@inpgf@ignorespaces{}\lxSVG@stroke\lxSVG@drawpath@unclipped{M -6.92 -3.46 M -6.92 -3.46 L -6.92 10.38 L 6.92 10.38 L 6.92 -3.46 Z M 6.92 10.38}{fill:none} \lx@inpgf@ignorespaces \lxSVG@closescope \lxSVG@closescope {\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}{\lx@inpgf@ignorespaces}\hss}\lxSVG@discardpath\lxSVG@closescope \hss}}\lxSVG@closescope\endpgfpicture}}\kern 1.0pt\color[rgb]{0.8,0,0}.\,\color[rgb]{0.8,0,0}M)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{U}. It remains to show that \mathcal{U}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}). For any indexed pair in {\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}, by the definition of ({\vphantom{)}\color[rgb]{0,0,0.8}\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) we have three cases. – {\vphantom{)}\color[rgb]{0,0,0.8}(\overline{\tau}\color[rgb]{0,0,0.8},\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}p\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle+}}}{\mathbin{\hbox{\scriptscriptstyle+}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}q))_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} where i\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor\cap\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor, {\vphantom{)}\color[rgb]{0,0,0.8}(\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p)_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\in{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}(\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}q)_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}\in{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}. Then since \mathsf{stk}(\mathcal{S}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and \mathsf{stk}(\mathcal{T}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) we have \mathsf{stk}(\mathcal{U}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), and since and we have . – {\vphantom{)}\color[rgb]{0,0,0.8}(\overline{\tau}\color[rgb]{0,0,0.8},\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}p)_{i}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} in {\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\gamma\kern 1.0pt{\setminus}\kern 1.0pt\lfloor\delta\rfloor\color[rgb]{0,0,0}}. Since \mathsf{stk}(\mathcal{S}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) we have \mathsf{stk}(\mathcal{U}\kern 1.0pt{|}\kern 1.0pti)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), and since we have . – The case for {\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{2}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\kern 1.0pt{\setminus}\kern 1.0pt\lfloor\gamma\rfloor\color[rgb]{0,0,0}} is analogous to the previous.
- Sequence: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\oplus$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\oplus$}}}{\mathbin{\hbox{$\scriptscriptstyle\oplus$}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} Let R\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). By induction we have {\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma{\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\oplus}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\oplus}}}{\mathbin{\hbox{\scriptscriptstyle\oplus}}}}\kern 2.0pt}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}) and R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{S}. Let this be given by an evaluation for each of the form below left. For each where we have S\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}), and by induction on {\vphantom{(}\color[rgb]{0.8,0,0}N\color[rgb]{0,0,0}\color[rgb]{0,0,0}} a return family such that S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}_{s}. Let this be given by the evaluation below right for each . s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}k\color[rgb]{0,0,0}\color[rgb]{0,0,0}} For each , if we construct the derivation below left, and if then for each we construct that below right. s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\hskip 16.38895pt\hskip 16.38895ptst,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.60275pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.60275pt\hbox{$\scriptstyle\rightarrow$}}}{\mathbin{\raise 0.36165pt\hbox{$\scriptscriptstyle\rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\rightarrow$}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}k\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\lx@proof@logical@and s,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu N\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}k\color[rgb]{0,0,0}\color[rgb]{0,0,0}} Then we have R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} where is given as follows. It remains to show that \mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}). – First, for the return types, for all j\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor\cup\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor we need that \mathsf{stk}(\mathcal{T}\kern 1.0pt{|}\kern 1.0ptj)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) where {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} is the type for in {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}} and {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}} (the definition of ({\vphantom{)}\color[rgb]{0,0,0.8}\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) requires that they agree). By definition any indexed pair in is either or . The former case follows since \mathcal{S}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}) and so \mathsf{stk}(\mathcal{S}\kern 1.0pt{|}\kern 1.0ptj)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and S\in\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}). The latter case follows since \mathcal{T}_{s}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}), so that \mathsf{stk}(\mathcal{S}\kern 1.0pt{|}\kern 1.0ptj)\subseteq\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and T\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}). – Second, for the probabilities, for all j\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor\cup\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor it must be shown that where is the probability of in {\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}} and that in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}. We compute as follows. For the third step (the first inequality), since \mathcal{S}\kern 1.0pt{\setminus}\kern 1.0pti\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}) we have for all j\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\gamma\color[rgb]{0,0,0}}\rfloor. For the last step, since \mathcal{T}_{s}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}) for all we have for all j\in\lfloor{\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\rfloor. Then since \mathcal{S}\kern 1.0pt{|}\kern 1.0pti\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}) we have . It follows that \mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}) and hence {\vphantom{(}\color[rgb]{0.8,0,0}\mu(M\,{;}\,i\kern 1.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\rightarrow}}}}\kern 1.0pt\color[rgb]{0.8,0,0}N)\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\rho}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\gamma\kern 2.0pt{\sqcup}\kern 2.0pt\color[rgb]{0,0,0.8}p\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).
- Iterate: {\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M^{i}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-p}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}\lx@proof@logical@and{\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}~{\color[rgb]{0,0,0}\vdash}~\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}{{}:{}}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle\Rightarrow$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle\Rightarrow$}}}{\mathbin{\hbox{$\scriptscriptstyle\Rightarrow$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\delta\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi\color[rgb]{0,0,0}}(p\neq 1) Let S\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) and \mu\in\textsc{run}({\vphantom{(}\color[rgb]{0.8,0,0}{{\color[rgb]{0,0,0}\Gamma}}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}). We construct a series of return families for all by induction on , and show the following. \mathcal{T}_{n}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}(q_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta)\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p^{n}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}})\quad\text{where}\quad q_{n}=1+p+p^{2}+p^{3}+\dots+p^{n-1} – The case is given by induction on {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} by S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}_{1}. – For the case , for each , by induction on {\vphantom{(}\color[rgb]{0.8,0,0}M\color[rgb]{0,0,0}\color[rgb]{0,0,0}} let R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}_{r} and define as follows. By induction we have \mathcal{T}_{n}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}q_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle+}}}{\mathbin{\hbox{\scriptscriptstyle+}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p^{n}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}). By similar reasoning to the previous sequencing case we have the following. \mathcal{T}_{n+1}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}q_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}p^{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}(\delta\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}pi)\color[rgb]{0,0,0}})~=~\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}q_{n+1}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.86108pt\hbox{$\scriptstyle+$}}}{\mathbin{\raise 0.51663pt\hbox{$\scriptscriptstyle+$}}}{\mathbin{\hbox{$\scriptscriptstyle+$}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p^{n+1}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}) Observe that by definition . Then we define as the following supremum. It remains to show that S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T} and \mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-p}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}). – If , then by definition for some . Assume this is the least such . Then by induction, going backwards from , we give a sequence of stacks and traces and for all such that , , , and t_{m},S_{m},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, and for . * For the case , since , by definition it is either in , which is ruled out by assumption, or it is given by an evaluation R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}_{r} with if , and otherwise and , with the evaluation below left. Let , , and . Since , this gives the derivation below right. r,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad t_{n-1},S_{n-1},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t_{n-1},S_{n-1},{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}} * For the cases , by induction let with and the evaluation below left. By the definition of , is given by an evaluation R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}_{r} with if and otherwise with , giving the evaluation below right. t_{m},S_{m},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\qquad\qquad r,R,{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S_{m},{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}} To show the statement for , let , , and , and construct the derivation below. t_{m-1},S_{m-1},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\lx@proof@logical@and s_{m-1},S_{m-1},{\vphantom{(}\color[rgb]{0.8,0,0}\mu M\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,S_{m},{\vphantom{(}\color[rgb]{0.8,0,0}i\color[rgb]{0,0,0}\color[rgb]{0,0,0}}t_{m},S_{m},{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T,{\vphantom{(}\color[rgb]{0.8,0,0}j\color[rgb]{0,0,0}\color[rgb]{0,0,0}} It follows that for every there is an evaluation t,S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,T_{t},{\vphantom{(}\color[rgb]{0.8,0,0}j_{t}\color[rgb]{0.8,0,0}\color[rgb]{0,0,0}\color[rgb]{0,0,0}}, and hence S,{\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\,{\Downarrow}\,\mathcal{T}. – For all we have \mathcal{T}_{n}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}q_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle+}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle+}}}{\mathbin{\hbox{\scriptscriptstyle+}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}p^{n}\color[rgb]{0,0,0.8}i\color[rgb]{0,0,0}}) and hence \mathcal{T}_{n}\kern 1.0pt{\setminus}\kern 1.0pti\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}q_{n}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}). Since each in is in some we have T\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}}) where {\vphantom{)}\color[rgb]{0,0,0.8}\overline{\tau}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0}} is the stack for in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}. Next, for we have where and is the probability for in {\vphantom{)}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}. This gives the following. It follows that \mathcal{T}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-p}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}) and hence {\vphantom{(}\color[rgb]{0.8,0,0}\mu(M^{i}\color[rgb]{0.8,0,0})\color[rgb]{0,0,0}\color[rgb]{0,0,0}}\in\textsc{run}({\vphantom{)}\color[rgb]{0,0,0.8}\overline{\sigma}\color[rgb]{0,0,0.8}\kern 2.0pt{\mathchoice{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.86108pt\hbox{\scriptstyle\Rightarrow}}}{\mathbin{\raise 0.51663pt\hbox{\scriptscriptstyle\Rightarrow}}}{\mathbin{\hbox{\scriptscriptstyle\Rightarrow}}}}\kern 2.0pt\color[rgb]{0,0,0.8}\textstyle{\frac{1}{1-p}}\color[rgb]{0,0,0.8}\color[rgb]{0,0,0.8}\delta\color[rgb]{0,0,0}}).
∎