(** Reflexive-transitive closure of machine step relation*)
    Inductive multi_step :
      MachState -> mem -> MachState -> mem -> Prop :=
    | Step_refl : forall ms (m : mem),
        multi_step ms m ms m
    | Step_trans : forall i U U'
                     (tp tp' tp'' : t)
                     tr tr' tr''
                     (m m' m'' : mem),
        MachStep (i :: U, tr, tp) m (U, tr ++ tr', tp') m' ->
        multi_step (U, tr ++ tr', tp') m' (U', tr ++ tr' ++ tr'', tp'') m'' ->
        multi_step (i :: U,tr,tp) m (U',tr ++ tr' ++ tr'',tp'') m''.(** Reflexive-transitive closure of machine step relation*)
    Inductive multi_step :
      MachState -> mem -> MachState -> mem -> Prop :=
    | Step_refl : forall ms (m : mem),
        multi_step ms m ms m
    | Step_trans : forall i U U'
                     (tp tp' tp'' : t)
                     tr tr' tr''
                     (m m' m'' : mem),
        MachStep (i :: U, tr, tp) m (U, tr ++ tr', tp') m' ->
        multi_step (U, tr ++ tr', tp') m' (U', tr ++ tr' ++ tr'', tp'') m'' ->
        multi_step (i :: U,tr,tp) m (U',tr ++ tr' ++ tr'',tp'') m''.(** Reflexive-transitive closure of machine step relation*)
    Inductive multi_step :
      MachState -> mem -> MachState -> mem -> Prop :=
    | Step_refl : forall ms (m : mem),
        multi_step ms m ms m
    | Step_trans : forall i U U'
                     (tp tp' tp'' : t)
                     tr tr' tr''
                     (m m' m'' : mem),
        MachStep (i :: U, tr, tp) m (U, tr ++ tr', tp') m' ->
        multi_step (U, tr ++ tr', tp') m' (U', tr ++ tr' ++ tr'', tp'') m'' ->
        multi_step (i :: U,tr,tp) m (U',tr ++ tr' ++ tr'',tp'') m''.(** Complete executions (until the schedule is empty) of the FineConc machine*)
    Inductive fine_execution :
      MachState -> mem -> MachState -> mem -> Prop :=
    | fine_completed : forall ms (m : mem),
        halted_machine ms ->
        fine_execution ms m ms m
    | fine_exec : forall i U U'
                    tp tp' tp''
                    tr tr' tr''
                    (m m' m'' : mem),
        MachStep (i :: U, tr, tp) m (U, tr ++ tr', tp') m' ->
        fine_execution (U, tr ++ tr', tp') m' (U', tr ++ tr' ++ tr'', tp'') m'' ->
        fine_execution (i :: U,tr,tp) m (U',tr ++ tr' ++ tr'',tp'') m''.(** Complete executions (until the schedule is empty) of the FineConc machine*)
    Inductive fine_execution :
      MachState -> mem -> MachState -> mem -> Prop :=
    | fine_completed : forall ms (m : mem),
        halted_machine ms ->
        fine_execution ms m ms m
    | fine_exec : forall i U U'
                    tp tp' tp''
                    tr tr' tr''
                    (m m' m'' : mem),
        MachStep (i :: U, tr, tp) m (U, tr ++ tr', tp') m' ->
        fine_execution (U, tr ++ tr', tp') m' (U', tr ++ tr' ++ tr'', tp'') m'' ->
        fine_execution (i :: U,tr,tp) m (U',tr ++ tr' ++ tr'',tp'') m''.(** Complete executions (until the schedule is empty) of the FineConc machine*)
    Inductive fine_execution :
      MachState -> mem -> MachState -> mem -> Prop :=
    | fine_completed : forall ms (m : mem),
        halted_machine ms ->
        fine_execution ms m ms m
    | fine_exec : forall i U U'
                    tp tp' tp''
                    tr tr' tr''
                    (m m' m'' : mem),
        MachStep (i :: U, tr, tp) m (U, tr ++ tr', tp') m' ->
        fine_execution (U, tr ++ tr', tp') m' (U', tr ++ tr' ++ tr'', tp'') m'' ->
        fine_execution (i :: U,tr,tp) m (U',tr ++ tr' ++ tr'',tp'') m''.

Lemma ev_elim_stable: forall m m' b ofs es (Hvalid: Mem.valid_block m b) (Hperm: Mem.perm_order'' (Some Writable) (permission_at m b ofs Cur)) (Helim: ev_elim m es m'), permission_at m b ofs Cur = permission_at m' b ofs Cur.