$\{P\}\,\texttt{prog}\,\{\lambda\,v.\,Q\,v\}$
- There exists a state of type $s$
- $\texttt{prog}$ evaluates to a value $v : val$
- $P : s \to bool$
- $Q : val \to s \to bool$
$P_{1}\,\ast\,P_{2}$
$(P_{1}\,\ast\,P_{2})\,H$
- You can split state $H$ into $H_{1}$ and $H_{2}$
- $H_{1}$ and $H_{2}$ are disjoint
- $P_{1}\,H_{1}$ and $P_{2}\,H_{2}$ holds
$P_{1}\,-\!\!\ast\,P_{2}$
$(P_{1}\,-\!\!\ast\,P_{2})\,H$
- You can split state $H$ into $H_{1}$ and $H_{2}$
- $H_{1}$ and $H_{2}$ are disjoint
- if $P_{1}\,H_{1}$ holds then $P_{2}\,(H_{1}\,\cup\,H_{2})$ holds
$ \{a \mapsto 1 \ast b \mapsto 2 \ast c \mapsto 3\}$
$ a := b + c $
$ \{\lambda\_.\,a \mapsto 5 \ast b \mapsto 2 \ast c \mapsto 3\} $
$ \{\top\}$
$ a := b + c $
$ \{\lambda\_.\,(b \mapsto 2 \ast c \mapsto 3) -\!\!\ast\, a \mapsto 5 \} $