]> matita.cs.unibo.it Git - helm.git/commitdiff
substitution lemma for stratified native validity!
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Mon, 18 Feb 2013 19:40:13 +0000 (19:40 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Mon, 18 Feb 2013 19:40:13 +0000 (19:40 +0000)
24 files changed:
matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr_ssta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_1.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_2.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_ltpss.ma
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma

index ae0c1ae627ecc8cf4e95ba20bce361f79d7a155e..40608cf5cc5aa261a77e4707a4e4d569f158b56b 100644 (file)
@@ -69,6 +69,11 @@ lemma cprs_flat_dx: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L ⊢ T1 ➡* T2
 @(cprs_strap1 … IHT2) -IHT2 /2 width=1/
 qed.
 
+lemma tpss_cprs: ∀L,T1,T2,d,e. L ⊢ T1 ▶*[d, e] T2 → L ⊢ T1 ➡* T2.
+#L #T1 #T2 #d #e #HT12
+lapply (cpr_intro … T1 … HT12) // /2 width=1/
+qed.
+
 (* Basic_1: was: pr3_pr1 *)
 lemma tprs_cprs: ∀T1,T2. T1 ➡* T2 → ∀L. L ⊢ T1 ➡* T2.
 #T1 #T2 #H @(tprs_ind … H) -T2 /2 width=1/ /3 width=3/
index 1ba4cadd8202a687c7e1968136ce8a013fab3a1f..799ec7bc62fd2e3fa960e10ef7c5c9ee3595acd6 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "basic_2/reducibility/ltpr_tps.ma".
-include "basic_2/reducibility/cpr_ltpss.ma".
+include "basic_2/reducibility/cpr_ltpss_sn.ma".
 include "basic_2/reducibility/lfpr.ma".
 include "basic_2/computation/cprs.ma".
 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..7f86180
--- /dev/null
@@ -0,0 +1,52 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/reducibility/cpr_ltpss_dx.ma".
+include "basic_2/computation/cprs_tpss.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties concerning dx partial unfold on local environments ************)
+
+lemma cprs_ltpss_dx_conf: ∀L1,T,U1. L1 ⊢ T ➡* U1 →
+                          ∀L2,d,e. L1 ▶* [d, e] L2 →
+                          ∃∃U2. L2 ⊢ T ➡* U2 & L2 ⊢ U1 ▶* [d, e] U2.
+#L1 #T #U1 #H @(cprs_ind … H) -U1 /2 width=3/
+#T1 #U1 #_ #HTU1 #IHT1 #L2 #d #e #HL12
+elim (IHT1 … HL12) -IHT1 #U #HTU #HT1U
+elim (ltpss_dx_cpr_conf … HTU1 … HL12) -L1 #U0 #HT1U0 #HU10
+elim (cpr_tpss_conf … HT1U0 … HT1U) -T1 #U2 #HU02 #HU2
+lapply (tpss_trans_eq … HU10 HU02) -U0 /3 width=3/
+qed-.
+
+lemma cprs_ltpss_dx_tpss_conf: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
+                               ∀L2,d,e. L1 ▶* [d, e] L2 →
+                               ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                               ∃∃U2. L2 ⊢ T2 ➡* U2 & L2 ⊢ U1 ▶* [d, e] U2.
+#L1 #T1 #U1 #HTU1 #L2 #d #e #HL12 #T2 #HT12
+elim (cprs_ltpss_dx_conf … HTU1 … HL12) -L1 #U #HT1U #HU1
+elim (cprs_tpss_conf … HT1U … HT12) -T1 #T #HUT #HT2
+lapply (tpss_trans_eq … HU1 HUT) -U /2 width=3/
+qed-.
+
+lemma cprs_ltpss_dx_tpss2_conf: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
+                                ∀L2,d,e. L1 ▶* [d, e] L2 →
+                                ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                                ∀U2. L2 ⊢ U1 ▶* [d, e] U2 →
+                                ∃∃U. L2 ⊢ T2 ➡* U & L2 ⊢ U2 ▶* [d, e] U.
+#L1 #T1 #U1 #HTU1 #L2 #d #e #HL12 #T2 #HT12 #U2 #HU12
+elim (cprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -L1 -T1 #U #HT2U #HU1
+elim (tpss_conf_eq … HU12 … HU1) -U1 #U0 #HU20 #HU0
+lapply (cprs_tpss_trans … HT2U … HU0) -U /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..32009d1
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unfold/ltpss_sn_alt.ma".
+include "basic_2/computation/cprs_ltpss_dx.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties concerning sn partial unfold on local environments ************)
+
+lemma cprs_ltpss_sn_conf: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                          ∀T,U1. L1 ⊢ T ➡* U1 →
+                          ∃∃U2. L2 ⊢ T ➡* U2 & L1 ⊢ U1 ▶* [d, e] U2.
+#L1 #L2 #d #e #H
+lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 /2 width=3/
+#L #L2 #HL1 #HL2 #IHL1 #T #U1 #HTU1
+lapply (ltpssa_ltpss_sn … HL1) -HL1 #HL1
+lapply (ltpss_sn_dx_trans_eq … HL1 … HL2) -HL1 #HL12
+elim (IHL1 … HTU1) -IHL1 -HTU1 #U #HTU #HU1
+elim (cprs_ltpss_dx_conf … HTU … HL2) -HTU -HL2 #U2 #HTU2 #HU2
+lapply (ltpss_sn_tpss_trans_eq … HU2 … HL12) -HU2 -HL12 #HU2
+lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma
new file mode 100644 (file)
index 0000000..0c575ae
--- /dev/null
@@ -0,0 +1,38 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/reducibility/cpr_tpss.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties on partial unfold for terms ***********************************)
+
+lemma cprs_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡* T →
+                       ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡* T2.
+#L #T1 #T #H @(cprs_ind … H) -T /2 width=3/ /3 width=5/
+qed.
+
+lemma cprs_tps_trans: ∀L,T1,T. L ⊢ T1 ➡* T →
+                      ∀T2,d,e. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ➡* T2.
+/3 width=5 by inj, cprs_tpss_trans/ qed. (**) (* auto too slow without trace *)
+
+lemma cprs_tpss_conf: ∀L,T0,T1. L ⊢ T0 ➡* T1 →
+                      ∀T2,d,e. L ⊢ T0 ▶* [d, e] T2 →
+                      ∃∃T. L ⊢ T1 ▶* [d, e] T & L ⊢ T2 ➡* T.
+#L #T0 #T1 #H @(cprs_ind … H) -T1 /2 width=3/
+#T #T1 #_ #HT1 #IHT0 #T2 #d #e #HT02
+elim (IHT0 … HT02) -T0 #T0 #HT0 #HT20
+elim (cpr_tpss_conf … HT1 … HT0) -T /3 width=5/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..8e3260d
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind/sstas_ltpss_dx.ma".
+include "basic_2/computation/cprs_ltpss_dx.ma".
+include "basic_2/computation/dxprs.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+(* Properties about dx parallel unfold **************************************)
+
+lemma dxprs_ltpss_dx_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*➡*[g] U1 →
+                           ∀L2,d,e. L1 ▶* [d, e] L2 →
+                           ∃∃U2. ⦃h, L2⦄ ⊢ T •*➡*[g] U2 & L2 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #T #U1 * #U #HTU #HU1 #L2 #d #e #HL12
+elim (sstas_ltpss_dx_conf … HTU … HL12) -HTU #U0 #HTU0 #HU0
+elim (cprs_ltpss_dx_conf … HU1 … HL12) -L1 #U2 #HU2 #HU12
+elim (cprs_tpss_conf … HU2 … HU0) -U #U #HU2 #HU0
+lapply (tpss_trans_eq … HU12 HU2) -U2 /3 width=3/
+qed-.
+
+lemma dxprs_tpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*➡*[g] U1 →
+                       ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
+                       ∃∃U2. ⦃h, L⦄ ⊢ T2 •*➡*[g] U2 & L ⊢ U1 ▶* [d, e] U2.
+#h #g #L #T1 #U1 * #W1 #HTW1 #HWU1 #T2 #d #e #HT12
+elim (sstas_tpss_conf … HTW1 … HT12) -T1 #W2 #HTW2 #HW12
+elim (cprs_tpss_conf … HWU1 … HW12) -W1 /3 width=3/
+qed-.
+
+lemma dxprs_ltpss_dx_tpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
+                                ∀L2,d,e. L1 ▶* [d, e] L2 →
+                                ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                                ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 &
+                                      L2 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #T1 #U1 #HTU1 #L2 #d #e #HL12 #T2 #HT12
+elim (dxprs_ltpss_dx_conf … HTU1 … HL12) -L1 #U #HT1U #HU1
+elim (dxprs_tpss_conf … HT1U … HT12) -T1 #U2 #HTU2 #HU2
+lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..553e465
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unfold/ltpss_sn_alt.ma".
+include "basic_2/computation/dxprs_ltpss_dx.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+(* Properties about sn parallel unfold **************************************)
+
+lemma dxprs_ltpss_sn_conf: ∀h,g,L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                           ∀T,U1. ⦃h, L1⦄ ⊢ T •*➡*[g] U1 →
+                           ∃∃U2. ⦃h, L2⦄ ⊢ T •*➡*[g] U2 & L1 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #L2 #d #e #H
+lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 [ /2 width=3/ ]
+#L #L2 #HL1 #HL2 #IHL1 #T #U1 #HTU1
+lapply (ltpssa_ltpss_sn … HL1) -HL1 #HL1
+lapply (ltpss_sn_dx_trans_eq … HL1 … HL2) -HL1 #HL12
+elim (IHL1 … HTU1) -IHL1 -HTU1 #U #HTU #HU1
+elim (dxprs_ltpss_dx_conf … HTU … HL2) -HTU -HL2 #U2 #HTU2 #HU2
+lapply (ltpss_sn_tpss_trans_eq … HU2 … HL12) -HU2 -HL12 #HU2
+lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr.ma
new file mode 100644 (file)
index 0000000..a4aca4b
--- /dev/null
@@ -0,0 +1,79 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/snv_lift.ma".
+include "basic_2/dynamic/snv_fpr_ssta.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties on context-free parallel reduction for closures ***************)
+
+fact snv_ltpr_tpr_aux: ∀h,g,n. (
+                          ∀L1,T1. ♯{L1, T1} < n →
+                          ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                          ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] →
+                          ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
+                       ) → (
+                          ∀L1,T1. ♯{L1, T1} < n → ⦃h, L1⦄ ⊩ T1 :[g] →
+                          ∀L2. L1 ➡ L2 → ∀T2. ⦃h, L2⦄ ⊢ T1 •*➡*[g] T2 → ⦃h, L2⦄ ⊩ T2 :[g]
+                       ) →
+                       ∀L1,T1. ♯{L1, T1} = n → ⦃h, L1⦄ ⊩ T1 :[g] →
+                       ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊩ T2 :[g].
+#h #g #n #IH2 #IH1 #L1 * * [||||*]
+[ #k #Hn #H1 #L2 #_ #X #H2 destruct -IH2 -IH1 -L1
+  >(tpr_inv_atom1 … H2) -X //
+| #i #Hn #H1 #L2 #HL12 #X #H2 destruct -IH2
+  elim (snv_inv_lref … H1) -H1 #I #K1 #V1 #HLK1 #HV1
+  >(tpr_inv_atom1 … H2) -X
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
+  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+  lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) -HLK1 #HLK1
+  lapply (IH1 … HV1 … HK12 V2 ?) -IH1 -HV1 -HK12 //
+  [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
+  ] -HV12 /2 width=5/
+| #p #Hn #H1 #L2 #HL12 #X #H2 destruct -IH2
+  elim (snv_inv_gref … H1)
+| #a #I #V1 #T1 #Hn #H1 #L2 #HL12 #X #H2 destruct -IH2
+  elim (snv_inv_bind … H1) -H1 #HV1 #HT1
+  elim (tpr_inv_bind1 … H2) -H2 *
+  [ #V2 #T0 #T2 #HV12 #HT10 #HT02 #H destruct
+    lapply (tps_lsubs_trans … HT02 (L2.ⓑ{I}V2) ?) -HT02 /2 width=1/ #HT02
+    lapply (cpr_intro (L2.ⓑ{I}V2) … T2 0 1 HT10 ?) -HT10 /2 width=1/ -HT02 #HT12
+    lapply (IH1 … HV1 … HL12 V2 ?) -HV1 //
+    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
+    ] #HV2
+    lapply (IH1 … HT1 (L2.ⓑ{I}V2) … T2 ?) -IH1 -HT1 /3 width=1/
+  | #T2 #HT12 #HXT2 #H1 #H2 destruct
+    lapply (IH1 … HT1 (L2.ⓓV1) … T2 ?) -IH1 -HT1 // /2 width=2/
+    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
+    ] -HT12 -HL12 #HT2
+    lapply (snv_inv_lift … HT2 L2 … HXT2) -T2 // /2 width=1/
+  ]
+| #V1 #T1 #Hn #H1 #L2 #HL12 #X #H2 destruct
+  elim (snv_inv_appl … H1) -H1 #a #W10 #W1 #U1 #l #HV1 #HT1 #HVW1 #HW10 #HTU1
+  elim (tpr_inv_appl1 … H2) -H2 *
+  [ #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (IH1 … HV1 … HL12 V2 ?) 
+    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
+    | //
+    ] #HV2
+    lapply (IH1 … HT1 … HL12 T2 ?)
+    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
+    | //
+    ] #HT2
+    lapply (IH1 … HT1 … HTU1) -IH1 // #H
+    elim (snv_inv_bind … H) -H #HW1 #HU1
+    elim (IH2 … HVW1 … HL12 … HV12 HV1) -IH2 -HVW1 -HV12 -HV1 // #W2 #HVW2 #HW12
+    lapply (fpcs_canc_sn L1 L1 … W10 W1 … HW12) -HW12 /3 width=1/ -W10 #HW12
+    @(snv_appl … HV2 HT2 HVW2)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr_ssta.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr_ssta.ma
new file mode 100644 (file)
index 0000000..028ca62
--- /dev/null
@@ -0,0 +1,189 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/ssta_ltpss_sn.ma".
+include "basic_2/computation/dxprs_lift.ma".
+include "basic_2/equivalence/lsubse_ssta.ma".
+include "basic_2/equivalence/fpcs_cpcs.ma".
+include "basic_2/equivalence/lfpcs_fpcs.ma".
+include "basic_2/dynamic/snv_ssta.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties on context-free parallel reduction for closures ***************)
+
+fact ssta_ltpr_tpr_aux: ∀h,g,n. (
+                           ∀L,T2. ♯{L,T2} < n →
+                           ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] →
+                           ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 →
+                           ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 →
+                           L ⊢ U1 ⬌* U2 ∧ l1 = l2
+                        ) → (
+                           ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] →
+                           ∀U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U → ⦃h, L⦄ ⊩ U :[g]
+                        ) → (
+                           ∀L1,T1. ♯{L1,T1} < n →
+                           ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                           ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] → 
+                           ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
+                        ) →
+                        ∀L1,T1. ♯{L1,T1} = n →
+                        ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                        ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] →
+                        ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄.
+#h #g #n #IH3 #IH2 #IH1 #L1 * * [|||| *]
+[ #k #_ #Y #l #H1 #L2 #HL12 #X #H2 #_ -IH3 -IH2 -IH1
+  elim (ssta_inv_sort1 … H1) -H1 #Hkl #H destruct
+  >(tpr_inv_atom1 … H2) -X /4 width=6/
+| #i #Hn #U1 #l #H1 #L2 #HL12 #X #H2 #H3 destruct -IH3 -IH2
+  elim (ssta_inv_lref1 … H1) -H1 * #K1
+  >(tpr_inv_atom1 … H2) -X
+  elim (snv_inv_lref … H3) -H3 #I0 #K0 #V0 #H #HV1
+  [ #V1 #W1 #HLK1 #HVW1 #HWU1
+    lapply (ldrop_mono … H … HLK1) -H #H destruct
+    lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) #HKV1
+    elim (ltpr_ldrop_conf … HLK1 … HL12) #X #H #HLK2
+    elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+    elim (IH1 … HVW1 K2 … HV12) -IH1 -HVW1 -HV12 // -HV1 -HKV1 #W2 #HVW2 #HW12
+    lapply (ldrop_fwd_ldrop2 … HLK1) -V1 #H1
+    lapply (ldrop_fwd_ldrop2 … HLK2) #H2
+    elim (lift_total W2 0 (i+1)) #U2 #HWU2
+    lapply (fpcs_lift … HW12 … H1 H2 … HWU1 … HWU2) -H1 -H2 -W1 [ /3 width=1/ ] /3 width=6/
+  | #V1 #W1 #l0 #HLK1 #HVW1 #HVU1 #H destruct
+    lapply (ldrop_mono … H … HLK1) -H #H destruct
+    lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) #HKV1
+    elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 #X #H #HLK2
+    elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+    elim (IH1 … HVW1 K2 … HV12) -IH1 -HVW1 // -HV1 -HK12 -HKV1 #W2 #HVW2 #_ -W1
+    elim (lift_total V2 0 (i+1)) #U2 #HVU2
+    lapply (tpr_lift … HV12 … HVU1 … HVU2) -V1 /4 width=6/
+  ]
+| #p #Hn #U1 #l #H1 -IH3 -IH1
+  elim (ssta_inv_gref1 … H1)
+| #a #I #V1 #T1 #Hn #Y #l #H1 #L2 #HL12 #X #H2 #H3 destruct -IH3 -IH2
+  elim (ssta_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct
+  elim (snv_inv_bind … H3) -H3 #_ #HT1
+  elim (tpr_inv_bind1 … H2) -H2 *
+  [ #V2 #T0 #T2 #HV12 #HT10 #HT02 #H destruct
+    elim (IH1 … HTU1 (L2.ⓑ{I}V2) … HT10) -IH1 -HTU1 -HT10 // -T1 /3 width=1/ -HL12 #U0 #HTU0 #HU10
+    lapply (tps_lsubs_trans … HT02 (L2.ⓑ{I}V2) ?) -HT02 [ /2 width=1/ ] #HT02
+    elim (ssta_tps_conf … HTU0 … HT02) -T0 #U2 #HTU2 #HU02
+    lapply (cpr_intro … U0 … HU02) -HU02 // #HU02
+    lapply (fpcs_fpr_strap1 … HU10 (L2.ⓑ{I}V2) U2 ?) [ /2 width=1/ ] -U0 #HU12
+    lapply (fpcs_fwd_shift … HU12 a) -HU12 /3 width=3/
+  | #T2 #HT12 #HT2 #H1 #H2 destruct
+    elim (IH1 … HTU1 (L2.ⓓV1) … HT12) -IH1 -HTU1 -HT12 // -T1 [2: /3 width=1/ ] -HL12 #U2 #HTU2 #HU12
+    lapply (fpcs_fwd_shift … HU12 true) -HU12 #HU12
+    elim (ssta_inv_lift1 … HTU2 … HT2) -T2 [3: /2 width=1/ |2: skip ] #U #HXU #HU2
+    lapply (fpcs_fpr_strap1 … HU12 L2 U ?) -HU12 [ /3 width=3/ ] -U2 /2 width=3/
+  ]
+| #V1 #T1 #Hn #Y #l #H1 #L2 #HL12 #X #H2 #H3 destruct
+  elim (ssta_inv_appl1 … H1) -H1 #U1 #HTU1 #H destruct
+  elim (snv_inv_appl … H3) -H3 #a #W1 #W10 #U10 #l0 #HV1 #HT1 #HVW1 #HW10 #HTU10
+  elim (tpr_inv_appl1 … H2) -H2 *
+  [ #V2 #T2 #HV12 #HT12 #H destruct -a -l0 -W1 -W10 -U10 -HV1 -IH3 -IH2
+    elim (IH1 … HTU1 … HL12 … HT12 HT1) -IH1 -HTU1 -HL12 -HT12 -HT1 // /3 width=5/
+  | #b #V2 #W #T2 #T20 #HV12 #HT20 #H1 #H2 destruct
+    elim (snv_inv_bind … HT1) -HT1 #HW #HT2
+    elim (ssta_inv_bind1 … HTU1) -HTU1 #U2 #HTU2 #H destruct
+    elim (dxprs_inv_abst1 … HTU10) -HTU10 #W0 #U0 #HW0 #_ #H destruct
+    lapply (cprs_div … HW10 … HW0) -W0 #HW1
+    elim (ssta_fwd_correct … HVW1) <minus_plus_m_m #X1 #HWX1
+    elim (snv_ssta … HW) #V #l1 #HWV
+    elim (IH3 … HW1 … HW … HWX1 … HWV) -IH3 -HWX1 // [2: /2 width=5/ ] -IH2 #_ #H destruct -X1
+    elim (IH1 … HVW1 … HL12 … HV12) -HVW1 // -HV1 #W2 #HVW2 #HW12
+    elim (IH1 … HWV … HL12 W) -HWV // -HW #V0 #HWV0 #_
+    elim (IH1 … HTU2 (L2.ⓛW) … HT20 HT2) -IH1 -HTU2 -HT20 -HT2 // [2: /2 width=1/ ] #U20 #HTU20 #HU20
+    lapply (lfpr_inv_fpr L1 L2 … W) [ /2 width=1/ ] -HL12 #HL12
+    elim (lsubse_ssta_trans … HTU20 (L2.ⓓV2) ?) -HTU20
+    [ #U #HTU20 #HU20 -HWV0 -HL12 -W1 -W2
+      @(ex2_intro … (ⓓ{b}V2.U)) [ /2 width=1/ ] -h -l -l1 -V -V0 -T2 -T20 -U0
+      @(fpcs_fprs_strap2 ? L1 … (ⓓ{b}V2.U2)) [ /4 width=1/ ] -V1
+      /4 width=4 by fpcs_fwd_shift, fpcs_canc_dx, cpcs_fpcs, fpcs_fwd_abst13/
+    | -b -l -V -V1 -T2 -T20 -U0 -U2 -U20
+      /6 width=6 by lsubse_abbr, fpcs_inv_cpcs, fpcs_canc_sn, fpcs_fprs_strap1, cpcs_fpcs, bi_inj/
+    ]
+  | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct -a -l0 -W1 -W10 -HV1 -IH3 -IH2
+    elim (ssta_inv_bind1 … HTU1) -HTU1 #U0 #HTU0 #H destruct
+    elim (snv_inv_bind … HT1) -HT1 #_ #HT0
+    elim (IH1 … HTU0 (L2.ⓓW2) … HT02 HT0) -IH1 -HTU0 -HT02 -HT0 // -T0 [2: /2 width=1/ ] -HL12 -HW02 #U2 #HTU2 #HU02
+    lapply (fpcs_fwd_shift … HU02 b) -HU02 #HU02
+    lapply (fpcs_flat_dx_tpr … HU02 … HV10 Appl) -HV10 -HU02 #HU02
+    lapply (fpcs_fpr_strap1 … HU02 L2 (ⓓ{b}W2.ⓐV2.U2) ?) -HU02 [ @ltpr_tpr_fpr // /2 width=3/ ] -V0 /4 width=3/ 
+  ]
+| #U0 #T1 #Hn #U1 #l #H1 #L2 #HL12 #X #H2 #H3 destruct -IH3 -IH2
+  lapply (ssta_inv_cast1 … H1) -H1 #HTU1
+  elim (snv_inv_cast … H3) -H3 #T0 #l0 #_ #HT1 #HT10 #_
+  elim (ssta_mono … HT10 … HTU1) -HT10 #H1 #H2 destruct
+  elim (tpr_inv_cast1 … H2) -H2
+  [ * #U2 #T2 #_ #HT12 #H destruct
+    elim (IH1 … HTU1 … HL12 … HT12 HT1) -IH1 -HTU1 -HL12 -HT12 -HT1 // -T1 -U0 /3 width=3/
+  | #HT1X
+    elim (IH1 … HTU1 … HL12 … HT1X HT1) -IH1 -HTU1 -HL12 -HT1X -HT1 // -U0 -T1 /2 width=3/
+  ]
+]
+qed-.
+
+fact ssta_ltpr_cpr_aux: ∀h,g,n. (
+                           ∀L,T2. ♯{L,T2} < n →
+                           ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] →
+                           ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 →
+                           ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 →
+                           L ⊢ U1 ⬌* U2 ∧ l1 = l2
+                        ) → (
+                           ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] →
+                           ∀U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U → ⦃h, L⦄ ⊩ U :[g]
+                        ) → (
+                           ∀L1,T1. ♯{L1,T1} < n →
+                           ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                           ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] → 
+                           ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
+                        ) →
+                        ∀L1,T1. ♯{L1,T1} = n →
+                        ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                        ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] →
+                        ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄.
+#h #g #n #IH3 #IH2 #IH1 #L1 #T1 #Hn #U1 #l #HTU1 #L2 #HL12 #T2 * #T0 #HT10 #HT02 #HT1
+elim (ssta_ltpr_tpr_aux … IH3 IH2 … Hn … HTU1 … HL12 … HT10 HT1)
+-T1 -IH3 -IH2 -HL12 [2: /3 width=5/ ] -n #U0 #HTU0 #HU10
+elim (ssta_tpss_conf … HTU0 … HT02) -T0 #U2 #HTU2 #HU02
+lapply (fpcs_fpr_strap1 … HU10 L2 U2 ?) -HU10 /2 width=3/ -HTU2 /3 width=3/
+qed-.
+
+fact ssta_fpr_aux: ∀h,g,n. (
+                      ∀L,T2. ♯{L,T2} < n →
+                      ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] →
+                      ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 →
+                      ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 →
+                      L ⊢ U1 ⬌* U2 ∧ l1 = l2
+                   ) → (
+                      ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] →
+                      ∀U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U → ⦃h, L⦄ ⊩ U :[g]
+                   ) → (
+                      ∀L1,T1. ♯{L1,T1} < n →
+                      ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                      ∀L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ →  ⦃h, L1⦄ ⊩ T1 :[g] →
+                      ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
+                   ) →
+                   ∀L1,T1. ♯{L1,T1} = n →
+                   ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                   ∀L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃h, L1⦄ ⊩ T1 :[g] →
+                   ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄.
+#h #g #n #IH3 #IH2 #IH1 #L1 #T1 #Hn #U1 #l #HTU1 #L2 #T2 #H12 #HT1
+elim (fpr_inv_all … H12) -H12 #L #HL1 #HT12 #HL2
+elim (ssta_ltpr_cpr_aux … IH3 IH2 … Hn … HTU1 … HL1 … HT12 HT1)
+-T1 -IH3 -IH2 -HL1 [2: /3 width=5/ ] -n #U #HTU #HU1
+elim (ssta_ltpss_sn_conf … HTU … HL2) -HTU #U2 #HTU2 #HU2
+lapply (fpcs_fpr_strap1 … HU1 L2 U2 ?) -HU1 /2 width=3/ -HTU2 /3 width=4/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma
new file mode 100644 (file)
index 0000000..f0e0bb8
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/snv_fpr.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties on context-free parallel computation for closures *************)
+
+fact ssta_fprs_aux: ∀h,g,n. (
+                       ∀L,T2. ♯{L,T2} < n →
+                       ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] →
+                       ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 →
+                       ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 →
+                       L ⊢ U1 ⬌* U2 ∧ l1 = l2
+                    ) → (
+                       ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] →
+                       ∀U. ⦃h, L⦄ ⊢ T •*➡*[g] U → ⦃h, L⦄ ⊩ U :[g]
+                    ) → (
+                       ∀L1,T1. ♯{L1,T1} < n →
+                       ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                       ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ →  ⦃h, L1⦄ ⊩ T1 :[g] →
+                       ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
+                    ) →
+                    ∀L1,T1. ♯{L1,T1} = n →
+                    ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                    ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → ⦃h, L1⦄ ⊩ T1 :[g] →
+                    ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄.
+#h #g #n #IH3 #IH2 #IH1 #L1 #T1 #Hn #U1 #l #HTU1 #L2 #T2 #H12 #HT1
+@(fprs_ind … H12) -L2 -T2 [-IH1 /2 width=3/ ] (**) (* auto fails without -IH1 *)
+#L #L2 #T #T2 #HT1 #HT2 * #U #HTU #HU1
+(*
+lapply (IH2 … 
+
+elim (ssta_fpr_aux … IH3 … Hn … HTU1 … HT2 HT1)
+-T1 -IH3 -IH2 -HL1 [2: /3 width=5/ ] -n #U #HTU #HU1 
+*)
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_1.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_1.ma
deleted file mode 100644 (file)
index 4beecd8..0000000
+++ /dev/null
@@ -1,136 +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/ssta_ltpss_dx.ma".
-include "basic_2/computation/dxprs_lift.ma".
-include "basic_2/equivalence/lsubse_ssta.ma".
-include "basic_2/equivalence/fpcs_cpcs.ma".
-include "basic_2/equivalence/lfpcs_fpcs.ma".
-include "basic_2/dynamic/snv_ssta.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties on context-free parallel reduction for local environments *****)
-
-fact ssta_ltpr_tpr_aux: ∀h,g,n. (
-                           ∀L,T2. ♯{L,T2} < n →
-                           ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] →
-                           ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 →
-                           ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 →
-                           L ⊢ U1 ⬌* U2 ∧ l1 = l2
-                        ) → (
-                           ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] →
-                           ∀U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U → ⦃h, L⦄ ⊩ U :[g]
-                        ) → (
-                           ∀L1,T1. ♯{L1,T1} < n →
-                           ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                           ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] → 
-                           ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
-                        ) →
-                        ∀L1,T1. ♯{L1,T1} = n →
-                        ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                        ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] →
-                        ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄.
-#h #g #n #IH3 #IH2 #IH1 #L1 * * [|||| *]
-[ #k #_ #Y #l #H1 #L2 #HL12 #X #H2 #_ -IH3 -IH2 -IH1
-  elim (ssta_inv_sort1 … H1) -H1 #Hkl #H destruct
-  >(tpr_inv_atom1 … H2) -X /4 width=6/
-| #i #Hn #U1 #l #H1 #L2 #HL12 #X #H2 #H3 destruct -IH3 -IH2
-  elim (ssta_inv_lref1 … H1) -H1 * #K1
-  >(tpr_inv_atom1 … H2) -X
-  elim (snv_inv_lref … H3) -H3 #I0 #K0 #V0 #H #HV1
-  [ #V1 #W1 #HLK1 #HVW1 #HWU1
-    lapply (ldrop_mono … H … HLK1) -H #H destruct
-    lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) #HKV1
-    elim (ltpr_ldrop_conf … HLK1 … HL12) #X #H #HLK2
-    elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
-    elim (IH1 … HVW1 K2 … HV12) -IH1 -HVW1 -HV12 // -HV1 -HKV1 #W2 #HVW2 #HW12
-    lapply (ldrop_fwd_ldrop2 … HLK1) -V1 #H1
-    lapply (ldrop_fwd_ldrop2 … HLK2) #H2
-    elim (lift_total W2 0 (i+1)) #U2 #HWU2
-    lapply (fpcs_lift … HW12 … H1 H2 … HWU1 … HWU2) -H1 -H2 -W1 [ /3 width=1/ ] /3 width=6/
-  | #V1 #W1 #l0 #HLK1 #HVW1 #HVU1 #H destruct
-    lapply (ldrop_mono … H … HLK1) -H #H destruct
-    lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) #HKV1
-    elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 #X #H #HLK2
-    elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
-    elim (IH1 … HVW1 K2 … HV12) -IH1 -HVW1 // -HV1 -HK12 -HKV1 #W2 #HVW2 #_ -W1
-    elim (lift_total V2 0 (i+1)) #U2 #HVU2
-    lapply (tpr_lift … HV12 … HVU1 … HVU2) -V1 /4 width=6/
-  ]
-| #p #Hn #U1 #l #H1 -IH3 -IH1
-  elim (ssta_inv_gref1 … H1)
-| #a #I #V1 #T1 #Hn #Y #l #H1 #L2 #HL12 #X #H2 #H3 destruct -IH3 -IH2
-  elim (ssta_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct
-  elim (snv_inv_bind … H3) -H3 #_ #HT1
-  elim (tpr_inv_bind1 … H2) -H2 *
-  [ #V2 #T0 #T2 #HV12 #HT10 #HT02 #H destruct
-    elim (IH1 … HTU1 (L2.ⓑ{I}V2) … HT10) -IH1 -HTU1 -HT10 // -T1 /3 width=1/ -HL12 #U0 #HTU0 #HU10
-    lapply (tps_lsubs_trans … HT02 (L2.ⓑ{I}V2) ?) -HT02 [ /2 width=1/ ] #HT02
-    elim (ssta_tps_conf … HTU0 … HT02) -T0 #U2 #HTU2 #HU02
-    lapply (cpr_intro … U0 … HU02) -HU02 // #HU02
-    lapply (fpcs_fpr_strap1 … HU10 (L2.ⓑ{I}V2) U2 ?) [ /2 width=1/ ] -U0 #HU12
-    lapply (fpcs_fwd_shift … HU12 a) -HU12 /3 width=3/
-  | #T2 #HT12 #HT2 #H1 #H2 destruct
-    elim (IH1 … HTU1 (L2.ⓓV1) … HT12) -IH1 -HTU1 -HT12 // -T1 [2: /3 width=1/ ] -HL12 #U2 #HTU2 #HU12
-    lapply (fpcs_fwd_shift … HU12 true) -HU12 #HU12
-    elim (ssta_inv_lift1 … HTU2 … HT2) -T2 [3: /2 width=1/ |2: skip ] #U #HXU #HU2
-    lapply (fpcs_fpr_strap1 … HU12 L2 U ?) -HU12 [ /3 width=3/ ] -U2 /2 width=3/
-  ]
-| #V1 #T1 #Hn #Y #l #H1 #L2 #HL12 #X #H2 #H3 destruct
-  elim (ssta_inv_appl1 … H1) -H1 #U1 #HTU1 #H destruct
-  elim (snv_inv_appl … H3) -H3 #a #W1 #W10 #U10 #l0 #HV1 #HT1 #HVW1 #HW10 #HTU10
-  elim (tpr_inv_appl1 … H2) -H2 *
-  [ #V2 #T2 #HV12 #HT12 #H destruct -a -l0 -W1 -W10 -U10 -HV1 -IH3 -IH2
-    elim (IH1 … HTU1 … HL12 … HT12 HT1) -IH1 -HTU1 -HL12 -HT12 -HT1 // /3 width=5/
-  | #b #V2 #W #T2 #T20 #HV12 #HT20 #H1 #H2 destruct
-    elim (snv_inv_bind … HT1) -HT1 #HW #HT2
-    elim (ssta_inv_bind1 … HTU1) -HTU1 #U2 #HTU2 #H destruct
-    elim (dxprs_inv_abst1 … HTU10) -HTU10 #W0 #U0 #HW0 #_ #H destruct
-    lapply (cprs_div … HW10 … HW0) -W0 #HW1
-    elim (ssta_fwd_correct … HVW1) <minus_plus_m_m #X1 #HWX1
-    elim (snv_ssta … HW) #V #l1 #HWV
-    elim (IH3 … HW1 … HW … HWX1 … HWV) -IH3 -HWX1 // [2: /2 width=5/ ] -IH2 #_ #H destruct -X1
-    elim (IH1 … HVW1 … HL12 … HV12) -HVW1 // -HV1 #W2 #HVW2 #HW12
-    elim (IH1 … HWV … HL12 W) -HWV // -HW #V0 #HWV0 #_
-    elim (IH1 … HTU2 (L2.ⓛW) … HT20 HT2) -IH1 -HTU2 -HT20 -HT2 // [2: /2 width=1/ ] #U20 #HTU20 #HU20
-    lapply (lfpr_inv_fpr L1 L2 … W) [ /2 width=1/ ] -HL12 #HL12
-    elim (lsubse_ssta_trans … HTU20 (L2.ⓓV2) ?) -HTU20
-    [ #U #HTU20 #HU20 -HWV0 -HL12 -W1 -W2
-      @(ex2_intro … (ⓓ{b}V2.U)) [ /2 width=1/ ] -h -l -l1 -V -V0 -T2 -T20 -U0
-      @(fpcs_fprs_strap2 ? L1 … (ⓓ{b}V2.U2)) [ /4 width=1/ ] -V1
-      /4 width=4 by fpcs_fwd_shift, fpcs_canc_dx, cpcs_fpcs, fpcs_fwd_abst13/
-    | -b -l -V -V1 -T2 -T20 -U0 -U2 -U20
-      /6 width=6 by lsubse_abbr, fpcs_inv_cpcs, fpcs_canc_sn, fpcs_fprs_strap1, cpcs_fpcs, bi_inj/
-    ]
-  | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct -a -l0 -W1 -W10 -HV1 -IH3 -IH2
-    elim (ssta_inv_bind1 … HTU1) -HTU1 #U0 #HTU0 #H destruct
-    elim (snv_inv_bind … HT1) -HT1 #_ #HT0
-    elim (IH1 … HTU0 (L2.ⓓW2) … HT02 HT0) -IH1 -HTU0 -HT02 -HT0 // -T0 [2: /2 width=1/ ] -HL12 -HW02 #U2 #HTU2 #HU02
-    lapply (fpcs_fwd_shift … HU02 b) -HU02 #HU02
-    lapply (fpcs_flat_dx_tpr … HU02 … HV10 Appl) -HV10 -HU02 #HU02
-    lapply (fpcs_fpr_strap1 … HU02 L2 (ⓓ{b}W2.ⓐV2.U2) ?) -HU02 [ @ltpr_tpr_fpr // /2 width=3/ ] -V0 /4 width=3/ 
-  ]
-| #U0 #T1 #Hn #U1 #l #H1 #L2 #HL12 #X #H2 #H3 destruct -IH3 -IH2
-  lapply (ssta_inv_cast1 … H1) -H1 #HTU1
-  elim (snv_inv_cast … H3) -H3 #T0 #l0 #_ #HT1 #HT10 #_
-  elim (ssta_mono … HT10 … HTU1) -HT10 #H1 #H2 destruct
-  elim (tpr_inv_cast1 … H2) -H2
-  [ * #U2 #T2 #_ #HT12 #H destruct
-    elim (IH1 … HTU1 … HL12 … HT12 HT1) -IH1 -HTU1 -HL12 -HT12 -HT1 // -T1 -U0 /3 width=3/
-  | #HT1X
-    elim (IH1 … HTU1 … HL12 … HT1X HT1) -IH1 -HTU1 -HL12 -HT1X -HT1 // -U0 -T1 /2 width=3/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_2.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_2.ma
deleted file mode 100644 (file)
index 3a6ee2e..0000000
+++ /dev/null
@@ -1,79 +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/snv_ltpr_1.ma".
-include "basic_2/dynamic/snv_lift.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties on context-free parallel reduction for local environments *****)
-
-fact snv_ltpr_tpr_aux: ∀h,g,n. (
-                          ∀L1,T1. ♯{L1, T1} < n →
-                          ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                          ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] →
-                          ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄
-                       ) → (
-                          ∀L1,T1. ♯{L1, T1} < n → ⦃h, L1⦄ ⊩ T1 :[g] →
-                          ∀L2. L1 ➡ L2 → ∀T2. ⦃h, L2⦄ ⊢ T1 •*➡*[g] T2 → ⦃h, L2⦄ ⊩ T2 :[g]
-                       ) →
-                       ∀L1,T1. ♯{L1, T1} = n → ⦃h, L1⦄ ⊩ T1 :[g] →
-                       ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊩ T2 :[g].
-#h #g #n #IH2 #IH1 #L1 * * [||||*]
-[ #k #Hn #H1 #L2 #_ #X #H2 destruct -IH2 -IH1 -L1
-  >(tpr_inv_atom1 … H2) -X //
-| #i #Hn #H1 #L2 #HL12 #X #H2 destruct -IH2
-  elim (snv_inv_lref … H1) -H1 #I #K1 #V1 #HLK1 #HV1
-  >(tpr_inv_atom1 … H2) -X
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
-  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
-  lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) -HLK1 #HLK1
-  lapply (IH1 … HV1 … HK12 V2 ?) -IH1 -HV1 -HK12 //
-  [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
-  ] -HV12 /2 width=5/
-| #p #Hn #H1 #L2 #HL12 #X #H2 destruct -IH2
-  elim (snv_inv_gref … H1)
-| #a #I #V1 #T1 #Hn #H1 #L2 #HL12 #X #H2 destruct -IH2
-  elim (snv_inv_bind … H1) -H1 #HV1 #HT1
-  elim (tpr_inv_bind1 … H2) -H2 *
-  [ #V2 #T0 #T2 #HV12 #HT10 #HT02 #H destruct
-    lapply (tps_lsubs_trans … HT02 (L2.ⓑ{I}V2) ?) -HT02 /2 width=1/ #HT02
-    lapply (cpr_intro (L2.ⓑ{I}V2) … T2 0 1 HT10 ?) -HT10 /2 width=1/ -HT02 #HT12
-    lapply (IH1 … HV1 … HL12 V2 ?) -HV1 //
-    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
-    ] #HV2
-    lapply (IH1 … HT1 (L2.ⓑ{I}V2) … T2 ?) -IH1 -HT1 /3 width=1/
-  | #T2 #HT12 #HXT2 #H1 #H2 destruct
-    lapply (IH1 … HT1 (L2.ⓓV1) … T2 ?) -IH1 -HT1 // /2 width=2/
-    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
-    ] -HT12 -HL12 #HT2
-    lapply (snv_inv_lift … HT2 L2 … HXT2) -T2 // /2 width=1/
-  ]
-| #V1 #T1 #Hn #H1 #L2 #HL12 #X #H2 destruct
-  elim (snv_inv_appl … H1) -H1 #a #W10 #W1 #U1 #l #HV1 #HT1 #HVW1 #HW10 #HTU1
-  elim (tpr_inv_appl1 … H2) -H2 *
-  [ #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (IH1 … HV1 … HL12 V2 ?) 
-    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
-    | //
-    ] #HV2
-    lapply (IH1 … HT1 … HL12 T2 ?)
-    [ @cprs_dxprs /3 width=1/ (**) (* auto: /4 width=1/ fails *)
-    | //
-    ] #HT2
-    lapply (IH1 … HT1 … HTU1) -IH1 // #H
-    elim (snv_inv_bind … H) -H #HW1 #HU1
-    elim (IH2 … HVW1 … HL12 … HV12 HV1) -IH2 -HVW1 -HV12 -HV1 // #W2 #HVW2 #HW12
-    lapply (fpcs_canc_sn L1 L1 … W10 W1 … HW12) -HW12 /3 width=1/ -W10 #HW12
-    @(snv_appl … HV2 HT2 HVW2)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..7a31a71
--- /dev/null
@@ -0,0 +1,87 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/computation/dxprs_ltpss_dx.ma".
+include "basic_2/equivalence/cpcs_ltpss_dx.ma".
+include "basic_2/dynamic/snv_lift.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties about dx parallel unfold **************************************)
+
+lemma snv_ltpss_dx_tpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊩ T1 :[g] →
+                              ∀L2,d,e. L1 ▶* [d, e] L2 →
+                              ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊩ T2 :[g].
+#h #g #L1 #T1 #H elim H -L1 -T1
+[ #L1 #k #L2 #d #e #_ #X #H
+   >(tpss_inv_sort1 … H) -X //
+| #I #L1 #K1 #V1 #i #HLK1 #HV1 #IHV1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_lref1 … H) -H
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi [ | elim (lt_or_ge i (d + e)) #Hide ]
+    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 …) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_dx_inv_tpss11 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+      lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
+    | elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H #HLK2
+      elim (ltpss_dx_inv_tpss21 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+      lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
+    | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=5/
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H1 #H2
+    elim (ltpss_dx_inv_tpss21 … H1 …) -H1 /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
+    lapply (ldrop_mono … H2 … HLK2) -H2 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+    lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
+    lapply (IHV1 … HK12 … HV1W2) -IHV1 -HK12 -HV1W2 /2 width=7/
+  ]
+| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
+  lapply (IHT1 … HT12) -IHT1 -HT12 /2 width=1/
+| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
+  lapply (IHT1 … HT12) -IHT1 /2 width=1/ #HT2
+  elim (ssta_ltpss_dx_tpss_conf … HVW1 … HL12 … HV12) -V1 #W2 #HVW2 #HW12
+  elim (dxprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #X #HTU2 #H
+  elim (tpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
+  elim (cprs_ltpss_dx_tpss2_conf … HW10 … HL12 … HW12 … HW0) -L1 -W1 -W0 #W0 #HW20 #HW0
+  lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
+| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+  lapply (IHW1 … HL12 … HW12) -IHW1 #HW2
+  lapply (IHT1 … HL12 … HT12) -IHT1 #HT2
+  elim (ssta_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #U2 #HTU2 #HU12
+  lapply (cpcs_ltpss_dx_tpss2_conf … HL12 … HUW1 … HU12 … HW12) -L1 -W1 -U1 /2 width=4/
+]
+qed-.
+
+lemma snv_ltpss_dx_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊩ T :[g] →
+                         ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊩ T :[g].
+#h #g #L1 #T #HT #L2 #d #e #HL12
+@(snv_ltpss_dx_tpss_conf … HT … HL12) //
+qed-.
+
+lemma snv_tpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊩ T1 :[g] →
+                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊩ T2 :[g].
+#h #g #L #T1 #HT1 #T2 #d #e #HT12
+@(snv_ltpss_dx_tpss_conf … HT1 … HT12) //
+qed-.
+
+lemma snv_tps_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊩ T1 :[g] →
+                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊩ T2 :[g].
+#h #g #L #T1 #HT1 #T2 #d #e #HT12
+@(snv_tpss_conf … HT1 T2) /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..8c4c81c
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/snv_ltpss_dx.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties about sn parallel unfold **************************************)
+
+lemma snv_ltpss_sn_conf: ∀h,g,L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                         ∀T. ⦃h, L1⦄ ⊩ T :[g] → ⦃h, L2⦄ ⊩ T :[g].
+#h #g #L1 #L2 #d #e #H
+lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 //
+#L #L2 #_ #HL2 #IHL1 #T1 #HT1
+lapply (IHL1 … HT1) -IHL1 -HT1 #HT1
+lapply (snv_ltpss_dx_conf … HT1 … HL2) -HT1 -HL2 //
+qed-.
index 9d9ceb942c0386bd3b87832307769acdc0114dec..a979b7baeab51931bd81076dbd9c6e8b2dbf8f51 100644 (file)
@@ -84,11 +84,24 @@ lemma cpr_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1
 lemma cpcs_cpr_conf: ∀L,T1,T. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
 /3 width=3/ qed.
 
+lemma cpcs_tpss_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → 
+                        ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #d #e #HT2
+@(cpcs_cpr_strap1 … HT1) -T1 /2 width=3/
+qed-.
+
+lemma cpcs_tpss_conf: ∀L,T,T1,d,e. L ⊢ T ▶* [d, e] T1 →
+                      ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+#L #T #T1 #d #e #HT1 #T2 #HT2
+@(cpcs_cpr_conf … HT2) -T2 /2 width=3/
+qed-.
+
 (* Basic_1: removed theorems 9:
             clear_pc3_trans pc3_ind_left
             pc3_head_1 pc3_head_2 pc3_head_12 pc3_head_21
             pc3_pr2_fsubst0 pc3_pr2_fsubst0_back pc3_fsubst0
-   Basic_1: removed local theorems 6:
+*)   
+(* Basic_1: removed local theorems 6:
             pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left
             pc3_wcpr0_t_aux
 *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma
deleted file mode 100644 (file)
index 4338566..0000000
+++ /dev/null
@@ -1,42 +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/equivalence/cpcs_cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Properties concerning partial unfold on local environments ***************)
-
-lemma ltpss_dx_cpr_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
-                         ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 *
-lapply (ltpss_dx_weak_all … HL12)
->(ltpss_dx_fwd_length … HL12) -HL12 #HL12 #T #HT1 #HT2
-elim (ltpss_dx_tpss_conf … HT2 … HL12) -L1 #T0 #HT0 #HT20
-@(cprs_div … T0) /3 width=3/ (**) (* /4/ is too slow *)
-qed.
-
-lemma ltpss_dx_cprs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
-                          ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1
-@(cpcs_trans … IHT1) -T1 /2 width=5/
-qed.
-
-lemma ltpss_dx_cpcs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
-                          ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 #H
-elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
-@(cpcs_canc_dx … T) /2 width=5/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..80f418b
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/computation/cprs_ltpss_dx.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties concerning dx partial unfold on local environments ************)
+
+lemma cpcs_ltpss_dx_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
+                          ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #d #e #HL12 #T1 #T2 #H
+elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
+elim (cprs_ltpss_dx_conf … HT1 … HL12) -HT1 #U1 #HTU1 #H1
+elim (cprs_ltpss_dx_conf … HT2 … HL12) -L1 #U2 #HTU2 #H2
+elim (tpss_conf_eq … H1 … H2) -T #U #HU1 #HU2
+lapply (cprs_tpss_trans … HTU1 … HU1) -U1
+lapply (cprs_tpss_trans … HTU2 … HU2) -U2 /2 width=3/
+qed-.
+
+lemma cpcs_ltpss_dx_tpss_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
+                               ∀T,T2. L1 ⊢ T ⬌* T2 →
+                               ∀T1. L2 ⊢ T ▶* [d, e] T1 →
+                               L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #d #e #HL12 #T #T2 #HT2 #T1 #HT1
+lapply (cpcs_ltpss_dx_conf … HL12 … HT2) -L1 #HT2
+lapply (cpcs_tpss_conf … HT1 … HT2) -T //
+qed-.
+
+lemma cpcs_ltpss_dx_tpss2_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
+                                ∀T1,T2. L1 ⊢ T1 ⬌* T2 →
+                                ∀T3. L2 ⊢ T1 ▶* [d, e] T3 →
+                                ∀T4. L2 ⊢ T2 ▶* [d, e] T4 →
+                                L2 ⊢ T3 ⬌* T4.
+#L1 #L2 #d #e #HL12 #T1 #T2 #HT12 #T3 #HT13 #T4 #HT24
+lapply (cpcs_ltpss_dx_tpss_conf … HL12 … HT12 … HT13) -L1 -T1 #HT32
+lapply (cpcs_tpss_strap1 … HT32 … HT24) -T2 //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..5bf1ed5
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/equivalence/cpcs_ltpss_dx.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties concerning sn partial unfold on local environments ************)
+
+lemma cpcs_ltpss_sn_conf: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                          ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #d #e #H
+lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 //
+#L #L2 #_ #HL2 #IHL1 #T1 #U1 #HTU1
+lapply (IHL1 … HTU1) -IHL1 -HTU1 #HTU1
+lapply (cpcs_ltpss_dx_conf … HL2 … HTU1) -HTU1 -HL2 //
+qed-.
index b5ea1b77ed6b7165f0ead4125df19807f2770efe..a1e20a025ef1766958ce7bbaa8cfde76b5327e4b 100644 (file)
@@ -12,7 +12,6 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/unfold/ltpss_sn_alt.ma".
 include "basic_2/reducibility/cpr_tpss.ma".
 include "basic_2/reducibility/cpr_cpr.ma".
 include "basic_2/reducibility/cfpr_ltpss.ma".
@@ -30,7 +29,7 @@ lemma fpr_all: ∀L1,L. L1 ➡ L → ∀L2,T1,T2. L ⊢ T1 ➡ T2 →
 | #I #L1 #L #V1 #V #_ #HV1 #IH #X #T1 #T2 #HT12 #H
   elim (ltpss_sn_inv_tpss21 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
   lapply (cpr_bind_dx false … HV1 HT12) -HV1 -HT12 #HT12
-  lapply (cpr_tpss_trans … HT12 (-ⓑ{I}V2.T2) ?) -HT12 /2 width=1/ -HV2 /3 width=1/
+  lapply (cpr_tpss_trans … HT12 (-ⓑ{I}V2.T2) 0 (|L|) ?) -HT12 /2 width=1/ -HV2 /3 width=1/
 ]
 qed.
 
index 424911376fa48480f7edea29c65e4222d8c590a6..785aefd5178dadb64d0ea1f9bfe8075c5952b4bf 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "basic_2/reducibility/cpr_lift.ma".
-include "basic_2/reducibility/cpr_ltpss.ma".
+include "basic_2/reducibility/cpr_ltpss_sn.ma".
 include "basic_2/reducibility/cfpr.ma".
 
 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma
deleted file mode 100644 (file)
index b728d9d..0000000
+++ /dev/null
@@ -1,27 +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/unfold/ltpss_sn_ltpss_sn.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Properties concerning partial unfold on local environments ***************)
-
-lemma ltpss_sn_cpr_trans: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                          ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 *
-lapply (ltpss_sn_weak_all … HL12)
-<(ltpss_sn_fwd_length … HL12) -HL12 /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..5d90e68
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unfold/ltpss_dx_ltpss_dx.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties concerning dx partial unfold on local environments ************)
+
+lemma ltpss_dx_cpr_conf: ∀L1,T,U1. L1 ⊢ T ➡ U1 →
+                         ∀L2,d,e. L1 ▶* [d, e] L2 →
+                         ∃∃U2. L2 ⊢ T ➡ U2 & L2 ⊢ U1 ▶* [d, e] U2.
+#L1 #T #U1 * #U #HTU #HU1 #L2 #d #e #HL12
+lapply (ltpss_dx_fwd_length … HL12) #H >H in HU1; -H #HU1
+elim (ltpss_dx_tpss_conf … HU1 … HL12) -L1 /3 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..49ec47f
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unfold/ltpss_sn_alt.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties concerning sn partial unfold on local environments ************)
+
+lemma ltpss_sn_cpr_trans: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                          ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
+#L1 #L2 #d #e #HL12 #T1 #T2 *
+lapply (ltpss_sn_weak_all … HL12)
+<(ltpss_sn_fwd_length … HL12) -HL12 /3 width=5/
+qed.
+
+lemma ltpss_sn_cpr_conf: ∀L1,T,U1. L1 ⊢ T ➡ U1 →
+                         ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                         ∃∃U2. L2 ⊢ T ➡ U2 & L1 ⊢ U1 ▶* [d, e] U2.
+#L1 #T #U1 * #U #HTU #HU1 #L2 #d #e #HL12
+lapply (ltpss_sn_fwd_length … HL12) #H >H in HU1; -H #HU1
+elim (ltpss_sn_tpss_conf … HU1 … HL12) -HU1 -HL12 /3 width=3/
+qed-.
index e5afe8737c846733c8a51e4b0c44502ec442c55f..fc4f2b8c50fa3d2f56ab076f119b37d4fe14615e 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/reducibility/tpr_tpss.ma".
 include "basic_2/reducibility/cpr.ma".
 
 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
@@ -20,11 +20,20 @@ include "basic_2/reducibility/cpr.ma".
 (* Properties on partial unfold for terms ***********************************)
 
 lemma cpr_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡ T →
-                      ∀T2. L ⊢ T ▶* [O, |L|] T2 → L ⊢ T1 ➡ T2.
-#L #T1 #T * #T0 #HT10 #HT0 #T2 #HT2
+                      ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡ T2.
+#L #T1 #T * #T0 #HT10 #HT0 #T2 #d #e #HT2
+lapply (tpss_weak_all … HT2) -HT2 #HT2
 lapply (tpss_trans_eq … HT0 HT2) -T /2 width=3/
 qed.
 
 lemma cpr_tps_trans: ∀L,T1,T. L ⊢ T1 ➡ T →
-                     ∀T2. L ⊢ T ▶ [O, |L|] T2 → L ⊢ T1 ➡ T2.
-/3 width=3/ qed.
+                     ∀T2,d,e. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ➡ T2.
+/3 width=5/ qed.
+
+lemma cpr_tpss_conf: ∀L,T0,T1. L ⊢ T0 ➡ T1 →
+                     ∀T2,d,e. L ⊢ T0 ▶* [d, e] T2 →
+                     ∃∃T. L ⊢ T1 ▶* [d, e] T & L ⊢ T2 ➡ T.
+#L #T0 #T1 * #U0 #HTU0 #HU0T1 #T2 #d #e #HT02
+elim (tpr_tpss_conf … HTU0 … HT02) -T0 #T0 #HT20 #HUT0
+elim (tpss_conf_eq … HU0T1 … HUT0) -U0 /3 width=5/
+qed-.