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