(* Definition of the hoare relation and rules *)
Definition hoare (t:terminationMeasure) (n':nat) (G R P:pred world) (c:instruction) (Q:pred world) :=
forall t', termMeasure_incr t t' ->
forall p n k stk,
(forall s, G (p,(s,t'))) ->
(forall r', guards n R stk       (p,(r',t'))) ->
(forall r', guards n Q (k::stk)  (p,(r',t'))) ->
(forall r,  guards (n'+n) P ((c ;; k)::stk) (p,(r,t'))).

Lemma hoare_cons : forall t v1 v2 v3 x1 x2 (G R P:pred world),
hoare t 0 G R
(store_op (fun r => r#v1 = Some x1 /\ r#v2 = Some x2) &&
box (setM v3 (value_cons x1 x2)) P)
(instr_cons v1 v2 v3)
P.