Open Scope pred.
(* Various utility lemmas *)
Definition instr_approx_rel (n:nat) (i1 i2:instruction) : Prop :=
fmap_instr (K.approx n) i1 = fmap_instr (K.approx n) i2.
Inductive stack_approx_rel (n:nat) : stack -> stack -> Prop :=
| stack_approx_nil : stack_approx_rel n nil nil
| stack_approx_cons : forall i i' stk stk',
instr_approx_rel n i i' ->
stack_approx_rel n stk stk' ->
stack_approx_rel n (i::stk) (i'::stk').

Lemma stepstar_approx :
forall n t t' p1 p2 s1 s1' s2 r1 r1' r2,
level p1 < n ->
termMeasure_incr t t' ->
store_incr r1 r1' ->
stack_approx_rel n s1 s2 ->
stepstar t p1 p2 r1 s1 r2 s1' ->
exists r2', exists s2',
stepstar t' p1 p2 r1' s2 r2' s2' /\
store_incr r2 r2' /\
stack_approx_rel n s1' s2'.