]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / substitution / fsubst_lift.ma
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
15 include "delayed_updating/substitution/fsubst.ma".
16 include "delayed_updating/substitution/lift_prototerm_eq.ma".
17
18 (* FOCALIZED SUBSTITUTION ***************************************************)
19
20 (* Constructions with lift for preterm **************************************)
21
22 lemma lift_term_fsubst_sn (f) (t) (u) (p):
23       (šŸ ”[f]t)[ā‹”(šŸ ”[f]p)ā†šŸ ”[šŸ ¢[f]p]u] āŠ† šŸ ”[f](t[ā‹”pā†u]).
24 #f #t #u #p #ql * *
25 [ #rl * #r #Hr #H1 #H2 destruct
26   >lift_path_append
27   /4 width=3 by in_comp_lift_path_term, or_introl, ex2_intro/
28 | * #q #Hq #H1 #H0
29   @(ex2_intro ā€¦ H1) @or_intror @conj // -Hq #r #H2 destruct
30   /2 width=2 by/
31 ]
32 qed-.
33
34 lemma lift_term_fsubst_dx (f) (t) (u) (p):
35       šŸ ”[f](t[ā‹”pā†u]) āŠ† (šŸ ”[f]t)[ā‹”(šŸ ”[f]p)ā†šŸ ”[šŸ ¢[f]p]u].
36 #f #t #u #p #ql * #q * *
37 [ #r #Hu #H1 #H2 destruct
38   @or_introl @ex2_intro
39   [|| <lift_path_append // ]
40   /2 width=3 by ex2_intro/
41 | #Hq #H0 #H1 destruct
42   @or_intror @conj [ /2 width=1 by in_comp_lift_path_term/ ] -Hq #r #Hr
43   elim (lift_path_inv_append_sn ā€¦ Hr) -Hr #s1 #s2 #Hs1 #_ #H1 destruct
44   lapply (lift_path_inj ā€¦ Hs1) -Hs1 #H1 destruct 
45   /2 width=2 by/
46 ]
47 qed-.
48
49 lemma lift_term_fsubst (f) (t) (u) (p):
50       (šŸ ”[f]t)[ā‹”(šŸ ”[f]p)ā†šŸ ”[šŸ ¢[f]p]u] ā‡” šŸ ”[f](t[ā‹”pā†u]).
51 /3 width=1 by lift_term_fsubst_sn, conj, lift_term_fsubst_dx/ qed.