Closed AdamBJ closed 9 years ago
I redirected your question to professor Hur.
I guess that professor intentionally changed the definition. With this new definition, I've got no problem in solving all questions in Assignment 09. Also, I prefer professor's version because it reduces one eapply hoare_consequence_pre
and we don't need to unfold bassn
.
I prefer the version in the assignment because it gives you the weakest precondition. Anyway, the two versions are equivalent in the presence of the consequence rule.
Assignment09_00 defines hoare_if as:
But the textbook defines it as:
I think I can see why these are equivalent, but why was the definition changed for the homework? The other hoare rules are more or less the same as the versions presented in the text.