1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2A/static/da_aaa.ma".
16 include "basic_2A/computation/scpds_aaa.ma".
17 include "basic_2A/dynamic/snv.ma".
19 (* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
21 (* Forward lemmas on atomic arity assignment for terms **********************)
23 lemma snv_fwd_aaa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃A. ⦃G, L⦄ ⊢ T ⁝ A.
24 #h #g #G #L #T #H elim H -G -L -T
25 [ /2 width=2 by aaa_sort, ex_intro/
26 | #I #G #L #K #V #i #HLK #_ * /3 width=6 by aaa_lref, ex_intro/
27 | #a * #G #L #V #T #_ #_ * #B #HV * #A #HA /3 width=2 by aaa_abbr, aaa_abst, ex_intro/
28 | #a #G #L #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 * #B #HV * #X #HT
29 lapply (scpds_aaa_conf … HV … HVW0) -HVW0 #HW0
30 lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H
31 elim (aaa_inv_abst … H) -H #B0 #A #H1 #HU #H2 destruct
32 lapply (aaa_mono … H1 … HW0) -W0 #H destruct /3 width=4 by aaa_appl, ex_intro/
33 | #G #L #U #T #U0 #_ #_ #HU0 #HTU0 * #B #HU * #A #HT
34 lapply (scpds_aaa_conf … HU … HU0) -HU0 #HU0
35 lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H
36 lapply (aaa_mono … H … HU0) -U0 #H destruct /3 width=3 by aaa_cast, ex_intro/
40 (* Advanced forward lemmas **************************************************)
42 lemma snv_fwd_da: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃d. ⦃G, L⦄ ⊢ T ▪[h, g] d.
43 #h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_da/
46 lemma snv_fwd_lstas: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] →
47 ∀d. ∃U. ⦃G, L⦄ ⊢ T •*[h, d] U.
48 #h #g #G #L #T #H #d elim (snv_fwd_aaa … H) -H
49 #A #HT elim (aaa_lstas h … HT d) -HT /2 width=2 by ex_intro/