]> matita.cs.unibo.it Git - helm.git/commitdiff
update in basic_2 and ground_2
authorFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 26 Jul 2018 21:17:45 +0000 (23:17 +0200)
committerFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 26 Jul 2018 21:17:45 +0000 (23:17 +0200)
+ auxiliary lemmas for preservation begin
+ one addition in the arith library
+ some typos in names fixed

matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_drops.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/partial.txt
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/fpbs/fpbs_lfprs.etc
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma
matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl
matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma

index cebadeb670e21481452780177946baa00eef3d41..c979465c31d3ce4d730f2c36967a96cb7009e057 100644 (file)
@@ -52,7 +52,7 @@ qed-.
 (* Properties with generic slicing for local environments *******************)
 
 (* Basic_2A1: uses: snv_lift *)
-lemma csv_lifts (a) (h): ∀G. d_liftable1 (cnv a h G).
+lemma cnv_lifts (a) (h): ∀G. d_liftable1 (cnv a h G).
 #a #h #G #K #T
 @(fqup_wf_ind_eq (Ⓣ) … G K T) -G -K -T #G0 #K0 #T0 #IH #G #K * * [|||| * ]
 [ #s #HG #HK #HT #_ #b #f #L #_ #X #H2 destruct
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma
new file mode 100644 (file)
index 0000000..c2e0809
--- /dev/null
@@ -0,0 +1,74 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/rt_computation/fpbg.ma".
+include "basic_2/rt_computation/cpms_fpbs.ma".
+include "basic_2/dynamic/cnv.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Inductive premises for the preservation results **************************)
+
+definition IH_cnv_cpm_trans_lpr (a) (h): relation3 genv lenv term ≝
+                                λG,L1,T1. ⦃G, L1⦄ ⊢ T1 ![a,h] →
+                                ∀n,T2. ⦃G, L1⦄ ⊢ T1 ➡[n,h] T2 →
+                                ∀L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L2⦄ ⊢ T2 ![a,h].
+
+definition IH_cnv_cpms_trans_lpr (a) (h): relation3 genv lenv term ≝
+                                 λG,L1,T1. ⦃G, L1⦄ ⊢ T1 ![a,h] →
+                                 ∀n,T2. ⦃G, L1⦄ ⊢ T1 ➡*[n,h] T2 →
+                                 ∀L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L2⦄ ⊢ T2 ![a,h].
+
+definition IH_cnv_cpm_conf_lpr (a) (h): relation3 genv lenv term ≝
+                               λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
+                               ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 →
+                               ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
+                               ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
+
+definition IH_cnv_cpms_strip_lpr (a) (h): relation3 genv lenv term ≝
+                                 λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
+                                 ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 →
+                                 ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
+                                 ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
+
+definition IH_cnv_cpms_conf_lpr (a) (h): relation3 genv lenv term ≝
+                                λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
+                                ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡*[n2,h] T2 →
+                                ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
+                                ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
+
+(* Auxiliary properties for preservation ************************************)
+
+fact cnv_cpms_trans_lpr_aux (a) (h) (o):
+                            ∀G0,L0,T0.
+                            (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) →
+                            ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_trans_lpr a h G1 L1 T1.
+#a #h #o #G0 #L0 #T0 #IH #G1 #L1 #T1 #H01 #HT1 #n #T2 #H
+@(cpms_ind_dx … H) -n -T2
+/4 width=7 by cpms_fwd_fpbs, fpbg_fpbs_trans/
+qed-.
+(*
+fact cnv_cpms_strip_lpr_aux (a) (h) (o):
+                            ∀G0,L0,T0.
+                            (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_conf_lpr a h G1 L1 T1) →
+                            ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_strip_lpr a h G1 L1 T1.
+#a #h #o #G0 #L0 #T0 #IH0 #G #L #T #H0 #HT #n1 #T1 #H
+generalize in match HT; generalize in match H0; -H0 -HT
+@(cpms_ind_sn … H) -n1 -T [ /2 width=8 by/ ]
+#n1 #n2 #T #X #HTX #HXT1 #IH #H0 #HT #n2 #T2 #HT2 #L1 #HL1 #L2 #HL2
+elim (IH0 … HTX … HT2 … HL1 … HL2) // -L -T #T0 #HXT0 #HT20  
+  
+  @(IH … 0 T … HT2 … HL1 … HL2) // -L -IH
+  #T0 #HT20 #HT0  
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma
new file mode 100644 (file)
index 0000000..4a87a4c
--- /dev/null
@@ -0,0 +1,142 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/rt_computation/cpms_fpbg.ma".
+include "basic_2/rt_computation/cprs_cprs.ma".
+include "basic_2/rt_computation/lprs_cpms.ma".
+include "basic_2/dynamic/cnv_drops.ma".
+(*
+include "basic_2/dynamic/snv_aaa.ma".
+*)
+include "basic_2/dynamic/cnv_etc.ma".
+(*
+include "basic_2/dynamic/lsubsv_snv.ma".
+*)
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with context-free parallel reduction for local environments *****)
+
+fact cnv_cpm_trans_lpr_aux (a) (h) (o): a = Ⓕ →
+                           ∀G0,L0,T0.
+                           (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_conf_lpr a h G1 L1 T1) →
+                           (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) →
+                           ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_cnv_cpm_trans_lpr a h G1 L1 T1.
+#a #h #o #Ha #G0 #L0 #T0 (* #IH4 #IH3 *) #IH2 #IH1 #G1 #L1 * * [|||| * ]
+[ #s #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #_ destruct (* -IH4 -IH3 *) -IH2 -IH1 -H1
+  elim (cpm_inv_sort1 … H2) -H2 * #H1 #H2 destruct //
+| #i #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 -IH3 *) -IH2
+  elim (cnv_inv_lref_drops … H1) -H1 #I #K1 #V1 #HLK1 #HV1
+  elim (lpr_drops_conf … HLK1 … HL12) -HL12 // #Y #H #HLK2
+  elim (lpr_inv_pair_sn … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+  lapply (fqup_lref (Ⓣ) … G1 … HLK1) #HKL
+  elim (cpm_inv_lref1_drops … H2) -H2 *
+  [ #H1 #H2 destruct -HLK1 /4 width=7 by fqup_fpbg, cnv_lref_drops/
+  | #K0 #V0 #W0 #H #HVW0 #W0 -HV12
+    lapply (drops_mono … H … HLK1) -HLK1 -H #H destruct
+    lapply (drops_isuni_fwd_drop2 … HLK2) -HLK2 /4 width=7 by fqup_fpbg, cnv_lifts/
+  | #n #K0 #V0 #W0 #H #HVW0 #W0 #H destruct -HV12
+    lapply (drops_mono … H … HLK1) -HLK1 -H #H destruct
+    lapply (drops_isuni_fwd_drop2 … HLK2) -HLK2 /4 width=7 by fqup_fpbg, cnv_lifts/
+  ]
+| #l #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 -IH3 *) -IH2 -IH1
+  elim (cnv_inv_gref … H1)
+| #p #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 -IH3 *) -IH2
+  elim (cnv_inv_bind … H1) -H1 #HV1 #HT1
+  elim (cpm_inv_bind1 … H2) -H2 *
+  [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=9 by fqup_fpbg, cnv_bind, lpr_pair/
+  | #T2 #HT12 #HXT2 #H1 #H2 destruct -HV1
+    /4 width=11 by fqup_fpbg, cnv_inv_lifts, lpr_pair, drops_refl, drops_drop/
+  ]
+| #V1 #T1 #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct
+  elim (cnv_inv_appl … H1) -H1 #n #p #W1 #U1 #Hn #HV1 #HT1 #HVW1 #HTU1
+  elim (cpm_inv_appl1 … H2) -H2 *
+  [ #V2 #T2 #HV12 #HT12 #H destruct (* -IH4 *)
+    lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2
+    lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2
+    elim (IH2 … HVW1 … V2 … L2 … L2) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HVW1 -HV12
+    <minus_n_O <minus_O_n #XW1 #HXW1 #HXV2
+    elim (IH2 … HTU1 … T2 … L2 … L2) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HTU1 -HT12
+    #X #H #HTU2 (* -IH3 *) -IH2 -IH1 -L1 -V1 -T1
+    elim (cpms_inv_abst_sn … H) -H #W2 #U2 #HW12 #_ #H destruct
+    elim (cprs_conf … HXW1 … HW12) -W1 #W1 #HXW1 #HW21
+    lapply (cpms_trans … HXV2 … HXW1) -XW1 <plus_n_O #HV2W1
+    lapply (cpms_trans … HTU2 … (ⓛ{p}W1.U2) ?)
+    [3:|*: /2 width=2 by cpms_bind/ ] -W2 <plus_n_O #HTU2
+    @(cnv_appl … HV2W1 HTU2) // #H destruct
+  | #q #V2 #W10 #W20 #T10 #T20 #HV12 #HW120 #HT120 #H1 #H2 destruct
+    elim (cnv_inv_bind … HT1) -HT1 #HW10 #HT10
+    elim (cpms_inv_abst_sn … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30
+    lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2
+    lapply (IH1 … HW120 … HL12) /2 width=1 by fqup_fpbg/ #HW20
+    lapply (IH1 … HT10 … HT120 … (L2.ⓛW20) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -HT10 -HT120 #HT20
+    elim (IH2 … HVW1 … V2 … L2 … L2) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HVW1 -HV12
+    <minus_n_O <minus_O_n #XW1 #HXW1 #HXV2
+    elim (IH2 … HW130 … W20 … L2 … L2) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HW130 -HW120
+    <minus_n_O #XW30 #HXW30 #HW230
+    elim (cprs_conf … HXW1 … HXW30) -W30 #W30 #HXW1 #HXW30
+    lapply (cpms_trans … HXV2 … HXW1) -XW1 <plus_n_O #HV2W30
+    lapply (cprs_trans … HW230 … HXW30) -XW30 #HW230
+    @cnv_bind [ /2 width=3 by cnv_cast/ ]
+(*
+    @(lsubsv_snv_trans … HT20) -HT20
+    @(lsubsv_beta … (d-1)) //
+    @shnv_cast [1,2: // ] #d0 #Hd0
+    lapply (scpes_le_aux … IH4 IH1 IH2 IH3 … HW20d … HV2d … d0 … HVW20) -IH4 -IH3 -IH2 -IH1 -HW20d -HV2d -HVW20
+    /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/
+*)
+  | #q #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct (* -IH4 *)
+    elim (cnv_inv_bind … HT1) -HT1 #HW0 #HT0
+    elim (cpms_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct
+    elim (lifts_inv_bind1 … HX) -HX #W3 #U3 #HW13 #_ #H destruct
+    lapply (IH1 … HW02 … HL12) /2 width=1 by fqup_fpbg/ #HW2
+    lapply (IH1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ #HV0
+    lapply (IH1 … HT02 (L2.ⓓW2) ?) /2 width=1 by fqup_fpbg, lpr_pair/ #HT2
+    elim (IH2 … HVW1 … V0 … L2 … L2) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HVW1 -HV10
+    <minus_n_O <minus_O_n #XW1 #HXW1 #HXV0
+    elim (IH2 … HTU0 … T2 … (L2.ⓓW2) … (L2.ⓓW2)) [|*: /2 width=2 by fqup_fpbg, cpm_cpms, lpr_pair/ ] -HT02 -HTU0 -HW02
+    #X #H #HTU2 -IH2 -IH1
+    elim (cpms_inv_abst_sn … H) -H #W #U2 #HW3 #_ #H destruct -U3
+    lapply (cnv_lifts … HV0 (Ⓣ) … (L2.ⓓW2) … HV02) /3 width=1 by drops_refl, drops_drop/ -HV0 #HV2
+    elim (cpms_lifts_sn … HXV0 (Ⓣ) … (L2.ⓓW2) … HV02) /3 width=1 by drops_refl, drops_drop/ -V0 #XW2 #HXW12 #HXVW2
+    lapply (cpms_lifts_bi … HXW1 (Ⓣ) … (L2.ⓓW2) … HW13 … HXW12) /3 width=1 by drops_refl, drops_drop/ -W1 -XW1 #HXW32
+    elim (cprs_conf … HXW32 … HW3) -W3 #W3 #HXW23 #HW3
+    lapply (cpms_trans … HXVW2 … HXW23) -XW2 <plus_n_O #H1
+    lapply (cpms_trans … HTU2 ? (ⓛ{p}W3.U2) ?) [3:|*:/2 width=2 by cpms_bind/ ] -W #H2
+    @cnv_bind // @(cnv_appl … H1 H2) // #H destruct 
+  ]
+| #W1 #T1 #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 *)
+  elim (cnv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1
+  elim (cpm_inv_cast1 … H2) -H2
+  [ * #W2 #T2 #HW12 #HT12 #H destruct
+    lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/ #HW2
+    lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2
+    lapply (cnv_cpms_trans_lpr_aux … IH1 … HTU1 L1 ?) /2 width=1 by fqup_fpbg/ #HU1
+    elim (IH2 … HWU1 … W2 … L1 … HL12) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HW12
+    <minus_n_O <minus_O_n #XW1 #HXUW1 #HXW21
+    elim (IH2 … HTU1 … T2 … L1 … HL12) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HTU1 -HT12
+    #XT1 #HXUT1 #HXT21
+    elim (IH2 … HXUW1 … HXUT1 … HL12 … HL12) [|*: /2 width=4 by fqup_cpms_fwd_fpbg/ ] -HXUW1 -HXUT1 -HWU1
+    >eq_minus_O // #W0 #H1 #H2
+    lapply (cprs_trans … HXW21 … H1) -XW1 #H1
+    lapply (cpms_trans … HXT21 … H2) -XT1 <arith_l #H2
+    /2 width=3 by cnv_cast/
+  | #HX (* -IH3 *) -IH2 -HW1 -U1
+    lapply (IH1 … HX … HL12) /2 width=1 by fqup_fpbg/
+  | * #n #HX #H destruct -IH2 -HT1 -U1
+    lapply (IH1 … HX … HL12) /2 width=1 by fqup_fpbg/
+  ]
+]
+(*
+qed-.
+*)
index 8c90c20b4f5b2a0dc743dba122401a521f97d9c9..87d2cd59296f7ee8662bb271078fea40e1b9090a 100644 (file)
@@ -1 +1,2 @@
 cnv.ma cnv_drops.ma cnv_fqus.ma cnv_aaa.ma cnv_fsb.ma
+cnv_etc.ma cnv_lpr.ma
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma
deleted file mode 100644 (file)
index 101a503..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/snv_lift.ma".
-include "basic_2/dynamic/snv_aaa.ma".
-include "basic_2/dynamic/snv_scpes.ma".
-include "basic_2/dynamic/lsubsv_snv.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties on context-free parallel reduction for local environments *****)
-
-fact snv_cpr_lpr_aux: ∀h,o,G0,L0,T0.
-                      (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_snv_lstas h o G1 L1 T1) →
-                      (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h o G1 L1 T1) →
-                      (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h o G1 L1 T1) →
-                      (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h o G1 L1 T1) →
-                      ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_snv_cpr_lpr h o G1 L1 T1.
-#h #o #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ]
-[ #s #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #_ destruct -IH4 -IH3 -IH2 -IH1 -H1
-  >(cpr_inv_sort1 … H2) -X //
-| #i #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2
-  elim (snv_inv_lref … H1) -H1 #I #K1 #V1 #HLK1 #HV1
-  elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
-  elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
-  lapply (fqup_lref … G1 … HLK1) #HKL
-  elim (cpr_inv_lref1 … H2) -H2
-  [ #H destruct -HLK1 /4 width=10 by fqup_fpbg, snv_lref/
-  | * #K0 #V0 #W0 #H #HVW0 #W0 -HV12
-    lapply (drop_mono … H … HLK1) -HLK1 -H #H destruct
-    lapply (drop_fwd_drop2 … HLK2) -HLK2 /4 width=8 by fqup_fpbg, snv_lift/
-  ]
-| #p #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 -IH1
-  elim (snv_inv_gref … H1)
-| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2
-  elim (snv_inv_bind … H1) -H1 #HV1 #HT1
-  elim (cpr_inv_bind1 … H2) -H2 *
-  [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=8 by fqup_fpbg, snv_bind, lpr_pair/
-  | #T2 #HT12 #HXT2 #H1 #H2 destruct -HV1
-    /4 width=10 by fqup_fpbg, snv_inv_lift, lpr_pair, drop_drop/
-  ]
-| #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct
-  elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1
-  elim (cpr_inv_appl1 … H2) -H2 *
-  [ #V2 #T2 #HV12 #HT12 #H destruct -IH4
-    lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2
-    lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2
-    elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 -HV12 #XV #HVW2 #HXV
-    elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -HTU1 -HT12 #X #HTU2 #H
-    elim (cprs_inv_abst1 … H) -H #XW #U2 #HXW #_ #H destruct -IH1 -IH3 -IH2 -L1
-    elim (cprs_conf … HXV … HXW) -W1 #W2 #HXV #HXW
-    lapply (scpds_cprs_trans … HVW2 … HXV) -XV
-    lapply (scpds_cprs_trans … (ⓛ{a}W2.U2) … HTU2 ?)
-    /2 width=7 by snv_appl, cprs_bind/
-  | #b #V2 #W10 #W20 #T10 #T20 #HV12 #HW120 #HT120 #H1 #H2 destruct
-    elim (snv_inv_bind … HT1) -HT1 #HW10 #HT10
-    elim (scpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30 -d0
-    elim (snv_fwd_da … HV1) #d #HV1d
-    elim (snv_fwd_da … HW10) #d0 #HW10d
-    lapply (cprs_scpds_div … HW130 … HW10d … 1 HVW1) -W30 #HVW10
-    elim (da_scpes_aux … IH4 IH1 IH2 … HW10d … HV1d … HVW10) /2 width=1 by fqup_fpbg/
-    #_ #Hd <minus_n_O #H destruct >(plus_minus_k_k d 1) in HV1d; // -Hd #HV1d
-    lapply (scpes_cpr_lpr_aux … IH2 IH3 … HVW10 … HW120 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW10 #HVW20
-    lapply (IH2 … HV1d … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HV1d #HV2d
-    lapply (IH2 … HW10d … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10d #HW20d
-    lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2
-    lapply (IH1 … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10 #HW20
-    lapply (IH1 … HT10 … HT120 … (L2.ⓛW20) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -HT10 #HT20
-    @snv_bind /2 width=1 by snv_cast_scpes/
-    @(lsubsv_snv_trans … HT20) -HT20
-    @(lsubsv_beta … (d-1)) //
-    @shnv_cast [1,2: // ] #d0 #Hd0
-    lapply (scpes_le_aux … IH4 IH1 IH2 IH3 … HW20d … HV2d … d0 … HVW20) -IH4 -IH3 -IH2 -IH1 -HW20d -HV2d -HVW20
-    /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/
-  | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -IH4
-    elim (snv_inv_bind … HT1) -HT1 #HW0 #HT0
-    elim (scpds_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct
-    elim (lift_inv_bind1 … HX) -HX #W3 #U3 #HW13 #_ #H destruct
-    elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 #XV #HXV0 #HXVW1
-    elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU0 … HT02 (L2.ⓓW2)) /2 width=1 by fqup_fpbg, lpr_pair/ -HTU0 #X #HXT2 #H
-    elim (cprs_inv_abst1 … H) -H #W #U2 #HW3 #_ #H destruct -U3
-    lapply (IH1 … HW02 … HL12) /2 width=1 by fqup_fpbg/ #HW2
-    lapply (IH1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ #HV0
-    lapply (IH1 … HT02 (L2.ⓓW2) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -L1 #HT2
-    lapply (snv_lift … HV0 (L2.ⓓW2) (Ⓕ) … HV02) /2 width=1 by drop_drop/ -HV0 #HV2
-    elim (lift_total XV 0 1) #XW #HXVW
-    lapply (scpds_lift … HXV0 (L2.ⓓW2) (Ⓕ) … HV02 … HXVW) /2 width=1 by drop_drop/ -V0 #HXWV2
-    lapply (cprs_lift … HXVW1 (L2.ⓓW2) (Ⓕ) … HW13 … HXVW) /2 width=1 by drop_drop/ -W1 -XV #HXW3
-    elim (cprs_conf … HXW3 … HW3) -W3 #W3 #HXW3 #HW3
-    lapply (scpds_cprs_trans … HXWV2 … HXW3) -XW
-    lapply (scpds_cprs_trans … (ⓛ{a}W3.U2) … HXT2 ?) /2 width=1 by cprs_bind/ -W
-    /3 width=6 by snv_appl, snv_bind/
-  ]
-| #W1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4
-  elim (snv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1
-  elim (cpr_inv_cast1 … H2) -H2
-  [ * #W2 #T2 #HW12 #HT12 #H destruct
-    elim (snv_fwd_da … HW1) #d #HW1d
-    lapply (scpds_div … HWU1 … HTU1) -U1 -d #HWT1
-    lapply (scpes_cpr_lpr_aux … IH2 IH3 … HWT1 … HW12 … HT12 … HL12) /2 width=1 by fqup_fpbg/
-    lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/
-    lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -L1
-    /2 width=1 by snv_cast_scpes/
-  | #H -IH3 -IH2 -HW1 -U1
-    lapply (IH1 … H … HL12) /2 width=1 by fqup_fpbg/
-  ]
-]
-qed-.
index ed03e166c5b32c57fda2fa3e980e740e1ea60fd1..d6348d512a9b316215234377c186bb6b1b9b94c0 100644 (file)
@@ -1,7 +1,4 @@
 (*
-lemma cprs_fpbs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄.
-/3 width=1 by cprs_cpxs, cpxs_fpbs/ qed.
-
 lemma lprs_fpbs: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄.
 /3 width=1 by lprs_lpxs, lpxs_fpbs/ qed.
 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma
new file mode 100644 (file)
index 0000000..e5a6ca6
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/fpbg_fqup.ma".
+include "basic_2/rt_computation/cpms_fpbs.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Forward lemmas with proper parallel rst-computation for closures *********)
+
+lemma fqup_cpms_fwd_fpbg (h) (o): ∀G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T⦄ →
+                                  ∀n,T2. ⦃G2, L2⦄ ⊢ T ➡*[n,h] T2 → ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T2⦄.
+/3 width=5 by cpms_fwd_fpbs, fqup_fpbg,fpbg_fpbs_trans/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma
new file mode 100644 (file)
index 0000000..4a65edb
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/fpbs_cpxs.ma".
+include "basic_2/rt_computation/cpms_cpxs.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Forward lemmas with parallel rst-computation for closures ****************)
+
+(* Basic_2A1: uses: cprs_fpbs *)
+lemma cpms_fwd_fpbs (n) (h) (o): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G, L, T1⦄ ≥[h,o] ⦃G, L, T2⦄.
+/3 width=2 by cpms_fwd_cpxs, cpxs_fpbs/ qed-.
index 3158b8b032752192ee29c58de21f6d4530f41bb9..3649bada487e6706e28be4b074742b2af26a20d7 100644 (file)
@@ -125,8 +125,8 @@ lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[n, h] T2 →
                       | ∃∃s. T2 = ⋆(next h s) & J = Sort s & n = 1
                       | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓓV1 & J = LRef 0
-                      | ∃∃k,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[k, h] V2 & ⬆*[1] V2 ≘ T2 &
-                                     L = K.ⓛV1 & J = LRef 0 & n = ↑k
+                      | ∃∃m,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[m, h] V2 & ⬆*[1] V2 ≘ T2 &
+                                     L = K.ⓛV1 & J = LRef 0 & n = ↑m
                       | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T & ⬆*[1] T ≘ T2 &
                                    L = K.ⓘ{I} & J = LRef (↑i).
 #n #h #J #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1 … H) -H *
@@ -135,7 +135,7 @@ lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[n, h] T2 →
 | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 #H3 destruct
   /4 width=6 by or5_intro2, ex4_3_intro, ex2_intro/
 | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 #H3 destruct
-  elim (isrt_inv_plus_SO_dx … Hc) -Hc // #k #Hc #H destruct
+  elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct
   /4 width=9 by or5_intro3, ex5_4_intro, ex2_intro/
 | #I #K #V2 #i #HV2 #HVT2 #H1 #H2 destruct
   /4 width=8 by or5_intro4, ex4_4_intro, ex2_intro/
@@ -154,14 +154,14 @@ lemma cpm_inv_zero1: ∀n,h,G,L,T2. ⦃G, L⦄ ⊢ #0 ➡[n, h] T2 →
                      ∨∨ T2 = #0 ∧ n = 0
                       | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓓV1
-                      | ∃∃k,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[k, h] V2 & ⬆*[1] V2 ≘ T2 &
-                                     L = K.ⓛV1 & n = ↑k.
+                      | ∃∃m,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[m, h] V2 & ⬆*[1] V2 ≘ T2 &
+                                     L = K.ⓛV1 & n = ↑m.
 #n #h #G #L #T2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H *
 [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/
 | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct
   /4 width=8 by or3_intro1, ex3_3_intro, ex2_intro/
 | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct
-  elim (isrt_inv_plus_SO_dx … Hc) -Hc // #k #Hc #H destruct
+  elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct
   /4 width=8 by or3_intro2, ex4_4_intro, ex2_intro/
 ]
 qed-.
@@ -262,7 +262,7 @@ lemma cpm_inv_cast1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ➡[n, h] U2 
                      ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 & ⦃G, L⦄ ⊢ U1 ➡[n, h] T2 &
                                  U2 = ⓝV2.T2
                       | ⦃G, L⦄ ⊢ U1 ➡[n, h] U2
-                      | ∃∃k. ⦃G, L⦄ ⊢ V1 ➡[k, h] U2 & n = ↑k.
+                      | ∃∃m. ⦃G, L⦄ ⊢ V1 ➡[m, h] U2 & n = ↑m.
 #n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_cast1 … H) -H *
 [ #cV #cT #V2 #T2 #HV12 #HT12 #HcVT #H1 #H2 destruct
   elim (isrt_inv_max … Hc) -Hc #nV #nT #HcV #HcT #H destruct
@@ -272,7 +272,7 @@ lemma cpm_inv_cast1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ➡[n, h] U2 
 | #cU #U12 #H destruct
   /4 width=3 by isrt_inv_plus_O_dx, or3_intro1, ex2_intro/
 | #cU #H12 #H destruct
-  elim (isrt_inv_plus_SO_dx … Hc) -Hc // #k #Hc #H destruct
+  elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct
   /4 width=3 by or3_intro2, ex2_intro/
 ]
 qed-.
index 205227ec543c14815887c7ba30fab9044c449c1f..e6a1ea5d3a5c65b534e451d1e75f0526eb0df58b 100644 (file)
@@ -67,7 +67,7 @@ table {
           }
         ]
         [ { "t-bound context-sensitive parallel rt-computation" * } {
-             [ [ "for terms" ] "cpms" + "( ⦃?,?⦄ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_cpms" * ]
+             [ [ "for terms" ] "cpms" + "( ⦃?,?⦄ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ]
           }
         ]
         [ { "unbound context-sensitive parallel rst-computation" * } {
index dde95e8a7267d844ab844a0861e9ce1a044b480f..932f95de21eb441d4897083156538eb71c282a67 100644 (file)
@@ -57,6 +57,13 @@ lemma plus_SO: ∀n. n + 1 = ↑n.
 lemma minus_plus_m_m_commutative: ∀n,m:nat. n = m + n - m.
 // qed-.
 
+lemma plus_n_2: ∀n. n + 2 = n + 1 + 1.
+// qed.
+
+lemma arith_l: ∀x. 1 = 1-x+(x-(x-1)).
+* // #x >minus_S_S >minus_S_S <minus_O_n <minus_n_O //
+qed.
+
 (* Note: uses minus_minus_comm, minus_plus_m_m, commutative_plus, plus_minus *)
 lemma plus_minus_minus_be: ∀x,y,z. y ≤ z → z ≤ x → (x - z) + (z - y) = x - y.
 #x #z #y #Hzy #Hyx >plus_minus // >commutative_plus >plus_minus //
@@ -69,9 +76,6 @@ qed-.
 fact plus_minus_minus_be_aux: ∀i,x,y,z. y ≤ z → z ≤ x → i = z - y → x - z + i = x - y.
 /2 width=1 by plus_minus_minus_be/ qed-.
 
-lemma plus_n_2: ∀n. n + 2 = n + 1 + 1.
-// qed.
-
 lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p).
 /2 by plus_minus/ qed-.