]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_preterm_eq.etc
d2bbd15be5b82421eba69572bf683b7fe41dd1aa
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / etc / lift / lift_preterm_eq.etc
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 "ground/lib/subset_equivalence.ma".
16 include "delayed_updating/syntax/preterm.ma".
17 include "delayed_updating/substitution/lift_structure.ma".
18 include "delayed_updating/substitution/lift_prototerm.ma".
19
20 lemma pippo (p):
21       ⊗p ϵ 𝐈.
22 #p @(list_ind_rcons … p) -p
23 [ <structure_empty //
24 | #p * [ #n ] #IH
25   [ <structure_d_dx //
26   | <structure_m_dx //
27   | <structure_L_dx //
28   | <structure_A_dx //
29   | <structure_S_dx //
30   ]
31 ]
32 qed.
33
34 (* LIFT FOR PRETERM *********************************************************)
35
36 (* Constructions with subset_equivalence ************************************)
37
38 lemma lift_grafted_sn (f) (t) (p): p ϵ 𝐈 →
39       ↑[↑[p]f](t⋔p) ⊆ (↑[f]t)⋔(⊗p).
40 #f #t #p #Hp #q * #r #Hr #H0 destruct
41 @(ex2_intro … Hr) -Hr
42 <lift_append_inner_sn //
43 qed-.
44
45 lemma lift_grafted_dx (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
46       (↑[f]t)⋔(⊗p) ⊆ ↑[↑[p]f](t⋔p).
47 #f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
48 elim (lift_inv_append_inner_sn … (sym_eq … H0)) -H0 //
49 #p0 #q0 #Hp0 #Hq0 #H0 destruct
50 <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
51 /2 width=1 by in_comp_lift_bi/
52 qed-.
53
54 lemma lift_grafted (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
55       ↑[↑[p]f](t⋔p) ⇔ (↑[f]t)⋔(⊗p).
56 /3 width=1 by lift_grafted_sn, conj, lift_grafted_dx/ qed.
57
58
59 lemma lift_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
60       (↑[f]t)⋔((⊗p)◖𝗦) ⊆ ↑[↑[p]f](t⋔(p◖𝗦)).
61 #f #t #p #Hp #Ht #q * #r #Hr
62 <list_append_rcons_sn #H0
63 elim (lift_inv_append_proper_dx … (sym_eq … H0)) -H0 //
64 #p0 #q0 #Hp0 #Hq0 #H0 destruct
65 <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
66 elim (lift_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
67 #r1 #r2 #Hr1 #Hr2 #H0 destruct
68 lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
69 [ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
70 /2 width=1 by in_comp_lift_bi/
71 qed-.
72
73 lemma lift_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
74       ↑[↑[p]f](t⋔(p◖𝗦)) ⇔ (↑[f]t)⋔((⊗p)◖𝗦).
75 #f #t #p #Hp #Ht
76 @conj
77 [ >lift_rmap_S_dx >structure_S_dx
78   @lift_grafted_sn //
79 | /2 width=1 by lift_grafted_S_dx/
80 ]
81 qed.