From c27d792e734c91a9b80cf8456e2c755aae24e994 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Mon, 15 Oct 2018 23:09:15 +0200 Subject: [PATCH] auxiliary update in basic_2 - work in progress to justify the type rules for application --- .../lambdadelta/basic_2/dynamic/notes.txt | 14 +++++ .../basic_2/dynamic/nta_preserve.ma | 25 ++++++++ .../lambdadelta/basic_2/etc/cpr_cpm.etc | 57 +++++++++++++++++++ .../basic_2/rt_computation/cpms_cpms.ma | 24 ++++++++ .../basic_2/rt_computation/cpms_cpr.ma | 42 ++++++++++++++ .../lambdadelta/basic_2/rt_transition/cpm.ma | 16 ++++++ 6 files changed, 178 insertions(+) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/notes.txt create mode 100644 matita/matita/contribs/lambdadelta/basic_2/etc/cpr_cpm.etc create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpr.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/notes.txt b/matita/matita/contribs/lambdadelta/basic_2/dynamic/notes.txt new file mode 100644 index 000000000..f4fa2049e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/notes.txt @@ -0,0 +1,14 @@ + D I +sort * * +lref ldef * +lref ldec * +lref lref * +lref ldef drops * +lref ldec drops * +bind * * +appl appl * * +appl beta * +appl pure * +cast new * * +cast old * * +conv * diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma index 4e37eb806..464e8603a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma @@ -94,6 +94,31 @@ elim (cnv_cpms_conf … H1 … H2 … HVTU) -H1 -H2 -HVTU iter_n_Sm + /3 width=3 by cpm_sort, ex2_intro/ +| #n1 #G #K #V1 #V #W #_ #IH #HVW #n2 #T2 #HT2 #Hn + elim (cpm_inv_lifts_sn … HT2 (Ⓣ) … HVW) -W + [|*: /3 width=2 by drops_refl, drops_drop/ ] #V2 #HVT2 #HV2 + elim (IH … HV2) -V [| // ] #V0 #HV10 #HV02 + elim (lifts_total V0 (𝐔❴1❵)) #T0 #HVT0 + lapply (cpm_lifts_bi … HV02 (Ⓣ) … (K.ⓓV1) … HVT0 … HVT2) -V2 + [ /3 width=2 by drops_refl, drops_drop/ ] #HT02 + /3 width=3 by cpm_delta, ex2_intro/ +| #n1 #G #K #V1 #V #W #_ #IH #HVW #m2 #T2 #HT2 #H + elim (le_inv_S1 … H) -H #n2 #Hn #H destruct + elim (cpm_inv_lifts_sn … HT2 (Ⓣ) … HVW) -W + [|*: /3 width=2 by drops_refl, drops_drop/ ] #V2 #HVT2 #HV2 + elim (IH … HV2) -V [| /2 width=1 by le_S/ ] #V0 #HV10 #HV02 + elim (lifts_total V0 (𝐔❴1❵)) #T0 #HVT0 + lapply (cpm_lifts_bi … HV02 (Ⓣ) … (K.ⓛV1) … HVT0 … HVT2) -V2 + [ /3 width=2 by drops_refl, drops_drop/ ] #HT02 + /3 width=5 by cpm_ell, ex2_intro/ +*) + +(* Note: cpm_cpm_trans_swap does not hold: take L = K.ⓛV1, T1 = #0, n2 = 0 *) +theorem cpr_cpm_trans_swap (h) (G) (L): + ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 → + ∃∃T0. ⦃G,L⦄ ⊢ T1 ➡[n2,h] T0 & ⦃G,L⦄ ⊢ T0 ➡[h] T2. +#h #G #L #T1 #T #H +@(cpr_ind … H) -G -L -T1 -T +[ #I #G #L #n2 #T2 #HT2 /2 width=3 by ex2_intro/ +| #G #K #V1 #V #W #_ #IH #HVW #n2 #T2 #HT2 + elim (cpm_inv_lifts_sn … HT2 (Ⓣ) … HVW) -W + [|*: /3 width=2 by drops_refl, drops_drop/ ] #V2 #HVT2 #HV2 + elim (IH … HV2) -V #V0 #HV10 #HV02 + elim (lifts_total V0 (𝐔❴1❵)) #T0 #HVT0 + lapply (cpm_lifts_bi … HV02 (Ⓣ) … (K.ⓓV1) … HVT0 … HVT2) -V2 + [ /3 width=2 by drops_refl, drops_drop/ ] #HT02 + /3 width=3 by cpm_delta, ex2_intro/ +| #I #G #K #T #U #i #_ #IH #HTU #n2 #U2 #HU2 + elim (cpm_inv_lifts_sn … HU2 (Ⓣ) … HTU) -U + [|*: /3 width=2 by drops_refl, drops_drop/ ] #T2 #HTU2 #HT2 + elim (IH … HT2) -T #T0 #HT0 #HT02 + elim (lifts_total T0 (𝐔❴1❵)) #U0 #HTU0 + lapply (cpm_lifts_bi … HT02 (Ⓣ) … (K.ⓘ{I}) … HTU0 … HTU2) -T2 + [ /3 width=2 by drops_refl, drops_drop/ ] #HU02 + /3 width=3 by cpm_lref, ex2_intro/ +| #p #I #G #L #V1 #V #T1 #T #_ #_ #IHV #IHT #n2 #X2 #H + elim (cpm_inv_bind1 … H) -H * + [ #V2 #T2 #HV2 #HT2 #H destruct \ No newline at end of file diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpms.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpms.ma index a9f2d248c..23d0295ca 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpms.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpms.ma @@ -168,3 +168,27 @@ theorem cpms_cast (n) (h) (G) (L): /3 width=3 by cpms_trans, cpms_cast_sn/ ] qed. + +theorem cpms_trans_swap (h) (G) (L) (T1): + ∀n1,T. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡*[n2,h] T2 → + ∃∃T0. ⦃G,L⦄ ⊢ T1 ➡*[n2,h] T0 & ⦃G,L⦄ ⊢ T0 ➡*[n1,h] T2. +#h #G #L #T1 #n1 #T #HT1 #n2 #T2 #HT2 +lapply (cpms_trans … HT1 … HT2) -T