From 9271b3ca211007ca5ffac1e7644ebc02b0689d6e Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Mon, 8 Aug 2011 22:41:37 +0000 Subject: [PATCH] - tps_tpr closed! (substitution is a reduction) - some refactoring --- matita/matita/lib/lambda-delta/Makefile | 2 +- matita/matita/lib/lambda-delta/ground.ma | 13 ++-- .../matita/lib/lambda-delta/reduction/cpr.ma | 17 +++-- .../matita/lib/lambda-delta/reduction/tpr.ma | 2 +- .../lib/lambda-delta/reduction/tpr_lift.ma | 6 +- .../lib/lambda-delta/reduction/tpr_tpr.ma | 16 ++--- .../reduction/{tpr_pts.ma => tpr_tps.ma} | 4 +- .../lib/lambda-delta/substitution/drop.ma | 50 ++++++++++---- .../lambda-delta/substitution/drop_drop.ma | 2 +- .../lib/lambda-delta/substitution/leq.ma | 8 ++- .../substitution/{pts.ma => tps.ma} | 69 ++++++++++++------- .../substitution/{pts_lift.ma => tps_lift.ma} | 24 +++---- .../{pts_split.ma => tps_split.ma} | 22 +++--- .../substitution/{pts_pts.ma => tps_tps.ma} | 18 ++--- matita/matita/lib/lambda-delta/xoa.conf.xml | 4 +- matita/matita/lib/lambda-delta/xoa.ma | 8 --- .../matita/lib/lambda-delta/xoa_notation.ma | 6 -- 17 files changed, 156 insertions(+), 115 deletions(-) rename matita/matita/lib/lambda-delta/reduction/{tpr_pts.ma => tpr_tps.ma} (91%) rename matita/matita/lib/lambda-delta/substitution/{pts.ma => tps.ma} (59%) rename matita/matita/lib/lambda-delta/substitution/{pts_lift.ma => tps_lift.ma} (91%) rename matita/matita/lib/lambda-delta/substitution/{pts_split.ma => tps_split.ma} (77%) rename matita/matita/lib/lambda-delta/substitution/{pts_pts.ma => tps_tps.ma} (73%) diff --git a/matita/matita/lib/lambda-delta/Makefile b/matita/matita/lib/lambda-delta/Makefile index 648904368..8feb040db 100644 --- a/matita/matita/lib/lambda-delta/Makefile +++ b/matita/matita/lib/lambda-delta/Makefile @@ -3,7 +3,7 @@ XOA_DIR = ../../../components/binaries/xoa XOA = xoa.native CONF = xoa.conf.xml -TARGETS = xoa_natation.ma xoa_defs.ma +TARGETS = xoa_natation.ma xoa.ma all: $(TARGETS) diff --git a/matita/matita/lib/lambda-delta/ground.ma b/matita/matita/lib/lambda-delta/ground.ma index 58d86aa5a..92a3f8167 100644 --- a/matita/matita/lib/lambda-delta/ground.ma +++ b/matita/matita/lib/lambda-delta/ground.ma @@ -74,12 +74,13 @@ lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n. >(commutative_plus p) (le_O_to_eq_O … H) -H // -| #m #IHm #p elim p -p // - #p #_ #n #Hpm (le_O_to_eq_O … H) -H // +| #b #IHb #c elim c -c // + #c #_ #a #Hcb + lapply (le_S_S_to_le … Hcb) -Hcb #Hcb + (plus_minus_m_m e 1) /2/ qed. -lemma drop_fwd_drop2: ∀L1,I2,K2,V2,e. ↓[O, e] L1 ≡ K2. 𝕓{I2} V2 → - ↓[O, e + 1] L1 ≡ K2. -#L1 elim L1 -L1 -[ #I2 #K2 #V2 #e #H lapply (drop_inv_sort1 … H) -H #H destruct -| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H - elim (drop_inv_O1 … H) -H * #He #H - [ -IHL1; destruct -e K2 I2 V2 /2/ - | @drop_drop >(plus_minus_m_m e 1) /2/ - ] -] -qed. - lemma drop_leq_drop1: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → ∀I,K1,V,i. ↓[0, i] L1 ≡ K1. 𝕓{I} V → d ≤ i → i < d + e → @@ -145,3 +133,41 @@ lemma drop_leq_drop1: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → elim (IHL12 … HLK1 ? ?) -IHL12 HLK1 [2: /2/ |3: /2/ ] -Hdi Hide >arith_g1 // /3/ ] qed. + +(* Basic forvard lemmas *****************************************************) + +lemma drop_fwd_drop2: ∀L1,I2,K2,V2,e. ↓[O, e] L1 ≡ K2. 𝕓{I2} V2 → + ↓[O, e + 1] L1 ≡ K2. +#L1 elim L1 -L1 +[ #I2 #K2 #V2 #e #H lapply (drop_inv_sort1 … H) -H #H destruct +| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H + elim (drop_inv_O1 … H) -H * #He #H + [ -IHL1; destruct -e K2 I2 V2 /2/ + | @drop_drop >(plus_minus_m_m e 1) /2/ + ] +] +qed. + +lemma drop_fwd_drop2_length: ∀L1,I2,K2,V2,e. + ↓[0, e] L1 ≡ K2. 𝕓{I2} V2 → e < |L1|. +#L1 elim L1 -L1 +[ #I2 #K2 #V2 #e #H lapply (drop_inv_sort1 … H) -H #H destruct +| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H + elim (drop_inv_O1 … H) -H * #He #H + [ -IHL1; destruct -e K2 I2 V2 // + | lapply (IHL1 … H) -IHL1 H #HeK1 whd in ⊢ (? ? %) /2/ + ] +] +qed. + +lemma drop_fwd_O1_length: ∀L1,L2,e. ↓[0, e] L1 ≡ L2 → |L2| = |L1| - e. +#L1 elim L1 -L1 +[ #L2 #e #H >(drop_inv_sort1 … H) -H // +| #K1 #I1 #V1 #IHL1 #L2 #e #H + elim (drop_inv_O1 … H) -H * #He #H + [ -IHL1; destruct -e L2 // + | lapply (IHL1 … H) -IHL1 H #H >H -H; normalize + >minus_le_minus_minus_comm // + ] +] +qed. diff --git a/matita/matita/lib/lambda-delta/substitution/drop_drop.ma b/matita/matita/lib/lambda-delta/substitution/drop_drop.ma index 96fd0db51..135db64ca 100644 --- a/matita/matita/lib/lambda-delta/substitution/drop_drop.ma +++ b/matita/matita/lib/lambda-delta/substitution/drop_drop.ma @@ -76,7 +76,7 @@ lemma drop_trans_le: ∀d1,e1,L1,L. ↓[d1, e1] L1 ≡ L → [ -He2d IHL12 #H1 #H2 destruct -e2 L /3 width=5/ | -HL12 HV12 #He2 #HL2 elim (IHL12 … HL2 ?) -IHL12 HL2 L2 - [ minus_le_minus_minus_comm // /3/ | /2/ ] ] ] qed. diff --git a/matita/matita/lib/lambda-delta/substitution/leq.ma b/matita/matita/lib/lambda-delta/substitution/leq.ma index 3c7981566..b0e28d48e 100644 --- a/matita/matita/lib/lambda-delta/substitution/leq.ma +++ b/matita/matita/lib/lambda-delta/substitution/leq.ma @@ -9,7 +9,7 @@ \ / V_______________________________________________________________ *) -include "lambda-delta/syntax/lenv.ma". +include "lambda-delta/syntax/length.ma". (* LOCAL ENVIRONMENT EQUALITY ***********************************************) @@ -37,12 +37,16 @@ lemma leq_sym: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → L2 [d, e] ≈ L1. #L1 #L2 #d #e #H elim H -H L1 L2 d e /2/ qed. -lemma leq_skip_lt: ∀L1,L2,d,e. leq L1 (d - 1) e L2 → 0 < d → +lemma leq_skip_lt: ∀L1,L2,d,e. L1 [d - 1, e] ≈ L2 → 0 < d → ∀I1,I2,V1,V2. L1. 𝕓{I1} V1 [d, e] ≈ L2. 𝕓{I2} V2. #L1 #L2 #d #e #HL12 #Hd >(plus_minus_m_m d 1) /2/ qed. +lemma leq_fwd_length: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → |L1| = |L2|. +#L1 #L2 #d #e #H elim H -H L1 L2 d e; normalize // +qed. + (* Basic inversion lemmas ***************************************************) lemma leq_inv_sort1_aux: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → L1 = ⋆ → L2 = ⋆. diff --git a/matita/matita/lib/lambda-delta/substitution/pts.ma b/matita/matita/lib/lambda-delta/substitution/tps.ma similarity index 59% rename from matita/matita/lib/lambda-delta/substitution/pts.ma rename to matita/matita/lib/lambda-delta/substitution/tps.ma index ac962355e..9fe0c29e7 100644 --- a/matita/matita/lib/lambda-delta/substitution/pts.ma +++ b/matita/matita/lib/lambda-delta/substitution/tps.ma @@ -11,47 +11,47 @@ include "lambda-delta/substitution/drop.ma". -(* PARTIAL TELESCOPIC SUBSTITUTION ******************************************) +(* PARTIAL SUBSTITUTION ON TERMS ********************************************) -inductive pts: lenv → term → nat → nat → term → Prop ≝ -| pts_sort : ∀L,k,d,e. pts L (⋆k) d e (⋆k) -| pts_lref : ∀L,i,d,e. pts L (#i) d e (#i) -| pts_subst: ∀L,K,V,U1,U2,i,d,e. +inductive tps: lenv → term → nat → nat → term → Prop ≝ +| tps_sort : ∀L,k,d,e. tps L (⋆k) d e (⋆k) +| tps_lref : ∀L,i,d,e. tps L (#i) d e (#i) +| tps_subst: ∀L,K,V,U1,U2,i,d,e. d ≤ i → i < d + e → - ↓[0, i] L ≡ K. 𝕓{Abbr} V → pts K V 0 (d + e - i - 1) U1 → - ↑[0, i + 1] U1 ≡ U2 → pts L (#i) d e U2 -| pts_bind : ∀L,I,V1,V2,T1,T2,d,e. - pts L V1 d e V2 → pts (L. 𝕓{I} V1) T1 (d + 1) e T2 → - pts L (𝕓{I} V1. T1) d e (𝕓{I} V2. T2) -| pts_flat : ∀L,I,V1,V2,T1,T2,d,e. - pts L V1 d e V2 → pts L T1 d e T2 → - pts L (𝕗{I} V1. T1) d e (𝕗{I} V2. T2) + ↓[0, i] L ≡ K. 𝕓{Abbr} V → tps K V 0 (d + e - i - 1) U1 → + ↑[0, i + 1] U1 ≡ U2 → tps L (#i) d e U2 +| tps_bind : ∀L,I,V1,V2,T1,T2,d,e. + tps L V1 d e V2 → tps (L. 𝕓{I} V1) T1 (d + 1) e T2 → + tps L (𝕓{I} V1. T1) d e (𝕓{I} V2. T2) +| tps_flat : ∀L,I,V1,V2,T1,T2,d,e. + tps L V1 d e V2 → tps L T1 d e T2 → + tps L (𝕗{I} V1. T1) d e (𝕗{I} V2. T2) . interpretation "partial telescopic substritution" - 'PSubst L T1 d e T2 = (pts L T1 d e T2). + 'PSubst L T1 d e T2 = (tps L T1 d e T2). (* Basic properties *********************************************************) -lemma pts_leq_repl: ∀L1,T1,T2,d,e. L1 ⊢ T1 [d, e] ≫ T2 → +lemma tps_leq_repl: ∀L1,T1,T2,d,e. L1 ⊢ T1 [d, e] ≫ T2 → ∀L2. L1 [d, e] ≈ L2 → L2 ⊢ T1 [d, e] ≫ T2. #L1 #T1 #T2 #d #e #H elim H -H L1 T1 T2 d e [ // | // | #L1 #K1 #V #V1 #V2 #i #d #e #Hdi #Hide #HLK1 #_ #HV12 #IHV12 #L2 #HL12 elim (drop_leq_drop1 … HL12 … HLK1 ? ?) -HL12 HLK1 // #K2 #HK12 #HLK2 - @pts_subst [4,5,6,8: // |1,2,3: skip | /2/ ] (**) (* /3 width=6/ is too slow *) + @tps_subst [4,5,6,8: // |1,2,3: skip | /2/ ] (**) (* /3 width=6/ is too slow *) | /4/ | /3/ ] qed. -lemma pts_refl: ∀T,L,d,e. L ⊢ T [d, e] ≫ T. +lemma tps_refl: ∀T,L,d,e. L ⊢ T [d, e] ≫ T. #T elim T -T // #I elim I -I /2/ qed. -lemma pts_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 [d1, e1] ≫ T2 → +lemma tps_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 [d1, e1] ≫ T2 → ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 → L ⊢ T1 [d2, e2] ≫ T2. #L #T1 #T #d1 #e1 #H elim H -L T1 T d1 e1 @@ -60,15 +60,38 @@ lemma pts_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 [d1, e1] ≫ T2 → | #L #K #V #V1 #V2 #i #d1 #e1 #Hid1 #Hide1 #HLK #_ #HV12 #IHV12 #d2 #e2 #Hd12 #Hde12 lapply (transitive_le … Hd12 … Hid1) -Hd12 Hid1 #Hid2 lapply (lt_to_le_to_lt … Hide1 … Hde12) -Hide1 #Hide2 - @pts_subst [4,5,6,8: // |1,2,3: skip | @IHV12 /2/ ] (**) (* /4 width=6/ is too slow *) + @tps_subst [4,5,6,8: // |1,2,3: skip | @IHV12 /2/ ] (**) (* /4 width=6/ is too slow *) | /4/ | /4/ ] qed. +lemma tps_weak_top: ∀L,T1,T2,d,e. + L ⊢ T1 [d, e] ≫ T2 → L ⊢ T1 [d, |L| - d] ≫ T2. +#L #T1 #T #d #e #H elim H -L T1 T d e +[ // +| // +| #L #K #V #V1 #V2 #i #d #e #Hdi #_ #HLK #_ #HV12 #IHV12 + lapply (drop_fwd_drop2_length … HLK) #Hi + lapply (le_to_lt_to_lt … Hdi Hi) #Hd + lapply (plus_minus_m_m_comm (|L|) d ?) [ /2/ ] -Hd #Hd + lapply (drop_fwd_O1_length … HLK) normalize #HKL + lapply (tps_weak … IHV12 0 (|L| - i - 1) ? ?) -IHV12 // -HKL /2 width=6/ +| normalize /2/ +| /2/ +] +qed. + +lemma tps_weak_all: ∀L,T1,T2,d,e. + L ⊢ T1 [d, e] ≫ T2 → L ⊢ T1 [0, |L|] ≫ T2. +#L #T1 #T #d #e #HT12 +lapply (tps_weak … HT12 0 (d + e) ? ?) -HT12 // #HT12 +lapply (tps_weak_top … HT12) // +qed. + (* Basic inversion lemmas ***************************************************) -lemma pts_inv_bind1_aux: ∀d,e,L,U1,U2. L ⊢ U1 [d, e] ≫ U2 → +lemma tps_inv_bind1_aux: ∀d,e,L,U1,U2. L ⊢ U1 [d, e] ≫ U2 → ∀I,V1,T1. U1 = 𝕓{I} V1. T1 → ∃∃V2,T2. L ⊢ V1 [d, e] ≫ V2 & L. 𝕓{I} V1 ⊢ T1 [d + 1, e] ≫ T2 & @@ -82,13 +105,13 @@ lemma pts_inv_bind1_aux: ∀d,e,L,U1,U2. L ⊢ U1 [d, e] ≫ U2 → ] qed. -lemma pts_inv_bind1: ∀d,e,L,I,V1,T1,U2. L ⊢ 𝕓{I} V1. T1 [d, e] ≫ U2 → +lemma tps_inv_bind1: ∀d,e,L,I,V1,T1,U2. L ⊢ 𝕓{I} V1. T1 [d, e] ≫ U2 → ∃∃V2,T2. L ⊢ V1 [d, e] ≫ V2 & L. 𝕓{I} V1 ⊢ T1 [d + 1, e] ≫ T2 & U2 = 𝕓{I} V2. T2. /2/ qed. -lemma pts_inv_flat1_aux: ∀d,e,L,U1,U2. L ⊢ U1 [d, e] ≫ U2 → +lemma tps_inv_flat1_aux: ∀d,e,L,U1,U2. L ⊢ U1 [d, e] ≫ U2 → ∀I,V1,T1. U1 = 𝕗{I} V1. T1 → ∃∃V2,T2. L ⊢ V1 [d, e] ≫ V2 & L ⊢ T1 [d, e] ≫ T2 & U2 = 𝕗{I} V2. T2. @@ -101,7 +124,7 @@ lemma pts_inv_flat1_aux: ∀d,e,L,U1,U2. L ⊢ U1 [d, e] ≫ U2 → ] qed. -lemma pts_inv_flat1: ∀d,e,L,I,V1,T1,U2. L ⊢ 𝕗{I} V1. T1 [d, e] ≫ U2 → +lemma tps_inv_flat1: ∀d,e,L,I,V1,T1,U2. L ⊢ 𝕗{I} V1. T1 [d, e] ≫ U2 → ∃∃V2,T2. L ⊢ V1 [d, e] ≫ V2 & L ⊢ T1 [d, e] ≫ T2 & U2 = 𝕗{I} V2. T2. /2/ qed. diff --git a/matita/matita/lib/lambda-delta/substitution/pts_lift.ma b/matita/matita/lib/lambda-delta/substitution/tps_lift.ma similarity index 91% rename from matita/matita/lib/lambda-delta/substitution/pts_lift.ma rename to matita/matita/lib/lambda-delta/substitution/tps_lift.ma index 8cd477738..70dc0903d 100644 --- a/matita/matita/lib/lambda-delta/substitution/pts_lift.ma +++ b/matita/matita/lib/lambda-delta/substitution/tps_lift.ma @@ -11,13 +11,13 @@ include "lambda-delta/substitution/lift_lift.ma". include "lambda-delta/substitution/drop_drop.ma". -include "lambda-delta/substitution/pts.ma". +include "lambda-delta/substitution/tps.ma". -(* PARTIAL TELESCOPIC SUBSTITUTION ******************************************) +(* PARTIAL SUBSTITUTION ON TERMS ********************************************) (* Relocation properties ****************************************************) -lemma pts_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 [dt, et] ≫ T2 → +lemma tps_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 [dt, et] ≫ T2 → ∀L,U1,U2,d,e. ↓[d, e] L ≡ K → ↑[d, e] T1 ≡ U1 → ↑[d, e] T2 ≡ U2 → dt + et ≤ d → @@ -33,11 +33,11 @@ lemma pts_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 [dt, et] ≫ T2 → elim (lift_trans_ge … HV12 … HVU2 ?) -HV12 HVU2 V2 // plus_plus_comm_23 #HV1U2 lapply (drop_trans_ge_comm … HLK … HKV ?) -HLK HKV K // -Hid #HLKV - @pts_subst [4,5: /2/ |6,7,8: // |1,2,3: skip ] (**) (* /3 width=8/ is too slow *) + @tps_subst [4,5: /2/ |6,7,8: // |1,2,3: skip ] (**) (* /3 width=8/ is too slow *) | #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #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 -U1 U2; - @pts_bind [ /2 width=5/ | /3 width=5/ ] (**) (* explicit constructor *) + @tps_bind [ /2 width=5/ | /3 width=5/ ] (**) (* explicit constructor *) | #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #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 -U1 U2; @@ -73,7 +73,7 @@ lemma pts_lift_ge: ∀K,T1,T2,dt,et. K ⊢ T1 [dt, et] ≫ T2 → ] qed. -lemma pts_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → +lemma tps_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → ∀K,d,e. ↓[d, e] L ≡ K → ∀T1. ↑[d, e] T1 ≡ U1 → dt + et ≤ d → ∃∃T2. K ⊢ T1 [dt, et] ≫ T2 & ↑[d, e] T2 ≡ U2. @@ -99,7 +99,7 @@ lemma pts_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → ] qed. -lemma pts_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → +lemma tps_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → ∀K,d,e. ↓[d, e] L ≡ K → ∀T1. ↑[d, e] T1 ≡ U1 → d + e ≤ dt → ∃∃T2. K ⊢ T1 [dt - e, et] ≫ T2 & ↑[d, e] T2 ≡ U2. @@ -117,7 +117,7 @@ lemma pts_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → lapply (drop_conf_ge … HLK … HLKV ?) -HLK HLKV L // #HKV elim (lift_split … HV12 d (i - e + 1) ? ? ?) -HV12; [2,3,4: normalize /2/ ] -Hdei >arith_e2 // #V0 #HV10 #HV02 @ex2_1_intro - [2: @pts_subst [4: /2/ |6,7,8: // |1,2,3: skip |5: @arith5 // ] + [2: @tps_subst [4: /2/ |6,7,8: // |1,2,3: skip |5: @arith5 // ] |1: skip | // ] (**) (* explicitc constructors *) @@ -134,7 +134,7 @@ lemma pts_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → ] qed. -lemma pts_inv_lift1_eq: ∀L,U1,U2,d,e. +lemma tps_inv_lift1_eq: ∀L,U1,U2,d,e. L ⊢ U1 [d, e] ≫ U2 → ∀T1. ↑[d, e] T1 ≡ U1 → U1 = U2. #L #U1 #U2 #d #e #H elim H -H L U1 U2 d e [ // diff --git a/matita/matita/lib/lambda-delta/substitution/pts_split.ma b/matita/matita/lib/lambda-delta/substitution/tps_split.ma similarity index 77% rename from matita/matita/lib/lambda-delta/substitution/pts_split.ma rename to matita/matita/lib/lambda-delta/substitution/tps_split.ma index 72da008ea..23cdb39df 100644 --- a/matita/matita/lib/lambda-delta/substitution/pts_split.ma +++ b/matita/matita/lib/lambda-delta/substitution/tps_split.ma @@ -9,13 +9,13 @@ \ / V_______________________________________________________________ *) -include "lambda-delta/substitution/pts_lift.ma". +include "lambda-delta/substitution/tps_lift.ma". -(* PARTIAL TELESCOPIC SUBSTITUTION ******************************************) +(* PARTIAL SUBSTITUTION ON TERMS ********************************************) (* Split properties *********************************************************) -lemma pts_split_up: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ≫ T2 → ∀i. d ≤ i → i ≤ d + e → +lemma tps_split_up: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ≫ T2 → ∀i. d ≤ i → i ≤ d + e → ∃∃T. L ⊢ T1 [d, i - d] ≫ T & L ⊢ T [i, d + e - i] ≫ T2. #L #T1 #T2 #d #e #H elim H -L T1 T2 d e [ /2/ @@ -28,17 +28,17 @@ lemma pts_split_up: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ≫ T2 → ∀i. d ≤ i → generalize in match HVW1 generalize in match Hij -HVW1 (**) (* rewriting in the premises, rewrites in the goal too *) >(plus_minus_m_m_comm … Hdj) in ⊢ (% → % → ?) -Hdj #Hij' #HVW1 elim (lift_total W1 0 (i + 1)) #W2 #HW12 - lapply (pts_lift_ge … HWV1 … HLK' HW12 HV12 ?) -HWV1 HLK' HV12 // >arith_a2 /3 width=6/ + lapply (tps_lift_ge … HWV1 … HLK' HW12 HV12 ?) -HWV1 HLK' HV12 // >arith_a2 /3 width=6/ | -IHV12 Hdi Hdj; generalize in match HV1 generalize in match Hide -HV1 Hide (**) (* rewriting in the premises, rewrites in the goal too *) >(plus_minus_m_m_comm … Hjde) in ⊢ (% → % → ?) -Hjde #Hide #HV1 - @ex2_1_intro [2: @pts_lref |1: skip | /2 width=6/ ] (**) (* /3 width=6 is too slow *) + @ex2_1_intro [2: @tps_lref |1: skip | /2 width=6/ ] (**) (* /3 width=6 is too slow *) ] | #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide elim (IHV12 i ? ?) -IHV12 // #V #HV1 #HV2 elim (IHT12 (i + 1) ? ?) -IHT12 [2: /2 by arith4/ |3: /2/ ] (* just /2/ is too slow *) -Hdi Hide >arith_c1 >arith_c1x #T #HT1 #HT2 - @ex2_1_intro [2,3: @pts_bind | skip ] (**) (* explicit constructors *) + @ex2_1_intro [2,3: @tps_bind | skip ] (**) (* explicit constructors *) [3: @HV1 |4: @HT1 |5: // |1,2: skip | /3 width=5/ ] | #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide elim (IHV12 i ? ?) -IHV12 // elim (IHT12 i ? ?) -IHT12 // @@ -46,13 +46,13 @@ lemma pts_split_up: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ≫ T2 → ∀i. d ≤ i → ] qed. -lemma pts_inv_lift1_up: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → +lemma tps_inv_lift1_up: ∀L,U1,U2,dt,et. L ⊢ U1 [dt, et] ≫ U2 → ∀K,d,e. ↓[d, e] L ≡ K → ∀T1. ↑[d, e] T1 ≡ U1 → d ≤ dt → dt ≤ d + e → d + e ≤ dt + et → ∃∃T2. K ⊢ T1 [d, dt + et - (d + e)] ≫ T2 & ↑[d, e] T2 ≡ U2. #L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet -elim (pts_split_up … HU12 (d + e) ? ?) -HU12 // -Hdedet #U #HU1 #HU2 -lapply (pts_weak … HU1 d e ? ?) -HU1 //
$(MATITA_RT_BASE_DIR) -
diff --git a/matita/matita/lib/lambda-delta/xoa.ma b/matita/matita/lib/lambda-delta/xoa.ma index 582b2d25f..68a0776dc 100644 --- a/matita/matita/lib/lambda-delta/xoa.ma +++ b/matita/matita/lib/lambda-delta/xoa.ma @@ -125,11 +125,3 @@ inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝ interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3). -(* multiple conjunction connective (3) *) - -inductive and3 (P0,P1,P2:Prop) : Prop ≝ - | and3_intro: P0 → P1 → P2 → and3 ? ? ? -. - -interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2). - diff --git a/matita/matita/lib/lambda-delta/xoa_notation.ma b/matita/matita/lib/lambda-delta/xoa_notation.ma index ce9460eb6..b8270b660 100644 --- a/matita/matita/lib/lambda-delta/xoa_notation.ma +++ b/matita/matita/lib/lambda-delta/xoa_notation.ma @@ -136,9 +136,3 @@ notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | non associative with precedence 30 for @{ 'Or $P0 $P1 $P2 $P3 }. -(* multiple conjunction connective (3) *) - -notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)" - non associative with precedence 35 - for @{ 'And $P0 $P1 $P2 }. - -- 2.39.2