diff -r 40f03761f77f -r 403ce50e6a2a src/HOL/Hoare/SchorrWaite.thy --- a/src/HOL/Hoare/SchorrWaite.thy Mon Oct 11 21:55:21 2021 +0200 +++ b/src/HOL/Hoare/SchorrWaite.thy Tue Oct 12 20:57:43 2021 +0200 @@ -219,10 +219,11 @@ ELSE q := p; p := t; t := t^.l; p^.l := q; \ \\push\\ p^.m := True; p^.c := False FI OD {(\x. (x \ R) = m x) \ (r = iR \ l = iL) }" - (is "VARS c m l r t p q root {?Pre c m l r root} (?c1; ?c2; ?c3) {?Post c m l r}") + (is "Valid + {(c, m, l, r, t, p, q, root). ?Pre c m l r root} + (Seq _ (Seq _ (While {(c, m, l, r, t, p, q, root). ?whileB m t p} _))) + (Aseq _ (Aseq _ (Awhile {(c, m, l, r, t, p, q, root). ?inv c m l r t p} _ _))) _") proof (vcg) - let "While {(c, m, l, r, t, p, q, root). ?whileB m t p} - {(c, m, l, r, t, p, q, root). ?inv c m l r t p} _ ?body" = ?c3 { fix c m l r t p q root @@ -252,8 +253,8 @@ let "?ifB1" = "(t = Null \ t^.m)" let "?ifB2" = "p^.c" - assume "(\stack.?Inv stack) \ (p \ Null \ t \ Null \ \ t^.m)" (is "_ \ ?whileB") - then obtain stack where inv: "?Inv stack" and whileB: "?whileB" by blast + assume "(\stack.?Inv stack) \ ?whileB m t p" + then obtain stack where inv: "?Inv stack" and whileB: "?whileB m t p" by blast let "?I1 \ ?I2 \ ?I3 \ ?I4 \ ?I5 \ ?I6 \ ?I7" = "?Inv stack" from inv have i1: "?I1" and i2: "?I2" and i3: "?I3" and i4: "?I4" and i5: "?I5" and i6: "?I6" and i7: "?I7" by simp+