X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fcomputation%2Fcprs_cprs.ma;h=8b073c157152018b84a52850fa8c1dfcb6678a55;hb=5d669f492522b055f76c627eb89da97d0be05c2a;hp=a85488cdf69368e5c7bec3af003812a059714b98;hpb=f21cc1fc7f776761926a7f017fda55735d63442e;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma index a85488cdf..8b073c157 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/reduction/llpr_llpr.ma". +include "basic_2/reduction/lpr_lpr.ma". include "basic_2/computation/cprs_lift.ma". (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) @@ -22,7 +22,7 @@ include "basic_2/computation/cprs_lift.ma". (* Basic_1: was: pr3_t *) (* Basic_1: includes: pr1_t *) theorem cprs_trans: ∀G,L. Transitive … (cprs G L). -normalize /2 width=3 by trans_TC/ qed-. +normalize /2 width=3 by trans_TC/ qed-. (* Basic_1: was: pr3_confluence *) (* Basic_1: includes: pr1_confluence *) @@ -61,14 +61,14 @@ qed. theorem cprs_theta_rc: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡ V → ⇧[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. -#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H elim H -W2 +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cprs_ind … H) -W2 /3 width=5 by cprs_trans, cprs_theta_dx, cprs_bind_dx/ qed. theorem cprs_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. ⇧[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ V1 ➡* V → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. -#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(TC_ind_dx … V1 H) -V1 +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(cprs_ind_dx … H) -V1 /3 width=3 by cprs_trans, cprs_theta_rc, cprs_flat_dx/ qed. @@ -91,9 +91,9 @@ lemma cprs_inv_appl1: ∀G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡* U2 → | #a #V2 #W #W2 #T #T2 #HV02 #HW2 #HT2 #H1 #H2 destruct lapply (cprs_strap1 … HV10 … HV02) -V0 #HV12 lapply (lsubr_cpr_trans … HT2 (L.ⓓⓝW.V1) ?) -HT2 - /5 width=5 by cprs_flat_dx, cpr_cprs, cprs_bind, lsubr_abst, ex2_3_intro, or3_intro1/ + /5 width=5 by cprs_bind, cprs_flat_dx, cpr_cprs, lsubr_abst, ex2_3_intro, or3_intro1/ | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct - @or3_intro2 @(ex4_5_intro … HV2 HT10) /3 width=3 by cprs_flat_sn, cprs_strap1, cpr_cprs, cprs_bind/ (**) (* full auto is too slow 11s *) + /5 width=10 by cprs_flat_sn, cprs_bind_dx, cprs_strap1, ex4_5_intro, or3_intro2/ ] | /4 width=9 by cprs_strap1, or3_intro1, ex2_3_intro/ | /4 width=11 by cprs_strap1, or3_intro2, ex4_5_intro/ @@ -104,63 +104,52 @@ qed-. (* Basic_1: was just: pr3_pr2_pr2_t *) (* Basic_1: includes: pr3_pr0_pr2_t *) -lemma llpr_cpr_trans: ∀G. s_r_transitive … (cpr G) (llpr G 0). +lemma lpr_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lpr G). #G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2 [ /2 width=3 by/ | #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12 - elim (llpr_inv_lref_ge_dx … HL12 … HLK2) -L2 - /5 width=7 by cprs_delta, cprs_strap2, llpr_cpr_conf/ -| #a #I #G #L2 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #HL12 - elim (llpr_inv_bind_O … HL12) -HL12 /4 width=1 by cprs_bind/ -| #I #G #L2 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #HL12 - elim (llpr_inv_flat … HL12) -HL12 /3 width=1 by cprs_flat/ -| #G #L2 #V2 #T1 #T #T2 #_ #HT2 #IHT1 #L1 #HL12 - elim (llpr_inv_bind_O … HL12) /3 width=3 by cprs_zeta/ -| #G #L2 #V2 #T1 #T2 #HT12 #IHT12 #L1 #HL12 - elim (llpr_inv_flat … HL12) /3 width=1 by cprs_tau/ -| #a #G #L2 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L1 #HL12 - elim (llpr_inv_flat … HL12) -HL12 #HV1 #HL12 - elim (llpr_inv_bind_O … HL12) /3 width=3 by cprs_beta/ -| #a #G #L2 #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L1 #HL12 - elim (llpr_inv_flat … HL12) -HL12 #HV1 #HL12 - elim (llpr_inv_bind_O … HL12) /3 width=3 by cprs_theta/ + elim (lpr_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H + 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_eps/ +|5,8: /4 width=3 by lpr_pair, cprs_zeta, cprs_theta, cprs_strap1/ ] qed-. lemma cpr_bind2: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡ T2 → ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. -/4 width=9 by llpr_cpr_trans, cprs_bind_dx, llpr_bind_repl_O/ qed. +/4 width=5 by lpr_cpr_trans, cprs_bind_dx, lpr_pair/ qed. (* Advanced properties ******************************************************) (* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *) -lemma cprs_llpr_trans: ∀G. s_rs_transitive … (cpr G) (llpr G 0). -/3 width=6 by llpr_cpr_trans, llpr_cpr_conf, s_r_trans_LTC1/ qed-. +lemma lpr_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lpr G). +#G @s_r_trans_LTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *) +qed-. (* Basic_1: was: pr3_strip *) (* Basic_1: includes: pr1_strip *) lemma cprs_strip: ∀G,L. confluent2 … (cprs G L) (cpr G L). normalize /4 width=3 by cpr_conf, TC_strip1/ qed-. -lemma cprs_llpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[T0, 0] L1 → - ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. -#G #L0 #T0 #T1 #H @(cprs_ind_dx … T0 H) -T0 /2 width=3 by ex2_intro/ -#T0 #T #HT0 #_ #IHT1 #L1 #HL01 -elim (IHT1 … L1) /2 by llpr_cpr_conf/ -IHT1 #T2 #HT12 #HT2 -elim (llpr_cpr_conf_dx … HT0 … HL01) -L0 #T3 #HT03 #HT3 -elim (cprs_strip … HT2 … HT3) -T +lemma cprs_lpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #H @(cprs_ind … H) -T1 /2 width=3 by ex2_intro/ +#T #T1 #_ #HT1 #IHT0 #L1 #HL01 elim (IHT0 … HL01) +#T2 #HT2 #HT02 elim (lpr_cpr_conf_dx … HT1 … HL01) -L0 +#T3 #HT3 #HT13 elim (cprs_strip … HT2 … HT3) -T /4 width=5 by cprs_strap2, cprs_strap1, ex2_intro/ qed-. -lemma cprs_llpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → - ∀L1. ⦃G, L0⦄ ⊢ ➡[T0, 0] L1 → - ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. -#G #L0 #T0 #T1 #HT01 #L1 #HL01 -elim (cprs_llpr_conf_dx … HT01 … HL01) -/4 width=5 by cprs_llpr_trans, cprs_llpr_conf, ex2_intro/ +lemma cprs_lpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 elim (cprs_lpr_conf_dx … HT01 … HL01) -HT01 +/3 width=3 by lpr_cprs_trans, ex2_intro/ qed-. lemma cprs_bind2_dx: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡* T2 → ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. -/4 width=9 by cprs_llpr_trans, cprs_bind_dx, llpr_bind_repl_O/ qed. +/4 width=5 by lpr_cprs_trans, cprs_bind_dx, lpr_pair/ qed.