]> matita.cs.unibo.it Git - helm.git/commitdiff
update in basic_2 and static_2
authorFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 27 Sep 2018 18:00:57 +0000 (20:00 +0200)
committerFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 27 Sep 2018 18:00:57 +0000 (20:00 +0200)
+ first results on type assignment
+ more notation for validity
+ eta-conversion defined (for use in linking the notions of validity)

27 files changed:
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_tdeq_trans.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpms.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_drops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/notation/notation.etc
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_lift.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_nta.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_5.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_5.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaimstar_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl
matita/matita/contribs/lambdadelta/static_2/notation/relations/pconveta_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/static/cpce.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl

index 92b22a46a39b2f211f688866eb6de824076032ba..c3fa8e11bcb9000d92c76518604cf109360f305a 100644 (file)
@@ -13,6 +13,8 @@
 (**************************************************************************)
 
 include "basic_2/notation/relations/exclaim_5.ma".
+include "basic_2/notation/relations/exclaim_4.ma".
+include "basic_2/notation/relations/exclaimstar_4.ma".
 include "basic_2/rt_computation/cpms.ma".
 
 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
@@ -33,6 +35,12 @@ inductive cnv (a) (h): relation3 genv lenv term ≝
 interpretation "context-sensitive native validity (term)"
    'Exclaim a h G L T = (cnv a h G L T).
 
+interpretation "context-sensitive restricted native validity (term)"
+   'Exclaim h G L T = (cnv true h G L T).
+
+interpretation "context-sensitive extended native validity (term)"
+   'ExclaimStar h G L T = (cnv false h G L T).
+
 (* Basic inversion lemmas ***************************************************)
 
 fact cnv_inv_zero_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → X = #0 →
index 18e2459596ea08dffcbdc08acf48d66596d2c299..e5b5d6f7a8696ddaadcb56aeca60ec408f2a4f08 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "basic_2/rt_transition/cpm_aaa.ma".
 include "basic_2/rt_computation/cpms_aaa.ma".
 include "basic_2/dynamic/cnv.ma".
 
@@ -40,3 +41,12 @@ lemma cnv_fwd_aaa (a) (h): ∀G,L,T. ⦃G, L⦄ ⊢ T ![a, h] → ∃A. ⦃G, L
   /3 width=3 by aaa_cast, ex_intro/
 ]
 qed-.
+
+(* Forward lemmas with t_bound rt_transition for terms **********************)
+
+lemma cnv_fwd_cpm_SO (a) (h) (G) (L):
+      ∀T. ⦃G, L⦄ ⊢ T ![a, h] → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
+#a #h #G #L #T #H
+elim (cnv_fwd_aaa … H) -H #A #HA
+/2 width=2 by aaa_cpm_SO/
+qed-.
index a0bda539d11edad8283507a8849f946cf5ea6e9a..7b19372587bad0a094c758e0ffe8a67577bd0868 100644 (file)
@@ -35,7 +35,7 @@ fact cnv_cpm_tdeq_cpm_trans_sub (a) (h) (o) (G0) (L0) (T0):
   [ #H1 #H2 destruct /2 width=4 by ex3_intro/
   | #s #H1 #H2 #H3 #Hs destruct
     elim (cpm_inv_sort1 … HX2) -HX2 #H #Hn2 destruct >iter_n_Sm
-    /5 width=6 by cpm_sort_iter, tdeq_sort, deg_iter, deg_next, ex3_intro/
+    /5 width=6 by cpm_sort, tdeq_sort, deg_iter, deg_next, ex3_intro/
   ]
 | #p #I #V1 #T1 #HG #HL #HT #H0 #n1 #X1 #H1X #H2X #n2 #X2 #HX2 destruct
   elim (cpm_tdeq_inv_bind_sn … H0 … H1X H2X) -H0 -H1X -H2X #T #_ #H0T1 #H1T1 #H2T1 #H destruct
index 4ea01e53417a1eaa72f4f3a840ae2dfb9d7bbf10..9e93c859d4c096bbedda88d2c206f69bdfb3e096 100644 (file)
@@ -42,8 +42,19 @@ qed-.
 
 (* Advanced preservation properties *****************************************)
 
+lemma cnv_cpms_conf (a) (h) (G) (L):
+      ∀T0. ⦃G,L⦄ ⊢ T0 ![a,h] →
+      ∀n1,T1. ⦃G,L⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G,L⦄ ⊢ T0 ➡*[n2,h] T2 →
+      ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G,L⦄ ⊢ T2 ➡*[n1-n2,h] T.
+/2 width=8 by cnv_cpms_conf_lpr/ qed-.
+
 (* Basic_2A1: uses: snv_cprs_lpr *)
 lemma cnv_cpms_trans_lpr (a) (h) (G) (L) (T): IH_cnv_cpms_trans_lpr a h G L T.
 #a #h #G #L1 #T1 #HT1 #n #T2 #H
 @(cpms_ind_dx … H) -n -T2 /3 width=6 by cnv_cpm_trans_lpr/
 qed-.
+
+lemma cnv_cpms_trans (a) (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![a,h] →
+      ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T2 ![a,h].
+/2 width=6 by cnv_cpms_trans_lpr/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta.ma
new file mode 100644 (file)
index 0000000..8f6e4c6
--- /dev/null
@@ -0,0 +1,137 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/colon_6.ma".
+include "basic_2/notation/relations/colon_5.ma".
+include "basic_2/notation/relations/colonstar_5.ma".
+include "basic_2/dynamic/cnv.ma".
+
+(* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
+
+definition nta (a) (h): relation4 genv lenv term term ≝
+                        λG,L,T,U. ⦃G,L⦄ ⊢ ⓝU.T ![a,h].
+
+interpretation "native type assignment (term)"
+   'Colon a h G L T U = (nta a h G L T U).
+
+interpretation "restricted native type assignment (term)"
+   'Colon h G L T U = (nta true h G L T U).
+
+interpretation "extended native type assignment (term)"
+   'ColonStar h G L T U = (nta false h G L T U).
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was by definition: ty3_sort *)
+(* Basic_2A1: was by definition: nta_sort ntaa_sort *)
+lemma nta_sort (a) (h) (G) (L) (s): ⦃G,L⦄ ⊢ ⋆s :[a,h] ⋆(next h s).
+#a #h #G #L #s /2 width=3 by cnv_sort, cnv_cast, cpms_sort/
+qed.
+
+lemma nta_bind_cnv (a) (h) (G) (K):
+      ∀V. ⦃G,K⦄ ⊢ V ![a,h] →
+      ∀I,T,U. ⦃G,K.ⓑ{I}V⦄ ⊢ T :[a,h] U →
+      ∀p. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :[a,h] ⓑ{p,I}V.U.
+#a #h #G #K #V #HV #I #T #U #H #p
+elim (cnv_inv_cast … H) -H #X #HU #HT #HUX #HTX
+/3 width=5 by cnv_bind, cnv_cast, cpms_bind_dx/
+qed.
+
+(* Basic_2A1: was by definition: nta_cast *)
+lemma nta_cast (a) (h) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ⦃G,L⦄ ⊢ ⓝU.T :[a,h] U.
+#a #h #G #L #T #U #H
+elim (cnv_inv_cast … H) #X #HU #HT #HUX #HTX
+/3 width=3 by cnv_cast, cpms_eps/
+qed.
+
+(* Basic_1: was by definition: ty3_cast *)
+lemma nta_cast_old (a) (h) (G) (L):
+      ∀T0,T1. ⦃G,L⦄ ⊢ T0 :[a,h] T1 →
+      ∀T2. ⦃G,L⦄ ⊢ T1 :[a,h] T2 → ⦃G,L⦄ ⊢ ⓝT1.T0 :[a,h] ⓝT2.T1.
+#a #h #G #L #T0 #T1 #H1 #T2 #H2
+elim (cnv_inv_cast … H1) #X1 #_ #_ #HTX1 #HTX01
+elim (cnv_inv_cast … H2) #X2 #_ #_ #HTX2 #HTX12
+/3 width=3 by cnv_cast, cpms_eps/
+qed.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma nta_fwd_cnv_sn (a) (h) (G) (L):
+                     ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ⦃G,L⦄ ⊢ T ![a,h].
+#a #h #G #L #T #U #H
+elim (cnv_inv_cast … H) -H #X #_ #HT #_ #_ //
+qed-.
+
+(* Note: this is nta_fwd_correct_cnv *)
+lemma nta_fwd_cnv_dx (a) (h) (G) (L):
+                     ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ⦃G,L⦄ ⊢ U ![a,h].
+#a #h #G #L #T #U #H
+elim (cnv_inv_cast … H) -H #X #HU #_ #_ #_ //
+qed-.
+
+(*
+
+| nta_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → nta h K V W →
+            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
+| nta_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → nta h K W V →
+            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
+.
+
+(* Basic properties *********************************************************)
+
+lemma nta_ind_alt: ∀h. ∀R:lenv→relation term.
+   (∀L,k. R L ⋆k ⋆(next h k)) →
+   (∀L,K,V,W,U,i.
+      ⇩[O, i] L ≡ K.ⓓV → ⦃h, K⦄ ⊢ V : W → ⇧[O, i + 1] W ≡ U →
+      R K V W → R L (#i) U 
+   ) →
+   (∀L,K,W,V,U,i.
+      ⇩[O, i] L ≡ K.ⓛW → ⦃h, K⦄ ⊢ W : V → ⇧[O, i + 1] W ≡ U →
+      R K W V → R L (#i) U
+   ) →
+   (∀I,L,V,W,T,U.
+      ⦃h, L⦄ ⊢ V : W → ⦃h, L.ⓑ{I}V⦄ ⊢ T : U →
+      R L V W → R (L.ⓑ{I}V) T U → R L (ⓑ{I}V.T) (ⓑ{I}V.U)
+   ) →
+   (∀L,V,W,T,U.
+      ⦃h, L⦄ ⊢ V : W → ⦃h, L⦄ ⊢ (ⓛW.T):(ⓛW.U) →
+      R L V W →R L (ⓛW.T) (ⓛW.U) →R L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
+   ) →
+   (∀L,V,W,T,U.
+      ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ (ⓐV.U) : W →
+      R L T U → R L (ⓐV.U) W → R L (ⓐV.T) (ⓐV.U)
+   ) →
+   (∀L,T,U,W.
+      ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ U : W →
+      R L T U → R L U W → R L (ⓝU.T) U
+   ) →
+   (∀L,T,U1,U2,V2.
+      ⦃h, L⦄ ⊢ T : U1 → L ⊢ U1 ⬌* U2 → ⦃h, L⦄ ⊢ U2 : V2 →
+      R L T U1 →R L U2 V2 →R L T U2
+   ) →
+   ∀L,T,U. ⦃h, L⦄ ⊢ T : U → R L T U.
+#h #R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #L #T #U #H elim (nta_ntaa … H) -L -T -U
+// /3 width=1 by ntaa_nta/ /3 width=3 by ntaa_nta/ /3 width=4 by ntaa_nta/
+/3 width=7 by ntaa_nta/
+qed-.
+
+*)
+
+(* Basic_1: removed theorems 4:
+            ty3_getl_subst0 ty3_fsubst0 ty3_csubst0 ty3_subst0
+*)
+(* Basic_2A1: removed theorems 2:
+   ntaa_nta nta_ntaa
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma
new file mode 100644 (file)
index 0000000..4d695a3
--- /dev/null
@@ -0,0 +1,53 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_equivalence/cpcs_cprs.ma".
+include "basic_2/dynamic/nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
+
+(* Properties with r-equivalence for terms **********************************)
+
+lemma nta_conv_cnv (a) (h) (G) (L) (T):
+                   ∀U1. ⦃G,L⦄ ⊢ T :[a,h] U1 →
+                   ∀U2. ⦃G,L⦄  ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![a,h] → ⦃G,L⦄ ⊢ T :[a,h] U2.
+#a #h #G #L #T #U1 #H1 #U2 #HU12 #HU2
+elim (cnv_inv_cast … H1) -H1 #X1 #HU1 #HT #HUX1 #HTX1
+lapply (cpcs_cprs_conf … HUX1 … HU12) -U1 #H
+elim (cpcs_inv_cprs … H) -H #X2 #HX12 #HU12
+/3 width=5 by cnv_cast, cpms_cprs_trans/
+qed-.
+
+(* Basic_1: was by definition: ty3_conv *)
+(* Basic_2A1: was by definition: nta_conv ntaa_conv *)
+lemma nta_conv (a) (h) (G) (L) (T):
+               ∀U1. ⦃G,L⦄ ⊢ T :[a,h] U1 →
+               ∀U2. ⦃G,L⦄  ⊢ U1 ⬌*[h] U2 →
+               ∀W2. ⦃G,L⦄ ⊢ U2 :[a,h] W2 → ⦃G,L⦄ ⊢ T :[a,h] U2.
+#a #h #G #L #T #U1 #H1 #U2 #HU12 #W2 #H2
+/3 width=3 by nta_conv_cnv, nta_fwd_cnv_sn/
+qed-.
+
+(* Inversion lemmas with r-equivalence for terms ***************************)
+
+(* Basic_1: was: ty3_gen_sort *)
+(* Basic_2A1: was: nta_inv_sort1 *)
+lemma nta_inv_sort_sn (a) (h) (G) (L) (X2):
+      ∀s. ⦃G,L⦄ ⊢ ⋆s :[a,h] X2 → ⦃G,L⦄ ⊢ ⋆(next h s) ⬌*[h] X2.
+#a #h #G #L #X2 #s #H
+elim (cnv_inv_cast … H) -H #X1 #HX2 #_ #HX21 #H
+lapply (cpms_inv_sort1 … H) -H #H destruct
+/2 width=1 by cpcs_cprs_sn/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpms.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpms.ma
new file mode 100644 (file)
index 0000000..71cc3f9
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cprs_cprs.ma".
+include "basic_2/rt_computation/lprs_cpms.ma".
+include "basic_2/dynamic/nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
+
+(* Properties with rt_computation for terms *********************************)
+
+(* Basic_2A1: was by definition nta_appl ntaa_appl *)
+lemma nta_beta (a) (h) (p) (G) (L):
+      ∀V,W. ⦃G,L⦄ ⊢ V :[a,h] W →
+      ∀T,U. ⦃G,L⦄ ⊢ ⓛ{p}W.T :[a,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T :[a,h] ⓐV.ⓛ{p}W.U.
+#a #h #p #G #L #V #W #H1 #T #U #H2
+elim (cnv_inv_cast … H1) -H1 #X1 #HW #HV #HWX1 #HVX1
+elim (cnv_inv_cast … H2) -H2 #X2 #HU #HT #HUX2 #HTX2
+/4 width=7 by cnv_cast, cnv_appl, cpms_bind, cpms_appl_dx/
+qed.
+
+(* Basic_1: was by definition: ty3_appl *)
+(* Basic_2A1: was nta_appl_old *)
+lemma nta_appl (h) (p) (G) (L):
+      ∀V,W. ⦃G,L⦄ ⊢ V :[h] W →
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.T :[h] ⓐV.ⓛ{p}W.U.
+#h #p #G #L #V #W #H1 #T #U #H2
+elim (cnv_inv_cast … H1) -H1 #X1 #HW #HV #HWX1 #HVX1
+elim (cnv_inv_cast … H2) -H2 #X2 #HU #HT #HUX2 #HTX2
+elim (cpms_inv_abst_sn … HUX2) #W0 #U0 #HW0 #HU0 #H destruct
+elim (cprs_conf … HWX1 … HW0) -HW0 #X0 #HX10 #HWX0
+@(cnv_cast … (ⓐV.ⓛ{p}W0.U0)) (**) (* full auto too slow *)
+[ /3 width=7 by cnv_appl, cpms_bind/
+| /4 width=11 by cnv_appl, cpms_cprs_trans, cpms_bind/
+| /2 width=1 by cpms_appl_dx/
+| /2 width=1 by cpms_appl_dx/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_drops.ma
new file mode 100644 (file)
index 0000000..d8184be
--- /dev/null
@@ -0,0 +1,82 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+(*
+include "basic_2/dynamic/nta_alt.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+fact nta_inv_lref1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀j. T = #j →
+                        (∃∃K,V,W,U0. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
+                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                        ) ∨
+                        (∃∃K,W,V,U0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
+                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                        ).
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #j #H destruct
+| #L #K #V #W #U #i #HLK #HVW #HWU #_ #j #H destruct /3 width=8/
+| #L #K #W #V #U #i #HLK #HWV #HWU #_ #j #H destruct /3 width=8/
+| #I #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
+| #L #T #U #_ #_ #j #H destruct
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #j #H destruct
+  elim (IHTU1 ??) -IHTU1 [4: // |2: skip ] * #K #V #W #U0 #HLK #HVW #HWU0 #HU01
+  lapply (cpcs_trans … HU01 … HU12) -U1 /3 width=8/
+]
+qed.
+
+(* Basic_1: was ty3_gen_lref *)
+lemma nta_inv_lref1: ∀h,L,U,i. ⦃h, L⦄ ⊢ #i : U →
+                     (∃∃K,V,W,U0. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
+                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                     ) ∨
+                     (∃∃K,W,V,U0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
+                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                     ).
+/2 width=3/ qed-.
+
+(* Advanced forvard lemmas **************************************************)
+
+fact nta_fwd_pure1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓐY.X →
+                        ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W #T #U #HVW #HTU #_ #_ #X #Y #H destruct /2 width=3/
+| #L #V #W #T #U #HTU #_ #_ #IHUW #X #Y #H destruct
+  elim (IHUW U Y ?) -IHUW // /2 width=3/
+| #L #T #U #_ #_ #X #Y #H destruct
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #V #W #HYW #HXV #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
+]
+qed.
+
+lemma nta_fwd_pure1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
+                     ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
+/2 width=3/ qed-.
+
+(* Properties on relocation *************************************************)
+
+(* Basic_1: was: ty3_lift *)
+(* Basic_2A1: was: ntaa_lift *)
+lemma nta_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
+                ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 : U2.
+/4 width=9 by ntaa_nta, nta_ntaa, ntaa_lift/ qed.
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma
new file mode 100644 (file)
index 0000000..ab3b33a
--- /dev/null
@@ -0,0 +1,119 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_equivalence/cpcs_cprs.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+include "basic_2/dynamic/nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
+
+(* Properties based on preservation *****************************************)
+
+lemma cnv_cpms_nta (a) (h) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∀U.⦃G,L⦄ ⊢ T ➡*[1,h] U → ⦃G,L⦄ ⊢ T :[a,h] U.
+/3 width=4 by cnv_cast, cnv_cpms_trans/ qed.
+
+lemma cnv_nta_sn (a) (h) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∃U. ⦃G,L⦄ ⊢ T :[a,h] U.
+#a #h #G #L #T #HT
+elim (cnv_fwd_cpm_SO … HT) #U #HTU
+/4 width=2 by cnv_cpms_nta, cpm_cpms, ex_intro/
+qed-.
+
+lemma nta_pure_cnv (h) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :*[h] U →
+      ∀V. ⦃G,L⦄ ⊢ ⓐV.U !*[h] → ⦃G,L⦄ ⊢ ⓐV.T :*[h] ⓐV.U.
+#h #G #L #T #U #H1 #V #H2
+elim (cnv_inv_cast … H1) -H1 #X0 #HU #HT #HUX0 #HTX0
+elim (cnv_inv_appl … H2) #n #p #X1 #X2 #_ #HV #_ #HVX1 #HUX2
+elim (cnv_cpms_conf … HU … HUX0 … HUX2) -HU -HUX2
+<minus_O_n <minus_n_O #X #HX0 #H
+elim (cpms_inv_abst_sn … H) -H #X3 #X4 #HX13 #HX24 #H destruct
+@(cnv_cast … (ⓐV.X0)) [2:|*: /2 width=1 by cpms_appl_dx/ ]
+@(cnv_appl … X3) [4: |*: /2 width=7 by cpms_trans, cpms_cprs_trans/ ]
+#H destruct
+qed.
+
+(* Inversion lemmas based on preservation ***********************************)
+
+lemma nta_inv_bind_sn_cnv (a) (h) (p) (I) (G) (K) (X2):
+      ∀V,T. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :[a,h] X2 →
+      ∃∃U. ⦃G,K⦄ ⊢ V ![a,h] & ⦃G,K.ⓑ{I}V⦄ ⊢ T :[a,h] U & ⦃G,K⦄ ⊢ ⓑ{p,I}V.U ⬌*[h] X2 & ⦃G,K⦄ ⊢ X2 ![a,h].
+#a #h #p * #G #K #X2 #V #T #H
+elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
+elim (cnv_inv_bind … H1) -H1 #HV #HT
+[ elim (cpms_inv_abbr_sn_dx … H2) -H2 *
+  [ #V0 #U #HV0 #HTU #H destruct
+    /4 width=5 by cnv_cpms_nta, cprs_div, cpms_bind, ex4_intro/
+  | #U #HTU #HX1U #H destruct
+    /4 width=5 by cnv_cpms_nta, cprs_div, cpms_zeta, ex4_intro/
+  ]
+| elim (cpms_inv_abst_sn … H2) -H2 #V0 #U #HV0 #HTU #H destruct
+  /4 width=5 by cnv_cpms_nta, cprs_div, cpms_bind, ex4_intro/
+]
+qed-.
+
+(* Basic_1: uses: ty3_gen_appl *)
+lemma nta_inv_appl_sn (h) (G) (L) (X2):
+      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T :[h] X2 →
+      ∃∃p,W,U. ⦃G,L⦄ ⊢ V :[h] W & ⦃G,L⦄ ⊢ T :[h] ⓛ{p}W.U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h].
+#h #G #L #X2 #V #T #H
+elim (cnv_inv_cast … H) -H #X #HX2 #H1 #HX2 #H2
+elim (cnv_inv_appl … H1) * [ | #n ] #p #W #U #Hn #HV #HT #HVW #HTU
+[ lapply (cnv_cpms_trans … HT … HTU) #H
+  elim (cnv_inv_bind … H) -H #_ #HU
+  elim (cnv_fwd_cpm_SO … HU) #U0 #HU0 -HU
+  lapply (cpms_step_dx … HTU 1 (ⓛ{p}W.U0) ?) -HTU [ /2 width=1 by cpm_bind/ ] #HTU
+| lapply (le_n_O_to_eq n ?) [ /3 width=1 by le_S_S_to_le/ ] -Hn #H destruct
+]
+lapply (cpms_appl_dx … V V … HTU) [1,3: // ] #HVTU
+elim (cnv_cpms_conf … H1 … H2 … HVTU) -H1 -H2 -HVTU <minus_n_n #X0 #HX0 #HUX0
+@ex4_3_intro [6,13: |*: /2 width=5 by cnv_cpms_nta/ ]
+/3 width=5 by cprs_div, cprs_trans/
+qed-.
+
+(* Basic_2A1: uses: nta_inv_cast1 *)
+lemma nta_inv_cast_sn (a) (h) (G) (L) (X2):
+      ∀U,T. ⦃G,L⦄ ⊢ ⓝU.T :[a,h] X2 →
+      ∧∧ ⦃G,L⦄ ⊢ T :[a,h] U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
+#a #h #G #L #X2 #U #T #H
+elim (cnv_inv_cast … H) -H #X0 #HX2 #H1 #HX20 #H2
+elim (cnv_inv_cast … H1) #X #HU #HT #HUX #HTX
+elim (cpms_inv_cast1 … H2) -H2 [ * || * ]
+[ #U0 #T0 #HU0 #HT0 #H destruct -HU -HU0
+  elim (cnv_cpms_conf … HT … HTX … HT0) -HT -HTX -HT0
+  <minus_n_n #T1 #HXT1 #HT01
+  @and3_intro // @(cprs_div … T1) /3 width=4 by cprs_trans, cpms_eps/ (**) (* full auto too slow *)
+| #HTX0 -HU
+  elim (cnv_cpms_conf … HT … HTX … HTX0) -HT -HTX -HTX0
+  <minus_n_n #T1 #HXT1 #HXT01
+  @and3_intro // @(cprs_div … T1) /2 width=3 by cprs_trans/ (**) (* full auto too slow *)
+| #m #HUX0 #H destruct -HT -HTX
+  elim (cnv_cpms_conf … HU … HUX … HUX0) -HU -HUX0
+  <minus_n_n #U1 #HXU1 #HXU01
+  @and3_intro // @(cprs_div … U1) /2 width=3 by cprs_trans/ (**) (* full auto too slow *)
+]
+qed-.
+
+(* Forward lemmas based on preservation *************************************)
+
+(* Basic_1: was: ty3_unique *)
+theorem nta_mono (a) (h) (G) (L) (T):
+        ∀U1. ⦃G,L⦄ ⊢ T :[a,h] U1 → ∀U2. ⦃G,L⦄ ⊢ T :[a,h] U2 → ⦃G,L⦄  ⊢ U1 ⬌*[h] U2.
+#a #h #G #L #T #U1 #H1 #U2 #H2
+elim (cnv_inv_cast … H1) -H1 #X1 #_ #_ #HUX1 #HTX1
+elim (cnv_inv_cast … H2) -H2 #X2 #_ #HT #HUX2 #HTX2
+elim (cnv_cpms_conf … HT … HTX1 … HTX2) -T <minus_n_n #X #HX1 #HX2
+/3 width=5 by cprs_div, cprs_trans/
+qed-.
index e60c75d42324183fee5c14c376cf5bd61ba968b2..ea80fd16194b178e3eafe17f2fa3e0c4d979aebc 100644 (file)
@@ -33,15 +33,3 @@ notation "hvbox( L1 ⊢ ⬌ break term 46 L2 )"
 notation "hvbox( L1 ⊢ ⬌* break term 46 L2 )"
    non associative with precedence 45
    for @{ 'PConvSnStar $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'NativeType $h $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : : break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'NativeTypeAlt $h $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : * break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'NativeTypeStar $h $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc
new file mode 100644 (file)
index 0000000..7c9fc0d
--- /dev/null
@@ -0,0 +1,39 @@
+(* Basic_1: was by definition: ty3_bind *)
+(* Basic_2A1: was by definition: nta_bind ntaa_bind *)
+lemma nta_bind
+
+(* Basic_2A1: was by definition: nta_pure ntaa_pure *)
+lemma nta_pure
+
+(* Basic_1: was: ty3_gen_bind *)
+(* Basic_2A1: was: nta_inv_bind1 ntaa_inv_bind1 *)
+lemma nta_inv_bind_sn
+
+| ntaa_cast: ∀L,T,U,W. ntaa h L T U → ntaa h L U W → ntaa h L (ⓝU. T) U
+
+(* Advanced properties ******************************************************)
+
+lemma nta_cast_alt: ∀h,L,T,W,U. ⦃h, L⦄ ⊢ T  : W → ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ ⓝW.T : U.
+#h #L #T #W #U #HTW #HTU
+lapply (nta_mono … HTW … HTU) #HWU
+elim (nta_fwd_correct … HTU) -HTU /3 width=3/
+qed.
+
+lemma nta_inv_cast1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓝY.X : U →  ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
+/2 width=3/ qed-.
+
+(* Basic_1: uses: ty3_gen_cast *)
+lemma nta_inv_cast_sn_old (a) (h) (G) (L) (X2):
+      ∀T0,T1. ⦃G,L⦄ ⊢ ⓝT1.T0 :[a,h] X2 →
+      ∃∃T2. ⦃G,L⦄ ⊢ T0 :[a,h] T1 & ⦃G,L⦄ ⊢ T1 :[a,h] T2 & ⦃G,L⦄ ⊢ ⓝT2.T1 ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
+
+(* Basic_1: was: ty3_typecheck *)
+lemma nta_typecheck: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ ⓝU.T : T0.
+/3 width=2/ qed.
+
+(* Basic_1: was: ty3_correct *)
+(* Basic_2A1: was: ntaa_fwd_correct *)
+lemma nta_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ U : T0.
+#h #L #T #U #H
+elim (ntaa_fwd_correct … (nta_ntaa … H)) -H /3 width=2 by ntaa_nta, ex_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta.etc
deleted file mode 100644 (file)
index fa4a8ed..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/sh.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-inductive nta (h:sh): lenv → relation term ≝
-| nta_sort: ∀L,k. nta h L (⋆k) (⋆(next h k))
-| nta_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → nta h K V W →
-            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
-| nta_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → nta h K W V →
-            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
-| nta_bind: ∀I,L,V,W,T,U. nta h L V W → nta h (L. ⓑ{I} V) T U →
-            nta h L (ⓑ{I}V.T) (ⓑ{I}V.U)
-| nta_appl: ∀L,V,W,T,U. nta h L V W → nta h L (ⓛW.T) (ⓛW.U) →
-            nta h L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
-| nta_pure: ∀L,V,W,T,U. nta h L T U → nta h L (ⓐV.U) W →
-            nta h L (ⓐV.T) (ⓐV.U)
-| nta_cast: ∀L,T,U. nta h L T U → nta h L (ⓝU. T) U
-| nta_conv: ∀L,T,U1,U2,V2. nta h L T U1 → L ⊢ U1 ⬌* U2 → nta h L U2 V2 →
-            nta h L T U2
-.
-
-interpretation "native type assignment (term)"
-   'NativeType h L T U = (nta h L T U).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: ty3_cast *)
-lemma nta_cast_old: ∀h,L,W,T,U.
-                    ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ U : W → ⦃h, L⦄ ⊢ ⓝU.T : ⓝW.U.
-/4 width=3/ qed.
-
-(* Basic_1: was: ty3_typecheck *)
-lemma nta_typecheck: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ ⓝU.T : T0.
-/3 width=2/ qed.
-
-(* Basic_1: removed theorems 4:
-            ty3_getl_subst0 ty3_fsubst0 ty3_csubst0 ty3_subst0
-*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_lift.etc
deleted file mode 100644 (file)
index 57e06a1..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/nta_alt.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-fact nta_inv_sort1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀k0. T = ⋆k0 →
-                        L ⊢ ⋆(next h k0) ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #k0 #H destruct //
-| #L #K #V #W #U #i #_ #_ #_ #_ #k0 #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #k0 #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
-| #L #T #U #_ #_ #k0 #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #k0 #H destruct
-  lapply (IHTU1 ??) -IHTU1 [ // | skip ] #Hk0
-  lapply (cpcs_trans … Hk0 … HU12) -U1 //
-]
-qed.
-
-(* Basic_1: was: ty3_gen_sort *)
-lemma nta_inv_sort1: ∀h,L,U,k. ⦃h, L⦄ ⊢ ⋆k : U → L ⊢ ⋆(next h k) ⬌* U.
-/2 width=3/ qed-.
-
-fact nta_inv_lref1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀j. T = #j →
-                        (∃∃K,V,W,U0. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
-                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                        ) ∨
-                        (∃∃K,W,V,U0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
-                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                        ).
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #j #H destruct
-| #L #K #V #W #U #i #HLK #HVW #HWU #_ #j #H destruct /3 width=8/
-| #L #K #W #V #U #i #HLK #HWV #HWU #_ #j #H destruct /3 width=8/
-| #I #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
-| #L #T #U #_ #_ #j #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #j #H destruct
-  elim (IHTU1 ??) -IHTU1 [4: // |2: skip ] * #K #V #W #U0 #HLK #HVW #HWU0 #HU01
-  lapply (cpcs_trans … HU01 … HU12) -U1 /3 width=8/
-]
-qed.
-
-(* Basic_1: was ty3_gen_lref *)
-lemma nta_inv_lref1: ∀h,L,U,i. ⦃h, L⦄ ⊢ #i : U →
-                     (∃∃K,V,W,U0. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
-                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                     ) ∨
-                     (∃∃K,W,V,U0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
-                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                     ).
-/2 width=3/ qed-.
-
-(* Basic_1: was: ty3_gen_bind *)
-lemma nta_inv_bind1: ∀h,I,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{I}Y.X : U →
-                     ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y : Z1 & ⦃h, L.ⓑ{I}Y⦄ ⊢ X : Z2 &
-                              L ⊢ ⓑ{I}Y.Z2 ⬌* U.
-#h #I #L #Y #X #U #H
-elim (ntaa_inv_bind1 … (nta_ntaa … H)) -H /3 width=3 by ntaa_nta, ex3_2_intro/
-qed-.
-
-fact nta_inv_cast1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓝY.X →
-                     ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #T #U #HTU #_ #X #Y #H destruct /2 width=1/
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #HXY #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=1/
-]
-qed.
-
-(* Basic_1: was: ty3_gen_cast *)
-lemma nta_inv_cast1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓝY.X : U →  ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
-/2 width=3/ qed-.
-
-(* Advanced forvard lemmas **************************************************)
-
-fact nta_fwd_pure1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓐY.X →
-                        ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #T #U #HVW #HTU #_ #_ #X #Y #H destruct /2 width=3/
-| #L #V #W #T #U #HTU #_ #_ #IHUW #X #Y #H destruct
-  elim (IHUW U Y ?) -IHUW // /2 width=3/
-| #L #T #U #_ #_ #X #Y #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #V #W #HYW #HXV #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
-]
-qed.
-
-lemma nta_fwd_pure1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
-                     ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
-/2 width=3/ qed-.
-
-(* Basic_1: was: ty3_correct *)
-lemma nta_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ U : T0.
-#h #L #T #U #H
-elim (ntaa_fwd_correct … (nta_ntaa … H)) -H /3 width=2 by ntaa_nta, ex_intro/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was: ty3_appl *)
-lemma nta_appl_old: ∀h,L,V,W,T,U. ⦃h, L⦄ ⊢ V : W → ⦃h, L⦄ ⊢ T : ⓛW.U →
-                    ⦃h, L⦄ ⊢ ⓐV.T : ⓐV.ⓛW.U.
-#h #L #V #W #T #U #HVW #HTU
-elim (nta_fwd_correct … HTU) #X #H
-elim (nta_inv_bind1 … H) -H /4 width=2/
-qed.
-
-(* Properties on relocation *************************************************)
-
-(* Basic_1: was: ty3_lift *)
-lemma nta_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
-                ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 : U2.
-/4 width=9 by ntaa_nta, nta_ntaa, ntaa_lift/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_nta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_nta.etc
deleted file mode 100644 (file)
index 05eb6c5..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/nta_lift.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: ty3_unique *)
-theorem nta_mono: ∀h,L,T,U1. ⦃h, L⦄ ⊢ T : U1 → ∀U2. ⦃h, L⦄ ⊢ T : U2 →
-                  L ⊢ U1 ⬌* U2.
-#h #L #T #U1 #H elim H -L -T -U1
-[ #L #k #X #H
-  lapply (nta_inv_sort1 … H) -H //
-| #L #K #V #W11 #W12 #i #HLK #_ #HW112 #IHVW11 #X #H
-  elim (nta_inv_lref1 … H) -H * #K0 #V0 #W21 #W22 #HLK0 #HVW21 #HW212 #HX
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  @(cpcs_trans … HX) -X /3 width=9 by cpcs_lift/ (**) (* to slow without trace *)
-| #L #K #W #V1 #V #i #HLK #_ #HWV #_ #X #H
-  elim (nta_inv_lref1 … H) -H * #K0 #W0 #V2 #V0 #HLK0 #_ #HWV0 #HX
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H destruct
-  lapply (lift_mono … HWV0 … HWV) -HWV0 -HWV #H destruct //
-| #I #L #V #W1 #T #U1 #_ #_ #_ #IHTU1 #X #H
-  elim (nta_inv_bind1 … H) -H #W2 #U2 #_ #HTU2 #H
-  @(cpcs_trans … H) -X /3 width=1/
-| #L #V #W1 #T #U1 #_ #_ #_ #IHTU1 #X #H
-  elim (nta_fwd_pure1 … H) -H #U2 #W2 #_ #HTU2 #H
-  @(cpcs_trans … H) -X /3 width=1/
-| #L #V #W1 #T #U1 #_ #_ #IHTU1 #_ #X #H
-  elim (nta_fwd_pure1 … H) -H #U2 #W2 #_ #HTU2 #H
-  @(cpcs_trans … H) -X /3 width=1/
-| #L #T #U1 #_ #_ #X #H
-  elim (nta_inv_cast1 … H) -H //
-| #L #T #U11 #U12 #V12 #_ #HU112 #_ #IHTU11 #_ #U2 #HTU2
-  @(cpcs_canc_sn … HU112) -U12 /2 width=1/
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma nta_cast_alt: ∀h,L,T,W,U. ⦃h, L⦄ ⊢ T : W → ⦃h, L⦄ ⊢ T : U →
-             ⦃h, L⦄ ⊢ ⓝW.T : U.
-#h #L #T #W #U #HTW #HTU
-lapply (nta_mono … HTW … HTU) #HWU
-elim (nta_fwd_correct … HTU) -HTU /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_5.ma
new file mode 100644 (file)
index 0000000..ae11ded
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :[ break term 46 h ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'Colon $h $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_6.ma
new file mode 100644 (file)
index 0000000..96a32c2
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :[ break term 46 a, break term 46 h ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'Colon $a $h $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_5.ma
new file mode 100644 (file)
index 0000000..edbdd67
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :*[ break term 46 h ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'ColonStar $h $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_4.ma
new file mode 100644 (file)
index 0000000..d305586
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T ![ break term 46 h ] )"
+   non associative with precedence 45
+   for @{ 'Exclaim $h $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaimstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaimstar_4.ma
new file mode 100644 (file)
index 0000000..7246d41
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T !*[ break term 46 h ] )"
+   non associative with precedence 45
+   for @{ 'ExclaimStar $h $G $L $T }.
index 11c955108632b31a54a370063d00622b420ca5b3..454ee83127c6499287d18df4e8decbff5ce1ae03 100644 (file)
@@ -47,14 +47,6 @@ lemma cpms_ind_dx (h) (G) (L) (T1) (Q:relation2 …):
 #h #G #L #T1 #Q @ltc_ind_dx_refl //
 qed-.
 
-(* Basic inversion lemmas ***************************************************)
-
-lemma cpms_inv_sort1 (n) (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[n, h] X2 → X2 = ⋆(((next h)^n) s).
-#n #h #G #L #X2 #s #H @(cpms_ind_dx … H) -X2 //
-#n1 #n2 #X #X2 #_ #IH #HX2 destruct
-elim (cpm_inv_sort1 … HX2) -HX2 #H #_ destruct //
-qed-.
-
 (* Basic properties *********************************************************)
 
 (* Basic_1: includes: pr1_pr0 *)
@@ -147,6 +139,46 @@ qed.
 lemma cprs_refl: ∀h,G,L. reflexive … (cpms h G L 0).
 /2 width=1 by cpm_cpms/ qed.
 
+(* Advanced properties ******************************************************)
+
+lemma cpms_sort (h) (G) (L) (n):
+                ∀s. ⦃G,L⦄ ⊢ ⋆s ➡*[n,h] ⋆((next h)^n s).
+#h #G #L #n elim n -n [ // ]
+#n #IH #s <plus_SO
+/3 width=3 by cpms_step_dx, cpm_sort/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cpms_inv_sort1 (n) (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[n, h] X2 → X2 = ⋆(((next h)^n) s).
+#n #h #G #L #X2 #s #H @(cpms_ind_dx … H) -X2 //
+#n1 #n2 #X #X2 #_ #IH #HX2 destruct
+elim (cpm_inv_sort1 … HX2) -HX2 #H #_ destruct //
+qed-.
+
+lemma cpms_inv_cast1 (h) (n) (G) (L):
+      ∀W1,T1,X2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[n,h] X2 →
+      ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[n,h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 & X2 = ⓝW2.T2
+       | ⦃G, L⦄ ⊢ T1 ➡*[n,h] X2
+       | ∃∃m. ⦃G, L⦄ ⊢ W1 ➡*[m,h] X2 & n = ↑m.
+#h #n #G #L #W1 #T1 #X2 #H @(cpms_ind_dx … H) -n -X2
+[ /3 width=5 by or3_intro0, ex3_2_intro/
+| #n1 #n2 #X #X2 #_ * [ * || * ]
+  [ #W #T #HW1 #HT1 #H #HX2 destruct
+    elim (cpm_inv_cast1 … HX2) -HX2 [ * || * ]
+    [ #W2 #T2 #HW2 #HT2 #H destruct
+      /4 width=5 by cpms_step_dx, ex3_2_intro, or3_intro0/
+    | #HX2 /3 width=3 by cpms_step_dx, or3_intro1/
+    | #m #HX2 #H destruct <plus_n_Sm
+      /4 width=3 by cpms_step_dx, ex2_intro, or3_intro2/
+    ]
+  | #HX #HX2 /3 width=3 by cpms_step_dx, or3_intro1/
+  | #m #HX #H #HX2 destruct
+    /4 width=3 by cpms_step_dx, ex2_intro, or3_intro2/
+  ]
+]
+qed-.
+
 (* Basic_2A1: removed theorems 5:
               sta_cprs_scpds lstas_scpds scpds_strap1 scpds_fwd_cprs
               scpds_inv_lstas_eq
index 230160ac73a7dda9a0ac4867acd43e02b0e3d882..ff8271ebda2a482c36b7ed9734a64c6444c9bf3d 100644 (file)
@@ -84,15 +84,13 @@ lemma cprs_inv_sort1 (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[h] X2 → X2
 
 (* Basic_1: was: pr3_gen_cast *)
 lemma cprs_inv_cast1 (h) (G) (L): ∀W1,T1,X2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[h] X2 →
-                                  ∨∨ ⦃G, L⦄ ⊢ T1 ➡*[h] X2
-                                   | ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h] T2 & X2 = ⓝW2.T2.
-#h #G #L #W1 #T1 #X2 #H @(cprs_ind_dx … H) -X2
-[ /3 width=5 by ex3_2_intro, or_intror/
-| #X #X2 #_ #HX2 * /3 width=3 by cprs_step_dx, or_introl/ *
-  #W #T #HW1 #HT1 #H destruct
-  elim (cpr_inv_cast1 … HX2) -HX2 /3 width=3 by cprs_step_dx, or_introl/ *
-  #W2 #T2 #HW2 #HT2 #H destruct
-  /4 width=5 by cprs_step_dx, ex3_2_intro, or_intror/
+                                  ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h] T2 & X2 = ⓝW2.T2
+                                   | ⦃G, L⦄ ⊢ T1 ➡*[h] X2.
+#h #G #L #W1 #T1 #X2 #H
+elim (cpms_inv_cast1 … H) -H
+[ /2 width=1 by or_introl/
+| /2 width=1 by or_intror/
+| * #m #_ #H destruct
 ]
 qed-.
 
index d0d19e4a757f10ddc6a73badfe35d69b0564dd72..341ecee8cfde5b23e00b615b04c4d3ef40673cc7 100644 (file)
@@ -121,9 +121,8 @@ lemma cpr_refl: ∀h,G,L. reflexive … (cpm h G L 0).
 
 (* Advanced properties ******************************************************)
 
-lemma cpm_sort_iter (h) (G) (L):
-                    ∀n. n ≤ 1 →
-                    ∀s. ⦃G,L⦄ ⊢ ⋆s ➡ [n,h] ⋆((next h)^n s).
+lemma cpm_sort (h) (G) (L):
+               ∀n. n ≤ 1 → ∀s. ⦃G,L⦄ ⊢ ⋆s ➡[n,h] ⋆((next h)^n s).
 #h #G #L * //
 #n #H #s <(le_n_O_to_eq n) /2 width=1 by le_S_S_to_le/
 qed.
index eff341b1d95a0342a7d253a657f0819ef94d89a4..8fa425fc5faec08abbd400c59ac655a22fd0f436 100644 (file)
@@ -22,3 +22,28 @@ include "basic_2/rt_transition/lpx_aaa.ma".
 (* Basic_2A1: includes: cpr_aaa_conf *)
 lemma cpm_aaa_conf (n) (h): ∀G,L. Conf3 … (aaa G L) (cpm h G L n).
 /3 width=5 by cpx_aaa_conf, cpm_fwd_cpx/ qed-.
+
+(* Note: one of these U is the inferred type of T *)
+lemma aaa_cpm_SO (h) (G) (L) (A):
+      ∀T. ⦃G, L⦄ ⊢ T ⁝ A → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
+#h #G #L #A #T #H elim H -G -L -T -A
+[ /3 width=2 by ex_intro/
+| * #G #L #V #B #_ * #V0 #HV0
+  [ elim (lifts_total V0 (𝐔❴1❵)) #W0 #HVW0
+    /3 width=4 by cpm_delta, ex_intro/
+  | elim (lifts_total V (𝐔❴1❵)) #W #HVW -V0
+    /3 width=4 by cpm_ell, ex_intro/
+  ]
+| #I #G #L #A #i #_ * #T0 #HT0
+  elim (lifts_total T0 (𝐔❴1❵)) #U0 #HTU0
+  /3 width=4 by cpm_lref, ex_intro/
+| #p #G #L #V #T #B #A #_ #_ #_ * #T0 #HT0
+  /3 width=2 by cpm_bind, ex_intro/
+| #p #G #L #V #T #B #A #_ #_ #_  * #T0 #HT0
+  /3 width=2 by cpm_bind, ex_intro/
+| #G #L #V #T #B #A #_ #_ #_ * #T0 #HT0
+  /3 width=2 by cpm_appl, ex_intro/
+| #G #L #U #T #A #_ #_ * #U0 #HU0 * #T0 #HT0
+  /3 width=2 by cpm_cast, ex_intro/
+]
+qed-.
index 9e9a3dbc9e27a1daa63aa882e2e2986e6fe2564f..60c0e71f6c693d287ec139c2eab5a2c26ab0041b 100644 (file)
@@ -9,6 +9,7 @@ table {
         ]
      }
    ]
+(*
    class "wine"
    [ { "iterated dynamic typing" * } {
         [ { "" (* "higher order native type assignment" *) * } {
@@ -17,21 +18,16 @@ table {
         ]
      }
    ]
+*)
    class "magenta"
    [ { "dynamic typing" * } {
-(*
-        [ { "local env. ref. for native type assignment" * } {
-             [ [ "" ] "lsubn ( ? ⊢ ? :⫃ ? )" "lsubn_drop" "lsubn_cpcs" "lsubn_nta" * ]
-          }
-        ]
-        [ { "native type assignment" * } {
-             [ [ "" ] "nta ( ⦃?,?⦄ ⊢ ? : ? )" "nta_alt ( ⦃?,?⦄ ⊢ ? :: ? )" "nta_lift" "nta_ltpss" "nta_thin" "nta_aaa" "nta_sta" "nta_ltpr" "nta_nta" * ]
+        [ { "context-sensitive native type assignment" * } {
+             [ [ "for terms" ] "nta" + "( ⦃?,?⦄ ⊢ ? :[?,?] ? )" + "( ⦃?,?⦄ ⊢ ? :[?] ? )" + "( ⦃?,?⦄ ⊢ ? :*[?] ? )" "nta_cpms" + "nta_cpcs" + "nta_preserve" * ] 
           }
         ]
-*)
         [ { "context-sensitive native validity" * } {
              [ [ "restricted refinement for lenvs" ] "lsubv ( ? ⊢ ? ⫃![?,?] ? )" "lsubv_drops" + "lsubv_lsubr" + "lsubv_lsuba" + "lsubv_cpms" + "lsubv_cpcs" + "lsubv_cnv" + "lsubv_lsubv" * ]
-             [ [ "for terms" ] "cnv" + "( ⦃?,?⦄ ⊢ ? ![?,?] )" "cnv_drops" + "cnv_fqus" + "cnv_aaa" + "cnv_fsb" + "cnv_cpm_trans" + "cnv_cpm_conf" + "cnv_cpm_tdeq" + "cnv_cpm_tdeq_trans" + "cnv_cpm_tdeq_conf" + "cnv_cpms_tdeq" + "cnv_cpms_conf" + "cnv_cpms_tdeq_conf" + "cnv_preserve_sub" + "cnv_preserve" * ]
+             [ [ "for terms" ] "cnv" + "( ⦃?,?⦄ ⊢ ? ![?,?] )" + "( ⦃?,?⦄ ⊢ ? ![?] )" + "( ⦃?,?⦄ ⊢ ? !*[?] )" "cnv_drops" + "cnv_fqus" + "cnv_aaa" + "cnv_fsb" + "cnv_cpm_trans" + "cnv_cpm_conf" + "cnv_cpm_tdeq" + "cnv_cpm_tdeq_trans" + "cnv_cpm_tdeq_conf" + "cnv_cpms_tdeq" + "cnv_cpms_conf" + "cnv_cpms_tdeq_conf" + "cnv_preserve_sub" + "cnv_preserve" * ]
           }
         ]
      }
@@ -121,6 +117,11 @@ class "capitalize italic" { 0 1 }
 
 class "italic"            { 2 }
 (*
+
+        [ { "local env. ref. for native type assignment" * } {
+             [ [ "" ] "lsubn ( ? ⊢ ? :⫃ ? )" "lsubn_drop" "lsubn_cpcs" "lsubn_nta" * ]
+          }
+        ]
              [ [ "" ] "shnv ( ⦃?,?⦄ ⊢ ? ¡[?,?,?] )" * ]
         [ { "decomposed rt-equivalence" * } {
              [ [ "" ] "scpes ( ⦃?,?⦄ ⊢ ? •*⬌*[?,?,?,?] ? )" "scpes_aaa" + "scpes_cpcs" + "scpes_scpes" * ]
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/pconveta_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/pconveta_4.ma
new file mode 100644 (file)
index 0000000..37dc822
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⬌η break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PConvEta $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/static/cpce.ma b/matita/matita/contribs/lambdadelta/static_2/static/cpce.ma
new file mode 100644 (file)
index 0000000..c24dc49
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/notation/relations/pconveta_4.ma".
+include "static_2/relocation/lifts.ma".
+include "static_2/static/aaa.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL ETA-CONVERSION FOR TERMS **********************)
+
+(* avtivate genv *)
+inductive cpce: relation4 genv lenv term term ≝
+| cpce_sort: ∀G,L,s. cpce G L (⋆s) (⋆s)
+| cpce_abbr: ∀G,K,V. cpce G (K.ⓓV) (#0) (#0)
+| cpce_abst: ∀G,K,W,B,A. ⦃G,K⦄ ⊢ W ⁝ ②B.A →
+             cpce G (K.ⓛW) (#0) (+ⓛW.ⓐ#0.#1)
+| cpce_lref: ∀I,G,K,T,U,i. cpce G K (#i) T →
+             ⬆*[1] T ≘ U → cpce G (K.ⓘ{I}) (#↑i) U
+| cpce_bind: ∀p,I,G,K,V1,V2,T1,T2.
+             cpce G K V1 V2 → cpce G (K.ⓑ{I}V1) T1 T2 →
+             cpce G K (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
+| cpce_flat: ∀I,G,L,V1,V2,T1,T2.
+             cpce G L V1 V2 → cpce G L T1 T2 →
+             cpce G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
+.
+
+interpretation
+   "context-sensitive parallel eta-conversion (term)"
+   'PConvEta G L T1 T2 = (cpce G L T1 T2).
index 4dcb17989792c92c27f91ceed6ccd0f3bc47d2c5..01e178fbb2fd83d2eab7a452491ed4f1fe74d50c 100644 (file)
@@ -19,6 +19,10 @@ table {
    ]
    class "green"
    [ { "static typing" * } {
+        [ { "context-sensitive parallel eta-conversion" * } {
+             [ [ "for terms" ] "cpce" + "( ⦃?,?⦄ ⊢ ? ⬌η ? )" * ]
+          }
+        ]
         [ { "generic reducibility" * } {
              [ [ "restricted refinement for lenvs" ] "lsubc" + "( ? ⊢ ? ⫃[?] ? )" "lsubc_drops" + "lsubc_lsubr" + "lsubc_lsuba" * ]
              [ [ "candidates" ] "gcp_cr" + "( ⦃?,?,?⦄ ϵ[?] 〚?〛 )" "gcp_aaa" * ]