]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_lpce_2.etc
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / cpce / cnv_lpce_2.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 "static_2/s_computation/fqup_weight.ma".
16 include "basic_2/rt_conversion/lpce.ma".
17 include "basic_2/dynamic/cnv_drops.ma".
18
19 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
20
21 theorem cnv_cpce_trans_lpce (h) (G):
22         ∀L1,T1,T2. ⦃G,L1⦄ ⊢ T1 ⬌η[h] T2 → ⦃G,L1⦄ ⊢ T1 !*[h] →
23         ∀L2. ⦃G,L1⦄ ⊢ ⬌η[h] L2 → ⦃G,L2⦄ ⊢ T2 !*[h].
24 #h #G #L1 #T1 @(fqup_wf_ind (Ⓣ) … G L1 T1) -G -L1 -T1
25 #G0 #L0 #T0 #IH #T2
26 @(insert_eq_0 … G0) #G
27 @(insert_eq_0 … L0) #L1
28 @(insert_eq_0 … T0) #T1
29 * -G -L1 -T1
30 [ #G #L1 #s #_ #_ #_ #_ #L2 #_ //
31 | #G #K1 #V1 #HT #HL #HG #H0 #Y2 #HY2 destruct
32   elim (cnv_inv_zero … H0) -H0 #Z #Y #X #HV1 #H destruct
33   elim (lpce_inv_pair_sn … HY2) -HY2 #K2 #V2 #HK12 #HV12 #H destruct
34   /4 width=6 by cnv_zero, fqu_fqup, fqu_lref_O/
35 | #n #G #K1 #V1 #s #_ #HT #HL #HG #H0 #Y2 #HY2 destruct
36   elim (cnv_inv_zero … H0) -H0 #Z #Y #X #HV1 #H destruct
37   elim (lpce_inv_pair_sn … HY2) -HY2 #K2 #V2 #HK12 #HV12 #H destruct
38   /4 width=6 by cnv_zero, fqu_fqup, fqu_lref_O/
39 | #n #p #G #K1 #V1 #W1 #W2 #T1 #HVT1 #HW12 #HT #HL #HG #H0 #Y2 #HY2 destruct
40   elim (cnv_inv_zero … H0) -H0 #Z #Y #X #HV1 #H destruct
41   elim (lpce_inv_pair_sn … HY2) -HY2 #K2 #V2 #HK12 #HV12 #H destruct
42 | #I #G #K1 #T1 #U1 #i #H0 #HTU1 #HT #HL #HG #H0 #Y2 #HY2 destruct
43   elim (cnv_inv_lref … H0) -H0 #Z1 #Y1 #Hi #H destruct
44   elim (lpce_inv_bind_sn … HY2) -HY2 #Z2 #K2 #HK12 #_ #H destruct
45   @(cnv_lifts … K2 … (Ⓣ) … HTU1) [| /3 width=1 by drops_refl, drops_drop/ ] -U1
46   /3 width=6 by fqu_fqup/
47 | #p #I #G #K1 #V1 #V2 #T1 #T2 #HV12 #HT12 #HT #HL #HG #H0 #K2 #HK12 destruct
48   elim (cnv_inv_bind … H0) -H0 #HV1 #HT1
49   /4 width=8 by lpce_pair, cnv_bind/
50 | * #G #L1 #V1 #V2 #T1 #T2 #HV12 #HT12 #HT #HL #HG #H0 #L2 #HK12 destruct
51