]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma
e5b5d6f7a8696ddaadcb56aeca60ec408f2a4f08
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / cnv_aaa.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_transition/cpm_aaa.ma".
16 include "basic_2/rt_computation/cpms_aaa.ma".
17 include "basic_2/dynamic/cnv.ma".
18
19 (* CONTEXT_SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
20
21 (* Forward lemmas on atomic arity assignment for terms **********************)
22
23 (* Basic_2A1: uses: snv_fwd_aaa *)
24 lemma cnv_fwd_aaa (a) (h): ∀G,L,T. ⦃G, L⦄ ⊢ T ![a, h] → ∃A. ⦃G, L⦄ ⊢ T ⁝ A.
25 #a #h #G #L #T #H elim H -G -L -T
26 [ /2 width=2 by aaa_sort, ex_intro/
27 | #I #G #L #V #_ * /3 width=2 by aaa_zero, ex_intro/
28 | #I #G #L #K #_ * /3 width=2 by aaa_lref, ex_intro/
29 | #p * #G #L #V #T #_ #_ * #B #HV * #A #HA
30   /3 width=2 by aaa_abbr, aaa_abst, ex_intro/
31 | #n #p #G #L #V #W #T0 #U0 #_ #_ #_ #HVW #HTU0 * #B #HV * #X #HT
32   lapply (cpms_aaa_conf … HV … HVW) -HVW #H1W
33   lapply (cpms_aaa_conf … HT … HTU0) -HTU0 #H
34   elim (aaa_inv_abst … H) -H #B0 #A #H2W #HU #H destruct
35   lapply (aaa_mono … H2W … H1W) -W #H destruct
36   /3 width=4 by aaa_appl, ex_intro/
37 | #G #L #U #T #U0 #_ #_ #HU0 #HTU0 * #B #HU * #A #HT
38   lapply (cpms_aaa_conf … HU … HU0) -HU0 #HU0
39   lapply (cpms_aaa_conf … HT … HTU0) -HTU0 #H
40   lapply (aaa_mono … H … HU0) -U0 #H destruct
41   /3 width=3 by aaa_cast, ex_intro/
42 ]
43 qed-.
44
45 (* Forward lemmas with t_bound rt_transition for terms **********************)
46
47 lemma cnv_fwd_cpm_SO (a) (h) (G) (L):
48       ∀T. ⦃G, L⦄ ⊢ T ![a, h] → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
49 #a #h #G #L #T #H
50 elim (cnv_fwd_aaa … H) -H #A #HA
51 /2 width=2 by aaa_cpm_SO/
52 qed-.