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 step_approx :
forall n t t' p1 p2 s1 s1' s2 r1 r1' r2,
level p2 < n ->
termMeasure_incr t t' ->
store_incr r1 r1' ->
stack_approx_rel n s1 s2 ->
step t p1 p2 r1 s1 r2 s1' ->
exists r2', exists s2',
step t' p1 p2 r1' s2 r2' s2' /\
store_incr r2 r2' /\
stack_approx_rel n s1' s2'.