Let's consider the following Hoare triple:
\[
\vdash \{x > 0\}\ y := x;z := x + y\ \{z > 0\}
\]
In order to prove that the triple is valid we would apply the rule of composition (or sequencing)
We know intuitively that what this means is we have to find an assertion \(r\) on the memory state such that
\[
\vdash \{x > 0\}\ y := x\ \{r(x, y, z)\} \land \vdash \{r(x, y, z)\}\ z := x + y\ \{z > 0\}
\]
So the predicate / relation \(r\) represents some assertion over the variables in our state \(\sigma \). The natural question then becomes what is this predicate? The natural approach that could be taken here is to use the weakest precondition approach.
\[
\begin {align}
\texttt {wp}(y := x,\ \texttt {wp}(z := x + y,\ z > 0)) &\equiv \\
\texttt {wp}(y := x,\ (z > 0)[z \mapsto x + y]) &\equiv \\
\texttt {wp}(y := x,\ x + y > 0)
\end {align}
\]
an equivalent way we can write this is
\[
\begin {align}
\forall \sigma ,\sigma '.\ (x > 0 \land y = x)(\sigma ) \to (s_1, \sigma ) \Downarrow \sigma ' &\to q(x, y, z)(\sigma ') \\
\forall \sigma ,\sigma '.\ (q(x, y, z) \land z' = x + y) \to (s_2, \sigma ) \Downarrow \sigma ' &\to (z' > 0)(\sigma )
\end {align}
\]
The important observation to make here is that if the Hoare triple is valid, we must have a solution for our relation \(q(x, y, z)\). Since our reasoning is furthermore predicated on the successful execution of the two statements, and we can implicitly assume we are reasoning over memory states let's simplify the above equations.
\[
\begin {align}
(x > 0 \land y = x) &\to q(x, y, z) \\
(q(x, y, z) \land z' = x + y) &\to z' > 0
\end {align}
\]
Now let's see if we can verify our earlier solution \(q(x, y, z) \triangleq x + y > 0\)
\[
\begin {align}
x > 0 \land y = x &\to x + y > 0 \\
x + y > 0 \land z' = x + y &\to z' > 0
\end {align}
\]
Clearly we can see both implications hold thus our earlier solution is indeed valid.