]> matita.cs.unibo.it Git - helm.git/commitdiff
we begin to develop lazy pointwisee extensions ...
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Wed, 19 Mar 2014 14:36:51 +0000 (14:36 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Wed, 19 Mar 2014 14:36:51 +0000 (14:36 +0000)
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsn_5.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/llpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_llpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/lift_neg.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/lleq_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_llpx_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl

diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lazypredsn_5.ma
new file mode 100644 (file)
index 0000000..01ce586
--- /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 @{ 'LazyPRedSn $G $L1 $L2 $T $d }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/llpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/llpr.ma
new file mode 100644 (file)
index 0000000..e4c1a01
--- /dev/null
@@ -0,0 +1,51 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lazypredsn_5.ma".
+include "basic_2/relocation/llpx_sn.ma".
+include "basic_2/reduction/cpr.ma".
+
+(* LAZY SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ************************)
+
+definition llpr: genv → relation4 ynat term lenv lenv ≝ λG. llpx_sn (cpr G).
+
+interpretation "lazy parallel reduction (local environment, sn variant)"
+   'LazyPRedSn G L1 L2 T d = (llpr G d T L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma llpr_inv_flat: ∀I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[ⓕ{I}V.T, d] L2 →
+                     ⦃G, L1⦄ ⊢ ➡[V, d] L2 ∧ ⦃G, L1⦄ ⊢ ➡[T, d] L2.
+/2 width=2 by llpx_sn_inv_flat/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma llpr_fwd_length: ∀G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡[T, d] L2 → |L1| = |L2|.
+/2 width=4 by llpx_sn_fwd_length/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma llpr_lref: ∀I,G,L1,L2,K1,K2,V1,V2,d,i. d ≤ yinj i →
+                 ⇩[i] L1 ≡ K1.ⓑ{I}V1 → ⇩[i] L2 ≡ K2.ⓑ{I}V2 →
+                 ⦃G, K1⦄ ⊢ ➡[V1, 0] K2 → ⦃G, K1⦄ ⊢ V1 ➡ V2 → ⦃G, L1⦄ ⊢ ➡[#i, d] L2.
+/2 width=9 by llpx_sn_lref/ qed.
+
+(* Note: lemma 250 *)
+lemma llpr_refl: ∀G,T,d. reflexive … (llpr G d T).
+/2 width=1 by llpx_sn_refl/ qed.
+
+(* Basic_1: removed theorems 5: wcpr0_gen_sort wcpr0_gen_head
+                                wcpr0_getl wcpr0_getl_back
+                                pr0_subst1_back
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_ldrop.ma
new file mode 100644 (file)
index 0000000..453f21d
--- /dev/null
@@ -0,0 +1,101 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/fquq_alt.ma".
+include "basic_2/reduction/cpr_lift.ma".
+include "basic_2/reduction/llpr.ma".
+
+(* LAZY SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma llpr_inv_lref_ge_dx: ∀G,L1,L2,d,i. ⦃G, L1⦄ ⊢ ➡[#i, d] L2 → d ≤ i →
+                           ∀I,K2,V2. ⇩[i] L2 ≡ K2.ⓑ{I}V2 →
+                           ∃∃K1,V1. ⇩[i] L1 ≡ K1.ⓑ{I}V1 &
+                                    ⦃G, K1⦄ ⊢ ➡[V1, 0] K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2.
+/2 width=5 by llpx_sn_inv_lref_ge_dx/ qed-.
+
+lemma llpr_inv_lref_ge_sn: ∀G,L1,L2,d,i. ⦃G, L1⦄ ⊢ ➡[#i, d] L2 → d ≤ i →
+                           ∀I,K1,V1. ⇩[i] L1 ≡ K1.ⓑ{I}V1 →
+                           ∃∃K2,V2. ⇩[i] L2 ≡ K2.ⓑ{I}V2 &
+                                    ⦃G, K1⦄ ⊢ ➡[V1, 0] K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2.
+/2 width=5 by llpx_sn_inv_lref_ge_sn/ qed-.
+
+lemma llpr_inv_lref_ge_bi: ∀G,L1,L2,d,i. ⦃G, L1⦄ ⊢ ➡[#i, d] L2 → d ≤ i →
+                           ∀I1,I2,K1,K2,V1,V2.
+                           ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                           ∧∧ I1 = I2 & ⦃G, K1⦄ ⊢ ➡[V1, 0] K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2.
+/2 width=8 by llpx_sn_inv_lref_ge_bi/ qed-.
+
+lemma llpr_inv_bind_O: ∀a,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ➡ [ⓑ{a,I}V.T, 0] L2 →
+                       ⦃G, L1⦄ ⊢ ➡[V, 0] L2 ∧ ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡[T, 0] L2.ⓑ{I}V.
+/2 width=2 by llpx_sn_inv_bind_O/ qed-.
+
+lemma llpr_bind_repl_O: ∀I,G,L1,L2,V1,V2,T. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡[T, 0] L2.ⓑ{I}V2 →
+                        ∀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-.
+(*
+(* 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⦄ ⊢ ➡[T1, 0] 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=10 by llpr_lref, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, ldrop_pair, 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⦄ ⊢ ➡[T1, 0] 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⦄ ⊢ ➡[T1, 0] 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=10 by llpr_lref, cpr_pair_sn, cpr_bind, cpr_flat, fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, ldrop_pair, 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⦄ ⊢ ➡[T1, 0] 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-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_llpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reduction/llpr_llpr.ma
new file mode 100644 (file)
index 0000000..925765b
--- /dev/null
@@ -0,0 +1,375 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_llpx_sn.ma".
+include "basic_2/substitution/fqup.ma".
+include "basic_2/reduction/llpr_ldrop.ma".
+
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+(* Main properties on context-sensitive parallel reduction for terms ********)
+
+fact cpr_conf_llpr_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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[#i, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[#i, 0] 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 (llpr_inv_lref_ge_sn … HL01 … HLK0) -HL01 // #K1 #V1 #HLK1 #HK01 #HV01
+elim (llpr_inv_lref_ge_sn … HL02 … HLK0) -HL02 // #K2 #W2 #HLK2 #HK02 #_
+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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[#i, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[#i, 0] 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 (llpr_inv_lref_ge_sn … HL01 … HLK0) -HL01 // #K1 #W1 #HLK1 #HK01 #_
+lapply (ldrop_fwd_drop2 … HLK1) -W1 #HLK1
+elim (llpr_inv_lref_ge_sn … HL02 … HLK0) -HL02 // #K2 #W2 #HLK2 #HK02 #_
+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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[ⓑ{a,I}V0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓑ{a,I}V0.T0, 0] 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 (llpr_inv_bind_O … HL01) -HL01 #H1V0 #H1T0
+elim (llpr_inv_bind_O … HL02) -HL02 #H2V0 #H2T0
+elim (IH … HV01 … HV02 … H1V0 … H2V0) //
+elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH
+/3 width=5 by llpr_bind_repl_O, cpr_bind, ex2_intro/
+qed-.
+
+fact cpr_conf_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[+ⓓV0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[+ⓓV0.T0, 0] 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 (llpr_inv_bind_O … HL01) -HL01 #H1V0 #H1T0
+elim (llpr_inv_bind_O … HL02) -HL02 #H2V0 #H2T0
+elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 /2 width=4 by llpr_bind_repl_O/ -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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[+ⓓV0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[+ⓓV0.T0, 0] 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 (llpr_inv_bind_O … HL01) -HL01 #H1V0 #H1T0
+elim (llpr_inv_bind_O … HL02) -HL02 #H2V0 #H2T0
+elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 /2 width=4 by llpr_bind_repl_O/ -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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[ⓕ{I}V0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓕ{I}V0.T0, 0] 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 (llpr_inv_flat … HL01) -HL01 #H1V0 #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #H2V0 #H2T0
+elim (IH … HV01 … HV02 … H1V0 … H2V0) //
+elim (IH … HT01 … HT02 … H1T0 … H2T0) /3 width=5 by cpr_flat, ex2_intro/
+qed-.
+
+fact cpr_conf_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀V1,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡[ⓝV0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓝV0.T0, 0] 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 (llpr_inv_flat … HL01) -HL01 #_ #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #_ #H2T0
+elim (IH … HT01 … HT02 … H1T0 … H2T0) // -L0 -V0 -T0 /3 width=3 by cpr_tau, ex2_intro/
+qed-.
+
+fact cpr_conf_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] L2 →
+      ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
+   ) →
+   ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 →
+   ∀L1. ⦃G, L0⦄ ⊢ ➡[ⓝV0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓝV0.T0, 0] L2 →
+   ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
+#G #L0 #V0 #T0 #IH #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (llpr_inv_flat … HL01) -HL01 #_ #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #_ #H2T0
+elim (IH … HT01 … HT02 … H1T0 … H2T0) // -L0 -V0 -T0 /2 width=3 by ex2_intro/
+qed-.
+
+fact cpr_conf_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[ⓐV0.ⓛ{a}W0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓐV0.ⓛ{a}W0.T0, 0] 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 (llpr_inv_flat … HL01) -HL01 #H1V0 #HL01
+elim (llpr_inv_bind_O … HL01) -HL01 #H1W0 #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #H2V0 #HL02
+elim (llpr_inv_bind_O … HL02) -HL02 #H2W0 #H2T0
+elim (IH … HV01 … HV02 … H1V0 … H2V0) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … H1W0 … H2W0) /2 width=1 by/ #W #HW1 #HW2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=4 by llpr_bind_repl_O/ -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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[ⓐV0.ⓓ{a}W0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓐV0.ⓓ{a}W0.T0, 0] 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 (llpr_inv_flat … HL01) -HL01 #H1V0 #HL01
+elim (llpr_inv_bind_O … HL01) -HL01 #H1W0 #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #H2V0 #HL02
+elim (llpr_inv_bind_O … HL02) -HL02 #H2W0 #H2T0
+elim (IH … HV01 … HV02 … H1V0 … H2V0) -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 … H1W0 … H2W0) /2 width=1 by/
+  elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=4 by llpr_bind_repl_O/ -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=4 by llpr_bind_repl_O/ -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_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[ⓐV0.ⓛ{a}W0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓐV0.ⓛ{a}W0.T0, 0] 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 (llpr_inv_flat … HL01) -HL01 #H1V0 #HL01
+elim (llpr_inv_bind_O … HL01) -HL01 #H1W0 #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #H2V0 #HL02
+elim (llpr_inv_bind_O … HL02) -HL02 #H2W0 #H2T0
+elim (IH … HV01 … HV02 … H1V0 … H2V0) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … H1W0 … H2W0) /2 width=1/ #W #HW1 #HW2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=4 by llpr_bind_repl_O/ -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: includes: pr0_upsilon_upsilon *)
+fact cpr_conf_llpr_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⦄ ⊢ ➡[T, 0] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[T, 0] 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⦄ ⊢ ➡[ⓐV0.ⓓ{a}W0.T0, 0] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[ⓐV0.ⓓ{a}W0.T0, 0] 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 (llpr_inv_flat … HL01) -HL01 #H1V0 #HL01
+elim (llpr_inv_bind_O … HL01) -HL01 #H1W0 #H1T0
+elim (llpr_inv_flat … HL02) -HL02 #H2V0 #HL02
+elim (llpr_inv_bind_O … HL02) -HL02 #H2W0 #H2T0
+elim (IH … HV01 … HV02 … H1V0 … H2V0) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … H1W0 … H2W0) /2 width=1 by/
+elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=4 by llpr_bind_repl_O/ -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_llpr: ∀G. llpx_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_llpr_atom_atom/
+  | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+    /3 width=10 by cpr_conf_llpr_atom_delta/
+  | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+    /4 width=10 by ex2_commute, cpr_conf_llpr_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_llpr_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_llpr_bind_bind/
+  | /4 width=11 by ex2_commute, cpr_conf_llpr_bind_zeta/
+  | /3 width=11 by cpr_conf_llpr_bind_zeta/
+  | /3 width=12 by cpr_conf_llpr_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_llpr_flat_flat/
+  | /4 width=8 by ex2_commute, cpr_conf_llpr_flat_tau/
+  | /4 width=12 by ex2_commute, cpr_conf_llpr_flat_beta/
+  | /4 width=14 by ex2_commute, cpr_conf_llpr_flat_theta/
+  | /3 width=8 by cpr_conf_llpr_flat_tau/
+  | /3 width=8 by cpr_conf_llpr_tau_tau/
+  | /3 width=12 by cpr_conf_llpr_flat_beta/
+  | /3 width=13 by cpr_conf_llpr_beta_beta/
+  | /3 width=14 by cpr_conf_llpr_flat_theta/
+  | /3 width=17 by cpr_conf_llpr_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_llpr/ qed-.
+
+(* Properties on context-sensitive parallel reduction for terms *************)
+
+lemma llpr_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[T0, 0] L1 →
+                        ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L1⦄ ⊢ T1 ➡ T.
+#G #L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_conf_llpr … HT01 T0 … HL01 … HL01) /2 width=3 by ex2_intro/
+qed-.
+
+lemma llpr_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[T0, 0] L1 →
+                        ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L0⦄ ⊢ T1 ➡ T.
+#G #L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_conf_llpr … HT01 T0 … L0 … HL01) /2 width=3 by ex2_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lift_neg.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lift_neg.ma
new file mode 100644 (file)
index 0000000..220748e
--- /dev/null
@@ -0,0 +1,60 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lift.ma".
+
+(* BASIC TERM RELOCATION ****************************************************)
+
+(* Properties on negated basic relocation ***********************************)
+
+lemma nlift_lref_be_SO: ∀X,i. ⇧[i, 1] X ≡ #i → ⊥.
+/2 width=7 by lift_inv_lref2_be/ qed-.
+
+lemma nlift_bind_sn: ∀W,d,e. (∀V. ⇧[d, e] V ≡ W → ⊥) →
+                     ∀a,I,U. (∀X. ⇧[d, e] X ≡ ⓑ{a,I}W.U → ⊥).
+#W #d #e #HW #a #I #U #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/
+qed-.
+
+lemma nlift_bind_dx: ∀U,d,e. (∀T. ⇧[d+1, e] T ≡ U → ⊥) →
+                     ∀a,I,W. (∀X. ⇧[d, e] X ≡ ⓑ{a,I}W.U → ⊥).
+#U #d #e #HU #a #I #W #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/
+qed-.
+
+lemma nlift_flat_sn: ∀W,d,e. (∀V. ⇧[d, e] V ≡ W → ⊥) →
+                     ∀I,U. (∀X. ⇧[d, e] X ≡ ⓕ{I}W.U → ⊥).
+#W #d #e #HW #I #U #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/
+qed-.
+
+lemma nlift_flat_dx: ∀U,d,e. (∀T. ⇧[d, e] T ≡ U → ⊥) →
+                     ∀I,W. (∀X. ⇧[d, e] X ≡ ⓕ{I}W.U → ⊥).
+#U #d #e #HU #I #W #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/
+qed-.
+
+(* Inversion lemmas on negated basic relocation *****************************)
+
+lemma nlift_inv_bind: ∀a,I,W,U,d,e. (∀X. ⇧[d, e] X ≡ ⓑ{a,I}W.U → ⊥) →
+                      (∀V. ⇧[d, e] V ≡ W → ⊥) ∨ (∀T. ⇧[d+1, e] T ≡ U → ⊥).
+#a #I #W #U #d #e #H elim (is_lift_dec W d e)
+[ * /4 width=2 by lift_bind, or_intror/
+| /4 width=2 by ex_intro, or_introl/
+]
+qed-.
+
+lemma nlift_inv_flat: ∀I,W,U,d,e. (∀X. ⇧[d, e] X ≡ ⓕ{I}W.U → ⊥) →
+                      (∀V. ⇧[d, e] V ≡ W → ⊥) ∨ (∀T. ⇧[d, e] T ≡ U → ⊥).
+#I #W #U #d #e #H elim (is_lift_dec W d e)
+[ * /4 width=2 by lift_flat, or_intror/
+| /4 width=2 by ex_intro, or_introl/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lleq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lleq_alt.ma
new file mode 100644 (file)
index 0000000..ccf131d
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_alt.ma".
+include "basic_2/relocation/lleq.ma".
+
+(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************)
+
+(* Alternative definition ***************************************************)
+
+theorem lleq_intro_alt: ∀L1,L2,T,d. |L1| = |L2| →
+                        (∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                           ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                           ∧∧ I1 = I2 & V1 = V2 & K1 ⋕[V1, 0] K2
+                        ) → L1 ⋕[T, d] L2.
+#L1 #L2 #T #d #HL12 #IH @llpx_sn_intro_alt // -HL12
+#I1 #I2 #K1 #K2 #HLK1 #HLK2 #i #Hid #HnT #HLK1 #HLK2
+elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by and3_intro/
+qed.
+
+theorem lleq_fwd_alt: ∀L1,L2,T,d. L1 ⋕[T, d] L2 →
+                      |L1| = |L2| ∧
+                      ∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                      ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                      ∧∧ I1 = I2 & V1 = V2 & K1 ⋕[V1, 0] K2.
+#L1 #L2 #T #d #H elim (llpx_sn_fwd_alt … H) -H
+#HL12 #IH @conj //
+#I1 #I2 #K1 #K2 #HLK1 #HLK2 #i #Hid #HnT #HLK1 #HLK2
+elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by and3_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_alt.ma
new file mode 100644 (file)
index 0000000..4356553
--- /dev/null
@@ -0,0 +1,250 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lift_neg.ma".
+include "basic_2/relocation/ldrop_ldrop.ma".
+include "basic_2/relocation/llpx_sn.ma".
+
+(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****)
+
+(* alternative definition of llpx_sn_alt *)
+inductive llpx_sn_alt (R:relation3 lenv term term): relation4 ynat term lenv lenv ≝
+| llpx_sn_alt_intro: ∀L1,L2,T,d.
+                     (∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                       ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 → I1 = I2 ∧ R K1 V1 V2
+                     ) →
+                     (∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                       ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 → llpx_sn_alt R 0 V1 K1 K2
+                     ) → |L1| = |L2| → llpx_sn_alt R d T L1 L2
+.
+
+(* Basic forward lemmas ******************************************************)
+
+lemma llpx_sn_alt_fwd_gen: ∀R,L1,L2,T,d. llpx_sn_alt R d T L1 L2 →
+                           |L1| = |L2| ∧
+                           ∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                           ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                           ∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn_alt R 0 V1 K1 K2.
+#R #L1 #L2 #T #d * -L1 -L2 -T -d
+#L1 #L2 #T #d #IH1 #IH2 #HL12 @conj //
+#I1 #I2 #K1 #K2 #HLK1 #HLK2 #i #Hid #HnT #HLK1 #HLK2
+elim (IH1 … HnT HLK1 HLK2) -IH1 /4 width=8 by and3_intro/
+qed-.
+
+lemma llpx_sn_alt_fwd_length: ∀R,L1,L2,T,d. llpx_sn_alt R d T L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #T #d * -L1 -L2 -T -d //
+qed-.
+
+fact llpx_sn_alt_fwd_lref_aux: ∀R,L1,L2,X,d. llpx_sn_alt R d X L1 L2 → ∀i. X = #i →
+                               ∨∨ |L1| ≤ i ∧ |L2| ≤ i
+                                | yinj i < d
+                                | ∃∃I,K1,K2,V1,V2. ⇩[i] L1 ≡ K1.ⓑ{I}V1 &
+                                                   ⇩[i] L2 ≡ K2.ⓑ{I}V2 &
+                                                   llpx_sn_alt R (yinj 0) V1 K1 K2 &
+                                                   R K1 V1 V2 & d ≤ yinj i.
+#R #L1 #L2 #X #d * -L1 -L2 -X -d
+#L1 #L2 #X #d #H1X #H2X #HL12 #i #H destruct
+elim (lt_or_ge i (|L1|)) /3 width=1 by or3_intro0, conj/
+elim (ylt_split i d) /3 width=1 by or3_intro1/
+#Hdi #HL1 elim (ldrop_O1_lt … HL1) #I1 #K1 #V1 #HLK1
+elim (ldrop_O1_lt L2 i) // #I2 #K2 #V2 #HLK2
+elim (H1X … HLK1 HLK2) -H1X /2 width=3 by nlift_lref_be_SO/ #H #HV12 destruct
+lapply (H2X … HLK1 HLK2) -H2X /2 width=3 by nlift_lref_be_SO/
+/3 width=9 by or3_intro2, ex5_5_intro/
+qed-.
+
+lemma llpx_sn_alt_fwd_lref: ∀R,L1,L2,d,i. llpx_sn_alt R d (#i) L1 L2 →
+                            ∨∨ |L1| ≤ i ∧ |L2| ≤ i
+                             | yinj i < d
+                             | ∃∃I,K1,K2,V1,V2. ⇩[i] L1 ≡ K1.ⓑ{I}V1 &
+                                                ⇩[i] L2 ≡ K2.ⓑ{I}V2 &
+                                                llpx_sn_alt R (yinj 0) V1 K1 K2 &
+                                                R K1 V1 V2 & d ≤ yinj i.
+/2 width=3 by llpx_sn_alt_fwd_lref_aux/ qed-.
+
+(* Basic inversion lemmas ****************************************************)
+
+fact llpx_sn_alt_inv_flat_aux: ∀R,L1,L2,X,d. llpx_sn_alt R d X L1 L2 →
+                               ∀I,V,T. X = ⓕ{I}V.T →
+                               llpx_sn_alt R d V L1 L2 ∧ llpx_sn_alt R d T L1 L2.
+#R #L1 #L2 #X #d * -L1 -L2 -X -d
+#L1 #L2 #X #d #H1X #H2X #HL12
+#I #V #T #H destruct
+@conj @llpx_sn_alt_intro // -HL12
+/4 width=8 by nlift_flat_sn, nlift_flat_dx/
+qed-.
+
+lemma llpx_sn_alt_inv_flat: ∀R,I,L1,L2,V,T,d. llpx_sn_alt R d (ⓕ{I}V.T) L1 L2 →
+                            llpx_sn_alt R d V L1 L2 ∧ llpx_sn_alt R d T L1 L2.
+/2 width=4 by llpx_sn_alt_inv_flat_aux/ qed-.
+
+fact llpx_sn_alt_inv_bind_aux: ∀R,L1,L2,X,d. llpx_sn_alt R d X L1 L2 →
+                               ∀a,I,V,T. X = ⓑ{a,I}V.T →
+                               llpx_sn_alt R d V L1 L2 ∧ llpx_sn_alt R (⫯d) T (L1.ⓑ{I}V) (L2.ⓑ{I}V).
+#R #L1 #L2 #X #d * -L1 -L2 -X -d
+#L1 #L2 #X #d #H1X #H2X #HL12
+#a #I #V #T #H destruct
+@conj @llpx_sn_alt_intro [3,6: normalize /2 width=1 by eq_f2/ ] -HL12
+#I1 #I2 #K1 #K2 #W1 #W2 #i #Hdi #H #HLK1 #HLK2
+[1,2: /4 width=9 by nlift_bind_sn/ ]
+lapply (yle_inv_succ1 … Hdi) -Hdi * #Hdi #Hi
+lapply (ldrop_inv_drop1_lt … HLK1 ?) -HLK1 /2 width=1 by ylt_O/ #HLK1
+lapply (ldrop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/ #HLK2
+[ @(H1X … HLK1 HLK2) | @(H2X … HLK1 HLK2) ] // -I1 -I2 -L1 -L2 -K1 -K2 -W1 -W2
+@nlift_bind_dx <plus_minus_m_m /2 width=2 by ylt_O/
+qed-.
+
+lemma llpx_sn_alt_inv_bind: ∀R,a,I,L1,L2,V,T,d. llpx_sn_alt R d (ⓑ{a,I}V.T) L1 L2 →
+                            llpx_sn_alt R d V L1 L2 ∧ llpx_sn_alt R (⫯d) T (L1.ⓑ{I}V) (L2.ⓑ{I}V).
+/2 width=4 by llpx_sn_alt_inv_bind_aux/ qed-.
+
+(* Basic properties **********************************************************)
+
+lemma llpx_sn_alt_intro_alt: ∀R,L1,L2,T,d. |L1| = |L2| →
+                             (∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                                ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                                ∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn_alt R 0 V1 K1 K2
+                             ) → llpx_sn_alt R d T L1 L2.
+#R #L1 #L2 #T #d #HL12 #IH @llpx_sn_alt_intro // -HL12
+#I1 #I2 #K1 #K2 #HLK1 #HLK2 #i #Hid #HnT #HLK1 #HLK2
+elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by conj/
+qed.
+
+lemma llpx_sn_alt_sort: ∀R,L1,L2,d,k. |L1| = |L2| → llpx_sn_alt R d (⋆k) L1 L2.
+#R #L1 #L2 #d #k #HL12 @llpx_sn_alt_intro // -HL12
+#I1 #I2 #K1 #K2 #V1 #V2 #i #_ #H elim (H (⋆k)) //
+qed.
+
+lemma llpx_sn_alt_gref: ∀R,L1,L2,d,p. |L1| = |L2| → llpx_sn_alt R d (§p) L1 L2.
+#R #L1 #L2 #d #p #HL12 @llpx_sn_alt_intro // -HL12
+#I1 #I2 #K1 #K2 #V1 #V2 #i #_ #H elim (H (§p)) //
+qed.
+
+lemma llpx_sn_alt_skip: ∀R,L1,L2,d,i. |L1| = |L2| → yinj i < d → llpx_sn_alt R d (#i) L1 L2.
+#R #L1 #L2 #d #i #HL12 #Hid @llpx_sn_alt_intro // -HL12
+#I1 #I2 #K1 #K2 #V1 #V2 #j #Hdj #H elim (H (#i)) -H
+/4 width=3 by lift_lref_lt, ylt_yle_trans, ylt_inv_inj/
+qed.
+
+lemma llpx_sn_alt_free: ∀R,L1,L2,d,i. |L1| ≤ i → |L2| ≤ i → |L1| = |L2| →
+                        llpx_sn_alt R d (#i) L1 L2.
+#R #L1 #L2 #d #i #HL1 #_ #HL12 @llpx_sn_alt_intro // -HL12
+#I1 #I2 #K1 #K2 #V1 #V2 #j #_ #H #HLK1 elim (H (#(i-1))) -H
+lapply (ldrop_fwd_length_lt2 … HLK1) -HLK1
+/3 width=3 by lift_lref_ge_minus, lt_to_le_to_lt/
+qed.
+
+lemma llpx_sn_alt_lref: ∀R,I,L1,L2,K1,K2,V1,V2,d,i. d ≤ yinj i →
+                        ⇩[i] L1 ≡ K1.ⓑ{I}V1 → ⇩[i] L2 ≡ K2.ⓑ{I}V2 →
+                        llpx_sn_alt R 0 V1 K1 K2 → R K1 V1 V2 →
+                        llpx_sn_alt R d (#i) L1 L2.
+#R #I #L1 #L2 #K1 #K2 #V1 #V2 #d #i #Hdi #HLK1 #HLK2 #HK12 #HV12 @llpx_sn_alt_intro
+[1,2: #Z1 #Z2 #Y1 #Y2 #X1 #X2 #j #Hdj #H #HLY1 #HLY2
+  elim (lt_or_eq_or_gt i j) #Hij destruct
+  [1,4: elim (H (#i)) -H /2 width=1 by lift_lref_lt/
+  |2,5: lapply (ldrop_mono … HLY1 … HLK1) -HLY1 -HLK1 #H destruct
+    lapply (ldrop_mono … HLY2 … HLK2) -HLY2 -HLK2 #H destruct /2 width=1 by conj/
+  |3,6: elim (H (#(i-1))) -H /2 width=1 by lift_lref_ge_minus/
+  ]
+| lapply (llpx_sn_alt_fwd_length … HK12) -HK12 #HK12
+  @(ldrop_fwd_length_eq2 … HLK1 HLK2) normalize /2 width=1 by eq_f2/
+]
+qed.
+
+fact llpx_sn_alt_flat_aux: ∀R,I,L1,L2,V,d. llpx_sn_alt R d V L1 L2 →
+                           ∀Y1,Y2,T,m. llpx_sn_alt R m T Y1 Y2 →
+                           Y1 = L1 → Y2 = L2 → m = d →
+                           llpx_sn_alt R d (ⓕ{I}V.T) L1 L2.
+#R #I #L1 #L2 #V #d * -L1 -L2 -V -d #L1 #L2 #V #d #H1V #H2V #HL12
+#Y1 #Y2 #T #m * -Y1 -Y2 -T -m #Y1 #Y2 #T #m #H1T #H2T #_
+#HT1 #HY2 #Hm destruct
+@llpx_sn_alt_intro // -HL12
+#J1 #J2 #K1 #K2 #W1 #W2 #i #Hdi #HnVT #HLK1 #HLK2
+elim (nlift_inv_flat … HnVT) -HnVT /3 width=8 by/
+qed-.
+
+lemma llpx_sn_alt_flat: ∀R,I,L1,L2,V,T,d.
+                        llpx_sn_alt R d V L1 L2 → llpx_sn_alt R d T L1 L2 →
+                        llpx_sn_alt R d (ⓕ{I}V.T) L1 L2.
+/2 width=7 by llpx_sn_alt_flat_aux/ qed.
+
+fact llpx_sn_alt_bind_aux: ∀R,a,I,L1,L2,V,d. llpx_sn_alt R d V L1 L2 →
+                           ∀Y1,Y2,T,m. llpx_sn_alt R m T Y1 Y2 →
+                           Y1 = L1.ⓑ{I}V → Y2 = L2.ⓑ{I}V → m = ⫯d →
+                           llpx_sn_alt R d (ⓑ{a,I}V.T) L1 L2.
+#R #a #I #L1 #L2 #V #d * -L1 -L2 -V -d #L1 #L2 #V #d #H1V #H2V #HL12
+#Y1 #Y2 #T #m * -Y1 -Y2 -T -m #Y1 #Y2 #T #m #H1T #H2T #_
+#HT1 #HY2 #Hm destruct
+@llpx_sn_alt_intro // -HL12
+#J1 #J2 #K1 #K2 #W1 #W2 #i #Hdi #HnVT #HLK1 #HLK2
+elim (nlift_inv_bind … HnVT) -HnVT /3 width=8 by ldrop_drop, yle_succ/
+qed-.
+
+lemma llpx_sn_alt_bind: ∀R,a,I,L1,L2,V,T,d.
+                        llpx_sn_alt R d V L1 L2 →
+                        llpx_sn_alt R (⫯d) T (L1.ⓑ{I}V) (L2.ⓑ{I}V) →
+                        llpx_sn_alt R d (ⓑ{a,I}V.T) L1 L2.
+/2 width=7 by llpx_sn_alt_bind_aux/ qed.
+
+(* Main properties **********************************************************)
+
+theorem llpx_sn_lpx_sn_alt: ∀R,L1,L2,T,d. llpx_sn R d T L1 L2 → llpx_sn_alt R d T L1 L2.
+#R #L1 #L2 #T #d #H elim H -L1 -L2 -T -d
+/2 width=9 by llpx_sn_alt_sort, llpx_sn_alt_gref, llpx_sn_alt_skip, llpx_sn_alt_free, llpx_sn_alt_lref, llpx_sn_alt_flat, llpx_sn_alt_bind/
+qed.
+
+(* Main inversion lemmas ****************************************************)
+
+theorem llpx_sn_alt_inv_lpx_sn: ∀R,T,L1,L2,d. llpx_sn_alt R d T L1 L2 → llpx_sn R d T L1 L2.
+#R #T #L1 @(f2_ind … rfw … L1 T) -L1 -T #n #IH #L1 * *
+[1,3: /3 width=4 by llpx_sn_alt_fwd_length, llpx_sn_gref, llpx_sn_sort/
+| #i #Hn #L2 #d #H lapply (llpx_sn_alt_fwd_length … H)
+  #HL12 elim (llpx_sn_alt_fwd_lref … H) -H
+  [ * /2 width=1 by llpx_sn_free/
+  | /2 width=1 by llpx_sn_skip/
+  | * /4 width=9 by llpx_sn_lref, ldrop_fwd_rfw/
+  ]
+| #a #I #V #T #Hn #L2 #d #H elim (llpx_sn_alt_inv_bind … H) -H
+  /3 width=1 by llpx_sn_bind/
+| #I #V #T #Hn #L2 #d #H elim (llpx_sn_alt_inv_flat … H) -H
+  /3 width=1 by llpx_sn_flat/
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma llpx_sn_intro_alt: ∀R,L1,L2,T,d. |L1| = |L2| →
+                         (∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                            ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                            ∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn R 0 V1 K1 K2
+                         ) → llpx_sn R d T L1 L2.
+#R #L1 #L2 #T #d #HL12 #IH @llpx_sn_alt_inv_lpx_sn
+@llpx_sn_alt_intro_alt // -HL12
+#I1 #I2 #K1 #K2 #HLK1 #HLK2 #i #Hid #HnT #HLK1 #HLK2
+elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /3 width=1 by llpx_sn_lpx_sn_alt, and3_intro/
+qed.
+
+(* Advanced forward lemmas lemmas *******************************************)
+
+lemma llpx_sn_fwd_alt: ∀R,L1,L2,T,d. llpx_sn R d T L1 L2 →
+                       |L1| = |L2| ∧
+                       ∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → (∀U. ⇧[i, 1] U ≡ T → ⊥) →
+                       ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 →
+                       ∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn R 0 V1 K1 K2.
+#R #L1 #L2 #T #d #H lapply (llpx_sn_lpx_sn_alt … H) -H
+#H elim (llpx_sn_alt_fwd_gen … H) -H
+#HL12 #IH @conj //
+#I1 #I2 #K1 #K2 #HLK1 #HLK2 #i #Hid #HnT #HLK1 #HLK2
+elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /3 width=1 by llpx_sn_alt_inv_lpx_sn, and3_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_llpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/llpx_sn_llpx_sn.ma
new file mode 100644 (file)
index 0000000..904a86c
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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.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.
+
+(* Note: we miss llpx_sn_conf and derivatives: lpr_conf *)
index a80f8d3b5e1272944730fea74d927b5cddb5e155..b3efe3bc33da6ac9e7a80f682660dc37300b2905 100644 (file)
@@ -245,11 +245,11 @@ table {
           }
         ]
         [ { "lazy equivalence for local environments" * } {
-             [ "lleq ( ? ⋕[?,?] ? )" "lleq_leq" + "lleq_ldrop" + "lleq_lleq" * ]
+             [ "lleq ( ? ⋕[?,?] ? )" "lleq_alt" + "lleq_leq" + "lleq_ldrop" + "lleq_lleq" * ]
           }
         ]
         [ { "lazy pointwise extension of a relation" * } {
-             [ "llpx_sn" "llpx_sn_leq" + "llpx_sn_ldrop" * ]
+             [ "llpx_sn" "llpx_sn_alt" + "llpx_sn_leq" + "llpx_sn_ldrop" * ]
           }
         ]        
        [ { "basic local env. slicing" * } {
@@ -258,7 +258,7 @@ table {
         ]
         [ { "basic term relocation" * } {
              [ "lift_vector ( ⇧[?,?] ? ≡ ? )" "lift_lift_vector" * ]
-             [ "lift ( ⇧[?,?] ? ≡ ? )" "lift_lift" * ]
+             [ "lift ( ⇧[?,?] ? ≡ ? )" "lift_neg" + "lift_lift" * ]
           }
         ]
      }