Section Ksafety_Clight.
(* Import DryMachineSource.THE_DRY_MACHINE_SOURCE.DMS.DryConc. Import DryMachineSource.THE_DRY_MACHINE_SOURCE.SCH. Import DryMachineSource.THE_DRY_MACHINE_SOURCE.DMS.DryMachine. *)
(** *Clight setup *)
(** We define state and step to match the type of ksafe (in konig/safety) *)
Parameter machine_event:Type.
Definition new_state: Type:= list machine_event * machine_state * mem.
Definition mk_nstate (st:MachState) m:new_state:= (snd (fst st), snd st, m).
Definition ksafe_new_step (ge : G) (st : MachState) (m : mem) : nat -> Prop :=
ksafe _ _ (new_step ge) new_valid (mk_nstate st m) (fst (fst st)).

(** *First show Csafety -> Ksafety*)
Lemma Clight_csafe2ksafe:
forall ge st_ m,
(forall U n, new_valid (nil, st_, m) U ->  csafe ge (U, nil, st_) m n) ->
(forall U n, new_valid (nil, st_, m) U -> ksafe_new_step ge (U, nil, st_) m n).