From: Ferruccio Guidi Date: Tue, 24 May 2016 18:59:39 +0000 (+0000) Subject: initial support for lfpx (replaces lpx and the parked llpx) X-Git-Tag: make_still_working~579 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=4a3e161726553a41fe68b22f111de3b8df1a9fb6 initial support for lfpx (replaces lpx and the parked llpx) --- diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc_new/lpx/lpx_fquq.etc b/matita/matita/contribs/lambdadelta/basic_2/etc_new/lpx/lpx_fquq.etc new file mode 100644 index 000000000..799808fc6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/etc_new/lpx/lpx_fquq.etc @@ -0,0 +1,47 @@ +(* Properties on supclosure *************************************************) + +lemma fqu_lpx_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, o] K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, o] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, o] T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpx_pair, ex3_2_intro/ +[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpx_inv_pair1 … H) -H + #K2 #W2 #HLK2 #HVW2 #H destruct + /3 width=5 by cpx_pair_sn, fqu_bind_dx, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #k #HLK1 #HTU1 #K2 #HK12 + elim (drop_lpx_trans … HLK1 … HK12) -HK12 + /3 width=7 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma fquq_lpx_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, o] K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, o] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, o] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_lpx_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_fqu_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, o] T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=7 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpx_pair, ex3_2_intro/ +[ #I #G1 #L1 #V1 #X #H elim (lpx_inv_pair2 … H) -H + #K1 #W1 #HKL1 #HWV1 #H destruct elim (lift_total V1 0 1) + /4 width=7 by cpx_delta, fqu_drop, drop_drop, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #k #HLK1 #HTU1 #L0 #HL01 + elim (lpx_drop_trans_O1 … HL01 … HLK1) -L1 + /3 width=5 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma lpx_fquq_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, o] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fquq_inv_gen … H) -H +[ #HT12 elim (lpx_fqu_trans … HT12 … HKL1) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx.ma new file mode 100644 index 000000000..21c37f3b3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx.ma @@ -0,0 +1,125 @@ +(**************************************************************************) +(* ___ *) +(* ||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/notation/relations/predtysn_5.ma". +include "basic_2/static/lfxs.ma". +include "basic_2/rt_transition/cpx.ma". + +(* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****) + +definition lfpx: sh → genv → relation3 term lenv lenv ≝ + λh,G. lfxs (cpx h G). + +interpretation + "uncounted parallel rt-transition on referred entries (local environment)" + 'PRedTySn h T G L1 L2 = (lfpx h G T L1 L2). + +(* Basic properties ***********************************************************) + +lemma lfpx_atom: ∀h,I,G. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] ⋆. +/2 width=1 by lfxs_atom/ qed. + +lemma lfpx_sort: ∀h,I,G,L1,L2,V1,V2,s. + ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, ⋆s] L2.ⓑ{I}V2. +/2 width=1 by lfxs_sort/ qed. + +lemma lfpx_zero: ∀h,I,G,L1,L2,V. + ⦃G, L1⦄ ⊢ ⬈[h, V] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V. +/2 width=1 by lfxs_zero/ qed. + +lemma lfpx_lref: ∀h,I,G,L1,L2,V1,V2,i. + ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #⫯i] L2.ⓑ{I}V2. +/2 width=1 by lfxs_lref/ qed. + +lemma lfpx_gref: ∀h,I,G,L1,L2,V1,V2,l. + ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, §l] L2.ⓑ{I}V2. +/2 width=1 by lfxs_gref/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma lfpx_inv_atom_sn: ∀h,I,G,Y2. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] Y2 → Y2 = ⋆. +/2 width=3 by lfxs_inv_atom_sn/ qed-. + +lemma lfpx_inv_atom_dx: ∀h,I,G,Y1. ⦃G, Y1⦄ ⊢ ⬈[h, ⓪{I}] ⋆ → Y1 = ⋆. +/2 width=3 by lfxs_inv_atom_dx/ qed-. + +lemma lfpx_inv_zero: ∀h,G,Y1,Y2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] Y2 → + (Y1 = ⋆ ∧ Y2 = ⋆) ∨ + ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & + ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 & + Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2. +/2 width=1 by lfxs_inv_zero/ qed-. + +lemma lfpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] Y2 → + (Y1 = ⋆ ∧ Y2 = ⋆) ∨ + ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & + Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2. +/2 width=1 by lfxs_inv_lref/ qed-. + +lemma lfpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → + ⦃G, L1⦄ ⊢ ⬈[h, V] L2 ∧ ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V. +/2 width=2 by lfxs_inv_bind/ qed-. + +lemma lfpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → + ⦃G, L1⦄ ⊢ ⬈[h, V] L2 ∧ ⦃G, L1⦄ ⊢ ⬈[h, T] L2. +/2 width=2 by lfxs_inv_flat/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lfpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] Y2 → + ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 & + Y2 = L2.ⓑ{I}V2. +/2 width=1 by lfxs_inv_zero_pair_sn/ qed-. + +lemma lfpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2 → + ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 & + Y1 = L1.ⓑ{I}V1. +/2 width=1 by lfxs_inv_zero_pair_dx/ qed-. + +lemma lfpx_inv_lref_pair_sn: ∀h,I,G,Y2,L1,V1,i. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #⫯i] Y2 → + ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓑ{I}V2. +/2 width=2 by lfxs_inv_lref_pair_sn/ qed-. + +lemma lfpx_inv_lref_pair_dx: ∀h,I,G,Y1,L2,V2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] L2.ⓑ{I}V2 → + ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓑ{I}V1. +/2 width=2 by lfxs_inv_lref_pair_dx/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lfpx_fwd_bind_sn: ∀h,p,I,G,L1,L2,V,T. + ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2. +/2 width=4 by lfxs_fwd_bind_sn/ qed-. + +lemma lfpx_fwd_bind_dx: ∀h,p,I,G,L1,L2,V,T. + ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V. +/2 width=2 by lfxs_fwd_bind_dx/ qed-. + +lemma lfpx_fwd_flat_sn: ∀h,I,G,L1,L2,V,T. + ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2. +/2 width=3 by lfxs_fwd_flat_sn/ qed-. + +lemma lfpx_fwd_flat_dx: ∀h,I,G,L1,L2,V,T. + ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2. +/2 width=3 by lfxs_fwd_flat_dx/ qed-. + +lemma lfpx_fwd_pair_sn: ∀h,I,G,L1,L2,V,T. + ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2. +/2 width=3 by lfxs_fwd_pair_sn/ qed-. + +(* Basic_2A1: removed theorems 14: + lpx_refl lpx_pair lpx_fwd_length + lpx_inv_atom1 lpx_inv_pair1 lpx_inv_atom2 lpx_inv_pair2 lpx_inv_pair + lpx_drop_conf drop_lpx_trans lpx_drop_trans_O1 + lpx_cpx_frees_trans cpx_frees_trans lpx_frees_trans +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx_fqup.ma new file mode 100644 index 000000000..99e668266 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx_fqup.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||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/static/lfxs_fqup.ma". +include "basic_2/rt_transition/lfpx.ma". + +(* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****) + +(* Advanced properties ******************************************************) + +lemma lfpx_refl: ∀h,G,T. reflexive … (lfpx h G T). +/2 width=1 by lfxs_refl/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx_length.ma new file mode 100644 index 000000000..6e4acfac4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx_length.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||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/static/lfxs_length.ma". +include "basic_2/rt_transition/lfpx.ma". + +(* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****) + +(* Forward lemmas with length for local environments ************************) + +lemma lfpx_fwd_length: ∀h,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈[h, T] L2 → |L1| = |L2|. +/2 width=3 by lfxs_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma deleted file mode 100644 index bd4e16df9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma +++ /dev/null @@ -1,65 +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/notation/relations/predsn_5.ma". -include "basic_2/reduction/lpr.ma". -include "basic_2/reduction/cpx.ma". - -(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) - -definition lpx: ∀h. sd h → relation3 genv lenv lenv ≝ - λh,o,G. lpx_sn (cpx h o G). - -interpretation "extended parallel reduction (local environment, sn variant)" - 'PRedSn h o G L1 L2 = (lpx h o G L1 L2). - -(* Basic inversion lemmas ***************************************************) - -lemma lpx_inv_atom1: ∀h,o,G,L2. ⦃G, ⋆⦄ ⊢ ➡[h, o] L2 → L2 = ⋆. -/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. - -lemma lpx_inv_pair1: ∀h,o,I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, o] L2 → - ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡[h, o] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, o] V2 & - L2 = K2. ⓑ{I} V2. -/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. - -lemma lpx_inv_atom2: ∀h,o,G,L1. ⦃G, L1⦄ ⊢ ➡[h, o] ⋆ → L1 = ⋆. -/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. - -lemma lpx_inv_pair2: ∀h,o,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡[h, o] K2.ⓑ{I}V2 → - ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡[h, o] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, o] V2 & - L1 = K1. ⓑ{I} V1. -/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. - -lemma lpx_inv_pair: ∀h,o,I1,I2,G,L1,L2,V1,V2. ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ➡[h, o] L2.ⓑ{I2}V2 → - ∧∧ ⦃G, L1⦄ ⊢ ➡[h, o] L2 & ⦃G, L1⦄ ⊢ V1 ➡[h, o] V2 & I1 = I2. -/2 width=1 by lpx_sn_inv_pair/ qed-. - -(* Basic properties *********************************************************) - -lemma lpx_refl: ∀h,o,G,L. ⦃G, L⦄ ⊢ ➡[h, o] L. -/2 width=1 by lpx_sn_refl/ qed. - -lemma lpx_pair: ∀h,o,I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡[h, o] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h, o] V2 → - ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, o] K2.ⓑ{I}V2. -/2 width=1 by lpx_sn_pair/ qed. - -lemma lpr_lpx: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡[h, o] L2. -#h #o #G #L1 #L2 #H elim H -L1 -L2 /3 width=1 by lpx_pair, cpr_cpx/ -qed. - -(* Basic forward lemmas *****************************************************) - -lemma lpx_fwd_length: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → |L1| = |L2|. -/2 width=2 by lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl index 6e479eaa3..852d6bce3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl +++ b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl @@ -138,8 +138,8 @@ table { } ] [ { "context-sensitive rt-reduction" * } { - [ "lpx ( ⦃?,?⦄ ⊢ ➡[?,?] ? )" "lpx_drop" + "lpx_frees" + "lpx_lleq" + "lpx_aaa" * ] - [ "cpx ( ⦃?,?⦄ ⊢ ? ➡[?,?] ? )" "cpx_lreq" + "cpx_lift" + "cpx_llpx_sn" + "cpx_lleq" + "cpx_cix" * ] + [ "lpx_drop" + "lpx_frees" + "lpx_lleq" + "lpx_aaa" * ] + [ "cpx_lreq" + "cpx_fqus" + "cpx_llpx_sn" + "cpx_lleq" * ] } ] [ { "context-sensitive reduction" * } { @@ -149,6 +149,7 @@ table { ] *) [ { "uncounted context-sensitive rt-transition" * } { + [ "lfpx ( ⦃?,?⦄ ⊢ ⬈[?,?] ? )" "lfpx_length" + "lfpx_fqup" * ] [ "cpx ( ⦃?,?⦄ ⊢ ? ⬈[?] ? )" "cpx_simple" + "cpx_drops" + "cpx_lsubr" * ] } ]