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

Lemma aux2:
(type_func.Env
(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)
(fun su : struct_or_union =>
match su 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) (composite_reorder.rebuild_composite_elements cenv)) =
legal_alignas_env cenv ha_env.