(* When still inside of P, the computation in Q simulates a computation in P *)
Local Lemma compiler_complete_step p st1 w1 w3 :
snd st1 ⋈ snd w1
-> linker (fst st1) = fst w1
-> in_code (fst st1) P
-> out_code (fst w3) Q
-> Q /Y/ w1 -[p]-> w3
-> exists q st2 w2, snd st2 ⋈ snd w2
/\ linker (fst st2) = fst w2
/\ P /X/ st1 ->> st2
/\ Q /Y/ w2 -[q]-> w3
/\ q < p.
(* Termination in Q simulates termination in P *)

Corollary compiler_complete' i1 v1 w1 st :
v1 ⋈ w1 /\ Q /Y/ (linker i1,w1) ~~> st
-> exists i2 v2 w2, v2 ⋈ w2 /\ P /X/ (i1,v1) ~~> (i2,v2)
/\ Q /Y/ (linker i2,w2) ~~> st.