Definition binop_stable cenv op a1 a2 : bool :=
match op with
| Cop.Oadd => match Cop.classify_add (typeof a1) (typeof a2) with
| Cop.add_case_pi t _ => complete_type cenv t
| Cop.add_case_ip _ t => complete_type cenv t
| Cop.add_case_pl t => complete_type cenv t
| Cop.add_case_lp t => complete_type cenv t
| Cop.add_default => true
end
| Cop.Osub => match Cop.classify_sub (typeof a1) (typeof a2) with
| Cop.sub_case_pi t _ => complete_type cenv t
| Cop.sub_case_pl t => complete_type cenv t
| Cop.sub_case_pp t => complete_type cenv t
| Cop.sub_default => true
end
| _ => true
end.
Section STABILITY.
Variables env env': composite_env.
Hypothesis extends: forall id co, env!id = Some co -> env'!id = Some co.

Lemma field_offset_stable: forall i id co ofs,
composite_env_consistent env ->
env ! i = Some co ->
field_offset env id (co_members co) = Errors.OK ofs ->
field_offset env' id (co_members co) = Errors.OK ofs.