(* 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_weaken : forall t t' x x' (G G' R R' P P' Q Q':pred world) i,
termMeasure_incr t t' ->
x <= x' ->
G' |-- G  ->
R  |-- R' ->
P' |-- P  ->
Q  |-- Q' ->
hoare t  x  G  R  P  i Q ->
hoare t' x' G' R' P' i Q'.