Scheme context_ind2 := Minimality for context Sort Prop
with contextlist_ind2 := Minimality for contextlist Sort Prop.
Combined Scheme context_contextlist_ind from context_ind2, contextlist_ind2.

Lemma safe_inv:
forall k C f a K m,
safe (ExprState f (C a) K e m) ->
context k RV C ->
match a with
| Eloc _ _ _ => True
| Eval _ _ => True
| _ => invert_expr_prop a m
end.