End HARDWARE_ALIGNOF_FACTS.
Module hardware_alignof_facts: HARDWARE_ALIGNOF_FACTS.

(* 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_consistency (cenv: composite_env) (ha_env: PTree.t Z):
composite_env_consistent cenv ->
ha_env = hardware_alignof_env cenv ->
forall i co ha,
cenv ! i = Some co ->
ha_env ! i = Some ha ->
ha = hardware_alignof_composite ha_env (co_members co).
Lemma hardware_alignof_completeness (cenv: composite_env) (ha_env: PTree.t Z):
ha_env = hardware_alignof_env cenv ->
forall i,
(exists co, cenv ! i = Some co) <->
(exists ha, ha_env ! i = Some ha).