Section legal_alignas.
Context (cenv: composite_env) (ha_env: PTree.t Z).

Lemma aux1: forall T co,
match co_su co with
| Struct =>
(fix fm (pos : Z) (l : list (ident * type * bool)) {struct l} : bool :=
match l with
| nil => true
| (_, t, la) :: l' =>
(align pos (alignof cenv t) mod hardware_alignof ha_env t =? 0) &&
la && fm (align pos (alignof cenv t) + sizeof cenv t) l'
end) 0
| Union =>
fix fm (l : list (ident * type * bool)) : bool :=
match l with
| nil => true
| (_, _, la) :: l' => la && fm l'
end
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 _ => true
| By_reference => false
| By_copy => false
| By_nothing => false
end)
(fun (la : bool) (t : type) (_ : Z) (_ : attr) =>
(sizeof cenv t mod hardware_alignof ha_env t =? 0) && la)
(fun (la : bool) (_ : ident) (_ : attr) => la)
(fun (la : bool) (_ : ident) (_ : attr) => la) T t0))
(co_members co)) = legal_alignas_composite cenv ha_env T co.