End cs_preserve.
Ltac make_cs_preserve cs_from cs_to :=
let coeq0 := eval cbv in (cs_preserve_env cs_from cs_to) in
let Hcoeq0 := constr: (eq_refl: coeq0 = cs_preserve_env cs_from cs_to) in
let coeq0_consistent := constr: (cs_preserve_env_consisent cs_from cs_to coeq0 Hcoeq0) in
let coeq0_complete := constr: (cs_preserve_completeness cs_from cs_to coeq0 Hcoeq0) in
refine (  {| coeq := coeq0 ;
coeq_consistent := coeq0_consistent;
coeq_complete := coeq0_complete |}).

(* Specifications: *)
Lemma sizeof_composite_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall su (m: members),
Forall
(Basics.compose
(fun t : type =>
cs_preserve_type cs_from cs_to (coeq cs_from cs_to) t = true ->
@sizeof (@cenv_cs cs_from) t = @sizeof (@cenv_cs cs_to) t /\
@alignof (@cenv_cs cs_from) t = @alignof (@cenv_cs cs_to) t) snd) m ->
true = cs_preserve_members cs_from cs_to (coeq cs_from cs_to) m ->
sizeof_composite (@cenv_cs cs_from) su m = sizeof_composite (@cenv_cs cs_to) su m.
Lemma alignof_composite_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (m: members),
Forall
(Basics.compose
(fun t : type =>
cs_preserve_type cs_from cs_to (coeq cs_from cs_to) t = true ->
@sizeof (@cenv_cs cs_from) t = @sizeof (@cenv_cs cs_to) t /\
@alignof (@cenv_cs cs_from) t = @alignof (@cenv_cs cs_to) t) snd) m ->
true = cs_preserve_members cs_from cs_to (coeq cs_from cs_to) m ->
alignof_composite (@cenv_cs cs_from) m = alignof_composite (@cenv_cs cs_to) m.
Lemma sizeof_alignof_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (t: type),
cs_preserve_type cs_from cs_to (coeq _ _) t = true ->
@sizeof (@cenv_cs cs_from) t = @sizeof (@cenv_cs cs_to) t /\
@alignof (@cenv_cs cs_from) t = @alignof (@cenv_cs cs_to) t.
Lemma sizeof_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (t: type),
cs_preserve_type cs_from cs_to (coeq _ _) t = true ->
@sizeof (@cenv_cs cs_from) t = @sizeof (@cenv_cs cs_to) t.
Lemma alignof_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (t: type),
cs_preserve_type cs_from cs_to (coeq _ _) t = true ->
@alignof (@cenv_cs cs_from) t = @alignof (@cenv_cs cs_to) t.
Lemma complete_legal_cosu_type_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (t: type),
cs_preserve_type cs_from cs_to (coeq _ _) t = true ->
@complete_legal_cosu_type (@cenv_cs cs_from) t = @complete_legal_cosu_type (@cenv_cs cs_to) t.
Lemma field_offset_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall i m,
true = cs_preserve_members cs_from cs_to (coeq cs_from cs_to) m ->
field_offset (@cenv_cs cs_from) i m = field_offset (@cenv_cs cs_to) i m.
Lemma align_compatible_rec_field_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (m: members),
true = cs_preserve_members cs_from cs_to (coeq cs_from cs_to) m ->
Forall
(Basics.compose
(fun t : type =>
cs_preserve_type cs_from cs_to (coeq cs_from cs_to) t = true ->
forall ofs : Z, @align_compatible_rec (@cenv_cs cs_from) t ofs <-> @align_compatible_rec (@cenv_cs cs_to) t ofs) snd)
m ->
forall i t,
field_type i m = Errors.OK t ->
forall ofs : Z, @align_compatible_rec (@cenv_cs cs_from) t ofs <-> @align_compatible_rec (@cenv_cs cs_to) t ofs.
Lemma align_compatible_rec_change_composite {cs_from cs_to} {CCE: change_composite_env cs_from cs_to}: forall (t: type),
cs_preserve_type cs_from cs_to (coeq _ _) t = true ->
(forall ofs, @align_compatible_rec (@cenv_cs cs_from) t ofs <-> @align_compatible_rec (@cenv_cs cs_to) t ofs).