]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm_eq.ma
8143f860051118b38bbde6d5aa2e27ce6c7adb9c
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / substitution / lift_preterm_eq.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 "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
60 -lemma lift_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ ������ →
61 -      (↑[f]t)⋔((⊗p)◖������) ⊆ ↑[↑[p]f](t⋔(p◖������)).
62 -#f #t #p #Hp #Ht #q * #r #Hr
63 -<list_append_rcons_sn #H0
64 -elim (lift_inv_append_proper_dx … (sym_eq … H0)) -H0 //
65 +lemma lift_grafted_dx (f) (t) (p): p ϵ ������ → p ϵ ▵t → t ϵ ������ →
66 +      (↑[f]t)⋔(⊗p) ⊆ ↑[↑[p]f](t⋔p).
67 +#f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
68 +elim (lift_inv_append_inner_sn … (sym_eq … H0)) -H0 //
69  #p0 #q0 #Hp0 #Hq0 #H0 destruct
70  <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
71 -elim (lift_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
72 -#r1 #r2 #Hr1 #Hr2 #H0 destruct
73 -lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
74 -[ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
75  /2 width=1 by in_comp_lift_bi/
76  qed-.
77  
78 -lemma lift_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ ������ →
79 -      ↑[↑[p]f](t⋔(p◖������)) ⇔ (↑[f]t)⋔((⊗p)◖������).
80 -/3 width=1 by lift_grafted_S_sn, conj, lift_grafted_S_dx/ qed.
81 +lemma lift_grafted (f) (t) (p): p ϵ ������ → p ϵ ▵t → t ϵ ������ →
82 +      ↑[↑[p]f](t⋔p) ⇔ (↑[f]t)⋔(⊗p).
83 +/3 width=1 by lift_grafted_sn, conj, lift_grafted_dx/ qed.
84
85 *)