]> 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 include "delayed_updating/syntax/preterm.ma".
19 include "delayed_updating/syntax/prototerm_proper.ma".
20 *)
21 (* FOCALIZED SUBSTITUTION ***************************************************)
22
23 (* Constructions with lift for preterm **************************************)
24
25 lemma lift_term_fsubst_sn (f) (t) (u) (p):
26       (↑[f]t)[⋔(↑[f]p)←↑[↑[p]f]u] ⊆ ↑[f](t[⋔p←u]).
27 #f #t #u #p #ql * *
28 [ #rl * #r #Hr #H1 #H2 destruct
29   >lift_path_append
30   /4 width=3 by in_comp_lift_path_term, or_introl, ex2_intro/
31 | * #q #Hq #H1 #H0
32   @(ex2_intro … H1) @or_intror @conj // -Hq #r #H2 destruct
33   /2 width=2 by/
34 ]
35 qed-.
36
37 lemma lift_term_fsubst_dx (f) (t) (u) (p):
38       ↑[f](t[⋔p←u]) ⊆ (↑[f]t)[⋔(↑[f]p)←↑[↑[p]f]u].
39 #f #t #u #p #ql * #q * *
40 [ #r #Hu #H1 #H2 destruct
41   @or_introl @ex2_intro
42   [|| <lift_path_append // ]
43   /2 width=3 by ex2_intro/
44 | #Hq #H0 #H1 destruct
45   @or_intror @conj [ /2 width=1 by in_comp_lift_path_term/ ] -Hq #r #Hr
46   elim (lift_path_inv_append_dx … Hr) -Hr #s1 #s2 #Hs1 #_ #H1 destruct
47   lapply (lift_path_inj … Hs1) -Hs1 #H1 destruct 
48   /2 width=2 by/
49 ]
50 qed-.
51
52 lemma lift_term_fsubst (f) (t) (u) (p):
53       (↑[f]t)[⋔(↑[f]p)←↑[↑[p]f]u] ⇔ ↑[f](t[⋔p←u]).
54 /3 width=1 by lift_term_fsubst_sn, conj, lift_term_fsubst_dx/ qed.