Go backward to Reasoning about Least Fixed Points Go up to Top |
C[[repeat C until B]] =
fix(lambda f. lambda s.
let s' = C[[C]]s in B[[B]]s' ->
s' [] (f s'))
C[[C; while ~B do C]] =? C[[repeat C until B]]
Proof: P(f,g) = forall s. f(C[[C]]s) = (g s)
F=(lambda f. lambda s. B[[~ B]]s -> f(C[[C]]s) [] s)
G=(lambda f. lambda s. let s' = C[[C]]s in B[[B]]s'
-> s' [] (f s'))