Definition legal_alignas_obs: Type := bool.Fixpoint legal_alignas_union_members_rec (la_env: PTree.t bool) (m: members): bool :=
  match m with
  | nil => true
  | (_, t) :: m' => (legal_alignas_type la_env t) && (legal_alignas_union_members_rec la_env m')
  end.Definition legal_alignas_composite (la_env: PTree.t bool) (co: composite): bool :=
  match co_su co with
  | Struct => legal_alignas_struct_members_rec la_env (co_members co) 0
  | Union => legal_alignas_union_members_rec la_env (co_members co)
  end.Definition legal_alignas_env: PTree.t bool :=
  let l := composite_reorder.rebuild_composite_elements cenv in
  fold_right (fun (ic: positive * composite) (T0: PTree.t bool) => let (i, co) := ic in let T := T0 in PTree.set i (legal_alignas_composite T co) T) (PTree.empty _) l.Module LegalAlignas := LegalAlignasStrong.Module LegalAlignasDefs := LegalAlignasDefsGen (LegalAlignas).

(* Specifications: *)
Theorem legal_alignas_env_consistency: forall (cenv: composite_env) (ha_env: PTree.t Z), composite_env_consistent cenv -> legal_alignas_env_consistent cenv ha_env (legal_alignas_env cenv ha_env).
Theorem legal_alignas_env_completeness: forall (cenv: composite_env) (ha_env: PTree.t Z), legal_alignas_env_complete cenv (legal_alignas_env cenv ha_env).
Lemma by_value_sound: forall t ofs, is_aligned cenv ha_env la_env t ofs = true -> (exists ch, access_mode t = By_value ch) -> align_compatible_rec cenv t ofs.
Theorem legal_alignas_soundness: legal_alignas_env_sound cenv ha_env la_env.