(** Safety of the FineConc Machine initiliazed with X86 semantics *)
From mathcomp.ssreflect Require Import ssreflect ssrbool ssrnat ssrfun eqtype seq fintype finfun.
Module X86FineSafe.
ValObsEq ValueWD MemoryWD
X86Inj X86Context event_semantics.
Section FineConcSafe.
Context {the_program : Asm.program}
{Hsafe: Asm_core.safe_genv (@the_ge the_program)}.
Instance X86Sem : Semantics := @X86Sem the_program Hsafe.
Instance X86Inj : CoreInjections.CoreInj := X86Inj the_program Hsafe.
(** The initial memory is well-defined*)
Context {init_mem : option Memory.mem}
{init_mem_wd: forall m, init_mem = Some m -> valid_mem m}.

Lemma init_core_wd:
forall (c : semC) (v : Values.val) (args : seq Values.val)
(m : Memory.mem),
valid_val_list (id_ren m) args ->
init_mem = Some m ->
initial_core semSem 0 m c v args -> CoreInjections.core_wd (id_ren m) c.