2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department of the University of Bologna, Italy.
8 \ / This file is distributed under the terms of the
9 \ / GNU General Public License Version 2
10 V_____________________________________________________________*)
12 include "turing/mono.ma".
14 (**************************** single final machine ****************************)
16 definition single_finalTM ≝
17 λsig.λM:TM sig.seq ? M (nop ?).
19 lemma sem_single_final: ∀sig.∀M: TM sig.∀R.
20 M ⊨ R → single_finalTM sig M ⊨ R.
21 #sig #M #R #HR #intape
22 cases (sem_seq ????? HR (sem_nop …) intape)
23 #k * #outc * #Hloop * #ta * #Hta whd in ⊢ (%→?); #Houtc
24 @(ex_intro ?? k) @(ex_intro ?? outc) % [ @Hloop | >Houtc // ]
27 lemma single_final: ∀sig.∀M: TM sig.∀q1,q2.
28 halt ? (single_finalTM sig M) q1 = true
29 → halt ? (single_finalTM sig M) q2 = true → q1=q2.
31 [#q1M #q2 whd in match (halt ???); #H destruct
33 [#q2M #_ whd in match (halt ???); #H destruct
34 |#q2nop #_ #_ @eq_f normalize @nop_single_state
39 (******************************** if machine **********************************)
41 definition if_trans ≝ λsig. λM1,M2,M3 : TM sig. λq:states sig M1.
45 if halt sig M1 s1 then
46 if s1==q then 〈inr … (inl … (start sig M2)), None ?〉
47 else 〈inr … (inr … (start sig M3)), None ?〉
48 else let 〈news1,m〉 ≝ trans sig M1 〈s1,a〉 in
52 [ inl s2 ⇒ let 〈news2,m〉 ≝ trans sig M2 〈s2,a〉 in
53 〈inr … (inl … news2),m〉
54 | inr s3 ⇒ let 〈news3,m〉 ≝ trans sig M3 〈s3,a〉 in
55 〈inr … (inr … news3),m〉
59 definition ifTM ≝ λsig. λcondM,thenM,elseM : TM sig.
60 λqacc: states sig condM.
62 (FinSum (states sig condM) (FinSum (states sig thenM) (states sig elseM)))
63 (if_trans sig condM thenM elseM qacc)
64 (inl … (start sig condM))
67 | inr s' ⇒ match s' with
68 [ inl s2 ⇒ halt sig thenM s2
69 | inr s3 ⇒ halt sig elseM s3 ]]).
71 (****************************** lifting lemmas ********************************)
72 lemma trans_if_liftM1 : ∀sig,M1,M2,M3,acc,s,a,news,move.
74 trans sig M1 〈s,a〉 = 〈news,move〉 →
75 trans sig (ifTM sig M1 M2 M3 acc) 〈inl … s,a〉 = 〈inl … news,move〉.
76 #sig * #Q1 #T1 #init1 #halt1 #M2 #M3 #acc #s #a #news #move
77 #Hhalt #Htrans whd in ⊢ (??%?); >Hhalt >Htrans %
80 lemma trans_if_liftM2 : ∀sig,M1,M2,M3,acc,s,a,news,move.
82 trans sig M2 〈s,a〉 = 〈news,move〉 →
83 trans sig (ifTM sig M1 M2 M3 acc) 〈inr … (inl … s),a〉 = 〈inr… (inl … news),move〉.
84 #sig #M1 * #Q2 #T2 #init2 #halt2 #M3 #acc #s #a #news #move
85 #Hhalt #Htrans whd in ⊢ (??%?); >Hhalt >Htrans %
88 lemma trans_if_liftM3 : ∀sig,M1,M2,M3,acc,s,a,news,move.
90 trans sig M3 〈s,a〉 = 〈news,move〉 →
91 trans sig (ifTM sig M1 M2 M3 acc) 〈inr … (inr … s),a〉 = 〈inr… (inr … news),move〉.
92 #sig #M1 * #Q2 #T2 #init2 #halt2 #M3 #acc #s #a #news #move
93 #Hhalt #Htrans whd in ⊢ (??%?); >Hhalt >Htrans %
96 lemma step_if_liftM1 : ∀sig,M1,M2,M3,acc,c0.
97 halt ? M1 (cstate ?? c0) = false →
98 step sig (ifTM sig M1 M2 M3 acc) (lift_confL sig (states ? M1) ? c0) =
99 lift_confL sig (states ? M1) ? (step sig M1 c0).
100 #sig #M1 #M2 #M3 #acc * #s #t
101 lapply (refl ? (trans ?? 〈s,current sig t〉))
102 cases (trans ?? 〈s,current sig t〉) in ⊢ (???% → %);
105 | 2,3: #s1 #l1 #Heq #Hhalt
106 |#ls #s1 #rs #Heq #Hhalt ]
107 whd in ⊢ (???(????%)); >Heq whd in ⊢ (???%);
108 whd in ⊢ (??(???%)?); whd in ⊢ (??%?); >(trans_if_liftM1 … Hhalt Heq) //
111 lemma step_if_liftM2 : ∀sig,M1,M2,M3,acc,c0.
112 halt ? M2 (cstate ?? c0) = false →
113 step sig (ifTM sig M1 M2 M3 acc) (lift_confR sig ?? (lift_confL sig ?? c0)) =
114 lift_confR sig ?? (lift_confL sig ?? (step sig M2 c0)).
115 #sig #M1 (* * #Q1 #T1 #init1 #halt1 *) #M2 #M3 #acc * #s #t
116 lapply (refl ? (trans ?? 〈s,current sig t〉))
117 cases (trans ?? 〈s,current sig t〉) in ⊢ (???% → %);
120 | 2,3: #s1 #l1 #Heq #Hhalt
121 |#ls #s1 #rs #Heq #Hhalt ]
122 whd in match (step ? M2 ?); >Heq whd in ⊢ (???%);
123 whd in ⊢ (??(???%)?); whd in ⊢ (??%?); >(trans_if_liftM2 … Hhalt Heq) //
126 lemma step_if_liftM3 : ∀sig,M1,M2,M3,acc,c0.
127 halt ? M3 (cstate ?? c0) = false →
128 step sig (ifTM sig M1 M2 M3 acc) (lift_confR sig ?? (lift_confR sig ?? c0)) =
129 lift_confR sig ?? (lift_confR sig ?? (step sig M3 c0)).
130 #sig #M1 (* * #Q1 #T1 #init1 #halt1 *) #M2 #M3 #acc * #s #t
131 lapply (refl ? (trans ?? 〈s,current sig t〉))
132 cases (trans ?? 〈s,current sig t〉) in ⊢ (???% → %);
135 | 2,3: #s1 #l1 #Heq #Hhalt
136 |#ls #s1 #rs #Heq #Hhalt ]
137 whd in match (step ? M3 ?); >Heq whd in ⊢ (???%);
138 whd in ⊢ (??(???%)?); whd in ⊢ (??%?); >(trans_if_liftM3 … Hhalt Heq) //
141 lemma trans_if_M1true_acc : ∀sig,M1,M2,M3,acc,s,a.
142 halt ? M1 s = true → s==acc = true →
143 trans sig (ifTM sig M1 M2 M3 acc) 〈inl … s,a〉 = 〈inr … (inl … (start ? M2)),None ?〉.
144 #sig #M1 #M2 #M3 #acc #s #a #Hhalt #Hacc whd in ⊢ (??%?); >Hhalt >Hacc %
147 lemma trans_if_M1true_notacc : ∀sig,M1,M2,M3,acc,s,a.
148 halt ? M1 s = true → s==acc = false →
149 trans sig (ifTM sig M1 M2 M3 acc) 〈inl … s,a〉 = 〈inr … (inr … (start ? M3)),None ?〉.
150 #sig #M1 #M2 #M3 #acc #s #a #Hhalt #Hacc whd in ⊢ (??%?); >Hhalt >Hacc %
153 (******************************** semantics ***********************************)
154 lemma sem_if: ∀sig.∀M1,M2,M3:TM sig.∀Rtrue,Rfalse,R2,R3,acc.
155 M1 ⊨ [acc: Rtrue,Rfalse] → M2 ⊨ R2 → M3 ⊨ R3 →
156 ifTM sig M1 M2 M3 acc ⊨ (Rtrue ∘ R2) ∪ (Rfalse ∘ R3).
157 #sig #M1 #M2 #M3 #Rtrue #Rfalse #R2 #R3 #acc #HaccR #HR2 #HR3 #t
158 cases (HaccR t) #k1 * #outc1 * * #Hloop1 #HMtrue #HMfalse
159 cases (true_or_false (cstate ?? outc1 == acc)) #Hacc
160 [cases (HR2 (ctape sig ? outc1)) #k2 * #outc2 * #Hloop2 #HM2
161 @(ex_intro … (k1+k2)) @(ex_intro … (lift_confR … (lift_confL … outc2))) %
162 [@(loop_merge ?????????
163 (mk_config ? (FinSum (states sig M1) (FinSum (states sig M2) (states sig M3)))
164 (inr (states sig M1) ? (inl (states sig M2) (states sig M3) (start sig M2))) (ctape ?? outc1) )
167 (lift_confL sig (states ? M1) (FinSum (states ? M2) (states ? M3)))
168 (step sig M1) (step sig (ifTM sig M1 M2 M3 acc))
169 (λc.halt sig M1 (cstate … c))
170 (λc.halt_liftL ?? (halt sig M1) (cstate … c))
173 [ #sl #tl whd in ⊢ (??%? → ?); #Hl %
174 | #sr #tr whd in ⊢ (??%? → ?); #Hr destruct (Hr) ]
175 |#c0 #Hhalt >(step_if_liftM1 … Hhalt) //
177 |whd in ⊢ (??%?); >(config_expand ?? outc1);
178 whd in match (lift_confL ????);
179 >(trans_if_M1true_acc … Hacc)
180 [% | @(loop_Some ?????? Hloop1)]
181 |cases outc1 #s1 #t1 %
183 (λc.(lift_confR … (lift_confL sig (states ? M2) (states ? M3) c)))
186 | #c0 #Hhalt >(step_if_liftM2 … Hhalt) // ]
188 |%1 @(ex_intro … (ctape ?? outc1)) %
189 [@HMtrue @(\P Hacc) | >(config_expand ?? outc2) @HM2 ]
191 |cases (HR3 (ctape sig ? outc1)) #k2 * #outc2 * #Hloop2 #HM3
192 @(ex_intro … (k1+k2)) @(ex_intro … (lift_confR … (lift_confR … outc2))) %
193 [@(loop_merge ?????????
194 (mk_config ? (FinSum (states sig M1) (FinSum (states sig M2) (states sig M3)))
195 (inr (states sig M1) ? (inr (states sig M2) (states sig M3) (start sig M3))) (ctape ?? outc1) )
198 (lift_confL sig (states ? M1) (FinSum (states ? M2) (states ? M3)))
199 (step sig M1) (step sig (ifTM sig M1 M2 M3 acc))
200 (λc.halt sig M1 (cstate … c))
201 (λc.halt_liftL ?? (halt sig M1) (cstate … c))
204 [ #sl #tl whd in ⊢ (??%? → ?); #Hl %
205 | #sr #tr whd in ⊢ (??%? → ?); #Hr destruct (Hr) ]
206 |#c0 #Hhalt >(step_if_liftM1 … Hhalt) //
208 |whd in ⊢ (??%?); >(config_expand ?? outc1);
209 whd in match (lift_confL ????);
210 >(trans_if_M1true_notacc … Hacc)
211 [% | @(loop_Some ?????? Hloop1)]
212 |cases outc1 #s1 #t1 %
214 (λc.(lift_confR … (lift_confR sig (states ? M2) (states ? M3) c)))
217 | #c0 #Hhalt >(step_if_liftM3 … Hhalt) // ]
219 |%2 @(ex_intro … (ctape ?? outc1)) %
220 [@HMfalse @(\Pf Hacc) | >(config_expand ?? outc2) @HM3 ]
225 lemma sem_if_app: ∀sig,M1,M2,M3,Rtrue,Rfalse,R2,R3,R4,acc.
226 accRealize sig M1 acc Rtrue Rfalse → M2 ⊨ R2 → M3 ⊨ R3 →
227 (∀t1,t2,t3. (Rtrue t1 t3 → R2 t3 t2) ∨ (Rfalse t1 t3 → R3 t3 t2) → R4 t1 t2) →
228 ifTM sig M1 M2 M3 acc ⊨ R4.
229 #sig #M1 #M2 #M3 #Rtrue #Rfalse #R2 #R3 #R4 #acc
230 #HRacc #HRtrue #HRfalse #Hsub
231 #t cases (sem_if … HRacc HRtrue HRfalse t)
232 #k * #outc * #Hloop #Houtc @(ex_intro … k) @(ex_intro … outc)
233 % [@Hloop] cases Houtc
234 [* #t3 * #Hleft #Hright @(Hsub … t3) %1 /2/
235 |* #t3 * #Hleft #Hright @(Hsub … t3) %2 /2/ ]
238 (* we can probably use acc_sem_if to prove sem_if *)
239 (* for sure we can use acc_sem_if_guarded to prove acc_sem_if *)
240 lemma acc_sem_if: ∀sig,M1,M2,M3,Rtrue,Rfalse,R2,R3,acc.
241 M1 ⊨ [acc: Rtrue, Rfalse] → M2 ⊨ R2 → M3 ⊨ R3 →
242 ifTM sig M1 (single_finalTM … M2) M3 acc ⊨
243 [inr … (inl … (inr … start_nop)): Rtrue ∘ R2, Rfalse ∘ R3].
244 #sig #M1 #M2 #M3 #Rtrue #Rfalse #R2 #R3 #acc #HaccR #HR2 #HR3 #t
245 cases (HaccR t) #k1 * #outc1 * * #Hloop1 #HMtrue #HMfalse
246 cases (true_or_false (cstate ?? outc1 == acc)) #Hacc
247 [lapply (sem_single_final … HR2) -HR2 #HR2
248 cases (HR2 (ctape sig ? outc1)) #k2 * #outc2 * #Hloop2 #HM2
249 @(ex_intro … (k1+k2))
250 @(ex_intro … (lift_confR … (lift_confL … outc2))) %
252 [@(loop_merge ?????????
253 (mk_config ? (states sig (ifTM sig M1 (single_finalTM … M2) M3 acc))
254 (inr (states sig M1) ? (inl ? (states sig M3) (start sig (single_finalTM sig M2)))) (ctape ?? outc1) )
257 (lift_confL sig (states ? M1) (FinSum (states ? (single_finalTM … M2)) (states ? M3)))
258 (step sig M1) (step sig (ifTM sig M1 (single_finalTM ? M2) M3 acc))
259 (λc.halt sig M1 (cstate … c))
260 (λc.halt_liftL ?? (halt sig M1) (cstate … c))
263 [ #sl #tl whd in ⊢ (??%? → ?); #Hl %
264 | #sr #tr whd in ⊢ (??%? → ?); #Hr destruct (Hr) ]
265 |#c0 #Hhalt >(step_if_liftM1 … Hhalt) //
267 |whd in ⊢ (??%?); >(config_expand ?? outc1);
268 whd in match (lift_confL ????);
269 >(trans_if_M1true_acc … Hacc)
270 [% | @(loop_Some ?????? Hloop1)]
271 |cases outc1 #s1 #t1 %
273 (λc.(lift_confR … (lift_confL sig (states ? (single_finalTM ? M2)) (states ? M3) c)))
276 | #c0 #Hhalt >(step_if_liftM2 … Hhalt) // ]
278 |#_ @(ex_intro … (ctape ?? outc1)) %
279 [@HMtrue @(\P Hacc) | >(config_expand ?? outc2) @HM2 ]
281 |>(config_expand ?? outc2) whd in match (lift_confR ????);
282 * #H @False_ind @H @eq_f @eq_f >(config_expand ?? outc2)
283 @single_final // @(loop_Some ?????? Hloop2)
285 |cases (HR3 (ctape sig ? outc1)) #k2 * #outc2 * #Hloop2 #HM3
286 @(ex_intro … (k1+k2)) @(ex_intro … (lift_confR … (lift_confR … outc2))) %
288 [@(loop_merge ?????????
289 (mk_config ? (states sig (ifTM sig M1 (single_finalTM … M2) M3 acc))
290 (inr (states sig M1) ? (inr (states sig (single_finalTM ? M2)) ? (start sig M3))) (ctape ?? outc1) )
293 (lift_confL sig (states ? M1) (FinSum (states ? (single_finalTM … M2)) (states ? M3)))
294 (step sig M1) (step sig (ifTM sig M1 (single_finalTM ? M2) M3 acc))
295 (λc.halt sig M1 (cstate … c))
296 (λc.halt_liftL ?? (halt sig M1) (cstate … c))
299 [ #sl #tl whd in ⊢ (??%? → ?); #Hl %
300 | #sr #tr whd in ⊢ (??%? → ?); #Hr destruct (Hr) ]
301 |#c0 #Hhalt >(step_if_liftM1 … Hhalt) //
303 |whd in ⊢ (??%?); >(config_expand ?? outc1);
304 whd in match (lift_confL ????);
305 >(trans_if_M1true_notacc … Hacc)
306 [% | @(loop_Some ?????? Hloop1)]
307 |cases outc1 #s1 #t1 %
309 (λc.(lift_confR … (lift_confR sig (states ? (single_finalTM ? M2)) (states ? M3) c)))
312 | #c0 #Hhalt >(step_if_liftM3 … Hhalt) // ]
314 |>(config_expand ?? outc2) whd in match (lift_confR ????);
317 |#_ @(ex_intro … (ctape ?? outc1)) %
318 [@HMfalse @(\Pf Hacc) | >(config_expand ?? outc2) @HM3 ]
323 lemma acc_sem_if_app: ∀sig,M1,M2,M3,Rtrue,Rfalse,R2,R3,R4,R5,acc.
324 M1 ⊨ [acc: Rtrue, Rfalse] → M2 ⊨ R2 → M3 ⊨ R3 →
325 (∀t1,t2,t3. Rtrue t1 t3 → R2 t3 t2 → R4 t1 t2) →
326 (∀t1,t2,t3. Rfalse t1 t3 → R3 t3 t2 → R5 t1 t2) →
327 ifTM sig M1 (single_finalTM … M2) M3 acc ⊨
328 [inr … (inl … (inr … start_nop)): R4, R5].
329 #sig #M1 #M2 #M3 #Rtrue #Rfalse #R2 #R3 #R4 #R5 #acc
330 #HRacc #HRtrue #HRfalse #Hsub1 #Hsub2
331 #t cases (acc_sem_if … HRacc HRtrue HRfalse t)
332 #k * #outc * * #Hloop #Houtc1 #Houtc2 @(ex_intro … k) @(ex_intro … outc)
334 |#H cases (Houtc1 H) #t3 * #Hleft #Hright @Hsub1 // ]
335 |#H cases (Houtc2 H) #t3 * #Hleft #Hright @Hsub2 // ]
338 lemma sem_single_final_guarded: ∀sig.∀M: TM sig.∀Pre,R.
339 GRealize sig M Pre R → GRealize sig (single_finalTM sig M) Pre R.
340 #sig #M #Pre #R #HR #intape #HPre
341 cases (sem_seq_guarded ??????? HR (Realize_to_GRealize ?? (λt.True) ? (sem_nop …)) ?? HPre) //
342 #k * #outc * #Hloop * #ta * #Hta whd in ⊢ (%→?); #Houtc
343 @(ex_intro ?? k) @(ex_intro ?? outc) % [ @Hloop | >Houtc // ]
346 lemma acc_sem_if_guarded: ∀sig,M1,M2,M3,P,P2,Rtrue,Rfalse,R2,R3,acc.
347 M1 ⊨ [acc: Rtrue, Rfalse] →
348 (GRealize ? M2 P2 R2) → (∀t,t0.P t → Rtrue t t0 → P2 t0) →
350 accGRealize ? (ifTM sig M1 (single_finalTM … M2) M3 acc)
351 (inr … (inl … (inr … start_nop))) P (Rtrue ∘ R2) (Rfalse ∘ R3).
352 #sig #M1 #M2 #M3 #P #P2 #Rtrue #Rfalse #R2 #R3 #acc #HaccR #HR2 #HP2 #HR3 #t #HPt
353 cases (HaccR t) #k1 * #outc1 * * #Hloop1 #HMtrue #HMfalse
354 cases (true_or_false (cstate ?? outc1 == acc)) #Hacc
355 [lapply (sem_single_final_guarded … HR2) -HR2 #HR2
356 cases (HR2 (ctape sig ? outc1) ?)
357 [|@HP2 [||@HMtrue @(\P Hacc)] // ]
358 #k2 * #outc2 * #Hloop2 #HM2
359 @(ex_intro … (k1+k2))
360 @(ex_intro … (lift_confR … (lift_confL … outc2))) %
362 [@(loop_merge ?????????
363 (mk_config ? (states sig (ifTM sig M1 (single_finalTM … M2) M3 acc))
364 (inr (states sig M1) ? (inl ? (states sig M3) (start sig (single_finalTM sig M2)))) (ctape ?? outc1) )
367 (lift_confL sig (states ? M1) (FinSum (states ? (single_finalTM … M2)) (states ? M3)))
368 (step sig M1) (step sig (ifTM sig M1 (single_finalTM ? M2) M3 acc))
369 (λc.halt sig M1 (cstate … c))
370 (λc.halt_liftL ?? (halt sig M1) (cstate … c))
373 [ #sl #tl whd in ⊢ (??%? → ?); #Hl %
374 | #sr #tr whd in ⊢ (??%? → ?); #Hr destruct (Hr) ]
375 |#c0 #Hhalt >(step_if_liftM1 … Hhalt) //
377 |whd in ⊢ (??%?); >(config_expand ?? outc1);
378 whd in match (lift_confL ????);
379 >(trans_if_M1true_acc … Hacc)
380 [% | @(loop_Some ?????? Hloop1)]
381 |cases outc1 #s1 #t1 %
383 (λc.(lift_confR … (lift_confL sig (states ? (single_finalTM ? M2)) (states ? M3) c)))
386 | #c0 #Hhalt >(step_if_liftM2 … Hhalt) // ]
388 |#_ @(ex_intro … (ctape ?? outc1)) %
389 [@HMtrue @(\P Hacc) | >(config_expand ?? outc2) @HM2 ]
391 |>(config_expand ?? outc2) whd in match (lift_confR ????);
392 * #H @False_ind @H @eq_f @eq_f >(config_expand ?? outc2)
393 @single_final // @(loop_Some ?????? Hloop2)
395 |cases (HR3 (ctape sig ? outc1)) #k2 * #outc2 * #Hloop2 #HM3
396 @(ex_intro … (k1+k2)) @(ex_intro … (lift_confR … (lift_confR … outc2))) %
398 [@(loop_merge ?????????
399 (mk_config ? (states sig (ifTM sig M1 (single_finalTM … M2) M3 acc))
400 (inr (states sig M1) ? (inr (states sig (single_finalTM ? M2)) ? (start sig M3))) (ctape ?? outc1) )
403 (lift_confL sig (states ? M1) (FinSum (states ? (single_finalTM … M2)) (states ? M3)))
404 (step sig M1) (step sig (ifTM sig M1 (single_finalTM ? M2) M3 acc))
405 (λc.halt sig M1 (cstate … c))
406 (λc.halt_liftL ?? (halt sig M1) (cstate … c))
409 [ #sl #tl whd in ⊢ (??%? → ?); #Hl %
410 | #sr #tr whd in ⊢ (??%? → ?); #Hr destruct (Hr) ]
411 |#c0 #Hhalt >(step_if_liftM1 … Hhalt) //
413 |whd in ⊢ (??%?); >(config_expand ?? outc1);
414 whd in match (lift_confL ????);
415 >(trans_if_M1true_notacc … Hacc)
416 [% | @(loop_Some ?????? Hloop1)]
417 |cases outc1 #s1 #t1 %
419 (λc.(lift_confR … (lift_confR sig (states ? (single_finalTM ? M2)) (states ? M3) c)))
422 | #c0 #Hhalt >(step_if_liftM3 … Hhalt) // ]
424 |>(config_expand ?? outc2) whd in match (lift_confR ????);
427 |#_ @(ex_intro … (ctape ?? outc1)) %
428 [@HMfalse @(\Pf Hacc) | >(config_expand ?? outc2) @HM3 ]
433 lemma acc_sem_if_app_guarded: ∀sig,M1,M2,M3,P,P2,Rtrue,Rfalse,R2,R3,R4,R5,acc.
434 M1 ⊨ [acc: Rtrue, Rfalse] →
435 (GRealize ? M2 P2 R2) → (∀t,t0.P t → Rtrue t t0 → P2 t0) →
437 (∀t1,t2,t3. Rtrue t1 t3 → R2 t3 t2 → R4 t1 t2) →
438 (∀t1,t2,t3. Rfalse t1 t3 → R3 t3 t2 → R5 t1 t2) →
439 accGRealize ? (ifTM sig M1 (single_finalTM … M2) M3 acc)
440 (inr … (inl … (inr … start_nop))) P R4 R5 .
441 #sig #M1 #M2 #M3 #P #P2 #Rtrue #Rfalse #R2 #R3 #R4 #R5 #acc
442 #HRacc #HRtrue #Hinv #HRfalse #Hsub1 #Hsub2
443 #t #HPt cases (acc_sem_if_guarded … HRacc HRtrue Hinv HRfalse t HPt)
444 #k * #outc * * #Hloop #Houtc1 #Houtc2 @(ex_intro … k) @(ex_intro … outc)
446 |#H cases (Houtc1 H) #t3 * #Hleft #Hright @Hsub1 // ]
447 |#H cases (Houtc2 H) #t3 * #Hleft #Hright @Hsub2 // ]