From: Ferruccio Guidi Date: Sat, 18 Feb 2012 19:16:56 +0000 (+0000) Subject: more results on strongly normalizing terms X-Git-Tag: make_still_working~1949 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=0ea1af833c4fd9205f047072518e1aabf7987945;p=helm.git more results on strongly normalizing terms --- diff --git a/matita/matita/contribs/lambda_delta/Basic_2/Basic_1.txt b/matita/matita/contribs/lambda_delta/Basic_2/Basic_1.txt index f7e55be63..6e8799876 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/Basic_1.txt +++ b/matita/matita/contribs/lambda_delta/Basic_2/Basic_1.txt @@ -282,8 +282,6 @@ pr3/props pr3_eta pr3/subst1 pr3_subst1 pr3/subst1 pr3_gen_cabbr pr3/wcpr0 pr3_wcpr0_t -sn3/nf2 nf2_sn3 -sn3/props sn3_pr3_trans sn3/props sn3_cpr3_trans sn3/props sn3_shift @@ -293,7 +291,6 @@ sn3/props sn3_cdelta sn3/props sn3_appl_lref sn3/props sn3_appl_abbr sn3/props sn3_appl_cast -sn3/props sn3_appl_bind sn3/props sn3_appl_appl sn3/props sn3_appl_beta sn3/props sn3_appl_appls diff --git a/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs.ma b/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs.ma index 8748b6c3d..3e4289e27 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs.ma +++ b/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs.ma @@ -56,4 +56,11 @@ lemma cprs_lsubs_conf: ∀L1,T1,T2. L1 ⊢ T1 ➡* T2 → /3 width=3/ qed. +lemma cprs_flat_dx: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L ⊢ T1 ➡* T2 → + L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2. +#I #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind … HT12) -T2 /3 width=1/ +#T #T2 #_ #HT2 #IHT2 +@(cprs_strap1 … IHT2) -IHT2 /2 width=1/ +qed. + (* Basic_1: removed theorems 2: clear_pr3_trans pr3_cflat *) diff --git a/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs_cprs.ma b/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs_cprs.ma index e19800104..9f8d517e2 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs_cprs.ma +++ b/matita/matita/contribs/lambda_delta/Basic_2/computation/cprs_cprs.ma @@ -17,6 +17,28 @@ include "Basic_2/computation/cprs_lcpr.ma". (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) +(* Advanced properties ******************************************************) + +lemma cprs_abbr_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 → + L ⊢ ⓓV1. T1 ➡* ⓓV2. T2. +#L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind_dx … HT12) -T1 +[ /3 width=1/ +| #T1 #T #HT1 #_ #IHT1 + @(cprs_strap2 … IHT1) -IHT1 /2 width=1/ +] +qed. + +lemma cpr_abbr: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡ T2 → + L ⊢ ⓓV1. T1 ➡* ⓓV2. T2. +/3 width=1/ qed. + +(* Basic_1: was only: pr3_pr2_pr3_t *) +lemma lcpr_cprs_trans: ∀L1,L2. L1 ⊢ ➡ L2 → + ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2. +#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT2 /3 width=5/ +qed. + (* Main propertis ***********************************************************) (* Basic_1: was: pr3_t *) @@ -28,17 +50,3 @@ theorem cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡* T2 → ∃∃T0. L ⊢ T1 ➡* T0 & L ⊢ T2 ➡* T0. /3 width=3/ qed. -(* Advanced properties ******************************************************) - -(* Basic_1: was only: pr3_pr2_pr3_t *) -lemma lcpr_cprs_trans: ∀L1,L2. L1 ⊢ ➡ L2 → - ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2. -#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 // -#T #T2 #_ #HT2 #IHT2 /3 width=5/ -qed. - -lemma cpr_abbr: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡ T2 → - L ⊢ ⓓV1. T1 ➡* ⓓV2. T2. -#L #V1 #V2 #HV12 #T1 #T2 #HT12 -@(cprs_strap2 … (ⓓV1.T2)) /2 width=1/ /3 width=1/ -qed. diff --git a/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_cprs.ma b/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_cprs.ma index 4a936f607..bf6683d3c 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_cprs.ma +++ b/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_cprs.ma @@ -38,6 +38,7 @@ qed-. (* Basic properties *********************************************************) +(* Basic_1: was: sn3_intro *) lemma csns_intro: ∀L,T1. (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1. #L #T1 #H @@ -48,6 +49,7 @@ fact csns_intro_aux: ∀L,T1. (∀T,T2. L ⊢ T ➡* T2 → T1 = T → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1. /4 width=3/ qed-. +(* Basic_1: was: sn3_pr3_trans (old version) *) lemma csns_cprs_trans: ∀L,T1. L ⊢ ⬇** T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬇** T2. #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12 @csns_intro #T #HLT2 #HT2 @@ -56,6 +58,7 @@ elim (term_eq_dec T1 T2) #HT12 | -HT1 -HT2 /3 width=4/ qed. +(* Basic_1: was: sn3_pr2_intro (old version) *) lemma csns_intro_cpr: ∀L,T1. (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1. @@ -81,9 +84,21 @@ theorem csns_csn: ∀L,T. L ⊢ ⬇** T → L ⊢ ⬇* T. #L #T #H @(csns_ind … H) -T /4 width=1/ qed. +(* Basic_1: was: sn3_pr3_trans *) lemma csn_cprs_trans: ∀L,T1. L ⊢ ⬇* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬇* T2. /4 width=3/ qed. +(* Basic_1: was: nf2_sn3 *) +lemma csn_cwn: ∀L,T1. L ⊢ ⬇* T1 → + ∃∃T2. L ⊢ T1 ➡* T2 & L ⊢ 𝐍[T2]. +#L #T1 #H elim H -T1 #T1 #_ #IHT1 +elim (cnf_dec L T1) +[ -IHT1 /2 width=3/ +| * #T2 #HLT12 #HT12 + elim (IHT1 T2 ? ?) -IHT1 // /2 width=1/ -HT12 /3 width=3/ +] +qed. + (* Main eliminators *********************************************************) lemma csn_ind_cprs: ∀L. ∀R:predicate term. diff --git a/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lcpr.ma b/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lcpr.ma index 8121a0ac1..30368a428 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lcpr.ma +++ b/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lcpr.ma @@ -73,3 +73,47 @@ qed. lemma csn_appl_beta: ∀L,W. L ⊢ ⬇* W → ∀V,T. L ⊢ ⬇* (ⓓV. T) → (**) L ⊢ ⬇* ⓐV. ⓛW. T. /2 width=3/ qed. + +fact csn_appl_theta_aux: ∀L,U. L ⊢ ⬇* U → ∀V1,V2. ⇧[0, 1] V1 ≡ V2 → + ∀V,T. U = ⓓV. ⓐV2. T → L ⊢ ⬇* ⓐV1. ⓓV. T. +#L #X #H @(csn_ind_cprs … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct +lapply (csn_fwd_pair_sn … HVT) #HV +lapply (csn_fwd_bind_dx … HVT) -HVT #HVT +@csn_intro #X #HL #H +elim (cpr_inv_appl1 … HL) -HL * +[ -HV #V0 #Y #HLV10 #HL #H0 destruct + elim (cpr_inv_abbr1 … HL) -HL * + [ #V3 #V4 #T3 #HV3 #HLV34 #HLT3 #H0 destruct + lapply (cpr_intro … HV3 HLV34) -HLV34 #HLV34 + elim (lift_total V0 0 1) #V5 #HV05 + elim (term_eq_dec (ⓓV.ⓐV2.T) (ⓓV4.ⓐV5.T3)) + [ -IHVT #H0 destruct + elim (eq_false_inv_tpair … H) -H + [ -HLV10 -HLV34 -HV3 -HLT3 -HVT + >(lift_inj … HV12 … HV05) -V5 + #H elim (H ?) // + | * #_ #H elim (H ?) // + ] + | -H -HVT #H + lapply (cpr_lift (L. ⓓV) … HV12 … HV05 HLV10) -HLV10 -HV12 /2 width=1/ #HV25 + lapply (ltpr_cpr_trans (L. ⓓV) … HLT3) /2 width=1/ -HLT3 #HLT3 + @(IHVT … H … HV05) -IHVT // -H -HV05 /3 width=1/ + ] + | -H -IHVT #T0 #HT0 #HLT0 + @(csn_cpr_trans … (ⓐV1.T0)) /2 width=1/ -V0 -Y + @(csn_inv_lift … 0 1 HVT) /2 width=1/ + ] +| -HV -HV12 -HVT -IHVT -H #V0 #W0 #T0 #T1 #_ #_ #H destruct +| -IHVT -H #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HLW01 #HLT01 #HV03 #H1 #H2 destruct + lapply (cpr_lift (L. ⓓW0) … HV12 … HV03 HLV10) -HLV10 -HV12 -HV03 /2 width=1/ #HLV23 + lapply (lcpr_cpr_trans (L. ⓓW0) … HLT01) -HLT01 /2 width=1/ #HLT01 + @csn_abbr /2 width=3/ -HV + @(csn_lcpr_conf (L. ⓓW0)) /2 width=1/ -W1 + @(csn_cprs_trans … HVT) -HVT /2 width=1/ +] +qed. + +(* Basic_1: was: sn3_appl_bind *) +lemma csn_appl_theta: ∀V1,V2. ⇧[0, 1] V1 ≡ V2 → + ∀L,V,T. L ⊢ ⬇* ⓓV. ⓐV2. T → L ⊢ ⬇* ⓐV1. ⓓV. T. +/2 width=5/ qed. diff --git a/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lift.ma b/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lift.ma index 29872f929..2e816b72c 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lift.ma +++ b/matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lift.ma @@ -77,3 +77,24 @@ elim (eq_false_inv_tpair … H2) -H2 | -HLW0 * #H destruct /3 width=1/ ] qed. +(* +axiom eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2. + (②{I} V1. T1 = ②{I} V2. T2 → False) → + (T1 = T2 → False) ∨ (T1 = T2 ∧ (V1 = V2 → False)). + +#I #V1 #T1 #V2 #T2 #H +elim (term_eq_dec V1 V2) /3 width=1/ #HV12 destruct +@or_intror @conj // #HT12 destruct /2 width=1/ +qed-. + +lemma csn_appl_simple: ∀L,T. L ⊢ ⬇* T → 𝐒[T] → ∀V. L ⊢ ⬇* V → L ⊢ ⬇* ⓐV. T. +#L #T #H elim H -T #T #_ #IHT #HT #V #H @(csn_ind … H) -V #V #HV #IHV +@csn_intro #X #H1 #H2 +elim (cpr_inv_appl1_simple … H1 ?) // -H1 +#V0 #T0 #HLV0 #HLT0 #H destruct +elim (eq_false_inv_tpair_dx … H2) -H2 +[ -IHV #HT0 @IHT -IHT // -HLT0 /2 width=1/ -HT0 /2 width=3/ +| -HV -HT -IHT -HLT0 * #H #HV0 destruct /3 width=1/ +] +qed. +*) \ No newline at end of file diff --git a/matita/matita/contribs/lambda_delta/Basic_2/reducibility/cnf.ma b/matita/matita/contribs/lambda_delta/Basic_2/reducibility/cnf.ma index 50ff04603..39ac692cd 100644 --- a/matita/matita/contribs/lambda_delta/Basic_2/reducibility/cnf.ma +++ b/matita/matita/contribs/lambda_delta/Basic_2/reducibility/cnf.ma @@ -30,4 +30,7 @@ lemma cnf_sort: ∀L,k. L ⊢ 𝐍[⋆k]. >(cpr_inv_sort1 … H) // qed. +axiom cnf_dec: ∀L,T1. L ⊢ 𝐍[T1] ∨ + ∃∃T2. L ⊢ T1 ➡ T2 & (T1 = T2 → False). + (* Basic_1: removed theorems 1: nf2_abst_shift *)