X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Frt_computation%2Fcpxs_fqus.ma;h=bb0ce14ab4136b56425ed31cec2e4668118c3b58;hp=4bacb47f6d7457db6462dc2a3ffcaf5e39bd11f5;hb=4173283e148199871d787c53c0301891deb90713;hpb=cbc645186c8836c88c559c787a4deea63b7a12b0 diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma index 4bacb47f6..bb0ce14ab 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma @@ -1,70 +1,123 @@ -include "basic_2/computation/cpxs_lift.ma". -include "basic_2/multiple/fqus_fqus.ma". +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) -(* Advanced properties ******************************************************) +(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************) -lemma lstas_cpxs: ∀h,o,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → - ∀d1. ⦃G, L⦄ ⊢ T1 ▪[h, o] d1 → d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ⬈*[h, o] T2. -#h #o #G #L #T1 #T2 #d2 #H elim H -G -L -T1 -T2 -d2 // -[ /3 width=3 by cpxs_sort, da_inv_sort/ -| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #d1 #H #Hd21 - elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 - lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpxs_delta/ -| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #d1 #H #Hd21 - elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 - lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct - #HV1 #H destruct lapply (le_plus_to_le_c … Hd21) -Hd21 - /3 width=7 by cpxs_delta/ -| /4 width=3 by cpxs_bind_dx, da_inv_bind/ -| /4 width=3 by cpxs_flat_dx, da_inv_flat/ -| /4 width=3 by cpxs_eps, da_inv_flat/ -] -qed. +include "basic_2/rt_transition/cpx_fqus.ma". +include "basic_2/rt_computation/cpxs_drops.ma". +include "basic_2/rt_computation/cpxs_lsubr.ma". +include "basic_2/rt_computation/cpxs_cpxs.ma". (* Properties on supclosure *************************************************) -lemma fqu_cpxs_trans: ∀h,o,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → - ∀T1. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄. -#h #o #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +lemma fqu_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqu_cpx_trans … HT1 … HT2) -T #T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ qed-. -lemma fquq_cpxs_trans: ∀h,o,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → - ∀T1. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. -#h #o #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fquq_inv_gen … H) -H -[ #HT12 elim (fqu_cpxs_trans … HTU2 … HT12) /3 width=3 by fqu_fquq, ex2_intro/ -| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ -] +lemma fquq_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fquq_cpx_trans … HT1 … HT2) -T +#T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ qed-. -lemma fquq_lstas_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → - ∀U2,d1. ⦃G2, L2⦄ ⊢ T2 •*[h, d1] U2 → - ∀d2. ⦃G2, L2⦄ ⊢ T2 ▪[h, o] d2 → d1 ≤ d2 → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. -/3 width=5 by fquq_cpxs_trans, lstas_cpxs/ qed-. - -lemma fqup_cpxs_trans: ∀h,o,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → - ∀T1. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄. -#h #o #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +lemma fqup_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqup_cpx_trans … HT1 … HT2) -T #U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ qed-. -lemma fqus_cpxs_trans: ∀h,o,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → - ∀T1. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. -#h #o #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fqus_inv_gen … H) -H -[ #HT12 elim (fqup_cpxs_trans … HTU2 … HT12) /3 width=3 by fqup_fqus, ex2_intro/ -| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ +lemma fqus_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqus_cpx_trans … HT1 … HT2) -T +#U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +(* Note: a proof based on fqu_cpx_trans_tdneq might exist *) +(* Basic_2A1: uses: fqu_cpxs_trans_neq *) +lemma fqu_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❴1❵) + #U2 #HVU2 @(ex3_intro … U2) + [1,3: /3 width=7 by cpxs_delta, fqu_drop/ + | #H lapply (tdeq_inv_lref1 … H) -H + #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ + ] +| #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②{I}V2.T)) + [1,3: /2 width=4 by fqu_pair_sn, cpxs_pair_sn/ + | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/ + ] +| #p #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2)) + [1,3: /2 width=4 by fqu_bind_dx, cpxs_bind/ + | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/ + ] +| #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2)) + [1,3: /4 width=4 by lsubr_cpxs_trans, cpxs_bind, lsubr_unit, fqu_clear/ + | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/ + ] +| #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓕ{I}V.T2)) + [1,3: /2 width=4 by fqu_flat_dx, cpxs_flat/ + | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/ + ] +| #I #G #L #T1 #U1 #HTU1 #T2 #HT12 #H0 + elim (cpxs_lifts_sn … HT12 (Ⓣ) … (L.ⓘ{I}) … HTU1) -HT12 + /4 width=6 by fqu_drop, drops_refl, drops_drop, tdeq_inv_lifts_bi, ex3_intro/ ] qed-. -lemma fqus_lstas_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∀U2,d1. ⦃G2, L2⦄ ⊢ T2 •*[h, d1] U2 → - ∀d2. ⦃G2, L2⦄ ⊢ T2 ▪[h, o] d2 → d1 ≤ d2 → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. -/3 width=6 by fqus_cpxs_trans, lstas_cpxs/ qed-. +(* Basic_2A1: uses: fquq_cpxs_trans_neq *) +lemma fquq_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12 +[ #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tdneq … H12 … HTU2 H) -T2 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /3 width=4 by ex3_intro/ +] +qed-. + +(* Basic_2A1: uses: fqup_cpxs_trans_neq *) +lemma fqup_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 +[ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tdneq … H12 … HTU2 H) -T2 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2 + #U1 #HTU1 #H #H12 elim (fqu_cpxs_trans_tdneq … H1 … HTU1 H) -T1 + /3 width=8 by fqup_strap2, ex3_intro/ +] +qed-. + +(* Basic_2A1: uses: fqus_cpxs_trans_neq *) +lemma fqus_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄. +#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12 +[ #H12 elim (fqup_cpxs_trans_tdneq … H12 … HTU2 H) -T2 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /3 width=4 by ex3_intro/ +] +qed-.