Section Preservation.
Variables
(CS : compspecs)
(ext_link : string -> ident)
(ext_link_inj : forall s1 s2, ext_link s1 = ext_link s2 -> s1 = s2).
Definition Jspec' := (@OK_spec (Concurrent_Espec unit CS ext_link)).
Open Scope string_scope.

(* Specifications: *)
Lemma preservation_Kinit
(Gamma : funspecs)
(n : nat)
(ge : genv)
(m m' : Memory.mem)
(i : nat)
(tr tr' : event_trace)
(sch : list nat)
sch'
(tp tp' : jstate ge)
(jmstep : @JuicyMachine.machine_step _ (ClightSemanticsForMachines.Clight_newSem ge) _ HybridCoarseMachine.DilMem JuicyMachineShell HybridMachineSig.HybridCoarseMachine.scheduler (i :: sch) tr tp m sch'
tr' tp' m')
(INV : @state_invariant (@OK_ty (Concurrent_Espec unit CS ext_link)) Jspec' _ Gamma (S n) (m, (tr, i :: sch, tp)))
(Phi : rmap)
(compat : mem_compatible_with tp m Phi)
(extcompat : joins (ghost_of Phi) (Some (ghost_PCM.ext_ref tt, NoneP) :: nil))
(lev : @level rmap ag_rmap Phi = S n)
(envcoh : env_coherence Jspec' ge Gamma Phi)
(sparse : @lock_sparsity lock_info (lset tp))
(lock_coh : lock_coherence' tp Phi m compat)
(safety : @threads_safety (@OK_ty (Concurrent_Espec unit CS ext_link)) Jspec' _ m tp Phi compat (S n))
(wellformed : threads_wellformed tp)
(unique : unique_Krun tp (i :: sch))
(Ei : ssrnat.leq (S i) (pos.n (num_threads tp)) = true)
(cnti : containsThread tp i)
(v1 v2 : val)
(Eci : getThreadC i tp cnti = @Kinit semC v1 v2) :
@state_invariant (@OK_ty (Concurrent_Espec unit CS ext_link)) Jspec' _ Gamma n (m', (tr', sch', tp')) \/
@state_invariant (@OK_ty (Concurrent_Espec unit CS ext_link)) Jspec' _ Gamma (S n) (m', (tr', sch', tp')).