1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "delayed_updating/unwind2/unwind_prototerm_eq.ma".
16 include "delayed_updating/unwind2/unwind_structure.ma".
17 include "delayed_updating/substitution/fsubst.ma".
18 include "delayed_updating/syntax/preterm.ma".
19 include "delayed_updating/syntax/prototerm_proper.ma".
21 (* UNWIND FOR PROTOTERM *****************************************************)
23 (* Constructions with fsubst ************************************************)
25 lemma unwind_fsubst_sn (f) (t) (u) (p): u Ļµ š ā
26 (ā¼[f]t)[ā(āp)āā¼[ā¼[p]f]u] ā ā¼[f](t[āpāu]).
27 #f #t #u #p #Hu #ql * *
28 [ #rl * #r #Hr #H1 #H2 destruct
29 >unwind_append_proper_dx
30 /4 width=5 by in_comp_unwind_bi, in_ppc_comp_trans, or_introl, ex2_intro/
32 @(ex2_intro ā¦ H1) @or_intror @conj // *
33 [ <list_append_empty_dx #H2 destruct
34 elim (unwind_path_root f q) #r #_ #Hr /2 width=2 by/
36 @H0 -H0 [| <unwind_append_proper_dx /2 width=3 by ppc_lcons/ ]
41 lemma unwind_fsubst_dx (f) (t) (u) (p): u Ļµ š ā p Ļµ āµt ā t Ļµ š ā
42 ā¼[f](t[āpāu]) ā (ā¼[f]t)[ā(āp)āā¼[ā¼[p]f]u].
43 #f #t #u #p #Hu #H1p #H2p #ql * #q * *
44 [ #r #Hu #H1 #H2 destruct
46 [|| <unwind_append_proper_dx /2 width=5 by in_ppc_comp_trans/ ]
47 /2 width=3 by ex2_intro/
48 | #Hq #H0 #H1 destruct
49 @or_intror @conj [ /2 width=1 by in_comp_unwind_bi/ ] *
50 [ <list_append_empty_dx #Hr @(H0 ā¦ (š)) -H0
51 <list_append_empty_dx @H2p -H2p /2 width=1 by prototerm_in_comp_root/
53 elim (unwind_inv_append_proper_dx ā¦ Hr) -Hr // #s1 #s2 #Hs1 #_ #H1 destruct
54 lapply (H2p ā¦ Hs1) -H2p -Hs1 /2 width=2 by ex_intro/
59 lemma unwind_fsubst (f) (t) (u) (p): u Ļµ š ā p Ļµ āµt ā t Ļµ š ā
60 (ā¼[f]t)[ā(āp)āā¼[ā¼[p]f]u] ā ā¼[f](t[āpāu]).
61 /4 width=3 by unwind_fsubst_sn, conj, unwind_fsubst_dx/ qed.