source: src/common/StatusSimulation.ma @ 2533

Last change on this file since 2533 was 2530, checked in by tranquil, 7 years ago

temporary switch to cl_jump treated as cl_other
fixed script for new statement of not_costed_as_label

File size: 34.7 KB
Line 
1(**************************************************************************)
2(*       ___                                                              *)
3(*      ||M||                                                             *)
4(*      ||A||       A project by Andrea Asperti                           *)
5(*      ||T||                                                             *)
6(*      ||I||       Developers:                                           *)
7(*      ||T||         The HELM team.                                      *)
8(*      ||A||         http://helm.cs.unibo.it                             *)
9(*      \   /                                                             *)
10(*       \ /        This file is distributed under the terms of the       *)
11(*        v         GNU General Public License Version 2                  *)
12(*                                                                        *)
13(**************************************************************************)
14
15include "common/StructuredTraces.ma".
16
17(* We work with two relations on states in parallel, as well as two derived ones.
18   sem_rel is the classic semantic relation between states, keeping track of
19   memory and how program counters are mapped between languages.
20   call_rel keeps track of what pcs corresponding calls have and just that:
21   this is different than corresponance between program counters in sem_rel when
22   CALL f ↦ instr* CALL f instr* *)
23
24record status_rel
25  (S1 : abstract_status)
26  (S2 : abstract_status)
27  : Type[1] ≝
28  { sem_rel :2> S1 → S2 → Prop
29  (* this is kept separate, as not necessarily carrier will
30     synchronise on calls. It should state the minimal properties
31     necessary for as_after_return (typically just the program counter)
32     maybe what function is called too? *)
33  ; call_rel : (Σs.as_classifier S1 s cl_call) →
34               (Σs.as_classifier S2 s cl_call) → Prop
35  ; sim_final :
36    ∀st1,st2.sem_rel st1 st2 → as_final … st1 ↔ as_final … st2
37  }.
38
39(* The two derived relations are
40   label_rel which tells that the two states are colabelled
41   ret_rel which tells that two return states are in relation: the idea is that
42   it happens when "going back" through as_after_return on one side we get
43   a pair of call_rel related states, then we enjoy as_after_return also on the
44   other. Roughly call_rel will store just enough information so that we can
45   advance locally on a return step and build structured traces any way *)
46
47(* if we later generalise, we should move this inside status_rel *)
48definition label_rel ≝ λS1,S2,st1,st2.as_label S1 st1 = as_label S2 st2.
49
50definition ret_rel ≝ λS1,S2.λR : status_rel S1 S2.
51  λs1_ret,s2_ret.
52  ∀s1_pre,s2_pre.as_after_return S1 s1_pre s1_ret →
53                 call_rel ?? R s1_pre s2_pre →
54                 as_after_return S2 s2_pre s2_ret.
55
56(* the equivalent of a collapsable trace_any_label where we do not force
57   costedness of the lookahead status *)
58inductive trace_any_any_free (S : abstract_status) : S → S → Type[0] ≝
59| taaf_base : ∀s.trace_any_any_free S s s
60| taaf_step : ∀s1,s2,s3.trace_any_any S s1 s2 → as_execute S s2 s3 →
61  as_classifier S s2 cl_other →
62  trace_any_any_free S s1 s3.
63
64definition taaf_non_empty ≝ λS,s1,s2.λtaaf : trace_any_any_free S s1 s2.
65match taaf with
66[ taaf_base _ ⇒ false
67| taaf_step _ _ _ _ _ _ ⇒ true
68].
69
70(* the base property we ask for simulation to work depends on the status_class
71   S will mark semantic relation, C call relation, L label relation, R return relation *)
72
73definition status_simulation ≝
74  λS1 : abstract_status.
75  λS2 : abstract_status.
76  λsim_status_rel : status_rel S1 S2.
77    ∀st1,st1',st2.as_execute S1 st1 st1' →
78    sim_status_rel st1 st2 →
79    match as_classify … st1 with
80    [ cl_call ⇒ ∀prf.
81      (*
82           st1' ------------S----------\
83            ↑ \                         \
84           st1 \--L--\                   \
85            | \       \                   \
86            S  \-C-\  st2_after_call →taa→ st2'
87            |       \     ↑
88           st2 →taa→ st2_pre_call
89      *)
90      ∃st2_pre_call.
91      as_call_ident ? st2_pre_call = as_call_ident ? («st1, prf») ∧
92      call_rel ?? sim_status_rel «st1, prf» st2_pre_call ∧
93      ∃st2_after_call,st2'.
94      ∃taa2 : trace_any_any … st2 st2_pre_call.
95      ∃taa2' : trace_any_any … st2_after_call st2'.
96      as_execute … st2_pre_call st2_after_call ∧
97      sim_status_rel st1' st2' ∧
98      label_rel … st1' st2_after_call
99    | cl_return ⇒
100      (*
101           st1
102          / ↓
103         | st1'----------S,L------------\
104         S   \                           \
105          \   \-----R-------\            |     
106           \                 |           |
107           st2 →taa→ st2_ret |           |
108                        ↓   /            |
109                   st2_after_ret →taaf→ st2'
110
111         we also ask that st2_after_ret be not labelled if the taaf tail is
112         not empty
113      *)
114      ∃st2_ret,st2_after_ret,st2'.
115      ∃taa2 : trace_any_any … st2 st2_ret.
116      ∃taa2' : trace_any_any_free … st2_after_ret st2'.
117      (if taaf_non_empty … taa2' then ¬as_costed … st2_after_ret else True) ∧
118      as_classifier … st2_ret cl_return ∧
119      as_execute … st2_ret st2_after_ret ∧ sim_status_rel st1' st2' ∧
120      ret_rel … sim_status_rel st1' st2_after_ret ∧
121      label_rel … st1' st2'
122    | _ ⇒
123        (*         
124        st1 → st1'
125          |      \
126          S      S,L
127          |        \
128         st2 →taaf→ st2'
129         
130         the taaf can be empty (e.g. tunneling) but we ask it must not be the
131         case when both st1 and st1' are labelled (we would be able to collapse
132         labels otherwise)
133       *)
134      ∃st2'.
135      ∃taa2 : trace_any_any_free … st2 st2'.
136      (if taaf_non_empty … taa2 then True else (¬as_costed … st1 ∨ ¬as_costed … st1')) ∧
137      sim_status_rel st1' st2' ∧
138      label_rel … st1' st2'
139(*    | cl_jump ⇒
140      (*
141          st1 → st1'           st1 → st1'--------\
142          |    /               |                  \
143          S  S,L       or      S                  S,L
144          |  /                 |                    \
145          st2                 st2 →collapsable tal→ st2'
146      *)
147      (¬as_costed … st1 (* st1' will necessarily be costed *) ∧
148       sim_status_rel st1' st2 ∧ label_rel … st1' st2) ∨
149      (∃st2'.∃tal : trace_any_label … doesnt_end_with_ret st2 st2'.
150        tal_collapsable … tal ∧
151        sim_status_rel st1' st2' ∧ label_rel … st1' st2')*)
152    ].
153
154
155(* some useful lemmas *)
156
157let rec taa_append_taa S st1 st2 st3
158  (taa : trace_any_any S st1 st2) on taa :
159  trace_any_any S st2 st3 →
160  trace_any_any S st1 st3 ≝
161  match taa
162  with
163  [ taa_base st1' ⇒ λst3,taa2.taa2
164  | taa_step st1' st2' st3' H I J tl ⇒ λst3,taa2.
165    taa_step ???? H I J (taa_append_taa … tl taa2)
166  ] st3.
167
168lemma associative_taa_append_tal : ∀S,s1,s2,fl,s3,s4.
169  ∀taa1 : trace_any_any S s1 s2.
170  ∀taa2 : trace_any_any S s2 s3.
171  ∀tal : trace_any_label S fl s3 s4.
172  (taa_append_taa … taa1 taa2) @ tal = taa1 @ taa2 @ tal.
173#S #s1 #s2 #fl #s3 #s4 #taa1 elim taa1 -s1 -s2
174[ #s1 #taa2 #tal %
175| #s1 #s1_mid #s2 #H #I #J #tl #IH #taa2 #tal
176  normalize >IH %
177]
178qed.
179
180lemma associative_taa_append_taa : ∀S,s1,s2,s3,s4.
181  ∀taa1 : trace_any_any S s1 s2.
182  ∀taa2 : trace_any_any S s2 s3.
183  ∀taa3 : trace_any_any S s3 s4.
184  taa_append_taa … (taa_append_taa … taa1 taa2) taa3 =
185  taa_append_taa … taa1 (taa_append_taa … taa2 taa3).
186#S #s1 #s2 #s3 #s4 #taa1 elim taa1 -s1 -s2
187[ #s1 #taa2 #tal %
188| #s1 #s1_mid #s2 #H #I #J #tl #IH #taa2 #tal
189  normalize >IH %
190]
191qed.
192
193let rec taa_append_tal_rel S1 fl1 st1 st1'
194  (tal1 : trace_any_label S1 fl1 st1 st1')
195  S2 st2 st2mid fl2 st2'
196  (taa2 : trace_any_any S2 st2 st2mid)
197  (tal2 : trace_any_label S2 fl2 st2mid st2')
198  on tal1 :
199  tal_rel … tal1 tal2 →
200  tal_rel … tal1 (taa2 @ tal2) ≝
201match tal1 return λfl1,st1,st1',tal1.? with
202  [ tal_base_not_return st1 st1' _ _ _ ⇒ ?
203  | tal_base_return st1 st1' _ _ ⇒ ?
204  | tal_base_call st1 st1' st1'' _ prf _ tlr1 _ ⇒ ?
205  | tal_step_call fl1 st1 st1' st1'' st1''' _ prf _ tlr1 _ tl1 ⇒ ?
206  | tal_step_default fl1 st1 st1' st1'' _ tl1 _ _ ⇒ ?
207  ].
208[ * #EQfl *#st2mid *#taa2' *#H2 *#G2 *#K2 #EQ
209| * #EQfl *#st2mid *#taa2' *#H2 *#G2 #EQ
210| * #EQfl *#st2mid *#G2 *#EQcall *#taa2' *#st2mid' *#H2 *
211  [ *#K2 *#tlr2 *#L2 * #EQ #EQ'
212  | *#st2mid'' *#K2 *#tlr2 *#L2 *#tl2 ** #EQ #EQ' #coll
213  ]
214| * #st2mid *#G2 *#EQcall *#taa2' *#st2mid' *#H2 *
215  [ * #EQfl *#K2 *#tlr2 *#L2 ** #EQ #coll #EQ'
216  | *#st2mid'' *#K2 *#tlr2 *#L2 *#tl2 ** #EQ #EQ' #EQ''
217  ]
218| whd in ⊢ (%→%); @(taa_append_tal_rel … tl1)
219]
220destruct
221<associative_taa_append_tal
222  [1,2,3,4:%{(refl …)}] %{st2mid}
223  [1,2:|*: %{G2} %{EQcall} ]
224  %{(taa_append_taa … taa2 taa2')}
225  [1,2: %{H2} %{G2} [%{K2}] %
226  |*: %{st2mid'} %{H2}
227    [1,3: %1 [|%{(refl …)}] |*: %2 %{st2mid''} ]
228    %{K2} %{tlr2} %{L2} [3,4: %{tl2} ] /3 by conj/
229  ]
230qed.
231
232let rec tal_end_costed S st1 st2 (tal : trace_any_label S doesnt_end_with_ret st1 st2)
233  on tal : as_costed … st2 ≝
234  match tal return λfl,st1,st2,tal.fl = doesnt_end_with_ret → as_costed ? st2 with
235  [ tal_step_call fl' _ _ st1' st2' _ _ _ _ _ tl ⇒ λprf.tal_end_costed ? st1' st2' (tl⌈trace_any_label ????↦?⌉)
236  | tal_step_default fl' _ st1' st2' _ tl _ _ ⇒ λprf.tal_end_costed ? st1'st2' (tl⌈trace_any_label ????↦?⌉)
237  | tal_base_not_return _ st2' _ _ K ⇒ λ_.K
238  | tal_base_return _ _ _ _ ⇒ λprf.⊥
239  | tal_base_call _ _ st2' _ _ _ _ K ⇒ λ_.K
240  ] (refl …).
241[ destruct
242|*: >prf %
243]
244qed.
245
246lemma taa_end_not_costed : ∀S,s1,s2.∀taa : trace_any_any S s1 s2.
247  if taa_non_empty … taa then ¬as_costed … s2 else True.
248#S #s1 #s2 #taa elim taa -s1 -s2 normalize nodelta
249[ #s1 %
250| #s1 #s2 #s3 #H #G #K #tl lapply K lapply H cases tl -s2 -s3
251  [ #s2 #H #K #_ assumption
252  | #s2 #s3 #s4 #H' #G' #K' #tl' #H #K #I @I
253  ]
254]
255qed.
256
257let rec tal_collapsable_to_rel S fl st1 st2
258  (tal : trace_any_label S fl st1 st2) on tal :
259  tal_collapsable ???? tal → ∀S2,st12,st22,H,I,J.
260  tal_rel … tal (tal_base_not_return S2 st12 st22 H I J) ≝
261  match tal return λfl,st1,st2,tal.tal_collapsable ???? tal → ∀S2,st12,st22,H,I,J.
262  tal_rel … tal (tal_base_not_return S2 st12 st22 H I J)
263  with
264  [ tal_step_default fl' _ st1' st2' _ tl _ _ ⇒ tal_collapsable_to_rel ???? tl
265  | tal_base_not_return _ st2' _ _ K ⇒ ?
266  | _ ⇒ Ⓧ
267  ].
268* #S2 #st12 #st22 #H #I #J % %[|%{(taa_base ??)} %[|%[|%[| %
269qed.
270
271let rec tal_collapsable_eq_flag S fl st1 st2
272  (tal : trace_any_label S fl st1 st2) on tal :
273  tal_collapsable ???? tal → fl = doesnt_end_with_ret ≝
274  match tal return λfl,st1,st2,tal.tal_collapsable ???? tal → fl = ?
275  with
276  [ tal_step_default fl' _ st1' st2' _ tl _ _ ⇒ tal_collapsable_eq_flag ???? tl
277  | tal_base_not_return _ st2' _ _ K ⇒ λ_.refl …
278  | _ ⇒ Ⓧ
279  ].
280
281let rec tal_collapsable_split S fl st1 st2
282  (tal : trace_any_label S fl st1 st2) on tal :
283  tal_collapsable ???? tal → ∃st2_mid.∃taa : trace_any_any S st1 st2_mid.∃H,I,J.
284  tal ≃ taa @ tal_base_not_return … st2 H I J ≝
285  match tal return λfl,st1,st2,tal.tal_collapsable ???? tal → ∃st2_mid,taa,H,I,J.
286  tal ≃ taa @ tal_base_not_return … st2_mid ? H I J
287  with
288  [ tal_step_default fl' st1' st2' st3' H tl I J ⇒ ?
289  | tal_base_not_return st1' st2' H I J ⇒ ?
290  | _ ⇒ Ⓧ
291  ].
292[ * %{st1'} %{(taa_base …)} %{H} %{I} %{J} %
293| #coll
294  elim (tal_collapsable_split … tl coll) #st2_mid * #taa * #H' * #I' *#J'
295  #EQ %{st2_mid} %{(taa_step … taa)} try assumption
296  %{H'} %{I'} %{J'} lapply EQ lapply tl >(tal_collapsable_eq_flag … coll) -tl #tl
297  #EQ >EQ %
298]
299qed.
300
301lemma tal_collapsable_to_rel_symm : ∀S,fl,st1,st2,tal.
302tal_collapsable S fl st1 st2 tal → ∀S2,st12,st22,H,I,J.
303  tal_rel … (tal_base_not_return S2 st12 st22 H I J) tal.
304#S #fl #st1 #st2 #tal #coll #S2 #st12 #st22 #H #I #J
305elim (tal_collapsable_split … coll) lapply tal
306 >(tal_collapsable_eq_flag … coll) -tal #tal
307#st2_mid * #taa *#H' *#I' *#J' #EQ >EQ % [%]
308%[|%[|%[|%[|%[| % ]]]]]
309qed.
310
311definition taaf_append_tal : ∀S,st1,fl,st2,st3.
312  ∀taaf.if taaf_non_empty S st1 st2 taaf then ¬as_costed S st2 else True → trace_any_label S fl st2 st3 →
313  trace_any_label S fl st1 st3 ≝ λS,st1,fl,st2,st3,taaf.
314  match taaf return λst1,st2,taaf.if taaf_non_empty S st1 st2 taaf then ¬as_costed S st2 else True → trace_any_label S fl st2 st3 →
315  trace_any_label S fl st1 st3 with
316  [ taaf_base s ⇒ λ_.λtal.tal
317  | taaf_step s1 s2 s3 hd H I ⇒ λJ,tal.hd @ tal_step_default ????? H tal I J
318  ].
319
320lemma taaf_append_tal_rel : ∀S1,fl1,st1,st1',S2,fl2,st2_pre,st2,st2',tal1,taaf2,H,tal2.
321  tal_rel S1 fl1 st1 st1' S2 fl2 st2 st2' tal1 tal2 →
322  tal_rel … tal1 (taaf_append_tal S2 st2_pre … taaf2 H tal2).
323#H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9 #H10 * -H7 -H8 normalize //
324#H16 #H17 #H18 #H19 #H20 #H21 #H22 #H23 #H24
325change with (taa_step ???? ??? (taa_base ??) @ H23) in match (tal_step_default ?????????);
326<associative_taa_append_tal /2 by taa_append_tal_rel/
327qed.
328
329(* little helpers *)
330lemma if_else_True : ∀b,P.P → if b then P else True.
331* // qed-.
332lemma if_then_True : ∀b,P.P → if b then True else P.
333* // qed-.
334
335include alias "basics/logic.ma".
336
337let rec status_simulation_produce_tlr S1 S2 R
338(* we start from this situation
339     st1 →→→→tlr→→→→ st1'
340      | \
341      L  \---S--\
342      |          \
343   st2_lab →taa→ st2   (the taa preamble is in general either empty or given
344                        by the preceding call)
345   
346   and we produce
347     st1 →→→→tlr→→→→ st1'
348             \\      /  \
349             //     R    \-L,S-\
350             \\     |           \
351   st2_lab →tlr→ st2_mid →taaf→ st2'
352*)
353  st1 st1' st2_lab st2
354  (tlr1 : trace_label_return S1 st1 st1')
355  (taa2_pre : trace_any_any S2 st2_lab st2)
356  (sim_execute : status_simulation S1 S2 R)
357  on tlr1 : R st1 st2 → label_rel … st1 st2_lab →
358  ∃st2_mid.∃st2'.
359  ∃tlr2 : trace_label_return S2 st2_lab st2_mid.
360  ∃taa2 : trace_any_any_free … st2_mid st2'.
361  (if taaf_non_empty … taa2 then ¬as_costed … st2_mid else True) ∧
362  R st1' st2' ∧ ret_rel … R st1' st2_mid ∧ label_rel … st1' st2' ∧
363  tlr_rel … tlr1 tlr2 ≝
364 match tlr1 with
365 [ tlr_base st1 st1' tll1 ⇒ ?
366 | tlr_step st1 st1_mid st1' tll1 tl1 ⇒ ?
367 ]
368and status_simulation_produce_tll S1 S2 R
369(* we start from this situation
370     st1 →→→→tll→→→ st1'
371      | \
372      L  \---S--\
373      |          \
374   st2_lab →taa→ st2
375   
376   and if the tll is a returning one we produce a diagram like the one for tlr,
377   otherwise a simpler:
378     st1 →→→→tll→→→→ st1'
379             \\       |
380             //      L,S
381             \\       |
382   st2_lab →→→tll→→→ st2'
383*)
384  fl st1 st1' st2_lab st2
385  (tll1 : trace_label_label S1 fl st1 st1')
386  (taa2_pre : trace_any_any S2 st2_lab st2)
387  (sim_execute : status_simulation S1 S2 R)
388   on tll1 : R st1 st2 → label_rel … st1 st2_lab →
389    match fl with
390    [ ends_with_ret ⇒
391      ∃st2_mid.∃st2'.
392      ∃tll2 : trace_label_label S2 ends_with_ret st2_lab st2_mid.
393      ∃taa2 : trace_any_any_free … st2_mid st2'.
394      (if taaf_non_empty … taa2 then ¬as_costed … st2_mid else True) ∧
395      R st1' st2' ∧ ret_rel … R st1' st2_mid ∧ label_rel … st1' st2' ∧
396      tll_rel … tll1 tll2
397    | doesnt_end_with_ret ⇒
398      ∃st2'.∃tll2 : trace_label_label S2 doesnt_end_with_ret st2_lab st2'.
399      R st1' st2' ∧ label_rel … st1' st2' ∧ tll_rel … tll1 tll2
400    ] ≝
401  match tll1 with
402  [ tll_base fl1' st1' st1'' tal1 H ⇒ ?
403  ]
404and status_simulation_produce_tal S1 S2 R
405(* we start from this situation
406     st1 →→tal→→ st1'
407      |
408      S
409      |
410     st2
411   
412   and if the tal is a returning one we produce a diagram like the one for tlr,
413   otherwise we allow for two possibilities:
414   either
415
416     st1 →→tal→→ st1'
417            \\    |
418            //   L,S
419            \\    |
420     st2 →→tal→→ st2'
421
422   or we do not advance from st2:
423
424     st1 →→tal→→ st1'  collapsable, and st1 uncosted
425                /
426         /-L,S-/
427        /
428     st2
429*)
430  fl st1 st1' st2
431  (tal1 : trace_any_label S1 fl st1 st1')
432  (sim_execute : status_simulation S1 S2 R)
433   on tal1 : R st1 st2 →
434    match fl with
435    [ ends_with_ret ⇒
436      ∃st2_mid.∃st2'.
437      ∃tal2 : trace_any_label S2 ends_with_ret st2 st2_mid.
438      ∃taa2 : trace_any_any_free … st2_mid st2'.
439      (if taaf_non_empty … taa2 then ¬as_costed … st2_mid else True) ∧
440      R st1' st2' ∧ ret_rel … R st1' st2_mid ∧ label_rel … st1' st2' ∧
441      tal_rel … tal1 tal2
442    | doesnt_end_with_ret ⇒
443      (∃st2'.∃tal2 : trace_any_label S2 doesnt_end_with_ret st2 st2'.
444       R st1' st2' ∧ label_rel … st1' st2' ∧ tal_rel … tal1 tal2) ∨
445      (* empty *)
446      (R st1' st2 ∧ label_rel … st1' st2 ∧ tal_collapsable … tal1 ∧ ¬as_costed … st1)
447    ] ≝
448  match tal1 with
449  [ tal_base_not_return st1' st1'' H G K ⇒ ?
450  | tal_base_return st1' st1'' H G ⇒ ?
451  | tal_base_call st1_pre_call st1_after_call st1' H G K tlr1 L ⇒ ?
452  | tal_step_call fl1' st1' st1'' st1''' st1'''' H G L tlr1 K tl1 ⇒ ?
453  | tal_step_default fl1' st1' st1'' st1''' H tl1 G K ⇒ ?
454  ].
455#st1_R_st2
456[1,2,3: #st1_L_st2_lab ]
457[ (* tlr_base *)
458  elim (status_simulation_produce_tll … tll1 taa2_pre sim_execute st1_R_st2 st1_L_st2_lab)
459  #st2_mid * #st2' * #tll2 #H
460  %{st2_mid} %{st2'} %{(tlr_base … tll2)} @H
461| (* tlr_step *)
462  elim (status_simulation_produce_tll … tll1 taa2_pre sim_execute st1_R_st2 st1_L_st2_lab)
463  #st2_mid * #tll2 ** #H1 #H2 #H3
464  elim (status_simulation_produce_tlr … tl1 (taa_base …) sim_execute H1 H2)
465  #st2_mid' * #st2' * #tl2 * #taa2 * #H4 #H5
466  %{st2_mid'} %{st2'} %{(tlr_step … tll2 tl2)} %{taa2}
467  %{H4} %{H3 H5}
468| (* tll_base *)
469  lapply (status_simulation_produce_tal … st2 tal1 sim_execute st1_R_st2)
470  cases fl1' in tal1; normalize nodelta #tal1 *
471  [3: * #_ #ABS elim (absurd … H ABS) ]
472  [ #st2_mid ] * #st2' * #tal2 [* #taa2 ] * #H1 #H2
473  [%{st2_mid}] %{st2'} %{(tll_base … (taa_append_tal … taa2_pre tal2) ?)}
474  [1,3: whd <st1_L_st2_lab assumption
475  |*: [%{taa2} ] %{H1} %
476    [1,3: change with (opt_safe ??? = opt_safe ???)
477      @opt_safe_elim #a #EQ1
478      @opt_safe_elim #b <st1_L_st2_lab >EQ1 #EQ2  destruct %
479    |*: @taa_append_tal_rel assumption
480    ]
481  ]
482| (* tal_base_non_return *) whd
483  cases G -G #G
484  lapply (sim_execute … H st1_R_st2)
485  (* without try it fails... why? *)
486  try >G in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); *
487  #st2' ** -st2 -st2'
488  [1,3: #st2 (* taa2 empty → st1' must be not cost_labelled *)
489    ** whd in ⊢ (%→?); *
490    [1,3: #ncost #R' #L' %2 /4 by conj/
491    |*: * #ABS elim (ABS K)
492    ]
493  |*: #st2 #st2_mid #st2' #taa2 #H2 #I2 *** #st1_R_st2' #st1_L_st2' %1
494    %{st2'} %{(taa_append_tal … taa2 (tal_base_not_return … H2 (or_intror ?? I2) ?))}
495    [1,3: whd <st1_L_st2' assumption ]
496    % [1,3: /2 by conj/]
497    % try @refl %{st2_mid} %{taa2} %{H2} %[2,4: %[2,4: %]]
498  ]
499| (* tal_base_return *) whd
500  lapply (sim_execute … H st1_R_st2)
501  >G in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); *
502  #st2_pre_ret * #st2_after_ret * #st2' * #taa2 * #taa2'
503  ***** #ncost #J2 #K2
504  #st1_Rret_st2' #st1_Rret_st2' #st1_L_st2'
505  %[2,4:%[2,4: %{(taa_append_tal … taa2 (tal_base_return … K2 J2))} %{taa2'}
506  % [ /4 by conj/ ]
507  %[ % | %[|%[|%[|%[| % ]]]]]]]
508| (* tal_base_call *) whd
509  lapply (sim_execute … H st1_R_st2)
510  >G in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?);
511  #H elim (H G) -H
512  * #st2_pre_call #G2 ** #EQcall #st1_C_st2 * #st2_after_call * #st2_mid *#taa2 *#taa2' ** #H2
513  #st1_R_st2_mid #st1_L_st2_after_call
514  elim (status_simulation_produce_tlr … tlr1 taa2' sim_execute st1_R_st2_mid st1_L_st2_after_call)
515  #st2_after_ret * #st2' * #tlr2 * #taa2'' lapply tlr2 cases taa2'' -st2_after_ret -st2'
516  [ #st2' #tlr2 *****
517  | #st2_after_ret #st2_after_ret' #st2' #taa2''
518    #I2 #J2 #tlr2 **** #ncost
519  ]
520  #st1_R_st2' #st1_Rret_st2' #st1_L_st2' #S %1
521  %{st2'}
522  [ %{(taa2 @ tal_base_call ???? H2 G2 ? tlr2 ?)}
523    [3: % [ % assumption ]
524      % [%] %[|%[| %{EQcall} %[|%[|%[| %1 %[|%[|%[| %{S} % ]]]]]]]]
525    ]
526  | %{(taa2 @ tal_step_call ?????? H2 G2 ? tlr2 ncost (taa2'' @ tal_base_not_return … I2 (or_intror ?? J2) ?))}
527    [3: % [ % assumption ]
528      % [%] %[|%[| %{EQcall} %[|%[|%[| %2 %[|%[|%[|%[|%[| % [ %{S} % ] /2 by taa_append_collapsable, I/
529      ]]]]]]]]]]
530    ]
531  ]
532  [1,3: @(st1_Rret_st2' … st1_C_st2) assumption
533  |*: whd <st1_L_st2' assumption
534  ]
535| (* tal_step_call *)
536  lapply (sim_execute … H st1_R_st2)
537  >G in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?);
538  #H elim (H G) -H
539  * #st2_pre_call #G2 ** #EQcall #st1_C_st2 * #st2_after_call * #st2_mid *#taa2 *#taa2' ** #H2
540  #st1_R_st2_mid #st1_L_st2_after_call
541  elim (status_simulation_produce_tlr … tlr1 taa2' sim_execute st1_R_st2_mid st1_L_st2_after_call)
542  #st2_after_ret * #st2' * #tlr2 * #taa2''
543  ****
544  #taa_ncost #st1_R_st2' #st1_Rret_st2' #st1_L_st2' #S
545  lapply (status_simulation_produce_tal … tl1 sim_execute st1_R_st2')
546  cases fl1' in tl1; #tl1 *
547  [ #st2'' * #st2''' * #tl2 * #taa2''' **** #ncost' #st1_R_st2''' #st1_Rret_st2'' #st1_L_st2''' #S'
548    %[|%[| %{(taa2 @ tal_step_call ?????? H2 G2 ? tlr2 ? (taaf_append_tal … taa2'' ? tl2))}
549    [4: %{taa2'''} % [ /4 by conj/ ]
550      %[|%[| %{EQcall} %[|%[|%[| %2 %[|%[|%[|%[|%[| %{S} % [ % ] @taaf_append_tal_rel @S' ]]]]]]]]]]
551    ]]] 
552  | *#st2'' *#tl2 ** #st1_R_st2'' #st1_L_st2'' #S' %1
553    %[| %{(taa2 @ tal_step_call ?????? H2 G2 ? tlr2 ? (taaf_append_tal … taa2'' ? tl2))}
554    [4: % [ /2 by conj/ ]
555      %[|%[| %{EQcall} %[|%[|%[| %2 %[|%[|%[|%[|%[| %{S} % [ % ] @taaf_append_tal_rel @S' ]]]]]]]]]]
556    ]]
557  | lapply S lapply tlr2 lapply st1_Rret_st2' lapply st1_L_st2' lapply st1_R_st2'
558    lapply taa_ncost cases taa2'' -st2_after_ret -st2'
559    [ #st2' * #st1_R_st2'#st1_L_st2' #st1_Rret_st2' #tlr2 #S
560      *** #st1_R_st2'' #st1_L_st2'' #tl1_coll #ncost %1
561      %[| %{(taa2 @ tal_base_call ???? H2 G2 ? tlr2 ?)}
562      [3: % [ /2 by conj/ ]
563      %[|%[| %{EQcall} %[|%[|%[| %1 %{(refl …)} %[|%[|%[| %{S} %{tl1_coll} % ]]]]]]]]]]
564    | #st2_after_ret #st2_after_ret' #st2' #hd #I2' #J2' #ncost
565      #st1_R_st2'#st1_L_st2' #st1_Rret_st2' #tlr2 #S
566      *** #st1_R_st2'' #st1_L_st2'' #tl1_coll #ncost' %1
567      %[| %{(taa2 @ tal_step_call ?????? H2 G2 ? tlr2 ncost (hd @ tal_base_not_return ??? I2' (or_intror ?? J2') ?))}
568      [3: % [ /2 by conj/ ]
569        %[|%[| %{EQcall} %[|%[|%[| %2 %[|%[|%[|%[|%[| %{S} % [%] @taa_append_tal_rel /2 by tal_collapsable_to_rel/
570        ]]]]]]]]]]
571      ]]
572    ]
573  ]
574  [1,4,7,9: @(st1_Rret_st2' … st1_C_st2) assumption
575  |2,5: lapply st1_L_st2' lapply taa_ncost cases taa2'' -st2_after_ret -st2'
576    [1,3: #st2_after_ret * #L whd in ⊢ (?%); <L assumption
577    |*: #st2_after_ret #st2_post #st2' #tl2 #K #M #H #_ @H %
578    ]
579  |3,6: @if_else_True whd in ⊢ (?%); <st1_L_st2' assumption
580  |*: whd <st1_L_st2'' @(tal_end_costed … tl1)
581  ]
582| (* step_default *)
583  lapply (sim_execute … H st1_R_st2)
584  >G in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); *
585  #st2_mid *#taa2 ** #ncost #st1_R_st2_mid #st1_L_st2_mid
586  lapply (status_simulation_produce_tal … tl1 sim_execute st1_R_st2_mid)
587  cases fl1' in tl1; #tl1 *
588  [ #st2_mid' *#st2' *#tal2 *#taa2' * #H #G
589    %[|%[| %{(taaf_append_tal … taa2 ? tal2)}
590      [2: %{taa2'} % [/4 by conj/ ] @taaf_append_tal_rel @G ]
591    ]]
592  | *#st2' *#tal2 *#H #G %1
593    %[| %{(taaf_append_tal … taa2 ? tal2)}
594      [2: % [/2 by conj/] @taaf_append_tal_rel @G ]
595    ]
596  | (* can't happen *)
597    *** #_ #L' elim (absurd ?? K)
598    whd >st1_L_st2_mid <L' @(tal_end_costed … tl1)
599  ]
600  @if_else_True whd in ⊢ (?%); <st1_L_st2_mid assumption
601]
602qed.
603
604(* finite flat traces, with recursive structure right to left. The list of
605   identifiers represents the call stack *)
606
607inductive flat_trace (S : abstract_status) (start : S) : S → list ident → Type[0] ≝
608| ft_start : flat_trace S start start [ ]
609| ft_advance_flat :
610  ∀st1,st2,stack.flat_trace S start st1 stack → as_execute S st1 st2 →
611  (as_classifier ? st1 cl_jump ∨ as_classifier ? st1 cl_other) →
612  flat_trace S start st2 stack
613| ft_advance_call :
614  ∀st1,st2,stack.flat_trace S start st1 stack → as_execute S st1 st2 →
615  ∀prf : as_classifier ? st1 cl_call.
616  flat_trace S start st2 (as_call_ident ? «st1, prf» :: stack)
617| ft_advance_ret :
618  ∀st1,st2,stack,f.flat_trace S start st1 (f :: stack) → as_execute S st1 st2 →
619  as_classifier ? st1 cl_return →
620  flat_trace S start st2 stack.
621
622let rec ft_extend_taa S st1 st2 stack st3 (ft : flat_trace S st1 st2 stack)
623  (taa : trace_any_any S st2 st3)
624on taa : flat_trace S st1 st3 stack ≝
625match taa return λst2,st3,taa.flat_trace ?? st2 ? → flat_trace ?? st3 ? with
626[ taa_base s ⇒ λacc.acc
627| taa_step st1 st2 st3 H G _ tl ⇒
628  λacc.ft_extend_taa ????? (ft_advance_flat ????? acc H (or_intror … G)) tl
629] ft.
630
631lemma ft_extend_extend_taa : ∀S,st1,st2,stack,st3,st4,ft,taa1,taa2.
632  ft_extend_taa S st1 st3 stack st4 (ft_extend_taa ?? st2 ?? ft taa1) taa2 =
633  ft_extend_taa … ft (taa_append_taa … taa1 taa2).
634#S #st1 #st2 #stack #st3 #st4 #ft #taa1 lapply ft elim taa1 -st2 -st3 normalize
635/2/
636qed.
637
638definition ft_extend_taaf ≝ λS,st1,st2,stack,st3.λft : flat_trace S st1 st2 stack.
639  λtaaf : trace_any_any_free S st2 st3.
640  match taaf return λst2,st3,taaf.flat_trace ?? st2 ? → flat_trace ?? st3 ? with
641  [ taaf_base s ⇒ λft.ft
642  | taaf_step s1 s2 s3 pre H G ⇒
643    λft.ft_advance_flat … (ft_extend_taa … ft pre) H (or_intror … G)
644  ] ft.
645
646definition option_to_list : ∀A.option A → list A ≝ λA,x.
647  match x with
648  [ Some x ⇒ [x]
649  | None ⇒ [ ]
650  ].
651
652(* the observables of a flat trace (for the moment, only labels, calls and returns) *)
653
654inductive intensional_event : Type[0] ≝
655| IEVcost : costlabel → intensional_event
656| IEVcall : ident → intensional_event
657| IEVret : ident → intensional_event.
658
659let rec ft_observables_aux acc S st st' stack
660  (ft : flat_trace S st st' stack) on ft : list intensional_event ≝
661match ft with
662[ ft_start ⇒ acc
663| ft_advance_flat st1_mid st1' stack pre1 _ _ ⇒
664  let add ≝ option_to_list … (! l ← as_label … st1_mid ; return IEVcost l) in
665  ft_observables_aux (add @ acc) … pre1
666| ft_advance_call st1_mid st1' stack pre1 _ prf ⇒
667  let add ≝ option_to_list … (! l ← as_label … st1_mid ; return IEVcost l) in
668  let add ≝ add @ [IEVcall (as_call_ident ? «st1_mid, prf»)] in
669  ft_observables_aux (add @ acc) … pre1
670| ft_advance_ret st1_mid st1' stack f pre1 _ _ ⇒
671  let add ≝ option_to_list … (! l ← as_label … st1_mid ; return IEVcost l) in
672  let add ≝ add @ [IEVret f] in
673  ft_observables_aux (add @ acc) … pre1
674].
675
676definition ft_observables ≝ ft_observables_aux [ ].
677
678lemma ft_observables_aux_def : ∀acc,S,st1,st2,stack,ft.
679  ft_observables_aux acc S st1 st2 stack ft = ft_observables … ft @ acc.
680#acc #S #st1 #st2 #stack #ft lapply acc -acc elim ft -st2 -stack
681[ // ]
682#st2 #st3 #stack [3: #f ] #pre #H #G #IH #acc
683whd in ⊢ (??%(??%?));
684>IH >IH >append_nil //
685qed.
686
687lemma ft_extend_taa_obs : ∀S,st1,st2,stack,st3,ft,taa.
688  ft_observables … (ft_extend_taa S st1 st2 stack st3 ft taa) =
689    ft_observables … ft @
690    if taa then option_to_list … (!l←as_label … st2;return IEVcost l) else [ ].
691#S #st1 #st2 #stack #st3 #ft #taa lapply ft elim taa -st2 -st3
692[ #st2 #ft >append_nil % ]
693#st2 #st3 #st4 #H #K #G #taa #IH #ft
694normalize in ⊢ (??(?????%)?); >IH
695-IH lapply G lapply H cases taa -st3 -st4 normalize nodelta
696[ #st3 #H #G
697| #st3 #st4 #st5 #ex #H' #G' #taa #H #G
698  >(not_costed_no_label … G)
699] >append_nil whd in ⊢ (??%?); >ft_observables_aux_def >append_nil %
700qed.
701
702lemma ft_extend_taa_advance_call_obs : ∀S,st1,st2,stack,st3,st4.
703  ∀ft : flat_trace S st1 st2 stack.
704  ∀taa : trace_any_any S st2 st3.
705  ∀H : as_execute S st3 st4.∀G.
706  ft_observables … (ft_advance_call … (ft_extend_taa … ft taa) H G) =
707  ft_observables … ft @
708  option_to_list … (!l←as_label … st2;return IEVcost l) @
709  [IEVcall (as_call_ident … «st3, G»)].
710#S #st1 #st2 #stack #st3 #st4 #ft #taa #H #G
711whd in ⊢ (??%?); >ft_observables_aux_def >append_nil
712>ft_extend_taa_obs
713lapply G lapply H lapply ft lapply (taa_end_not_costed … taa) cases taa -st2 -st3
714[ #st2 * #ft #H #G >append_nil %
715| #st2 #st2' #st3 #H' #G' #K' #taa #K #ft #H #G
716  >(not_costed_no_label … K)
717  normalize nodelta //
718]
719qed.
720
721lemma ft_extend_taa_advance_ret_obs : ∀S,st1,st2,stack,f,st3,st4.
722  ∀ft : flat_trace S st1 st2 (f :: stack).
723  ∀taa : trace_any_any S st2 st3.
724  ∀H : as_execute S st3 st4.∀G.
725  ft_observables … (ft_advance_ret … (ft_extend_taa … ft taa) H G) =
726    ft_observables … ft @ option_to_list … (!l←as_label … st2;return IEVcost l) @ [IEVret f].
727#S #st1 #st2 #stack #f #st3 #st4 #ft #taa #H #G
728whd in ⊢ (??%?); >ft_observables_aux_def >append_nil
729>ft_extend_taa_obs
730lapply H lapply ft lapply (taa_end_not_costed … taa) cases taa -st2 -st3
731[ #st2 * #ft #H >append_nil %
732| #st2 #st2' #st3 #H' #G' #K' #taa #K #ft #H
733  >(not_costed_no_label … K)
734  normalize nodelta //
735]
736qed.
737
738lemma ft_extend_taa_advance_flat_obs : ∀S,st1,st2,stack,st3,st4.
739  ∀ft : flat_trace S st1 st2 stack.
740  ∀taa : trace_any_any S st2 st3.
741  ∀H : as_execute S st3 st4.∀G.
742  ft_observables … (ft_advance_flat … (ft_extend_taa … ft taa) H G) =
743    ft_observables … ft @ option_to_list … (!l←as_label … st2;return IEVcost l).
744#S #st1 #st2 #stack #st3 #st4 #ft #taa #H #G
745whd in ⊢ (??%?); >ft_observables_aux_def >append_nil
746>ft_extend_taa_obs
747lapply H lapply ft lapply (taa_end_not_costed … taa) cases taa -st2 -st3
748[ #st2 * #ft #H >append_nil %
749| #st2 #st2' #st3 #H' #G' #K' #taa #K #ft #H
750  >(not_costed_no_label … K)
751  normalize nodelta >append_nil //
752]
753qed.
754
755lemma ft_extend_taaf_obs : ∀S,st1,st2,stack,st3,ft,taaf.
756  ft_observables … (ft_extend_taaf S st1 st2 stack st3 ft taaf) =
757    ft_observables … ft @
758    if taaf_non_empty … taaf then option_to_list … (!l←as_label … st2;return IEVcost l) else [ ].
759#S #st1 #st2 #stack #st3 #ft #taa lapply ft cases taa -st2 -st3
760[ #st2 #ft >append_nil % ]
761#st2 #st3 #st4 #taa #H normalize nodelta #G #ft
762@ft_extend_taa_advance_flat_obs
763qed.
764
765(* little helper to avoid splitting equal cases *)
766lemma if_eq : ∀b,A.∀x : A.if b then x else x = x. * // qed-.
767
768theorem status_simulation_produce_ft :
769(* from
770
771  st1 →→→ft→→→ st1'
772   |
773  R,L
774   |
775  st2
776
777  we produce
778 
779  st1 →→→ft→→→ st1'-------\
780         //      \         \
781         \\       L         S
782         //       |          \
783  st2 →→→ft→→→ st2_lab →taa→ st2'
784 
785  so that from any tlr or tll following st1' we can produce the corresponding
786  structured trace from st2_lab using the previous result
787*)
788  ∀S1,S2.
789  ∀R.
790  ∀st1,st1',stack,st2.∀ft1 : flat_trace S1 st1 st1' stack.
791  status_simulation S1 S2 R → label_rel … st1 st2 → R st1 st2 →
792  ∃st2_lab,st2'.
793  ∃ft2 : flat_trace S2 st2 st2_lab stack.
794  ∃taa : trace_any_any S2 st2_lab st2'.
795  label_rel … st1' st2_lab ∧ R st1' st2' ∧ ft_observables … ft1 = ft_observables … ft2.
796#S1 #S2 #R #st1 #st1' #stack #st2 #ft1 #sim_execute #H #G elim ft1 -st1' -stack
797[ %{st2} %{st2} %{(ft_start …)} %{(taa_base …)} % [%{H G}] %
798|*: #st1_mid #st1' #stack [3: #f] #ft1 #ex [2: *] #cl
799  (* IH *) * #st2_lab * #st2_mid * #ft2 * #taa ** #L' #G' #S
800  [1,2: (* jump *)
801    lapply (sim_execute … ex G')
802    try >cl in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); *
803(*    [ ** #ncost #G'' #H''
804      %{st2_mid} %{st2_mid}
805      %[@(ft_extend_taa … taa)
806        assumption]
807      %{(taa_base …)} % [ %{H'' G''} ]
808      whd in ⊢ (??%?); >ft_observables_aux_def >append_nil
809      >ft_extend_taa_obs <L'
810      >(not_costed_no_label … ncost) >if_eq >S %
811    | * #st2' * #tal ** #coll
812      elim (tal_collapsable_split … coll) #st2_mid' * #taa2
813      * #K2 * #J2 *#H2 #EQ  #G'' #H''
814      %{st2'} %{st2'}
815      %[@(ft_advance_flat … K2 J2)
816        @(ft_extend_taa … (taa_append_taa … taa taa2))
817        assumption]
818      %{(taa_base …)} % [ %{H'' G''} ]
819      >ft_extend_taa_advance_flat_obs
820      whd in ⊢ (??%?); >ft_observables_aux_def >append_nil
821      <S <L' %
822    ]
823  | (* other *)
824    lapply (sim_execute … ex G')
825    >cl in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); **)
826    #st2' *#taaf ** #ncost #G'' #H''
827    %{st2'} %{st2'}
828    %[1,3:
829      @(ft_extend_taaf … taaf)
830      @(ft_extend_taa … taa)
831      assumption]
832    %{(taa_base …)}
833    % [1,3: %{H'' G''} ]
834    whd in ⊢ (??%?); >ft_observables_aux_def >append_nil
835    lapply ncost lapply taa lapply H'' cases taaf -st2_mid -st2'
836    [1,3: #st2' #H'' #taa * #ncost
837      >ft_extend_taa_obs <L'
838      [1,3: >(not_costed_no_label … ncost) >if_eq >S %
839      |*: lapply L' lapply H'' lapply S lapply ft2 cases taa -st2_lab -st2'
840        [1,3: #st2' #ft2 #S #H'' #L' >append_nil
841          >not_costed_no_label
842          [1,3: >append_nil @S ]
843          whd in ⊢ (?%); >L' <H'' assumption
844        |*: normalize nodelta #st2_mid #st2_mid' #st2' #_ #_ #_ #taa #ft2 #S #_ #_
845          >S %
846        ]
847      ]
848    |*: #st2_mid #st2_mid' #st2' #taa' #ex' #cl' #_ #taa *
849      whd in ⊢ (???(?????%));
850      >ft_extend_extend_taa >ft_extend_taa_advance_flat_obs
851      >S >L' %
852    ]
853  |3: (* ret *)
854    lapply (sim_execute … ex G')
855    >cl in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); *
856    #st2_ret * #st2_after_ret * #st2' * #taa2 * #taa2'
857    ***** #ncost #cl' #ex' #G'' #_ #H'' %{st2'} %{st2'}
858    %[@(ft_extend_taaf … taa2')
859      @(ft_advance_ret … f … ex' cl')
860      @(ft_extend_taa … (taa_append_taa … taa taa2))
861      assumption]
862    %{(taa_base …)}
863    % [ %{H'' G''} ]
864    >ft_extend_taaf_obs
865    >ft_extend_taa_advance_ret_obs
866    whd in ⊢ (??%?);
867    >ft_observables_aux_def >append_nil
868    lapply ncost cases taa2' -st2_after_ret -st2'
869    [ #st2' * >append_nil
870    | #st2_after_ret #st2_after_ret' #st2' #taa2' #ex'' #cl'' #ncost
871      >(not_costed_no_label … ncost)
872      >if_eq >append_nil
873    ]
874    >S >L' %
875  |4: (* call *)
876    lapply (sim_execute … ex G')
877    >cl in ⊢ (match % with [ _ ⇒ ? | _ ⇒ ? | _ ⇒ ? | _ ⇒ ? ]→?); #H elim (H cl) -H
878    * #st2_pre_call #cl' ** #EQcall #_ * #st2_after_call * #st2'
879    * #taa2 * #taa2' ** #ex' #G'' #H''
880    %{st2_after_call} %{st2'}
881    lapply (refl_jmeq … (ft_advance_call … ft1 ex cl))
882    generalize in match (ft_advance_call … ft1 ex cl) in ⊢ (????%→%);
883    <EQcall in ⊢ (%→???%%→%);
884    #ft1' #EQft1'
885    %[@(ft_advance_call … ex' cl')
886      @(ft_extend_taa … (taa_append_taa … taa taa2))
887      assumption]
888    %{taa2'}
889    % [ %{H'' G''} ]
890    >ft_extend_taa_advance_call_obs
891    lapply EQft1' lapply ft1' -ft1'
892    >EQcall in ⊢ (%→???%%→%);
893    #ft1' #EQft1' destruct (EQft1')
894    whd in ⊢ (??%?);
895    >ft_observables_aux_def >append_nil
896    >S >L' %
897  ]
898]
899qed.
Note: See TracBrowser for help on using the repository browser.