Pipe-calculus: Difference between revisions

Line 212: Line 212:
<math>
<math>
\def\seq{\mathrel{;}}
\def\seq{\mathrel{;}}
\def\succeed{\textbf{succeed}}
\def\alt{\mid}
\def\alt{\mid}
\def\fail{\textbf{fail}}
\def\pipe{\rhd}
\def\pipe{\rhd}
\def\eq{ = ~}
\def\eq{ = ~}
</math>Sequential composition is associative with left neutral element <math>\succeed</math> and left absorbing element <math>\fail</math>.
</math>Sequential composition is associative with left neutral element <math>\top</math> and left absorbing element <math>\bot</math>.


<math>
<math>
\begin{align}
\begin{align}
(s \seq t) \seq u \eq & s \seq (t \seq u)  \\
(s \seq t) \seq u \eq & s \seq (t \seq u)  \\
\succeed \seq t \eq & t \\
\top \seq t \eq & t \\
\fail \seq t \eq & \fail \\
\bot \seq t \eq & \bot \\
\end{align}
\end{align}
</math>
</math>


Choice is associative, commutative and idempotent with neutral element <math>\fail</math> and absorbing element <math>\succeed</math>.
Choice is associative, commutative and idempotent with neutral element <math>\bot</math> and absorbing element <math>\top</math>.


<math>
<math>
Line 234: Line 232:
s \alt t \eq & t \alt s \\
s \alt t \eq & t \alt s \\
s \alt s \eq & s \\
s \alt s \eq & s \\
\succeed \alt t \eq & \succeed \\
\top \alt t \eq & \top \\
\fail \alt t \eq & t \\
\bot \alt t \eq & t \\
\end{align}
\end{align}
</math>
</math>
Line 247: Line 245:
</math>
</math>


Pipe has left neutral element <math>\fail</math> and right absorbing element <math>\succeed</math>.
Pipe has left neutral element <math>\bot</math> and right absorbing element <math>\top</math>.


<math>
<math>
\begin{align}
\begin{align}
\fail \pipe t \eq & t \\
\bot \pipe t \eq & t \\
s \pipe \succeed \eq & \succeed \\
s \pipe \top \eq & \top \\
\end{align}
\end{align}
</math>
</math>
283

edits