]> matita.cs.unibo.it Git - helm.git/commitdiff
- name changes in the rediction rules
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Sun, 20 Apr 2014 19:25:00 +0000 (19:25 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Sun, 20 Apr 2014 19:25:00 +0000 (19:25 +0000)
- theory of extended substitution is active again, we hope to use it
to obtain a non-recurisive alternative definition of llpx_sn

49 files changed:
matita/matita/contribs/lambdadelta/apps_2/functional/rtm_step.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tstc.ma
matita/matita/contribs/lambdadelta/basic_2/computation/lsubc.ma
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy_cpy.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy_lift.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_alt.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_cpys.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_lift.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/extlrsubeq_4.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/lsuby.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/lsuby_lsuby.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubst_6.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubststar_6.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubststaralt_6.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeq_2.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeq_4.ma
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubst_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubststar_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubststaralt_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reduction/cnr.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cnr_crr.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cnx.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cnx_crx.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpr.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpr_lift.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpx.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpx_leq.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpx_lift.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/cpx_lleq.ma
matita/matita/contribs/lambdadelta/basic_2/reduction/lpr_lpr.ma
matita/matita/contribs/lambdadelta/basic_2/relocation/cpy.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/cpy_cpy.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/cpy_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/lsuby.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/relocation/lsuby_lsuby.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma
matita/matita/contribs/lambdadelta/basic_2/substitution/cpys.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_cpys.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl

index 5ca6add443d348d92279e20dbe94da507200ca96..e2d859b74bfac32601ffd7513cc3488566545091 100644 (file)
@@ -36,7 +36,7 @@ inductive rtm_step: relation rtm ≝
 | rtm_gtype : ∀G,V,u,E,S,p. p = |G| →
               rtm_step (mk_rtm (G. ⓛV) u E S (§p))
                        (mk_rtm G u E S V)
-| rtm_tau   : ∀G,u,E,S,W,T.
+| rtm_eps   : ∀G,u,E,S,W,T.
               rtm_step (mk_rtm G u E S (ⓝW. T))
                        (mk_rtm G u E S T)
 | rtm_appl  : ∀G,u,E,S,V,T.
index 45c8cfe7dddd88c5ab0f36be5360c9fa152ec825..e4c5460d09769a3c0285211a191baf0845baf0da 100644 (file)
@@ -91,9 +91,9 @@ lemma cprs_zeta: ∀G,L,V,T1,T,T2. ⇧[0, 1] T2 ≡ T →
 /3 width=3 by cprs_strap2, cpr_cprs, cpr_bind, cpr_zeta/
 qed.
 
-lemma cprs_tau: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡* T2.
+lemma cprs_eps: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡* T2.
 #G #L #T1 #T2 #H @(cprs_ind … H) -T2
-/3 width=3 by cprs_strap1, cpr_cprs, cpr_tau/
+/3 width=3 by cprs_strap1, cpr_cprs, cpr_eps/
 qed.
 
 lemma cprs_beta_dx: ∀a,G,L,V1,V2,W1,W2,T1,T2.
index 809bf173ccbe5c68bdc0e3d9a643ffc50681d202..8b073c157152018b84a52850fa8c1dfcb6678a55 100644 (file)
@@ -112,7 +112,7 @@ lemma lpr_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lpr G).
   elim (lpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct
   /4 width=6 by cprs_strap2, cprs_delta/
 |3,7: /4 width=1 by lpr_pair, cprs_bind, cprs_beta/
-|4,6: /3 width=1 by cprs_flat, cprs_tau/
+|4,6: /3 width=1 by cprs_flat, cprs_eps/
 |5,8: /4 width=3 by lpr_pair, cprs_zeta, cprs_theta, cprs_strap1/
 ]
 qed-.
index 36ef1b2a1e7273342644bec2450a9fcff4948156..8027a98db5d9fd55be50131b72e2b9a46bebf51e 100644 (file)
@@ -97,16 +97,16 @@ lemma cpxs_zeta: ∀h,g,G,L,V,T1,T,T2. ⇧[0, 1] T2 ≡ T →
 /3 width=3 by cpxs_strap2, cpx_cpxs, cpx_bind, cpx_zeta/
 qed.
 
-lemma cpxs_tau: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 →
+lemma cpxs_eps: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 →
                 ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡*[h, g] T2.
 #h #g #G #L #T1 #T2 #H @(cpxs_ind … H) -T2
-/3 width=3 by cpxs_strap1, cpx_cpxs, cpx_tau/
+/3 width=3 by cpxs_strap1, cpx_cpxs, cpx_eps/
 qed.
 
-lemma cpxs_ti: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 →
+lemma cpxs_ct: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 →
                ∀T. ⦃G, L⦄ ⊢ ⓝV1.T ➡*[h, g] V2.
 #h #g #G #L #V1 #V2 #H @(cpxs_ind … H) -V2
-/3 width=3 by cpxs_strap1, cpx_cpxs, cpx_ti/
+/3 width=3 by cpxs_strap1, cpx_cpxs, cpx_ct/
 qed.
 
 lemma cpxs_beta_dx: ∀h,g,a,G,L,V1,V2,W1,W2,T1,T2.
index fad7c97a5ace28125cbb857ba5de4f076f9cc72b..b6431c294bcee4fd18c9014c5527cb3fac1ce98e 100644 (file)
@@ -96,13 +96,13 @@ qed-.
 lemma lpx_cpx_trans: ∀h,g,G. s_r_transitive … (cpx h g G) (λ_.lpx h g G).
 #h #g #G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2
 [ /2 width=3 by/
-| /3 width=2 by cpx_cpxs, cpx_sort/
+| /3 width=2 by cpx_cpxs, cpx_st/
 | #I #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12
   elim (lpx_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
   elim (lpx_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct
   /4 width=7 by cpxs_delta, cpxs_strap2/
 |4,9: /4 width=1 by cpxs_beta, cpxs_bind, lpx_pair/
-|5,7,8: /3 width=1 by cpxs_flat, cpxs_ti, cpxs_tau/
+|5,7,8: /3 width=1 by cpxs_flat, cpxs_ct, cpxs_eps/
 | /4 width=3 by cpxs_zeta, lpx_pair/
 | /4 width=3 by cpxs_theta, cpxs_strap1, lpx_pair/
 ]
index eed76daea80e3c4738a0b34c453372d645c65f82..c0a202ae5db8fd6b56f6b89d86e555bcc8a08566 100644 (file)
@@ -34,7 +34,7 @@ elim (cpxs_inv_sort1 … H) -H #n #l generalize in match k; -k @(nat_ind_plus 
   elim (IHn … Hnl) -IHn
   [ #H lapply (tstc_inv_atom1 … H) -H #H >H -H /2 width=1 by or_intror/
   | generalize in match Hnl; -Hnl @(nat_ind_plus … n) -n
-    /4 width=3 by cpxs_strap2, cpx_sort, or_intror/
+    /4 width=3 by cpxs_strap2, cpx_st, or_intror/
   | >iter_SO >iter_n_Sm //
   ]
 ]
index e43f81978f3f7e61c233a7faec5ab4c5f51a5b0c..ccc10293373fffe39d5daa68e03ca55d2a7d4be9 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/lrsubeq_4.ma".
+include "basic_2/notation/relations/lrsubeqc_4.ma".
 include "basic_2/static/aaa.ma".
 include "basic_2/computation/acp_cr.ma".
 
@@ -27,7 +27,7 @@ inductive lsubc (RP) (G): relation lenv ≝
 
 interpretation
   "local environment refinement (abstract candidates of reducibility)"
-  'LRSubEq RP G L1 L2 = (lsubc RP G L1 L2).
+  'LRSubEqC RP G L1 L2 = (lsubc RP G L1 L2).
 
 (* Basic inversion lemmas ***************************************************)
 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy.etc
deleted file mode 100644 (file)
index a1e538a..0000000
+++ /dev/null
@@ -1,296 +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 "ground_2/ynat/ynat_max.ma".
-include "basic_2/notation/relations/psubst_6.ma".
-include "basic_2/grammar/genv.ma".
-include "basic_2/relocation/lsuby.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************)
-
-(* activate genv *)
-inductive cpy: ynat → ynat → relation4 genv lenv term term ≝
-| cpy_atom : ∀I,G,L,d,e. cpy d e G L (⓪{I}) (⓪{I})
-| cpy_subst: ∀I,G,L,K,V,W,i,d,e. d ≤ yinj i → i < d+e →
-             ⇩[i] L ≡ K.ⓑ{I}V → ⇧[0, i+1] V ≡ W → cpy d e G L (#i) W
-| cpy_bind : ∀a,I,G,L,V1,V2,T1,T2,d,e.
-             cpy d e G L V1 V2 → cpy (⫯d) e G (L.ⓑ{I}V1) T1 T2 →
-             cpy d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
-| cpy_flat : ∀I,G,L,V1,V2,T1,T2,d,e.
-             cpy d e G L V1 V2 → cpy d e G L T1 T2 →
-             cpy d e G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-.
-
-interpretation "context-sensitive extended ordinary substritution (term)"
-   'PSubst G L T1 d e T2 = (cpy d e G L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma lsuby_cpy_trans: ∀G,d,e. lsub_trans … (cpy d e G) (lsuby d e).
-#G #d #e #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -d -e
-[ //
-| #I #G #L1 #K1 #V #W #i #d #e #Hdi #Hide #HLK1 #HVW #L2 #HL12
-  elim (lsuby_ldrop_trans_be … HL12 … HLK1) -HL12 -HLK1 /2 width=5 by cpy_subst/
-| /4 width=1 by lsuby_succ, cpy_bind/
-| /3 width=1 by cpy_flat/
-]
-qed-.
-
-lemma cpy_refl: ∀G,T,L,d,e. ⦃G, L⦄ ⊢ T ▶[d, e] T.
-#G #T elim T -T // * /2 width=1 by cpy_bind, cpy_flat/
-qed.
-
-(* Basic_1: was: subst1_ex *)
-lemma cpy_full: ∀I,G,K,V,T1,L,d. ⇩[d] L ≡ K.ⓑ{I}V →
-                ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ▶[d, 1] T2 & ⇧[d, 1] T ≡ T2.
-#I #G #K #V #T1 elim T1 -T1
-[ * #i #L #d #HLK
-  /2 width=4 by lift_sort, lift_gref, ex2_2_intro/
-  elim (lt_or_eq_or_gt i d) #Hid
-  /3 width=4 by lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/
-  destruct
-  elim (lift_total V 0 (i+1)) #W #HVW
-  elim (lift_split … HVW i i)
-  /4 width=5 by cpy_subst, ylt_inj, ex2_2_intro/
-| * [ #a ] #J #W1 #U1 #IHW1 #IHU1 #L #d #HLK
-  elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
-  [ elim (IHU1 (L.ⓑ{J}W1) (d+1)) -IHU1
-    /3 width=9 by cpy_bind, ldrop_drop, lift_bind, ex2_2_intro/
-  | elim (IHU1 … HLK) -IHU1 -HLK
-    /3 width=8 by cpy_flat, lift_flat, ex2_2_intro/
-  ]
-]
-qed-.
-
-lemma cpy_weak: ∀G,L,T1,T2,d1,e1. ⦃G, L⦄ ⊢ T1 ▶[d1, e1] T2 →
-                ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
-                ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T2.
-#G #L #T1 #T2 #d1 #e1 #H elim H -G -L -T1 -T2 -d1 -e1 //
-[ /3 width=5 by cpy_subst, ylt_yle_trans, yle_trans/
-| /4 width=3 by cpy_bind, ylt_yle_trans, yle_succ/
-| /3 width=1 by cpy_flat/
-]
-qed-.
-
-lemma cpy_weak_top: ∀G,L,T1,T2,d,e.
-                    ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶[d, |L| - d] T2.
-#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e //
-[ #I #G #L #K #V #W #i #d #e #Hdi #_ #HLK #HVW
-  lapply (ldrop_fwd_length_lt2 … HLK)
-  /4 width=5 by cpy_subst, ylt_yle_trans, ylt_inj/
-| #a #I #G #L #V1 #V2 normalize in match (|L.ⓑ{I}V2|); (**) (* |?| does not work *)
-  /2 width=1 by cpy_bind/
-| /2 width=1 by cpy_flat/
-]
-qed-.
-
-lemma cpy_weak_full: ∀G,L,T1,T2,d,e.
-                     ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶[0, |L|] T2.
-#G #L #T1 #T2 #d #e #HT12
-lapply (cpy_weak … HT12 0 (d + e) ? ?) -HT12
-/2 width=2 by cpy_weak_top/
-qed-.
-
-lemma cpy_split_up: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀i. i ≤ d + e →
-                    ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d, i-d] T & ⦃G, L⦄ ⊢ T ▶[i, d+e-i] T2.
-#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
-[ /2 width=3 by ex2_intro/
-| #I #G #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hjde
-  elim (ylt_split i j) [ -Hide -Hjde | -Hdi ]
-  /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/
-| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
-  elim (IHV12 i) -IHV12 // #V
-  elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hide
-  >yplus_SO2 >yplus_succ1 #T #HT1 #HT2
-  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2
-  /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/
-| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
-  elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hide
-  /3 width=5 by ex2_intro, cpy_flat/
-]
-qed-.
-
-lemma cpy_split_down: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀i. i ≤ d + e →
-                      ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[i, d+e-i] T & ⦃G, L⦄ ⊢ T ▶[d, i-d] T2.
-#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
-[ /2 width=3 by ex2_intro/
-| #I #G #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hjde
-  elim (ylt_split i j) [ -Hide -Hjde | -Hdi ]
-  /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/
-| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
-  elim (IHV12 i) -IHV12 // #V
-  elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hide
-  >yplus_SO2 >yplus_succ1 #T #HT1 #HT2
-  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2
-  /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/
-| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
-  elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hide
-  /3 width=5 by ex2_intro, cpy_flat/
-]
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma cpy_fwd_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                  ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                  d ≤ dt → d + e ≤ dt + et →
-                  ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶[d+e, dt+et-(d+e)] U2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
-[ * #i #G #L #dt #et #T1 #d #e #H #_
-  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
-  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  ]
-| #I #G #L #K #V #W #i #dt #et #Hdti #Hidet #HLK #HVW #T1 #d #e #H #Hddt #Hdedet
-  elim (lift_inv_lref2 … H) -H * #Hid #H destruct [ -V -Hidet -Hdedet | -Hdti -Hddt ]
-  [ elim (ylt_yle_false … Hddt) -Hddt /3 width=3 by yle_ylt_trans, ylt_inj/
-  | elim (le_inv_plus_l … Hid) #Hdie #Hei
-    elim (lift_split … HVW d (i-e+1) ? ? ?) [2,3,4: /2 width=1 by le_S_S, le_S/ ] -Hdie
-    #T2 #_ >plus_minus // <minus_minus /2 width=1 by le_S/ <minus_n_n <plus_n_O #H -Hei
-    @(ex2_intro … H) -H @(cpy_subst … HLK HVW) /2 width=1 by yle_inj/ >ymax_pre_sn_comm // (**) (* explicit constructor *)
-  ]
-| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #X #d #e #H #Hddt #Hdedet
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HVW1) -V1 -IHW12 //
-  elim (IHU12 … HTU1) -T1 -IHU12 /2 width=1 by yle_succ/
-  <yplus_inj >yplus_SO2 >yplus_succ1 >yplus_succ1
-  /3 width=2 by cpy_bind, lift_bind, ex2_intro/
-| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #X #d #e #H #Hddt #Hdedet
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HVW1) -V1 -IHW12 // elim (IHU12 … HTU1) -T1 -IHU12
-  /3 width=2 by cpy_flat, lift_flat, ex2_intro/
-]
-qed-.
-
-lemma cpy_fwd_tw: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ♯{T1} ≤ ♯{T2}.
-#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e normalize
-/3 width=1 by monotonic_le_plus_l, le_plus/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact cpy_inv_atom1_aux: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀J. T1 = ⓪{J} →
-                        T2 = ⓪{J} ∨
-                        ∃∃I,K,V,i. d ≤ yinj i & i < d + e &
-                                   ⇩[i] L ≡ K.ⓑ{I}V &
-                                   ⇧[O, i+1] V ≡ T2 &
-                                   J = LRef i.
-#G #L #T1 #T2 #d #e * -G -L -T1 -T2 -d -e
-[ #I #G #L #d #e #J #H destruct /2 width=1 by or_introl/
-| #I #G #L #K #V #T2 #i #d #e #Hdi #Hide #HLK #HVT2 #J #H destruct /3 width=9 by ex5_4_intro, or_intror/
-| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
-| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
-]
-qed-.
-
-lemma cpy_inv_atom1: ∀I,G,L,T2,d,e. ⦃G, L⦄ ⊢ ⓪{I} ▶[d, e] T2 →
-                     T2 = ⓪{I} ∨
-                     ∃∃J,K,V,i. d ≤ yinj i & i < d + e &
-                                ⇩[i] L ≡ K.ⓑ{J}V &
-                                ⇧[O, i+1] V ≡ T2 &
-                                I = LRef i.
-/2 width=4 by cpy_inv_atom1_aux/ qed-.
-
-(* Basic_1: was: subst1_gen_sort *)
-lemma cpy_inv_sort1: ∀G,L,T2,k,d,e. ⦃G, L⦄ ⊢ ⋆k ▶[d, e] T2 → T2 = ⋆k.
-#G #L #T2 #k #d #e #H
-elim (cpy_inv_atom1 … H) -H //
-* #I #K #V #i #_ #_ #_ #_ #H destruct
-qed-.
-
-(* Basic_1: was: subst1_gen_lref *)
-lemma cpy_inv_lref1: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶[d, e] T2 →
-                     T2 = #i ∨
-                     ∃∃I,K,V. d ≤ i & i < d + e &
-                              ⇩[i] L ≡ K.ⓑ{I}V &
-                              ⇧[O, i+1] V ≡ T2.
-#G #L #T2 #i #d #e #H
-elim (cpy_inv_atom1 … H) -H /2 width=1 by or_introl/
-* #I #K #V #j #Hdj #Hjde #HLK #HVT2 #H destruct /3 width=5 by ex4_3_intro, or_intror/
-qed-.
-
-lemma cpy_inv_gref1: ∀G,L,T2,p,d,e. ⦃G, L⦄ ⊢ §p ▶[d, e] T2 → T2 = §p.
-#G #L #T2 #p #d #e #H
-elim (cpy_inv_atom1 … H) -H //
-* #I #K #V #i #_ #_ #_ #_ #H destruct
-qed-.
-
-fact cpy_inv_bind1_aux: ∀G,L,U1,U2,d,e. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 →
-                        ∀a,I,V1,T1. U1 = ⓑ{a,I}V1.T1 →
-                        ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
-                                 ⦃G, L. ⓑ{I}V1⦄ ⊢ T1 ▶[⫯d, e] T2 &
-                                 U2 = ⓑ{a,I}V2.T2.
-#G #L #U1 #U2 #d #e * -G -L -U1 -U2 -d -e
-[ #I #G #L #d #e #b #J #W1 #U1 #H destruct
-| #I #G #L #K #V #W #i #d #e #_ #_ #_ #_ #b #J #W1 #U1 #H destruct
-| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #b #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
-| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #b #J #W1 #U1 #H destruct
-]
-qed-.
-
-lemma cpy_inv_bind1: ∀a,I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓑ{a,I} V1. T1 ▶[d, e] U2 →
-                     ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
-                              ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶[⫯d, e] T2 &
-                              U2 = ⓑ{a,I}V2.T2.
-/2 width=3 by cpy_inv_bind1_aux/ qed-.
-
-fact cpy_inv_flat1_aux: ∀G,L,U1,U2,d,e. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 →
-                        ∀I,V1,T1. U1 = ⓕ{I}V1.T1 →
-                        ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
-                                 ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 &
-                                 U2 = ⓕ{I}V2.T2.
-#G #L #U1 #U2 #d #e * -G -L -U1 -U2 -d -e
-[ #I #G #L #d #e #J #W1 #U1 #H destruct
-| #I #G #L #K #V #W #i #d #e #_ #_ #_ #_ #J #W1 #U1 #H destruct
-| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #J #W1 #U1 #H destruct
-| #I #G #L #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma cpy_inv_flat1: ∀I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ▶[d, e] U2 →
-                     ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
-                              ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 &
-                              U2 = ⓕ{I}V2.T2.
-/2 width=3 by cpy_inv_flat1_aux/ qed-.
-
-
-fact cpy_inv_refl_O2_aux: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → e = 0 → T1 = T2.
-#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
-[ //
-| #I #G #L #K #V #W #i #d #e #Hdi #Hide #_ #_ #H destruct
-  elim (ylt_yle_false … Hdi) -Hdi //
-| /3 width=1 by eq_f2/
-| /3 width=1 by eq_f2/
-]
-qed-.
-
-lemma cpy_inv_refl_O2: ∀G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▶[d, 0] T2 → T1 = T2.
-/2 width=6 by cpy_inv_refl_O2_aux/ qed-.
-
-(* Basic_1: was: subst1_gen_lift_eq *)
-lemma cpy_inv_lift1_eq: ∀G,T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
-                        ∀L,U2. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 → U1 = U2.
-#G #T1 #U1 #d #e #HTU1 #L #U2 #HU12 elim (cpy_fwd_up … HU12 … HTU1) -HU12 -HTU1
-/2 width=4 by cpy_inv_refl_O2/
-qed-.
-
-(* Basic_1: removed theorems 25:
-            subst0_gen_sort subst0_gen_lref subst0_gen_head subst0_gen_lift_lt
-            subst0_gen_lift_false subst0_gen_lift_ge subst0_refl subst0_trans
-            subst0_lift_lt subst0_lift_ge subst0_lift_ge_S subst0_lift_ge_s
-            subst0_subst0 subst0_subst0_back subst0_weight_le subst0_weight_lt
-            subst0_confluence_neq subst0_confluence_eq subst0_tlt_head
-            subst0_confluence_lift subst0_tlt
-            subst1_head subst1_gen_head subst1_lift_S subst1_confluence_lift
-*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy_cpy.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy_cpy.etc
deleted file mode 100644 (file)
index 66b0487..0000000
+++ /dev/null
@@ -1,122 +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/cpy_lift.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: subst1_confluence_eq *)
-theorem cpy_conf_eq: ∀G,L,T0,T1,d1,e1. ⦃G, L⦄ ⊢ T0 ▶[d1, e1] T1 →
-                     ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 →
-                     ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T2 ▶[d1, e1] T.
-#G #L #T0 #T1 #d1 #e1 #H elim H -G -L -T0 -T1 -d1 -e1
-[ /2 width=3 by ex2_intro/
-| #I1 #G #L #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #T2 #d2 #e2 #H
-  elim (cpy_inv_lref1 … H) -H
-  [ #HX destruct /3 width=7 by cpy_subst, ex2_intro/
-  | -Hd1 -Hde1 * #I2 #K2 #V2 #_ #_ #HLK2 #HVT2
-    lapply (ldrop_mono … HLK1 … HLK2) -HLK1 -HLK2 #H destruct
-    >(lift_mono … HVT1 … HVT2) -HVT1 -HVT2 /2 width=3 by ex2_intro/
-  ]
-| #a #I #G #L #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
-  elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02) -IHV01 -HV02 #V #HV1 #HV2
-  elim (IHT01 … HT02) -T0 #T #HT1 #HT2
-  lapply (lsuby_cpy_trans … HT1 (L.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/
-  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V2) ?) -HT2
-  /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/
-| #I #G #L #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
-  elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02) -V0
-  elim (IHT01 … HT02) -T0 /3 width=5 by cpy_flat, ex2_intro/
-]
-qed-.
-
-(* Basic_1: was: subst1_confluence_neq *)
-theorem cpy_conf_neq: ∀G,L1,T0,T1,d1,e1. ⦃G, L1⦄ ⊢ T0 ▶[d1, e1] T1 →
-                      ∀L2,T2,d2,e2. ⦃G, L2⦄ ⊢ T0 ▶[d2, e2] T2 →
-                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
-                      ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L1⦄ ⊢ T2 ▶[d1, e1] T.
-#G #L1 #T0 #T1 #d1 #e1 #H elim H -G -L1 -T0 -T1 -d1 -e1
-[ /2 width=3 by ex2_intro/
-| #I1 #G #L1 #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #L2 #T2 #d2 #e2 #H1 #H2
-  elim (cpy_inv_lref1 … H1) -H1
-  [ #H destruct /3 width=7 by cpy_subst, ex2_intro/
-  | -HLK1 -HVT1 * #I2 #K2 #V2 #Hd2 #Hde2 #_ #_ elim H2 -H2 #Hded [ -Hd1 -Hde2 | -Hd2 -Hde1 ]
-    [ elim (ylt_yle_false … Hde1) -Hde1 /2 width=3 by yle_trans/
-    | elim (ylt_yle_false … Hde2) -Hde2 /2 width=3 by yle_trans/
-    ]
-  ]
-| #a #I #G #L1 #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
-  elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02 H) -IHV01 -HV02 #V #HV1 #HV2
-  elim (IHT01 … HT02) -T0
-  [ -H #T #HT1 #HT2
-    lapply (lsuby_cpy_trans … HT1 (L2.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/
-    lapply (lsuby_cpy_trans … HT2 (L1.ⓑ{I}V2) ?) -HT2 /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/
-  | -HV1 -HV2 elim H -H /3 width=1 by yle_succ, or_introl, or_intror/
-  ]
-| #I #G #L1 #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
-  elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02 H) -V0
-  elim (IHT01 … HT02 H) -T0 -H /3 width=5 by cpy_flat, ex2_intro/
-]
-qed-.
-
-(* Note: the constant 1 comes from cpy_subst *)
-(* Basic_1: was: subst1_trans *)
-theorem cpy_trans_ge: ∀G,L,T1,T0,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T0 →
-                      ∀T2. ⦃G, L⦄ ⊢ T0 ▶[d, 1] T2 → 1 ≤ e → ⦃G, L⦄ ⊢ T1 ▶[d, e] T2.
-#G #L #T1 #T0 #d #e #H elim H -G -L -T1 -T0 -d -e
-[ #I #G #L #d #e #T2 #H #He
-  elim (cpy_inv_atom1 … H) -H
-  [ #H destruct //
-  | * #J #K #V #i #Hd2i #Hide2 #HLK #HVT2 #H destruct
-    lapply (ylt_yle_trans … (d+e) … Hide2) /2 width=5 by cpy_subst, monotonic_yle_plus_dx/
-  ]
-| #I #G #L #K #V #V2 #i #d #e #Hdi #Hide #HLK #HVW #T2 #HVT2 #He
-  lapply (cpy_weak … HVT2 0 (i+1) ? ?) -HVT2 /3 width=1 by yle_plus_dx2_trans, yle_succ/
-  >yplus_inj #HVT2 <(cpy_inv_lift1_eq … HVW … HVT2) -HVT2 /2 width=5 by cpy_subst/
-| #a #I #G #L #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
-  elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct
-  lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02
-  lapply (IHT10 … HT02 He) -T0 /3 width=1 by cpy_bind/
-| #I #G #L #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
-  elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct /3 width=1 by cpy_flat/
-]
-qed-.
-
-theorem cpy_trans_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶[d1, e1] T0 →
-                        ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 → d2 + e2 ≤ d1 →
-                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T ▶[d1, e1] T2.
-#G #L #T1 #T0 #d1 #e1 #H elim H -G -L -T1 -T0 -d1 -e1
-[ /2 width=3 by ex2_intro/
-| #I #G #L #K #V #W #i1 #d1 #e1 #Hdi1 #Hide1 #HLK #HVW #T2 #d2 #e2 #HWT2 #Hde2d1
-  lapply (yle_trans … Hde2d1 … Hdi1) -Hde2d1 #Hde2i1
-  lapply (cpy_weak … HWT2 0 (i1+1) ? ?) -HWT2 /3 width=1 by yle_succ, yle_pred_sn/ -Hde2i1
-  >yplus_inj #HWT2 <(cpy_inv_lift1_eq … HVW … HWT2) -HWT2 /3 width=9 by cpy_subst, ex2_intro/
-| #a #I #G #L #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
-  elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02
-  elim (IHV10 … HV02) -IHV10 -HV02 // #V
-  elim (IHT10 … HT02) -T0 /2 width=1 by yle_succ/ #T #HT1 #HT2
-  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 /3 width=6 by cpy_bind, lsuby_succ, ex2_intro/
-| #I #G #L #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
-  elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV10 … HV02) -V0 //
-  elim (IHT10 … HT02) -T0 /3 width=6 by cpy_flat, ex2_intro/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpy_lift.etc
deleted file mode 100644 (file)
index aa0b241..0000000
+++ /dev/null
@@ -1,249 +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_ldrop.ma".
-include "basic_2/relocation/cpy.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************)
-
-(* Properties on relocation *************************************************)
-
-(* Basic_1: was: subst1_lift_lt *)
-lemma cpy_lift_le: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
-                   ∀L,U1,U2,s,d,e. ⇩[s, d, e] L ≡ K →
-                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
-                   dt + et ≤ d → ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2.
-#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
-[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_
-  >(lift_mono … H1 … H2) -H1 -H2 //
-| #I #G #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #s #d #e #HLK #H #HWU2 #Hdetd
-  lapply (ylt_yle_trans … Hdetd … Hidet) -Hdetd #Hid
-  lapply (ylt_inv_inj … Hid) -Hid #Hid
-  lapply (lift_inv_lref1_lt … H … Hid) -H #H destruct
-  elim (lift_trans_ge … HVW … HWU2) -W // <minus_plus #W #HVW #HWU2
-  elim (ldrop_trans_le … HLK … HKV) -K /2 width=2 by lt_to_le/ #X #HLK #H
-  elim (ldrop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hid #K #Y #_ #HVY
-  >(lift_mono … HVY … HVW) -Y -HVW #H destruct /2 width=5 by cpy_subst/
-| #a #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdetd
-  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  /4 width=7 by cpy_bind, ldrop_skip, yle_succ/
-| #G #I #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdetd
-  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  /3 width=7 by cpy_flat/
-]
-qed-.
-
-lemma cpy_lift_be: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
-                   ∀L,U1,U2,s,d,e. ⇩[s, d, e] L ≡ K →
-                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
-                   dt ≤ d → d ≤ dt + et → ⦃G, L⦄ ⊢ U1 ▶[dt, et + e] U2.
-#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
-[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_ #_
-  >(lift_mono … H1 … H2) -H1 -H2 //
-| #I #G #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #s #d #e #HLK #H #HWU2 #Hdtd #_
-  elim (lift_inv_lref1 … H) -H * #Hid #H destruct
-  [ -Hdtd
-    lapply (ylt_yle_trans … (dt+et+e) … Hidet) // -Hidet #Hidete
-    elim (lift_trans_ge … HVW … HWU2) -W // <minus_plus #W #HVW #HWU2
-    elim (ldrop_trans_le … HLK … HKV) -K /2 width=2 by lt_to_le/ #X #HLK #H
-    elim (ldrop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hid #K #Y #_ #HVY
-    >(lift_mono … HVY … HVW) -V #H destruct /2 width=5 by cpy_subst/
-  | -Hdti
-    elim (yle_inv_inj2 … Hdtd) -Hdtd #dtt #Hdtd #H destruct
-    lapply (transitive_le … Hdtd Hid) -Hdtd #Hdti
-    lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2
-    lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid
-    /4 width=5 by cpy_subst, ldrop_inv_gen, monotonic_ylt_plus_dx, yle_plus_dx1_trans, yle_inj/
-  ]
-| #a #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdtd #Hddet
-  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  /4 width=7 by cpy_bind, ldrop_skip, yle_succ/
-| #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdetd
-  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  /3 width=7 by cpy_flat/
-]
-qed-.
-
-(* Basic_1: was: subst1_lift_ge *)
-lemma cpy_lift_ge: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
-                   ∀L,U1,U2,s,d,e. ⇩[s, d, e] L ≡ K →
-                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
-                   d ≤ dt → ⦃G, L⦄ ⊢ U1 ▶[dt+e, et] U2.
-#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
-[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_
-  >(lift_mono … H1 … H2) -H1 -H2 //
-| #I #G #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #s #d #e #HLK #H #HWU2 #Hddt
-  lapply (yle_trans … Hddt … Hdti) -Hddt #Hid
-  elim (yle_inv_inj2 … Hid) -Hid #dd #Hddi #H0 destruct
-  lapply (lift_inv_lref1_ge … H … Hddi) -H #H destruct
-  lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2
-  lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hddi
-  /3 width=5 by cpy_subst, ldrop_inv_gen, monotonic_ylt_plus_dx, monotonic_yle_plus_dx/
-| #a #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hddt
-  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  /4 width=6 by cpy_bind, ldrop_skip, yle_succ/
-| #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hddt
-  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  /3 width=6 by cpy_flat/
-]
-qed-.
-
-(* Inversion lemmas on relocation *******************************************)
-
-(* Basic_1: was: subst1_gen_lift_lt *)
-lemma cpy_inv_lift1_le: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                        ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                        dt + et ≤ d →
-                        ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
-[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_
-  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
-  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  ]
-| #I #G #L #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #s #d #e #HLK #T1 #H #Hdetd
-  lapply (ylt_yle_trans … Hdetd … Hidet) -Hdetd #Hid
-  lapply (ylt_inv_inj … Hid) -Hid #Hid
-  lapply (lift_inv_lref2_lt … H … Hid) -H #H destruct
-  elim (ldrop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV
-  elim (lift_trans_le … HUV … HVW) -V // >minus_plus <plus_minus_m_m // -Hid /3 width=5 by cpy_subst, ex2_intro/
-| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2
-  elim (IHU12 … HTU1) -IHU12 -HTU1
-  /3 width=6 by cpy_bind, yle_succ, ldrop_skip, lift_bind, ex2_intro/
-| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HLK … HVW1) -W1 //
-  elim (IHU12 … HLK … HTU1) -U1 -HLK
-  /3 width=5 by cpy_flat, lift_flat, ex2_intro/
-]
-qed-.
-
-lemma cpy_inv_lift1_be: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                        ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                        dt ≤ d → yinj d + e ≤ dt + et →
-                        ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, et-e] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
-[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_ #_
-  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
-  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  ]
-| #I #G #L #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #s #d #e #HLK #T1 #H #Hdtd #Hdedet
-  lapply (yle_fwd_plus_ge_inj … Hdtd Hdedet) #Heet
-  elim (lift_inv_lref2 … H) -H * #Hid #H destruct [ -Hdtd -Hidet | -Hdti -Hdedet ]
-  [ lapply (ylt_yle_trans i d (dt+(et-e)) ? ?) /2 width=1 by ylt_inj/
-    [ >yplus_minus_assoc_inj /2 width=1 by yle_plus_to_minus_inj2/ ] -Hdedet #Hidete
-    elim (ldrop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV
-    elim (lift_trans_le … HUV … HVW) -V // >minus_plus <plus_minus_m_m // -Hid
-    /3 width=5 by cpy_subst, ex2_intro/
-  | elim (le_inv_plus_l … Hid) #Hdie #Hei
-    lapply (yle_trans … Hdtd (i-e) ?) /2 width=1 by yle_inj/ -Hdtd #Hdtie
-    lapply (ldrop_conf_ge … HLK … HLKV ?) -L // #HKV
-    elim (lift_split … HVW d (i-e+1)) -HVW [2,3,4: /2 width=1 by le_S_S, le_S/ ] -Hid -Hdie
-    #V1 #HV1 >plus_minus // <minus_minus /2 width=1 by le_S/ <minus_n_n <plus_n_O #H
-    @(ex2_intro … H) @(cpy_subst … HKV HV1) // (**) (* explicit constructor *)
-    >yplus_minus_assoc_inj /3 width=1 by monotonic_ylt_minus_dx, yle_inj/
-  ]
-| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdtd #Hdedet
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2
-  elim (IHU12 … HTU1) -U1
-  /3 width=6 by cpy_bind, ldrop_skip, lift_bind, yle_succ, ex2_intro/
-| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdtd #Hdedet
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HLK … HVW1) -W1 //
-  elim (IHU12 … HLK … HTU1) -U1 -HLK //
-  /3 width=5 by cpy_flat, lift_flat, ex2_intro/
-]
-qed-.
-
-(* Basic_1: was: subst1_gen_lift_ge *)
-lemma cpy_inv_lift1_ge: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                        ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                        yinj d + e ≤ dt →
-                        ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt-e, et] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
-[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_
-  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
-  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
-  ]
-| #I #G #L #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #s #d #e #HLK #T1 #H #Hdedt
-  lapply (yle_trans … Hdedt … Hdti) #Hdei
-  elim (yle_inv_plus_inj2 … Hdedt) -Hdedt #_ #Hedt
-  elim (yle_inv_plus_inj2 … Hdei) #Hdie #Hei
-  lapply (lift_inv_lref2_ge  … H ?) -H /2 width=1 by yle_inv_inj/ #H destruct
-  lapply (ldrop_conf_ge … HLK … HLKV ?) -L /2 width=1 by yle_inv_inj/ #HKV
-  elim (lift_split … HVW d (i-e+1)) -HVW [2,3,4: /3 width=1 by yle_inv_inj, le_S_S, le_S/ ] -Hdei -Hdie
-  #V0 #HV10 >plus_minus /2 width=1 by yle_inv_inj/ <minus_minus /3 width=1 by yle_inv_inj, le_S/ <minus_n_n <plus_n_O #H
-  @(ex2_intro … H) @(cpy_subst … HKV HV10) (**) (* explicit constructor *)
-  [ /2 width=1 by monotonic_yle_minus_dx/
-  | <yplus_minus_comm_inj /2 width=1 by monotonic_ylt_minus_dx/
-  ]
-| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (yle_inv_plus_inj2 … Hdetd) #_ #Hedt
-  elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2
-  elim (IHU12 … HTU1) -U1 [4: @ldrop_skip // |2,5: skip |3: /2 width=1 by yle_succ/ ]
-  >yminus_succ1_inj /3 width=5 by cpy_bind, lift_bind, ex2_intro/
-| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
-  elim (IHW12 … HLK … HVW1) -W1 //
-  elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5 by cpy_flat, lift_flat, ex2_intro/
-]
-qed-.
-
-(* Advancd inversion lemmas on relocation ***********************************)
-
-lemma cpy_inv_lift1_ge_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                           ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                           d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
-                           ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[d, dt + et - (yinj d + e)] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
-elim (cpy_split_up … HU12 (d + e)) -HU12 // -Hdedet #U #HU1 #HU2
-lapply (cpy_weak … HU1 d e ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hddt -Hdtde #HU1
-lapply (cpy_inv_lift1_eq … HTU1 … HU1) -HU1 #HU1 destruct
-elim (cpy_inv_lift1_ge … HU2 … HLK … HTU1) -U -L /2 width=3 by ex2_intro/
-qed-.
-
-lemma cpy_inv_lift1_be_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                           ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                           dt ≤ d → dt + et ≤ yinj d + e →
-                           ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, d-dt] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde
-lapply (cpy_weak … HU12 dt (d+e-dt) ? ?) -HU12 //
-[ >ymax_pre_sn_comm /2 width=1 by yle_plus_dx1_trans/ ] -Hdetde #HU12
-elim (cpy_inv_lift1_be … HU12 … HLK … HTU1) -U1 -L /2 width=3 by ex2_intro/
-qed-.
-
-lemma cpy_inv_lift1_le_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
-                           ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                           dt ≤ d → d ≤ dt + et → dt + et ≤ yinj d + e →
-                           ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde
-elim (cpy_split_up … HU12 d) -HU12 // #U #HU1 #HU2
-elim (cpy_inv_lift1_le … HU1 … HLK … HTU1) -U1
-[2: >ymax_pre_sn_comm // ] -Hdtd #T #HT1 #HTU
-lapply (cpy_weak … HU2 d e ? ?) -HU2 //
-[ >ymax_pre_sn_comm // ] -Hddet -Hdetde #HU2
-lapply (cpy_inv_lift1_eq … HTU … HU2) -L #H destruct /2 width=3 by ex2_intro/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys.etc
deleted file mode 100644 (file)
index 10c5912..0000000
+++ /dev/null
@@ -1,166 +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/psubststar_6.ma".
-include "basic_2/relocation/cpy.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
-
-definition cpys: ynat → ynat → relation4 genv lenv term term ≝
-                 λd,e,G. LTC … (cpy d e G).
-
-interpretation "context-sensitive extended multiple substritution (term)"
-   'PSubstStar G L T1 d e T2 = (cpys d e G L T1 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma cpys_ind: ∀G,L,T1,d,e. ∀R:predicate term. R T1 →
-                (∀T,T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T → ⦃G, L⦄ ⊢ T ▶[d, e] T2 → R T → R T2) →
-                ∀T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R T2.
-#G #L #T1 #d #e #R #HT1 #IHT1 #T2 #HT12
-@(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-
-lemma cpys_ind_dx: ∀G,L,T2,d,e. ∀R:predicate term. R T2 →
-                   (∀T1,T. ⦃G, L⦄ ⊢ T1 ▶[d, e] T → ⦃G, L⦄ ⊢ T ▶*[d, e] T2 → R T → R T1) →
-                   ∀T1. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R T1.
-#G #L #T2 #d #e #R #HT2 #IHT2 #T1 #HT12
-@(TC_star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma cpy_cpys: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
-/2 width=1 by inj/ qed.
-
-lemma cpys_strap1: ∀G,L,T1,T,T2,d,e.
-                   ⦃G, L⦄ ⊢ T1 ▶*[d, e] T → ⦃G, L⦄ ⊢ T ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
-normalize /2 width=3 by step/ qed-.
-
-lemma cpys_strap2: ∀G,L,T1,T,T2,d,e.
-                   ⦃G, L⦄ ⊢ T1 ▶[d, e] T → ⦃G, L⦄ ⊢ T ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
-normalize /2 width=3 by TC_strap/ qed-.
-
-lemma lsuby_cpys_trans: ∀G,d,e. lsub_trans … (cpys d e G) (lsuby d e).
-/3 width=5 by lsuby_cpy_trans, LTC_lsub_trans/
-qed-.
-
-lemma cpys_refl: ∀G,L,d,e. reflexive … (cpys d e G L).
-/2 width=1 by cpy_cpys/ qed.
-
-lemma cpys_bind: ∀G,L,V1,V2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
-                 ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 →
-                 ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[d, e] ⓑ{a,I}V2.T2.
-#G #L #V1 #V2 #d #e #HV12 @(cpys_ind … HV12) -V2
-[ #I #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_bind/
-| /3 width=5 by cpys_strap1, cpy_bind/
-]
-qed.
-
-lemma cpys_flat: ∀G,L,V1,V2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
-                 ∀T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 →
-                 ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[d, e] ⓕ{I}V2.T2.
-#G #L #V1 #V2 #d #e #HV12 @(cpys_ind … HV12) -V2
-[ #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_flat/
-| /3 width=5 by cpys_strap1, cpy_flat/
-qed.
-
-lemma cpys_weak: ∀G,L,T1,T2,d1,e1. ⦃G, L⦄ ⊢ T1 ▶*[d1, e1] T2 →
-                 ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
-                 ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T2.
-#G #L #T1 #T2 #d1 #e1 #H #d1 #d2 #Hd21 #Hde12 @(cpys_ind … H) -T2
-/3 width=7 by cpys_strap1, cpy_weak/
-qed-.
-
-lemma cpys_weak_top: ∀G,L,T1,T2,d,e.
-                     ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, |L| - d] T2.
-#G #L #T1 #T2 #d #e #H @(cpys_ind … H) -T2
-/3 width=4 by cpys_strap1, cpy_weak_top/
-qed-.
-
-lemma cpys_weak_full: ∀G,L,T1,T2,d,e.
-                      ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[0, |L|] T2.
-#G #L #T1 #T2 #d #e #H @(cpys_ind … H) -T2
-/3 width=5 by cpys_strap1, cpy_weak_full/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma cpys_fwd_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                   ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                   d ≤ dt → d + e ≤ dt + et →
-                   ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶*[d+e, dt+et-(d+e)] U2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #T1 #d #e #HTU1 #Hddt #Hdedet @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HU1 #HTU
-  elim (cpy_fwd_up … HU2 … HTU) -HU2 -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-lemma cpys_fwd_tw: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ♯{T1} ≤ ♯{T2}.
-#G #L #T1 #T2 #d #e #H @(cpys_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1 lapply (cpy_fwd_tw … HT2) -HT2
-/2 width=3 by transitive_le/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Note: this can be derived from cpys_inv_atom1 *)
-lemma cpys_inv_sort1: ∀G,L,T2,k,d,e. ⦃G, L⦄ ⊢ ⋆k ▶*[d, e] T2 → T2 = ⋆k.
-#G #L #T2 #k #d #e #H @(cpys_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1 destruct
->(cpy_inv_sort1 … HT2) -HT2 //
-qed-.
-
-(* Note: this can be derived from cpys_inv_atom1 *)
-lemma cpys_inv_gref1: ∀G,L,T2,p,d,e. ⦃G, L⦄ ⊢ §p ▶*[d, e] T2 → T2 = §p.
-#G #L #T2 #p #d #e #H @(cpys_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1 destruct
->(cpy_inv_gref1 … HT2) -HT2 //
-qed-.
-
-lemma cpys_inv_bind1: ∀a,I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[d, e] U2 →
-                      ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 &
-                               ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 &
-                               U2 = ⓑ{a,I}V2.T2.
-#a #I #G #L #V1 #T1 #U2 #d #e #H @(cpys_ind … H) -U2
-[ /2 width=5 by ex3_2_intro/
-| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
-  elim (cpy_inv_bind1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H
-  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V1) ?) -HT2
-  /3 width=5 by cpys_strap1, lsuby_succ, ex3_2_intro/
-]
-qed-.
-
-lemma cpys_inv_flat1: ∀I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[d, e] U2 →
-                      ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 & ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 &
-                               U2 = ⓕ{I}V2.T2.
-#I #G #L #V1 #T1 #U2 #d #e #H @(cpys_ind … H) -U2
-[ /2 width=5 by ex3_2_intro/
-| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
-  elim (cpy_inv_flat1 … HU2) -HU2
-  /3 width=5 by cpys_strap1, ex3_2_intro/
-]
-qed-.
-
-lemma cpys_inv_refl_O2: ∀G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▶*[d, 0] T2 → T1 = T2.
-#G #L #T1 #T2 #d #H @(cpys_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1 <(cpy_inv_refl_O2 … HT2) -HT2 //
-qed-.
-
-lemma cpys_inv_lift1_eq: ∀G,L,U1,U2. ∀d,e:nat.
-                         ⦃G, L⦄ ⊢ U1 ▶*[d, e] U2 → ∀T1. ⇧[d, e] T1 ≡ U1 → U1 = U2.
-#G #L #U1 #U2 #d #e #H #T1 #HTU1 @(cpys_ind … H) -U2
-/2 width=7 by cpy_inv_lift1_eq/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_alt.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_alt.etc
deleted file mode 100644 (file)
index e297be6..0000000
+++ /dev/null
@@ -1,102 +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/psubststaralt_6.ma".
-include "basic_2/substitution/cpys_lift.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
-
-(* alternative definition of cpys *)
-inductive cpysa: ynat → ynat → relation4 genv lenv term term ≝
-| cpysa_atom : ∀I,G,L,d,e. cpysa d e G L (⓪{I}) (⓪{I})
-| cpysa_subst: ∀I,G,L,K,V1,V2,W2,i,d,e. d ≤ yinj i → i < d+e →
-               ⇩[i] L ≡ K.ⓑ{I}V1 → cpysa 0 (⫰(d+e-i)) G K V1 V2 →
-               ⇧[0, i+1] V2 ≡ W2 → cpysa d e G L (#i) W2
-| cpysa_bind : ∀a,I,G,L,V1,V2,T1,T2,d,e.
-               cpysa d e G L V1 V2 → cpysa (⫯d) e G (L.ⓑ{I}V1) T1 T2 →
-               cpysa d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
-| cpysa_flat : ∀I,G,L,V1,V2,T1,T2,d,e.
-               cpysa d e G L V1 V2 → cpysa d e G L T1 T2 →
-               cpysa d e G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-.
-
-interpretation
-   "context-sensitive extended multiple substritution (term) alternative"
-   'PSubstStarAlt G L T1 d e T2 = (cpysa d e G L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma lsuby_cpysa_trans: ∀G,d,e. lsub_trans … (cpysa d e G) (lsuby d e).
-#G #d #e #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -d -e
-[ //
-| #I #G #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
-  elim (lsuby_ldrop_trans_be … HL12 … HLK1) -HL12 -HLK1 /3 width=7 by cpysa_subst/
-| /4 width=1 by lsuby_succ, cpysa_bind/
-| /3 width=1 by cpysa_flat/
-]
-qed-.
-
-lemma cpysa_refl: ∀G,T,L,d,e. ⦃G, L⦄ ⊢ T ▶▶*[d, e] T.
-#G #T elim T -T //
-#I elim I -I /2 width=1 by cpysa_bind, cpysa_flat/
-qed.
-
-lemma cpysa_cpy_trans: ∀G,L,T1,T,d,e. ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T →
-                       ∀T2. ⦃G, L⦄ ⊢ T ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T2.
-#G #L #T1 #T #d #e #H elim H -G -L -T1 -T -d -e
-[ #I #G #L #d #e #X #H
-  elim (cpy_inv_atom1 … H) -H // * /2 width=7 by cpysa_subst/
-| #I #G #L #K #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK #_ #HVW2 #IHV12 #T2 #H
-  lapply (ldrop_fwd_drop2 … HLK) #H0LK
-  lapply (cpy_weak … H 0 (d+e) ? ?) -H // #H
-  elim (cpy_inv_lift1_be … H … H0LK … HVW2) -H -H0LK -HVW2
-  /3 width=7 by cpysa_subst, ylt_fwd_le_succ/
-| #a #I #G #L #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
-  elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
-  /5 width=5 by cpysa_bind, lsuby_cpy_trans, lsuby_succ/
-| #I #G #L #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
-  elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct /3 width=1 by cpysa_flat/
-]
-qed-.
-
-lemma cpys_cpysa: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T2.
-/3 width=8 by cpysa_cpy_trans, cpys_ind/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma cpysa_inv_cpys: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
-#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
-/2 width=7 by cpys_subst, cpys_flat, cpys_bind, cpy_cpys/
-qed-.
-
-(* Advanced eliminators *****************************************************)
-
-lemma cpys_ind_alt: ∀R:ynat→ynat→relation4 genv lenv term term.
-                    (∀I,G,L,d,e. R d e G L (⓪{I}) (⓪{I})) →
-                    (∀I,G,L,K,V1,V2,W2,i,d,e. d ≤ yinj i → i < d + e →
-                     ⇩[i] L ≡ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(d+e-i)] V2 →
-                     ⇧[O, i+1] V2 ≡ W2 → R O (⫰(d+e-i)) G K V1 V2 → R d e G L (#i) W2
-                    ) →
-                    (∀a,I,G,L,V1,V2,T1,T2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
-                     ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 → R d e G L V1 V2 →
-                     R (⫯d) e G (L.ⓑ{I}V1) T1 T2 → R d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
-                    ) →
-                    (∀I,G,L,V1,V2,T1,T2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
-                     ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R d e G L V1 V2 →
-                     R d e G L T1 T2 → R d e G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-                    ) →
-                    ∀d,e,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R d e G L T1 T2.
-#R #H1 #H2 #H3 #H4 #d #e #G #L #T1 #T2 #H elim (cpys_cpysa … H) -G -L -T1 -T2 -d -e
-/3 width=8 by cpysa_inv_cpys/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_cpys.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_cpys.etc
deleted file mode 100644 (file)
index 52759ca..0000000
+++ /dev/null
@@ -1,117 +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/cpy_cpy.ma".
-include "basic_2/substitution/cpys_alt.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cpys_inv_SO2: ∀G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▶*[d, 1] T2 → ⦃G, L⦄ ⊢ T1 ▶[d, 1] T2.
-#G #L #T1 #T2 #d #H @(cpys_ind … H) -T2 /2 width=3 by cpy_trans_ge/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma cpys_strip_eq: ∀G,L,T0,T1,d1,e1. ⦃G, L⦄ ⊢ T0 ▶*[d1, e1] T1 →
-                     ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 →
-                     ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T2 ▶*[d1, e1] T.
-normalize /3 width=3 by cpy_conf_eq, TC_strip1/ qed-.
-
-lemma cpys_strip_neq: ∀G,L1,T0,T1,d1,e1. ⦃G, L1⦄ ⊢ T0 ▶*[d1, e1] T1 →
-                      ∀L2,T2,d2,e2. ⦃G, L2⦄ ⊢ T0 ▶[d2, e2] T2 →
-                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
-                      ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L1⦄ ⊢ T2 ▶*[d1, e1] T.
-normalize /3 width=3 by cpy_conf_neq, TC_strip1/ qed-.
-
-lemma cpys_strap1_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶*[d1, e1] T0 →
-                        ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 → d2 + e2 ≤ d1 →
-                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T ▶*[d1, e1] T2.
-normalize /3 width=3 by cpy_trans_down, TC_strap1/ qed.
-
-lemma cpys_strap2_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶[d1, e1] T0 →
-                        ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶*[d2, e2] T2 → d2 + e2 ≤ d1 →
-                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L⦄ ⊢ T ▶[d1, e1] T2.
-normalize /3 width=3 by cpy_trans_down, TC_strap2/ qed-.
-
-lemma cpys_split_up: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 →
-                     ∀i. d ≤ i → i ≤ d + e →
-                     ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d, i - d] T & ⦃G, L⦄ ⊢ T ▶*[i, d + e - i] T2.
-#G #L #T1 #T2 #d #e #H #i #Hdi #Hide @(cpys_ind … H) -T2
-[ /2 width=3 by ex2_intro/
-| #T #T2 #_ #HT12 * #T3 #HT13 #HT3
-  elim (cpy_split_up … HT12 … Hide) -HT12 -Hide #T0 #HT0 #HT02
-  elim (cpys_strap1_down … HT3 … HT0) -T /3 width=5 by cpys_strap1, ex2_intro/
-  >ymax_pre_sn_comm //
-]
-qed-.
-
-lemma cpys_inv_lift1_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
-                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[d, dt + et - (yinj d + e)] T2 &
-                               ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
-elim (cpys_split_up … HU12 (d + e)) -HU12 // -Hdedet #U #HU1 #HU2
-lapply (cpys_weak … HU1 d e ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hddt -Hdtde #HU1
-lapply (cpys_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct
-elim (cpys_inv_lift1_ge … HU2 … HLK … HTU1) -HU2 -HLK -HTU1 //
->yplus_minus_inj /2 width=3 by ex2_intro/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem cpys_conf_eq: ∀G,L,T0,T1,d1,e1. ⦃G, L⦄ ⊢ T0 ▶*[d1, e1] T1 →
-                      ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶*[d2, e2] T2 →
-                      ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L⦄ ⊢ T2 ▶*[d1, e1] T.
-normalize /3 width=3 by cpy_conf_eq, TC_confluent2/ qed-.
-
-theorem cpys_conf_neq: ∀G,L1,T0,T1,d1,e1. ⦃G, L1⦄ ⊢ T0 ▶*[d1, e1] T1 →
-                       ∀L2,T2,d2,e2. ⦃G, L2⦄ ⊢ T0 ▶*[d2, e2] T2 →
-                       (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
-                       ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L1⦄ ⊢ T2 ▶*[d1, e1] T.
-normalize /3 width=3 by cpy_conf_neq, TC_confluent2/ qed-.
-
-theorem cpys_trans_eq: ∀G,L,T1,T,T2,d,e.
-                       ⦃G, L⦄ ⊢ T1 ▶*[d, e] T → ⦃G, L⦄ ⊢ T ▶*[d, e] T2 →
-                       ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
-normalize /2 width=3 by trans_TC/ qed-.
-
-theorem cpys_trans_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶*[d1, e1] T0 →
-                         ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶*[d2, e2] T2 → d2 + e2 ≤ d1 →
-                         ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L⦄ ⊢ T ▶*[d1, e1] T2.
-normalize /3 width=3 by cpy_trans_down, TC_transitive2/ qed-.
-
-theorem cpys_antisym_eq: ∀G,L1,T1,T2,d,e. ⦃G, L1⦄ ⊢ T1 ▶*[d, e] T2 →
-                         ∀L2. ⦃G, L2⦄ ⊢ T2 ▶*[d, e] T1 → T1 = T2.
-#G #L1 #T1 #T2 #d #e #H @(cpys_ind_alt … H) -G -L1 -T1 -T2 //
-[ #I1 #G #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #_ #_ #HVW2 #_ #L2 #HW2
-  elim (lt_or_ge (|L2|) (i+1)) #Hi [ -Hdi -Hide | ]
-  [ lapply (cpys_weak_full … HW2) -HW2 #HW2
-    lapply (cpys_weak … HW2 0 (i+1) ? ?) -HW2 //
-    [ >yplus_O1 >yplus_O1 /3 width=1 by ylt_fwd_le, ylt_inj/ ] -Hi
-    #HW2 >(cpys_inv_lift1_eq … HW2) -HW2 //
-  | elim (ldrop_O1_le … Hi) -Hi #K2 #HLK2
-    elim (cpys_inv_lift1_ge_up … HW2 … HLK2 … HVW2 ? ? ?) -HW2 -HLK2 -HVW2
-    /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ -Hdi -Hide
-    #X #_ #H elim (lift_inv_lref2_be … H) -H //
-  ]
-| #a #I #G #L1 #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_bind1 … H) -H
-  #V #T #HV2 #HT2 #H destruct
-  lapply (IHV12 … HV2) #H destruct -IHV12 -HV2 /3 width=2 by eq_f2/
-| #I #G #L1 #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_flat1 … H) -H
-  #V #T #HV2 #HT2 #H destruct /3 width=2 by eq_f2/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/cpys_lift.etc
deleted file mode 100644 (file)
index b6d9e45..0000000
+++ /dev/null
@@ -1,218 +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/cpy_lift.ma".
-include "basic_2/substitution/cpys.ma".
-
-(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
-
-(* Advanced properties ******************************************************)
-
-lemma cpys_subst: ∀I,G,L,K,V,U1,i,d,e.
-                  d ≤ yinj i → i < d + e →
-                  ⇩[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ⫰(d+e-i)] U1 →
-                  ∀U2. ⇧[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, e] U2.
-#I #G #L #K #V #U1 #i #d #e #Hdi #Hide #HLK #H @(cpys_ind … H) -U1
-[ /3 width=5 by cpy_cpys, cpy_subst/
-| #U #U1 #_ #HU1 #IHU #U2 #HU12
-  elim (lift_total U 0 (i+1)) #U0 #HU0
-  lapply (IHU … HU0) -IHU #H
-  lapply (ldrop_fwd_drop2 … HLK) -HLK #HLK
-  lapply (cpy_lift_ge … HU1 … HLK HU0 HU12 ?) -HU1 -HLK -HU0 -HU12 // #HU02
-  lapply (cpy_weak … HU02 d e ? ?) -HU02
-  [2,3: /2 width=3 by cpys_strap1, yle_succ_dx/ ]
-  >yplus_O1 <yplus_inj >ymax_pre_sn_comm /2 width=1 by ylt_fwd_le_succ/
-]
-qed.
-
-lemma cpys_subst_Y2: ∀I,G,L,K,V,U1,i,d.
-                     d ≤ yinj i →
-                     ⇩[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ∞] U1 →
-                     ∀U2. ⇧[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, ∞] U2.
-#I #G #L #K #V #U1 #i #d #Hdi #HLK #HVU1 #U2 #HU12
-@(cpys_subst … HLK … HU12) >yminus_Y_inj //
-qed.
-
-(* Advanced inverion lemmas *************************************************)
-
-lemma cpys_inv_atom1: ∀I,G,L,T2,d,e. ⦃G, L⦄ ⊢ ⓪{I} ▶*[d, e] T2 →
-                      T2 = ⓪{I} ∨
-                      ∃∃J,K,V1,V2,i. d ≤ yinj i & i < d + e &
-                                    ⇩[i] L ≡ K.ⓑ{J}V1 &
-                                     ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2 &
-                                     ⇧[O, i+1] V2 ≡ T2 &
-                                     I = LRef i.
-#I #G #L #T2 #d #e #H @(cpys_ind … H) -T2
-[ /2 width=1 by or_introl/
-| #T #T2 #_ #HT2 *
-  [ #H destruct
-    elim (cpy_inv_atom1 … HT2) -HT2 [ /2 width=1 by or_introl/ | * /3 width=11 by ex6_5_intro, or_intror/ ]
-  | * #J #K #V1 #V #i #Hdi #Hide #HLK #HV1 #HVT #HI
-    lapply (ldrop_fwd_drop2 … HLK) #H
-    elim (cpy_inv_lift1_ge_up … HT2 … H … HVT) -HT2 -H -HVT
-    [2,3,4: /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ ]
-    /4 width=11 by cpys_strap1, ex6_5_intro, or_intror/
-  ]
-]
-qed-.
-
-lemma cpys_inv_lref1: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶*[d, e] T2 →
-                      T2 = #i ∨
-                      ∃∃I,K,V1,V2. d ≤ i & i < d + e &
-                                   ⇩[i] L ≡ K.ⓑ{I}V1 &
-                                   ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2 &
-                                   ⇧[O, i+1] V2 ≡ T2.
-#G #L #T2 #i #d #e #H elim (cpys_inv_atom1 … H) -H /2 width=1 by or_introl/
-* #I #K #V1 #V2 #j #Hdj #Hjde #HLK #HV12 #HVT2 #H destruct /3 width=7 by ex5_4_intro, or_intror/
-qed-.
-
-lemma cpys_inv_lref1_ldrop: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶*[d, e] T2 →
-                            ∀I,K,V1. ⇩[i] L ≡ K.ⓑ{I}V1 →
-                            ∀V2. ⇧[O, i+1] V2 ≡ T2 →
-                            ∧∧ ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2
-                             & d ≤ i
-                             & i < d + e.
-#G #L #T2 #i #d #e #H #I #K #V1 #HLK #V2 #HVT2 elim (cpys_inv_lref1 … H) -H
-[ #H destruct elim (lift_inv_lref2_be … HVT2) -HVT2 -HLK //
-| * #Z #Y #X1 #X2 #Hdi #Hide #HLY #HX12 #HXT2
-  lapply (lift_inj … HXT2 … HVT2) -T2 #H destruct
-  lapply (ldrop_mono … HLY … HLK) -L #H destruct
-  /2 width=1 by and3_intro/
-]
-qed-.
-
-(* Properties on relocation *************************************************)
-
-lemma cpys_lift_le: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
-                    ∀L,U1,s,d,e. dt + et ≤ yinj d → ⇩[s, d, e] L ≡ K →
-                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
-                    ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2.
-#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hdetd #HLK #HTU1 @(cpys_ind … H) -T2
-[ #U2 #H >(lift_mono … HTU1 … H) -H //
-| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (IHT … HTU) -IHT #HU1
-  lapply (cpy_lift_le … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/
-]
-qed-.
-
-lemma cpys_lift_be: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
-                    ∀L,U1,s,d,e. dt ≤ yinj d → d ≤ dt + et →
-                    ⇩[s, d, e] L ≡ K → ⇧[d, e] T1 ≡ U1 →
-                    ∀U2. ⇧[d, e] T2 ≡ U2 → ⦃G, L⦄ ⊢ U1 ▶*[dt, et + e] U2.
-#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hdtd #Hddet #HLK #HTU1 @(cpys_ind … H) -T2
-[ #U2 #H >(lift_mono … HTU1 … H) -H //
-| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (IHT … HTU) -IHT #HU1
-  lapply (cpy_lift_be … HT2 … HLK HTU HTU2 ? ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/
-]
-qed-.
-
-lemma cpys_lift_ge: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
-                    ∀L,U1,s,d,e. yinj d ≤ dt → ⇩[s, d, e] L ≡ K →
-                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
-                    ⦃G, L⦄ ⊢ U1 ▶*[dt+e, et] U2.
-#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hddt #HLK #HTU1 @(cpys_ind … H) -T2
-[ #U2 #H >(lift_mono … HTU1 … H) -H //
-| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (IHT … HTU) -IHT #HU1
-  lapply (cpy_lift_ge … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/
-]
-qed-.
-
-(* Inversion lemmas for relocation ******************************************)
-
-lemma cpys_inv_lift1_le: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         dt + et ≤ d →
-                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdetd @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (cpy_inv_lift1_le … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-lemma cpys_inv_lift1_be: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         dt ≤ d → yinj d + e ≤ dt + et →
-                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, et - e] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdedet @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (cpy_inv_lift1_be … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-lemma cpys_inv_lift1_ge: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         yinj d + e ≤ dt →
-                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt - e, et] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdedt @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (cpy_inv_lift1_ge … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-(* Advanced inversion lemmas on relocation **********************************)
-
-lemma cpys_inv_lift1_ge_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                            ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
-                            ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[d, dt + et - (yinj d + e)] T2 &
-                                 ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (cpy_inv_lift1_ge_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-lemma cpys_inv_lift1_be_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                            ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            dt ≤ d → dt + et ≤ yinj d + e →
-                            ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (cpy_inv_lift1_be_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-lemma cpys_inv_lift1_le_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
-                            ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            dt ≤ d → d ≤ dt + et → dt + et ≤ yinj d + e →
-                            ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde @(cpys_ind … H) -U2
-[ /2 width=3 by ex2_intro/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (cpy_inv_lift1_le_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
-]
-qed-.
-
-lemma cpys_inv_lift1_subst: ∀G,L,W1,W2,d,e. ⦃G, L⦄ ⊢ W1 ▶*[d, e] W2 →
-                            ∀K,V1,i. ⇩[i+1] L ≡ K → ⇧[O, i+1] V1 ≡ W1 → 
-                            d ≤ yinj i → i < d + e →
-                            ∃∃V2.  ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(d+e-i)] V2 & ⇧[O, i+1] V2 ≡ W2.
-#G #L #W1 #W2 #d #e #HW12 #K #V1 #i #HLK #HVW1 #Hdi #Hide
-elim (cpys_inv_lift1_ge_up … HW12 … HLK … HVW1 ? ? ?) //
->yplus_O1 <yplus_inj >yplus_SO2
-[ >yminus_succ2 /2 width=3 by ex2_intro/
-| /2 width=1 by ylt_fwd_le_succ1/
-| /2 width=3 by yle_trans/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/extlrsubeq_4.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/extlrsubeq_4.etc
deleted file mode 100644 (file)
index 8a9714d..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( L1 break ⊑ × [ term 46 d , break term 46 e ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'ExtLRSubEq $L1 $d $e $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/lsuby.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/lsuby.etc
deleted file mode 100644 (file)
index 6c90b20..0000000
+++ /dev/null
@@ -1,237 +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 "ground_2/ynat/ynat_plus.ma".
-include "basic_2/notation/relations/extlrsubeq_4.ma".
-include "basic_2/relocation/ldrop.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************)
-
-inductive lsuby: relation4 ynat ynat lenv lenv ≝
-| lsuby_atom: ∀L,d,e. lsuby d e L (⋆)
-| lsuby_zero: ∀I1,I2,L1,L2,V1,V2.
-              lsuby 0 0 L1 L2 → lsuby 0 0 (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2)
-| lsuby_pair: ∀I1,I2,L1,L2,V,e. lsuby 0 e L1 L2 →
-              lsuby 0 (⫯e) (L1.ⓑ{I1}V) (L2.ⓑ{I2}V)
-| lsuby_succ: ∀I1,I2,L1,L2,V1,V2,d,e.
-              lsuby d e L1 L2 → lsuby (⫯d) e (L1. ⓑ{I1}V1) (L2. ⓑ{I2} V2)
-.
-
-interpretation
-  "local environment refinement (extended substitution)"
-  'ExtLRSubEq L1 d e L2 = (lsuby d e L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma lsuby_pair_lt: ∀I1,I2,L1,L2,V,e. L1 ⊑×[0, ⫰e] L2 → 0 < e →
-                     L1.ⓑ{I1}V ⊑×[0, e] L2.ⓑ{I2}V.
-#I1 #I2 #L1 #L2 #V #e #HL12 #He <(ylt_inv_O1 … He) /2 width=1 by lsuby_pair/
-qed.
-
-lemma lsuby_succ_lt: ∀I1,I2,L1,L2,V1,V2,d,e. L1 ⊑×[⫰d, e] L2 → 0 < d →
-                     L1.ⓑ{I1}V1 ⊑×[d, e] L2. ⓑ{I2}V2.
-#I1 #I2 #L1 #L2 #V1 #V2 #d #e #HL12 #Hd <(ylt_inv_O1 … Hd) /2 width=1 by lsuby_succ/
-qed.
-
-lemma lsuby_pair_O_Y: ∀L1,L2. L1 ⊑×[0, ∞] L2 →
-                      ∀I1,I2,V. L1.ⓑ{I1}V ⊑×[0,∞] L2.ⓑ{I2}V.
-#L1 #L2 #HL12 #I1 #I2 #V lapply (lsuby_pair I1 I2 … V … HL12) -HL12 //
-qed.
-
-lemma lsuby_refl: ∀L,d,e. L ⊑×[d, e] L.
-#L elim L -L //
-#L #I #V #IHL #d elim (ynat_cases … d) [| * #x ]
-#Hd destruct /2 width=1 by lsuby_succ/
-#e elim (ynat_cases … e) [| * #x ]
-#He destruct /2 width=1 by lsuby_zero, lsuby_pair/
-qed.
-
-lemma lsuby_O2: ∀L2,L1,d. |L2| ≤ |L1| → L1 ⊑×[d, yinj 0] L2.
-#L2 elim L2 -L2 // #L2 #I2 #V2 #IHL2 * normalize
-[ #d #H lapply (le_n_O_to_eq … H) -H <plus_n_Sm #H destruct
-| #L1 #I1 #V1 #d #H lapply (le_plus_to_le_r … H) -H #HL12
- elim (ynat_cases d) /3 width=1 by lsuby_zero/
- * /3 width=1 by lsuby_succ/
-]
-qed.
-
-lemma lsuby_sym: ∀d,e,L1,L2. L1 ⊑×[d, e] L2 → |L1| = |L2| → L2 ⊑×[d, e] L1.
-#d #e #L1 #L2 #H elim H -d -e -L1 -L2
-[ #L1 #d #e #H >(length_inv_zero_dx … H) -L1 //
-| /2 width=1 by lsuby_O2/
-| #I1 #I2 #L1 #L2 #V #e #_ #IHL12 #H lapply (injective_plus_l … H)
-  /3 width=1 by lsuby_pair/
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #IHL12 #H lapply (injective_plus_l … H)
-  /3 width=1 by lsuby_succ/
-]
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsuby_inv_atom1_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 → L1 = ⋆ → L2 = ⋆.
-#L1 #L2 #d #e * -L1 -L2 -d -e //
-[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #H destruct
-| #I1 #I2 #L1 #L2 #V #e #_ #H destruct
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #H destruct
-]
-qed-.
-
-lemma lsuby_inv_atom1: ∀L2,d,e. ⋆ ⊑×[d, e] L2 → L2 = ⋆.
-/2 width=5 by lsuby_inv_atom1_aux/ qed-.
-
-fact lsuby_inv_zero1_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                          ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → d = 0 → e = 0 →
-                          L2 = ⋆ ∨
-                          ∃∃J2,K2,W2. K1 ⊑×[0, 0] K2 & L2 = K2.ⓑ{J2}W2.
-#L1 #L2 #d #e * -L1 -L2 -d -e /2 width=1 by or_introl/
-[ #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J1 #K1 #W1 #H #_ #_ destruct
-  /3 width=5 by ex2_3_intro, or_intror/
-| #I1 #I2 #L1 #L2 #V #e #_ #J1 #K1 #W1 #_ #_ #H
-  elim (ysucc_inv_O_dx … H)
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J1 #K1 #W1 #_ #H
-  elim (ysucc_inv_O_dx … H)
-]
-qed-.
-
-lemma lsuby_inv_zero1: ∀I1,K1,L2,V1. K1.ⓑ{I1}V1 ⊑×[0, 0] L2 →
-                       L2 = ⋆ ∨
-                       ∃∃I2,K2,V2. K1 ⊑×[0, 0] K2 & L2 = K2.ⓑ{I2}V2.
-/2 width=9 by lsuby_inv_zero1_aux/ qed-.
-
-fact lsuby_inv_pair1_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                          ∀J1,K1,W. L1 = K1.ⓑ{J1}W → d = 0 → 0 < e →
-                          L2 = ⋆ ∨
-                          ∃∃J2,K2. K1 ⊑×[0, ⫰e] K2 & L2 = K2.ⓑ{J2}W.
-#L1 #L2 #d #e * -L1 -L2 -d -e /2 width=1 by or_introl/
-[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W #_ #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V #e #HL12 #J1 #K1 #W #H #_ #_ destruct
-  /3 width=4 by ex2_2_intro, or_intror/
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J1 #K1 #W #_ #H
-  elim (ysucc_inv_O_dx … H)
-]
-qed-.
-
-lemma lsuby_inv_pair1: ∀I1,K1,L2,V,e. K1.ⓑ{I1}V ⊑×[0, e] L2 → 0 < e →
-                       L2 = ⋆ ∨
-                       ∃∃I2,K2. K1 ⊑×[0, ⫰e] K2 & L2 = K2.ⓑ{I2}V.
-/2 width=6 by lsuby_inv_pair1_aux/ qed-.
-
-fact lsuby_inv_succ1_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                          ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → 0 < d →
-                          L2 = ⋆ ∨
-                          ∃∃J2,K2,W2. K1 ⊑×[⫰d, e] K2 & L2 = K2.ⓑ{J2}W2.
-#L1 #L2 #d #e * -L1 -L2 -d -e /2 width=1 by or_introl/
-[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W1 #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V #e #_ #J1 #K1 #W1 #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #HL12 #J1 #K1 #W1 #H #_ destruct
-  /3 width=5 by ex2_3_intro, or_intror/
-]
-qed-.
-
-lemma lsuby_inv_succ1: ∀I1,K1,L2,V1,d,e. K1.ⓑ{I1}V1 ⊑×[d, e] L2 → 0 < d →
-                       L2 = ⋆ ∨
-                       ∃∃I2,K2,V2. K1 ⊑×[⫰d, e] K2 & L2 = K2.ⓑ{I2}V2.
-/2 width=5 by lsuby_inv_succ1_aux/ qed-.
-
-fact lsuby_inv_zero2_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                          ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → d = 0 → e = 0 →
-                          ∃∃J1,K1,W1. K1 ⊑×[0, 0] K2 & L1 = K1.ⓑ{J1}W1.
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ #L1 #d #e #J2 #K2 #W1 #H destruct
-| #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J2 #K2 #W2 #H #_ #_ destruct
-  /2 width=5 by ex2_3_intro/
-| #I1 #I2 #L1 #L2 #V #e #_ #J2 #K2 #W2 #_ #_ #H
-  elim (ysucc_inv_O_dx … H)
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J2 #K2 #W2 #_ #H
-  elim (ysucc_inv_O_dx … H)
-]
-qed-.
-
-lemma lsuby_inv_zero2: ∀I2,K2,L1,V2. L1 ⊑×[0, 0] K2.ⓑ{I2}V2 →
-                       ∃∃I1,K1,V1. K1 ⊑×[0, 0] K2 & L1 = K1.ⓑ{I1}V1.
-/2 width=9 by lsuby_inv_zero2_aux/ qed-.
-
-fact lsuby_inv_pair2_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                          ∀J2,K2,W. L2 = K2.ⓑ{J2}W → d = 0 → 0 < e →
-                          ∃∃J1,K1. K1 ⊑×[0, ⫰e] K2 & L1 = K1.ⓑ{J1}W.
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ #L1 #d #e #J2 #K2 #W #H destruct
-| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W #_ #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V #e #HL12 #J2 #K2 #W #H #_ #_ destruct
-  /2 width=4 by ex2_2_intro/
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J2 #K2 #W #_ #H
-  elim (ysucc_inv_O_dx … H)
-]
-qed-.
-
-lemma lsuby_inv_pair2: ∀I2,K2,L1,V,e. L1 ⊑×[0, e] K2.ⓑ{I2}V → 0 < e →
-                       ∃∃I1,K1. K1 ⊑×[0, ⫰e] K2 & L1 = K1.ⓑ{I1}V.
-/2 width=6 by lsuby_inv_pair2_aux/ qed-.
-
-fact lsuby_inv_succ2_aux: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                          ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → 0 < d →
-                          ∃∃J1,K1,W1. K1 ⊑×[⫰d, e] K2 & L1 = K1.ⓑ{J1}W1.
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ #L1 #d #e #J2 #K2 #W2 #H destruct
-| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W2 #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V #e #_ #J2 #K1 #W2 #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #HL12 #J2 #K2 #W2 #H #_ destruct
-  /2 width=5 by ex2_3_intro/
-]
-qed-.
-
-lemma lsuby_inv_succ2: ∀I2,K2,L1,V2,d,e. L1 ⊑×[d, e] K2.ⓑ{I2}V2 → 0 < d →
-                       ∃∃I1,K1,V1. K1 ⊑×[⫰d, e] K2 & L1 = K1.ⓑ{I1}V1.
-/2 width=5 by lsuby_inv_succ2_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lsuby_fwd_length: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 → |L2| ≤ |L1|.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize /2 width=1 by le_S_S/
-qed-.
-
-(* Properties on basic slicing **********************************************)
-
-lemma lsuby_ldrop_trans_be: ∀L1,L2,d,e. L1 ⊑×[d, e] L2 →
-                            ∀I2,K2,W,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓑ{I2}W →
-                            d ≤ i → i < d + e →
-                            ∃∃I1,K1. K1 ⊑×[0, ⫰(d+e-i)] K2 & ⇩[s, 0, i] L1 ≡ K1.ⓑ{I1}W.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
-[ #L1 #d #e #J2 #K2 #W #s #i #H
-  elim (ldrop_inv_atom1 … H) -H #H destruct
-| #I1 #I2 #L1 #L2 #V1 #V2 #_ #_ #J2 #K2 #W #s #i #_ #_ #H
-  elim (ylt_yle_false … H) //
-| #I1 #I2 #L1 #L2 #V #e #HL12 #IHL12 #J2 #K2 #W #s #i #H #_ >yplus_O1
-  elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ]
-  [ #_ destruct -I2 >ypred_succ
-    /2 width=4 by ldrop_pair, ex2_2_intro/
-  | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/
-    #H <H -H #H lapply (ylt_inv_succ … H) -H
-    #Hie elim (IHL12 … HLK1) -IHL12 -HLK1 // -Hie
-    >yminus_succ <yminus_inj /3 width=4 by ldrop_drop_lt, ex2_2_intro/
-  ]
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #IHL12 #J2 #K2 #W #s #i #HLK2 #Hdi
-  elim (yle_inv_succ1 … Hdi) -Hdi
-  #Hdi #Hi <Hi >yplus_succ1 #H lapply (ylt_inv_succ … H) -H
-  #Hide lapply (ldrop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/
-  #HLK1 elim (IHL12 … HLK1) -IHL12 -HLK1 <yminus_inj >yminus_SO2
-  /4 width=4 by ylt_O, ldrop_drop_lt, ex2_2_intro/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/lsuby_lsuby.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/lsuby_lsuby.etc
deleted file mode 100644 (file)
index 24361d3..0000000
+++ /dev/null
@@ -1,32 +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/lsuby.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************)
-
-(* Main properties **********************************************************)
-
-theorem lsuby_trans: ∀d,e. Transitive … (lsuby d e).
-#d #e #L1 #L2 #H elim H -L1 -L2 -d -e
-[ #L1 #d #e #X #H lapply (lsuby_inv_atom1 … H) -H
-  #H destruct //
-| #I1 #I2 #L1 #L #V1 #V #_ #IHL1 #X #H elim (lsuby_inv_zero1 … H) -H //
-  * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_zero/
-| #I1 #I2 #L1 #L2 #V #e #_ #IHL1 #X #H elim (lsuby_inv_pair1 … H) -H //
-  * #I2 #L2 #HL2 #H destruct /3 width=1 by lsuby_pair/
-| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #IHL1 #X #H elim (lsuby_inv_succ1 … H) -H //
-  * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_succ/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubst_6.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubst_6.etc
deleted file mode 100644 (file)
index 31fe214..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 L ⦄ ⊢ break term 46 T1 break ▶ [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubst $G $L $T1 $d $e $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubststar_6.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubststar_6.etc
deleted file mode 100644 (file)
index f2bb4bd..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 L ⦄ ⊢ break term 46 T1 break ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStar $G $L $T1 $d $e $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubststaralt_6.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsuby/psubststaralt_6.etc
deleted file mode 100644 (file)
index e727d49..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 L ⦄ ⊢ break term 46 T1 break ▶ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStarAlt $G $L $T1 $d $e $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeq_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeq_2.ma
deleted file mode 100644 (file)
index 1f0f648..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( L1 ⫃ break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'LRSubEq $L1 $L2 }.
index e638d21c15becac918233722a29ed6f6b58c99fe..f38c1f86aa1c95cc845953f744c6c89e83876a55 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( G ⊢ break term 46 L1 ⫃ break [ term 46 R ] break term 46 L2 )"
+notation "hvbox( L1 break ⊆ [ term 46 d , break term 46 e ] break term 46 L2 )"
    non associative with precedence 45
-   for @{ 'LRSubEq $R $G $L1 $L2 }.
+   for @{ 'LRSubEq $L1 $d $e $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_2.ma
new file mode 100644 (file)
index 0000000..3a6e5ed
--- /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( L1 ⫃ break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'LRSubEqC $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_4.ma
new file mode 100644 (file)
index 0000000..823d6be
--- /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( G ⊢ break term 46 L1 ⫃ break [ term 46 R ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'LRSubEqC $R $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubst_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubst_6.ma
new file mode 100644 (file)
index 0000000..31fe214
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubst $G $L $T1 $d $e $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubststar_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubststar_6.ma
new file mode 100644 (file)
index 0000000..f2bb4bd
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStar $G $L $T1 $d $e $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubststaralt_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/psubststaralt_6.ma
new file mode 100644 (file)
index 0000000..e727d49
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStarAlt $G $L $T1 $d $e $T2 }.
index e0e84742f9c9668328d5ce8886536bf9b90a21af..d68be168026e618aa715a8ce8f09a25961ff8b26 100644 (file)
@@ -69,9 +69,9 @@ lemma cnr_inv_appl: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓐV.T⦄ → ∧∧ 
 ]
 qed-.
 
-lemma cnr_inv_tau: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓝV.T⦄ → ⊥.
+lemma cnr_inv_eps: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓝV.T⦄ → ⊥.
 #G #L #V #T #H lapply (H T ?) -H
-/2 width=4 by cpr_tau, discr_tpair_xy_y/
+/2 width=4 by cpr_eps, discr_tpair_xy_y/
 qed-.
 
 (* Basic properties *********************************************************)
index 35937fb419baac44a98bc2821415f97dbac8d4a1..e1d75cd047651492c877f59fb888ad817a776bc0 100644 (file)
@@ -30,7 +30,7 @@ lemma cnr_inv_crr: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ 
   elim (cnr_inv_appl … H) -H /2 width=1/
 | #I #L #V #T * #H1 #H2 destruct
   [ elim (cnr_inv_zeta … H2)
-  | elim (cnr_inv_tau … H2)
+  | elim (cnr_inv_eps … H2)
   ]
 |5,6: #a * [ elim a ] #L #V #T * #H1 #_ #IH #H2 destruct
   [1,3: elim (cnr_inv_abbr … H2) -H2 /2 width=1/
index 983e2ac364eeaae2238a8091c351bb93922d7d50..a464e95befd04d813146a6711cf0a325911ea804 100644 (file)
@@ -30,7 +30,7 @@ interpretation
 lemma cnx_inv_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄ → deg h g k 0.
 #h #g #G #L #k #H elim (deg_total h g k)
 #l @(nat_ind_plus … l) -l // #l #_ #Hkl
-lapply (H (⋆(next h k)) ?) -H /2 width=2 by cpx_sort/ -L -l #H destruct -H -e0 (**) (* destruct does not remove some premises *)
+lapply (H (⋆(next h k)) ?) -H /2 width=2 by cpx_st/ -L -l #H destruct -H -e0 (**) (* destruct does not remove some premises *)
 lapply (next_lt h k) >e1 -e1 #H elim (lt_refl_false … H)
 qed-.
 
@@ -82,9 +82,9 @@ lemma cnx_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓐV.T⦄ 
 ]
 qed-.
 
-lemma cnx_inv_tau: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓝV.T⦄ → ⊥.
+lemma cnx_inv_eps: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓝV.T⦄ → ⊥.
 #h #g #G #L #V #T #H lapply (H T ?) -H
-/2 width=4 by cpx_tau, discr_tpair_xy_y/
+/2 width=4 by cpx_eps, discr_tpair_xy_y/
 qed-.
 
 (* Basic forward lemmas *****************************************************)
index db2da4fb8d940111d9a8a897ce9787b6f66c7952..c4948b77664ac67478fe843b6793240fca2cefb3 100644 (file)
@@ -33,7 +33,7 @@ lemma cnx_inv_crx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → ⦃G,
   elim (cnx_inv_appl … H) -H /2 width=1 by/
 | #I #L #V #T * #H1 #H2 destruct
   [ elim (cnx_inv_zeta … H2)
-  | elim (cnx_inv_tau … H2)
+  | elim (cnx_inv_eps … H2)
   ]
 |6,7: #a * [ elim a ] #L #V #T * #H1 #_ #IH #H2 destruct
   [1,3: elim (cnx_inv_abbr … H2) -H2 /2 width=1 by/
index c68911d4f0bd586faf3973e50256676588088242..bbb13d14e0b2b4e72a6460757b787a7c10d0bc0b 100644 (file)
@@ -34,7 +34,7 @@ inductive cpr: relation4 genv lenv term term ≝
              cpr G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
 | cpr_zeta : ∀G,L,V,T1,T,T2. cpr G (L.ⓓV) T1 T →
              ⇧[0, 1] T2 ≡ T → cpr G L (+ⓓV.T1) T2
-| cpr_tau  : ∀G,L,V,T1,T2. cpr G L T1 T2 → cpr G L (ⓝV.T1) T2
+| cpr_eps  : ∀G,L,V,T1,T2. cpr G L T1 T2 → cpr G L (ⓝV.T1) T2
 | cpr_beta : ∀a,G,L,V1,V2,W1,W2,T1,T2.
              cpr G L V1 V2 → cpr G L W1 W2 → cpr G (L.ⓛW1) T1 T2 →
              cpr G L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2)
@@ -55,7 +55,7 @@ lemma lsubr_cpr_trans: ∀G. lsub_trans … (cpr G) lsubr.
   elim (lsubr_fwd_ldrop2_abbr … HL12 … HLK1) -L1 *
   /3 width=6 by cpr_delta/
 |3,7: /4 width=1 by lsubr_bind, cpr_bind, cpr_beta/
-|4,6: /3 width=1 by cpr_flat, cpr_tau/
+|4,6: /3 width=1 by cpr_flat, cpr_eps/
 |5,8: /4 width=3 by lsubr_bind, cpr_zeta, cpr_theta/
 ]
 qed-.
@@ -290,6 +290,6 @@ qed-.
             pr2_gen_ctail pr2_ctail
 *)
 (* Basic_1: removed local theorems 4:
-            pr0_delta_tau pr0_cong_delta
+            pr0_delta_eps pr0_cong_delta
             pr2_free_free pr2_free_delta
 *)
index 101e2b029da3e875cc34c73885ae6fa02976c244..36c349e4e4e3edabf2f9625c2de41b35b9a5a94a 100644 (file)
@@ -43,7 +43,7 @@ lemma cpr_lift: ∀G. l_liftable (cpr G).
   elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct
   elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpr_zeta, ldrop_skip/
 | #G #K #V #T1 #T2 #_ #IHT12 #L #s #d #e #HLK #U1 #H #U2 #HTU2
-  elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpr_tau/
+  elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpr_eps/
 | #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #d #e #HLK #X1 #HX1 #X2 #HX2
   elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct
   elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct
@@ -91,7 +91,7 @@ lemma cpr_inv_lift1: ∀G. l_deliftable_sn (cpr G).
   elim (lift_div_le … HU2 … HTU) -U /3 width=6 by cpr_zeta, ex2_intro/
 | #G #L #V #U1 #U2 #_ #IHU12 #K #s #d #e #HLK #X #H
   elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
-  elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3 by cpr_tau, ex2_intro/
+  elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3 by cpr_eps, ex2_intro/
 | #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #K #s #d #e #HLK #X #HX
   elim (lift_inv_flat2 … HX) -HX #V0 #Y #HV01 #HY #HX destruct
   elim (lift_inv_bind2 … HY) -HY #W0 #T0 #HW01 #HT01 #HY destruct
index 9fd1ccf480bbda238bed577bf1db8904076ee76b..edfc74f5bc8e8cdd791d3876580639ef97a0c71c 100644 (file)
@@ -21,7 +21,7 @@ include "basic_2/reduction/cpr.ma".
 (* avtivate genv *)
 inductive cpx (h) (g): relation4 genv lenv term term ≝
 | cpx_atom : ∀I,G,L. cpx h g G L (⓪{I}) (⓪{I})
-| cpx_sort : ∀G,L,k,l. deg h g k (l+1) → cpx h g G L (⋆k) (⋆(next h k))
+| cpx_st   : ∀G,L,k,l. deg h g k (l+1) → cpx h g G L (⋆k) (⋆(next h k))
 | cpx_delta: ∀I,G,L,K,V,V2,W2,i.
              ⇩[i] L ≡ K.ⓑ{I}V → cpx h g G K V V2 →
              ⇧[0, i+1] V2 ≡ W2 → cpx h g G L (#i) W2
@@ -33,8 +33,8 @@ inductive cpx (h) (g): relation4 genv lenv term term ≝
              cpx h g G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
 | cpx_zeta : ∀G,L,V,T1,T,T2. cpx h g G (L.ⓓV) T1 T →
              ⇧[0, 1] T2 ≡ T → cpx h g G L (+ⓓV.T1) T2
-| cpx_tau  : ∀G,L,V,T1,T2. cpx h g G L T1 T2 → cpx h g G L (ⓝV.T1) T2
-| cpx_ti   : ∀G,L,V1,V2,T. cpx h g G L V1 V2 → cpx h g G L (ⓝV1.T) V2
+| cpx_eps  : ∀G,L,V,T1,T2. cpx h g G L T1 T2 → cpx h g G L (ⓝV.T1) T2
+| cpx_ct   : ∀G,L,V1,V2,T. cpx h g G L V1 V2 → cpx h g G L (ⓝV1.T) V2
 | cpx_beta : ∀a,G,L,V1,V2,W1,W2,T1,T2.
              cpx h g G L V1 V2 → cpx h g G L W1 W2 → cpx h g G (L.ⓛW1) T1 T2 →
              cpx h g G L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2)
@@ -53,12 +53,12 @@ interpretation
 lemma lsubr_cpx_trans: ∀h,g,G. lsub_trans … (cpx h g G) lsubr.
 #h #g #G #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2
 [ //
-| /2 width=2 by cpx_sort/
+| /2 width=2 by cpx_st/
 | #I #G #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
   elim (lsubr_fwd_ldrop2_bind … HL12 … HLK1) -HL12 -HLK1 *
-  /4 width=7 by cpx_delta, cpx_ti/
+  /4 width=7 by cpx_delta, cpx_ct/
 |4,9: /4 width=1 by cpx_bind, cpx_beta, lsubr_bind/
-|5,7,8: /3 width=1 by cpx_flat, cpx_tau, cpx_ti/
+|5,7,8: /3 width=1 by cpx_flat, cpx_eps, cpx_ct/
 |6,10: /4 width=3 by cpx_zeta, cpx_theta, lsubr_bind/
 ]
 qed-.
@@ -70,7 +70,7 @@ qed.
 
 lemma cpr_cpx: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2.
 #h #g #G #L #T1 #T2 #H elim H -L -T1 -T2
-/2 width=7 by cpx_delta, cpx_bind, cpx_flat, cpx_zeta, cpx_tau, cpx_beta, cpx_theta/
+/2 width=7 by cpx_delta, cpx_bind, cpx_flat, cpx_zeta, cpx_eps, cpx_beta, cpx_theta/
 qed.
 
 lemma cpx_pair_sn: ∀h,g,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 →
index 7d86e027db41d56437310538bd2095d667384ff4..cbc3365000129c3ccbdaab8be55a1eafe8f9a055 100644 (file)
@@ -22,11 +22,11 @@ include "basic_2/reduction/cpx.ma".
 lemma leq_cpx_trans: ∀h,g,G. lsub_trans … (cpx h g G) (leq 0 (∞)).
 #h #g #G #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2
 [ //
-| /2 width=2 by cpx_sort/
+| /2 width=2 by cpx_st/
 | #I #G #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
   elim (leq_ldrop_trans_be … HL12 … HLK1) // -HL12 -HLK1 /3 width=7 by cpx_delta/
 |4,9: /4 width=1 by cpx_bind, cpx_beta, leq_pair_O_Y/
-|5,7,8: /3 width=1 by cpx_flat, cpx_tau, cpx_ti/
+|5,7,8: /3 width=1 by cpx_flat, cpx_eps, cpx_ct/
 |6,10: /4 width=3 by cpx_zeta, cpx_theta, leq_pair_O_Y/
 ]
 qed-.
index 87cfd3ca3f43a33f41922bc078407d2d3757fe7b..1cd6da260aecdc8cc0996f363f78e78d632a19d0 100644 (file)
@@ -24,7 +24,7 @@ include "basic_2/reduction/cpx.ma".
 lemma ssta_cpx: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 •[h, g] T2 →
                 ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2.
 #h #g #G #L #T1 #T2 #l #H elim H -G -L -T1 -T2
-[ /3 width=4 by cpx_sort, da_inv_sort/
+[ /3 width=4 by cpx_st, da_inv_sort/
 | #G #L #K #V #U #W #i #HLK #_ #HWU #IHVW #H
   elim (da_inv_lref … H) -H * #K0 #V0 [| #l0 ] #HLK0
   lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpx_delta/
@@ -33,7 +33,7 @@ lemma ssta_cpx: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 •[h, g] T2 →
   lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct /2 width=7 by cpx_delta/
 | /4 width=2 by cpx_bind, da_inv_bind/
 | /4 width=3 by cpx_flat, da_inv_flat/
-| /4 width=3 by cpx_tau, da_inv_flat/
+| /4 width=3 by cpx_eps, da_inv_flat/
 ]
 qed.
 
@@ -45,7 +45,7 @@ lemma cpx_lift: ∀h,g,G. l_liftable (cpx h g G).
   >(lift_mono … H1 … H2) -H1 -H2 //
 | #G #K #k #l #Hkl #L #s #d #e #_ #U1 #H1 #U2 #H2
   >(lift_inv_sort1 … H1) -U1
-  >(lift_inv_sort1 … H2) -U2 /2 width=2 by cpx_sort/
+  >(lift_inv_sort1 … H2) -U2 /2 width=2 by cpx_st/
 | #I #G #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #s #d #e #HLK #U1 #H #U2 #HWU2
   elim (lift_inv_lref1 … H) * #Hid #H destruct
   [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // <minus_plus #W2 #HVW2 #HWU2
@@ -65,9 +65,9 @@ lemma cpx_lift: ∀h,g,G. l_liftable (cpx h g G).
   elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct
   elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpx_zeta, ldrop_skip/
 | #G #K #V #T1 #T2 #_ #IHT12 #L #s #d #e #HLK #U1 #H #U2 #HTU2
-  elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_tau/
+  elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_eps/
 | #G #K #V1 #V2 #T #_ #IHV12 #L #s #d #e #HLK #U1 #H #U2 #HVU2
-  elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_ti/
+  elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_ct/
 | #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #d #e #HLK #X1 #HX1 #X2 #HX2
   elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct
   elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct
@@ -90,7 +90,7 @@ lemma cpx_inv_lift1: ∀h,g,G. l_deliftable_sn (cpx h g G).
   | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_gref, ex2_intro/
   ]
 | #G #L #k #l #Hkl #K #s #d #e #_ #T1 #H
-  lapply (lift_inv_sort2 … H) -H #H destruct /3 width=3 by cpx_sort, lift_sort, ex2_intro/
+  lapply (lift_inv_sort2 … H) -H #H destruct /3 width=3 by cpx_st, lift_sort, ex2_intro/
 | #I #G #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #s #d #e #HLK #T1 #H
   elim (lift_inv_lref2 … H) -H * #Hid #H destruct
   [ elim (ldrop_conf_lt … HLK … HLV) -L // #L #U #HKL #HLV #HUV
@@ -115,10 +115,10 @@ lemma cpx_inv_lift1: ∀h,g,G. l_deliftable_sn (cpx h g G).
   elim (lift_div_le … HU2 … HTU) -U /3 width=5 by cpx_zeta, ex2_intro/
 | #G #L #V #U1 #U2 #_ #IHU12 #K #s #d #e #HLK #X #H
   elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
-  elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3 by cpx_tau, ex2_intro/
+  elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3 by cpx_eps, ex2_intro/
 | #G #L #V1 #V2 #U1 #_ #IHV12 #K #s #d #e #HLK #X #H
   elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
-  elim (IHV12 … HLK … HWV1) -L -V1 /3 width=3 by cpx_ti, ex2_intro/
+  elim (IHV12 … HLK … HWV1) -L -V1 /3 width=3 by cpx_ct, ex2_intro/
 | #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #K #s #d #e #HLK #X #HX
   elim (lift_inv_flat2 … HX) -HX #V0 #Y #HV01 #HY #HX destruct
   elim (lift_inv_bind2 … HY) -HY #W0 #T0 #HW01 #HT01 #HY destruct
index 7779c7f923331a3be017bb1303c8f41df347c358..c36dd0fb411c95a81402b9fb5717a3dcdb53511b 100644 (file)
@@ -21,7 +21,7 @@ include "basic_2/reduction/cpx_llpx_sn.ma".
 
 lemma lleq_cpx_trans: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡[h, g] T2 →
                       ∀L1. L1 ⋕[T1, 0] L2 → ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2.
-#h #g #G #L2 #T1 #T2 #H elim H -G -L2 -T1 -T2 /2 width=2 by cpx_sort/
+#h #g #G #L2 #T1 #T2 #H elim H -G -L2 -T1 -T2 /2 width=2 by cpx_st/
 [ #I #G #L2 #K2 #V1 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV12 #L1 #H elim (lleq_fwd_lref_dx … H … HLK2) -L2
   [ #H elim (ylt_yle_false … H) //
   | * /3 width=7 by cpx_delta/
@@ -33,9 +33,9 @@ lemma lleq_cpx_trans: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡[h, g] T2 →
 | #G #L2 #V2 #T1 #T #T2 #_ #HT2 #IHT1 #L1 #H elim (lleq_inv_bind_O … H) -H
   /3 width=3 by cpx_zeta/
 | #G #L2 #W1 #T1 #T2 #_ #IHT12 #L1 #H elim (lleq_inv_flat … H) -H
-  /3 width=1 by cpx_tau/
+  /3 width=1 by cpx_eps/
 | #G #L2 #W1 #W2 #T1 #_ #IHW12 #L1 #H elim (lleq_inv_flat … H) -H
-  /3 width=1 by cpx_ti/
+  /3 width=1 by cpx_ct/
 | #a #G #L1 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L1 #H elim (lleq_inv_flat … H) -H
   #HV1 #H elim (lleq_inv_bind_O … H) -H /3 width=1 by cpx_beta/
 | #a #G #L1 #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L1 #H elim (lleq_inv_flat … H) -H
index d0b36345539e8b4415e950f93cc84c5108d2b851..ebf3d640637289cc28484eb0cb9470dc0004e74c 100644 (file)
@@ -146,7 +146,7 @@ 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:
+fact cpr_conf_lpr_flat_eps:
    ∀G,L0,V0,T0. (
       ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ →
       ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
@@ -158,10 +158,10 @@ fact cpr_conf_lpr_flat_tau:
    ∃∃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/
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3 by cpr_eps, ex2_intro/
 qed-.
 
-fact cpr_conf_lpr_tau_tau:
+fact cpr_conf_lpr_eps_eps:
    ∀G,L0,V0,T0. (
       ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ →
       ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 →
@@ -319,11 +319,11 @@ theorem cpr_conf_lpr: ∀G. lpx_sn_confluent (cpr G) (cpr G).
   |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=8 by ex2_commute, cpr_conf_lpr_flat_eps/
   | /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=8 by cpr_conf_lpr_flat_eps/
+  | /3 width=7 by cpr_conf_lpr_eps_eps/
   | /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/
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/cpy.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/cpy.ma
new file mode 100644 (file)
index 0000000..cf29f1c
--- /dev/null
@@ -0,0 +1,297 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "ground_2/ynat/ynat_max.ma".
+include "basic_2/notation/relations/psubst_6.ma".
+include "basic_2/grammar/genv.ma".
+include "basic_2/relocation/lsuby.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************)
+
+(* activate genv *)
+inductive cpy: ynat → ynat → relation4 genv lenv term term ≝
+| cpy_atom : ∀I,G,L,d,e. cpy d e G L (⓪{I}) (⓪{I})
+| cpy_subst: ∀I,G,L,K,V,W,i,d,e. d ≤ yinj i → i < d+e →
+             ⇩[i] L ≡ K.ⓑ{I}V → ⇧[0, i+1] V ≡ W → cpy d e G L (#i) W
+| cpy_bind : ∀a,I,G,L,V1,V2,T1,T2,d,e.
+             cpy d e G L V1 V2 → cpy (⫯d) e G (L.ⓑ{I}V1) T1 T2 →
+             cpy d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
+| cpy_flat : ∀I,G,L,V1,V2,T1,T2,d,e.
+             cpy d e G L V1 V2 → cpy d e G L T1 T2 →
+             cpy d e G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
+.
+
+interpretation "context-sensitive extended ordinary substritution (term)"
+   'PSubst G L T1 d e T2 = (cpy d e G L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma lsuby_cpy_trans: ∀G,d,e. lsub_trans … (cpy d e G) (lsuby d e).
+#G #d #e #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -d -e
+[ //
+| #I #G #L1 #K1 #V #W #i #d #e #Hdi #Hide #HLK1 #HVW #L2 #HL12
+  elim (lsuby_ldrop_trans_be … HL12 … HLK1) -HL12 -HLK1 /2 width=5 by cpy_subst/
+| /4 width=1 by lsuby_succ, cpy_bind/
+| /3 width=1 by cpy_flat/
+]
+qed-.
+
+lemma cpy_refl: ∀G,T,L,d,e. ⦃G, L⦄ ⊢ T ▶[d, e] T.
+#G #T elim T -T // * /2 width=1 by cpy_bind, cpy_flat/
+qed.
+
+(* Basic_1: was: subst1_ex *)
+lemma cpy_full: ∀I,G,K,V,T1,L,d. ⇩[d] L ≡ K.ⓑ{I}V →
+                ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ▶[d, 1] T2 & ⇧[d, 1] T ≡ T2.
+#I #G #K #V #T1 elim T1 -T1
+[ * #i #L #d #HLK
+  /2 width=4 by lift_sort, lift_gref, ex2_2_intro/
+  elim (lt_or_eq_or_gt i d) #Hid
+  /3 width=4 by lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/
+  destruct
+  elim (lift_total V 0 (i+1)) #W #HVW
+  elim (lift_split … HVW i i)
+  /4 width=5 by cpy_subst, ylt_inj, ex2_2_intro/
+| * [ #a ] #J #W1 #U1 #IHW1 #IHU1 #L #d #HLK
+  elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
+  [ elim (IHU1 (L.ⓑ{J}W1) (d+1)) -IHU1
+    /3 width=9 by cpy_bind, ldrop_drop, lift_bind, ex2_2_intro/
+  | elim (IHU1 … HLK) -IHU1 -HLK
+    /3 width=8 by cpy_flat, lift_flat, ex2_2_intro/
+  ]
+]
+qed-.
+
+lemma cpy_weak: ∀G,L,T1,T2,d1,e1. ⦃G, L⦄ ⊢ T1 ▶[d1, e1] T2 →
+                ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
+                ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T2.
+#G #L #T1 #T2 #d1 #e1 #H elim H -G -L -T1 -T2 -d1 -e1 //
+[ /3 width=5 by cpy_subst, ylt_yle_trans, yle_trans/
+| /4 width=3 by cpy_bind, ylt_yle_trans, yle_succ/
+| /3 width=1 by cpy_flat/
+]
+qed-.
+
+(* Note: lemma 1250 *)
+lemma cpy_weak_top: ∀G,L,T1,T2,d,e.
+                    ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶[d, |L| - d] T2.
+#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e //
+[ #I #G #L #K #V #W #i #d #e #Hdi #_ #HLK #HVW
+  lapply (ldrop_fwd_length_lt2 … HLK)
+  /4 width=5 by cpy_subst, ylt_yle_trans, ylt_inj/
+| #a #I #G #L #V1 #V2 normalize in match (|L.ⓑ{I}V2|); (**) (* |?| does not work *)
+  /2 width=1 by cpy_bind/
+| /2 width=1 by cpy_flat/
+]
+qed-.
+
+lemma cpy_weak_full: ∀G,L,T1,T2,d,e.
+                     ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶[0, |L|] T2.
+#G #L #T1 #T2 #d #e #HT12
+lapply (cpy_weak … HT12 0 (d + e) ? ?) -HT12
+/2 width=2 by cpy_weak_top/
+qed-.
+
+lemma cpy_split_up: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀i. i ≤ d + e →
+                    ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d, i-d] T & ⦃G, L⦄ ⊢ T ▶[i, d+e-i] T2.
+#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
+[ /2 width=3 by ex2_intro/
+| #I #G #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hjde
+  elim (ylt_split i j) [ -Hide -Hjde | -Hdi ]
+  /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/
+| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
+  elim (IHV12 i) -IHV12 // #V
+  elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hide
+  >yplus_SO2 >yplus_succ1 #T #HT1 #HT2
+  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2
+  /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/
+| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
+  elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hide
+  /3 width=5 by ex2_intro, cpy_flat/
+]
+qed-.
+
+lemma cpy_split_down: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀i. i ≤ d + e →
+                      ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[i, d+e-i] T & ⦃G, L⦄ ⊢ T ▶[d, i-d] T2.
+#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
+[ /2 width=3 by ex2_intro/
+| #I #G #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hjde
+  elim (ylt_split i j) [ -Hide -Hjde | -Hdi ]
+  /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/
+| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
+  elim (IHV12 i) -IHV12 // #V
+  elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hide
+  >yplus_SO2 >yplus_succ1 #T #HT1 #HT2
+  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2
+  /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/
+| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hide
+  elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hide
+  /3 width=5 by ex2_intro, cpy_flat/
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpy_fwd_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                  ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                  d ≤ dt → d + e ≤ dt + et →
+                  ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶[d+e, dt+et-(d+e)] U2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
+[ * #i #G #L #dt #et #T1 #d #e #H #_
+  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
+  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  ]
+| #I #G #L #K #V #W #i #dt #et #Hdti #Hidet #HLK #HVW #T1 #d #e #H #Hddt #Hdedet
+  elim (lift_inv_lref2 … H) -H * #Hid #H destruct [ -V -Hidet -Hdedet | -Hdti -Hddt ]
+  [ elim (ylt_yle_false … Hddt) -Hddt /3 width=3 by yle_ylt_trans, ylt_inj/
+  | elim (le_inv_plus_l … Hid) #Hdie #Hei
+    elim (lift_split … HVW d (i-e+1) ? ? ?) [2,3,4: /2 width=1 by le_S_S, le_S/ ] -Hdie
+    #T2 #_ >plus_minus // <minus_minus /2 width=1 by le_S/ <minus_n_n <plus_n_O #H -Hei
+    @(ex2_intro … H) -H @(cpy_subst … HLK HVW) /2 width=1 by yle_inj/ >ymax_pre_sn_comm // (**) (* explicit constructor *)
+  ]
+| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #X #d #e #H #Hddt #Hdedet
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HVW1) -V1 -IHW12 //
+  elim (IHU12 … HTU1) -T1 -IHU12 /2 width=1 by yle_succ/
+  <yplus_inj >yplus_SO2 >yplus_succ1 >yplus_succ1
+  /3 width=2 by cpy_bind, lift_bind, ex2_intro/
+| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #X #d #e #H #Hddt #Hdedet
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HVW1) -V1 -IHW12 // elim (IHU12 … HTU1) -T1 -IHU12
+  /3 width=2 by cpy_flat, lift_flat, ex2_intro/
+]
+qed-.
+
+lemma cpy_fwd_tw: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ♯{T1} ≤ ♯{T2}.
+#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e normalize
+/3 width=1 by monotonic_le_plus_l, le_plus/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact cpy_inv_atom1_aux: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀J. T1 = ⓪{J} →
+                        T2 = ⓪{J} ∨
+                        ∃∃I,K,V,i. d ≤ yinj i & i < d + e &
+                                   ⇩[i] L ≡ K.ⓑ{I}V &
+                                   ⇧[O, i+1] V ≡ T2 &
+                                   J = LRef i.
+#G #L #T1 #T2 #d #e * -G -L -T1 -T2 -d -e
+[ #I #G #L #d #e #J #H destruct /2 width=1 by or_introl/
+| #I #G #L #K #V #T2 #i #d #e #Hdi #Hide #HLK #HVT2 #J #H destruct /3 width=9 by ex5_4_intro, or_intror/
+| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
+| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
+]
+qed-.
+
+lemma cpy_inv_atom1: ∀I,G,L,T2,d,e. ⦃G, L⦄ ⊢ ⓪{I} ▶[d, e] T2 →
+                     T2 = ⓪{I} ∨
+                     ∃∃J,K,V,i. d ≤ yinj i & i < d + e &
+                                ⇩[i] L ≡ K.ⓑ{J}V &
+                                ⇧[O, i+1] V ≡ T2 &
+                                I = LRef i.
+/2 width=4 by cpy_inv_atom1_aux/ qed-.
+
+(* Basic_1: was: subst1_gen_sort *)
+lemma cpy_inv_sort1: ∀G,L,T2,k,d,e. ⦃G, L⦄ ⊢ ⋆k ▶[d, e] T2 → T2 = ⋆k.
+#G #L #T2 #k #d #e #H
+elim (cpy_inv_atom1 … H) -H //
+* #I #K #V #i #_ #_ #_ #_ #H destruct
+qed-.
+
+(* Basic_1: was: subst1_gen_lref *)
+lemma cpy_inv_lref1: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶[d, e] T2 →
+                     T2 = #i ∨
+                     ∃∃I,K,V. d ≤ i & i < d + e &
+                              ⇩[i] L ≡ K.ⓑ{I}V &
+                              ⇧[O, i+1] V ≡ T2.
+#G #L #T2 #i #d #e #H
+elim (cpy_inv_atom1 … H) -H /2 width=1 by or_introl/
+* #I #K #V #j #Hdj #Hjde #HLK #HVT2 #H destruct /3 width=5 by ex4_3_intro, or_intror/
+qed-.
+
+lemma cpy_inv_gref1: ∀G,L,T2,p,d,e. ⦃G, L⦄ ⊢ §p ▶[d, e] T2 → T2 = §p.
+#G #L #T2 #p #d #e #H
+elim (cpy_inv_atom1 … H) -H //
+* #I #K #V #i #_ #_ #_ #_ #H destruct
+qed-.
+
+fact cpy_inv_bind1_aux: ∀G,L,U1,U2,d,e. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 →
+                        ∀a,I,V1,T1. U1 = ⓑ{a,I}V1.T1 →
+                        ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
+                                 ⦃G, L. ⓑ{I}V1⦄ ⊢ T1 ▶[⫯d, e] T2 &
+                                 U2 = ⓑ{a,I}V2.T2.
+#G #L #U1 #U2 #d #e * -G -L -U1 -U2 -d -e
+[ #I #G #L #d #e #b #J #W1 #U1 #H destruct
+| #I #G #L #K #V #W #i #d #e #_ #_ #_ #_ #b #J #W1 #U1 #H destruct
+| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #b #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
+| #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #b #J #W1 #U1 #H destruct
+]
+qed-.
+
+lemma cpy_inv_bind1: ∀a,I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓑ{a,I} V1. T1 ▶[d, e] U2 →
+                     ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
+                              ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶[⫯d, e] T2 &
+                              U2 = ⓑ{a,I}V2.T2.
+/2 width=3 by cpy_inv_bind1_aux/ qed-.
+
+fact cpy_inv_flat1_aux: ∀G,L,U1,U2,d,e. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 →
+                        ∀I,V1,T1. U1 = ⓕ{I}V1.T1 →
+                        ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
+                                 ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 &
+                                 U2 = ⓕ{I}V2.T2.
+#G #L #U1 #U2 #d #e * -G -L -U1 -U2 -d -e
+[ #I #G #L #d #e #J #W1 #U1 #H destruct
+| #I #G #L #K #V #W #i #d #e #_ #_ #_ #_ #J #W1 #U1 #H destruct
+| #a #I #G #L #V1 #V2 #T1 #T2 #d #e #_ #_ #J #W1 #U1 #H destruct
+| #I #G #L #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma cpy_inv_flat1: ∀I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ▶[d, e] U2 →
+                     ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[d, e] V2 &
+                              ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 &
+                              U2 = ⓕ{I}V2.T2.
+/2 width=3 by cpy_inv_flat1_aux/ qed-.
+
+
+fact cpy_inv_refl_O2_aux: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → e = 0 → T1 = T2.
+#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
+[ //
+| #I #G #L #K #V #W #i #d #e #Hdi #Hide #_ #_ #H destruct
+  elim (ylt_yle_false … Hdi) -Hdi //
+| /3 width=1 by eq_f2/
+| /3 width=1 by eq_f2/
+]
+qed-.
+
+lemma cpy_inv_refl_O2: ∀G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▶[d, 0] T2 → T1 = T2.
+/2 width=6 by cpy_inv_refl_O2_aux/ qed-.
+
+(* Basic_1: was: subst1_gen_lift_eq *)
+lemma cpy_inv_lift1_eq: ∀G,T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
+                        ∀L,U2. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 → U1 = U2.
+#G #T1 #U1 #d #e #HTU1 #L #U2 #HU12 elim (cpy_fwd_up … HU12 … HTU1) -HU12 -HTU1
+/2 width=4 by cpy_inv_refl_O2/
+qed-.
+
+(* Basic_1: removed theorems 25:
+            subst0_gen_sort subst0_gen_lref subst0_gen_head subst0_gen_lift_lt
+            subst0_gen_lift_false subst0_gen_lift_ge subst0_refl subst0_trans
+            subst0_lift_lt subst0_lift_ge subst0_lift_ge_S subst0_lift_ge_s
+            subst0_subst0 subst0_subst0_back subst0_weight_le subst0_weight_lt
+            subst0_confluence_neq subst0_confluence_eq subst0_tlt_head
+            subst0_confluence_lift subst0_tlt
+            subst1_head subst1_gen_head subst1_lift_S subst1_confluence_lift
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/cpy_cpy.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/cpy_cpy.ma
new file mode 100644 (file)
index 0000000..66b0487
--- /dev/null
@@ -0,0 +1,122 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/cpy_lift.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: subst1_confluence_eq *)
+theorem cpy_conf_eq: ∀G,L,T0,T1,d1,e1. ⦃G, L⦄ ⊢ T0 ▶[d1, e1] T1 →
+                     ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 →
+                     ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T2 ▶[d1, e1] T.
+#G #L #T0 #T1 #d1 #e1 #H elim H -G -L -T0 -T1 -d1 -e1
+[ /2 width=3 by ex2_intro/
+| #I1 #G #L #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #T2 #d2 #e2 #H
+  elim (cpy_inv_lref1 … H) -H
+  [ #HX destruct /3 width=7 by cpy_subst, ex2_intro/
+  | -Hd1 -Hde1 * #I2 #K2 #V2 #_ #_ #HLK2 #HVT2
+    lapply (ldrop_mono … HLK1 … HLK2) -HLK1 -HLK2 #H destruct
+    >(lift_mono … HVT1 … HVT2) -HVT1 -HVT2 /2 width=3 by ex2_intro/
+  ]
+| #a #I #G #L #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
+  elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02) -IHV01 -HV02 #V #HV1 #HV2
+  elim (IHT01 … HT02) -T0 #T #HT1 #HT2
+  lapply (lsuby_cpy_trans … HT1 (L.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/
+  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V2) ?) -HT2
+  /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/
+| #I #G #L #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
+  elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02) -V0
+  elim (IHT01 … HT02) -T0 /3 width=5 by cpy_flat, ex2_intro/
+]
+qed-.
+
+(* Basic_1: was: subst1_confluence_neq *)
+theorem cpy_conf_neq: ∀G,L1,T0,T1,d1,e1. ⦃G, L1⦄ ⊢ T0 ▶[d1, e1] T1 →
+                      ∀L2,T2,d2,e2. ⦃G, L2⦄ ⊢ T0 ▶[d2, e2] T2 →
+                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
+                      ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L1⦄ ⊢ T2 ▶[d1, e1] T.
+#G #L1 #T0 #T1 #d1 #e1 #H elim H -G -L1 -T0 -T1 -d1 -e1
+[ /2 width=3 by ex2_intro/
+| #I1 #G #L1 #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #L2 #T2 #d2 #e2 #H1 #H2
+  elim (cpy_inv_lref1 … H1) -H1
+  [ #H destruct /3 width=7 by cpy_subst, ex2_intro/
+  | -HLK1 -HVT1 * #I2 #K2 #V2 #Hd2 #Hde2 #_ #_ elim H2 -H2 #Hded [ -Hd1 -Hde2 | -Hd2 -Hde1 ]
+    [ elim (ylt_yle_false … Hde1) -Hde1 /2 width=3 by yle_trans/
+    | elim (ylt_yle_false … Hde2) -Hde2 /2 width=3 by yle_trans/
+    ]
+  ]
+| #a #I #G #L1 #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
+  elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02 H) -IHV01 -HV02 #V #HV1 #HV2
+  elim (IHT01 … HT02) -T0
+  [ -H #T #HT1 #HT2
+    lapply (lsuby_cpy_trans … HT1 (L2.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/
+    lapply (lsuby_cpy_trans … HT2 (L1.ⓑ{I}V2) ?) -HT2 /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/
+  | -HV1 -HV2 elim H -H /3 width=1 by yle_succ, or_introl, or_intror/
+  ]
+| #I #G #L1 #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
+  elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02 H) -V0
+  elim (IHT01 … HT02 H) -T0 -H /3 width=5 by cpy_flat, ex2_intro/
+]
+qed-.
+
+(* Note: the constant 1 comes from cpy_subst *)
+(* Basic_1: was: subst1_trans *)
+theorem cpy_trans_ge: ∀G,L,T1,T0,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T0 →
+                      ∀T2. ⦃G, L⦄ ⊢ T0 ▶[d, 1] T2 → 1 ≤ e → ⦃G, L⦄ ⊢ T1 ▶[d, e] T2.
+#G #L #T1 #T0 #d #e #H elim H -G -L -T1 -T0 -d -e
+[ #I #G #L #d #e #T2 #H #He
+  elim (cpy_inv_atom1 … H) -H
+  [ #H destruct //
+  | * #J #K #V #i #Hd2i #Hide2 #HLK #HVT2 #H destruct
+    lapply (ylt_yle_trans … (d+e) … Hide2) /2 width=5 by cpy_subst, monotonic_yle_plus_dx/
+  ]
+| #I #G #L #K #V #V2 #i #d #e #Hdi #Hide #HLK #HVW #T2 #HVT2 #He
+  lapply (cpy_weak … HVT2 0 (i+1) ? ?) -HVT2 /3 width=1 by yle_plus_dx2_trans, yle_succ/
+  >yplus_inj #HVT2 <(cpy_inv_lift1_eq … HVW … HVT2) -HVT2 /2 width=5 by cpy_subst/
+| #a #I #G #L #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
+  elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct
+  lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02
+  lapply (IHT10 … HT02 He) -T0 /3 width=1 by cpy_bind/
+| #I #G #L #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
+  elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct /3 width=1 by cpy_flat/
+]
+qed-.
+
+theorem cpy_trans_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶[d1, e1] T0 →
+                        ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 → d2 + e2 ≤ d1 →
+                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T ▶[d1, e1] T2.
+#G #L #T1 #T0 #d1 #e1 #H elim H -G -L -T1 -T0 -d1 -e1
+[ /2 width=3 by ex2_intro/
+| #I #G #L #K #V #W #i1 #d1 #e1 #Hdi1 #Hide1 #HLK #HVW #T2 #d2 #e2 #HWT2 #Hde2d1
+  lapply (yle_trans … Hde2d1 … Hdi1) -Hde2d1 #Hde2i1
+  lapply (cpy_weak … HWT2 0 (i1+1) ? ?) -HWT2 /3 width=1 by yle_succ, yle_pred_sn/ -Hde2i1
+  >yplus_inj #HWT2 <(cpy_inv_lift1_eq … HVW … HWT2) -HWT2 /3 width=9 by cpy_subst, ex2_intro/
+| #a #I #G #L #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
+  elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02
+  elim (IHV10 … HV02) -IHV10 -HV02 // #V
+  elim (IHT10 … HT02) -T0 /2 width=1 by yle_succ/ #T #HT1 #HT2
+  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 /3 width=6 by cpy_bind, lsuby_succ, ex2_intro/
+| #I #G #L #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
+  elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV10 … HV02) -V0 //
+  elim (IHT10 … HT02) -T0 /3 width=6 by cpy_flat, ex2_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/cpy_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/cpy_lift.ma
new file mode 100644 (file)
index 0000000..aa0b241
--- /dev/null
@@ -0,0 +1,249 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_ldrop.ma".
+include "basic_2/relocation/cpy.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************)
+
+(* Properties on relocation *************************************************)
+
+(* Basic_1: was: subst1_lift_lt *)
+lemma cpy_lift_le: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
+                   ∀L,U1,U2,s,d,e. ⇩[s, d, e] L ≡ K →
+                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
+                   dt + et ≤ d → ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2.
+#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
+[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_
+  >(lift_mono … H1 … H2) -H1 -H2 //
+| #I #G #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #s #d #e #HLK #H #HWU2 #Hdetd
+  lapply (ylt_yle_trans … Hdetd … Hidet) -Hdetd #Hid
+  lapply (ylt_inv_inj … Hid) -Hid #Hid
+  lapply (lift_inv_lref1_lt … H … Hid) -H #H destruct
+  elim (lift_trans_ge … HVW … HWU2) -W // <minus_plus #W #HVW #HWU2
+  elim (ldrop_trans_le … HLK … HKV) -K /2 width=2 by lt_to_le/ #X #HLK #H
+  elim (ldrop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hid #K #Y #_ #HVY
+  >(lift_mono … HVY … HVW) -Y -HVW #H destruct /2 width=5 by cpy_subst/
+| #a #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdetd
+  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  /4 width=7 by cpy_bind, ldrop_skip, yle_succ/
+| #G #I #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdetd
+  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  /3 width=7 by cpy_flat/
+]
+qed-.
+
+lemma cpy_lift_be: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
+                   ∀L,U1,U2,s,d,e. ⇩[s, d, e] L ≡ K →
+                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
+                   dt ≤ d → d ≤ dt + et → ⦃G, L⦄ ⊢ U1 ▶[dt, et + e] U2.
+#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
+[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_ #_
+  >(lift_mono … H1 … H2) -H1 -H2 //
+| #I #G #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #s #d #e #HLK #H #HWU2 #Hdtd #_
+  elim (lift_inv_lref1 … H) -H * #Hid #H destruct
+  [ -Hdtd
+    lapply (ylt_yle_trans … (dt+et+e) … Hidet) // -Hidet #Hidete
+    elim (lift_trans_ge … HVW … HWU2) -W // <minus_plus #W #HVW #HWU2
+    elim (ldrop_trans_le … HLK … HKV) -K /2 width=2 by lt_to_le/ #X #HLK #H
+    elim (ldrop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hid #K #Y #_ #HVY
+    >(lift_mono … HVY … HVW) -V #H destruct /2 width=5 by cpy_subst/
+  | -Hdti
+    elim (yle_inv_inj2 … Hdtd) -Hdtd #dtt #Hdtd #H destruct
+    lapply (transitive_le … Hdtd Hid) -Hdtd #Hdti
+    lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2
+    lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid
+    /4 width=5 by cpy_subst, ldrop_inv_gen, monotonic_ylt_plus_dx, yle_plus_dx1_trans, yle_inj/
+  ]
+| #a #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdtd #Hddet
+  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  /4 width=7 by cpy_bind, ldrop_skip, yle_succ/
+| #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hdetd
+  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  /3 width=7 by cpy_flat/
+]
+qed-.
+
+(* Basic_1: was: subst1_lift_ge *)
+lemma cpy_lift_ge: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
+                   ∀L,U1,U2,s,d,e. ⇩[s, d, e] L ≡ K →
+                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
+                   d ≤ dt → ⦃G, L⦄ ⊢ U1 ▶[dt+e, et] U2.
+#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
+[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_
+  >(lift_mono … H1 … H2) -H1 -H2 //
+| #I #G #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #s #d #e #HLK #H #HWU2 #Hddt
+  lapply (yle_trans … Hddt … Hdti) -Hddt #Hid
+  elim (yle_inv_inj2 … Hid) -Hid #dd #Hddi #H0 destruct
+  lapply (lift_inv_lref1_ge … H … Hddi) -H #H destruct
+  lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2
+  lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hddi
+  /3 width=5 by cpy_subst, ldrop_inv_gen, monotonic_ylt_plus_dx, monotonic_yle_plus_dx/
+| #a #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hddt
+  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  /4 width=6 by cpy_bind, ldrop_skip, yle_succ/
+| #I #G #K #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #d #e #HLK #H1 #H2 #Hddt
+  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  /3 width=6 by cpy_flat/
+]
+qed-.
+
+(* Inversion lemmas on relocation *******************************************)
+
+(* Basic_1: was: subst1_gen_lift_lt *)
+lemma cpy_inv_lift1_le: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                        ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                        dt + et ≤ d →
+                        ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
+[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_
+  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
+  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  ]
+| #I #G #L #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #s #d #e #HLK #T1 #H #Hdetd
+  lapply (ylt_yle_trans … Hdetd … Hidet) -Hdetd #Hid
+  lapply (ylt_inv_inj … Hid) -Hid #Hid
+  lapply (lift_inv_lref2_lt … H … Hid) -H #H destruct
+  elim (ldrop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV
+  elim (lift_trans_le … HUV … HVW) -V // >minus_plus <plus_minus_m_m // -Hid /3 width=5 by cpy_subst, ex2_intro/
+| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2
+  elim (IHU12 … HTU1) -IHU12 -HTU1
+  /3 width=6 by cpy_bind, yle_succ, ldrop_skip, lift_bind, ex2_intro/
+| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HLK … HVW1) -W1 //
+  elim (IHU12 … HLK … HTU1) -U1 -HLK
+  /3 width=5 by cpy_flat, lift_flat, ex2_intro/
+]
+qed-.
+
+lemma cpy_inv_lift1_be: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                        ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                        dt ≤ d → yinj d + e ≤ dt + et →
+                        ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, et-e] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
+[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_ #_
+  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
+  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  ]
+| #I #G #L #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #s #d #e #HLK #T1 #H #Hdtd #Hdedet
+  lapply (yle_fwd_plus_ge_inj … Hdtd Hdedet) #Heet
+  elim (lift_inv_lref2 … H) -H * #Hid #H destruct [ -Hdtd -Hidet | -Hdti -Hdedet ]
+  [ lapply (ylt_yle_trans i d (dt+(et-e)) ? ?) /2 width=1 by ylt_inj/
+    [ >yplus_minus_assoc_inj /2 width=1 by yle_plus_to_minus_inj2/ ] -Hdedet #Hidete
+    elim (ldrop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV
+    elim (lift_trans_le … HUV … HVW) -V // >minus_plus <plus_minus_m_m // -Hid
+    /3 width=5 by cpy_subst, ex2_intro/
+  | elim (le_inv_plus_l … Hid) #Hdie #Hei
+    lapply (yle_trans … Hdtd (i-e) ?) /2 width=1 by yle_inj/ -Hdtd #Hdtie
+    lapply (ldrop_conf_ge … HLK … HLKV ?) -L // #HKV
+    elim (lift_split … HVW d (i-e+1)) -HVW [2,3,4: /2 width=1 by le_S_S, le_S/ ] -Hid -Hdie
+    #V1 #HV1 >plus_minus // <minus_minus /2 width=1 by le_S/ <minus_n_n <plus_n_O #H
+    @(ex2_intro … H) @(cpy_subst … HKV HV1) // (**) (* explicit constructor *)
+    >yplus_minus_assoc_inj /3 width=1 by monotonic_ylt_minus_dx, yle_inj/
+  ]
+| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdtd #Hdedet
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2
+  elim (IHU12 … HTU1) -U1
+  /3 width=6 by cpy_bind, ldrop_skip, lift_bind, yle_succ, ex2_intro/
+| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdtd #Hdedet
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HLK … HVW1) -W1 //
+  elim (IHU12 … HLK … HTU1) -U1 -HLK //
+  /3 width=5 by cpy_flat, lift_flat, ex2_intro/
+]
+qed-.
+
+(* Basic_1: was: subst1_gen_lift_ge *)
+lemma cpy_inv_lift1_ge: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                        ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                        yinj d + e ≤ dt →
+                        ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt-e, et] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
+[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_
+  [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/
+  | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/
+  ]
+| #I #G #L #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #s #d #e #HLK #T1 #H #Hdedt
+  lapply (yle_trans … Hdedt … Hdti) #Hdei
+  elim (yle_inv_plus_inj2 … Hdedt) -Hdedt #_ #Hedt
+  elim (yle_inv_plus_inj2 … Hdei) #Hdie #Hei
+  lapply (lift_inv_lref2_ge  … H ?) -H /2 width=1 by yle_inv_inj/ #H destruct
+  lapply (ldrop_conf_ge … HLK … HLKV ?) -L /2 width=1 by yle_inv_inj/ #HKV
+  elim (lift_split … HVW d (i-e+1)) -HVW [2,3,4: /3 width=1 by yle_inv_inj, le_S_S, le_S/ ] -Hdei -Hdie
+  #V0 #HV10 >plus_minus /2 width=1 by yle_inv_inj/ <minus_minus /3 width=1 by yle_inv_inj, le_S/ <minus_n_n <plus_n_O #H
+  @(ex2_intro … H) @(cpy_subst … HKV HV10) (**) (* explicit constructor *)
+  [ /2 width=1 by monotonic_yle_minus_dx/
+  | <yplus_minus_comm_inj /2 width=1 by monotonic_ylt_minus_dx/
+  ]
+| #a #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (yle_inv_plus_inj2 … Hdetd) #_ #Hedt
+  elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2
+  elim (IHU12 … HTU1) -U1 [4: @ldrop_skip // |2,5: skip |3: /2 width=1 by yle_succ/ ]
+  >yminus_succ1_inj /3 width=5 by cpy_bind, lift_bind, ex2_intro/
+| #I #G #L #W1 #W2 #U1 #U2 #dt #et #_ #_ #IHW12 #IHU12 #K #s #d #e #HLK #X #H #Hdetd
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHW12 … HLK … HVW1) -W1 //
+  elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5 by cpy_flat, lift_flat, ex2_intro/
+]
+qed-.
+
+(* Advancd inversion lemmas on relocation ***********************************)
+
+lemma cpy_inv_lift1_ge_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                           ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                           d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
+                           ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[d, dt + et - (yinj d + e)] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
+elim (cpy_split_up … HU12 (d + e)) -HU12 // -Hdedet #U #HU1 #HU2
+lapply (cpy_weak … HU1 d e ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hddt -Hdtde #HU1
+lapply (cpy_inv_lift1_eq … HTU1 … HU1) -HU1 #HU1 destruct
+elim (cpy_inv_lift1_ge … HU2 … HLK … HTU1) -U -L /2 width=3 by ex2_intro/
+qed-.
+
+lemma cpy_inv_lift1_be_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                           ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                           dt ≤ d → dt + et ≤ yinj d + e →
+                           ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, d-dt] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde
+lapply (cpy_weak … HU12 dt (d+e-dt) ? ?) -HU12 //
+[ >ymax_pre_sn_comm /2 width=1 by yle_plus_dx1_trans/ ] -Hdetde #HU12
+elim (cpy_inv_lift1_be … HU12 … HLK … HTU1) -U1 -L /2 width=3 by ex2_intro/
+qed-.
+
+lemma cpy_inv_lift1_le_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
+                           ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                           dt ≤ d → d ≤ dt + et → dt + et ≤ yinj d + e →
+                           ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde
+elim (cpy_split_up … HU12 d) -HU12 // #U #HU1 #HU2
+elim (cpy_inv_lift1_le … HU1 … HLK … HTU1) -U1
+[2: >ymax_pre_sn_comm // ] -Hdtd #T #HT1 #HTU
+lapply (cpy_weak … HU2 d e ? ?) -HU2 //
+[ >ymax_pre_sn_comm // ] -Hddet -Hdetde #HU2
+lapply (cpy_inv_lift1_eq … HTU … HU2) -L #H destruct /2 width=3 by ex2_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lsuby.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lsuby.ma
new file mode 100644 (file)
index 0000000..eb2c7bf
--- /dev/null
@@ -0,0 +1,237 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "ground_2/ynat/ynat_plus.ma".
+include "basic_2/notation/relations/lrsubeq_4.ma".
+include "basic_2/relocation/ldrop.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************)
+
+inductive lsuby: relation4 ynat ynat lenv lenv ≝
+| lsuby_atom: ∀L,d,e. lsuby d e L (⋆)
+| lsuby_zero: ∀I1,I2,L1,L2,V1,V2.
+              lsuby 0 0 L1 L2 → lsuby 0 0 (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2)
+| lsuby_pair: ∀I1,I2,L1,L2,V,e. lsuby 0 e L1 L2 →
+              lsuby 0 (⫯e) (L1.ⓑ{I1}V) (L2.ⓑ{I2}V)
+| lsuby_succ: ∀I1,I2,L1,L2,V1,V2,d,e.
+              lsuby d e L1 L2 → lsuby (⫯d) e (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2)
+.
+
+interpretation
+  "local environment refinement (extended substitution)"
+  'LRSubEq L1 d e L2 = (lsuby d e L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma lsuby_pair_lt: ∀I1,I2,L1,L2,V,e. L1 ⊆[0, ⫰e] L2 → 0 < e →
+                     L1.ⓑ{I1}V ⊆[0, e] L2.ⓑ{I2}V.
+#I1 #I2 #L1 #L2 #V #e #HL12 #He <(ylt_inv_O1 … He) /2 width=1 by lsuby_pair/
+qed.
+
+lemma lsuby_succ_lt: ∀I1,I2,L1,L2,V1,V2,d,e. L1 ⊆[⫰d, e] L2 → 0 < d →
+                     L1.ⓑ{I1}V1 ⊆[d, e] L2. ⓑ{I2}V2.
+#I1 #I2 #L1 #L2 #V1 #V2 #d #e #HL12 #Hd <(ylt_inv_O1 … Hd) /2 width=1 by lsuby_succ/
+qed.
+
+lemma lsuby_pair_O_Y: ∀L1,L2. L1 ⊆[0, ∞] L2 →
+                      ∀I1,I2,V. L1.ⓑ{I1}V ⊆[0,∞] L2.ⓑ{I2}V.
+#L1 #L2 #HL12 #I1 #I2 #V lapply (lsuby_pair I1 I2 … V … HL12) -HL12 //
+qed.
+
+lemma lsuby_refl: ∀L,d,e. L ⊆[d, e] L.
+#L elim L -L //
+#L #I #V #IHL #d elim (ynat_cases … d) [| * #x ]
+#Hd destruct /2 width=1 by lsuby_succ/
+#e elim (ynat_cases … e) [| * #x ]
+#He destruct /2 width=1 by lsuby_zero, lsuby_pair/
+qed.
+
+lemma lsuby_O2: ∀L2,L1,d. |L2| ≤ |L1| → L1 ⊆[d, yinj 0] L2.
+#L2 elim L2 -L2 // #L2 #I2 #V2 #IHL2 * normalize
+[ #d #H lapply (le_n_O_to_eq … H) -H <plus_n_Sm #H destruct
+| #L1 #I1 #V1 #d #H lapply (le_plus_to_le_r … H) -H #HL12
+ elim (ynat_cases d) /3 width=1 by lsuby_zero/
+ * /3 width=1 by lsuby_succ/
+]
+qed.
+
+lemma lsuby_sym: ∀d,e,L1,L2. L1 ⊆[d, e] L2 → |L1| = |L2| → L2 ⊆[d, e] L1.
+#d #e #L1 #L2 #H elim H -d -e -L1 -L2
+[ #L1 #d #e #H >(length_inv_zero_dx … H) -L1 //
+| /2 width=1 by lsuby_O2/
+| #I1 #I2 #L1 #L2 #V #e #_ #IHL12 #H lapply (injective_plus_l … H)
+  /3 width=1 by lsuby_pair/
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #IHL12 #H lapply (injective_plus_l … H)
+  /3 width=1 by lsuby_succ/
+]
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsuby_inv_atom1_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 → L1 = ⋆ → L2 = ⋆.
+#L1 #L2 #d #e * -L1 -L2 -d -e //
+[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #H destruct
+| #I1 #I2 #L1 #L2 #V #e #_ #H destruct
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #H destruct
+]
+qed-.
+
+lemma lsuby_inv_atom1: ∀L2,d,e. ⋆ ⊆[d, e] L2 → L2 = ⋆.
+/2 width=5 by lsuby_inv_atom1_aux/ qed-.
+
+fact lsuby_inv_zero1_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                          ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → d = 0 → e = 0 →
+                          L2 = ⋆ ∨
+                          ∃∃J2,K2,W2. K1 ⊆[0, 0] K2 & L2 = K2.ⓑ{J2}W2.
+#L1 #L2 #d #e * -L1 -L2 -d -e /2 width=1 by or_introl/
+[ #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J1 #K1 #W1 #H #_ #_ destruct
+  /3 width=5 by ex2_3_intro, or_intror/
+| #I1 #I2 #L1 #L2 #V #e #_ #J1 #K1 #W1 #_ #_ #H
+  elim (ysucc_inv_O_dx … H)
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J1 #K1 #W1 #_ #H
+  elim (ysucc_inv_O_dx … H)
+]
+qed-.
+
+lemma lsuby_inv_zero1: ∀I1,K1,L2,V1. K1.ⓑ{I1}V1 ⊆[0, 0] L2 →
+                       L2 = ⋆ ∨
+                       ∃∃I2,K2,V2. K1 ⊆[0, 0] K2 & L2 = K2.ⓑ{I2}V2.
+/2 width=9 by lsuby_inv_zero1_aux/ qed-.
+
+fact lsuby_inv_pair1_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                          ∀J1,K1,W. L1 = K1.ⓑ{J1}W → d = 0 → 0 < e →
+                          L2 = ⋆ ∨
+                          ∃∃J2,K2. K1 ⊆[0, ⫰e] K2 & L2 = K2.ⓑ{J2}W.
+#L1 #L2 #d #e * -L1 -L2 -d -e /2 width=1 by or_introl/
+[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W #_ #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V #e #HL12 #J1 #K1 #W #H #_ #_ destruct
+  /3 width=4 by ex2_2_intro, or_intror/
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J1 #K1 #W #_ #H
+  elim (ysucc_inv_O_dx … H)
+]
+qed-.
+
+lemma lsuby_inv_pair1: ∀I1,K1,L2,V,e. K1.ⓑ{I1}V ⊆[0, e] L2 → 0 < e →
+                       L2 = ⋆ ∨
+                       ∃∃I2,K2. K1 ⊆[0, ⫰e] K2 & L2 = K2.ⓑ{I2}V.
+/2 width=6 by lsuby_inv_pair1_aux/ qed-.
+
+fact lsuby_inv_succ1_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                          ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → 0 < d →
+                          L2 = ⋆ ∨
+                          ∃∃J2,K2,W2. K1 ⊆[⫰d, e] K2 & L2 = K2.ⓑ{J2}W2.
+#L1 #L2 #d #e * -L1 -L2 -d -e /2 width=1 by or_introl/
+[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W1 #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V #e #_ #J1 #K1 #W1 #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #HL12 #J1 #K1 #W1 #H #_ destruct
+  /3 width=5 by ex2_3_intro, or_intror/
+]
+qed-.
+
+lemma lsuby_inv_succ1: ∀I1,K1,L2,V1,d,e. K1.ⓑ{I1}V1 ⊆[d, e] L2 → 0 < d →
+                       L2 = ⋆ ∨
+                       ∃∃I2,K2,V2. K1 ⊆[⫰d, e] K2 & L2 = K2.ⓑ{I2}V2.
+/2 width=5 by lsuby_inv_succ1_aux/ qed-.
+
+fact lsuby_inv_zero2_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                          ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → d = 0 → e = 0 →
+                          ∃∃J1,K1,W1. K1 ⊆[0, 0] K2 & L1 = K1.ⓑ{J1}W1.
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ #L1 #d #e #J2 #K2 #W1 #H destruct
+| #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J2 #K2 #W2 #H #_ #_ destruct
+  /2 width=5 by ex2_3_intro/
+| #I1 #I2 #L1 #L2 #V #e #_ #J2 #K2 #W2 #_ #_ #H
+  elim (ysucc_inv_O_dx … H)
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J2 #K2 #W2 #_ #H
+  elim (ysucc_inv_O_dx … H)
+]
+qed-.
+
+lemma lsuby_inv_zero2: ∀I2,K2,L1,V2. L1 ⊆[0, 0] K2.ⓑ{I2}V2 →
+                       ∃∃I1,K1,V1. K1 ⊆[0, 0] K2 & L1 = K1.ⓑ{I1}V1.
+/2 width=9 by lsuby_inv_zero2_aux/ qed-.
+
+fact lsuby_inv_pair2_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                          ∀J2,K2,W. L2 = K2.ⓑ{J2}W → d = 0 → 0 < e →
+                          ∃∃J1,K1. K1 ⊆[0, ⫰e] K2 & L1 = K1.ⓑ{J1}W.
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ #L1 #d #e #J2 #K2 #W #H destruct
+| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W #_ #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V #e #HL12 #J2 #K2 #W #H #_ #_ destruct
+  /2 width=4 by ex2_2_intro/
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #J2 #K2 #W #_ #H
+  elim (ysucc_inv_O_dx … H)
+]
+qed-.
+
+lemma lsuby_inv_pair2: ∀I2,K2,L1,V,e. L1 ⊆[0, e] K2.ⓑ{I2}V → 0 < e →
+                       ∃∃I1,K1. K1 ⊆[0, ⫰e] K2 & L1 = K1.ⓑ{I1}V.
+/2 width=6 by lsuby_inv_pair2_aux/ qed-.
+
+fact lsuby_inv_succ2_aux: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                          ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → 0 < d →
+                          ∃∃J1,K1,W1. K1 ⊆[⫰d, e] K2 & L1 = K1.ⓑ{J1}W1.
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ #L1 #d #e #J2 #K2 #W2 #H destruct
+| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W2 #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V #e #_ #J2 #K1 #W2 #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #HL12 #J2 #K2 #W2 #H #_ destruct
+  /2 width=5 by ex2_3_intro/
+]
+qed-.
+
+lemma lsuby_inv_succ2: ∀I2,K2,L1,V2,d,e. L1 ⊆[d, e] K2.ⓑ{I2}V2 → 0 < d →
+                       ∃∃I1,K1,V1. K1 ⊆[⫰d, e] K2 & L1 = K1.ⓑ{I1}V1.
+/2 width=5 by lsuby_inv_succ2_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lsuby_fwd_length: ∀L1,L2,d,e. L1 ⊆[d, e] L2 → |L2| ≤ |L1|.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize /2 width=1 by le_S_S/
+qed-.
+
+(* Properties on basic slicing **********************************************)
+
+lemma lsuby_ldrop_trans_be: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
+                            ∀I2,K2,W,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓑ{I2}W →
+                            d ≤ i → i < d + e →
+                            ∃∃I1,K1. K1 ⊆[0, ⫰(d+e-i)] K2 & ⇩[s, 0, i] L1 ≡ K1.ⓑ{I1}W.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
+[ #L1 #d #e #J2 #K2 #W #s #i #H
+  elim (ldrop_inv_atom1 … H) -H #H destruct
+| #I1 #I2 #L1 #L2 #V1 #V2 #_ #_ #J2 #K2 #W #s #i #_ #_ #H
+  elim (ylt_yle_false … H) //
+| #I1 #I2 #L1 #L2 #V #e #HL12 #IHL12 #J2 #K2 #W #s #i #H #_ >yplus_O1
+  elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ]
+  [ #_ destruct -I2 >ypred_succ
+    /2 width=4 by ldrop_pair, ex2_2_intro/
+  | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/
+    #H <H -H #H lapply (ylt_inv_succ … H) -H
+    #Hie elim (IHL12 … HLK1) -IHL12 -HLK1 // -Hie
+    >yminus_succ <yminus_inj /3 width=4 by ldrop_drop_lt, ex2_2_intro/
+  ]
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #IHL12 #J2 #K2 #W #s #i #HLK2 #Hdi
+  elim (yle_inv_succ1 … Hdi) -Hdi
+  #Hdi #Hi <Hi >yplus_succ1 #H lapply (ylt_inv_succ … H) -H
+  #Hide lapply (ldrop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/
+  #HLK1 elim (IHL12 … HLK1) -IHL12 -HLK1 <yminus_inj >yminus_SO2
+  /4 width=4 by ylt_O, ldrop_drop_lt, ex2_2_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lsuby_lsuby.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lsuby_lsuby.ma
new file mode 100644 (file)
index 0000000..24361d3
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lsuby.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************)
+
+(* Main properties **********************************************************)
+
+theorem lsuby_trans: ∀d,e. Transitive … (lsuby d e).
+#d #e #L1 #L2 #H elim H -L1 -L2 -d -e
+[ #L1 #d #e #X #H lapply (lsuby_inv_atom1 … H) -H
+  #H destruct //
+| #I1 #I2 #L1 #L #V1 #V #_ #IHL1 #X #H elim (lsuby_inv_zero1 … H) -H //
+  * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_zero/
+| #I1 #I2 #L1 #L2 #V #e #_ #IHL1 #X #H elim (lsuby_inv_pair1 … H) -H //
+  * #I2 #L2 #HL2 #H destruct /3 width=1 by lsuby_pair/
+| #I1 #I2 #L1 #L2 #V1 #V2 #d #e #_ #IHL1 #X #H elim (lsuby_inv_succ1 … H) -H //
+  * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_succ/
+]
+qed-.
index 1d1a01beb2f18195ee95925c3f42eca1b7ca1e27..0595e7c208346bd0eb0cc6c75edd0146bf7d6d93 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/lrsubeq_2.ma".
+include "basic_2/notation/relations/lrsubeqc_2.ma".
 include "basic_2/relocation/ldrop.ma".
 
 (* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************)
@@ -25,7 +25,7 @@ inductive lsubr: relation lenv ≝
 
 interpretation
   "local environment refinement (restricted)"
-  'LRSubEq L1 L2 = (lsubr L1 L2).
+  'LRSubEqC L1 L2 = (lsubr L1 L2).
 
 (* Basic properties *********************************************************)
 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys.ma
new file mode 100644 (file)
index 0000000..10c5912
--- /dev/null
@@ -0,0 +1,166 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/psubststar_6.ma".
+include "basic_2/relocation/cpy.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
+
+definition cpys: ynat → ynat → relation4 genv lenv term term ≝
+                 λd,e,G. LTC … (cpy d e G).
+
+interpretation "context-sensitive extended multiple substritution (term)"
+   'PSubstStar G L T1 d e T2 = (cpys d e G L T1 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma cpys_ind: ∀G,L,T1,d,e. ∀R:predicate term. R T1 →
+                (∀T,T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T → ⦃G, L⦄ ⊢ T ▶[d, e] T2 → R T → R T2) →
+                ∀T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R T2.
+#G #L #T1 #d #e #R #HT1 #IHT1 #T2 #HT12
+@(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+
+lemma cpys_ind_dx: ∀G,L,T2,d,e. ∀R:predicate term. R T2 →
+                   (∀T1,T. ⦃G, L⦄ ⊢ T1 ▶[d, e] T → ⦃G, L⦄ ⊢ T ▶*[d, e] T2 → R T → R T1) →
+                   ∀T1. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R T1.
+#G #L #T2 #d #e #R #HT2 #IHT2 #T1 #HT12
+@(TC_star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma cpy_cpys: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
+/2 width=1 by inj/ qed.
+
+lemma cpys_strap1: ∀G,L,T1,T,T2,d,e.
+                   ⦃G, L⦄ ⊢ T1 ▶*[d, e] T → ⦃G, L⦄ ⊢ T ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
+normalize /2 width=3 by step/ qed-.
+
+lemma cpys_strap2: ∀G,L,T1,T,T2,d,e.
+                   ⦃G, L⦄ ⊢ T1 ▶[d, e] T → ⦃G, L⦄ ⊢ T ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
+normalize /2 width=3 by TC_strap/ qed-.
+
+lemma lsuby_cpys_trans: ∀G,d,e. lsub_trans … (cpys d e G) (lsuby d e).
+/3 width=5 by lsuby_cpy_trans, LTC_lsub_trans/
+qed-.
+
+lemma cpys_refl: ∀G,L,d,e. reflexive … (cpys d e G L).
+/2 width=1 by cpy_cpys/ qed.
+
+lemma cpys_bind: ∀G,L,V1,V2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
+                 ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 →
+                 ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[d, e] ⓑ{a,I}V2.T2.
+#G #L #V1 #V2 #d #e #HV12 @(cpys_ind … HV12) -V2
+[ #I #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_bind/
+| /3 width=5 by cpys_strap1, cpy_bind/
+]
+qed.
+
+lemma cpys_flat: ∀G,L,V1,V2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
+                 ∀T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 →
+                 ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[d, e] ⓕ{I}V2.T2.
+#G #L #V1 #V2 #d #e #HV12 @(cpys_ind … HV12) -V2
+[ #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_flat/
+| /3 width=5 by cpys_strap1, cpy_flat/
+qed.
+
+lemma cpys_weak: ∀G,L,T1,T2,d1,e1. ⦃G, L⦄ ⊢ T1 ▶*[d1, e1] T2 →
+                 ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
+                 ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T2.
+#G #L #T1 #T2 #d1 #e1 #H #d1 #d2 #Hd21 #Hde12 @(cpys_ind … H) -T2
+/3 width=7 by cpys_strap1, cpy_weak/
+qed-.
+
+lemma cpys_weak_top: ∀G,L,T1,T2,d,e.
+                     ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, |L| - d] T2.
+#G #L #T1 #T2 #d #e #H @(cpys_ind … H) -T2
+/3 width=4 by cpys_strap1, cpy_weak_top/
+qed-.
+
+lemma cpys_weak_full: ∀G,L,T1,T2,d,e.
+                      ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[0, |L|] T2.
+#G #L #T1 #T2 #d #e #H @(cpys_ind … H) -T2
+/3 width=5 by cpys_strap1, cpy_weak_full/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpys_fwd_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                   ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                   d ≤ dt → d + e ≤ dt + et →
+                   ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶*[d+e, dt+et-(d+e)] U2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #T1 #d #e #HTU1 #Hddt #Hdedet @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HU1 #HTU
+  elim (cpy_fwd_up … HU2 … HTU) -HU2 -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+lemma cpys_fwd_tw: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ♯{T1} ≤ ♯{T2}.
+#G #L #T1 #T2 #d #e #H @(cpys_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1 lapply (cpy_fwd_tw … HT2) -HT2
+/2 width=3 by transitive_le/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Note: this can be derived from cpys_inv_atom1 *)
+lemma cpys_inv_sort1: ∀G,L,T2,k,d,e. ⦃G, L⦄ ⊢ ⋆k ▶*[d, e] T2 → T2 = ⋆k.
+#G #L #T2 #k #d #e #H @(cpys_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1 destruct
+>(cpy_inv_sort1 … HT2) -HT2 //
+qed-.
+
+(* Note: this can be derived from cpys_inv_atom1 *)
+lemma cpys_inv_gref1: ∀G,L,T2,p,d,e. ⦃G, L⦄ ⊢ §p ▶*[d, e] T2 → T2 = §p.
+#G #L #T2 #p #d #e #H @(cpys_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1 destruct
+>(cpy_inv_gref1 … HT2) -HT2 //
+qed-.
+
+lemma cpys_inv_bind1: ∀a,I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[d, e] U2 →
+                      ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 &
+                               ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 &
+                               U2 = ⓑ{a,I}V2.T2.
+#a #I #G #L #V1 #T1 #U2 #d #e #H @(cpys_ind … H) -U2
+[ /2 width=5 by ex3_2_intro/
+| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
+  elim (cpy_inv_bind1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H
+  lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V1) ?) -HT2
+  /3 width=5 by cpys_strap1, lsuby_succ, ex3_2_intro/
+]
+qed-.
+
+lemma cpys_inv_flat1: ∀I,G,L,V1,T1,U2,d,e. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[d, e] U2 →
+                      ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 & ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 &
+                               U2 = ⓕ{I}V2.T2.
+#I #G #L #V1 #T1 #U2 #d #e #H @(cpys_ind … H) -U2
+[ /2 width=5 by ex3_2_intro/
+| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
+  elim (cpy_inv_flat1 … HU2) -HU2
+  /3 width=5 by cpys_strap1, ex3_2_intro/
+]
+qed-.
+
+lemma cpys_inv_refl_O2: ∀G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▶*[d, 0] T2 → T1 = T2.
+#G #L #T1 #T2 #d #H @(cpys_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1 <(cpy_inv_refl_O2 … HT2) -HT2 //
+qed-.
+
+lemma cpys_inv_lift1_eq: ∀G,L,U1,U2. ∀d,e:nat.
+                         ⦃G, L⦄ ⊢ U1 ▶*[d, e] U2 → ∀T1. ⇧[d, e] T1 ≡ U1 → U1 = U2.
+#G #L #U1 #U2 #d #e #H #T1 #HTU1 @(cpys_ind … H) -U2
+/2 width=7 by cpy_inv_lift1_eq/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_alt.ma
new file mode 100644 (file)
index 0000000..e297be6
--- /dev/null
@@ -0,0 +1,102 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/psubststaralt_6.ma".
+include "basic_2/substitution/cpys_lift.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
+
+(* alternative definition of cpys *)
+inductive cpysa: ynat → ynat → relation4 genv lenv term term ≝
+| cpysa_atom : ∀I,G,L,d,e. cpysa d e G L (⓪{I}) (⓪{I})
+| cpysa_subst: ∀I,G,L,K,V1,V2,W2,i,d,e. d ≤ yinj i → i < d+e →
+               ⇩[i] L ≡ K.ⓑ{I}V1 → cpysa 0 (⫰(d+e-i)) G K V1 V2 →
+               ⇧[0, i+1] V2 ≡ W2 → cpysa d e G L (#i) W2
+| cpysa_bind : ∀a,I,G,L,V1,V2,T1,T2,d,e.
+               cpysa d e G L V1 V2 → cpysa (⫯d) e G (L.ⓑ{I}V1) T1 T2 →
+               cpysa d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
+| cpysa_flat : ∀I,G,L,V1,V2,T1,T2,d,e.
+               cpysa d e G L V1 V2 → cpysa d e G L T1 T2 →
+               cpysa d e G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
+.
+
+interpretation
+   "context-sensitive extended multiple substritution (term) alternative"
+   'PSubstStarAlt G L T1 d e T2 = (cpysa d e G L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma lsuby_cpysa_trans: ∀G,d,e. lsub_trans … (cpysa d e G) (lsuby d e).
+#G #d #e #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -d -e
+[ //
+| #I #G #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
+  elim (lsuby_ldrop_trans_be … HL12 … HLK1) -HL12 -HLK1 /3 width=7 by cpysa_subst/
+| /4 width=1 by lsuby_succ, cpysa_bind/
+| /3 width=1 by cpysa_flat/
+]
+qed-.
+
+lemma cpysa_refl: ∀G,T,L,d,e. ⦃G, L⦄ ⊢ T ▶▶*[d, e] T.
+#G #T elim T -T //
+#I elim I -I /2 width=1 by cpysa_bind, cpysa_flat/
+qed.
+
+lemma cpysa_cpy_trans: ∀G,L,T1,T,d,e. ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T →
+                       ∀T2. ⦃G, L⦄ ⊢ T ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T2.
+#G #L #T1 #T #d #e #H elim H -G -L -T1 -T -d -e
+[ #I #G #L #d #e #X #H
+  elim (cpy_inv_atom1 … H) -H // * /2 width=7 by cpysa_subst/
+| #I #G #L #K #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK #_ #HVW2 #IHV12 #T2 #H
+  lapply (ldrop_fwd_drop2 … HLK) #H0LK
+  lapply (cpy_weak … H 0 (d+e) ? ?) -H // #H
+  elim (cpy_inv_lift1_be … H … H0LK … HVW2) -H -H0LK -HVW2
+  /3 width=7 by cpysa_subst, ylt_fwd_le_succ/
+| #a #I #G #L #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
+  elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
+  /5 width=5 by cpysa_bind, lsuby_cpy_trans, lsuby_succ/
+| #I #G #L #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
+  elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct /3 width=1 by cpysa_flat/
+]
+qed-.
+
+lemma cpys_cpysa: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T2.
+/3 width=8 by cpysa_cpy_trans, cpys_ind/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cpysa_inv_cpys: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
+#G #L #T1 #T2 #d #e #H elim H -G -L -T1 -T2 -d -e
+/2 width=7 by cpys_subst, cpys_flat, cpys_bind, cpy_cpys/
+qed-.
+
+(* Advanced eliminators *****************************************************)
+
+lemma cpys_ind_alt: ∀R:ynat→ynat→relation4 genv lenv term term.
+                    (∀I,G,L,d,e. R d e G L (⓪{I}) (⓪{I})) →
+                    (∀I,G,L,K,V1,V2,W2,i,d,e. d ≤ yinj i → i < d + e →
+                     ⇩[i] L ≡ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(d+e-i)] V2 →
+                     ⇧[O, i+1] V2 ≡ W2 → R O (⫰(d+e-i)) G K V1 V2 → R d e G L (#i) W2
+                    ) →
+                    (∀a,I,G,L,V1,V2,T1,T2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
+                     ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 → R d e G L V1 V2 →
+                     R (⫯d) e G (L.ⓑ{I}V1) T1 T2 → R d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
+                    ) →
+                    (∀I,G,L,V1,V2,T1,T2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
+                     ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R d e G L V1 V2 →
+                     R d e G L T1 T2 → R d e G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
+                    ) →
+                    ∀d,e,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → R d e G L T1 T2.
+#R #H1 #H2 #H3 #H4 #d #e #G #L #T1 #T2 #H elim (cpys_cpysa … H) -G -L -T1 -T2 -d -e
+/3 width=8 by cpysa_inv_cpys/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_cpys.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_cpys.ma
new file mode 100644 (file)
index 0000000..52759ca
--- /dev/null
@@ -0,0 +1,117 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/cpy_cpy.ma".
+include "basic_2/substitution/cpys_alt.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cpys_inv_SO2: ∀G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▶*[d, 1] T2 → ⦃G, L⦄ ⊢ T1 ▶[d, 1] T2.
+#G #L #T1 #T2 #d #H @(cpys_ind … H) -T2 /2 width=3 by cpy_trans_ge/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma cpys_strip_eq: ∀G,L,T0,T1,d1,e1. ⦃G, L⦄ ⊢ T0 ▶*[d1, e1] T1 →
+                     ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 →
+                     ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T2 ▶*[d1, e1] T.
+normalize /3 width=3 by cpy_conf_eq, TC_strip1/ qed-.
+
+lemma cpys_strip_neq: ∀G,L1,T0,T1,d1,e1. ⦃G, L1⦄ ⊢ T0 ▶*[d1, e1] T1 →
+                      ∀L2,T2,d2,e2. ⦃G, L2⦄ ⊢ T0 ▶[d2, e2] T2 →
+                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
+                      ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L1⦄ ⊢ T2 ▶*[d1, e1] T.
+normalize /3 width=3 by cpy_conf_neq, TC_strip1/ qed-.
+
+lemma cpys_strap1_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶*[d1, e1] T0 →
+                        ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶[d2, e2] T2 → d2 + e2 ≤ d1 →
+                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[d2, e2] T & ⦃G, L⦄ ⊢ T ▶*[d1, e1] T2.
+normalize /3 width=3 by cpy_trans_down, TC_strap1/ qed.
+
+lemma cpys_strap2_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶[d1, e1] T0 →
+                        ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶*[d2, e2] T2 → d2 + e2 ≤ d1 →
+                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L⦄ ⊢ T ▶[d1, e1] T2.
+normalize /3 width=3 by cpy_trans_down, TC_strap2/ qed-.
+
+lemma cpys_split_up: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 →
+                     ∀i. d ≤ i → i ≤ d + e →
+                     ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d, i - d] T & ⦃G, L⦄ ⊢ T ▶*[i, d + e - i] T2.
+#G #L #T1 #T2 #d #e #H #i #Hdi #Hide @(cpys_ind … H) -T2
+[ /2 width=3 by ex2_intro/
+| #T #T2 #_ #HT12 * #T3 #HT13 #HT3
+  elim (cpy_split_up … HT12 … Hide) -HT12 -Hide #T0 #HT0 #HT02
+  elim (cpys_strap1_down … HT3 … HT0) -T /3 width=5 by cpys_strap1, ex2_intro/
+  >ymax_pre_sn_comm //
+]
+qed-.
+
+lemma cpys_inv_lift1_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
+                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[d, dt + et - (yinj d + e)] T2 &
+                               ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
+elim (cpys_split_up … HU12 (d + e)) -HU12 // -Hdedet #U #HU1 #HU2
+lapply (cpys_weak … HU1 d e ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hddt -Hdtde #HU1
+lapply (cpys_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct
+elim (cpys_inv_lift1_ge … HU2 … HLK … HTU1) -HU2 -HLK -HTU1 //
+>yplus_minus_inj /2 width=3 by ex2_intro/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem cpys_conf_eq: ∀G,L,T0,T1,d1,e1. ⦃G, L⦄ ⊢ T0 ▶*[d1, e1] T1 →
+                      ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶*[d2, e2] T2 →
+                      ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L⦄ ⊢ T2 ▶*[d1, e1] T.
+normalize /3 width=3 by cpy_conf_eq, TC_confluent2/ qed-.
+
+theorem cpys_conf_neq: ∀G,L1,T0,T1,d1,e1. ⦃G, L1⦄ ⊢ T0 ▶*[d1, e1] T1 →
+                       ∀L2,T2,d2,e2. ⦃G, L2⦄ ⊢ T0 ▶*[d2, e2] T2 →
+                       (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
+                       ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L1⦄ ⊢ T2 ▶*[d1, e1] T.
+normalize /3 width=3 by cpy_conf_neq, TC_confluent2/ qed-.
+
+theorem cpys_trans_eq: ∀G,L,T1,T,T2,d,e.
+                       ⦃G, L⦄ ⊢ T1 ▶*[d, e] T → ⦃G, L⦄ ⊢ T ▶*[d, e] T2 →
+                       ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2.
+normalize /2 width=3 by trans_TC/ qed-.
+
+theorem cpys_trans_down: ∀G,L,T1,T0,d1,e1. ⦃G, L⦄ ⊢ T1 ▶*[d1, e1] T0 →
+                         ∀T2,d2,e2. ⦃G, L⦄ ⊢ T0 ▶*[d2, e2] T2 → d2 + e2 ≤ d1 →
+                         ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[d2, e2] T & ⦃G, L⦄ ⊢ T ▶*[d1, e1] T2.
+normalize /3 width=3 by cpy_trans_down, TC_transitive2/ qed-.
+
+theorem cpys_antisym_eq: ∀G,L1,T1,T2,d,e. ⦃G, L1⦄ ⊢ T1 ▶*[d, e] T2 →
+                         ∀L2. ⦃G, L2⦄ ⊢ T2 ▶*[d, e] T1 → T1 = T2.
+#G #L1 #T1 #T2 #d #e #H @(cpys_ind_alt … H) -G -L1 -T1 -T2 //
+[ #I1 #G #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #_ #_ #HVW2 #_ #L2 #HW2
+  elim (lt_or_ge (|L2|) (i+1)) #Hi [ -Hdi -Hide | ]
+  [ lapply (cpys_weak_full … HW2) -HW2 #HW2
+    lapply (cpys_weak … HW2 0 (i+1) ? ?) -HW2 //
+    [ >yplus_O1 >yplus_O1 /3 width=1 by ylt_fwd_le, ylt_inj/ ] -Hi
+    #HW2 >(cpys_inv_lift1_eq … HW2) -HW2 //
+  | elim (ldrop_O1_le … Hi) -Hi #K2 #HLK2
+    elim (cpys_inv_lift1_ge_up … HW2 … HLK2 … HVW2 ? ? ?) -HW2 -HLK2 -HVW2
+    /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ -Hdi -Hide
+    #X #_ #H elim (lift_inv_lref2_be … H) -H //
+  ]
+| #a #I #G #L1 #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_bind1 … H) -H
+  #V #T #HV2 #HT2 #H destruct
+  lapply (IHV12 … HV2) #H destruct -IHV12 -HV2 /3 width=2 by eq_f2/
+| #I #G #L1 #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_flat1 … H) -H
+  #V #T #HV2 #HT2 #H destruct /3 width=2 by eq_f2/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/cpys_lift.ma
new file mode 100644 (file)
index 0000000..b6d9e45
--- /dev/null
@@ -0,0 +1,218 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/cpy_lift.ma".
+include "basic_2/substitution/cpys.ma".
+
+(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************)
+
+(* Advanced properties ******************************************************)
+
+lemma cpys_subst: ∀I,G,L,K,V,U1,i,d,e.
+                  d ≤ yinj i → i < d + e →
+                  ⇩[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ⫰(d+e-i)] U1 →
+                  ∀U2. ⇧[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, e] U2.
+#I #G #L #K #V #U1 #i #d #e #Hdi #Hide #HLK #H @(cpys_ind … H) -U1
+[ /3 width=5 by cpy_cpys, cpy_subst/
+| #U #U1 #_ #HU1 #IHU #U2 #HU12
+  elim (lift_total U 0 (i+1)) #U0 #HU0
+  lapply (IHU … HU0) -IHU #H
+  lapply (ldrop_fwd_drop2 … HLK) -HLK #HLK
+  lapply (cpy_lift_ge … HU1 … HLK HU0 HU12 ?) -HU1 -HLK -HU0 -HU12 // #HU02
+  lapply (cpy_weak … HU02 d e ? ?) -HU02
+  [2,3: /2 width=3 by cpys_strap1, yle_succ_dx/ ]
+  >yplus_O1 <yplus_inj >ymax_pre_sn_comm /2 width=1 by ylt_fwd_le_succ/
+]
+qed.
+
+lemma cpys_subst_Y2: ∀I,G,L,K,V,U1,i,d.
+                     d ≤ yinj i →
+                     ⇩[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ∞] U1 →
+                     ∀U2. ⇧[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, ∞] U2.
+#I #G #L #K #V #U1 #i #d #Hdi #HLK #HVU1 #U2 #HU12
+@(cpys_subst … HLK … HU12) >yminus_Y_inj //
+qed.
+
+(* Advanced inverion lemmas *************************************************)
+
+lemma cpys_inv_atom1: ∀I,G,L,T2,d,e. ⦃G, L⦄ ⊢ ⓪{I} ▶*[d, e] T2 →
+                      T2 = ⓪{I} ∨
+                      ∃∃J,K,V1,V2,i. d ≤ yinj i & i < d + e &
+                                    ⇩[i] L ≡ K.ⓑ{J}V1 &
+                                     ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2 &
+                                     ⇧[O, i+1] V2 ≡ T2 &
+                                     I = LRef i.
+#I #G #L #T2 #d #e #H @(cpys_ind … H) -T2
+[ /2 width=1 by or_introl/
+| #T #T2 #_ #HT2 *
+  [ #H destruct
+    elim (cpy_inv_atom1 … HT2) -HT2 [ /2 width=1 by or_introl/ | * /3 width=11 by ex6_5_intro, or_intror/ ]
+  | * #J #K #V1 #V #i #Hdi #Hide #HLK #HV1 #HVT #HI
+    lapply (ldrop_fwd_drop2 … HLK) #H
+    elim (cpy_inv_lift1_ge_up … HT2 … H … HVT) -HT2 -H -HVT
+    [2,3,4: /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ ]
+    /4 width=11 by cpys_strap1, ex6_5_intro, or_intror/
+  ]
+]
+qed-.
+
+lemma cpys_inv_lref1: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶*[d, e] T2 →
+                      T2 = #i ∨
+                      ∃∃I,K,V1,V2. d ≤ i & i < d + e &
+                                   ⇩[i] L ≡ K.ⓑ{I}V1 &
+                                   ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2 &
+                                   ⇧[O, i+1] V2 ≡ T2.
+#G #L #T2 #i #d #e #H elim (cpys_inv_atom1 … H) -H /2 width=1 by or_introl/
+* #I #K #V1 #V2 #j #Hdj #Hjde #HLK #HV12 #HVT2 #H destruct /3 width=7 by ex5_4_intro, or_intror/
+qed-.
+
+lemma cpys_inv_lref1_ldrop: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶*[d, e] T2 →
+                            ∀I,K,V1. ⇩[i] L ≡ K.ⓑ{I}V1 →
+                            ∀V2. ⇧[O, i+1] V2 ≡ T2 →
+                            ∧∧ ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2
+                             & d ≤ i
+                             & i < d + e.
+#G #L #T2 #i #d #e #H #I #K #V1 #HLK #V2 #HVT2 elim (cpys_inv_lref1 … H) -H
+[ #H destruct elim (lift_inv_lref2_be … HVT2) -HVT2 -HLK //
+| * #Z #Y #X1 #X2 #Hdi #Hide #HLY #HX12 #HXT2
+  lapply (lift_inj … HXT2 … HVT2) -T2 #H destruct
+  lapply (ldrop_mono … HLY … HLK) -L #H destruct
+  /2 width=1 by and3_intro/
+]
+qed-.
+
+(* Properties on relocation *************************************************)
+
+lemma cpys_lift_le: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
+                    ∀L,U1,s,d,e. dt + et ≤ yinj d → ⇩[s, d, e] L ≡ K →
+                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+                    ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2.
+#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hdetd #HLK #HTU1 @(cpys_ind … H) -T2
+[ #U2 #H >(lift_mono … HTU1 … H) -H //
+| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (IHT … HTU) -IHT #HU1
+  lapply (cpy_lift_le … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/
+]
+qed-.
+
+lemma cpys_lift_be: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
+                    ∀L,U1,s,d,e. dt ≤ yinj d → d ≤ dt + et →
+                    ⇩[s, d, e] L ≡ K → ⇧[d, e] T1 ≡ U1 →
+                    ∀U2. ⇧[d, e] T2 ≡ U2 → ⦃G, L⦄ ⊢ U1 ▶*[dt, et + e] U2.
+#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hdtd #Hddet #HLK #HTU1 @(cpys_ind … H) -T2
+[ #U2 #H >(lift_mono … HTU1 … H) -H //
+| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (IHT … HTU) -IHT #HU1
+  lapply (cpy_lift_be … HT2 … HLK HTU HTU2 ? ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/
+]
+qed-.
+
+lemma cpys_lift_ge: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
+                    ∀L,U1,s,d,e. yinj d ≤ dt → ⇩[s, d, e] L ≡ K →
+                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+                    ⦃G, L⦄ ⊢ U1 ▶*[dt+e, et] U2.
+#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hddt #HLK #HTU1 @(cpys_ind … H) -T2
+[ #U2 #H >(lift_mono … HTU1 … H) -H //
+| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (IHT … HTU) -IHT #HU1
+  lapply (cpy_lift_ge … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/
+]
+qed-.
+
+(* Inversion lemmas for relocation ******************************************)
+
+lemma cpys_inv_lift1_le: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         dt + et ≤ d →
+                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdetd @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (cpy_inv_lift1_le … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+lemma cpys_inv_lift1_be: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         dt ≤ d → yinj d + e ≤ dt + et →
+                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, et - e] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdedet @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (cpy_inv_lift1_be … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+lemma cpys_inv_lift1_ge: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                         ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         yinj d + e ≤ dt →
+                         ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt - e, et] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdedt @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (cpy_inv_lift1_ge … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+(* Advanced inversion lemmas on relocation **********************************)
+
+lemma cpys_inv_lift1_ge_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                            ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
+                            ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[d, dt + et - (yinj d + e)] T2 &
+                                 ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (cpy_inv_lift1_ge_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+lemma cpys_inv_lift1_be_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                            ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            dt ≤ d → dt + et ≤ yinj d + e →
+                            ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (cpy_inv_lift1_be_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+lemma cpys_inv_lift1_le_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
+                            ∀K,s,d,e. ⇩[s, d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            dt ≤ d → d ≤ dt + et → dt + et ≤ yinj d + e →
+                            ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde @(cpys_ind … H) -U2
+[ /2 width=3 by ex2_intro/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (cpy_inv_lift1_le_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/
+]
+qed-.
+
+lemma cpys_inv_lift1_subst: ∀G,L,W1,W2,d,e. ⦃G, L⦄ ⊢ W1 ▶*[d, e] W2 →
+                            ∀K,V1,i. ⇩[i+1] L ≡ K → ⇧[O, i+1] V1 ≡ W1 → 
+                            d ≤ yinj i → i < d + e →
+                            ∃∃V2.  ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(d+e-i)] V2 & ⇧[O, i+1] V2 ≡ W2.
+#G #L #W1 #W2 #d #e #HW12 #K #V1 #i #HLK #HVW1 #Hdi #Hide
+elim (cpys_inv_lift1_ge_up … HW12 … HLK … HVW1 ? ? ?) //
+>yplus_O1 <yplus_inj >yplus_SO2
+[ >yminus_succ2 /2 width=3 by ex2_intro/
+| /2 width=1 by ylt_fwd_le_succ1/
+| /2 width=3 by yle_trans/
+]
+qed-.
index 1c427b89f0f6df974213de5131ffaa73fea3cc99..50b02acb9b83a8de2e6c6ef7fd7d567b9b18266e 100644 (file)
@@ -214,7 +214,11 @@ table {
              [ "lleq ( ? ⋕[?,?] ? )" "lleq_alt" + "lleq_leq" + "lleq_ldrop" + "lleq_fqus" + "lleq_lleq" * ]
           }
         ]
-        [ { "iterated structural successor for closures" * } {
+        [ { "contxt-sensitive extended multiple substitution" * } {
+             [ "cpys ( ⦃?,?⦄ ⊢ ? ▶*[?,?] ? )" "cpys_alt ( ⦃?,?⦄ ⊢ ? ▶▶*[?,?] ? )" "cpys_lift" + "cpys_cpys" * ]
+          }
+        ]
+       [ { "iterated structural successor for closures" * } {
              [ "fqus ( ⦃?,?,?⦄ ⊐* ⦃?,?,?⦄ )" "fqus_alt" + "fqus_fqus" * ]
              [ "fqup ( ⦃?,?,?⦄ ⊐+ ⦃?,?,?⦄ )" "fqup_fqup" * ]
           }
@@ -254,7 +258,15 @@ table {
              [ "lpx_sn" "lpx_sn_alt" + "lpx_sn_tc" + "lpx_sn_ldrop" + "lpx_sn_lpx_sn" * ]
           }
         ]
-        [ { "basic local env. slicing" * } {
+        [ { "contxt-sensitive extended ordinary substitution" * } {
+             [ "cpy ( ⦃?,?⦄ ⊢ ? ▶[?,?] ? )" "cpy_lift" + "cpy_cpy" * ]
+          }
+        ]
+        [ { "local env. ref. for extended substitution" * } {
+             [ "lsuby ( ? ⊑×[?,?] ? )" "lsuby_lsuby" * ]
+          }
+        ]
+       [ { "basic local env. slicing" * } {
              [ "ldrop ( ⇩[?,?,?] ? ≡ ? )"  "ldrop_leq" + "ldrop_ldrop" * ]
           }
         ]