]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/dynamic/nta_delift.ma
- a caracterization of the top elements of the local evironment
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / dynamic / nta_delift.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 "basic_2/substitution/lsubs_sfr.ma".
16 include "basic_2/unfold/delift.ma".
17 include "basic_2/unfold/thin.ma".
18 (*
19 include "basic_2/equivalence/cpcs_delift.ma".
20 *)
21 include "basic_2/dynamic/nta.ma".
22
23 (* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
24
25 (* Properties on reverse basic term relocation ******************************)
26
27 (* Basic_1: was only: ty3_gen_cabbr *)
28 axiom thin_nta_delift_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 →
29                             ∀L2,d,e. ≼ [d, e] L1 → L1 [d, e] ≡ L2 →
30                             ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 : U2 &
31                                      L1 ⊢ T1 [d, e] ≡ T2 & L1 ⊢ U1 [d, e] ≡ U2.
32 (*
33 #h #L1 #T1 #U1 #H @(nta_ind_alt … H) -L1 -T1 -U1
34 [ #L1 #k #L2 #d #e #HL12 #X #H
35   >(delift_inv_sort1 … H) -X /2 width=5/
36 | #L1 #K1 #V1 #W1 #U1 #i #HLK1 #_ #HWU1 #IHVW1 #L2 #d #e #HL12 #X #H
37 (*
38   elim (delift_inv_lref1 … H) -H *
39   [ #Hid #H destruct
40     elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
41     lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
42     elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
43     elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
44     elim (lift_total W2 0 (i+1)) #U2 #HWU2
45     @(ex2_1_intro … U2)
46     [ /2 width=6/
47     | -HVW2 -HLK2 
48     ]
49   |
50   |
51   ]
52 *)
53 |
54 |
55 |
56 | #L1 #V1 #Y1 #T1 #X1 #_ #_ #IHTX1 #IHXY1 #L2 #d #e #HL12 #X #H
57   elim (delift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
58   elim (IHTX1 … HL12 … HT12) -T1 #U1 #U2 #HTU2 #HU12 #HUX1
59 (*
60   elim (IHXY1 … HL12 (ⓐV2.U2) ?) -IHXY1 -HL12
61 *)  
62   @(ex3_2_intro … (ⓐV1.U1) (ⓐV2.U2)) 
63   [2: /2 width=1/ |3: /2 width=1/ ]  -HV12 -HU12 -HUX1
64   @(nta_pure … HTU2) -HTU2
65   
66   [ /3 width=5/ | /2 width=1/ ]
67 *)
68 (*
69 | #L1 #T1 #X1 #Y1 #_ #_ #IHTX1 #IHXY1 #L2 #d #e #HL12 #X #H
70   elim (delift_inv_flat1 … H) -H #X2 #T2 #HX12 #HT12 #H destruct
71   elim (IHTX1 … HL12 … HT12) -T1 #U1 #U2 #HTU2 #HU12 #HUX1
72   elim (IHXY1 … HL12 … HX12) -IHXY1 #W1 #W2 #HXW2 #_ #_ -Y1 -W1
73   lapply (thin_cpcs_delift_mono … HUX1 … HL12 … HU12 … HX12) -HL12 -HX12 /4 width=5/
74 | #L1 #T1 #X11 #X12 #V1 #_ #HX112 #_ #IHT1 #_ #L2 #d #e #HL12 #T2 #HT12
75   elim (IHT1 … HL12 … HT12) -T1 -HL12 #U21 #U22 #HTU22 #HU212 #HUX211
76   lapply (cpcs_trans … HUX211 … HX112) -X11 /2 width=5/
77 ]
78 *)
79 axiom nta_inv_lift1: ∀h,L1,T1,X. ⦃h, L1⦄ ⊢ T1 : X →
80                      ∀L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀T2. ⇧[d, e] T2 ≡ T1 →
81                      ∃∃U1,U2. ⦃h, L2⦄ ⊢ T2 : U2 & ⇧[d, e] U2 ≡ U1 &
82                               L1 ⊢ U1 ⬌* X.
83 (*
84 #h #L1 #T1 #X #H #L2 #d #e #HL12 #T2 #HT21
85 elim (nta_inv_lift1_delift … H … HL12 … HT21) -T1 -HL12 #U1 #U2 #HTU2 * #U #HU1 #HU2 #HU1X
86 lapply (cpcs_cpr_conf … U … HU1X) -HU1X /2 width=3/ -U1 /2 width=5/
87 qed-.
88 *)