Why does (y  0 ^ y < 10)? My lecturer recently released solutions to an assignment. One of the questions was to determine the weakest precondition of:

{y &lt; 10} if (x &gt; 0 OR y &lt; 10) -&gt; y:=10 fi {true}


According to the provided solution, the weakest precondition of the selection command

(x &gt; 0 OR y &lt; 10) -&gt; y:=10


is

(x &gt; 0 OR y &lt; 10)


I understand how the weakest predicate was arrived at, but why does the solution then state that the total assertion is true because

 (y &lt; 10) IMPLIES EVERYWHERE (x &gt; 0 OR y &lt; 10)


Isn't y &lt; 10 weaker than (x > 0 OR y &lt; 10)? Therefore, there are potential precondition states where y &lt; 10 but x !> 0. Since the program doesn't have guards for such a condition, it then aborts.
I'm an idiot.

Of course (y &lt; 10) implies (x > 0 OR y &lt; 10). I was somehow mistaking OR for AND. I'm dumb.