1. ループ全体の前提条件がループ不変条件であることの証明
goal
. . .
============================
ENTAIL Delta,
PROP ( )
LOCAL (temp _s (Vint (Int.repr 0)); temp _i (Vint (Int.repr 0));
temp _a a; temp _n (Vint (Int.repr size)))
SEP (data_at sh (tarray tuint size) (map Vint (map Int.repr contents)) a)
|-- EX i : Z,
PROP (0 <= i <= size)
LOCAL (temp _a a; temp _i (Vint (Int.repr i)); temp _n (Vint (Int.repr size));
temp _s (Vint (Int.repr (sum_Z (sublist 0 i contents)))))
SEP (data_at sh (tarray tuint size) (map Vint (map Int.repr contents)) a)
• 証明のゴールはENTAIL Delta, P |-- Q,の形をした分離論理の論理的帰結
• ENTAIL Delta, P |-- Qは「コンテキストDeltaの元でPを満たす任意の状態がQを満たす」の意