Local Open Scope nat_scope.
Definition control_as_safe {Espec: OracleKind} ge n ctl1 ctl2 :=
forall (ora : OK_ty) (ve : env) (te : temp_env) (m : juicy_mem) (n' : nat),
n' <= n ->
jsafeN (@OK_spec Espec) ge n' ora (State ve te ctl1) m ->
jsafeN (@OK_spec Espec) ge n' ora (State ve te ctl2) m.
Fixpoint prebreak_cont (k: cont) : cont :=
match k with
| Kloop1 s e3 :: k' => k
| Kseq s :: k' => prebreak_cont k'
| Kloop2 s e3 :: k' => k
| Kswitch :: k' => k
| _ =>  nil (* stuck *)
end.

Lemma guard_safe_adj {Espec: OracleKind}:
forall
psi Delta P k1 k2,
current_function k1 = current_function k2 ->
(forall ora m ve te n,
jsafeN (@OK_spec Espec) psi n ora (State ve te k1) m ->
jsafeN (@OK_spec Espec) psi n ora (State ve te k2) m) ->
guard Espec psi Delta P k1 |-- guard Espec psi Delta P k2.