Fixpoint hardware_alignof_composite (ha_env: PTree.t Z) (m: members): Z :=
  match m with
  | nil => 1
  | (_, t) :: m' => Z.max (hardware_alignof ha_env t) (hardware_alignof_composite ha_env m')
  end.Definition hardware_alignof_env (cenv: composite_env): PTree.t Z :=
  let l := composite_reorder.rebuild_composite_elements cenv in
  fold_right (fun (ic: positive * composite) (T0: PTree.t Z) => let (i, co) := ic in let T := T0 in PTree.set i (hardware_alignof_composite T (co_members co)) T) (PTree.empty _) l.

(* Specifications: *)
Lemma aux1: forall T co, (fix fm (l : list (ident * type * Z)) : Z := match l with | nil => 1 | (_, _, ha) :: l' => Z.max ha (fm l') end) (map (fun it0 : positive * type => let (i0, t0) := it0 in (i0, t0, type_func.F (fun t : type => match access_mode t with | By_value ch => align_chunk ch | By_reference => 1 | By_copy => 1 | By_nothing => 1 end) (fun (ha : Z) (_ : type) (_: Z) (_ : attr) => ha) (fun (ha : Z) (_ : ident) (_ : attr) => ha) (fun (ha : Z) (_ : ident) (_ : attr) => ha) T t0)) (co_members co)) = hardware_alignof_composite T (co_members co).
Lemma aux2: forall (cenv: composite_env), type_func.Env (fun t : type => match access_mode t with | By_value ch => align_chunk ch | By_reference => 1 | By_copy => 1 | By_nothing => 1 end) (fun (ha : Z) (_ : type) (_: Z) (_ : attr) => ha) (fun (ha : Z) (_ : ident) (_ : attr) => ha) (fun (ha : Z) (_ : ident) (_ : attr) => ha) (fun _ : struct_or_union => fix fm (l : list (ident * type * Z)) : Z := match l with | nil => 1 | (_, _, ha) :: l' => Z.max ha (fm l') end) (composite_reorder.rebuild_composite_elements cenv) = hardware_alignof_env cenv.
Lemma hardware_alignof_two_p: forall (cenv: composite_env) (ha_env: PTree.t Z), composite_env_consistent cenv -> hardware_alignof_env_consistent cenv ha_env -> hardware_alignof_env_complete cenv ha_env -> forall t, exists n, hardware_alignof ha_env t = two_power_nat n.
Lemma hardware_alignof_pos: forall (cenv: composite_env) (ha_env: PTree.t Z), composite_env_consistent cenv -> hardware_alignof_env_consistent cenv ha_env -> hardware_alignof_env_complete cenv ha_env -> forall t, hardware_alignof ha_env t > 0.
Lemma hardware_alignof_composite_two_p: forall (cenv: composite_env) (ha_env: PTree.t Z), composite_env_consistent cenv -> hardware_alignof_env_consistent cenv ha_env -> hardware_alignof_env_complete cenv ha_env -> forall m, exists n, hardware_alignof_composite ha_env m = two_power_nat n.
Lemma hardware_alignof_by_value: forall ha_env t ch, access_mode t = By_value ch -> hardware_alignof ha_env t = align_chunk ch.
Lemma align_compatible_rec_hardware_1: forall cenv ha_env t z, composite_env_consistent cenv -> composite_env_complete_legal_cosu_type cenv -> hardware_alignof_env_consistent cenv ha_env -> hardware_alignof_env_complete cenv ha_env -> complete_legal_cosu_type cenv t = true -> hardware_alignof ha_env t = 1 -> align_compatible_rec cenv t z.