]> matita.cs.unibo.it Git - helm.git/commitdiff
- partial commit: just the components below "computation"
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 25 Mar 2014 19:55:08 +0000 (19:55 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 25 Mar 2014 19:55:08 +0000 (19:55 +0000)
  the development of lazy pointwise extensions continues ...
- we parked not-lazy pointwise extensions in etc

55 files changed:
matita/matita/contribs/lambdadelta/basic_2/etc/llpx_sn/llpx_sn_tc.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/ldrop_lpx_sn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr_ldrop.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr_lpr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_alt.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_ldrop.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_lprs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_aaa.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_ldrop.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_lleq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn_lpx_sn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn_tc.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsn_3.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsn_5.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstar_3.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstar_5.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstaralt_3.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstaralt_5.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn_lpx_sn.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn_tc.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsnstar_5.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsnstar_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsn_3.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsn_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_3.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstaralt_3.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstaralt_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/cpr_llpx_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/cpx_lleq.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpx_llpx_sn.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/fpb.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/fpb_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_ldrop.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_llpr.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_ldrop.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_lleq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpr.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_ldrop.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_lpr.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_aaa.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_ldrop.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_lleq.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/relocation/ldrop_leq.ma
matita/matita/contribs/lambdadelta/basic_2/relocation/ldrop_lpx_sn.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_llpx_sn.ma
matita/matita/contribs/lambdadelta/ground_2/etc/lib/star.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/lib/star.ma

diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/llpx_sn/llpx_sn_tc.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/llpx_sn/llpx_sn_tc.etc
new file mode 100644 (file)
index 0000000..682b48c
--- /dev/null
@@ -0,0 +1,160 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/ldrop_leq.ma".
+include "basic_2/relocation/llpx_sn.ma".
+
+(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****)
+
+definition TC_llpx_sn_confluent1: relation (relation3 lenv term term) ≝ λS,R.
+                                  ∀Ls,T1,T2. S Ls T1 T2 →
+                                  ∀Ld. TC … (llpx_sn R 0 T1) Ls Ld → TC … (llpx_sn R 0 T2) Ls Ld.
+
+lemma TC_llpx_sn_s_confluent: ∀S,R. (llpx_sn_confluent1 S R) → TC_llpx_sn_confluent1 S R.
+#S #R #HSR #Ls #T1 #T2 #HT12 #Ld #H
+generalize in match HT12; -HT12
+@(TC_ind_dx … Ls H) -Ls
+[ /3 width=3 by inj/
+| #Ls #L #HLs #_ #IHLd #HT12
+  @(TC_strap … L) /2 width=3 by/ @IHLd -IHLd
+
+lemma TC_llpx_sn_lref_refl: ∀R. (∀L.reflexive … (R L)) →
+                            ∀I,L1,K1,K2,V,d,i. d ≤ yinj i → ⇩[i] L1 ≡ K1.ⓑ{I}V →
+                            TC lenv (llpx_sn R 0 V) K1 K2 →
+                            ∀L2. ⇩[i] L2 ≡ K2.ⓑ{I}V → TC … (llpx_sn R d (#i)) L1 L2.
+#R #HR #I #L1 #K1 #K2 #V #d #i #Hdi #HLK1 #H @(TC_star_ind … K2 H) -K2
+[ /2 width=1 by llpx_sn_refl/
+| /4 width=9 by llpx_sn_refl, llpx_sn_lref, inj/
+| #K #K2 #_ #HV #IHK1 #L2 #HLK2 lapply (ldrop_fwd_length … HLK2)
+  #H elim (ldrop_O1_ex (K.ⓑ{I}V) i L2) [2: normalize in H ⊢ %; >(llpx_sn_fwd_length … HV) ]
+  /4 width=11 by llpx_sn_lref, step/
+]
+qed-.
+
+lemma TC_llpx_sn_lref: ∀R. (∀L.reflexive … (R L)) → (llpx_sn_confluent1 R R) →
+                       ∀I,K1,V1,V2,d,i. d ≤ yinj i → LTC … R K1 V1 V2 →
+                       ∀K2. TC lenv (llpx_sn R 0 V1) K1 K2 → ∀L1. ⇩[i] L1 ≡ K1.ⓑ{I}V1 →
+                       ∀L2. ⇩[i] L2 ≡ K2.ⓑ{I}V2 → TC … (llpx_sn R d (#i)) L1 L2.
+#R #H1R #H2R #I #K1 #V1 #V2 #d #i #Hdi #H @(TC_star_ind_dx … V1 H) -V1
+[ /2 width=1 by llpx_sn_refl/
+| /2 width=7 by TC_llpx_sn_lref_refl/
+| #V1 #V #HV1 #_ #IHV2 #K2 #HK12 #L1 #HLK1 #L2 #HLK2
+  lapply (ldrop_fwd_length … HLK1)
+  #H elim (ldrop_O1_ex (K1.ⓑ{I}V) i L1) [2: normalize in H ⊢ %; // ] -H
+  #L #_ #HLK @(TC_strap … L)
+  [ @(llpx_sn_lref … HLK1 … HLK) /2 width=1 by llpx_sn_refl/
+  | @(IHV2 … HLK … HLK2)
+    -HLK1 -HLK2 -HLK -IHV2 -Hdi @(TC_llpx_sn_s_confluent R R … HK12) //
+  ]
+]
+
+
+lemma llpx_sn_LTC_TC_llpx_sn: ∀R. (∀L. reflexive … (R L)) →
+                              ∀L1,L2,T,d. llpx_sn (LTC … R) d T L1 L2 →
+                              TC … (llpx_sn R d T) L1 L2.
+#R #HR #L1 #L2 #T #d #H elim H -L1 -L2
+/3 width=3 by llpx_sn_gref, llpx_sn_free, llpx_sn_skip, llpx_sn_sort, inj/
+[ #I #L1 #L2 #K1 #K2 #V1 #V2 #d #i #Hdi #HLK1 #HLK2 #_ #HV12 #IHV1   
+
+(* Properties on transitive_closure *****************************************)
+
+lemma TC_lpx_sn_pair: ∀R. (∀L. reflexive … (R L)) →
+                      ∀I,L1,L2. TC … (lpx_sn R) L1 L2 →
+                      ∀V1,V2. LTC … R L1 V1 V2 →
+                      TC … (lpx_sn R) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2).
+#R #HR #I #L1 #L2 #HL12 #V1 #V2 #H @(TC_star_ind_dx … V1 H) -V1 //
+[ /2 width=1 by TC_lpx_sn_pair_refl/
+| /4 width=3 by TC_strap, lpx_sn_pair, lpx_sn_refl/
+]
+qed-.
+
+lemma lpx_sn_LTC_TC_lpx_sn: ∀R. (∀L. reflexive … (R L)) →
+                            ∀L1,L2. lpx_sn (LTC … R) L1 L2 →
+                            TC … (lpx_sn R) L1 L2.
+#R #HR #L1 #L2 #H elim H -L1 -L2
+/2 width=1 by TC_lpx_sn_pair, lpx_sn_atom, inj/
+qed-.
+
+(* Inversion lemmas on transitive closure ***********************************)
+
+lemma TC_lpx_sn_inv_atom2: ∀R,L1. TC … (lpx_sn R) L1 (⋆) → L1 = ⋆.
+#R #L1 #H @(TC_ind_dx … L1 H) -L1
+[ /2 width=2 by lpx_sn_inv_atom2/
+| #L1 #L #HL1 #_ #IHL2 destruct /2 width=2 by lpx_sn_inv_atom2/
+]
+qed-.
+
+lemma TC_lpx_sn_inv_pair2: ∀R. s_rs_trans … R (lpx_sn R) →
+                           ∀I,L1,K2,V2. TC  … (lpx_sn R) L1 (K2.ⓑ{I}V2) →
+                           ∃∃K1,V1. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
+#R #HR #I #L1 #K2 #V2 #H @(TC_ind_dx … L1 H) -L1
+[ #L1 #H elim (lpx_sn_inv_pair2 … H) -H /3 width=5 by inj, ex3_2_intro/
+| #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
+  elim (lpx_sn_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct
+  lapply (HR … HV2 … HK1) -HR -HV2 /3 width=5 by TC_strap, ex3_2_intro/
+]
+qed-.
+
+lemma TC_lpx_sn_ind: ∀R. s_rs_trans … R (lpx_sn R) →
+                     ∀S:relation lenv.
+                     S (⋆) (⋆) → (
+                        ∀I,K1,K2,V1,V2.
+                        TC … (lpx_sn R) K1 K2 → LTC … R K1 V1 V2 →
+                        S K1 K2 → S (K1.ⓑ{I}V1) (K2.ⓑ{I}V2)
+                     ) →
+                     ∀L2,L1. TC … (lpx_sn R) L1 L2 → S L1 L2.
+#R #HR #S #IH1 #IH2 #L2 elim L2 -L2
+[ #X #H >(TC_lpx_sn_inv_atom2 … H) -X //
+| #L2 #I #V2 #IHL2 #X #H
+  elim (TC_lpx_sn_inv_pair2 … H) // -H -HR
+  #L1 #V1 #HL12 #HV12 #H destruct /3 width=1 by/
+]
+qed-.
+
+lemma TC_lpx_sn_inv_atom1: ∀R,L2. TC … (lpx_sn R) (⋆) L2 → L2 = ⋆.
+#R #L2 #H elim H -L2
+[ /2 width=2 by lpx_sn_inv_atom1/
+| #L #L2 #_ #HL2 #IHL1 destruct /2 width=2 by lpx_sn_inv_atom1/
+]
+qed-.
+
+fact TC_lpx_sn_inv_pair1_aux: ∀R. s_rs_trans … R (lpx_sn R) →
+                              ∀L1,L2. TC … (lpx_sn R) L1 L2 →
+                              ∀I,K1,V1. L1 = K1.ⓑ{I}V1 →
+                              ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+#R #HR #L1 #L2 #H @(TC_lpx_sn_ind … H) // -HR -L1 -L2
+[ #J #K #W #H destruct
+| #I #L1 #L2 #V1 #V2 #HL12 #HV12 #_ #J #K #W #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma TC_lpx_sn_inv_pair1: ∀R. s_rs_trans … R (lpx_sn R) →
+                           ∀I,K1,L2,V1. TC … (lpx_sn R) (K1.ⓑ{I}V1) L2 →
+                           ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by TC_lpx_sn_inv_pair1_aux/ qed-.
+
+lemma TC_lpx_sn_inv_lpx_sn_LTC: ∀R. s_rs_trans … R (lpx_sn R) →
+                                ∀L1,L2. TC … (lpx_sn R) L1 L2 →
+                                lpx_sn (LTC … R) L1 L2.
+/3 width=4 by TC_lpx_sn_ind, lpx_sn_pair/ qed-.
+
+(* Forward lemmas on transitive closure *************************************)
+
+lemma TC_lpx_sn_fwd_length: ∀R,L1,L2. TC … (lpx_sn R) L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #H elim H -L2
+[ #L2 #HL12 >(lpx_sn_fwd_length … HL12) -HL12 //
+| #L #L2 #_ #HL2 #IHL1
+  >IHL1 -L1 >(lpx_sn_fwd_length … HL2) -HL2 //
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/ldrop_lpx_sn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/ldrop_lpx_sn.etc
new file mode 100644 (file)
index 0000000..3dc3b2f
--- /dev/null
@@ -0,0 +1,78 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/grammar/lpx_sn.ma".
+include "basic_2/relocation/ldrop_leq.ma".
+
+(* DROPPING *****************************************************************)
+
+(* Properties on sn pointwise extension *************************************)
+
+lemma lpx_sn_deliftable_dropable: ∀R. l_deliftable_sn R → dropable_sn (lpx_sn R).
+#R #HR #L1 #K1 #s #d #e #H elim H -L1 -K1 -d -e
+[ #d #e #He #X #H >(lpx_sn_inv_atom1 … H) -H
+  /4 width=3 by ldrop_atom, lpx_sn_atom, ex2_intro/
+| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H
+  #L2 #V2 #HL12 #HV12 #H destruct
+  /3 width=5 by ldrop_pair, lpx_sn_pair, ex2_intro/
+| #I #L1 #K1 #V1 #e #_ #IHLK1 #X #H elim (lpx_sn_inv_pair1 … H) -H
+  #L2 #V2 #HL12 #HV12 #H destruct
+  elim (IHLK1 … HL12) -L1 /3 width=3 by ldrop_drop, ex2_intro/
+| #I #L1 #K1 #V1 #W1 #d #e #HLK1 #HWV1 #IHLK1 #X #H
+  elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
+  elim (HR … HV12 … HLK1 … HWV1) -V1
+  elim (IHLK1 … HL12) -L1 /3 width=5 by ldrop_skip, lpx_sn_pair, ex2_intro/
+]
+qed-.
+
+lemma lpx_sn_liftable_dedropable: ∀R. (∀L. reflexive ? (R L)) →
+                                  l_liftable R → dedropable_sn (lpx_sn R).
+#R #H1R #H2R #L1 #K1 #s #d #e #H elim H -L1 -K1 -d -e
+[ #d #e #He #X #H >(lpx_sn_inv_atom1 … H) -H
+  /4 width=4 by ldrop_atom, lpx_sn_atom, ex3_intro/
+| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H
+  #K2 #V2 #HK12 #HV12 #H destruct
+  lapply (lpx_sn_fwd_length … HK12)
+  #H @(ex3_intro … (K2.ⓑ{I}V2)) (**) (* explicit constructor *)
+  /3 width=1 by lpx_sn_pair, monotonic_le_plus_l/
+  @leq_O2 normalize //
+| #I #L1 #K1 #V1 #e #_ #IHLK1 #K2 #HK12 elim (IHLK1 … HK12) -K1
+  /3 width=5 by ldrop_drop, leq_pair, lpx_sn_pair, ex3_intro/
+| #I #L1 #K1 #V1 #W1 #d #e #HLK1 #HWV1 #IHLK1 #X #H
+  elim (lpx_sn_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
+  elim (lift_total W2 d e) #V2 #HWV2
+  lapply (H2R … HW12 … HLK1 … HWV1 … HWV2) -W1
+  elim (IHLK1 … HK12) -K1
+  /3 width=6 by ldrop_skip, leq_succ, lpx_sn_pair, ex3_intro/
+]
+qed-.
+
+fact lpx_sn_dropable_aux: ∀R,L2,K2,s,d,e. ⇩[s, d, e] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 →
+                          d = 0 → ∃∃K1. ⇩[s, 0, e] L1 ≡ K1 & lpx_sn R K1 K2.
+#R #L2 #K2 #s #d #e #H elim H -L2 -K2 -d -e
+[ #d #e #He #X #H >(lpx_sn_inv_atom2 … H) -H 
+  /4 width=3 by ldrop_atom, lpx_sn_atom, ex2_intro/
+| #I #K2 #V2 #X #H elim (lpx_sn_inv_pair2 … H) -H
+  #K1 #V1 #HK12 #HV12 #H destruct
+  /3 width=5 by ldrop_pair, lpx_sn_pair, ex2_intro/
+| #I #L2 #K2 #V2 #e #_ #IHLK2 #X #H #_ elim (lpx_sn_inv_pair2 … H) -H
+  #L1 #V1 #HL12 #HV12 #H destruct
+  elim (IHLK2 … HL12) -L2 /3 width=3 by ldrop_drop, ex2_intro/
+| #I #L2 #K2 #V2 #W2 #d #e #_ #_ #_ #L1 #_
+  <plus_n_Sm #H destruct
+]
+qed-.
+
+lemma lpx_sn_dropable: ∀R. dropable_dx (lpx_sn R).
+/2 width=5 by lpx_sn_dropable_aux/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr.etc
new file mode 100644 (file)
index 0000000..7636e38
--- /dev/null
@@ -0,0 +1,61 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/predsn_3.ma".
+include "basic_2/grammar/lpx_sn.ma".
+include "basic_2/reduction/cpr.ma".
+
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+definition lpr: relation3 genv lenv lenv ≝ λG. lpx_sn (cpr G).
+
+interpretation "parallel reduction (local environment, sn variant)"
+   'PRedSn G L1 L2 = (lpr G L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_1: includes: wcpr0_gen_sort *)
+lemma lpr_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡ L2 → L2 = ⋆.
+/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
+
+(* Basic_1: includes: wcpr0_gen_head *)
+lemma lpr_inv_pair1: ∀I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ L2 →
+                     ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L2 = K2.ⓑ{I}V2.
+/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
+
+lemma lpr_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡ ⋆ → L1 = ⋆.
+/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
+
+lemma lpr_inv_pair2: ∀I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡ K2.ⓑ{I}V2 →
+                     ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
+
+(* Basic properties *********************************************************)
+
+(* Note: lemma 250 *)
+lemma lpr_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡ L.
+/2 width=1 by lpx_sn_refl/ qed.
+
+lemma lpr_pair: ∀I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡ K2 → ⦃G, K1⦄ ⊢ V1 ➡ V2 →
+                ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ K2.ⓑ{I}V2.
+/2 width=1/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpr_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → |L1| = |L2|.
+/2 width=2 by lpx_sn_fwd_length/ qed-.
+
+(* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back
+                                pr0_subst1_back
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr_ldrop.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr_ldrop.etc
new file mode 100644 (file)
index 0000000..4156df6
--- /dev/null
@@ -0,0 +1,96 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/fquq_alt.ma".
+include "basic_2/relocation/ldrop_lpx_sn.ma".
+include "basic_2/reduction/cpr_lift.ma".
+include "basic_2/reduction/lpr.ma".
+
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+(* Properies on local environment slicing ***********************************)
+
+(* Basic_1: includes: wcpr0_drop *)
+lemma lpr_ldrop_conf: ∀G. dropable_sn (lpr G).
+/3 width=6 by lpx_sn_deliftable_dropable, cpr_inv_lift1/ qed-.
+
+(* Basic_1: includes: wcpr0_drop_back *)
+lemma ldrop_lpr_trans: ∀G. dedropable_sn (lpr G).
+/3 width=10 by lpx_sn_liftable_dedropable, cpr_lift/ qed-.
+
+lemma lpr_ldrop_trans_O1: ∀G. dropable_dx (lpr G).
+/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on context-sensitive parallel reduction for terms *************)
+
+lemma fqu_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
+                        ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
+                        ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃ ⦃G2, L2, U2⦄.
+#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/
+#G #L #K #U #T #e #HLK #HUT #U2 #HU2
+elim (lift_total U2 0 (e+1)) #T2 #HUT2
+lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/
+qed-.
+
+lemma fquq_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
+                         ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
+                         ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄.
+#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H
+[ #HT12 elim (fqu_cpr_trans_dx … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma fqu_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
+                        ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
+                        ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃ ⦃G2, L2, U2⦄.
+#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/
+#G #L #K #U #T #e #HLK #HUT #U2 #HU2
+elim (lift_total U2 0 (e+1)) #T2 #HUT2
+lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/
+qed-.
+
+lemma fquq_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
+                         ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
+                         ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄.
+#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H
+[ #HT12 elim (fqu_cpr_trans_sn … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma fqu_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
+                     ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 →
+                     ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊃ ⦃G2, K2, T2⦄.
+#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpr_pair, ex3_2_intro/
+[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpr_inv_pair1 … H) -H
+  #K2 #W2 #HLK2 #HVW2 #H destruct
+  /3 width=5 by fqu_fquq, cpr_pair_sn, fqu_bind_dx, ex3_2_intro/
+| #G #L1 #K1 #T1 #U1 #e #HLK1 #HTU1 #K2 #HK12
+  elim (ldrop_lpr_trans … HLK1 … HK12) -HK12
+  /3 width=7 by fqu_drop, ex3_2_intro/
+]
+qed-.
+
+lemma fquq_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
+                      ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 →
+                      ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊃⸮ ⦃G2, K2, T2⦄.
+#G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H
+[ #HT12 elim (fqu_lpr_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr_lpr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpr_lpr.etc
new file mode 100644 (file)
index 0000000..deaeff9
--- /dev/null
@@ -0,0 +1,357 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/grammar/lpx_sn_lpx_sn.ma".
+include "basic_2/substitution/fqup.ma".
+include "basic_2/reduction/lpr_ldrop.ma".
+
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+(* Main properties on context-sensitive parallel reduction for terms ********)
+
+fact cpr_conf_lpr_atom_atom:
+   ∀I,G,L1,L2. ∃∃T. ⦃G, L1⦄ ⊢ ⓪{I} ➡ T & ⦃G, L2⦄ ⊢ ⓪{I} ➡ T.
+/2 width=3 by cpr_atom, ex2_intro/ qed-.
+
+fact cpr_conf_lpr_atom_delta:
+   ∀G,L0,i. (
+      ∀L,T. ⦃G, L0, #i⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀K0,V0. ⇩[i] L0 ≡ K0.ⓓV0 →
+   ∀V2. ⦃G, K0⦄ ⊢ V0 ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ #i ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
+#G #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_drop2 … HLK2) -W2 #HLK2
+lapply (fqup_lref … G … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1))
+/3 width=12 by cpr_lift, cpr_delta, ex2_intro/
+qed-.
+
+(* Basic_1: includes: pr0_delta_delta pr2_delta_delta *)
+fact cpr_conf_lpr_delta_delta:
+   ∀G,L0,i. (
+      ∀L,T. ⦃G, L0, #i⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀K0,V0. ⇩[i] L0 ≡ K0.ⓓV0 →
+   ∀V1. ⦃G, K0⦄ ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+   ∀KX,VX. ⇩[i] L0 ≡ KX.ⓓVX →
+   ∀V2. ⦃G, KX⦄ ⊢ VX ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
+#G #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_drop2 … HLK1) -W1 #HLK1
+elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_drop2 … HLK2) -W2 #HLK2
+lapply (fqup_lref … G … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) /3 width=12 by cpr_lift, ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_bind_bind:
+   ∀a,I,G,L0,V0,T0. (
+      ∀L,T. ⦃G, L0, ⓑ{a,I}V0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T1 →
+   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓑ{a,I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓑ{a,I}V2.T2 ➡ T.
+#a #I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH
+/3 width=5 by lpr_pair, cpr_bind, ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_bind_zeta:
+   ∀G,L0,V0,T0. (
+      ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 →
+   ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ +ⓓV1.T1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T.
+#G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -V0 -T0 #T #HT1 #HT2
+elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /3 width=3 by cpr_zeta, ldrop_drop, ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_zeta_zeta:
+   ∀G,L0,V0,T0. (
+      ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
+   ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ X1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T.
+#G #L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
+#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -T0 #T #HT1 #HT2
+elim (cpr_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=2 by ldrop_drop/ #T1 #HT1 #HXT1
+elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=2 by ldrop_drop/ #T2 #HT2 #HXT2
+lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3 by ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_flat_flat:
+   ∀I,G,L0,V0,T0. (
+      ∀L,T. ⦃G, L0, ⓕ{I}V0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 →
+   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓕ{I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓕ{I}V2.T2 ➡ T.
+#I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 … HL01 … HL02) /3 width=5 by cpr_flat, ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_flat_tau:
+   ∀G,L0,V0,T0. (
+      ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓝV1.T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
+#G #L0 #V0 #T0 #IH #V1 #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3 by cpr_tau, ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_tau_tau:
+   ∀G,L0,V0,T0. (
+      ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
+#G #L0 #V0 #T0 #IH #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3 by ex2_intro/
+qed-.
+
+fact cpr_conf_lpr_flat_beta:
+   ∀a,G,L0,V0,W0,T0. (
+      ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓛ{a}W0.T0 ➡ T1 →
+   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T.
+#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
+#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (cpr_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ #W #HW1 #HW2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_abst/ (**) (* full auto not tried *)
+/4 width=5 by cpr_bind, cpr_flat, cpr_beta, ex2_intro/
+qed-.
+
+(* Basic-1: includes:
+            pr0_cong_upsilon_refl pr0_cong_upsilon_zeta
+            pr0_cong_upsilon_cong pr0_cong_upsilon_delta
+*)
+fact cpr_conf_lpr_flat_theta:
+   ∀a,G,L0,V0,W0,T0. (
+      ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓓ{a}W0.T0 ➡ T1 →
+   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
+   ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
+#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
+#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (lift_total V 0 1) #U #HVU
+lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by ldrop_drop/ #HU2
+elim (cpr_inv_abbr1 … H) -H *
+[ #W1 #T1 #HW01 #HT01 #H destruct
+  elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/
+  elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0
+  /4 width=7 by cpr_bind, cpr_flat, cpr_theta, ex2_intro/
+| #T1 #HT01 #HXT1 #H destruct
+  elim (IH … HT01 … HT02 (L1.ⓓW2) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+  elim (cpr_inv_lift1 … HT1 L1 … HXT1) -HXT1
+  /4 width=9 by cpr_flat, cpr_zeta, ldrop_drop, lift_flat, ex2_intro/
+]
+qed-.
+
+fact cpr_conf_lpr_beta_beta:
+   ∀a,G,L0,V0,W0,T0. (
+      ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T1 →
+   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}ⓝW1.V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T.
+#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #W1 #HW01 #T1 #HT01
+#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/ #W #HW1 #HW2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (lsubr_cpr_trans … HT1 (L1.ⓓⓝW1.V1) ?) -HT1 /2 width=1 by lsubr_abst/
+lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_abst/
+/4 width=5 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *)
+qed-.
+
+(* Basic_1: was: pr0_upsilon_upsilon *)
+fact cpr_conf_lpr_theta_theta:
+   ∀a,G,L0,V0,W0,T0. (
+      ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
+      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
+      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
+   ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T1 →
+   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
+   ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
+#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
+#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/
+elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0
+elim (lift_total V 0 1) #U #HVU
+lapply (cpr_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=2 by ldrop_drop/
+lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by ldrop_drop/
+/4 width=7 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *)
+qed-.
+
+theorem cpr_conf_lpr: ∀G. lpx_sn_confluent (cpr G) (cpr G).
+#G #L0 #T0 @(fqup_wf_ind_eq … G L0 T0) -G -L0 -T0 #G #L #T #IH #G0 #L0 * [| * ]
+[ #I0 #HG #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+  elim (cpr_inv_atom1 … H1) -H1
+  elim (cpr_inv_atom1 … H2) -H2
+  [ #H2 #H1 destruct
+    /2 width=1 by cpr_conf_lpr_atom_atom/
+  | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+    /3 width=10 by cpr_conf_lpr_atom_delta/
+  | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+    /4 width=10 by ex2_commute, cpr_conf_lpr_atom_delta/
+  | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+    * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+    /3 width=17 by cpr_conf_lpr_delta_delta/
+  ]
+| #a #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+  elim (cpr_inv_bind1 … H1) -H1 *
+  [ #V1 #T1 #HV01 #HT01 #H1
+  | #T1 #HT01 #HXT1 #H11 #H12
+  ]
+  elim (cpr_inv_bind1 … H2) -H2 *
+  [1,3: #V2 #T2 #HV02 #HT02 #H2
+  |2,4: #T2 #HT02 #HXT2 #H21 #H22
+  ] destruct
+  [ /3 width=10 by cpr_conf_lpr_bind_bind/
+  | /4 width=11 by ex2_commute, cpr_conf_lpr_bind_zeta/
+  | /3 width=11 by cpr_conf_lpr_bind_zeta/
+  | /3 width=12 by cpr_conf_lpr_zeta_zeta/
+  ]
+| #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+  elim (cpr_inv_flat1 … H1) -H1 *
+  [ #V1 #T1 #HV01 #HT01 #H1
+  | #HX1 #H1
+  | #a1 #V1 #Y1 #W1 #Z1 #T1 #HV01 #HYW1 #HZT1 #H11 #H12 #H13
+  | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
+  ]
+  elim (cpr_inv_flat1 … H2) -H2 *
+  [1,5,9,13: #V2 #T2 #HV02 #HT02 #H2
+  |2,6,10,14: #HX2 #H2
+  |3,7,11,15: #a2 #V2 #Y2 #W2 #Z2 #T2 #HV02 #HYW2 #HZT2 #H21 #H22 #H23
+  |4,8,12,16: #a2 #V2 #U2 #Y2 #W2 #Z2 #T2 #HV02 #HVU2 #HYW2 #HZT2 #H21 #H22 #H23
+  ] destruct
+  [ /3 width=10 by cpr_conf_lpr_flat_flat/
+  | /4 width=8 by ex2_commute, cpr_conf_lpr_flat_tau/
+  | /4 width=12 by ex2_commute, cpr_conf_lpr_flat_beta/
+  | /4 width=14 by ex2_commute, cpr_conf_lpr_flat_theta/
+  | /3 width=8 by cpr_conf_lpr_flat_tau/
+  | /3 width=7 by cpr_conf_lpr_tau_tau/
+  | /3 width=12 by cpr_conf_lpr_flat_beta/
+  | /3 width=13 by cpr_conf_lpr_beta_beta/
+  | /3 width=14 by cpr_conf_lpr_flat_theta/
+  | /3 width=17 by cpr_conf_lpr_theta_theta/
+  ]
+]
+qed-.
+
+(* Basic_1: includes: pr0_confluence pr2_confluence *)
+theorem cpr_conf: ∀G,L. confluent … (cpr G L).
+/2 width=6 by cpr_conf_lpr/ qed-.
+
+(* Properties on context-sensitive parallel reduction for terms *************)
+
+lemma lpr_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 →
+                       ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L1⦄ ⊢ T1 ➡ T.
+#G #L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) // -L0 /2 width=3 by ex2_intro/
+qed-.
+
+lemma lpr_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 →
+                       ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L0⦄ ⊢ T1 ➡ T.
+#G #L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3 by ex2_intro/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem lpr_conf: ∀G. confluent … (lpr G).
+/3 width=6 by lpx_sn_conf, cpr_conf_lpr/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs.etc
new file mode 100644 (file)
index 0000000..6e84319
--- /dev/null
@@ -0,0 +1,71 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/predsnstar_3.ma".
+include "basic_2/grammar/lpx_sn_tc.ma".
+include "basic_2/reduction/lpr.ma".
+
+(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************)
+
+definition lprs: relation3 genv lenv lenv ≝
+                 λG. TC … (lpr G).
+
+interpretation "parallel computation (local environment, sn variant)"
+   'PRedSnStar G L1 L2 = (lprs G L1 L2).
+
+(* Basic eliminators ********************************************************)
+
+lemma lprs_ind: ∀G,L1. ∀R:predicate lenv. R L1 →
+                (∀L,L2. ⦃G, L1⦄ ⊢ ➡* L → ⦃G, L⦄ ⊢ ➡ L2 → R L → R L2) →
+                ∀L2. ⦃G, L1⦄ ⊢ ➡* L2 → R L2.
+#G #L1 #R #HL1 #IHL1 #L2 #HL12
+@(TC_star_ind … HL1 IHL1 … HL12) //
+qed-.
+
+lemma lprs_ind_dx: ∀G,L2. ∀R:predicate lenv. R L2 →
+                   (∀L1,L. ⦃G, L1⦄ ⊢ ➡ L → ⦃G, L⦄ ⊢ ➡* L2 → R L → R L1) →
+                   ∀L1. ⦃G, L1⦄ ⊢ ➡* L2 → R L1.
+#G #L2 #R #HL2 #IHL2 #L1 #HL12
+@(TC_star_ind_dx … HL2 IHL2 … HL12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lpr_lprs: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡* L2.
+/2 width=1/ qed.
+
+lemma lprs_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡* L.
+/2 width=1/ qed.
+
+lemma lprs_strap1: ∀G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡* L → ⦃G, L⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡* L2.
+/2 width=3/ qed.
+
+lemma lprs_strap2: ∀G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡ L → ⦃G, L⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡* L2.
+/2 width=3/ qed.
+
+lemma lprs_pair_refl: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡* L2.ⓑ{I}V.
+/2 width=1 by TC_lpx_sn_pair_refl/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lprs_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡* L2 → L2 = ⋆.
+/2 width=2 by TC_lpx_sn_inv_atom1/ qed-.
+
+lemma lprs_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡* ⋆ → L1 = ⋆.
+/2 width=2 by TC_lpx_sn_inv_atom2/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lprs_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → |L1| = |L2|.
+/2 width=2 by TC_lpx_sn_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_alt.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_alt.etc
new file mode 100644 (file)
index 0000000..315ee8f
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/predsnstaralt_3.ma".
+include "basic_2/computation/cprs_cprs.ma".
+include "basic_2/computation/lprs.ma".
+
+(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************)
+
+(* alternative definition *)
+definition lprsa: relation3 genv lenv lenv ≝
+           λG. lpx_sn … (cprs G).
+
+interpretation "parallel computation (local environment, sn variant) alternative"
+   'PRedSnStarAlt G L1 L2 = (lprsa G L1 L2).
+
+(* Main properties on the alternative definition ****************************)
+
+theorem lprsa_lprs: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡➡* L2 → ⦃G, L1⦄ ⊢ ➡* L2.
+/2 width=1 by lpx_sn_LTC_TC_lpx_sn/ qed-.
+
+(* Main inversion lemmas on the alternative definition **********************)
+
+theorem lprs_inv_lprsa: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡➡* L2.
+/3 width=3 by TC_lpx_sn_inv_lpx_sn_LTC, lpr_cprs_trans/ qed-.
+
+(* Alternative eliminators **************************************************)
+
+lemma lprs_ind_alt: ∀G. ∀R:relation lenv.
+                    R (⋆) (⋆) → (
+                       ∀I,K1,K2,V1,V2.
+                       ⦃G, K1⦄ ⊢ ➡* K2 → ⦃G, K1⦄ ⊢ V1 ➡* V2 →
+                       R K1 K2 → R (K1.ⓑ{I}V1) (K2.ⓑ{I}V2)
+                    ) →
+                    ∀L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → R L1 L2.
+/3 width=4 by TC_lpx_sn_ind, lpr_cprs_trans/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_ldrop.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_ldrop.etc
new file mode 100644 (file)
index 0000000..f03d3f0
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/reduction/lpr_ldrop.ma".
+include "basic_2/computation/lprs.ma".
+
+(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************)
+
+(* Properies on local environment slicing ***********************************)
+
+lemma lprs_ldrop_conf: ∀G. dropable_sn (lprs G).
+/3 width=3 by dropable_sn_TC, lpr_ldrop_conf/ qed-.
+
+lemma ldrop_lprs_trans: ∀G. dedropable_sn (lprs G).
+/3 width=3 by dedropable_sn_TC, ldrop_lpr_trans/ qed-.
+
+lemma lprs_ldrop_trans_O1: ∀G. dropable_dx (lprs G).
+/3 width=3 by dropable_dx_TC, lpr_ldrop_trans_O1/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_lprs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lprs_lprs.etc
new file mode 100644 (file)
index 0000000..1da198d
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/reduction/lpr_lpr.ma".
+include "basic_2/computation/lprs.ma".
+
+(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************)
+
+(* Advanced properties ******************************************************)
+
+lemma lprs_strip: ∀G. confluent2 … (lprs G) (lpr G).
+/3 width=3 by TC_strip1, lpr_conf/ qed-.
+
+(* Main properties **********************************************************)
+
+theorem lprs_conf: ∀G. confluent2 … (lprs G) (lprs G).
+/3 width=3 by TC_confluent2, lpr_conf/ qed-.
+
+theorem lprs_trans: ∀G. Transitive … (lprs G).
+/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx.etc
new file mode 100644 (file)
index 0000000..b10b13a
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/predsn_5.ma".
+include "basic_2/reduction/lpr.ma".
+include "basic_2/reduction/cpx.ma".
+
+(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
+
+definition lpx: ∀h. sd h → relation3 genv lenv lenv ≝
+                λh,g,G. lpx_sn (cpx h g G).
+
+interpretation "extended parallel reduction (local environment, sn variant)"
+   'PRedSn h g G L1 L2 = (lpx h g G L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lpx_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡[h, g] L2 → L2 = ⋆.
+/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
+
+lemma lpx_inv_pair1: ∀h,g,I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] L2 →
+                     ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 &
+                              L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
+
+lemma lpx_inv_atom2: ∀h,g,G,L1.  ⦃G, L1⦄ ⊢ ➡[h, g] ⋆ → L1 = ⋆.
+/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
+
+lemma lpx_inv_pair2: ∀h,g,I,G,L1,K2,V2.  ⦃G, L1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2 →
+                     ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 &
+                             L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
+
+lemma lpx_inv_pair: ∀h,g,I1,I2,G,L1,L2,V1,V2.  ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ➡[h, g] L2.ⓑ{I2}V2 →
+                    ∧∧ ⦃G, L1⦄ ⊢ ➡[h, g] L2 & ⦃G, L1⦄ ⊢ V1 ➡[h, g] V2 & I1 = I2.
+/2 width=1 by lpx_sn_inv_pair/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lpx_refl: ∀h,g,G,L.  ⦃G, L⦄ ⊢ ➡[h, g] L.
+/2 width=1 by lpx_sn_refl/ qed.
+
+lemma lpx_pair: ∀h,g,I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 →
+                ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2.
+/2 width=1 by lpx_sn_pair/ qed.
+
+lemma lpr_lpx: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡[h, g] L2.
+#h #g #G #L1 #L2 #H elim H -L1 -L2 /3 width=1 by lpx_pair, cpr_cpx/
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpx_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → |L1| = |L2|.
+/2 width=2 by lpx_sn_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_aaa.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_aaa.etc
new file mode 100644 (file)
index 0000000..f9c2374
--- /dev/null
@@ -0,0 +1,83 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/aaa_lift.ma".
+include "basic_2/static/lsuba_aaa.ma".
+include "basic_2/reduction/lpx_ldrop.ma".
+
+(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+(* Note: lemma 500 *)
+lemma aaa_cpx_lpx_conf: ∀h,g,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A →
+                        ∀T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 →
+                        ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
+#h #g #G #L1 #T1 #A #H elim H -G -L1 -T1 -A
+[ #g #L1 #k #X #H
+  elim (cpx_inv_sort1 … H) -H // * //
+| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12
+  elim (cpx_inv_lref1 … H) -H
+  [ #H destruct
+    elim (lpx_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+    elim (lpx_inv_pair1 … H) -H
+    #K2 #V2 #HK12 #HV12 #H destruct /3 width=6 by aaa_lref/
+  | * #J #Y #Z #V2 #H #HV12 #HV2
+    lapply (ldrop_mono … H … HLK1) -H #H destruct
+    elim (lpx_ldrop_conf … HLK1 … HL12) -L1 #Z #H #HLK2
+    elim (lpx_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
+    /3 width=8 by aaa_lift, ldrop_fwd_drop2/
+  ]
+| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (cpx_inv_abbr1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=2 by lpx_pair, aaa_abbr/
+  | #T2 #HT12 #HT2 #H destruct -IHV1
+    /4 width=8 by lpx_pair, aaa_inv_lift, ldrop_drop/
+  ]
+| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (cpx_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  /4 width=1 by lpx_pair, aaa_abst/
+| #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (cpx_inv_appl1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct /3 width=3 by aaa_appl/
+  | #b #V2 #W1 #W2 #U1 #U2 #HV12 #HW12 #HU12 #H1 #H2 destruct
+    lapply (IHV1 … HV12 … HL12) -IHV1 -HV12 #HV2
+    lapply (IHT1 (ⓛ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H
+    elim (aaa_inv_abst … H) -H #B0 #A0 #HW1 #HU2 #H destruct
+    /5 width=6 by lsuba_aaa_trans, lsuba_abbr, aaa_abbr, aaa_cast/
+  | #b #V #V2 #W1 #W2 #U1 #U2 #HV1 #HV2 #HW12 #HU12 #H1 #H2 destruct
+    lapply (aaa_lift G L2 … B … (L2.ⓓW2) … HV2) -HV2 /2 width=2 by ldrop_drop/ #HV2
+    lapply (IHT1 (ⓓ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H
+    elim (aaa_inv_abbr … H) -H /3 width=3 by aaa_abbr, aaa_appl/
+  ]
+| #G #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (cpx_inv_cast1 … H) -H
+  [ * #V2 #T2 #HV12 #HT12 #H destruct /3 width=1 by aaa_cast/
+  | -IHV1 /2 width=1 by/
+  | -IHT1 /2 width=1 by/
+  ]
+]
+qed-.
+
+lemma aaa_cpx_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A.
+/2 width=7 by aaa_cpx_lpx_conf/ qed-.
+
+lemma aaa_lpx_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A.
+/2 width=7 by aaa_cpx_lpx_conf/ qed-.
+
+lemma aaa_cpr_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T2 ⁝ A.
+/3 width=5 by aaa_cpx_conf, cpr_cpx/ qed-.
+
+lemma aaa_lpr_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T ⁝ A.
+/3 width=5 by aaa_lpx_conf, lpr_lpx/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_ldrop.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_ldrop.etc
new file mode 100644 (file)
index 0000000..188e8d1
--- /dev/null
@@ -0,0 +1,78 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/ldrop_lpx_sn.ma".
+include "basic_2/reduction/cpx_lift.ma".
+include "basic_2/reduction/lpx.ma".
+
+(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
+
+(* Properies on local environment slicing ***********************************)
+
+lemma lpx_ldrop_conf: ∀h,g,G. dropable_sn (lpx h g G).
+/3 width=6 by lpx_sn_deliftable_dropable, cpx_inv_lift1/ qed-.
+
+lemma ldrop_lpx_trans: ∀h,g,G. dedropable_sn (lpx h g G).
+/3 width=10 by lpx_sn_liftable_dedropable, cpx_lift/ qed-.
+
+lemma lpx_ldrop_trans_O1: ∀h,g,G. dropable_dx (lpx h g G).
+/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on supclosure *************************************************)
+
+lemma fqu_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
+                     ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 →
+                     ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃ ⦃G2, K2, T2⦄.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpx_pair, ex3_2_intro/
+[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpx_inv_pair1 … H) -H
+  #K2 #W2 #HLK2 #HVW2 #H destruct
+  /3 width=5 by fqu_fquq, cpx_pair_sn, fqu_bind_dx, ex3_2_intro/
+| #G #L1 #K1 #T1 #U1 #e #HLK1 #HTU1 #K2 #HK12
+  elim (ldrop_lpx_trans … HLK1 … HK12) -HK12
+  /3 width=7 by fqu_drop, ex3_2_intro/
+]
+qed-.
+
+lemma fquq_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
+                      ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 →
+                      ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃⸮ ⦃G2, K2, T2⦄.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H
+[ #HT12 elim (fqu_lpx_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma lpx_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
+                     ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 →
+                     ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+/3 width=7 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpx_pair, ex3_2_intro/
+[ #I #G1 #L1 #V1 #X #H elim (lpx_inv_pair2 … H) -H
+  #K1 #W1 #HKL1 #HWV1 #H destruct elim (lift_total V1 0 1)
+  /4 width=7 by cpx_delta, fqu_drop, ldrop_drop, ex3_2_intro/
+| #G #L1 #K1 #T1 #U1 #e #HLK1 #HTU1 #L0 #HL01
+  elim (lpx_ldrop_trans_O1 … HL01 … HLK1) -L1
+  /3 width=5 by fqu_drop, ex3_2_intro/
+]
+qed-.
+
+lemma lpx_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
+                      ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 →
+                      ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fquq_inv_gen … H) -H
+[ #HT12 elim (lpx_fqu_trans … HT12 … HKL1) /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_lleq.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_lleq.etc
new file mode 100644 (file)
index 0000000..353f810
--- /dev/null
@@ -0,0 +1,108 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/lleq_ldrop.ma".
+include "basic_2/reduction/lpx_ldrop.ma".
+
+(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
+
+(* Properties on lazy equivalence for local environments ********************)
+(*
+lamma pippo: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡[h, g] K2 → ∀L1. |L1| = |L2| →
+             ∃∃K1. ⦃G, L1⦄ ⊢ ➡[h, g] K1 & |K1| = |K2| &
+                   (∀T,d. L1 ⋕[T, d] L2 ↔ K1 ⋕[T, d] K2).
+#h #g #G #L2 #K2 #H elim H -L2 -K2
+[ #L1 #H >(length_inv_zero_dx … H) -L1 /3 width=5 by ex3_intro, conj/
+| #I2 #L2 #K2 #V2 #W2 #_ #HVW2 #IHLK2 #Y #H
+  elim (length_inv_pos_dx … H) -H #I #L1 #V1 #HL12 #H destruct
+  elim (IHLK2 … HL12) -IHLK2 #K1 #HLK1 #HK12 #IH
+  elim (eq_term_dec V1 V2) #H destruct
+  [ @(ex3_intro … (K1.ⓑ{I}W2)) normalize /2 width=1 by /
+*)
+axiom lleq_lpx_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡[h, g] K2 →
+                      ∀L1,T,d. L1 ⋕[T, d] L2 →
+                      ∃∃K1. ⦃G, L1⦄ ⊢ ➡[h, g] K1 & K1 ⋕[T, d] K2.
+(*
+#h #g #G #L2 #K2 #H elim H -L2 -K2
+[ #L1 #T #d #H lapply (lleq_fwd_length … H) -H
+  #H >(length_inv_zero_dx … H) -L1 /2 width=3 by ex2_intro/
+| #I2 #L2 #K2 #V2 #W2 #HLK2 #HVW2 #IHLK2 #Y #T #d #HT
+  lapply (lleq_fwd_length … HT) #H
+  elim (length_inv_pos_dx … H) -H #I1 #L1 #V1 #HL12 #H destruct
+  elim (eq_term_dec V1 V2) #H destruct
+  [ @ex2_intro …
+*)
+
+lemma lpx_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
+                          ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
+                          ∃∃K2. ⦃G1, K1, T1⦄ ⊃ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+[ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpx_inv_pair2 … H1) -H1
+  #K0 #V0 #H1KL1 #_ #H destruct
+  elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 //
+  #K1 #H #H2KL1 lapply (ldrop_inv_O2 … H) -H #H destruct
+  /2 width=4 by fqu_lref_O, ex3_intro/
+| * [ #a ] #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H
+  [ elim (lleq_inv_bind … H)
+  | elim (lleq_inv_flat … H)
+  ] -H /2 width=4 by fqu_pair_sn, ex3_intro/
+| #a #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_bind_O … H) -H
+  /3 width=4 by lpx_pair, fqu_bind_dx, ex3_intro/
+| #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H
+  /2 width=4 by fqu_flat_dx, ex3_intro/
+| #G1 #L1 #L #T1 #U1 #e #HL1 #HTU1 #K1 #H1KL1 #H2KL1
+  elim (ldrop_O1_le (e+1) K1)
+  [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 //
+    #H2KL elim (lpx_ldrop_trans_O1 … H1KL1 … HL1) -L1
+    #K0 #HK10 #H1KL lapply (ldrop_mono … HK10 … HK1) -HK10 #H destruct
+    /3 width=4 by fqu_drop, ex3_intro/
+  | lapply (ldrop_fwd_length_le2 … HL1) -L -T1 -g
+    lapply (lleq_fwd_length … H2KL1) //
+  ]
+]
+qed-.
+
+lemma lpx_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
+                           ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
+                           ∃∃K2. ⦃G1, K1, T1⦄ ⊃⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1
+elim (fquq_inv_gen … H) -H
+[ #H elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1
+  /3 width=4 by fqu_fquq, ex3_intro/
+| * #HG #HL #HT destruct /2 width=4 by ex3_intro/
+]
+qed-.
+
+lemma lpx_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃+ ⦃G2, L2, T2⦄ →
+                           ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
+                           ∃∃K2. ⦃G1, K1, T1⦄ ⊃+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
+[ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1
+  /3 width=4 by fqu_fqup, ex3_intro/
+| #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1
+  #K #HT1 #H1KL #H2KL elim (lpx_lleq_fqu_trans … HT2 … H1KL H2KL) -L
+  /3 width=5 by fqup_strap1, ex3_intro/
+]
+qed-.
+
+lemma lpx_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃* ⦃G2, L2, T2⦄ →
+                           ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
+                           ∃∃K2. ⦃G1, K1, T1⦄ ⊃* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1
+elim (fqus_inv_gen … H) -H
+[ #H elim (lpx_lleq_fqup_trans … H … H1KL1 H2KL1) -L1
+  /3 width=4 by fqup_fqus, ex3_intro/
+| * #HG #HL #HT destruct /2 width=4 by ex3_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn.etc
new file mode 100644 (file)
index 0000000..fddde2d
--- /dev/null
@@ -0,0 +1,89 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/grammar/lenv_length.ma".
+
+(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
+
+inductive lpx_sn (R:lenv→relation term): relation lenv ≝
+| lpx_sn_atom: lpx_sn R (⋆) (⋆)
+| lpx_sn_pair: ∀I,K1,K2,V1,V2.
+               lpx_sn R K1 K2 → R K1 V1 V2 →
+               lpx_sn R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
+.
+
+(* Basic properties *********************************************************)
+
+lemma lpx_sn_refl: ∀R. (∀L. reflexive ? (R L)) → reflexive … (lpx_sn R).
+#R #HR #L elim L -L /2 width=1 by lpx_sn_atom, lpx_sn_pair/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lpx_sn_inv_atom1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L1 = ⋆ → L2 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_sn_inv_atom1: ∀R,L2. lpx_sn R (⋆) L2 → L2 = ⋆.
+/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
+
+fact lpx_sn_inv_pair1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                           ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+#R #L1 #L2 * -L1 -L2
+[ #J #K1 #V1 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma lpx_sn_inv_pair1: ∀R,I,K1,V1,L2. lpx_sn R (K1. ⓑ{I} V1) L2 →
+                        ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
+
+fact lpx_sn_inv_atom2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L2 = ⋆ → L1 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_sn_inv_atom2: ∀R,L1. lpx_sn R L1 (⋆) → L1 = ⋆.
+/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
+
+fact lpx_sn_inv_pair2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                           ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
+#R #L1 #L2 * -L1 -L2
+[ #J #K2 #V2 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma lpx_sn_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn R L1 (K2. ⓑ{I} V2) →
+                        ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
+
+lemma lpx_sn_inv_pair: ∀R,I1,I2,L1,L2,V1,V2.
+                       lpx_sn R (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) →
+                       ∧∧ lpx_sn R L1 L2 & R L1 V1 V2 & I1 = I2.
+#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lpx_sn_inv_pair1 … H) -H
+#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpx_sn_fwd_length: ∀R,L1,L2. lpx_sn R L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #H elim H -L1 -L2 normalize //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn_lpx_sn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn_lpx_sn.etc
new file mode 100644 (file)
index 0000000..69c010a
--- /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/grammar/lpx_sn.ma".
+
+(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
+
+definition lpx_sn_confluent: relation (lenv→relation term) ≝ λR1,R2.
+                             ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 →
+                             ∀L1. lpx_sn R1 L0 L1 → ∀L2. lpx_sn R2 L0 L2 →
+                             ∃∃T. R2 L1 T1 T & R1 L2 T2 T.
+
+definition lpx_sn_transitive: relation (lenv→relation term) ≝ λR1,R2.
+                              ∀L1,T1,T. R1 L1 T1 T → ∀L2. lpx_sn R1 L1 L2 →
+                              ∀T2. R2 L2 T T2 → R1 L1 T1 T2.
+
+(* Main properties **********************************************************)
+
+theorem lpx_sn_trans: ∀R. lpx_sn_transitive R R → Transitive … (lpx_sn R).
+#R #HR #L1 #L #H elim H -L1 -L //
+#I #L1 #L #V1 #V #HL1 #HV1 #IHL1 #X #H
+elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL2 #HV2 #H destruct /3 width=5/
+qed-.
+
+theorem lpx_sn_conf: ∀R1,R2. lpx_sn_confluent R1 R2 →
+                     confluent2 … (lpx_sn R1) (lpx_sn R2).
+#R1 #R2 #HR12 #L0 @(f_ind … length … L0) -L0 #n #IH *
+[ #_ #X1 #H1 #X2 #H2 -n
+  >(lpx_sn_inv_atom1 … H1) -X1
+  >(lpx_sn_inv_atom1 … H2) -X2 /2 width=3/
+| #L0 #I #V0 #Hn #X1 #H1 #X2 #H2 destruct
+  elim (lpx_sn_inv_pair1 … H1) -H1 #L1 #V1 #HL01 #HV01 #H destruct
+  elim (lpx_sn_inv_pair1 … H2) -H2 #L2 #V2 #HL02 #HV02 #H destruct
+  elim (IH … HL01 … HL02) -IH normalize // #L #HL1 #HL2
+  elim (HR12 … HV01 … HV02 … HL01 … HL02) -L0 -V0 /3 width=5/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn_tc.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/lpx_sn_tc.etc
new file mode 100644 (file)
index 0000000..2919d9d
--- /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/grammar/lpx_sn.ma".
+
+(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
+
+(* Properties on transitive_closure *****************************************)
+
+lemma TC_lpx_sn_pair_refl: ∀R. (∀L. reflexive … (R L)) →
+                           ∀L1,L2. TC … (lpx_sn R) L1 L2 →
+                           ∀I,V. TC … (lpx_sn R) (L1. ⓑ{I} V) (L2. ⓑ{I} V).
+#R #HR #L1 #L2 #H @(TC_star_ind … L2 H) -L2
+[ /2 width=1 by lpx_sn_refl/
+| /3 width=1 by TC_reflexive, lpx_sn_refl/
+| /3 width=5 by lpx_sn_pair, step/
+]
+qed-.
+
+lemma TC_lpx_sn_pair: ∀R. (∀L. reflexive … (R L)) →
+                      ∀I,L1,L2. TC … (lpx_sn R) L1 L2 →
+                      ∀V1,V2. LTC … R L1 V1 V2 →
+                      TC … (lpx_sn R) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2).
+#R #HR #I #L1 #L2 #HL12 #V1 #V2 #H @(TC_star_ind_dx … V1 H) -V1 //
+[ /2 width=1 by TC_lpx_sn_pair_refl/
+| /4 width=3 by TC_strap, lpx_sn_pair, lpx_sn_refl/
+]
+qed-.
+
+lemma lpx_sn_LTC_TC_lpx_sn: ∀R. (∀L. reflexive … (R L)) →
+                            ∀L1,L2. lpx_sn (LTC … R) L1 L2 →
+                            TC … (lpx_sn R) L1 L2.
+#R #HR #L1 #L2 #H elim H -L1 -L2
+/2 width=1 by TC_lpx_sn_pair, lpx_sn_atom, inj/
+qed-.
+
+(* Inversion lemmas on transitive closure ***********************************)
+
+lemma TC_lpx_sn_inv_atom2: ∀R,L1. TC … (lpx_sn R) L1 (⋆) → L1 = ⋆.
+#R #L1 #H @(TC_ind_dx … L1 H) -L1
+[ /2 width=2 by lpx_sn_inv_atom2/
+| #L1 #L #HL1 #_ #IHL2 destruct /2 width=2 by lpx_sn_inv_atom2/
+]
+qed-.
+
+lemma TC_lpx_sn_inv_pair2: ∀R. s_rs_trans … R (lpx_sn R) →
+                           ∀I,L1,K2,V2. TC  … (lpx_sn R) L1 (K2.ⓑ{I}V2) →
+                           ∃∃K1,V1. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
+#R #HR #I #L1 #K2 #V2 #H @(TC_ind_dx … L1 H) -L1
+[ #L1 #H elim (lpx_sn_inv_pair2 … H) -H /3 width=5 by inj, ex3_2_intro/
+| #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
+  elim (lpx_sn_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct
+  lapply (HR … HV2 … HK1) -HR -HV2 /3 width=5 by TC_strap, ex3_2_intro/
+]
+qed-.
+
+lemma TC_lpx_sn_ind: ∀R. s_rs_trans … R (lpx_sn R) →
+                     ∀S:relation lenv.
+                     S (⋆) (⋆) → (
+                        ∀I,K1,K2,V1,V2.
+                        TC … (lpx_sn R) K1 K2 → LTC … R K1 V1 V2 →
+                        S K1 K2 → S (K1.ⓑ{I}V1) (K2.ⓑ{I}V2)
+                     ) →
+                     ∀L2,L1. TC … (lpx_sn R) L1 L2 → S L1 L2.
+#R #HR #S #IH1 #IH2 #L2 elim L2 -L2
+[ #X #H >(TC_lpx_sn_inv_atom2 … H) -X //
+| #L2 #I #V2 #IHL2 #X #H
+  elim (TC_lpx_sn_inv_pair2 … H) // -H -HR
+  #L1 #V1 #HL12 #HV12 #H destruct /3 width=1 by/
+]
+qed-.
+
+lemma TC_lpx_sn_inv_atom1: ∀R,L2. TC … (lpx_sn R) (⋆) L2 → L2 = ⋆.
+#R #L2 #H elim H -L2
+[ /2 width=2 by lpx_sn_inv_atom1/
+| #L #L2 #_ #HL2 #IHL1 destruct /2 width=2 by lpx_sn_inv_atom1/
+]
+qed-.
+
+fact TC_lpx_sn_inv_pair1_aux: ∀R. s_rs_trans … R (lpx_sn R) →
+                              ∀L1,L2. TC … (lpx_sn R) L1 L2 →
+                              ∀I,K1,V1. L1 = K1.ⓑ{I}V1 →
+                              ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+#R #HR #L1 #L2 #H @(TC_lpx_sn_ind … H) // -HR -L1 -L2
+[ #J #K #W #H destruct
+| #I #L1 #L2 #V1 #V2 #HL12 #HV12 #_ #J #K #W #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma TC_lpx_sn_inv_pair1: ∀R. s_rs_trans … R (lpx_sn R) →
+                           ∀I,K1,L2,V1. TC … (lpx_sn R) (K1.ⓑ{I}V1) L2 →
+                           ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by TC_lpx_sn_inv_pair1_aux/ qed-.
+
+lemma TC_lpx_sn_inv_lpx_sn_LTC: ∀R. s_rs_trans … R (lpx_sn R) →
+                                ∀L1,L2. TC … (lpx_sn R) L1 L2 →
+                                lpx_sn (LTC … R) L1 L2.
+/3 width=4 by TC_lpx_sn_ind, lpx_sn_pair/ qed-.
+
+(* Forward lemmas on transitive closure *************************************)
+
+lemma TC_lpx_sn_fwd_length: ∀R,L1,L2. TC … (lpx_sn R) L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #H elim H -L2
+[ #L2 #HL12 >(lpx_sn_fwd_length … HL12) -HL12 //
+| #L #L2 #_ #HL2 #IHL1
+  >IHL1 -L1 >(lpx_sn_fwd_length … HL2) -HL2 //
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsn_3.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsn_3.etc
new file mode 100644 (file)
index 0000000..d06064a
--- /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 L1 ⦄ ⊢ ➡ break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSn $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsn_5.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsn_5.etc
new file mode 100644 (file)
index 0000000..2065660
--- /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 L1 ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSn $h $g $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstar_3.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstar_3.etc
new file mode 100644 (file)
index 0000000..2bcf326
--- /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 L1 ⦄ ⊢ ➡* break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSnStar $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstar_5.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstar_5.etc
new file mode 100644 (file)
index 0000000..aef4f27
--- /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 L1 ⦄ ⊢ ➡ * break [ term 46 h , break term 46 g ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSnStar $h $g $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstaralt_3.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstaralt_3.etc
new file mode 100644 (file)
index 0000000..45328fb
--- /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 L1 ⦄ ⊢ ➡ ➡ * break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSnStarAlt $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstaralt_5.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lpx_sn/predsnstaralt_5.etc
new file mode 100644 (file)
index 0000000..9682647
--- /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 L1 ⦄ ⊢ ➡ ➡ * break [ term 46 h , break term 46 g ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSnStarAlt $h $g $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn.ma
deleted file mode 100644 (file)
index fddde2d..0000000
+++ /dev/null
@@ -1,89 +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/grammar/lenv_length.ma".
-
-(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
-
-inductive lpx_sn (R:lenv→relation term): relation lenv ≝
-| lpx_sn_atom: lpx_sn R (⋆) (⋆)
-| lpx_sn_pair: ∀I,K1,K2,V1,V2.
-               lpx_sn R K1 K2 → R K1 V1 V2 →
-               lpx_sn R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
-.
-
-(* Basic properties *********************************************************)
-
-lemma lpx_sn_refl: ∀R. (∀L. reflexive ? (R L)) → reflexive … (lpx_sn R).
-#R #HR #L elim L -L /2 width=1 by lpx_sn_atom, lpx_sn_pair/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lpx_sn_inv_atom1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L1 = ⋆ → L2 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_sn_inv_atom1: ∀R,L2. lpx_sn R (⋆) L2 → L2 = ⋆.
-/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
-
-fact lpx_sn_inv_pair1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                           ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
-#R #L1 #L2 * -L1 -L2
-[ #J #K1 #V1 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma lpx_sn_inv_pair1: ∀R,I,K1,V1,L2. lpx_sn R (K1. ⓑ{I} V1) L2 →
-                        ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
-
-fact lpx_sn_inv_atom2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L2 = ⋆ → L1 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_sn_inv_atom2: ∀R,L1. lpx_sn R L1 (⋆) → L1 = ⋆.
-/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
-
-fact lpx_sn_inv_pair2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                           ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
-#R #L1 #L2 * -L1 -L2
-[ #J #K2 #V2 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma lpx_sn_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn R L1 (K2. ⓑ{I} V2) →
-                        ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
-
-lemma lpx_sn_inv_pair: ∀R,I1,I2,L1,L2,V1,V2.
-                       lpx_sn R (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) →
-                       ∧∧ lpx_sn R L1 L2 & R L1 V1 V2 & I1 = I2.
-#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lpx_sn_inv_pair1 … H) -H
-#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpx_sn_fwd_length: ∀R,L1,L2. lpx_sn R L1 L2 → |L1| = |L2|.
-#R #L1 #L2 #H elim H -L1 -L2 normalize //
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn_lpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn_lpx_sn.ma
deleted file mode 100644 (file)
index 69c010a..0000000
+++ /dev/null
@@ -1,48 +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/grammar/lpx_sn.ma".
-
-(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
-
-definition lpx_sn_confluent: relation (lenv→relation term) ≝ λR1,R2.
-                             ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 →
-                             ∀L1. lpx_sn R1 L0 L1 → ∀L2. lpx_sn R2 L0 L2 →
-                             ∃∃T. R2 L1 T1 T & R1 L2 T2 T.
-
-definition lpx_sn_transitive: relation (lenv→relation term) ≝ λR1,R2.
-                              ∀L1,T1,T. R1 L1 T1 T → ∀L2. lpx_sn R1 L1 L2 →
-                              ∀T2. R2 L2 T T2 → R1 L1 T1 T2.
-
-(* Main properties **********************************************************)
-
-theorem lpx_sn_trans: ∀R. lpx_sn_transitive R R → Transitive … (lpx_sn R).
-#R #HR #L1 #L #H elim H -L1 -L //
-#I #L1 #L #V1 #V #HL1 #HV1 #IHL1 #X #H
-elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL2 #HV2 #H destruct /3 width=5/
-qed-.
-
-theorem lpx_sn_conf: ∀R1,R2. lpx_sn_confluent R1 R2 →
-                     confluent2 … (lpx_sn R1) (lpx_sn R2).
-#R1 #R2 #HR12 #L0 @(f_ind … length … L0) -L0 #n #IH *
-[ #_ #X1 #H1 #X2 #H2 -n
-  >(lpx_sn_inv_atom1 … H1) -X1
-  >(lpx_sn_inv_atom1 … H2) -X2 /2 width=3/
-| #L0 #I #V0 #Hn #X1 #H1 #X2 #H2 destruct
-  elim (lpx_sn_inv_pair1 … H1) -H1 #L1 #V1 #HL01 #HV01 #H destruct
-  elim (lpx_sn_inv_pair1 … H2) -H2 #L2 #V2 #HL02 #HV02 #H destruct
-  elim (IH … HL01 … HL02) -IH normalize // #L #HL1 #HL2
-  elim (HR12 … HV01 … HV02 … HL01 … HL02) -L0 -V0 /3 width=5/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn_tc.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lpx_sn_tc.ma
deleted file mode 100644 (file)
index 2919d9d..0000000
+++ /dev/null
@@ -1,119 +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/grammar/lpx_sn.ma".
-
-(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
-
-(* Properties on transitive_closure *****************************************)
-
-lemma TC_lpx_sn_pair_refl: ∀R. (∀L. reflexive … (R L)) →
-                           ∀L1,L2. TC … (lpx_sn R) L1 L2 →
-                           ∀I,V. TC … (lpx_sn R) (L1. ⓑ{I} V) (L2. ⓑ{I} V).
-#R #HR #L1 #L2 #H @(TC_star_ind … L2 H) -L2
-[ /2 width=1 by lpx_sn_refl/
-| /3 width=1 by TC_reflexive, lpx_sn_refl/
-| /3 width=5 by lpx_sn_pair, step/
-]
-qed-.
-
-lemma TC_lpx_sn_pair: ∀R. (∀L. reflexive … (R L)) →
-                      ∀I,L1,L2. TC … (lpx_sn R) L1 L2 →
-                      ∀V1,V2. LTC … R L1 V1 V2 →
-                      TC … (lpx_sn R) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2).
-#R #HR #I #L1 #L2 #HL12 #V1 #V2 #H @(TC_star_ind_dx … V1 H) -V1 //
-[ /2 width=1 by TC_lpx_sn_pair_refl/
-| /4 width=3 by TC_strap, lpx_sn_pair, lpx_sn_refl/
-]
-qed-.
-
-lemma lpx_sn_LTC_TC_lpx_sn: ∀R. (∀L. reflexive … (R L)) →
-                            ∀L1,L2. lpx_sn (LTC … R) L1 L2 →
-                            TC … (lpx_sn R) L1 L2.
-#R #HR #L1 #L2 #H elim H -L1 -L2
-/2 width=1 by TC_lpx_sn_pair, lpx_sn_atom, inj/
-qed-.
-
-(* Inversion lemmas on transitive closure ***********************************)
-
-lemma TC_lpx_sn_inv_atom2: ∀R,L1. TC … (lpx_sn R) L1 (⋆) → L1 = ⋆.
-#R #L1 #H @(TC_ind_dx … L1 H) -L1
-[ /2 width=2 by lpx_sn_inv_atom2/
-| #L1 #L #HL1 #_ #IHL2 destruct /2 width=2 by lpx_sn_inv_atom2/
-]
-qed-.
-
-lemma TC_lpx_sn_inv_pair2: ∀R. s_rs_trans … R (lpx_sn R) →
-                           ∀I,L1,K2,V2. TC  … (lpx_sn R) L1 (K2.ⓑ{I}V2) →
-                           ∃∃K1,V1. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
-#R #HR #I #L1 #K2 #V2 #H @(TC_ind_dx … L1 H) -L1
-[ #L1 #H elim (lpx_sn_inv_pair2 … H) -H /3 width=5 by inj, ex3_2_intro/
-| #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
-  elim (lpx_sn_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct
-  lapply (HR … HV2 … HK1) -HR -HV2 /3 width=5 by TC_strap, ex3_2_intro/
-]
-qed-.
-
-lemma TC_lpx_sn_ind: ∀R. s_rs_trans … R (lpx_sn R) →
-                     ∀S:relation lenv.
-                     S (⋆) (⋆) → (
-                        ∀I,K1,K2,V1,V2.
-                        TC … (lpx_sn R) K1 K2 → LTC … R K1 V1 V2 →
-                        S K1 K2 → S (K1.ⓑ{I}V1) (K2.ⓑ{I}V2)
-                     ) →
-                     ∀L2,L1. TC … (lpx_sn R) L1 L2 → S L1 L2.
-#R #HR #S #IH1 #IH2 #L2 elim L2 -L2
-[ #X #H >(TC_lpx_sn_inv_atom2 … H) -X //
-| #L2 #I #V2 #IHL2 #X #H
-  elim (TC_lpx_sn_inv_pair2 … H) // -H -HR
-  #L1 #V1 #HL12 #HV12 #H destruct /3 width=1 by/
-]
-qed-.
-
-lemma TC_lpx_sn_inv_atom1: ∀R,L2. TC … (lpx_sn R) (⋆) L2 → L2 = ⋆.
-#R #L2 #H elim H -L2
-[ /2 width=2 by lpx_sn_inv_atom1/
-| #L #L2 #_ #HL2 #IHL1 destruct /2 width=2 by lpx_sn_inv_atom1/
-]
-qed-.
-
-fact TC_lpx_sn_inv_pair1_aux: ∀R. s_rs_trans … R (lpx_sn R) →
-                              ∀L1,L2. TC … (lpx_sn R) L1 L2 →
-                              ∀I,K1,V1. L1 = K1.ⓑ{I}V1 →
-                              ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
-#R #HR #L1 #L2 #H @(TC_lpx_sn_ind … H) // -HR -L1 -L2
-[ #J #K #W #H destruct
-| #I #L1 #L2 #V1 #V2 #HL12 #HV12 #_ #J #K #W #H destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma TC_lpx_sn_inv_pair1: ∀R. s_rs_trans … R (lpx_sn R) →
-                           ∀I,K1,L2,V1. TC … (lpx_sn R) (K1.ⓑ{I}V1) L2 →
-                           ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
-/2 width=3 by TC_lpx_sn_inv_pair1_aux/ qed-.
-
-lemma TC_lpx_sn_inv_lpx_sn_LTC: ∀R. s_rs_trans … R (lpx_sn R) →
-                                ∀L1,L2. TC … (lpx_sn R) L1 L2 →
-                                lpx_sn (LTC … R) L1 L2.
-/3 width=4 by TC_lpx_sn_ind, lpx_sn_pair/ qed-.
-
-(* Forward lemmas on transitive closure *************************************)
-
-lemma TC_lpx_sn_fwd_length: ∀R,L1,L2. TC … (lpx_sn R) L1 L2 → |L1| = |L2|.
-#R #L1 #L2 #H elim H -L2
-[ #L2 #HL12 >(lpx_sn_fwd_length … HL12) -HL12 //
-| #L #L2 #_ #HL2 #IHL1
-  >IHL1 -L1 >(lpx_sn_fwd_length … HL2) -HL2 //
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsnstar_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsnstar_5.ma
new file mode 100644 (file)
index 0000000..824933f
--- /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 L1 ⦄ ⊢ ➡* break [ term 46 T , break term 46 d ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'LazyPRedSnStar $G $L1 $L2 $T $d }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsnstar_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsnstar_7.ma
new file mode 100644 (file)
index 0000000..f8209e2
--- /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 L1 ⦄ ⊢ ➡* break [ term 46 h , break term 46 g , break term 46 T , break term 46 d ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'LazyPRedSnStar $G $L1 $L2 $h $g $T $d }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsn_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsn_3.ma
deleted file mode 100644 (file)
index d06064a..0000000
+++ /dev/null
@@ -1,19 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡ break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSn $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsn_5.ma
deleted file mode 100644 (file)
index 2065660..0000000
+++ /dev/null
@@ -1,19 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSn $h $g $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_3.ma
deleted file mode 100644 (file)
index 2bcf326..0000000
+++ /dev/null
@@ -1,19 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡* break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSnStar $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_5.ma
deleted file mode 100644 (file)
index aef4f27..0000000
+++ /dev/null
@@ -1,19 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ * break [ term 46 h , break term 46 g ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSnStar $h $g $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstaralt_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstaralt_3.ma
deleted file mode 100644 (file)
index 45328fb..0000000
+++ /dev/null
@@ -1,19 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡ ➡ * break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSnStarAlt $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstaralt_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstaralt_5.ma
deleted file mode 100644 (file)
index 9682647..0000000
+++ /dev/null
@@ -1,19 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ ➡ * break [ term 46 h , break term 46 g ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSnStarAlt $h $g $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/cpr_llpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/cpr_llpx_sn.ma
new file mode 100644 (file)
index 0000000..ba2210f
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/llpx_sn_ldrop.ma".
+include "basic_2/reduction/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************)
+
+(* Properties on lazy sn pointwise extensions *******************************)
+
+lemma llpx_sn_cpr_conf: ∀R. (∀L. reflexive … (R L)) → l_liftable R → l_deliftable_sn R →
+                        ∀G. s_r_confluent1 … (cpr G) (llpx_sn R 0).
+#R #H1R #H2R #H3R #G #Ls #T1 #T2 #H elim H -G -Ls -T1 -T2
+[ //
+| #G #Ls #Ks #V1s #V2s #W2s #i #HLKs #_ #HVW2s #IHV12s #Ld #H elim (llpx_sn_inv_lref_ge_sn … H … HLKs) // -H
+  #Kd #V1d #HLKd #HV1s #HV1sd
+  lapply (ldrop_fwd_drop2 … HLKs) -HLKs #HLKs
+  lapply (ldrop_fwd_drop2 … HLKd) -HLKd #HLKd
+  @(llpx_sn_lift_le … HLKs HLKd … HVW2s) -HLKs -HLKd -HVW2s /2 width=1 by/ (**) (* full auto too slow *)
+| #a #I #G #Ls #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #Ld #H elim (llpx_sn_inv_bind_O … H) -H
+  /4 width=5 by llpx_sn_bind_repl_SO, llpx_sn_bind/
+| #I #G #Ls #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H
+  /3 width=1 by llpx_sn_flat/
+| #G #Ls #V #T1 #T2 #T #_ #HT2 #IHT12 #Ld #H elim (llpx_sn_inv_bind_O … H) -H
+  /3 width=10 by llpx_sn_inv_lift_le, ldrop_drop/
+| #G #Ls #V #T1 #T2 #_ #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H /2 width=1 by/
+| #a #G #Ls #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H
+  #HV1 #H elim (llpx_sn_inv_bind_O … H) -H
+  /4 width=5 by llpx_sn_bind_repl_SO, llpx_sn_flat, llpx_sn_bind/
+| #a #G #Ls #V1 #V2 #V #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H
+  #HV1 #H elim (llpx_sn_inv_bind_O … H) -H //
+  #HW1 #HT1 @llpx_sn_bind_O /2 width=1 by/ @llpx_sn_flat (**) (* full auto too slow *)
+  [ /3 width=10 by llpx_sn_lift_le, ldrop_drop/
+  | /3 width=4 by llpx_sn_bind_repl_O/
+]
+qed-.
index d2703ad7ce47c837baa5d1beaafb0c41eb28ce5e..77dce463139899fcb0e713e5cd025827ac1d72c7 100644 (file)
@@ -43,8 +43,7 @@ lemma lleq_cpx_trans: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡[h, g] T2 →
 ]
 qed-.
 
-lemma lleq_cpx_conf_sn: ∀h,g,G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 →
-                        ∀L2. L1 ⋕[T1, 0] L2 → L1 ⋕[T2, 0] L2.
+lemma lleq_cpx_conf_sn: ∀h,g,G. s_r_confluent1 … (cpx h g G) (lleq 0).
 /3 width=6 by llpx_sn_cpx_conf, lift_mono, ex2_intro/ qed-.
 
 lemma lleq_cpx_conf_dx: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡[h, g] T2 →
index 38a83a760c01a2cff668ccb143e2d54fe98c31f8..36a97fc620e383aff7406932fd81d70558701a27 100644 (file)
@@ -21,8 +21,7 @@ include "basic_2/reduction/cpx.ma".
 
 (* Note: lemma 1000 *)
 lemma llpx_sn_cpx_conf: ∀R. (∀L. reflexive … (R L)) → l_liftable R → l_deliftable_sn R →
-                        ∀h,g,G,Ls,T1,T2. ⦃G, Ls⦄ ⊢ T1 ➡[h, g] T2 →
-                        ∀Ld. llpx_sn R 0 T1 Ls Ld → llpx_sn R 0 T2 Ls Ld.
+                        ∀h,g,G. s_r_confluent1 … (cpx h g G) (llpx_sn R 0).
 #R #H1R #H2R #H3R #h #g #G #Ls #T1 #T2 #H elim H -G -Ls -T1 -T2
 [ //
 | /3 width=4 by llpx_sn_fwd_length, llpx_sn_sort/
index 94c114260e2e81099a71749ca68262ac181cd74a..7c65dcfa9e6af2319c816ae1896bb2b099e5b015 100644 (file)
 (**************************************************************************)
 
 include "basic_2/notation/relations/btpred_8.ma".
-include "basic_2/relocation/fquq_alt.ma".
-include "basic_2/reduction/lpx.ma".
+include "basic_2/relocation/fquq.ma".
+include "basic_2/reduction/llpx.ma".
 
 (* "BIG TREE" PARALLEL REDUCTION FOR CLOSURES *******************************)
 
 inductive fpb (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝
 | fpb_fquq: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ → fpb h g G1 L1 T1 G2 L2 T2
 | fpb_cpx : ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T2 → fpb h g G1 L1 T1 G1 L1 T2
-| fpb_lpx : ∀L2. ⦃G1, L1⦄ ⊢ ➡[h, g] L2 → fpb h g G1 L1 T1 G1 L2 T1
+| fpb_lpx : ∀L2. ⦃G1, L1⦄ ⊢ ➡[h, g, T1, 0] L2 → fpb h g G1 L1 T1 G1 L2 T1
 .
 
 interpretation
@@ -36,5 +36,5 @@ lemma fpb_refl: ∀h,g. tri_reflexive … (fpb h g).
 lemma cpr_fpb: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L, T1⦄ ≽[h, g] ⦃G, L, T2⦄. 
 /3 width=1 by fpb_cpx, cpr_cpx/ qed.
 
-lemma lpr_fpb: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1, T⦄ ≽[h, g] ⦃G, L2, T⦄.
-/3 width=1 by fpb_lpx, lpr_lpx/ qed.
+lemma lpr_fpb: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡[T, 0] L2 → ⦃G, L1, T⦄ ≽[h, g] ⦃G, L2, T⦄.
+/3 width=1 by fpb_lpx, llpr_llpx/ qed.
index d61a11ae04ba30b8f163e8a3378ca0931c76e5bb..158b6b1d6b984b17379694e26ae3309d4c554157 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "basic_2/static/aaa_fqus.ma".
-include "basic_2/reduction/lpx_aaa.ma".
+include "basic_2/reduction/llpx_aaa.ma".
 include "basic_2/reduction/fpb.ma".
 
 (* "BIG TREE" PARALLEL REDUCTION FOR CLOSURES *******************************)
@@ -23,5 +23,5 @@ include "basic_2/reduction/fpb.ma".
 lemma aaa_fpb_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ →
                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
 #h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
-/3 width=6 by aaa_lpx_conf, aaa_cpx_conf, aaa_fquq_conf, ex_intro/
+/3 width=6 by aaa_llpx_conf, aaa_cpx_conf, aaa_fquq_conf, ex_intro/
 qed-.
index a19534b4ab1a63e047d68372973bf4d83eb9556a..0ca90bae4de665855ddd799a954cc65f633c1ab3 100644 (file)
@@ -12,9 +12,9 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/relocation/llpx_sn_ldrop.ma".
 include "basic_2/relocation/fquq_alt.ma".
 include "basic_2/reduction/cpr_lift.ma".
+include "basic_2/reduction/cpr_llpx_sn.ma".
 include "basic_2/reduction/llpr.ma".
 
 (* LAZY SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ************************)
@@ -47,6 +47,11 @@ lemma llpr_bind_repl_O: ∀I,G,L1,L2,V1,V2,T. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡[T, 0]
                         ∀J,W1,W2. ⦃G, L1⦄ ⊢ ➡[W1, 0] L2 → ⦃G, L1⦄ ⊢ W1 ➡ W2 → ⦃G, L1.ⓑ{J}W1⦄ ⊢ ➡[T, 0] L2.ⓑ{J}W2.
 /2 width=4 by llpx_sn_bind_repl_O/ qed-.
 
+(* Advanced properties ******************************************************)
+
+lemma llpr_cpr_conf: ∀G. s_r_confluent1 … (cpr G) (llpr G 0).
+/3 width=10 by llpx_sn_cpr_conf, cpr_inv_lift1, cpr_lift/ qed-.
+
 (* Properties on context-sensitive parallel reduction for terms *************)
 
 lemma fqu_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
index 925765be846f4aa1f9d801cd06105f54da8b8e3e..4e5b9e2bee717a4d46bd3fc6a1a75d0cd2b4b565 100644 (file)
@@ -300,7 +300,7 @@ lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by ldrop_
 /4 width=7 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *)
 qed-.
 
-theorem cpr_conf_llpr: ∀G. llpx_sn_confluent (cpr G) (cpr G).
+theorem cpr_conf_llpr: ∀G. llpx_sn_confluent2 (cpr G) (cpr G).
 #G #L0 #T0 @(fqup_wf_ind_eq … G L0 T0) -G -L0 -T0 #G #L #T #IH #G0 #L0 * [| * ]
 [ #I0 #HG #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
   elim (cpr_inv_atom1 … H1) -H1
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_aaa.ma
new file mode 100644 (file)
index 0000000..7c09491
--- /dev/null
@@ -0,0 +1,81 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/aaa_lift.ma".
+include "basic_2/static/lsuba_aaa.ma".
+include "basic_2/reduction/llpx_ldrop.ma".
+
+(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+(* Note: lemma 500 *)
+lemma aaa_cpx_llpx_conf: ∀h,g,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A →
+                         ∀T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 →
+                         ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g, T1, 0] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
+#h #g #G #L1 #T1 #A #H elim H -G -L1 -T1 -A
+[ #g #L1 #k #X #H elim (cpx_inv_sort1 … H) -H // * //
+| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12
+  elim (cpx_inv_lref1 … H) -H
+  [ #H destruct
+    elim (llpx_inv_lref_ge_sn … HL12 … HLK1) -L1 /3 width=6 by aaa_lref/
+  | * #J #Y #Z #V2 #H #HV12 #HV2
+    lapply (ldrop_mono … H … HLK1) -H #H destruct
+    elim (llpx_inv_lref_ge_sn … HL12 … HLK1) -L1 /3 width=8 by aaa_lift, ldrop_fwd_drop2/
+  ]
+| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (llpx_inv_bind_O … HL12) -HL12 #HV1 #HT1
+  elim (cpx_inv_abbr1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=4 by llpx_bind_repl_O, aaa_abbr/
+  | #T2 #HT12 #HT2 #H destruct -IHV1 /3 width=8 by aaa_inv_lift, ldrop_drop/
+  ]
+| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (llpx_inv_bind_O … HL12) -HL12 #HV1 #HT1
+  elim (cpx_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  /4 width=4 by llpx_bind_repl_O, aaa_abst/
+| #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (llpx_inv_flat … HL12) -HL12 #HV1 #HT1
+  elim (cpx_inv_appl1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct /3 width=3 by aaa_appl/
+  | #b #V2 #W1 #W2 #U1 #U2 #HV12 #HW12 #HU12 #H1 #H2 destruct
+    lapply (IHV1 … HV12 … HV1) -IHV1 -HV12 #HV2
+    lapply (IHT1 (ⓛ{b}W2.U2) … HT1) -IHT1 /2 width=1 by cpx_bind/ -L1 #H
+    elim (aaa_inv_abst … H) -H #B0 #A0 #HW1 #HU2 #H destruct
+    /5 width=6 by lsuba_aaa_trans, lsuba_abbr, aaa_abbr, aaa_cast/
+  | #b #V #V2 #W1 #W2 #U1 #U2 #HV1 #HV2 #HW12 #HU12 #H1 #H2 destruct
+    lapply (aaa_lift G L2 … B … (L2.ⓓW2) … HV2) -HV2 /2 width=2 by ldrop_drop/ #HV2
+    lapply (IHT1 (ⓓ{b}W2.U2) … HT1) -IHT1 /2 width=1 by cpx_bind/ -L1 #H
+    elim (aaa_inv_abbr … H) -H /3 width=3 by aaa_abbr, aaa_appl/
+  ]
+| #G #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+  elim (llpx_inv_flat … HL12) -HL12 #HV1 #HT1
+  elim (cpx_inv_cast1 … H) -H
+  [ * #V2 #T2 #HV12 #HT12 #H destruct /3 width=1 by aaa_cast/
+  | -IHV1 /2 width=1 by/
+  | -IHT1 /2 width=1 by/
+  ]
+]
+qed-.
+
+lemma aaa_cpx_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A.
+/2 width=7 by aaa_cpx_llpx_conf/ qed-.
+
+lemma aaa_llpx_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g, T, 0] L2 → ⦃G, L2⦄ ⊢ T ⁝ A.
+/2 width=7 by aaa_cpx_llpx_conf/ qed-.
+
+lemma aaa_cpr_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T2 ⁝ A.
+/3 width=5 by aaa_cpx_conf, cpr_cpx/ qed-.
+
+lemma aaa_llpr_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡[T, 0] L2 → ⦃G, L2⦄ ⊢ T ⁝ A.
+/3 width=5 by aaa_llpx_conf, llpr_llpx/ qed-.
index 9b7d295d313c14c969545defa2728c1769e2037a..0b9d88b9983c9ea58f1fb5b20217d429ae384d19 100644 (file)
@@ -54,8 +54,7 @@ lemma llpx_fwd_bind_O_dx: ∀h,g,a,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ➡[h, g, ⓑ{
 
 (* Advanced properties ******************************************************)
 
-lemma llpx_cpx_conf: ∀h,g,G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 →
-                     ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g, T1, 0] L2 → ⦃G, L1⦄ ⊢ ➡[h, g, T2, 0] L2.
+lemma llpx_cpx_conf: ∀h,g,G. s_r_confluent1 … (cpx h g G) (llpx h g G 0).
 /3 width=10 by llpx_sn_cpx_conf, cpx_inv_lift1, cpx_lift/ qed-.
 
 (* Inversion lemmas on relocation *******************************************)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/llpx_lleq.ma
new file mode 100644 (file)
index 0000000..bc8619d
--- /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/reduction/cpx_lleq.ma".
+include "basic_2/reduction/llpx.ma".
+
+(* LAZY SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ***************)
+
+(* Properties on lazy equivalence for local environments ********************)
+
+lemma lleq_llpx_trans: ∀h,g,G,L1,L2,T,d. L1 ⋕[T, d] L2 →
+                       ∀L.⦃G, L2⦄ ⊢ ➡[h, g, T, d] L → ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L.
+/3 width=3 by lleq_cpx_trans, lleq_llpx_sn_trans/ qed-.
+
+lemma lleq_llpx_conf: ∀h,g,G,L1,L2,T,d. L1 ⋕[T, d] L2 →
+                      ∀L.⦃G, L1⦄ ⊢ ➡[h, g, T, d] L → ⦃G, L2⦄ ⊢ ➡[h, g, T, d] L.
+/3 width=3 by lleq_cpx_trans, lleq_llpx_sn_conf/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpr.ma
deleted file mode 100644 (file)
index 7636e38..0000000
+++ /dev/null
@@ -1,61 +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/notation/relations/predsn_3.ma".
-include "basic_2/grammar/lpx_sn.ma".
-include "basic_2/reduction/cpr.ma".
-
-(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
-
-definition lpr: relation3 genv lenv lenv ≝ λG. lpx_sn (cpr G).
-
-interpretation "parallel reduction (local environment, sn variant)"
-   'PRedSn G L1 L2 = (lpr G L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Basic_1: includes: wcpr0_gen_sort *)
-lemma lpr_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡ L2 → L2 = ⋆.
-/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
-
-(* Basic_1: includes: wcpr0_gen_head *)
-lemma lpr_inv_pair1: ∀I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ L2 →
-                     ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L2 = K2.ⓑ{I}V2.
-/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
-
-lemma lpr_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡ ⋆ → L1 = ⋆.
-/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
-
-lemma lpr_inv_pair2: ∀I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡ K2.ⓑ{I}V2 →
-                     ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
-
-(* Basic properties *********************************************************)
-
-(* Note: lemma 250 *)
-lemma lpr_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡ L.
-/2 width=1 by lpx_sn_refl/ qed.
-
-lemma lpr_pair: ∀I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡ K2 → ⦃G, K1⦄ ⊢ V1 ➡ V2 →
-                ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ K2.ⓑ{I}V2.
-/2 width=1/ qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpr_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → |L1| = |L2|.
-/2 width=2 by lpx_sn_fwd_length/ qed-.
-
-(* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back
-                                pr0_subst1_back
-*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_ldrop.ma
deleted file mode 100644 (file)
index 4156df6..0000000
+++ /dev/null
@@ -1,96 +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/relocation/fquq_alt.ma".
-include "basic_2/relocation/ldrop_lpx_sn.ma".
-include "basic_2/reduction/cpr_lift.ma".
-include "basic_2/reduction/lpr.ma".
-
-(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
-
-(* Properies on local environment slicing ***********************************)
-
-(* Basic_1: includes: wcpr0_drop *)
-lemma lpr_ldrop_conf: ∀G. dropable_sn (lpr G).
-/3 width=6 by lpx_sn_deliftable_dropable, cpr_inv_lift1/ qed-.
-
-(* Basic_1: includes: wcpr0_drop_back *)
-lemma ldrop_lpr_trans: ∀G. dedropable_sn (lpr G).
-/3 width=10 by lpx_sn_liftable_dedropable, cpr_lift/ qed-.
-
-lemma lpr_ldrop_trans_O1: ∀G. dropable_dx (lpr G).
-/2 width=3 by lpx_sn_dropable/ qed-.
-
-(* Properties on context-sensitive parallel reduction for terms *************)
-
-lemma fqu_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
-                        ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
-                        ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃ ⦃G2, L2, U2⦄.
-#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/
-#G #L #K #U #T #e #HLK #HUT #U2 #HU2
-elim (lift_total U2 0 (e+1)) #T2 #HUT2
-lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/
-qed-.
-
-lemma fquq_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
-                         ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
-                         ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄.
-#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H
-[ #HT12 elim (fqu_cpr_trans_dx … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma fqu_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
-                        ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
-                        ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃ ⦃G2, L2, U2⦄.
-#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/
-#G #L #K #U #T #e #HLK #HUT #U2 #HU2
-elim (lift_total U2 0 (e+1)) #T2 #HUT2
-lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/
-qed-.
-
-lemma fquq_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
-                         ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 →
-                         ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄.
-#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H
-[ #HT12 elim (fqu_cpr_trans_sn … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma fqu_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
-                     ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 →
-                     ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊃ ⦃G2, K2, T2⦄.
-#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpr_pair, ex3_2_intro/
-[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpr_inv_pair1 … H) -H
-  #K2 #W2 #HLK2 #HVW2 #H destruct
-  /3 width=5 by fqu_fquq, cpr_pair_sn, fqu_bind_dx, ex3_2_intro/
-| #G #L1 #K1 #T1 #U1 #e #HLK1 #HTU1 #K2 #HK12
-  elim (ldrop_lpr_trans … HLK1 … HK12) -HK12
-  /3 width=7 by fqu_drop, ex3_2_intro/
-]
-qed-.
-
-lemma fquq_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
-                      ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 →
-                      ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊃⸮ ⦃G2, K2, T2⦄.
-#G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H
-[ #HT12 elim (fqu_lpr_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_lpr.ma
deleted file mode 100644 (file)
index deaeff9..0000000
+++ /dev/null
@@ -1,357 +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/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/substitution/fqup.ma".
-include "basic_2/reduction/lpr_ldrop.ma".
-
-(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
-
-(* Main properties on context-sensitive parallel reduction for terms ********)
-
-fact cpr_conf_lpr_atom_atom:
-   ∀I,G,L1,L2. ∃∃T. ⦃G, L1⦄ ⊢ ⓪{I} ➡ T & ⦃G, L2⦄ ⊢ ⓪{I} ➡ T.
-/2 width=3 by cpr_atom, ex2_intro/ qed-.
-
-fact cpr_conf_lpr_atom_delta:
-   ∀G,L0,i. (
-      ∀L,T. ⦃G, L0, #i⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀K0,V0. ⇩[i] L0 ≡ K0.ⓓV0 →
-   ∀V2. ⦃G, K0⦄ ⊢ V0 ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ #i ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
-#G #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_drop2 … HLK2) -W2 #HLK2
-lapply (fqup_lref … G … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1))
-/3 width=12 by cpr_lift, cpr_delta, ex2_intro/
-qed-.
-
-(* Basic_1: includes: pr0_delta_delta pr2_delta_delta *)
-fact cpr_conf_lpr_delta_delta:
-   ∀G,L0,i. (
-      ∀L,T. ⦃G, L0, #i⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀K0,V0. ⇩[i] L0 ≡ K0.ⓓV0 →
-   ∀V1. ⦃G, K0⦄ ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
-   ∀KX,VX. ⇩[i] L0 ≡ KX.ⓓVX →
-   ∀V2. ⦃G, KX⦄ ⊢ VX ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
-#G #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_drop2 … HLK1) -W1 #HLK1
-elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_drop2 … HLK2) -W2 #HLK2
-lapply (fqup_lref … G … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) /3 width=12 by cpr_lift, ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_bind_bind:
-   ∀a,I,G,L0,V0,T0. (
-      ∀L,T. ⦃G, L0, ⓑ{a,I}V0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T1 →
-   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓑ{a,I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓑ{a,I}V2.T2 ➡ T.
-#a #I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH
-/3 width=5 by lpr_pair, cpr_bind, ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_bind_zeta:
-   ∀G,L0,V0,T0. (
-      ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 →
-   ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ +ⓓV1.T1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T.
-#G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -V0 -T0 #T #HT1 #HT2
-elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /3 width=3 by cpr_zeta, ldrop_drop, ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_zeta_zeta:
-   ∀G,L0,V0,T0. (
-      ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
-   ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ X1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T.
-#G #L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
-#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -T0 #T #HT1 #HT2
-elim (cpr_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=2 by ldrop_drop/ #T1 #HT1 #HXT1
-elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=2 by ldrop_drop/ #T2 #HT2 #HXT2
-lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3 by ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_flat_flat:
-   ∀I,G,L0,V0,T0. (
-      ∀L,T. ⦃G, L0, ⓕ{I}V0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 →
-   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓕ{I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓕ{I}V2.T2 ➡ T.
-#I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 … HL01 … HL02) /3 width=5 by cpr_flat, ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_flat_tau:
-   ∀G,L0,V0,T0. (
-      ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓝV1.T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
-#G #L0 #V0 #T0 #IH #V1 #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3 by cpr_tau, ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_tau_tau:
-   ∀G,L0,V0,T0. (
-      ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
-#G #L0 #V0 #T0 #IH #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3 by ex2_intro/
-qed-.
-
-fact cpr_conf_lpr_flat_beta:
-   ∀a,G,L0,V0,W0,T0. (
-      ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓛ{a}W0.T0 ➡ T1 →
-   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T.
-#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
-#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (cpr_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
-elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ #W #HW1 #HW2
-elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_abst/ (**) (* full auto not tried *)
-/4 width=5 by cpr_bind, cpr_flat, cpr_beta, ex2_intro/
-qed-.
-
-(* Basic-1: includes:
-            pr0_cong_upsilon_refl pr0_cong_upsilon_zeta
-            pr0_cong_upsilon_cong pr0_cong_upsilon_delta
-*)
-fact cpr_conf_lpr_flat_theta:
-   ∀a,G,L0,V0,W0,T0. (
-      ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓓ{a}W0.T0 ➡ T1 →
-   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
-   ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
-#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
-#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
-elim (lift_total V 0 1) #U #HVU
-lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by ldrop_drop/ #HU2
-elim (cpr_inv_abbr1 … H) -H *
-[ #W1 #T1 #HW01 #HT01 #H destruct
-  elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/
-  elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0
-  /4 width=7 by cpr_bind, cpr_flat, cpr_theta, ex2_intro/
-| #T1 #HT01 #HXT1 #H destruct
-  elim (IH … HT01 … HT02 (L1.ⓓW2) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-  elim (cpr_inv_lift1 … HT1 L1 … HXT1) -HXT1
-  /4 width=9 by cpr_flat, cpr_zeta, ldrop_drop, lift_flat, ex2_intro/
-]
-qed-.
-
-fact cpr_conf_lpr_beta_beta:
-   ∀a,G,L0,V0,W0,T0. (
-      ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T1 →
-   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}ⓝW1.V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T.
-#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #W1 #HW01 #T1 #HT01
-#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
-elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/ #W #HW1 #HW2
-elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-lapply (lsubr_cpr_trans … HT1 (L1.ⓓⓝW1.V1) ?) -HT1 /2 width=1 by lsubr_abst/
-lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_abst/
-/4 width=5 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *)
-qed-.
-
-(* Basic_1: was: pr0_upsilon_upsilon *)
-fact cpr_conf_lpr_theta_theta:
-   ∀a,G,L0,V0,W0,T0. (
-      ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊃+ ⦃G, L, T⦄ →
-      ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
-      ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
-      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
-   ) →
-   ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
-   ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T1 →
-   ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
-   ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 →
-   ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
-   ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
-#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
-#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
-elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/
-elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0
-elim (lift_total V 0 1) #U #HVU
-lapply (cpr_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=2 by ldrop_drop/
-lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by ldrop_drop/
-/4 width=7 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *)
-qed-.
-
-theorem cpr_conf_lpr: ∀G. lpx_sn_confluent (cpr G) (cpr G).
-#G #L0 #T0 @(fqup_wf_ind_eq … G L0 T0) -G -L0 -T0 #G #L #T #IH #G0 #L0 * [| * ]
-[ #I0 #HG #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
-  elim (cpr_inv_atom1 … H1) -H1
-  elim (cpr_inv_atom1 … H2) -H2
-  [ #H2 #H1 destruct
-    /2 width=1 by cpr_conf_lpr_atom_atom/
-  | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
-    /3 width=10 by cpr_conf_lpr_atom_delta/
-  | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
-    /4 width=10 by ex2_commute, cpr_conf_lpr_atom_delta/
-  | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
-    * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
-    /3 width=17 by cpr_conf_lpr_delta_delta/
-  ]
-| #a #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
-  elim (cpr_inv_bind1 … H1) -H1 *
-  [ #V1 #T1 #HV01 #HT01 #H1
-  | #T1 #HT01 #HXT1 #H11 #H12
-  ]
-  elim (cpr_inv_bind1 … H2) -H2 *
-  [1,3: #V2 #T2 #HV02 #HT02 #H2
-  |2,4: #T2 #HT02 #HXT2 #H21 #H22
-  ] destruct
-  [ /3 width=10 by cpr_conf_lpr_bind_bind/
-  | /4 width=11 by ex2_commute, cpr_conf_lpr_bind_zeta/
-  | /3 width=11 by cpr_conf_lpr_bind_zeta/
-  | /3 width=12 by cpr_conf_lpr_zeta_zeta/
-  ]
-| #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
-  elim (cpr_inv_flat1 … H1) -H1 *
-  [ #V1 #T1 #HV01 #HT01 #H1
-  | #HX1 #H1
-  | #a1 #V1 #Y1 #W1 #Z1 #T1 #HV01 #HYW1 #HZT1 #H11 #H12 #H13
-  | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
-  ]
-  elim (cpr_inv_flat1 … H2) -H2 *
-  [1,5,9,13: #V2 #T2 #HV02 #HT02 #H2
-  |2,6,10,14: #HX2 #H2
-  |3,7,11,15: #a2 #V2 #Y2 #W2 #Z2 #T2 #HV02 #HYW2 #HZT2 #H21 #H22 #H23
-  |4,8,12,16: #a2 #V2 #U2 #Y2 #W2 #Z2 #T2 #HV02 #HVU2 #HYW2 #HZT2 #H21 #H22 #H23
-  ] destruct
-  [ /3 width=10 by cpr_conf_lpr_flat_flat/
-  | /4 width=8 by ex2_commute, cpr_conf_lpr_flat_tau/
-  | /4 width=12 by ex2_commute, cpr_conf_lpr_flat_beta/
-  | /4 width=14 by ex2_commute, cpr_conf_lpr_flat_theta/
-  | /3 width=8 by cpr_conf_lpr_flat_tau/
-  | /3 width=7 by cpr_conf_lpr_tau_tau/
-  | /3 width=12 by cpr_conf_lpr_flat_beta/
-  | /3 width=13 by cpr_conf_lpr_beta_beta/
-  | /3 width=14 by cpr_conf_lpr_flat_theta/
-  | /3 width=17 by cpr_conf_lpr_theta_theta/
-  ]
-]
-qed-.
-
-(* Basic_1: includes: pr0_confluence pr2_confluence *)
-theorem cpr_conf: ∀G,L. confluent … (cpr G L).
-/2 width=6 by cpr_conf_lpr/ qed-.
-
-(* Properties on context-sensitive parallel reduction for terms *************)
-
-lemma lpr_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 →
-                       ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L1⦄ ⊢ T1 ➡ T.
-#G #L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) // -L0 /2 width=3 by ex2_intro/
-qed-.
-
-lemma lpr_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 →
-                       ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L0⦄ ⊢ T1 ➡ T.
-#G #L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3 by ex2_intro/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem lpr_conf: ∀G. confluent … (lpr G).
-/3 width=6 by lpx_sn_conf, cpr_conf_lpr/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx.ma
deleted file mode 100644 (file)
index b10b13a..0000000
+++ /dev/null
@@ -1,65 +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/notation/relations/predsn_5.ma".
-include "basic_2/reduction/lpr.ma".
-include "basic_2/reduction/cpx.ma".
-
-(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
-
-definition lpx: ∀h. sd h → relation3 genv lenv lenv ≝
-                λh,g,G. lpx_sn (cpx h g G).
-
-interpretation "extended parallel reduction (local environment, sn variant)"
-   'PRedSn h g G L1 L2 = (lpx h g G L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma lpx_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡[h, g] L2 → L2 = ⋆.
-/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
-
-lemma lpx_inv_pair1: ∀h,g,I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] L2 →
-                     ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 &
-                              L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
-
-lemma lpx_inv_atom2: ∀h,g,G,L1.  ⦃G, L1⦄ ⊢ ➡[h, g] ⋆ → L1 = ⋆.
-/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
-
-lemma lpx_inv_pair2: ∀h,g,I,G,L1,K2,V2.  ⦃G, L1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2 →
-                     ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 &
-                             L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
-
-lemma lpx_inv_pair: ∀h,g,I1,I2,G,L1,L2,V1,V2.  ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ➡[h, g] L2.ⓑ{I2}V2 →
-                    ∧∧ ⦃G, L1⦄ ⊢ ➡[h, g] L2 & ⦃G, L1⦄ ⊢ V1 ➡[h, g] V2 & I1 = I2.
-/2 width=1 by lpx_sn_inv_pair/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lpx_refl: ∀h,g,G,L.  ⦃G, L⦄ ⊢ ➡[h, g] L.
-/2 width=1 by lpx_sn_refl/ qed.
-
-lemma lpx_pair: ∀h,g,I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 →
-                ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2.
-/2 width=1 by lpx_sn_pair/ qed.
-
-lemma lpr_lpx: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡[h, g] L2.
-#h #g #G #L1 #L2 #H elim H -L1 -L2 /3 width=1 by lpx_pair, cpr_cpx/
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpx_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → |L1| = |L2|.
-/2 width=2 by lpx_sn_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_aaa.ma
deleted file mode 100644 (file)
index f9c2374..0000000
+++ /dev/null
@@ -1,83 +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/aaa_lift.ma".
-include "basic_2/static/lsuba_aaa.ma".
-include "basic_2/reduction/lpx_ldrop.ma".
-
-(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
-
-(* Properties on atomic arity assignment for terms **************************)
-
-(* Note: lemma 500 *)
-lemma aaa_cpx_lpx_conf: ∀h,g,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A →
-                        ∀T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 →
-                        ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
-#h #g #G #L1 #T1 #A #H elim H -G -L1 -T1 -A
-[ #g #L1 #k #X #H
-  elim (cpx_inv_sort1 … H) -H // * //
-| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12
-  elim (cpx_inv_lref1 … H) -H
-  [ #H destruct
-    elim (lpx_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
-    elim (lpx_inv_pair1 … H) -H
-    #K2 #V2 #HK12 #HV12 #H destruct /3 width=6 by aaa_lref/
-  | * #J #Y #Z #V2 #H #HV12 #HV2
-    lapply (ldrop_mono … H … HLK1) -H #H destruct
-    elim (lpx_ldrop_conf … HLK1 … HL12) -L1 #Z #H #HLK2
-    elim (lpx_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
-    /3 width=8 by aaa_lift, ldrop_fwd_drop2/
-  ]
-| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
-  elim (cpx_inv_abbr1 … H) -H *
-  [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=2 by lpx_pair, aaa_abbr/
-  | #T2 #HT12 #HT2 #H destruct -IHV1
-    /4 width=8 by lpx_pair, aaa_inv_lift, ldrop_drop/
-  ]
-| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
-  elim (cpx_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  /4 width=1 by lpx_pair, aaa_abst/
-| #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
-  elim (cpx_inv_appl1 … H) -H *
-  [ #V2 #T2 #HV12 #HT12 #H destruct /3 width=3 by aaa_appl/
-  | #b #V2 #W1 #W2 #U1 #U2 #HV12 #HW12 #HU12 #H1 #H2 destruct
-    lapply (IHV1 … HV12 … HL12) -IHV1 -HV12 #HV2
-    lapply (IHT1 (ⓛ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H
-    elim (aaa_inv_abst … H) -H #B0 #A0 #HW1 #HU2 #H destruct
-    /5 width=6 by lsuba_aaa_trans, lsuba_abbr, aaa_abbr, aaa_cast/
-  | #b #V #V2 #W1 #W2 #U1 #U2 #HV1 #HV2 #HW12 #HU12 #H1 #H2 destruct
-    lapply (aaa_lift G L2 … B … (L2.ⓓW2) … HV2) -HV2 /2 width=2 by ldrop_drop/ #HV2
-    lapply (IHT1 (ⓓ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H
-    elim (aaa_inv_abbr … H) -H /3 width=3 by aaa_abbr, aaa_appl/
-  ]
-| #G #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
-  elim (cpx_inv_cast1 … H) -H
-  [ * #V2 #T2 #HV12 #HT12 #H destruct /3 width=1 by aaa_cast/
-  | -IHV1 /2 width=1 by/
-  | -IHT1 /2 width=1 by/
-  ]
-]
-qed-.
-
-lemma aaa_cpx_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A.
-/2 width=7 by aaa_cpx_lpx_conf/ qed-.
-
-lemma aaa_lpx_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A.
-/2 width=7 by aaa_cpx_lpx_conf/ qed-.
-
-lemma aaa_cpr_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T2 ⁝ A.
-/3 width=5 by aaa_cpx_conf, cpr_cpx/ qed-.
-
-lemma aaa_lpr_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T ⁝ A.
-/3 width=5 by aaa_lpx_conf, lpr_lpx/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_ldrop.ma
deleted file mode 100644 (file)
index 188e8d1..0000000
+++ /dev/null
@@ -1,78 +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/relocation/ldrop_lpx_sn.ma".
-include "basic_2/reduction/cpx_lift.ma".
-include "basic_2/reduction/lpx.ma".
-
-(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
-
-(* Properies on local environment slicing ***********************************)
-
-lemma lpx_ldrop_conf: ∀h,g,G. dropable_sn (lpx h g G).
-/3 width=6 by lpx_sn_deliftable_dropable, cpx_inv_lift1/ qed-.
-
-lemma ldrop_lpx_trans: ∀h,g,G. dedropable_sn (lpx h g G).
-/3 width=10 by lpx_sn_liftable_dedropable, cpx_lift/ qed-.
-
-lemma lpx_ldrop_trans_O1: ∀h,g,G. dropable_dx (lpx h g G).
-/2 width=3 by lpx_sn_dropable/ qed-.
-
-(* Properties on supclosure *************************************************)
-
-lemma fqu_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
-                     ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 →
-                     ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃ ⦃G2, K2, T2⦄.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpx_pair, ex3_2_intro/
-[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpx_inv_pair1 … H) -H
-  #K2 #W2 #HLK2 #HVW2 #H destruct
-  /3 width=5 by fqu_fquq, cpx_pair_sn, fqu_bind_dx, ex3_2_intro/
-| #G #L1 #K1 #T1 #U1 #e #HLK1 #HTU1 #K2 #HK12
-  elim (ldrop_lpx_trans … HLK1 … HK12) -HK12
-  /3 width=7 by fqu_drop, ex3_2_intro/
-]
-qed-.
-
-lemma fquq_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
-                      ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 →
-                      ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃⸮ ⦃G2, K2, T2⦄.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H
-[ #HT12 elim (fqu_lpx_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma lpx_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
-                     ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 →
-                     ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-/3 width=7 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpx_pair, ex3_2_intro/
-[ #I #G1 #L1 #V1 #X #H elim (lpx_inv_pair2 … H) -H
-  #K1 #W1 #HKL1 #HWV1 #H destruct elim (lift_total V1 0 1)
-  /4 width=7 by cpx_delta, fqu_drop, ldrop_drop, ex3_2_intro/
-| #G #L1 #K1 #T1 #U1 #e #HLK1 #HTU1 #L0 #HL01
-  elim (lpx_ldrop_trans_O1 … HL01 … HLK1) -L1
-  /3 width=5 by fqu_drop, ex3_2_intro/
-]
-qed-.
-
-lemma lpx_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
-                      ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 →
-                      ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊃⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fquq_inv_gen … H) -H
-[ #HT12 elim (lpx_fqu_trans … HT12 … HKL1) /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_lleq.ma
deleted file mode 100644 (file)
index 353f810..0000000
+++ /dev/null
@@ -1,108 +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/relocation/lleq_ldrop.ma".
-include "basic_2/reduction/lpx_ldrop.ma".
-
-(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
-
-(* Properties on lazy equivalence for local environments ********************)
-(*
-lamma pippo: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡[h, g] K2 → ∀L1. |L1| = |L2| →
-             ∃∃K1. ⦃G, L1⦄ ⊢ ➡[h, g] K1 & |K1| = |K2| &
-                   (∀T,d. L1 ⋕[T, d] L2 ↔ K1 ⋕[T, d] K2).
-#h #g #G #L2 #K2 #H elim H -L2 -K2
-[ #L1 #H >(length_inv_zero_dx … H) -L1 /3 width=5 by ex3_intro, conj/
-| #I2 #L2 #K2 #V2 #W2 #_ #HVW2 #IHLK2 #Y #H
-  elim (length_inv_pos_dx … H) -H #I #L1 #V1 #HL12 #H destruct
-  elim (IHLK2 … HL12) -IHLK2 #K1 #HLK1 #HK12 #IH
-  elim (eq_term_dec V1 V2) #H destruct
-  [ @(ex3_intro … (K1.ⓑ{I}W2)) normalize /2 width=1 by /
-*)
-axiom lleq_lpx_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡[h, g] K2 →
-                      ∀L1,T,d. L1 ⋕[T, d] L2 →
-                      ∃∃K1. ⦃G, L1⦄ ⊢ ➡[h, g] K1 & K1 ⋕[T, d] K2.
-(*
-#h #g #G #L2 #K2 #H elim H -L2 -K2
-[ #L1 #T #d #H lapply (lleq_fwd_length … H) -H
-  #H >(length_inv_zero_dx … H) -L1 /2 width=3 by ex2_intro/
-| #I2 #L2 #K2 #V2 #W2 #HLK2 #HVW2 #IHLK2 #Y #T #d #HT
-  lapply (lleq_fwd_length … HT) #H
-  elim (length_inv_pos_dx … H) -H #I1 #L1 #V1 #HL12 #H destruct
-  elim (eq_term_dec V1 V2) #H destruct
-  [ @ex2_intro …
-*)
-
-lemma lpx_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
-                          ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
-                          ∃∃K2. ⦃G1, K1, T1⦄ ⊃ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-[ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpx_inv_pair2 … H1) -H1
-  #K0 #V0 #H1KL1 #_ #H destruct
-  elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 //
-  #K1 #H #H2KL1 lapply (ldrop_inv_O2 … H) -H #H destruct
-  /2 width=4 by fqu_lref_O, ex3_intro/
-| * [ #a ] #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H
-  [ elim (lleq_inv_bind … H)
-  | elim (lleq_inv_flat … H)
-  ] -H /2 width=4 by fqu_pair_sn, ex3_intro/
-| #a #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_bind_O … H) -H
-  /3 width=4 by lpx_pair, fqu_bind_dx, ex3_intro/
-| #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H
-  /2 width=4 by fqu_flat_dx, ex3_intro/
-| #G1 #L1 #L #T1 #U1 #e #HL1 #HTU1 #K1 #H1KL1 #H2KL1
-  elim (ldrop_O1_le (e+1) K1)
-  [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 //
-    #H2KL elim (lpx_ldrop_trans_O1 … H1KL1 … HL1) -L1
-    #K0 #HK10 #H1KL lapply (ldrop_mono … HK10 … HK1) -HK10 #H destruct
-    /3 width=4 by fqu_drop, ex3_intro/
-  | lapply (ldrop_fwd_length_le2 … HL1) -L -T1 -g
-    lapply (lleq_fwd_length … H2KL1) //
-  ]
-]
-qed-.
-
-lemma lpx_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
-                           ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
-                           ∃∃K2. ⦃G1, K1, T1⦄ ⊃⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1
-elim (fquq_inv_gen … H) -H
-[ #H elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1
-  /3 width=4 by fqu_fquq, ex3_intro/
-| * #HG #HL #HT destruct /2 width=4 by ex3_intro/
-]
-qed-.
-
-lemma lpx_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃+ ⦃G2, L2, T2⦄ →
-                           ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
-                           ∃∃K2. ⦃G1, K1, T1⦄ ⊃+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
-[ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1
-  /3 width=4 by fqu_fqup, ex3_intro/
-| #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1
-  #K #HT1 #H1KL #H2KL elim (lpx_lleq_fqu_trans … HT2 … H1KL H2KL) -L
-  /3 width=5 by fqup_strap1, ex3_intro/
-]
-qed-.
-
-lemma lpx_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃* ⦃G2, L2, T2⦄ →
-                           ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ⋕[T1, 0] L1 →
-                           ∃∃K2. ⦃G1, K1, T1⦄ ⊃* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ⋕[T2, 0] L2.
-#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1
-elim (fqus_inv_gen … H) -H
-[ #H elim (lpx_lleq_fqup_trans … H … H1KL1 H2KL1) -L1
-  /3 width=4 by fqup_fqus, ex3_intro/
-| * #HG #HL #HT destruct /2 width=4 by ex3_intro/
-]
-qed-.
index cdca16bb53752e580a76306d00cb711455167075..91b20e72029387b813b2bd7d4c04553def7c5d5a 100644 (file)
@@ -59,6 +59,17 @@ elim (leq_ldrop_trans_be … (leq_sym … HL12) … HLK1) // -L1 -Hdi -Hide
 /3 width=3 by leq_sym, ex2_intro/
 qed-.
 
+lemma ldrop_O1_ex: ∀K2,i,L1. |L1| = |K2| + i →
+                   ∃∃L2. L1 ≃[0, i] L2 & ⇩[i] L2 ≡ K2.
+#K2 #i @(nat_ind_plus … i) -i
+[ /3 width=3 by leq_O2, ex2_intro/
+| #i #IHi #Y #Hi elim (ldrop_O1_lt Y 0) //
+  #I #L1 #V #H lapply (ldrop_inv_O2 … H) -H #H destruct
+  normalize in Hi; elim (IHi L1) -IHi
+  /3 width=5 by ldrop_drop, leq_pair, injective_plus_l, ex2_intro/
+]
+qed-.
+
 lemma dedropable_sn_TC: ∀R. dedropable_sn R → dedropable_sn (TC … R).
 #R #HR #L1 #K1 #s #d #e #HLK1 #K2 #H elim H -K2
 [ #K2 #HK12 elim (HR … HLK1 … HK12) -HR -K1
@@ -70,7 +81,7 @@ qed-.
 
 (* Inversion lemmas on equivalence ******************************************)
 
-lemma ldrop_O_inj: ∀i,L1,L2,K. ⇩[i] L1 ≡ K → ⇩[i] L2 ≡ K → L1 ≃[i, ∞] L2.
+lemma ldrop_O1_inj: ∀i,L1,L2,K. ⇩[i] L1 ≡ K → ⇩[i] L2 ≡ K → L1 ≃[i, ∞] L2.
 #i @(nat_ind_plus … i) -i
 [ #L1 #L2 #K #H <(ldrop_inv_O2 … H) -K #H <(ldrop_inv_O2 … H) -L1 //
 | #i #IHi * [2: #L1 #I1 #V1 ] * [2,4: #L2 #I2 #V2 ] #K #HLK1 #HLK2 //
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/ldrop_lpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/ldrop_lpx_sn.ma
deleted file mode 100644 (file)
index 3dc3b2f..0000000
+++ /dev/null
@@ -1,78 +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/grammar/lpx_sn.ma".
-include "basic_2/relocation/ldrop_leq.ma".
-
-(* DROPPING *****************************************************************)
-
-(* Properties on sn pointwise extension *************************************)
-
-lemma lpx_sn_deliftable_dropable: ∀R. l_deliftable_sn R → dropable_sn (lpx_sn R).
-#R #HR #L1 #K1 #s #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #He #X #H >(lpx_sn_inv_atom1 … H) -H
-  /4 width=3 by ldrop_atom, lpx_sn_atom, ex2_intro/
-| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H
-  #L2 #V2 #HL12 #HV12 #H destruct
-  /3 width=5 by ldrop_pair, lpx_sn_pair, ex2_intro/
-| #I #L1 #K1 #V1 #e #_ #IHLK1 #X #H elim (lpx_sn_inv_pair1 … H) -H
-  #L2 #V2 #HL12 #HV12 #H destruct
-  elim (IHLK1 … HL12) -L1 /3 width=3 by ldrop_drop, ex2_intro/
-| #I #L1 #K1 #V1 #W1 #d #e #HLK1 #HWV1 #IHLK1 #X #H
-  elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
-  elim (HR … HV12 … HLK1 … HWV1) -V1
-  elim (IHLK1 … HL12) -L1 /3 width=5 by ldrop_skip, lpx_sn_pair, ex2_intro/
-]
-qed-.
-
-lemma lpx_sn_liftable_dedropable: ∀R. (∀L. reflexive ? (R L)) →
-                                  l_liftable R → dedropable_sn (lpx_sn R).
-#R #H1R #H2R #L1 #K1 #s #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #He #X #H >(lpx_sn_inv_atom1 … H) -H
-  /4 width=4 by ldrop_atom, lpx_sn_atom, ex3_intro/
-| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H
-  #K2 #V2 #HK12 #HV12 #H destruct
-  lapply (lpx_sn_fwd_length … HK12)
-  #H @(ex3_intro … (K2.ⓑ{I}V2)) (**) (* explicit constructor *)
-  /3 width=1 by lpx_sn_pair, monotonic_le_plus_l/
-  @leq_O2 normalize //
-| #I #L1 #K1 #V1 #e #_ #IHLK1 #K2 #HK12 elim (IHLK1 … HK12) -K1
-  /3 width=5 by ldrop_drop, leq_pair, lpx_sn_pair, ex3_intro/
-| #I #L1 #K1 #V1 #W1 #d #e #HLK1 #HWV1 #IHLK1 #X #H
-  elim (lpx_sn_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
-  elim (lift_total W2 d e) #V2 #HWV2
-  lapply (H2R … HW12 … HLK1 … HWV1 … HWV2) -W1
-  elim (IHLK1 … HK12) -K1
-  /3 width=6 by ldrop_skip, leq_succ, lpx_sn_pair, ex3_intro/
-]
-qed-.
-
-fact lpx_sn_dropable_aux: ∀R,L2,K2,s,d,e. ⇩[s, d, e] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 →
-                          d = 0 → ∃∃K1. ⇩[s, 0, e] L1 ≡ K1 & lpx_sn R K1 K2.
-#R #L2 #K2 #s #d #e #H elim H -L2 -K2 -d -e
-[ #d #e #He #X #H >(lpx_sn_inv_atom2 … H) -H 
-  /4 width=3 by ldrop_atom, lpx_sn_atom, ex2_intro/
-| #I #K2 #V2 #X #H elim (lpx_sn_inv_pair2 … H) -H
-  #K1 #V1 #HK12 #HV12 #H destruct
-  /3 width=5 by ldrop_pair, lpx_sn_pair, ex2_intro/
-| #I #L2 #K2 #V2 #e #_ #IHLK2 #X #H #_ elim (lpx_sn_inv_pair2 … H) -H
-  #L1 #V1 #HL12 #HV12 #H destruct
-  elim (IHLK2 … HL12) -L2 /3 width=3 by ldrop_drop, ex2_intro/
-| #I #L2 #K2 #V2 #W2 #d #e #_ #_ #_ #L1 #_
-  <plus_n_Sm #H destruct
-]
-qed-.
-
-lemma lpx_sn_dropable: ∀R. dropable_dx (lpx_sn R).
-/2 width=5 by lpx_sn_dropable_aux/ qed-.
index 904a86c10330caa4af9dff854b9793ac94b3f93e..0df9690ee672b3c7ebcad71271e8fbbfaee73251 100644 (file)
@@ -16,9 +16,9 @@ include "basic_2/relocation/llpx_sn.ma".
 
 (* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****)
 
-definition llpx_sn_confluent: relation (lenv→relation term) ≝ λR1,R2.
-                              ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 →
-                              ∀L1. llpx_sn R1 0 T0 L0 L1 → ∀L2. llpx_sn R2 0 T0 L0 L2 →
-                              ∃∃T. R2 L1 T1 T & R1 L2 T2 T.
+definition llpx_sn_confluent2: relation (lenv→relation term) ≝ λR1,R2.
+                               ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 →
+                               ∀L1. llpx_sn R1 0 T0 L0 L1 → ∀L2. llpx_sn R2 0 T0 L0 L2 →
+                               ∃∃T. R2 L1 T1 T & R1 L2 T2 T.
 
-(* Note: we miss llpx_sn_conf and derivatives: lpr_conf *)
+(* Note: we miss llpx_sn_conf and derivatives: lpr_conf lprs_conf *)
diff --git a/matita/matita/contribs/lambdadelta/ground_2/etc/lib/star.etc b/matita/matita/contribs/lambdadelta/ground_2/etc/lib/star.etc
new file mode 100644 (file)
index 0000000..fb4d9c3
--- /dev/null
@@ -0,0 +1,31 @@
+lemma TC_case_sn: ∀A,R. reflexive A R →
+                  ∀a1,a2. TC … R a1 a2 → ∃∃a. R a1 a & TC … R a a2.
+#A #R #HR #a1 #a2 #H @(TC_ind_dx … a1 H) -a1
+[ /3 width=3 by inj, ex2_intro/
+| #a1 #a0 #Ha10 #Ha02 #_ /2 width=3 by ex2_intro/ (**) (* auto fails withput #_ *)
+]
+qed-.
+
+lemma TC_case_dx: ∀A,R. reflexive A R →
+                  ∀a1,a2. TC … R a1 a2 → ∃∃a. TC … R a1 a & R a a2.
+#A #R #HR #a1 #a2 #H @(TC_ind … a2 H) -a2
+[ /3 width=3 by inj, ex2_intro/
+| #a0 #a2 #Ha10 #Ha02 #_ /2 width=3 by ex2_intro/ (**) (* auto fails withput #_ *)
+]
+qed-.
+
+definition s_r_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
+                      ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
+
+definition s_rs_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
+                       ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
+
+lemma s_r_trans_TC1: ∀A,B,R,S. s_r_trans A B R S → s_rs_trans A B R S.
+#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 [ /3 width=3/ ]
+#T #T2 #_ #HT2 #IHT1 #L1 #HL12
+lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3/
+qed-.
+
+lemma s_r_trans_TC2: ∀A,B,R,S. s_rs_trans A B R S → s_r_trans A B R (TC … S).
+#A #B #R #S #HRS #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /2 width=3/ /3 width=3/
+qed-.
index 8cfdf349eb25a0b0d0dedd1b93f1af658df15dd9..50fda90652eb9f0c4773e230c7860aed86ae53a0 100644 (file)
@@ -40,21 +40,24 @@ definition LTC: ∀A:Type[0]. ∀B. (A→relation B) → (A→relation B) ≝
 definition lsub_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
                        ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → R1 L1 T1 T2.
 
-definition s_r_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
-                      ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
+definition s_r_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
+                           ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → LTC … R1 L1 T1 T2.
 
-definition s_rs_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
-                       ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
+definition s_rs_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
+                            ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → LTC … R1 L1 T1 T2.
+
+definition s_r_confluent1: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
+                           ∀L1,T1,T2. R1 L1 T1 T2 → ∀L2. R2 T1 L1 L2 → R2 T2 L1 L2.
 
 lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 →
                  ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 →
                  ∃∃a. R2 a1 a & TC … R1 a2 a.
 #A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
 [ #a1 #Ha01 #a2 #Ha02
-  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3/
+  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
 | #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
   elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
-  elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=5/
+  elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=5 by step, ex2_intro/
 ]
 qed.
 
@@ -63,10 +66,10 @@ lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 →
                  ∃∃a. TC … R2 a1 a & R1 a2 a.
 #A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
 [ #a2 #Ha02 #a1 #Ha01
-  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3/
+  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
 | #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01
   elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0
-  elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3/
+  elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3 by step, ex2_intro/
 ]
 qed.
 
@@ -74,10 +77,10 @@ lemma TC_confluent2: ∀A,R1,R2.
                      confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2).
 #A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
 [ #a1 #Ha01 #a2 #Ha02
-  elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3/
+  elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3 by inj, ex2_intro/
 | #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
   elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
-  elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=5/
+  elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=5 by step, ex2_intro/
 ]
 qed.
 
@@ -86,10 +89,10 @@ lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 →
                  ∃∃a. R2 a1 a & TC … R1 a a2.
 #A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
 [ #a0 #Ha10 #a2 #Ha02
-  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3/
+  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
 | #a #a0 #_ #Ha0 #IHa #a2 #Ha02
   elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02
-  elim (IHa … Ha0) -a /4 width=5/
+  elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/
 ]
 qed.
 
@@ -98,10 +101,10 @@ lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 →
                  ∃∃a. TC … R2 a1 a & R1 a a2.
 #A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
 [ #a2 #Ha02 #a1 #Ha10
-  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3/
+  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
 | #a #a2 #_ #Ha02 #IHa #a1 #Ha10
   elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0
-  elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3/
+  elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3 by step, ex2_intro/
 ]
 qed.
 
@@ -109,10 +112,10 @@ lemma TC_transitive2: ∀A,R1,R2.
                       transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2).
 #A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
 [ #a0 #Ha10 #a2 #Ha02
-  elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3/
+  elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3 by inj, ex2_intro/
 | #a #a0 #_ #Ha0 #IHa #a2 #Ha02
   elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02
-  elim (IHa … Ha0) -a /4 width=5/
+  elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/
 ]
 qed.
 
@@ -130,15 +133,15 @@ inductive SN (A) (R,S:relation A): predicate A ≝
 lemma NF_to_SN: ∀A,R,S,a. NF A R S a → SN A R S a.
 #A #R #S #a1 #Ha1
 @SN_intro #a2 #HRa12 #HSa12
-elim HSa12 -HSa12 /2 width=1/
+elim HSa12 -HSa12 /2 width=1 by/
 qed.
 
 lemma SN_to_NF: ∀A,R,S. NF_dec A R S →
                 ∀a1. SN A R S a1 →
                 ∃∃a2. star … R a1 a2 & NF A R S a2.
 #A #R #S #HRS #a1 #H elim H -a1
-#a1 #_ #IHa1 elim (HRS a1) -HRS /2 width=3/
-* #a0 #Ha10 #Ha01 elim (IHa1 … Ha10 Ha01) -IHa1 -Ha01 /3 width=3/
+#a1 #_ #IHa1 elim (HRS a1) -HRS /2 width=3 by srefl, ex2_intro/
+* #a0 #Ha10 #Ha01 elim (IHa1 … Ha10 Ha01) -IHa1 -Ha01 /3 width=3 by star_compl, ex2_intro/
 qed-.
 
 definition NF_sn: ∀A. relation A → relation A → predicate A ≝
@@ -151,23 +154,28 @@ inductive SN_sn (A) (R,S:relation A): predicate A ≝
 lemma NF_to_SN_sn: ∀A,R,S,a. NF_sn A R S a → SN_sn A R S a.
 #A #R #S #a2 #Ha2
 @SN_sn_intro #a1 #HRa12 #HSa12
-elim HSa12 -HSa12 /2 width=1/
+elim HSa12 -HSa12 /2 width=1 by/
 qed.
 
 lemma LTC_lsub_trans: ∀A,B,R,S. lsub_trans A B R S → lsub_trans A B (LTC … R) S.
-#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 [ /3 width=3/ ]
+#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 /3 width=3 by inj/
 #T #T2 #_ #HT2 #IHT1 #L1 #HL12
-lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3/
+lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3 by step/
 qed-.
 
-lemma s_r_trans_TC1: ∀A,B,R,S. s_r_trans A B R S → s_rs_trans A B R S.
-#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 [ /3 width=3/ ]
-#T #T2 #_ #HT2 #IHT1 #L1 #HL12
-lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3/
+lemma s_r_conf1_LTC1: ∀A,B,S,R. s_r_confluent1 A B S R → s_r_confluent1 A B (LTC … S) R.
+#A #B #S #R #HSR #L1 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /3 width=3 by/
+qed-.
+
+lemma s_r_trans_LTC1: ∀A,B,S,R. s_r_confluent1 A B S R →
+                      s_r_transitive A B S R → s_rs_transitive A B S R.
+#A #B #S #R #H1SR #H2SR #L2 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /2 width=3 by/
+#T1 #T #HT1 #_ #IHT2 #L1 #HL12 lapply (H2SR … HT1 … HL12) -H2SR -HT1
+/4 width=5 by s_r_conf1_LTC1, trans_TC/
 qed-.
 
-lemma s_r_trans_TC2: ∀A,B,R,S. s_rs_trans A B R S → s_r_trans A B R (TC … S).
-#A #B #R #S #HRS #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /2 width=3/ /3 width=3/
+lemma s_r_trans_LTC2: ∀A,B,S,R. s_rs_transitive A B S R → s_r_transitive A B S (LTC … R).
+#A #B #S #R #HSR #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /3 width=3 by inj/
 qed-.
 
 (* relations on unboxed pairs ***********************************************)
@@ -177,9 +185,9 @@ lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R →
                    ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b.
 #A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2
 [ #a2 #b2 #H02
-  elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4/
+  elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/
 | #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2
-  elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4/
+  elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4 by ex2_2_intro, bi_step/
 ]
 qed.
 
@@ -187,10 +195,10 @@ lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R →
                        bi_confluent A B (bi_TC … R).
 #A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1
 [ #a1 #b1 #H01 #a2 #b2 #H02
-  elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4/
+  elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/
 | #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02
   elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20
-  elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7/
+  elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7 by ex2_2_intro, bi_step/
 ]
 qed.
 
@@ -198,7 +206,7 @@ lemma bi_TC_decomp_r: ∀A,B. ∀R:bi_relation A B.
                       ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 →
                       R a1 b1 a2 b2 ∨
                       ∃∃a,b. bi_TC … R a1 b1 a b & R a b a2 b2.
-#A #B #R #a1 #a2 #b1 #b2 * -a2 -b2 /2 width=1/ /3 width=4/
+#A #B #R #a1 #a2 #b1 #b2 * -a2 -b2 /2 width=1/ /3 width=4 by ex2_2_intro, or_intror/
 qed-.
 
 lemma bi_TC_decomp_l: ∀A,B. ∀R:bi_relation A B.
@@ -206,8 +214,8 @@ lemma bi_TC_decomp_l: ∀A,B. ∀R:bi_relation A B.
                       R a1 b1 a2 b2 ∨
                       ∃∃a,b. R a1 b1 a b & bi_TC … R a b a2 b2.
 #A #B #R #a1 #a2 #b1 #b2 #H @(bi_TC_ind_dx … a1 b1 H) -a1 -b1
-[ /2 width=1/
-| #a1 #a #b1 #b #Hab1 #Hab2 #_ /3 width=4/
+[ /2 width=1 by or_introl/
+| #a1 #a #b1 #b #Hab1 #Hab2 #_ /3 width=4 by ex2_2_intro, or_intror/ (**) (* auto fails without #_ *)
 ]
 qed-.
 
@@ -218,29 +226,29 @@ definition tri_RC: ∀A,B,C. tri_relation A B C → tri_relation A B C ≝
                    ∧∧ a1 = a2 & b1 = b2 & c1 = c2.
 
 lemma tri_RC_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_RC … R).
-/3 width=1/ qed.
+/3 width=1 by and3_intro, or_intror/ qed.
 
 definition tri_star: ∀A,B,C,R. tri_relation A B C ≝
                      λA,B,C,R. tri_RC A B C (tri_TC … R).
 
 lemma tri_star_tri_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_star … R).
-/2 width=1/ qed.
+/2 width=1 by/ qed.
 
 lemma tri_TC_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2.
                           tri_TC A B C R a1 b1 c1 a2 b2 c2 →
                           tri_star A B C R a1 b1 c1 a2 b2 c2.
-/2 width=1/ qed.
+/2 width=1 by or_introl/ qed.
 
 lemma tri_R_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2.
                          R a1 b1 c1 a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2.
-/3 width=1/ qed.
+/3 width=1 by tri_TC_to_tri_star, tri_inj/ qed.
 
 lemma tri_star_strap1: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
                        tri_star A B C R a1 b1 c1 a b c →
                        R a b c a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2.
 #A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 *
-[ /3 width=5/
-| * #H1 #H2 #H3 destruct /2 width=1/
+[ /3 width=5 by tri_TC_to_tri_star, tri_step/
+| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/
 ]
 qed.
 
@@ -248,8 +256,8 @@ lemma tri_star_strap2: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. R a1 b1 c1 a b c →
                        tri_star A B C R a b c a2 b2 c2 →
                        tri_star A B C R a1 b1 c1 a2 b2 c2.
 #A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H *
-[ /3 width=5/
-| * #H1 #H2 #H3 destruct /2 width=1/
+[ /3 width=5 by tri_TC_to_tri_star, tri_TC_strap/
+| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/
 ]
 qed.
 
@@ -258,8 +266,8 @@ lemma tri_star_to_tri_TC_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
                                     tri_TC A B C R a b c a2 b2 c2 →
                                     tri_TC A B C R a1 b1 c1 a2 b2 c2.
 #A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 *
-[ /2 width=5/
-| * #H1 #H2 #H3 destruct /2 width=1/
+[ /2 width=5 by tri_TC_transitive/
+| * #H1 #H2 #H3 destruct /2 width=1 by/
 ]
 qed.
 
@@ -268,15 +276,15 @@ lemma tri_TC_to_tri_star_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
                                     tri_star A B C R a b c a2 b2 c2 →
                                     tri_TC A B C R a1 b1 c1 a2 b2 c2.
 #A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H *
-[ /2 width=5/
-| * #H1 #H2 #H3 destruct /2 width=1/
+[ /2 width=5 by tri_TC_transitive/
+| * #H1 #H2 #H3 destruct /2 width=1 by/
 ]
 qed.
 
 lemma tri_tansitive_tri_star: ∀A,B,C,R. tri_transitive A B C (tri_star … R).
 #A #B #C #R #a1 #a #b1 #b #c1 #c #H #a2 #b2 #c2 *
-[ /3 width=5/
-| * #H1 #H2 #H3 destruct /2 width=1/
+[ /3 width=5 by tri_star_to_tri_TC_to_tri_TC, tri_TC_to_tri_star/
+| * #H1 #H2 #H3 destruct /2 width=1 by/
 ]
 qed.
 
@@ -284,7 +292,7 @@ lemma tri_star_ind: ∀A,B,C,R,a1,b1,c1. ∀P:relation3 A B C. P a1 b1 c1 →
                     (∀a,a2,b,b2,c,c2. tri_star … R a1 b1 c1 a b c → R a b c a2 b2 c2 → P a b c → P a2 b2 c2) →
                     ∀a2,b2,c2. tri_star … R a1 b1 c1 a2 b2 c2 → P a2 b2 c2.
 #A #B #C #R #a1 #b1 #c1 #P #H #IH #a2 #b2 #c2 *
-[ #H12 elim H12 -a2 -b2 -c2 /2 width=6/ -H /3 width=6/
+[ #H12 elim H12 -a2 -b2 -c2 /3 width=6 by tri_TC_to_tri_star/
 | * #H1 #H2 #H3 destruct //
 ]
 qed-.
@@ -293,7 +301,7 @@ lemma tri_star_ind_dx: ∀A,B,C,R,a2,b2,c2. ∀P:relation3 A B C. P a2 b2 c2 →
                        (∀a1,a,b1,b,c1,c. R a1 b1 c1 a b c → tri_star … R a b c a2 b2 c2 → P a b c → P a1 b1 c1) →
                        ∀a1,b1,c1. tri_star … R a1 b1 c1 a2 b2 c2 → P a1 b1 c1.
 #A #B #C #R #a2 #b2 #c2 #P #H #IH #a1 #b1 #c1 *
-[ #H12 @(tri_TC_ind_dx … a1 b1 c1 H12) -a1 -b1 -c1 /2 width=6/ -H /3 width=6/
+[ #H12 @(tri_TC_ind_dx … a1 b1 c1 H12) -a1 -b1 -c1 /3 width=6 by tri_TC_to_tri_star/
 | * #H1 #H2 #H3 destruct //
 ]
 qed-.