]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpce.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / cnv_cpce.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/rt_computation/cpmuwe_cpmuwe.ma".
16 include "basic_2/rt_conversion/cpce_drops.ma".
17 include "basic_2/dynamic/cnv_cpmuwe.ma".
18
19 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
20
21 (* Properties with context-sensitive parallel eta-conversion for terms ******)
22
23 axiom cpce_total_cnv (h) (a) (G) (L):
24       ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] → ∃T2. ⦃G,L⦄ ⊢ T1 ⬌η[h] T2.
25 (*
26 #h #a #G #L #T1 #HT1
27 lapply (cnv_fwd_csx … HT1) #H
28 generalize in match HT1; -HT1
29 @(csx_ind_fpbg … H) -G -L -T1
30 #G #L * *
31 [ #s #_ #_ /2 width=2 by cpce_sort, ex_intro/
32 | #i #H1i #IH #H2i
33   elim (drops_ldec_dec L i) [ * #K #W #HLK | -H1i -IH #HnX ]
34   [ lapply (cnv_inv_lref_pair … H2i … HLK) -H2i #H2W
35     lapply (csx_inv_lref_pair_drops … HLK H1i) -H1i #H1W
36     elim (cpmuwe_total_csx … H1W) -H1W #X #n #HWX
37     elim (abst_dec X) [ * | -IH ]
38     [ #p #V1 #U #H destruct
39       lapply (cpmuwe_fwd_cpms … HWX) -HWX #HWX
40       elim (IH G K V1) -IH
41       [ #V2 #HV12
42         elim (lifts_total V2 (𝐔❴↑i❵)) #W2 #HVW2
43         /3 width=12 by cpce_eta_drops, ex_intro/
44       | /3 width=6 by  cnv_cpms_trans, cnv_fwd_pair_sn/
45       | /4 width=6 by fqup_cpms_fwd_fpbg, fpbg_fqu_trans, fqup_lref/
46       ]
47     | #HnX
48       @(ex_intro … (#i))
49       @cpce_zero_drops #n0 #p #K0 #W0 #V0 #U0 #HLK0 #HWU0
50       lapply (drops_mono … HLK0 … HLK) -i -L #H destruct
51       lapply (cpmuwe_abst … HWU0) -HWU0 #HWU0
52       elim (cnv_cpmuwe_mono … H2W … HWU0 … HWX) #_ #H -a -n -n0 -W
53       elim (tweq_inv_abst_sn … H) -V0 -U0 #V0 #U0 #H destruct
54       /2 width=4 by/
55     ]
56   | /5 width=3 by cpce_zero_drops, ex1_2_intro, ex_intro/
57   ]
58 | #l #_ #_ /2 width=2 by cpce_gref, ex_intro/
59 | #p #I #V1 #T1 #_ #IH #H
60   elim (cnv_inv_bind … H) -H #HV1 #HT1
61   elim (IH … HV1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_pair_sn/ ] #V2 #HV12
62   elim (IH … HT1) [| /4 width=1 by fpb_fpbg, fpb_fqu, fqu_bind_dx/ ] #T2 #HT12
63   /3 width=2 by cpce_bind, ex_intro/
64 | #I #V1 #T1 #_ #IH #H
65   elim (cnv_fwd_flat … H) -H #HV1 #HT1
66   elim (IH … HV1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_pair_sn/ ] #V2 #HV12
67   elim (IH … HT1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_flat_dx/ ] #T2 #HT12
68   /3 width=2 by cpce_flat, ex_intro/
69 ]
70 qed-.
71 *)