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/substitution/fsubst.ma".
16 include "delayed_updating/substitution/lift_prototerm_eq.ma".
17 include "delayed_updating/substitution/lift_structure.ma".
18 include "delayed_updating/syntax/preterm.ma".
19 include "delayed_updating/syntax/prototerm_proper.ma".
21 (* FOCALIZED SUBSTITUTION ***************************************************)
23 lemma lift_fsubst_sn (f) (t) (u) (p): u Ļµ š ā
24 (ā[f]t)[ā(āp)āā[ā[p]f]u] ā ā[f](t[āpāu]).
25 #f #t #u #p #Hu #ql * *
26 [ #rl * #r #Hr #H1 #H2 destruct
27 >lift_append_proper_dx
28 /4 width=5 by in_comp_lift_bi, in_ppc_comp_trans, or_introl, ex2_intro/
30 @(ex2_intro ā¦ H1) @or_intror @conj // *
31 [ <list_append_empty_dx #H2 destruct
32 elim (lift_path_root f q) #r #_ #Hr /2 width=2 by/
34 @H0 -H0 [| <lift_append_proper_dx /2 width=3 by ppc_lcons/ ]
39 lemma lift_fsubst_dx (f) (t) (u) (p): u Ļµ š ā p Ļµ āµt ā t Ļµ š ā
40 ā[f](t[āpāu]) ā (ā[f]t)[ā(āp)āā[ā[p]f]u].
41 #f #t #u #p #Hu #H1p #H2p #ql * #q * *
42 [ #r #Hu #H1 #H2 destruct
44 [|| <lift_append_proper_dx /2 width=5 by in_ppc_comp_trans/ ]
45 /2 width=3 by ex2_intro/
46 | #Hq #H0 #H1 destruct
47 @or_intror @conj [ /2 width=1 by in_comp_lift_bi/ ] *
48 [ <list_append_empty_dx #Hr @(H0 ā¦ (š)) -H0
49 <list_append_empty_dx @H2p -H2p /2 width=1 by prototerm_in_comp_root/
51 elim (lift_inv_append_proper_dx ā¦ Hr) -Hr // #s1 #s2 #Hs1 #_ #H1 destruct
52 lapply (H2p ā¦ Hs1) -H2p -Hs1 /2 width=2 by ex_intro/
57 lemma lift_fsubst (f) (t) (u) (p): u Ļµ š ā p Ļµ āµt ā t Ļµ š ā
58 (ā[f]t)[ā(āp)āā[ā[p]f]u] ā ā[f](t[āpāu]).
59 /4 width=3 by lift_fsubst_sn, conj, lift_fsubst_dx/ qed.