Section ILSpecSect.
Global Instance ILOps: ILogicOps spec | 2.
admit.
Defined.
End ILSpecSect.
Global Notation loopy_basic := (@parameterized_basic PointedOPred OPred_pred _).

Lemma while_rule_ind {quantT}
{ptest} {cond : Condition} {value : bool} {pbody}
{S}
{transition_body : quantT -> quantT}
{P : quantT -> SPred} {Otest : quantT -> OPred} {Obody : quantT -> OPred} {O : quantT -> PointedOPred}
{O_after_test : quantT -> PointedOPred}
{I_state : quantT -> bool -> SPred}
{I_logic : quantT -> bool -> bool}
{Q : quantT -> SPred}
(Htest : S |-- (Forall (x : quantT),
(loopy_basic (P x)
ptest
(Otest x)
(Exists b, I_logic x b = true /\\ I_state x b ** ConditionIs cond b))))
(Hbody : S |-- (Forall (x : quantT),
(loopy_basic (I_logic x value = true /\\ I_state x value ** ConditionIs cond value)
pbody
(Obody x)
(P (transition_body x)))))
(H_after_test : forall x, catOP (Otest x) (O_after_test x) |-- O x)
(H_body_after_test : forall x, I_logic x value = true -> catOP (Obody x) (O (transition_body x)) |-- O_after_test x)
(H_empty : forall x, I_logic x (negb value) = true -> empOP |-- O_after_test x)
(Q_correct : forall x, I_logic x (negb value) = true /\\ I_state x (negb value) ** ConditionIs cond (negb value) |-- Q x)
(Q_safe : forall x, I_logic x value = true -> Q (transition_body x) |-- Q x)
: S |-- (Forall (x : quantT),
loopy_basic (P x)
(while ptest cond value pbody)
(O x)
(Q x)).