From: Ferruccio Guidi Date: Mon, 2 Jul 2018 14:10:32 +0000 (+0200) Subject: syntactic components detached from basic_2 become static_2 X-Git-Tag: make_still_working~301 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=ff612dc35167ec0c145864c9aa8ae5e1ebe20a48;p=helm.git syntactic components detached from basic_2 become static_2 + web site updated accordingly --- diff --git a/.gitignore b/.gitignore index a457deb5b..928986366 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,8 @@ helm/www/lambdadelta/xslt/apps_2_sum.xsl helm/www/lambdadelta/xslt/basic_2_blk.xsl helm/www/lambdadelta/xslt/basic_2_src.xsl helm/www/lambdadelta/xslt/basic_2_sum.xsl +helm/www/lambdadelta/xslt/static_2_src.xsl +helm/www/lambdadelta/xslt/static_2_sum.xsl helm/www/lambdadelta/xslt/ground_2_src.xsl helm/www/lambdadelta/xslt/ground_2_sum.xsl helm/www/lambdadelta/xslt/basic_1_blk.xsl diff --git a/helm/www/lambdadelta/web/home/sitemap.tbl b/helm/www/lambdadelta/web/home/sitemap.tbl index 14e8ac71a..e76cdd5f8 100644 --- a/helm/www/lambdadelta/web/home/sitemap.tbl +++ b/helm/www/lambdadelta/web/home/sitemap.tbl @@ -14,7 +14,8 @@ table [ class "white" { [ @@("html/specification" "specification") * ] [ @@("html/specification#v2" "version 2") - "(" ^ @@("html/ground_2" "background") + "-" + + "(" ^ @@("html/ground_2" "background") + "-" + + @@("html/static_2" "syntax") + "-" + @@("html/basic_2" "core") + "-" + @@("html/apps_2" "applications") ^ ")" * ] diff --git a/helm/www/lambdadelta/web/home/specification.ldw.xml b/helm/www/lambdadelta/web/home/specification.ldw.xml index 93208df02..c58b253a8 100644 --- a/helm/www/lambdadelta/web/home/specification.ldw.xml +++ b/helm/www/lambdadelta/web/home/specification.ldw.xml @@ -82,6 +82,7 @@ Informational pages on the parts of the specification: Background, + Syntax, Core, Applications. diff --git a/matita/matita/contribs/lambdadelta/Makefile b/matita/matita/contribs/lambdadelta/Makefile index 0c03faa0c..073dc33a2 100644 --- a/matita/matita/contribs/lambdadelta/Makefile +++ b/matita/matita/contribs/lambdadelta/Makefile @@ -32,7 +32,7 @@ WWW := ../../../../helm/www/lambdadelta TAGS := all xoa xoa2 orig elim deps top leaf stats tbls trim contrib clean \ www up-html -PACKAGES := ground_2 basic_2 apps_2 alpha_1 +PACKAGES := ground_2 basic_2 static_2 apps_2 alpha_1 XPACKAGES := ground_2 basic_2 LDWS := $(shell find -name "*.ldw.xml") diff --git a/matita/matita/contribs/lambdadelta/apps_2/models/model.ma b/matita/matita/contribs/lambdadelta/apps_2/models/model.ma index 88703cfa2..86c624e1b 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/models/model.ma +++ b/matita/matita/contribs/lambdadelta/apps_2/models/model.ma @@ -15,7 +15,7 @@ include "ground_2/notation/relations/ringeq_3.ma". include "apps_2/notation/models/at_3.ma". include "apps_2/notation/models/wbrackets_4.ma". -include "basic_2/syntax/term.ma". +include "static_2/syntax/term.ma". (* MODEL ********************************************************************) diff --git a/matita/matita/contribs/lambdadelta/apps_2/models/model_gi.ma b/matita/matita/contribs/lambdadelta/apps_2/models/model_gi.ma index 49a0d6754..1c354a621 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/models/model_gi.ma +++ b/matita/matita/contribs/lambdadelta/apps_2/models/model_gi.ma @@ -12,6 +12,6 @@ (* *) (**************************************************************************) -include "basic_2/syntax/genv.ma". +include "static_2/syntax/genv.ma". (* GLOBAL ENVIRONMENT INTERPRETATION ***************************************) diff --git a/matita/matita/contribs/lambdadelta/apps_2/models/model_li.ma b/matita/matita/contribs/lambdadelta/apps_2/models/model_li.ma index 30d7d60d2..6be3c60c6 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/models/model_li.ma +++ b/matita/matita/contribs/lambdadelta/apps_2/models/model_li.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/lenv.ma". +include "static_2/syntax/lenv.ma". include "apps_2/models/model_vlift.ma". include "apps_2/notation/models/inwbrackets_4.ma". diff --git a/matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma b/matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma index 80a103a48..905b1a336 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma +++ b/matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "ground_2/relocation/rtmap_basic.ma". -include "basic_2/relocation/lifts.ma". +include "static_2/relocation/lifts.ma". include "apps_2/models/veq.ma". (* EVALUATION EQUIVALENCE **************************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_fqus.ma index 341a3b1cb..cb79dfcc8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_fqus.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/s_computation/fqus_fqup.ma". +include "static_2/s_computation/fqus_fqup.ma". include "basic_2/dynamic/cnv_drops.ma". (* CONTEXT_SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lsubd.ma index f2ecbb50a..7f9e72946 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lsubd.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lsubd.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/lsubd.ma". +include "static_2/static/lsubd.ma". include "basic_2/dynamic/lsubsv.ma". (* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma index 0694ae50a..cac43d361 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/lsubd_da.ma". +include "static_2/static/lsubd_da.ma". include "basic_2/dynamic/lsubsv_lsubd.ma". include "basic_2/dynamic/lsubsv_lstas.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma index acaf6f038..e4f1699fd 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/lsubd_da.ma". +include "static_2/static/lsubd_da.ma". include "basic_2/dynamic/snv_aaa.ma". include "basic_2/dynamic/snv_scpes.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs.ma b/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs.ma deleted file mode 100644 index e8bd0a2bd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs.ma +++ /dev/null @@ -1,195 +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 "ground_2/lib/star.ma". -include "basic_2/notation/relations/relationstar_4.ma". -include "basic_2/static/rex.ma". - -(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) - -definition rexs (R): term → relation lenv ≝ CTC … (rex R). - -interpretation "iterated extension on referred entries (local environment)" - 'RelationStar R T L1 L2 = (rexs R T L1 L2). - -(* Basic properties *********************************************************) - -lemma rexs_step_dx: ∀R,L1,L,T. L1 ⪤*[R, T] L → - ∀L2. L ⪤[R, T] L2 → L1 ⪤*[R, T] L2. -#R #L1 #L2 #T #HL1 #L2 @step @HL1 (**) (* auto fails *) -qed-. - -lemma rexs_step_sn: ∀R,L1,L,T. L1 ⪤[R, T] L → - ∀L2. L ⪤*[R, T] L2 → L1 ⪤*[R, T] L2. -#R #L1 #L2 #T #HL1 #L2 @TC_strap @HL1 (**) (* auto fails *) -qed-. - -lemma rexs_atom: ∀R,I. ⋆ ⪤*[R, ⓪{I}] ⋆. -/2 width=1 by inj/ qed. - -lemma rexs_sort: ∀R,I,L1,L2,V1,V2,s. - L1 ⪤*[R, ⋆s] L2 → L1.ⓑ{I}V1 ⪤*[R, ⋆s] L2.ⓑ{I}V2. -#R #I #L1 #L2 #V1 #V2 #s #H elim H -L2 -/3 width=4 by rex_sort, rexs_step_dx, inj/ -qed. - -lemma rexs_pair: ∀R. (∀L. reflexive … (R L)) → - ∀I,L1,L2,V. L1 ⪤*[R, V] L2 → - L1.ⓑ{I}V ⪤*[R, #0] L2.ⓑ{I}V. -#R #HR #I #L1 #L2 #V #H elim H -L2 -/3 width=5 by rex_pair, rexs_step_dx, inj/ -qed. - -lemma rexs_unit: ∀R,f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R, cfull, f] L2 → - L1.ⓤ{I} ⪤*[R, #0] L2.ⓤ{I}. -/3 width=3 by rex_unit, inj/ qed. - -lemma rexs_lref: ∀R,I,L1,L2,V1,V2,i. - L1 ⪤*[R, #i] L2 → L1.ⓑ{I}V1 ⪤*[R, #↑i] L2.ⓑ{I}V2. -#R #I #L1 #L2 #V1 #V2 #i #H elim H -L2 -/3 width=4 by rex_lref, rexs_step_dx, inj/ -qed. - -lemma rexs_gref: ∀R,I,L1,L2,V1,V2,l. - L1 ⪤*[R, §l] L2 → L1.ⓑ{I}V1 ⪤*[R, §l] L2.ⓑ{I}V2. -#R #I #L1 #L2 #V1 #V2 #l #H elim H -L2 -/3 width=4 by rex_gref, rexs_step_dx, inj/ -qed. - -lemma rexs_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → - ∀L1,L2,T. L1 ⪤*[R1, T] L2 → L1 ⪤*[R2, T] L2. -#R1 #R2 #HR #L1 #L2 #T #H elim H -L2 -/4 width=5 by rex_co, rexs_step_dx, inj/ -qed-. - -(* Basic inversion lemmas ***************************************************) - -(* Basic_2A1: uses: TC_lpx_sn_inv_atom1 *) -lemma rexs_inv_atom_sn: ∀R,I,Y2. ⋆ ⪤*[R, ⓪{I}] Y2 → Y2 = ⋆. -#R #I #Y2 #H elim H -Y2 /3 width=3 by inj, rex_inv_atom_sn/ -qed-. - -(* Basic_2A1: uses: TC_lpx_sn_inv_atom2 *) -lemma rexs_inv_atom_dx: ∀R,I,Y1. Y1 ⪤*[R, ⓪{I}] ⋆ → Y1 = ⋆. -#R #I #Y1 #H @(TC_ind_dx ??????? H) -Y1 -/3 width=3 by inj, rex_inv_atom_dx/ -qed-. - -lemma rexs_inv_sort: ∀R,Y1,Y2,s. Y1 ⪤*[R, ⋆s] Y2 → - ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ - | ∃∃I1,I2,L1,L2. L1 ⪤*[R, ⋆s] L2 & - Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. -#R #Y1 #Y2 #s #H elim H -Y2 -[ #Y2 #H elim (rex_inv_sort … H) -H * - /4 width=8 by ex3_4_intro, inj, or_introl, or_intror, conj/ -| #Y #Y2 #_ #H elim (rex_inv_sort … H) -H * - [ #H #H2 * * /3 width=7 by ex3_4_intro, or_introl, or_intror, conj/ - | #I #I2 #L #L2 #HL2 #H #H2 * * - [ #H1 #H0 destruct - | #I1 #I0 #L1 #L0 #HL10 #H1 #H0 destruct - /4 width=7 by ex3_4_intro, rexs_step_dx, or_intror/ - ] - ] -] -qed-. - -lemma rexs_inv_gref: ∀R,Y1,Y2,l. Y1 ⪤*[R, §l] Y2 → - ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ - | ∃∃I1,I2,L1,L2. L1 ⪤*[R, §l] L2 & - Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. -#R #Y1 #Y2 #l #H elim H -Y2 -[ #Y2 #H elim (rex_inv_gref … H) -H * - /4 width=8 by ex3_4_intro, inj, or_introl, or_intror, conj/ -| #Y #Y2 #_ #H elim (rex_inv_gref … H) -H * - [ #H #H2 * * /3 width=7 by ex3_4_intro, or_introl, or_intror, conj/ - | #I #I2 #L #L2 #HL2 #H #H2 * * - [ #H1 #H0 destruct - | #I1 #I0 #L1 #L0 #HL10 #H1 #H0 destruct - /4 width=7 by ex3_4_intro, rexs_step_dx, or_intror/ - ] - ] -] -qed-. - -lemma rexs_inv_bind: ∀R. (∀L. reflexive … (R L)) → - ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → - ∧∧ L1 ⪤*[R, V] L2 & L1.ⓑ{I}V ⪤*[R, T] L2.ⓑ{I}V. -#R #HR #p #I #L1 #L2 #V #T #H elim H -L2 -[ #L2 #H elim (rex_inv_bind … V ? H) -H /3 width=1 by inj, conj/ -| #L #L2 #_ #H * elim (rex_inv_bind … V ? H) -H /3 width=3 by rexs_step_dx, conj/ -] -qed-. - -lemma rexs_inv_flat: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ⓕ{I}V.T] L2 → - ∧∧ L1 ⪤*[R, V] L2 & L1 ⪤*[R, T] L2. -#R #I #L1 #L2 #V #T #H elim H -L2 -[ #L2 #H elim (rex_inv_flat … H) -H /3 width=1 by inj, conj/ -| #L #L2 #_ #H * elim (rex_inv_flat … H) -H /3 width=3 by rexs_step_dx, conj/ -] -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma rexs_inv_sort_bind_sn: ∀R,I1,Y2,L1,s. L1.ⓘ{I1} ⪤*[R, ⋆s] Y2 → - ∃∃I2,L2. L1 ⪤*[R, ⋆s] L2 & Y2 = L2.ⓘ{I2}. -#R #I1 #Y2 #L1 #s #H elim (rexs_inv_sort … H) -H * -[ #H destruct -| #Z #I2 #Y1 #L2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rexs_inv_sort_bind_dx: ∀R,I2,Y1,L2,s. Y1 ⪤*[R, ⋆s] L2.ⓘ{I2} → - ∃∃I1,L1. L1 ⪤*[R, ⋆s] L2 & Y1 = L1.ⓘ{I1}. -#R #I2 #Y1 #L2 #s #H elim (rexs_inv_sort … H) -H * -[ #_ #H destruct -| #I1 #Z #L1 #Y2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rexs_inv_gref_bind_sn: ∀R,I1,Y2,L1,l. L1.ⓘ{I1} ⪤*[R, §l] Y2 → - ∃∃I2,L2. L1 ⪤*[R, §l] L2 & Y2 = L2.ⓘ{I2}. -#R #I1 #Y2 #L1 #l #H elim (rexs_inv_gref … H) -H * -[ #H destruct -| #Z #I2 #Y1 #L2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rexs_inv_gref_bind_dx: ∀R,I2,Y1,L2,l. Y1 ⪤*[R, §l] L2.ⓘ{I2} → - ∃∃I1,L1. L1 ⪤*[R, §l] L2 & Y1 = L1.ⓘ{I1}. -#R #I2 #Y1 #L2 #l #H elim (rexs_inv_gref … H) -H * -[ #_ #H destruct -| #I1 #Z #L1 #Y2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma rexs_fwd_pair_sn: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ②{I}V.T] L2 → L1 ⪤*[R, V] L2. -#R #I #L1 #L2 #V #T #H elim H -L2 -/3 width=5 by rex_fwd_pair_sn, rexs_step_dx, inj/ -qed-. - -lemma rexs_fwd_bind_dx: ∀R. (∀L. reflexive … (R L)) → - ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → - L1.ⓑ{I}V ⪤*[R, T] L2.ⓑ{I}V. -#R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind … H) -H // -qed-. - -lemma rexs_fwd_flat_dx: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ⓕ{I}V.T] L2 → L1 ⪤*[R, T] L2. -#R #I #L1 #L2 #V #T #H elim (rexs_inv_flat … H) -H // -qed-. - -(* Basic_2A1: removed theorems 2: - TC_lpx_sn_inv_pair1 TC_lpx_sn_inv_pair2 -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_drops.ma deleted file mode 100644 index 3ace3be2e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_drops.ma +++ /dev/null @@ -1,72 +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/relocation/seq_seq.ma". -include "basic_2/static/rex_drops.ma". -include "basic_2/i_static/rexs.ma". - -(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) - -definition tc_f_dedropable_sn: predicate (relation3 lenv term term) ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → - ∀K2,T. K1 ⪤*[R, T] K2 → ∀U. ⬆*[f] T ≘ U → - ∃∃L2. L1 ⪤*[R, U] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. - -definition tc_f_dropable_sn: predicate (relation3 lenv term term) ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → - ∀L2,U. L1 ⪤*[R, U] L2 → ∀T. ⬆*[f] T ≘ U → - ∃∃K2. K1 ⪤*[R, T] K2 & ⬇*[b, f] L2 ≘ K2. - -definition tc_f_dropable_dx: predicate (relation3 lenv term term) ≝ - λR. ∀L1,L2,U. L1 ⪤*[R, U] L2 → - ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U → - ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤*[R, T] K2. - -(* Properties with generic slicing for local environments *******************) - -lemma dedropable_sn_CTC: ∀R. f_dedropable_sn R → tc_f_dedropable_sn R. -#R #HR #b #f #L1 #K1 #HLK1 #K2 #T #H elim H -K2 -[ #K2 #HK12 #U #HTU elim (HR … HLK1 … HK12 … HTU) -K1 -T -HR - /3 width=4 by ex3_intro, inj/ -| #K #K2 #_ #HK2 #IH #U #HTU -HLK1 - elim (IH … HTU) -IH #L #HL1 #HLK - elim (HR … HLK … HK2 … HTU) -K -T -HR - /3 width=6 by seq_trans, rexs_step_dx, ex3_intro/ -] -qed-. - -(* Inversion lemmas with generic slicing for local environments *************) - -lemma dropable_sn_CTC: ∀R. f_dropable_sn R → tc_f_dropable_sn R. -#R #HR #b #f #L1 #K1 #HLK1 #Hf #L2 #U #H elim H -L2 -[ #L2 #HL12 #T #HTU elim (HR … HLK1 … HL12 … HTU) -L1 -U -HR - /3 width=3 by inj, ex2_intro/ -| #L #L2 #_ #HL2 #IH #T #HTU -HLK1 - elim (IH … HTU) -IH #K #HK1 #HLK - elim (HR … HLK … HL2 … HTU) -L -U -HR - /3 width=3 by rexs_step_dx, ex2_intro/ -] -qed-. - -lemma dropable_dx_CTC: ∀R. f_dropable_dx R → tc_f_dropable_dx R. -#R #HR #L1 #L2 #U #H elim H -L2 -[ #L2 #HL12 #b #f #K2 #HLK2 #Hf #T #HTU - elim (HR … HL12 … HLK2 … HTU) -L2 -U -HR - /3 width=3 by inj, ex2_intro/ -| #L #L2 #_ #HL2 #IH #b #f #K2 #HLK2 #Hf #T #HTU - elim (HR … HL2 … HLK2 … HTU) -L2 -HR // #K #HLK #HK2 - elim (IH … HLK … HTU) -IH -L -U - /3 width=5 by rexs_step_dx, ex2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_fqup.ma deleted file mode 100644 index ad5adc659..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_fqup.ma +++ /dev/null @@ -1,75 +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/static/rex_fqup.ma". -include "basic_2/i_static/rexs.ma". - -(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) - -(* Advanced properties ******************************************************) - -lemma rexs_refl: ∀R. c_reflexive … R → - ∀T. reflexive … (rexs R T). -/3 width=1 by rex_refl, inj/ qed. - -(* Basic_2A1: uses: TC_lpx_sn_pair TC_lpx_sn_pair_refl *) -lemma rexs_pair_refl: ∀R. c_reflexive … R → - ∀L,V1,V2. CTC … R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤*[R, T] L.ⓑ{I}V2. -#R #HR #L #V1 #V2 #H elim H -V2 -/3 width=3 by rexs_step_dx, rex_pair_refl, inj/ -qed. - -lemma rexs_tc: ∀R,L1,L2,T,f. 𝐈⦃f⦄ → TC … (sex cfull (cext2 R) f) L1 L2 → - L1 ⪤*[R, T] L2. -#R #L1 #L2 #T #f #Hf #H elim H -L2 -[ elim (frees_total L1 T) | #L elim (frees_total L T) ] -/5 width=7 by sex_sdj, rexs_step_dx, sdj_isid_sn, inj, ex2_intro/ -qed. - -(* Advanced eliminators *****************************************************) - -lemma rexs_ind_sn: ∀R. c_reflexive … R → - ∀L1,T. ∀Q:predicate …. Q L1 → - (∀L,L2. L1 ⪤*[R, T] L → L ⪤[R, T] L2 → Q L → Q L2) → - ∀L2. L1 ⪤*[R, T] L2 → Q L2. -#R #HR #L1 #T #Q #HL1 #IHL1 #L2 #HL12 -@(TC_star_ind … HL1 IHL1 … HL12) /2 width=1 by rex_refl/ -qed-. - -lemma rexs_ind_dx: ∀R. c_reflexive … R → - ∀L2,T. ∀Q:predicate …. Q L2 → - (∀L1,L. L1 ⪤[R, T] L → L ⪤*[R, T] L2 → Q L → Q L1) → - ∀L1. L1 ⪤*[R, T] L2 → Q L1. -#R #HR #L2 #Q #HL2 #IHL2 #L1 #HL12 -@(TC_star_ind_dx … HL2 IHL2 … HL12) /2 width=4 by rex_refl/ -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma rexs_inv_bind_void: ∀R. c_reflexive … R → - ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → - ∧∧ L1 ⪤*[R, V] L2 & L1.ⓧ ⪤*[R, T] L2.ⓧ. -#R #HR #p #I #L1 #L2 #V #T #H @(rexs_ind_sn … HR … H) -L2 -[ /3 width=1 by rexs_refl, conj/ -| #L #L2 #_ #H * elim (rex_inv_bind_void … H) -H /3 width=3 by rexs_step_dx, conj/ -] -qed-. - -(* Advanced forward lemmas **************************************************) - -lemma rexs_fwd_bind_dx_void: ∀R. c_reflexive … R → - ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → - L1.ⓧ ⪤*[R, T] L2.ⓧ. -#R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind_void … H) -H // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_length.ma b/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_length.ma deleted file mode 100644 index 9b1e1263b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_length.ma +++ /dev/null @@ -1,29 +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/static/rex_length.ma". -include "basic_2/i_static/rexs.ma". - -(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) - -(* Forward lemmas with length for local environments ************************) - -(* Basic_2A1: uses: TC_lpx_sn_fwd_length *) -lemma rexs_fwd_length: ∀R,L1,L2,T. L1 ⪤*[R, T] L2 → |L1| = |L2|. -#R #L1 #L2 #T #H elim H -L2 -[ #L2 #HL12 >(rex_fwd_length … HL12) -HL12 // -| #L #L2 #_ #HL2 #IHL1 - >IHL1 -L1 >(rex_fwd_length … HL2) -HL2 // -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_lex.ma b/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_lex.ma deleted file mode 100644 index c46649efe..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_lex.ma +++ /dev/null @@ -1,58 +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/relocation/lex_tc.ma". -include "basic_2/static/req_fqup.ma". -include "basic_2/static/req_fsle.ma". -include "basic_2/i_static/rexs_fqup.ma". - -(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) - -(* Properties with generic extension of a context sensitive relation ********) - -lemma rexs_lex: ∀R. c_reflexive … R → - ∀L1,L2,T. L1 ⪤[CTC … R] L2 → L1 ⪤*[R, T] L2. -#R #HR #L1 #L2 #T * -/5 width=7 by rexs_tc, sex_inv_tc_dx, sex_co, ext2_inv_tc, ext2_refl/ -qed. - -lemma rexs_lex_req: ∀R. c_reflexive … R → - ∀L1,L. L1 ⪤[CTC … R] L → ∀L2,T. L ≡[T] L2 → - L1 ⪤*[R, T] L2. -/3 width=3 by rexs_lex, rexs_step_dx, req_fwd_rex/ qed. - -(* Inversion lemmas with generic extension of a context sensitive relation **) - -(* Note: s_rs_transitive_lex_inv_isid could be invoked in the last auto but makes it too slow *) -lemma rexs_inv_lex_req: ∀R. c_reflexive … R → - rex_fsge_compatible R → - s_rs_transitive … R (λ_.lex R) → - req_transitive R → - ∀L1,L2,T. L1 ⪤*[R, T] L2 → - ∃∃L. L1 ⪤[CTC … R] L & L ≡[T] L2. -#R #H1R #H2R #H3R #H4R #L1 #L2 #T #H -lapply (s_rs_transitive_lex_inv_isid … H3R) -H3R #H3R -@(rexs_ind_sn … H1R … H) -H -L2 -[ /4 width=3 by req_refl, lex_refl, inj, ex2_intro/ -| #L0 #L2 #_ #HL02 * #L * #f0 #Hf0 #HL1 #HL0 - lapply (req_rex_trans … HL0 … HL02) -L0 // * #f1 #Hf1 #HL2 - elim (sex_sdj_split … ceq_ext … HL2 f0 ?) -HL2 - [ #L0 #HL0 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ] - lapply (sex_sdj … HL0 f1 ?) /2 width=1 by sdj_isid_sn/ #H - elim (frees_sex_conf … Hf1 … H) // -H2R -H #f2 #Hf2 #Hf21 - lapply (sle_sex_trans … HL02 … Hf21) -f1 // #HL02 - lapply (sex_co ?? cfull (CTC … (cext2 R)) … HL1) -HL1 /2 width=1 by ext2_inv_tc/ #HL1 - /8 width=11 by sex_inv_tc_dx, sex_tc_dx, sex_co, ext2_tc, ext2_refl, step, ex2_intro/ (**) (* full auto too slow *) -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_rexs.ma b/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_rexs.ma deleted file mode 100644 index 7b0b83d48..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/i_static/rexs_rexs.ma +++ /dev/null @@ -1,33 +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/static/rex_fsle.ma". -include "basic_2/i_static/rexs.ma". - -(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) - -(* Advanced properties ******************************************************) - -lemma rexs_sym: ∀R. rex_fsge_compatible R → - (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) → - ∀T. symmetric … (rexs R T). -#R #H1R #H2R #T #L1 #L2 #H elim H -L2 -/4 width=3 by rex_sym, rexs_step_sn, inj/ -qed-. - -(* Main properties **********************************************************) - -theorem rexs_trans: ∀R,T. Transitive … (rexs R T). -#R #T #L1 #L #HL1 #L2 #HL2 @(trans_TC … HL1 HL2) (**) (* auto fails *) -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxabbr_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxabbr_2.ma deleted file mode 100644 index 1eea5226e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxabbr_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L. break ⓓ T1 )" - left associative with precedence 50 - for @{ 'DxAbbr $L $T1 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxabst_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxabst_2.ma deleted file mode 100644 index 3bb334e86..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxabst_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L. break ⓛ T1 )" - left associative with precedence 51 - for @{ 'DxAbst $L $T1 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxbind1_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxbind1_2.ma deleted file mode 100644 index 5e78eeb18..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxbind1_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L. break ⓤ { term 46 I } )" - non associative with precedence 47 - for @{ 'DxBind1 $L $I }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxbind2_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxbind2_3.ma deleted file mode 100644 index 6800d8e5c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxbind2_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L. break ⓑ { term 46 I } break term 49 T1 )" - non associative with precedence 48 - for @{ 'DxBind2 $L $I $T1 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxitem_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxitem_2.ma deleted file mode 100644 index c2e0b42dd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxitem_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L. ⓘ { break term 46 I } )" - non associative with precedence 46 - for @{'DxItem $L $I }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxvoid_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxvoid_1.ma deleted file mode 100644 index 58faf0664..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/dxvoid_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L. ⓧ )" - non associative with precedence 49 - for @{ 'DxVoid $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/gref_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/gref_1.ma deleted file mode 100644 index c67265063..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/gref_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( § term 90 l )" - non associative with precedence 55 - for @{ 'GRef $l }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/item0_0.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/item0_0.ma deleted file mode 100644 index b6e471d3d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/item0_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "⓪" - non associative with precedence 55 - for @{ 'Item0 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/item0_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/item0_1.ma deleted file mode 100644 index 2c9e41aef..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/item0_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓪ { term 46 I } )" - non associative with precedence 55 - for @{ 'Item0 $I }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/lref_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/lref_1.ma deleted file mode 100644 index ebab03c01..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/lref_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( # term 90 i )" - non associative with precedence 55 - for @{ 'LRef $i }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbr_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbr_3.ma deleted file mode 100644 index 192f6cd70..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbr_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓓ { term 46 p } break term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAbbr $p $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbrneg_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbrneg_2.ma deleted file mode 100644 index ecd1a7c63..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbrneg_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( - ⓓ term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAbbrNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbrpos_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbrpos_2.ma deleted file mode 100644 index 84aa4d213..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabbrpos_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( + ⓓ term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAbbrPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabst_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabst_3.ma deleted file mode 100644 index 2c9253d98..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabst_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓛ { term 46 p } break term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAbst $p $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabstneg_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabstneg_2.ma deleted file mode 100644 index e4dc84a10..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabstneg_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( - ⓛ term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAbstNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabstpos_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabstpos_2.ma deleted file mode 100644 index a54fadce2..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snabstpos_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( + ⓛ term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAbstPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snappl_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snappl_2.ma deleted file mode 100644 index 615e70bd3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snappl_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓐ term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnAppl $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2_4.ma deleted file mode 100644 index b36457861..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓑ { term 46 p, break term 46 I } break term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnBind2 $p $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2neg_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2neg_3.ma deleted file mode 100644 index c75fe170d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2neg_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( - ⓑ { term 46 I } break term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnBind2Neg $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2pos_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2pos_3.ma deleted file mode 100644 index ca7a9d921..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snbind2pos_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( + ⓑ { term 46 I } break term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnBind2Pos $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/sncast_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/sncast_2.ma deleted file mode 100644 index eddb2e583..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/sncast_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓝ term 55 T1. break term 55 T2 )" - non associative with precedence 55 - for @{ 'SnCast $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snflat2_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snflat2_3.ma deleted file mode 100644 index b0fdc8987..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snflat2_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓕ { term 46 I } break term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnFlat2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snitem2_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snitem2_2.ma deleted file mode 100644 index 90bc4ed5b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snitem2_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ② term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnItem2 $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snitem2_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snitem2_3.ma deleted file mode 100644 index d455b5103..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/snitem2_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ② { term 46 I } break term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnItem2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/star_0.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/star_0.ma deleted file mode 100644 index 8cf6da569..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/star_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "⋆" - non associative with precedence 46 - for @{ 'Star }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/star_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/star_1.ma deleted file mode 100644 index af8fa6675..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/constructors/star_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⋆ term 90 s )" - non associative with precedence 55 - for @{ 'Star $s }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snabbr_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snabbr_2.ma deleted file mode 100644 index 25c3ca773..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snabbr_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓓ term 55 T. break term 55 L )" - non associative with precedence 55 - for @{ 'SnAbbr $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snabst_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snabst_2.ma deleted file mode 100644 index f5219bf69..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snabst_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓛ term 55 T. break term 55 L )" - non associative with precedence 55 - for @{ 'SnAbst $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snapplvector_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snapplvector_2.ma deleted file mode 100644 index a7c92b4fe..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snapplvector_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( Ⓐ term 55 T1. break term 55 T )" - non associative with precedence 55 - for @{ 'SnApplVector $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snbind1_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snbind1_2.ma deleted file mode 100644 index 8cac6eac6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snbind1_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓤ { term 46 I }. break term 55 L )" - non associative with precedence 55 - for @{ 'SnBind1 $I $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snbind2_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snbind2_3.ma deleted file mode 100644 index 7e73c0fb5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snbind2_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓑ { term 46 I } break term 55 T. break term 55 L )" - non associative with precedence 55 - for @{ 'SnBind2 $I $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snitem_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snitem_2.ma deleted file mode 100644 index 7046d2247..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snitem_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓘ { term 46 I }. break term 55 L )" - non associative with precedence 55 - for @{ 'SnItem $I $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snvoid_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snvoid_1.ma deleted file mode 100644 index 2615d8c66..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/snvoid_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⓧ. term 55 L )" - non associative with precedence 55 - for @{ 'SnVoid $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_1.ma deleted file mode 100644 index 3cd52cc2f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ♯ { term 46 X } )" - non associative with precedence 90 - for @{ 'Weight $X }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_2.ma deleted file mode 100644 index 8d13242c1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ♯ { term 46 L, break term 46 T } )" - non associative with precedence 90 - for @{ 'Weight $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_3.ma deleted file mode 100644 index de765db43..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/weight_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ♯ { term 46 G, break term 46 L, break term 46 T } )" - non associative with precedence 90 - for @{ 'Weight $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/atomicarity_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/atomicarity_4.ma deleted file mode 100644 index 9659409b9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/atomicarity_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G, break term 46 L⦄ ⊢ break term 46 T ⁝ break term 46 A )" - non associative with precedence 45 - for @{ 'AtomicArity $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/freestar_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/freestar_3.ma deleted file mode 100644 index 02c33853c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/freestar_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L ⊢ 𝐅 * ⦃ break term 46 T ⦄ ≘ break term 46 f )" - non associative with precedence 45 - for @{ 'FreeStar $L $T $f }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/ideqsn_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/ideqsn_3.ma deleted file mode 100644 index 3ba302519..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/ideqsn_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ≡ [ break term 46 f ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'IdEqSn $f $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/ineint_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/ineint_5.ma deleted file mode 100644 index 1705b31be..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/ineint_5.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G, break term 46 L, break term 46 T ⦄ ϵ [ break term 46 R ] 〚 break term 46 A 〛 )" - non associative with precedence 45 - for @{ 'InEInt $R $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqa_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqa_3.ma deleted file mode 100644 index c3b74a96a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqa_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( G ⊢ break term 46 L1 ⫃ ⁝ break term 46 L2 )" - non associative with precedence 45 - for @{ 'LRSubEqA $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_2.ma deleted file mode 100644 index 3a6e5eded..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_2.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ⫃ break term 46 L2 )" - non associative with precedence 45 - for @{ 'LRSubEqC $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_4.ma deleted file mode 100644 index 6b9fa4dfd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqc_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( G ⊢ break term 46 L1 ⫃ [ break term 46 R ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'LRSubEqC $R $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqf_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqf_4.ma deleted file mode 100644 index 413553ccd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqf_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 L1, break term 46 f1 ⦄ ⫃ 𝐅* ⦃ break term 46 L2, break term 46 f2 ⦄ )" - non associative with precedence 45 - for @{ 'LRSubEqF $L1 $f1 $L2 $f2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rdropstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rdropstar_3.ma deleted file mode 100644 index 0e0a3273d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rdropstar_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⬇ * [ term 46 i ] break term 46 L1 ≘ break term 46 L2 )" - non associative with precedence 45 - for @{ 'RDropStar $i $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rdropstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rdropstar_4.ma deleted file mode 100644 index ce4ce12b9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rdropstar_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⬇ * [ term 46 b, break term 46 f ] break term 46 L1 ≘ break term 46 L2 )" - non associative with precedence 45 - for @{ 'RDropStar $b $f $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_3.ma deleted file mode 100644 index 251dbf3f9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ⪤ [ break term 46 R ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'Relation $R $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_4.ma deleted file mode 100644 index 6d4e20cea..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ⪤[ break term 46 R, break term 46 T ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'Relation $R $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_5.ma deleted file mode 100644 index 6ad4bb3e7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relation_5.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ⪤[ break term 46 R1, break term 46 R2, break term 46 f ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'Relation $R1 $R2 $f $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relationstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relationstar_4.ma deleted file mode 100644 index bc5939830..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/relationstar_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ⪤*[ break term 46 R, break term 46 T ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'RelationStar $R $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rliftstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rliftstar_3.ma deleted file mode 100644 index 26d0262de..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rliftstar_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⬆ * [ term 46 f ] break term 46 T1 ≘ break term 46 T2 )" - non associative with precedence 45 - for @{ 'RLiftStar $f $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/simple_1.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/simple_1.ma deleted file mode 100644 index 0acfb4ef7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/simple_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( 𝐒 ⦃ term 46 T ⦄ )" - non associative with precedence 45 - for @{ 'Simple $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareq_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareq_4.ma deleted file mode 100644 index 0f67a8382..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareq_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( T1 ≛ [ break term 46 h, break term 46 o ] break term 46 T2 )" - non associative with precedence 45 - for @{ 'StarEq $h $o $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareq_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareq_5.ma deleted file mode 100644 index 553205960..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareq_5.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L ⊢ break term 46 T1 ≛ [ break term 46 h, break term 46 o ] break term 46 T2 )" - non associative with precedence 45 - for @{ 'StarEq $h $o $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareqsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareqsn_5.ma deleted file mode 100644 index af611f765..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareqsn_5.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ≛ [ break term 46 h, break term 46 o, break term 46 T ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'StarEqSn $h $o $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareqsn_8.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareqsn_8.ma deleted file mode 100644 index 6e4ed5d11..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/stareqsn_8.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≛ [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'StarEqSn $h $o $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/subseteq_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/subseteq_4.ma deleted file mode 100644 index f7a000112..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/subseteq_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊆ ⦃ break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SubSetEq $L1 $T1 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/supterm_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/supterm_6.ma deleted file mode 100644 index 72533dc3c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/supterm_6.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTerm $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/supterm_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/supterm_7.ma deleted file mode 100644 index 2e12296b4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/supterm_7.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐ [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTerm $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermopt_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermopt_6.ma deleted file mode 100644 index 62a8cbb0b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermopt_6.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⸮ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTermOpt $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermopt_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermopt_7.ma deleted file mode 100644 index dd6db78c2..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermopt_7.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⸮ [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTermOpt $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermplus_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermplus_6.ma deleted file mode 100644 index 57bdc3d94..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermplus_6.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + ⦃ break term 46 G2, term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTermPlus $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermplus_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermplus_7.ma deleted file mode 100644 index 3bbe31a83..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermplus_7.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + [ break term 46 b ] ⦃ break term 46 G2, term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTermPlus $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermstar_6.ma deleted file mode 100644 index a0bf55faa..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermstar_6.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTermStar $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermstar_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermstar_7.ma deleted file mode 100644 index 865019860..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/suptermstar_7.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" - non associative with precedence 45 - for @{ 'SupTermStar $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/topiso_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/topiso_4.ma deleted file mode 100644 index e8c080f6a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/topiso_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( T1 ⩳ [ break term 46 h, break term 46 o ] break term 46 T2 )" - non associative with precedence 45 - for @{ 'TopIso $h $o $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/voidstareq_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/voidstareq_4.ma deleted file mode 100644 index 77841c6bb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/voidstareq_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) - -notation "hvbox( L1 ≋ⓧ* [ break term 46 n1, break term 46 n2 ] break term 46 L2 )" - non associative with precedence 45 - for @{ 'VoidStarEq $L1 $n1 $n2 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma deleted file mode 100644 index f982cb1a6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma +++ /dev/null @@ -1,469 +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 "ground_2/relocation/rtmap_coafter.ma". -include "basic_2/notation/relations/rdropstar_3.ma". -include "basic_2/notation/relations/rdropstar_4.ma". -include "basic_2/relocation/seq.ma". -include "basic_2/relocation/lifts_bind.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Basic_1: includes: drop_skip_bind drop1_skip_bind *) -(* Basic_2A1: includes: drop_atom drop_pair drop_drop drop_skip - drop_refl_atom_O2 drop_drop_lt drop_skip_lt -*) -inductive drops (b:bool): rtmap → relation lenv ≝ -| drops_atom: ∀f. (b = Ⓣ → 𝐈⦃f⦄) → drops b (f) (⋆) (⋆) -| drops_drop: ∀f,I,L1,L2. drops b f L1 L2 → drops b (↑f) (L1.ⓘ{I}) L2 -| drops_skip: ∀f,I1,I2,L1,L2. - drops b f L1 L2 → ⬆*[f] I2 ≘ I1 → - drops b (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2}) -. - -interpretation "uniform slicing (local environment)" - 'RDropStar i L1 L2 = (drops true (uni i) L1 L2). - -interpretation "generic slicing (local environment)" - 'RDropStar b f L1 L2 = (drops b f L1 L2). - -definition d_liftable1: predicate (relation2 lenv term) ≝ - λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b, f] L ≘ K → - ∀U. ⬆*[f] T ≘ U → R L U. - -definition d_liftable1_isuni: predicate (relation2 lenv term) ≝ - λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b, f] L ≘ K → 𝐔⦃f⦄ → - ∀U. ⬆*[f] T ≘ U → R L U. - -definition d_deliftable1: predicate (relation2 lenv term) ≝ - λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b, f] L ≘ K → - ∀T. ⬆*[f] T ≘ U → R K T. - -definition d_deliftable1_isuni: predicate (relation2 lenv term) ≝ - λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b, f] L ≘ K → 𝐔⦃f⦄ → - ∀T. ⬆*[f] T ≘ U → R K T. - -definition d_liftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C. - predicate (lenv → relation C) ≝ - λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b, f] L ≘ K → - ∀U1. S f T1 U1 → - ∃∃U2. S f T2 U2 & R L U1 U2. - -definition d_deliftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C. - predicate (lenv → relation C) ≝ - λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b, f] L ≘ K → - ∀T1. S f T1 U1 → - ∃∃T2. S f T2 U2 & R K T1 T2. - -definition d_liftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C. - predicate (lenv → relation C) ≝ - λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b, f] L ≘ K → - ∀U1. S f T1 U1 → - ∀U2. S f T2 U2 → R L U1 U2. - -definition d_deliftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C. - predicate (lenv → relation C) ≝ - λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b, f] L ≘ K → - ∀T1. S f T1 U1 → - ∀T2. S f T2 U2 → R K T1 T2. - -definition co_dropable_sn: predicate (rtmap → relation lenv) ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → - ∀f2,L2. R f2 L1 L2 → ∀f1. f ~⊚ f1 ≘ f2 → - ∃∃K2. R f1 K1 K2 & ⬇*[b, f] L2 ≘ K2. - -definition co_dropable_dx: predicate (rtmap → relation lenv) ≝ - λR. ∀f2,L1,L2. R f2 L1 L2 → - ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → - ∀f1. f ~⊚ f1 ≘ f2 → - ∃∃K1. ⬇*[b, f] L1 ≘ K1 & R f1 K1 K2. - -definition co_dedropable_sn: predicate (rtmap → relation lenv) ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀f1,K2. R f1 K1 K2 → - ∀f2. f ~⊚ f1 ≘ f2 → - ∃∃L2. R f2 L1 L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. - -(* Basic properties *********************************************************) - -lemma drops_atom_F: ∀f. ⬇*[Ⓕ, f] ⋆ ≘ ⋆. -#f @drops_atom #H destruct -qed. - -lemma drops_eq_repl_back: ∀b,L1,L2. eq_repl_back … (λf. ⬇*[b, f] L1 ≘ L2). -#b #L1 #L2 #f1 #H elim H -f1 -L1 -L2 -[ /4 width=3 by drops_atom, isid_eq_repl_back/ -| #f1 #I #L1 #L2 #_ #IH #f2 #H elim (eq_inv_nx … H) -H - /3 width=3 by drops_drop/ -| #f1 #I1 #I2 #L1 #L2 #_ #HI #IH #f2 #H elim (eq_inv_px … H) -H - /3 width=3 by drops_skip, liftsb_eq_repl_back/ -] -qed-. - -lemma drops_eq_repl_fwd: ∀b,L1,L2. eq_repl_fwd … (λf. ⬇*[b, f] L1 ≘ L2). -#b #L1 #L2 @eq_repl_sym /2 width=3 by drops_eq_repl_back/ (**) (* full auto fails *) -qed-. - -(* Basic_2A1: includes: drop_FT *) -lemma drops_TF: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → ⬇*[Ⓕ, f] L1 ≘ L2. -#f #L1 #L2 #H elim H -f -L1 -L2 -/3 width=1 by drops_atom, drops_drop, drops_skip/ -qed. - -(* Basic_2A1: includes: drop_gen *) -lemma drops_gen: ∀b,f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → ⬇*[b, f] L1 ≘ L2. -* /2 width=1 by drops_TF/ -qed-. - -(* Basic_2A1: includes: drop_T *) -lemma drops_F: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ⬇*[Ⓕ, f] L1 ≘ L2. -* /2 width=1 by drops_TF/ -qed-. - -lemma d_liftable2_sn_bi: ∀C,S. (∀f,c. is_mono … (S f c)) → - ∀R. d_liftable2_sn C S R → d_liftable2_bi C S R. -#C #S #HS #R #HR #K #T1 #T2 #HT12 #b #f #L #HLK #U1 #HTU1 #U2 #HTU2 -elim (HR … HT12 … HLK … HTU1) -HR -K -T1 #X #HTX #HUX -<(HS … HTX … HTU2) -T2 -U2 -b -f // -qed-. - -lemma d_deliftable2_sn_bi: ∀C,S. (∀f. is_inj2 … (S f)) → - ∀R. d_deliftable2_sn C S R → d_deliftable2_bi C S R. -#C #S #HS #R #HR #L #U1 #U2 #HU12 #b #f #K #HLK #T1 #HTU1 #T2 #HTU2 -elim (HR … HU12 … HLK … HTU1) -HR -L -U1 #X #HUX #HTX -<(HS … HUX … HTU2) -U2 -T2 -b -f // -qed-. - -(* Basic inversion lemmas ***************************************************) - -fact drops_inv_atom1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → X = ⋆ → - Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄). -#b #f #X #Y * -f -X -Y -[ /3 width=1 by conj/ -| #f #I #L1 #L2 #_ #H destruct -| #f #I1 #I2 #L1 #L2 #_ #_ #H destruct -] -qed-. - -(* Basic_1: includes: drop_gen_sort *) -(* Basic_2A1: includes: drop_inv_atom1 *) -lemma drops_inv_atom1: ∀b,f,Y. ⬇*[b, f] ⋆ ≘ Y → Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄). -/2 width=3 by drops_inv_atom1_aux/ qed-. - -fact drops_inv_drop1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I,K. X = K.ⓘ{I} → f = ↑g → - ⬇*[b, g] K ≘ Y. -#b #f #X #Y * -f -X -Y -[ #f #Hf #g #J #K #H destruct -| #f #I #L1 #L2 #HL #g #J #K #H1 #H2 <(injective_next … H2) -g destruct // -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J #K #_ #H2 elim (discr_push_next … H2) -] -qed-. - -(* Basic_1: includes: drop_gen_drop *) -(* Basic_2A1: includes: drop_inv_drop1_lt drop_inv_drop1 *) -lemma drops_inv_drop1: ∀b,f,I,K,Y. ⬇*[b, ↑f] K.ⓘ{I} ≘ Y → ⬇*[b, f] K ≘ Y. -/2 width=6 by drops_inv_drop1_aux/ qed-. - -fact drops_inv_skip1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I1,K1. X = K1.ⓘ{I1} → f = ⫯g → - ∃∃I2,K2. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & Y = K2.ⓘ{I2}. -#b #f #X #Y * -f -X -Y -[ #f #Hf #g #J1 #K1 #H destruct -| #f #I #L1 #L2 #_ #g #J1 #K1 #_ #H2 elim (discr_next_push … H2) -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_push … H2) -g destruct - /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_1: includes: drop_gen_skip_l *) -(* Basic_2A1: includes: drop_inv_skip1 *) -lemma drops_inv_skip1: ∀b,f,I1,K1,Y. ⬇*[b, ⫯f] K1.ⓘ{I1} ≘ Y → - ∃∃I2,K2. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & Y = K2.ⓘ{I2}. -/2 width=5 by drops_inv_skip1_aux/ qed-. - -fact drops_inv_skip2_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I2,K2. Y = K2.ⓘ{I2} → f = ⫯g → - ∃∃I1,K1. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & X = K1.ⓘ{I1}. -#b #f #X #Y * -f -X -Y -[ #f #Hf #g #J2 #K2 #H destruct -| #f #I #L1 #L2 #_ #g #J2 #K2 #_ #H2 elim (discr_next_push … H2) -| #f #I1 #I2 #L1 #L2 #HL #HV #g #J2 #K2 #H1 #H2 <(injective_push … H2) -g destruct - /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_1: includes: drop_gen_skip_r *) -(* Basic_2A1: includes: drop_inv_skip2 *) -lemma drops_inv_skip2: ∀b,f,I2,X,K2. ⬇*[b, ⫯f] X ≘ K2.ⓘ{I2} → - ∃∃I1,K1. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & X = K1.ⓘ{I1}. -/2 width=5 by drops_inv_skip2_aux/ qed-. - -(* Basic forward lemmas *****************************************************) - -fact drops_fwd_drop2_aux: ∀b,f2,X,Y. ⬇*[b, f2] X ≘ Y → ∀I,K. Y = K.ⓘ{I} → - ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b, f] X ≘ K. -#b #f2 #X #Y #H elim H -f2 -X -Y -[ #f2 #Hf2 #J #K #H destruct -| #f2 #I #L1 #L2 #_ #IHL #J #K #H elim (IHL … H) -IHL - /3 width=7 by after_next, ex3_2_intro, drops_drop/ -| #f2 #I1 #I2 #L1 #L2 #HL #_ #_ #J #K #H destruct - lapply (after_isid_dx 𝐈𝐝 … f2) /3 width=9 by after_push, ex3_2_intro, drops_drop/ -] -qed-. - -lemma drops_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} → - ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b, f] X ≘ K. -/2 width=4 by drops_fwd_drop2_aux/ qed-. - -(* Properties with test for identity ****************************************) - -(* Basic_2A1: includes: drop_refl *) -lemma drops_refl: ∀b,L,f. 𝐈⦃f⦄ → ⬇*[b, f] L ≘ L. -#b #L elim L -L /2 width=1 by drops_atom/ -#L #I #IHL #f #Hf elim (isid_inv_gen … Hf) -Hf -/3 width=1 by drops_skip, liftsb_refl/ -qed. - -(* Forward lemmas test for identity *****************************************) - -(* Basic_1: includes: drop_gen_refl *) -(* Basic_2A1: includes: drop_inv_O2 *) -lemma drops_fwd_isid: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → 𝐈⦃f⦄ → L1 = L2. -#b #f #L1 #L2 #H elim H -f -L1 -L2 // -[ #f #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) // -| /5 width=5 by isid_inv_push, liftsb_fwd_isid, eq_f2, sym_eq/ -] -qed-. - -lemma drops_after_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} → - ∀f1,f. 𝐈⦃f1⦄ → f2 ⊚ ↑f1 ≘ f → ⬇*[b, f] X ≘ K. -#b #f2 #I #X #K #H #f1 #f #Hf1 #Hf elim (drops_fwd_drop2 … H) -H -#g1 #g #Hg1 #Hg #HK lapply (after_mono_eq … Hg … Hf ??) -Hg -Hf -/3 width=5 by drops_eq_repl_back, isid_inv_eq_repl, eq_next/ -qed-. - -(* Forward lemmas with test for finite colength *****************************) - -lemma drops_fwd_isfin: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐅⦃f⦄. -#f #L1 #L2 #H elim H -f -L1 -L2 -/3 width=1 by isfin_next, isfin_push, isfin_isid/ -qed-. - -(* Properties with test for uniformity **************************************) - -lemma drops_isuni_ex: ∀f. 𝐔⦃f⦄ → ∀L. ∃K. ⬇*[Ⓕ, f] L ≘ K. -#f #H elim H -f /4 width=2 by drops_refl, drops_TF, ex_intro/ -#f #_ #g #H #IH destruct * /2 width=2 by ex_intro/ -#L #I elim (IH L) -IH /3 width=2 by drops_drop, ex_intro/ -qed-. - -(* Inversion lemmas with test for uniformity ********************************) - -lemma drops_inv_isuni: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐔⦃f⦄ → - (𝐈⦃f⦄ ∧ L1 = L2) ∨ - ∃∃g,I,K. ⬇*[Ⓣ, g] K ≘ L2 & 𝐔⦃g⦄ & L1 = K.ⓘ{I} & f = ↑g. -#f #L1 #L2 * -f -L1 -L2 -[ /4 width=1 by or_introl, conj/ -| /4 width=7 by isuni_inv_next, ex4_3_intro, or_intror/ -| /7 width=6 by drops_fwd_isid, liftsb_fwd_isid, isuni_inv_push, isid_push, or_introl, conj, eq_f2, sym_eq/ -] -qed-. - -(* Basic_2A1: was: drop_inv_O1_pair1 *) -lemma drops_inv_bind1_isuni: ∀b,f,I,K,L2. 𝐔⦃f⦄ → ⬇*[b, f] K.ⓘ{I} ≘ L2 → - (𝐈⦃f⦄ ∧ L2 = K.ⓘ{I}) ∨ - ∃∃g. 𝐔⦃g⦄ & ⬇*[b, g] K ≘ L2 & f = ↑g. -#b #f #I #K #L2 #Hf #H elim (isuni_split … Hf) -Hf * #g #Hg #H0 destruct -[ lapply (drops_inv_skip1 … H) -H * #Z #Y #HY #HZ #H destruct - <(drops_fwd_isid … HY Hg) -Y >(liftsb_fwd_isid … HZ Hg) -Z - /4 width=3 by isid_push, or_introl, conj/ -| lapply (drops_inv_drop1 … H) -H /3 width=4 by ex3_intro, or_intror/ -] -qed-. - -(* Basic_2A1: was: drop_inv_O1_pair2 *) -lemma drops_inv_bind2_isuni: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K.ⓘ{I} → - (𝐈⦃f⦄ ∧ L1 = K.ⓘ{I}) ∨ - ∃∃g,I1,K1. 𝐔⦃g⦄ & ⬇*[b, g] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1} & f = ↑g. -#b #f #I #K * -[ #Hf #H elim (drops_inv_atom1 … H) -H #H destruct -| #L1 #I1 #Hf #H elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct /3 width=1 by or_introl, conj/ - | /3 width=7 by ex4_3_intro, or_intror/ - ] -] -qed-. - -lemma drops_inv_bind2_isuni_next: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, ↑f] L1 ≘ K.ⓘ{I} → - ∃∃I1,K1. ⬇*[b, f] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1}. -#b #f #I #K #L1 #Hf #H elim (drops_inv_bind2_isuni … H) -H /2 width=3 by isuni_next/ -Hf * -[ #H elim (isid_inv_next … H) -H // -| /2 width=4 by ex2_2_intro/ -] -qed-. - -fact drops_inv_TF_aux: ∀f,L1,L2. ⬇*[Ⓕ, f] L1 ≘ L2 → 𝐔⦃f⦄ → - ∀I,K. L2 = K.ⓘ{I} → ⬇*[Ⓣ, f] L1 ≘ K.ⓘ{I}. -#f #L1 #L2 #H elim H -f -L1 -L2 -[ #f #_ #_ #J #K #H destruct -| #f #I #L1 #L2 #_ #IH #Hf #J #K #H destruct - /4 width=3 by drops_drop, isuni_inv_next/ -| #f #I1 #I2 #L1 #L2 #HL12 #HI21 #_ #Hf #J #K #H destruct - lapply (isuni_inv_push … Hf ??) -Hf [1,2: // ] #Hf - <(drops_fwd_isid … HL12) -K // <(liftsb_fwd_isid … HI21) -I1 - /3 width=3 by drops_refl, isid_push/ -] -qed-. - -(* Basic_2A1: includes: drop_inv_FT *) -lemma drops_inv_TF: ∀f,I,L,K. ⬇*[Ⓕ, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ, f] L ≘ K.ⓘ{I}. -/2 width=3 by drops_inv_TF_aux/ qed-. - -(* Basic_2A1: includes: drop_inv_gen *) -lemma drops_inv_gen: ∀b,f,I,L,K. ⬇*[b, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ, f] L ≘ K.ⓘ{I}. -* /2 width=1 by drops_inv_TF/ -qed-. - -(* Basic_2A1: includes: drop_inv_T *) -lemma drops_inv_F: ∀b,f,I,L,K. ⬇*[Ⓕ, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[b, f] L ≘ K.ⓘ{I}. -* /2 width=1 by drops_inv_TF/ -qed-. - -(* Forward lemmas with test for uniformity **********************************) - -(* Basic_1: was: drop_S *) -(* Basic_2A1: was: drop_fwd_drop2 *) -lemma drops_isuni_fwd_drop2: ∀b,f,I,X,K. 𝐔⦃f⦄ → ⬇*[b, f] X ≘ K.ⓘ{I} → ⬇*[b, ↑f] X ≘ K. -/3 width=7 by drops_after_fwd_drop2, after_isid_isuni/ qed-. - -(* Inversion lemmas with uniform relocations ********************************) - -lemma drops_inv_atom2: ∀b,L,f. ⬇*[b, f] L ≘ ⋆ → - ∃∃n,f1. ⬇*[b, 𝐔❴n❵] L ≘ ⋆ & 𝐔❴n❵ ⊚ f1 ≘ f. -#b #L elim L -L -[ /3 width=4 by drops_atom, after_isid_sn, ex2_2_intro/ -| #L #I #IH #f #H elim (pn_split f) * #g #H0 destruct - [ elim (drops_inv_skip1 … H) -H #J #K #_ #_ #H destruct - | lapply (drops_inv_drop1 … H) -H #HL - elim (IH … HL) -IH -HL /3 width=8 by drops_drop, after_next, ex2_2_intro/ - ] -] -qed-. - -lemma drops_inv_succ: ∀L1,L2,i. ⬇*[↑i] L1 ≘ L2 → - ∃∃I,K. ⬇*[i] K ≘ L2 & L1 = K.ⓘ{I}. -#L1 #L2 #i #H elim (drops_inv_isuni … H) -H // * -[ #H elim (isid_inv_next … H) -H // -| /2 width=4 by ex2_2_intro/ -] -qed-. - -(* Properties with uniform relocations **************************************) - -lemma drops_F_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ ∨ ∃∃I,K. ⬇*[i] L ≘ K.ⓘ{I}. -#L elim L -L /2 width=1 by or_introl/ -#L #I #IH * /4 width=3 by drops_refl, ex1_2_intro, or_intror/ -#i elim (IH i) -IH /3 width=1 by drops_drop, or_introl/ -* /4 width=3 by drops_drop, ex1_2_intro, or_intror/ -qed-. - -(* Basic_2A1: includes: drop_split *) -lemma drops_split_trans: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ∀f1,f2. f1 ⊚ f2 ≘ f → 𝐔⦃f1⦄ → - ∃∃L. ⬇*[b, f1] L1 ≘ L & ⬇*[b, f2] L ≘ L2. -#b #f #L1 #L2 #H elim H -f -L1 -L2 -[ #f #H0f #f1 #f2 #Hf #Hf1 @(ex2_intro … (⋆)) @drops_atom - #H lapply (H0f H) -b - #H elim (after_inv_isid3 … Hf H) -f // -| #f #I #L1 #L2 #HL12 #IHL12 #f1 #f2 #Hf #Hf1 elim (after_inv_xxn … Hf) -Hf [1,3: * |*: // ] - [ #g1 #g2 #Hf #H1 #H2 destruct - lapply (isuni_inv_push … Hf1 ??) -Hf1 [1,2: // ] #Hg1 - elim (IHL12 … Hf) -f - /4 width=5 by drops_drop, drops_skip, liftsb_refl, isuni_isid, ex2_intro/ - | #g1 #Hf #H destruct elim (IHL12 … Hf) -f - /3 width=5 by ex2_intro, drops_drop, isuni_inv_next/ - ] -| #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 #f1 #f2 #Hf #Hf1 elim (after_inv_xxp … Hf) -Hf [2,3: // ] - #g1 #g2 #Hf #H1 #H2 destruct elim (liftsb_split_trans … HI21 … Hf) -HI21 - elim (IHL12 … Hf) -f /3 width=5 by ex2_intro, drops_skip, isuni_fwd_push/ -] -qed-. - -lemma drops_split_div: ∀b,f1,L1,L. ⬇*[b, f1] L1 ≘ L → ∀f2,f. f1 ⊚ f2 ≘ f → 𝐔⦃f2⦄ → - ∃∃L2. ⬇*[Ⓕ, f2] L ≘ L2 & ⬇*[Ⓕ, f] L1 ≘ L2. -#b #f1 #L1 #L #H elim H -f1 -L1 -L -[ #f1 #Hf1 #f2 #f #Hf #Hf2 @(ex2_intro … (⋆)) @drops_atom #H destruct -| #f1 #I #L1 #L #HL1 #IH #f2 #f #Hf #Hf2 elim (after_inv_nxx … Hf) -Hf [2,3: // ] - #g #Hg #H destruct elim (IH … Hg) -IH -Hg /3 width=5 by drops_drop, ex2_intro/ -| #f1 #I1 #I #L1 #L #HL1 #HI1 #IH #f2 #f #Hf #Hf2 - elim (after_inv_pxx … Hf) -Hf [1,3: * |*: // ] - #g2 #g #Hg #H2 #H0 destruct - [ lapply (isuni_inv_push … Hf2 ??) -Hf2 [1,2: // ] #Hg2 -IH - lapply (after_isid_inv_dx … Hg … Hg2) -Hg #Hg - /5 width=7 by drops_eq_repl_back, drops_F, drops_refl, drops_skip, liftsb_eq_repl_back, isid_push, ex2_intro/ - | lapply (isuni_inv_next … Hf2 ??) -Hf2 [1,2: // ] #Hg2 -HL1 -HI1 - elim (IH … Hg) -f1 /3 width=3 by drops_drop, ex2_intro/ - ] -] -qed-. - -(* Properties with application **********************************************) - -lemma drops_tls_at: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → - ∀b,L1,L2. ⬇*[b,⫱*[i2]f] L1 ≘ L2 → - ⬇*[b,⫯⫱*[↑i2]f] L1 ≘ L2. -/3 width=3 by drops_eq_repl_fwd, at_inv_tls/ qed-. - -lemma drops_split_trans_bind2: ∀b,f,I,L,K0. ⬇*[b, f] L ≘ K0.ⓘ{I} → ∀i. @⦃O, f⦄ ≘ i → - ∃∃J,K. ⬇*[i]L ≘ K.ⓘ{J} & ⬇*[b, ⫱*[↑i]f] K ≘ K0 & ⬆*[⫱*[↑i]f] I ≘ J. -#b #f #I #L #K0 #H #i #Hf -elim (drops_split_trans … H) -H [ |5: @(after_uni_dx … Hf) |2,3: skip ] /2 width=1 by after_isid_dx/ #Y #HLY #H -lapply (drops_tls_at … Hf … H) -H #H -elim (drops_inv_skip2 … H) -H #J #K #HK0 #HIJ #H destruct -/3 width=5 by drops_inv_gen, ex3_2_intro/ -qed-. - -(* Properties with context-sensitive equivalence for terms ******************) - -lemma ceq_lift_sn: d_liftable2_sn … liftsb ceq_ext. -#K #I1 #I2 #H <(ceq_ext_inv_eq … H) -I2 -/2 width=3 by ex2_intro/ qed-. - -lemma ceq_inv_lift_sn: d_deliftable2_sn … liftsb ceq_ext. -#L #J1 #J2 #H <(ceq_ext_inv_eq … H) -J2 -/2 width=3 by ex2_intro/ qed-. - -(* Note: d_deliftable2_sn cfull does not hold *) -lemma cfull_lift_sn: d_liftable2_sn … liftsb cfull. -#K #I1 #I2 #_ #b #f #L #_ #J1 #_ -K -I1 -b -elim (liftsb_total I2 f) /2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: removed theorems 12: - drops_inv_nil drops_inv_cons d1_liftable_liftables - drop_refl_atom_O2 drop_inv_pair1 - drop_inv_Y1 drop_Y1 drop_O_Y drop_fwd_Y2 - drop_fwd_length_minus2 drop_fwd_length_minus4 -*) -(* Basic_1: removed theorems 53: - drop1_gen_pnil drop1_gen_pcons drop1_getl_trans - drop_ctail drop_skip_flat - cimp_flat_sx cimp_flat_dx cimp_bind cimp_getl_conf - drop_clear drop_clear_O drop_clear_S - clear_gen_sort clear_gen_bind clear_gen_flat clear_gen_flat_r - clear_gen_all clear_clear clear_mono clear_trans clear_ctail clear_cle - getl_ctail_clen getl_gen_tail clear_getl_trans getl_clear_trans - getl_clear_bind getl_clear_conf getl_dec getl_drop getl_drop_conf_lt - getl_drop_conf_ge getl_conf_ge_drop getl_drop_conf_rev - drop_getl_trans_lt drop_getl_trans_le drop_getl_trans_ge - getl_drop_trans getl_flt getl_gen_all getl_gen_sort getl_gen_O - getl_gen_S getl_gen_2 getl_gen_flat getl_gen_bind getl_conf_le - getl_trans getl_refl getl_head getl_flat getl_ctail getl_mono -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_cext2.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_cext2.ma deleted file mode 100644 index f2a857d64..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_cext2.ma +++ /dev/null @@ -1,29 +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/relocation/drops.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Properties with the extension to binders of a context-sensitive relation *) - -lemma cext2_d_liftable2_sn: ∀R. d_liftable2_sn … lifts R → - d_liftable2_sn … liftsb (cext2 R). -#R #HR #K #I1 #I2 * -I1 -I2 #I [| #T1 #T2 #HT12 ] -#b #f #L #HLK #Z1 #H -[ lapply (liftsb_inv_unit_sn … H) -| lapply (liftsb_inv_pair_sn … H) * #U1 #HTU1 -] -H #H destruct /3 width=3 by ext2_unit, ex2_intro/ -elim (HR … HT12 … HLK … HTU1) -HR -b -K -T1 /3 width=3 by ext2_pair, ex2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_ctc.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_ctc.ma deleted file mode 100644 index de5d1ce48..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_ctc.ma +++ /dev/null @@ -1,72 +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 "ground_2/lib/star.ma". -include "basic_2/relocation/seq_seq.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Properties with contextual transitive closure ****************************) - -(* Basic_2A1: was: d_liftable_LTC *) -lemma d2_liftable_sn_CTC: ∀C,S,R. d_liftable2_sn C S R → d_liftable2_sn C S (CTC … R). -#C #S #R #HR #K #T1 #T2 #H elim H -T2 -[ #T2 #HT12 #b #f #L #HLK #U1 #HTU1 - elim (HR … HT12 … HLK … HTU1) /3 width=3 by inj, ex2_intro/ -| #T #T2 #_ #HT2 #IHT1 #b #f #L #HLK #U1 #HTU1 - elim (IHT1 … HLK … HTU1) -T1 #U #HTU #HU1 - elim (HR … HT2 … HLK … HTU) -HR -K -T /3 width=5 by step, ex2_intro/ -] -qed-. - -(* Basic_2A1: was: d_deliftable_sn_LTC *) -lemma d2_deliftable_sn_CTC: ∀C,S,R. d_deliftable2_sn C S R → d_deliftable2_sn C S (CTC … R). -#C #S #R #HR #L #U1 #U2 #H elim H -U2 -[ #U2 #HU12 #b #f #K #HLK #T1 #HTU1 - elim (HR … HU12 … HLK … HTU1) -HR -L -U1 /3 width=3 by inj, ex2_intro/ -| #U #U2 #_ #HU2 #IHU1 #b #f #K #HLK #T1 #HTU1 - elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 - elim (HR … HU2 … HLK … HTU) -HR -L -U /3 width=5 by step, ex2_intro/ -] -qed-. - -lemma co_dropable_sn_CTC: ∀R. co_dropable_sn R → co_dropable_sn (CTC … R). -#R #HR #b #f #L1 #K1 #HLK1 #Hf #f2 #L2 #H elim H -L2 -[ #L2 #HL12 #f1 #H elim (HR … HLK1 … Hf … HL12 … H) -HR -Hf -f2 -L1 - /3 width=3 by inj, ex2_intro/ -| #L #L2 #_ #HL2 #IH #f1 #H elim (IH … H) -IH - #K #HK1 #HLK elim (HR … HLK … HL2 … H) -HR -f2 -L - /3 width=3 by step, ex2_intro/ -] -qed-. - -lemma co_dropable_dx_CTC: ∀R. co_dropable_dx R → co_dropable_dx (CTC … R). -#R #HR #f2 #L1 #L2 #H elim H -L2 -[ #L2 #HL12 #b #f #K2 #HLK2 #Hf #f1 #Hf2 elim (HR … HL12 … HLK2 … Hf … Hf2) -HR -Hf -f2 -L2 - /3 width=3 by inj, ex2_intro/ -| #L #L2 #_ #HL2 #IHL1 #b #f #K2 #HLK2 #Hf #f1 #Hf2 elim (HR … HL2 … HLK2 … Hf … Hf2) -HR -L2 - #K #HLK #HK2 elim (IHL1 … HLK … Hf … Hf2) -Hf -f2 -L - /3 width=5 by step, ex2_intro/ -] -qed-. - -lemma co_dedropable_sn_CTC: ∀R. co_dedropable_sn R → co_dedropable_sn (CTC … R). -#R #HR #b #f #L1 #K1 #HLK1 #f1 #K2 #H elim H -K2 -[ #K2 #HK12 #f2 #Hf elim (HR … HLK1 … HK12 … Hf) -HR -f1 -K1 - /3 width=4 by inj, ex3_intro/ -| #K #K2 #_ #HK2 #IH #f2 #Hf elim (IH … Hf) -IH -K1 - #L #H1L1 #HLK #H2L1 elim (HR … HLK … HK2 … Hf) -HR -f1 -K - /3 width=6 by seq_trans, step, ex3_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_drops.ma deleted file mode 100644 index 8549cf02a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_drops.ma +++ /dev/null @@ -1,133 +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/relocation/lifts_lifts_bind.ma". -include "basic_2/relocation/drops_weight.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Main properties **********************************************************) - -(* Basic_2A1: includes: drop_conf_ge drop_conf_be drop_conf_le *) -theorem drops_conf: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L → - ∀b2,f,L2. ⬇*[b2, f] L1 ≘ L2 → - ∀f2. f1 ⊚ f2 ≘ f → ⬇*[b2, f2] L ≘ L2. -#b1 #f1 #L1 #L #H elim H -f1 -L1 -L -[ #f1 #_ #b2 #f #L2 #HL2 #f2 #Hf12 elim (drops_inv_atom1 … HL2) -b1 -HL2 - #H #Hf destruct @drops_atom - #H elim (after_inv_isid3 … Hf12) -Hf12 /2 width=1 by/ -| #f1 #I1 #K1 #K #_ #IH #b2 #f #L2 #HL2 #f2 #Hf elim (after_inv_nxx … Hf) -Hf [2,3: // ] - #g #Hg #H destruct /3 width=3 by drops_inv_drop1/ -| #f1 #I1 #I #K1 #K #_ #HI1 #IH #b2 #f #L2 #HL2 #f2 #Hf elim (after_inv_pxx … Hf) -Hf [1,3: * |*:// ] - #g2 #g #Hf #H1 #H2 destruct - [ elim (drops_inv_skip1 … HL2) -HL2 /3 width=6 by drops_skip, liftsb_div3/ - | /4 width=3 by drops_inv_drop1, drops_drop/ - ] -] -qed-. - -(* Basic_1: was: drop1_trans *) -(* Basic_2A1: includes: drop_trans_ge drop_trans_le drop_trans_ge_comm - drops_drop_trans -*) -theorem drops_trans: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L → - ∀b2,f2,L2. ⬇*[b2, f2] L ≘ L2 → - ∀f. f1 ⊚ f2 ≘ f → ⬇*[b1∧b2, f] L1 ≘ L2. -#b1 #f1 #L1 #L #H elim H -f1 -L1 -L -[ #f1 #Hf1 #b2 #f2 #L2 #HL2 #f #Hf elim (drops_inv_atom1 … HL2) -HL2 - #H #Hf2 destruct @drops_atom #H elim (andb_inv_true_dx … H) -H - #H1 #H2 lapply (after_isid_inv_sn … Hf ?) -Hf - /3 width=3 by isid_eq_repl_back/ -| #f1 #I1 #K1 #K #_ #IH #b2 #f2 #L2 #HL2 #f #Hf elim (after_inv_nxx … Hf) -Hf - /3 width=3 by drops_drop/ -| #f1 #I1 #I #K1 #K #_ #HI1 #IH #b2 #f2 #L2 #HL2 #f #Hf elim (after_inv_pxx … Hf) -Hf [1,3: * |*: // ] - #g2 #g #Hg #H1 #H2 destruct - [ elim (drops_inv_skip1 … HL2) -HL2 /3 width=6 by drops_skip, liftsb_trans/ - | /4 width=3 by drops_inv_drop1, drops_drop/ - ] -] -qed-. - -theorem drops_conf_div: ∀f1,L,K. ⬇*[Ⓣ,f1] L ≘ K → ∀f2. ⬇*[Ⓣ,f2] L ≘ K → - 𝐔⦃f1⦄ → 𝐔⦃f2⦄ → f1 ≡ f2. -#f1 #L #K #H elim H -f1 -L -K -[ #f1 #Hf1 #f2 #Hf2 elim (drops_inv_atom1 … Hf2) -Hf2 - /3 width=1 by isid_inv_eq_repl/ -| #f1 #I #L #K #Hf1 #IH #f2 elim (pn_split f2) * - #g2 #H2 #Hf2 #HU1 #HU2 destruct - [ elim (drops_inv_skip1 … Hf2) -IH -HU1 -Hf2 #Y2 #X2 #HY2 #_ #H destruct - lapply (drops_fwd_isid … HY2 ?) -HY2 /2 width=3 by isuni_inv_push/ -HU2 - #H destruct elim (drops_inv_x_bind_xy … Hf1) - | /4 width=5 by drops_inv_drop1, isuni_inv_next, eq_next/ - ] -| #f1 #I1 #I2 #L #K #Hf1 #_ #IH #f2 elim (pn_split f2) * - #g2 #H2 #Hf2 #HU1 #HU2 destruct - [ elim (drops_inv_skip1 … Hf2) -Hf2 #Y2 #X2 #HY2 #_ #H destruct -Hf1 - /4 width=5 by isuni_fwd_push, eq_push/ - | lapply (drops_inv_drop1 … Hf2) -Hf2 -IH -HU2 #Hg2 - lapply (drops_fwd_isid … Hf1 ?) -Hf1 /2 width=3 by isuni_inv_push/ -HU1 - #H destruct elim (drops_inv_x_bind_xy … Hg2) - ] -] -qed-. - -(* Advanced properties ******************************************************) - -(* Basic_2A1: includes: drop_mono *) -lemma drops_mono: ∀b1,f,L,L1. ⬇*[b1, f] L ≘ L1 → - ∀b2,L2. ⬇*[b2, f] L ≘ L2 → L1 = L2. -#b1 #f #L #L1 lapply (after_isid_dx 𝐈𝐝 … f) -/3 width=8 by drops_conf, drops_fwd_isid/ -qed-. - -(* Basic_2A1: includes: drop_conf_lt *) -lemma drops_conf_skip1: ∀b2,f,L,L2. ⬇*[b2, f] L ≘ L2 → - ∀b1,f1,I1,K1. ⬇*[b1, f1] L ≘ K1.ⓘ{I1} → - ∀f2. f1 ⊚ ⫯f2 ≘ f → - ∃∃I2,K2. L2 = K2.ⓘ{I2} & - ⬇*[b2, f2] K1 ≘ K2 & ⬆*[f2] I2 ≘ I1. -#b2 #f #L #L2 #H2 #b1 #f1 #I1 #K1 #H1 #f2 #Hf lapply (drops_conf … H1 … H2 … Hf) -L -Hf -#H elim (drops_inv_skip1 … H) -H /2 width=5 by ex3_2_intro/ -qed-. - -(* Basic_2A1: includes: drop_trans_lt *) -lemma drops_trans_skip2: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L → - ∀b2,f2,I2,K2. ⬇*[b2, f2] L ≘ K2.ⓘ{I2} → - ∀f. f1 ⊚ f2 ≘ ⫯f → - ∃∃I1,K1. L1 = K1.ⓘ{I1} & - ⬇*[b1∧b2, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1. -#b1 #f1 #L1 #L #H1 #b2 #f2 #I2 #K2 #H2 #f #Hf -lapply (drops_trans … H1 … H2 … Hf) -L -Hf -#H elim (drops_inv_skip2 … H) -H /2 width=5 by ex3_2_intro/ -qed-. - -(* Basic_2A1: includes: drops_conf_div *) -lemma drops_conf_div_bind: ∀f1,f2,I1,I2,L,K. - ⬇*[Ⓣ, f1] L ≘ K.ⓘ{I1} → ⬇*[Ⓣ, f2] L ≘ K.ⓘ{I2} → - 𝐔⦃f1⦄ → 𝐔⦃f2⦄ → f1 ≡ f2 ∧ I1 = I2. -#f1 #f2 #I1 #I2 #L #K #Hf1 #Hf2 #HU1 #HU2 -lapply (drops_isuni_fwd_drop2 … Hf1) // #H1 -lapply (drops_isuni_fwd_drop2 … Hf2) // #H2 -lapply (drops_conf_div … H1 … H2 ??) /2 width=3 by isuni_next/ -H1 -H2 -HU1 -HU2 #H -lapply (eq_inv_nn … H ????) -H [5: |*: // ] #H12 -lapply (drops_eq_repl_back … Hf1 … H12) -Hf1 #H0 -lapply (drops_mono … H0 … Hf2) -L #H -destruct /2 width=1 by conj/ -qed-. - -lemma drops_inv_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ → ∀I,K. ⬇*[i] L ≘ K.ⓘ{I} → ⊥. -#L #i #H1 #I #K #H2 -lapply (drops_F … H2) -H2 #H2 -lapply (drops_mono … H2 … H1) -L -i #H destruct -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_length.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_length.ma deleted file mode 100644 index 7543a5559..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_length.ma +++ /dev/null @@ -1,125 +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/syntax/lenv_length.ma". -include "basic_2/relocation/drops.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Forward lemmas with length for local environments ************************) - -(* Basic_2A1: includes: drop_fwd_length_le4 *) -lemma drops_fwd_length_le4: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → |L2| ≤ |L1|. -#b #f #L1 #L2 #H elim H -f -L1 -L2 /2 width=1 by le_S, le_S_S/ -qed-. - -(* Basic_2A1: includes: drop_fwd_length_eq1 *) -theorem drops_fwd_length_eq1: ∀b1,b2,f,L1,K1. ⬇*[b1, f] L1 ≘ K1 → - ∀L2,K2. ⬇*[b2, f] L2 ≘ K2 → - |L1| = |L2| → |K1| = |K2|. -#b1 #b2 #f #L1 #K1 #HLK1 elim HLK1 -f -L1 -K1 -[ #f #_ #L2 #K2 #HLK2 #H lapply (length_inv_zero_sn … H) -H - #H destruct elim (drops_inv_atom1 … HLK2) -HLK2 // -| #f #I1 #L1 #K1 #_ #IH #X2 #K2 #HX #H elim (length_inv_succ_sn … H) -H - #I2 #L2 #H12 #H destruct lapply (drops_inv_drop1 … HX) -HX - #HLK2 @(IH … HLK2 H12) (**) (* auto fails *) -| #f #I1 #I2 #L1 #K1 #_ #_ #IH #X2 #Y2 #HX #H elim (length_inv_succ_sn … H) -H - #I2 #L2 #H12 #H destruct elim (drops_inv_skip1 … HX) -HX - #I2 #K2 #HLK2 #_ #H destruct - lapply (IH … HLK2 H12) -f >length_bind >length_bind /2 width=1 by/ (**) (* full auto fails *) -] -qed-. - -(* forward lemmas with finite colength assignment ***************************) - -lemma drops_fwd_fcla: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → - ∃∃n. 𝐂⦃f⦄ ≘ n & |L1| = |L2| + n. -#f #L1 #L2 #H elim H -f -L1 -L2 -[ /4 width=3 by fcla_isid, ex2_intro/ -| #f #I #L1 #L2 #_ * >length_bind /3 width=3 by fcla_next, ex2_intro, eq_f/ -| #f #I1 #I2 #L1 #L2 #_ #_ * >length_bind >length_bind /3 width=3 by fcla_push, ex2_intro/ -] -qed-. - -(* Basic_2A1: includes: drop_fwd_length *) -lemma drops_fcla_fwd: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → - |L1| = |L2| + n. -#f #l1 #l2 #n #Hf #Hn elim (drops_fwd_fcla … Hf) -Hf -#k #Hm #H <(fcla_mono … Hm … Hn) -f // -qed-. - -lemma drops_fwd_fcla_le2: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → - ∃∃n. 𝐂⦃f⦄ ≘ n & n ≤ |L1|. -#f #L1 #L2 #H elim (drops_fwd_fcla … H) -H /2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: includes: drop_fwd_length_le2 *) -lemma drops_fcla_fwd_le2: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → - n ≤ |L1|. -#f #L1 #L2 #n #H #Hn elim (drops_fwd_fcla_le2 … H) -H -#k #Hm #H <(fcla_mono … Hm … Hn) -f // -qed-. - -lemma drops_fwd_fcla_lt2: ∀f,L1,I2,K2. ⬇*[Ⓣ, f] L1 ≘ K2.ⓘ{I2} → - ∃∃n. 𝐂⦃f⦄ ≘ n & n < |L1|. -#f #L1 #I2 #K2 #H elim (drops_fwd_fcla … H) -H -#n #Hf #H >H -L1 /3 width=3 by le_S_S, ex2_intro/ -qed-. - -(* Basic_2A1: includes: drop_fwd_length_lt2 *) -lemma drops_fcla_fwd_lt2: ∀f,L1,I2,K2,n. - ⬇*[Ⓣ, f] L1 ≘ K2.ⓘ{I2} → 𝐂⦃f⦄ ≘ n → - n < |L1|. -#f #L1 #I2 #K2 #n #H #Hn elim (drops_fwd_fcla_lt2 … H) -H -#k #Hm #H <(fcla_mono … Hm … Hn) -f // -qed-. - -(* Basic_2A1: includes: drop_fwd_length_lt4 *) -lemma drops_fcla_fwd_lt4: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → 0 < n → - |L2| < |L1|. -#f #L1 #L2 #n #H #Hf #Hn lapply (drops_fcla_fwd … H Hf) -f -/2 width=1 by lt_minus_to_plus_r/ qed-. - -(* Basic_2A1: includes: drop_inv_length_eq *) -lemma drops_inv_length_eq: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → |L1| = |L2| → 𝐈⦃f⦄. -#f #L1 #L2 #H #HL12 elim (drops_fwd_fcla … H) -H -#n #Hn H1 -L1 -elim (drops_fwd_fcla … HLK2) -HLK2 #n2 #Hn2 #H2 >H2 -L2 -<(fcla_mono … Hn2 … Hn1) -f // -qed-. - -theorem drops_conf_div: ∀f1,f2,L1,L2. ⬇*[Ⓣ, f1] L1 ≘ L2 → ⬇*[Ⓣ, f2] L1 ≘ L2 → - ∃∃n. 𝐂⦃f1⦄ ≘ n & 𝐂⦃f2⦄ ≘ n. -#f1 #f2 #L1 #L2 #H1 #H2 -elim (drops_fwd_fcla … H1) -H1 #n1 #Hf1 #H1 -elim (drops_fwd_fcla … H2) -H2 #n2 #Hf2 >H1 -L1 #H -lapply (injective_plus_r … H) -L2 #H destruct /2 width=3 by ex2_intro/ -qed-. - -theorem drops_conf_div_fcla: ∀f1,f2,L1,L2,n1,n2. - ⬇*[Ⓣ, f1] L1 ≘ L2 → ⬇*[Ⓣ, f2] L1 ≘ L2 → 𝐂⦃f1⦄ ≘ n1 → 𝐂⦃f2⦄ ≘ n2 → - n1 = n2. -#f1 #f2 #L1 #L2 #n1 #n2 #Hf1 #Hf2 #Hn1 #Hn2 -lapply (drops_fcla_fwd … Hf1 Hn1) -f1 #H1 -lapply (drops_fcla_fwd … Hf2 Hn2) -f2 >H1 -L1 -/2 width=1 by injective_plus_r/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_lex.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_lex.ma deleted file mode 100644 index 793ed1810..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_lex.ma +++ /dev/null @@ -1,83 +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/relocation/lex.ma". -include "basic_2/relocation/drops_cext2.ma". -include "basic_2/relocation/drops_sex.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -definition dedropable_sn: predicate … ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀K2. K1 ⪤[R] K2 → - ∃∃L2. L1 ⪤[R] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. - -definition dropable_sn: predicate … ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → ∀L2. L1 ⪤[R] L2 → - ∃∃K2. K1 ⪤[R] K2 & ⬇*[b, f] L2 ≘ K2. - -definition dropable_dx: predicate … ≝ - λR. ∀L1,L2. L1 ⪤[R] L2 → ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → - ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[R] K2. - -(* Properties with generic extension ****************************************) - -(* Basic_2A1: was: lpx_sn_liftable_dedropable *) -lemma lex_liftable_dedropable_sn (R): c_reflexive … R → - d_liftable2_sn … lifts R → dedropable_sn R. -#R #H1R #H2R #b #f #L1 #K1 #HLK1 #K2 * #f1 #Hf1 #HK12 -elim (sex_liftable_co_dedropable_sn … HLK1 … HK12) -K1 -/3 width=6 by cext2_d_liftable2_sn, cfull_lift_sn, ext2_refl, coafter_isid_dx, ex3_intro, ex2_intro/ -qed-. - -(* Inversion lemmas with generic extension **********************************) - -(* Basic_2A1: was: lpx_sn_deliftable_dropable *) -lemma lex_dropable_sn (R): dropable_sn R. -#R #b #f #L1 #K1 #HLK1 #H1f #L2 * #f2 #Hf2 #HL12 -elim (sex_co_dropable_sn … HLK1 … HL12) -L1 -/3 width=3 by coafter_isid_dx, ex2_intro/ -qed-. - -(* Basic_2A1: was: lpx_sn_dropable *) -lemma lex_dropable_dx (R): dropable_dx R. -#R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #K2 #HLK2 #Hf -elim (sex_co_dropable_dx … HL12 … HLK2) -L2 -/3 width=5 by coafter_isid_dx, ex2_intro/ -qed-. - -(* Basic_2A1: includes: lpx_sn_drop_conf *) -lemma lex_drops_conf_pair (R): ∀L1,L2. L1 ⪤[R] L2 → - ∀b,f,I,K1,V1. ⬇*[b, f] L1 ≘ K1.ⓑ{I}V1 → 𝐔⦃f⦄ → - ∃∃K2,V2. ⬇*[b, f] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R] K2 & R K1 V1 V2. -#R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #I #K1 #V1 #HLK1 #Hf -elim (sex_drops_conf_push … HL12 … HLK1 Hf f2) -L1 -Hf -[ #Z2 #K2 #HLK2 #HK12 #H - elim (ext2_inv_pair_sn … H) -H #V2 #HV12 #H destruct - /3 width=5 by ex3_2_intro, ex2_intro/ -| /3 width=3 by coafter_isid_dx, isid_push/ -] -qed-. - -(* Basic_2A1: includes: lpx_sn_drop_trans *) -lemma lex_drops_trans_pair (R): ∀L1,L2. L1 ⪤[R] L2 → - ∀b,f,I,K2,V2. ⬇*[b, f] L2 ≘ K2.ⓑ{I}V2 → 𝐔⦃f⦄ → - ∃∃K1,V1. ⬇*[b, f] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R] K2 & R K1 V1 V2. -#R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #I #K2 #V2 #HLK2 #Hf -elim (sex_drops_trans_push … HL12 … HLK2 Hf f2) -L2 -Hf -[ #Z1 #K1 #HLK1 #HK12 #H - elim (ext2_inv_pair_dx … H) -H #V1 #HV12 #H destruct - /3 width=5 by ex3_2_intro, ex2_intro/ -| /3 width=3 by coafter_isid_dx, isid_push/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_ltc.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_ltc.ma deleted file mode 100644 index 62ae1ecc6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_ltc.ma +++ /dev/null @@ -1,95 +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 "ground_2/lib/ltc.ma". -include "basic_2/relocation/seq_seq.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Properties with labeled transitive closure *******************************) - -lemma d2_liftable_sn_ltc: ∀A,f. associative … f → - ∀C,S,R. (∀n. d_liftable2_sn C S (λL. R L n)) → - ∀n. d_liftable2_sn C S (λL. ltc A f … (R L) n). -#A #g #Hg #C #S #R #HR #n #K #T1 #T2 #H -@(ltc_ind_dx … Hg ???? H) -n -T2 -[ #n #T2 #HT12 #b #g #L #HLK #U1 #HTU1 - elim (HR … HT12 … HLK … HTU1) -b -K -T1 -HR - /3 width=3 by ltc_rc, ex2_intro/ -| #n1 #n2 #T #T2 #_ #IHT1 #HT2 #b #f #L #HLK #U1 #HTU1 - elim (IHT1 … HLK … HTU1) -T1 #U #HTU #HU1 - elim (HR … HT2 … HLK … HTU) -HR -K -T - /3 width=5 by ltc_dx, ex2_intro/ -] -qed-. - -lemma d2_deliftable_sn_ltc: ∀A,f. associative … f → - ∀C,S,R. (∀n. d_deliftable2_sn C S (λL. R L n)) → - ∀n. d_deliftable2_sn C S (λL. ltc A f … (R L) n). -#A #g #Hg #C #S #R #HR #n #L #U1 #U2 #H -@(ltc_ind_dx … Hg ???? H) -n -U2 -[ #n #U2 #HU12 #b #g #K #HLK #T1 #HTU1 - elim (HR … HU12 … HLK … HTU1) -b -L -U1 -HR - /3 width=3 by ltc_rc, ex2_intro/ -| #n1 #n2 #U #U2 #_ #IHU1 #HU2 #b #f #K #HLK #T1 #HTU1 - elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 - elim (HR … HU2 … HLK … HTU) -L -U -HR - /3 width=5 by ltc_dx, ex2_intro/ -] -qed-. - -lemma co_dropable_sn_ltc: ∀A,f. associative … f → - ∀R. (∀n. co_dropable_sn (λL. R L n)) → - ∀n. co_dropable_sn (λL. ltc A f … (R L) n). -#A #g #Hg #R #HR #n #b #f #L1 #K1 #HLK1 #Hf #f2 #L2 #H -@(ltc_ind_dx … Hg ???? H) -n -L2 -[ #n #L2 #HL12 #g1 #H - elim (HR … HLK1 … Hf … HL12 … H) -f2 -L1 -HR -Hf - /3 width=3 by ltc_rc, ex2_intro/ -| #n1 #n2 #L #L2 #_ #IH #HL2 #f1 #H - elim (IH … H) -IH #K #HK1 #HLK - elim (HR … HLK … HL2 … H) -f2 -L -HR - /3 width=3 by ltc_dx, ex2_intro/ -] -qed-. - -lemma co_dropable_dx_ltc: ∀A,f. associative … f → - ∀R. (∀n. co_dropable_dx (λL. R L n)) → - ∀n. co_dropable_dx (λL. ltc A f … (R L) n). -#A #g #Hg #R #HR #n #f2 #L1 #L2 #H -@(ltc_ind_dx … Hg ???? H) -n -L2 -[ #n #L2 #HL12 #b #f #K2 #HLK2 #Hf #f1 #Hf2 - elim (HR … HL12 … HLK2 … Hf … Hf2) -f2 -L2 -HR -Hf - /3 width=3 by ltc_rc, ex2_intro/ -| #n1 #n2 #L #L2 #_ #IHL1 #HL2 #b #f #K2 #HLK2 #Hf #f1 #Hf2 - elim (HR … HL2 … HLK2 … Hf … Hf2) -L2 -HR #K #HLK #HK2 - elim (IHL1 … HLK … Hf … Hf2) -Hf -f2 -L - /3 width=5 by ltc_dx, ex2_intro/ -] -qed-. - -lemma co_dedropable_sn_ltc: ∀A,f. associative … f → - ∀R. (∀n. co_dedropable_sn (λL. R L n)) → - ∀n. co_dedropable_sn (λL. ltc A f … (R L) n). -#A #g #Hg #R #HR #n #b #f #L1 #K1 #HLK1 #f1 #K2 #H -@(ltc_ind_dx … Hg ???? H) -n -K2 -[ #n #K2 #HK12 #f2 #Hf - elim (HR … HLK1 … HK12 … Hf) -f1 -K1 -HR - /3 width=4 by ltc_rc, ex3_intro/ -| #n1 #n2 #K #K2 #_ #IH #HK2 #f2 #Hf - elim (IH … Hf) -K1 -IH #L #H1L1 #HLK #H2L1 - elim (HR … HLK … HK2 … Hf) -f1 -K -HR - /3 width=6 by seq_trans, ltc_dx, ex3_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_seq.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_seq.ma deleted file mode 100644 index a722d46e7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_seq.ma +++ /dev/null @@ -1,61 +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/relocation/drops_sex.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Properties with syntactic equivalence for selected local environments ****) - -lemma seq_co_dedropable_sn: co_dedropable_sn seq. -@sex_liftable_co_dedropable_sn -/2 width=6 by cfull_lift_sn, ceq_lift_sn/ qed-. - -lemma seq_co_dropable_sn: co_dropable_sn seq. -@sex_co_dropable_sn qed-. - -lemma seq_co_dropable_dx: co_dropable_dx seq. -@sex_co_dropable_dx qed-. - -(* Basic_2A1: includes: lreq_drop_trans_be *) -lemma seq_drops_trans_next: ∀f2,L1,L2. L1 ≡[f2] L2 → - ∀b,f,I,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} → 𝐔⦃f⦄ → - ∀f1. f ~⊚ ↑f1 ≘ f2 → - ∃∃K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} & K1 ≡[f1] K2. -#f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2 -elim (sex_drops_trans_next … HL12 … HLK2 Hf … Hf2) -f2 -L2 -Hf -#I1 #K1 #HLK1 #HK12 #H <(ceq_ext_inv_eq … H) -I2 -/2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: includes: lreq_drop_conf_be *) -lemma seq_drops_conf_next: ∀f2,L1,L2. L1 ≡[f2] L2 → - ∀b,f,I,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} → 𝐔⦃f⦄ → - ∀f1. f ~⊚ ↑f1 ≘ f2 → - ∃∃K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} & K1 ≡[f1] K2. -#f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2 -elim (seq_drops_trans_next … (seq_sym … HL12) … HLK1 … Hf2) // -f2 -L1 -Hf -/3 width=3 by seq_sym, ex2_intro/ -qed-. - -lemma drops_seq_trans_next: ∀f1,K1,K2. K1 ≡[f1] K2 → - ∀b,f,I,L1. ⬇*[b, f] L1.ⓘ{I} ≘ K1 → - ∀f2. f ~⊚ f1 ≘ ↑f2 → - ∃∃L2. ⬇*[b, f] L2.ⓘ{I} ≘ K2 & L1 ≡[f2] L2 & L1.ⓘ{I} ≡[f] L2.ⓘ{I}. -#f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2 -elim (drops_sex_trans_next … HK12 … HLK1 … Hf2) -f1 -K1 -/2 width=6 by cfull_lift_sn, ceq_lift_sn/ -#I2 #L2 #HLK2 #HL12 #H >(ceq_ext_inv_eq … H) -I1 -/2 width=4 by ex3_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_sex.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_sex.ma deleted file mode 100644 index 5f5dfdb3c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_sex.ma +++ /dev/null @@ -1,187 +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/relocation/lifts_lifts_bind.ma". -include "basic_2/relocation/drops.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Properties with entrywise extension of context-sensitive relations *******) - -(**) (* changed after commit 13218 *) -lemma sex_co_dropable_sn: ∀RN,RP. co_dropable_sn (sex RN RP). -#RN #RP #b #f #L1 #K1 #H elim H -f -L1 -K1 -[ #f #Hf #_ #f2 #X #H #f1 #Hf2 >(sex_inv_atom1 … H) -X - /4 width=3 by sex_atom, drops_atom, ex2_intro/ -| #f #I1 #L1 #K1 #_ #IH #Hf #f2 #X #H #f1 #Hf2 - elim (coafter_inv_nxx … Hf2) -Hf2 [2,3: // ] #g2 #Hg2 #H2 destruct - elim (sex_inv_push1 … H) -H #I2 #L2 #HL12 #HI12 #H destruct - elim (IH … HL12 … Hg2) -g2 - /3 width=3 by isuni_inv_next, drops_drop, ex2_intro/ -| #f #I1 #J1 #L1 #K1 #HLK #HJI1 #IH #Hf #f2 #X #H #f1 #Hf2 - lapply (isuni_inv_push … Hf ??) -Hf [3: |*: // ] #Hf - lapply (drops_fwd_isid … HLK … Hf) -HLK #H0 destruct - lapply (liftsb_fwd_isid … HJI1 … Hf) -HJI1 #H0 destruct - elim (coafter_inv_pxx … Hf2) -Hf2 [1,3:* |*: // ] #g1 #g2 #Hg2 #H1 #H2 destruct - [ elim (sex_inv_push1 … H) | elim (sex_inv_next1 … H) ] -H #I2 #L2 #HL12 #HI12 #H destruct - elim (IH … HL12 … Hg2) -g2 -IH /2 width=1 by isuni_isid/ #K2 #HK12 #HLK2 - lapply (drops_fwd_isid … HLK2 … Hf) -HLK2 #H0 destruct - /4 width=3 by drops_refl, sex_next, sex_push, isid_push, ex2_intro/ -] -qed-. - -lemma sex_liftable_co_dedropable_bi: ∀RN,RP. d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → - ∀f2,L1,L2. L1 ⪤[cfull, RP, f2] L2 → ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 → - ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → - f ~⊚ f1 ≘ f2 → L1 ⪤[RN, RP, f2] L2. -#RN #RP #HRN #HRP #f2 #L1 #L2 #H elim H -f2 -L1 -L2 // -#g2 #I1 #I2 #L1 #L2 #HL12 #HI12 #IH #f1 #Y1 #Y2 #HK12 #b #f #HY1 #HY2 #H -[ elim (coafter_inv_xxn … H) [ |*: // ] -H #g #g1 #Hg2 #H1 #H2 destruct - elim (drops_inv_skip1 … HY1) -HY1 #J1 #K1 #HLK1 #HJI1 #H destruct - elim (drops_inv_skip1 … HY2) -HY2 #J2 #K2 #HLK2 #HJI2 #H destruct - elim (sex_inv_next … HK12) -HK12 #HK12 #HJ12 - elim (HRN … HJ12 … HLK1 … HJI1) -HJ12 -HJI1 #Z #Hz - >(liftsb_mono … Hz … HJI2) -Z /3 width=9 by sex_next/ -| elim (coafter_inv_xxp … H) [1,2: |*: // ] -H * - [ #g #g1 #Hg2 #H1 #H2 destruct - elim (drops_inv_skip1 … HY1) -HY1 #J1 #K1 #HLK1 #HJI1 #H destruct - elim (drops_inv_skip1 … HY2) -HY2 #J2 #K2 #HLK2 #HJI2 #H destruct - elim (sex_inv_push … HK12) -HK12 #HK12 #HJ12 - elim (HRP … HJ12 … HLK1 … HJI1) -HJ12 -HJI1 #Z #Hz - >(liftsb_mono … Hz … HJI2) -Z /3 width=9 by sex_push/ - | #g #Hg2 #H destruct - lapply (drops_inv_drop1 … HY1) -HY1 #HLK1 - lapply (drops_inv_drop1 … HY2) -HY2 #HLK2 - /3 width=9 by sex_push/ - ] -] -qed-. - -lemma sex_liftable_co_dedropable_sn: ∀RN,RP. (∀L. reflexive … (RN L)) → (∀L. reflexive … (RP L)) → - d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → - co_dedropable_sn (sex RN RP). -#RN #RP #H1RN #H1RP #H2RN #H2RP #b #f #L1 #K1 #H elim H -f -L1 -K1 -[ #f #Hf #X #f1 #H #f2 #Hf2 >(sex_inv_atom1 … H) -X - /4 width=4 by drops_atom, sex_atom, ex3_intro/ -| #f #I1 #L1 #K1 #_ #IHLK1 #K2 #f1 #HK12 #f2 #Hf2 - elim (coafter_inv_nxx … Hf2) -Hf2 [2,3: // ] #g2 #Hg2 #H destruct - elim (IHLK1 … HK12 … Hg2) -K1 - /3 width=6 by drops_drop, sex_next, sex_push, ex3_intro/ -| #f #I1 #J1 #L1 #K1 #HLK1 #HJI1 #IHLK1 #X #f1 #H #f2 #Hf2 - elim (coafter_inv_pxx … Hf2) -Hf2 [1,3: * |*: // ] #g1 #g2 #Hg2 #H1 #H2 destruct - [ elim (sex_inv_push1 … H) | elim (sex_inv_next1 … H) ] -H #J2 #K2 #HK12 #HJ12 #H destruct - [ elim (H2RP … HJ12 … HLK1 … HJI1) | elim (H2RN … HJ12 … HLK1 … HJI1) ] -J1 - elim (IHLK1 … HK12 … Hg2) -K1 - /3 width=6 by drops_skip, sex_next, sex_push, ex3_intro/ -] -qed-. - -fact sex_dropable_dx_aux: ∀RN,RP,b,f,L2,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → - ∀f2,L1. L1 ⪤[RN, RP, f2] L2 → ∀f1. f ~⊚ f1 ≘ f2 → - ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[RN, RP, f1] K2. -#RN #RP #b #f #L2 #K2 #H elim H -f -L2 -K2 -[ #f #Hf #_ #f2 #X #H #f1 #Hf2 lapply (sex_inv_atom2 … H) -H - #H destruct /4 width=3 by sex_atom, drops_atom, ex2_intro/ -| #f #I2 #L2 #K2 #_ #IH #Hf #f2 #X #HX #f1 #Hf2 - elim (coafter_inv_nxx … Hf2) -Hf2 [2,3: // ] #g2 #Hg2 #H destruct - elim (sex_inv_push2 … HX) -HX #I1 #L1 #HL12 #HI12 #H destruct - elim (IH … HL12 … Hg2) -L2 -I2 -g2 - /3 width=3 by drops_drop, isuni_inv_next, ex2_intro/ -| #f #I2 #J2 #L2 #K2 #_ #HJI2 #IH #Hf #f2 #X #HX #f1 #Hf2 - elim (coafter_inv_pxx … Hf2) -Hf2 [1,3: * |*: // ] #g1 #g2 #Hg2 #H1 #H2 destruct - [ elim (sex_inv_push2 … HX) | elim (sex_inv_next2 … HX) ] -HX #I1 #L1 #HL12 #HI12 #H destruct - elim (IH … HL12 … Hg2) -L2 -g2 /2 width=3 by isuni_fwd_push/ #K1 #HLK1 #HK12 - lapply (isuni_inv_push … Hf ??) -Hf [3,6: |*: // ] #Hf - lapply (liftsb_fwd_isid … HJI2 … Hf) #H destruct -HJI2 - lapply (drops_fwd_isid … HLK1 … Hf) #H destruct -HLK1 - /4 width=5 by sex_next, sex_push, drops_refl, isid_push, ex2_intro/ -] -qed-. - -lemma sex_co_dropable_dx: ∀RN,RP. co_dropable_dx (sex RN RP). -/2 width=5 by sex_dropable_dx_aux/ qed-. - -lemma sex_drops_conf_next: ∀RN,RP. - ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → - ∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ → - ∀f1. f ~⊚ ↑f1 ≘ f2 → - ∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN, RP, f1] K2 & RN K1 I1 I2. -#RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2 -elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf -#X #HX #HLK2 elim (sex_inv_next1 … HX) -HX -#I2 #K2 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma sex_drops_conf_push: ∀RN,RP. - ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → - ∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ → - ∀f1. f ~⊚ ⫯f1 ≘ f2 → - ∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN, RP, f1] K2 & RP K1 I1 I2. -#RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2 -elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf -#X #HX #HLK2 elim (sex_inv_push1 … HX) -HX -#I2 #K2 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma sex_drops_trans_next: ∀RN,RP,f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → - ∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ → - ∀f1. f ~⊚ ↑f1 ≘ f2 → - ∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN, RP, f1] K2 & RN K1 I1 I2. -#RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2 -elim (sex_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf -#X #HLK1 #HX elim (sex_inv_next2 … HX) -HX -#I1 #K1 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma sex_drops_trans_push: ∀RN,RP,f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → - ∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ → - ∀f1. f ~⊚ ⫯f1 ≘ f2 → - ∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN, RP, f1] K2 & RP K1 I1 I2. -#RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2 -elim (sex_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf -#X #HLK1 #HX elim (sex_inv_push2 … HX) -HX -#I1 #K1 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma drops_sex_trans_next: ∀RN,RP. (∀L. reflexive ? (RN L)) → (∀L. reflexive ? (RP L)) → - d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → - ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 → - ∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 → - ∀f2. f ~⊚ f1 ≘ ↑f2 → - ∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN, RP, f2] L2 & RN L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}. -#RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2 -elim (sex_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP -#X #HX #HLK2 #H1L12 elim (sex_inv_next1 … HX) -HX -#I2 #L2 #H2L12 #HI12 #H destruct /2 width=6 by ex4_2_intro/ -qed-. - -lemma drops_sex_trans_push: ∀RN,RP. (∀L. reflexive ? (RN L)) → (∀L. reflexive ? (RP L)) → - d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → - ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 → - ∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 → - ∀f2. f ~⊚ f1 ≘ ⫯f2 → - ∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN, RP, f2] L2 & RP L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}. -#RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2 -elim (sex_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP -#X #HX #HLK2 #H1L12 elim (sex_inv_push1 … HX) -HX -#I2 #L2 #H2L12 #HI12 #H destruct /2 width=6 by ex4_2_intro/ -qed-. - -lemma drops_atom2_sex_conf: ∀RN,RP,b,f1,L1. ⬇*[b, f1] L1 ≘ ⋆ → 𝐔⦃f1⦄ → - ∀f,L2. L1 ⪤[RN, RP, f] L2 → - ∀f2. f1 ~⊚ f2 ≘f → ⬇*[b, f1] L2 ≘ ⋆. -#RN #RP #b #f1 #L1 #H1 #Hf1 #f #L2 #H2 #f2 #H3 -elim (sex_co_dropable_sn … H1 … H2 … H3) // -H1 -H2 -H3 -Hf1 -#L #H #HL2 lapply (sex_inv_atom1 … H) -H // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_vector.ma deleted file mode 100644 index 6a7560248..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_vector.ma +++ /dev/null @@ -1,32 +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/relocation/lifts_vector.ma". -include "basic_2/relocation/drops.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -definition d_liftable1_all: predicate (relation2 lenv term) ≝ - λR. ∀K,Ts. all … (R K) Ts → - ∀b,f,L. ⬇*[b, f] L ≘ K → - ∀Us. ⬆*[f] Ts ≘ Us → all … (R L) Us. - -(* Properties with generic relocation for term vectors **********************) - -(* Basic_2A1: was: d1_liftables_liftables_all *) -lemma d1_liftable_liftable_all: ∀R. d_liftable1 R → d_liftable1_all R. -#R #HR #K #Ts #HTs #b #f #L #HLK #Us #H -generalize in match HTs; -HTs elim H -Ts -Us normalize // -#Ts #Us #T #U #HTU #_ #IHTUs * /3 width=7 by conj/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_weight.ma deleted file mode 100644 index 3b75c89f6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops_weight.ma +++ /dev/null @@ -1,56 +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/syntax/cl_restricted_weight.ma". -include "basic_2/relocation/lifts_weight_bind.ma". -include "basic_2/relocation/drops.ma". - -(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) - -(* Forward lemmas with weight for local environments ************************) - -(* Basic_2A1: includes: drop_fwd_lw *) -lemma drops_fwd_lw: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ♯{L2} ≤ ♯{L1}. -#b #f #L1 #L2 #H elim H -f -L1 -L2 // -[ /2 width=3 by transitive_le/ -| #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 normalize - >(liftsb_fwd_bw … HI21) -HI21 /2 width=1 by monotonic_le_plus_l/ -] -qed-. - -(* Basic_2A1: includes: drop_fwd_lw_lt *) -lemma drops_fwd_lw_lt: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → - (𝐈⦃f⦄ → ⊥) → ♯{L2} < ♯{L1}. -#f #L1 #L2 #H elim H -f -L1 -L2 -[ #f #Hf #Hnf elim Hnf -Hnf /2 width=1 by/ -| /3 width=3 by drops_fwd_lw, le_to_lt_to_lt/ -| #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 #H normalize in ⊢ (?%%); - >(liftsb_fwd_bw … HI21) -I2 /5 width=3 by isid_push, monotonic_lt_plus_l/ -] -qed-. - -(* Forward lemmas with restricted weight for closures ***********************) - -(* Basic_2A1: includes: drop_fwd_rfw *) -lemma drops_bind2_fwd_rfw: ∀b,f,I,L,K,V. ⬇*[b, f] L ≘ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}. -#b #f #I #L #K #V #HLK lapply (drops_fwd_lw … HLK) -HLK -normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt, monotonic_lt_plus_r/ -qed-. - -(* Advanced inversion lemma *************************************************) - -lemma drops_inv_x_bind_xy: ∀b,f,I,L. ⬇*[b, f] L ≘ L.ⓘ{I} → ⊥. -#b #f #I #L #H lapply (drops_fwd_lw … H) -b -f -/2 width=4 by lt_le_false/ (**) (* full auto is a bit slow: 19s *) -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lex.ma deleted file mode 100644 index 7e6aeae49..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex.ma +++ /dev/null @@ -1,162 +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 "ground_2/pull/pull_2.ma". -include "ground_2/pull/pull_4.ma". -include "ground_2/relocation/rtmap_uni.ma". -include "basic_2/notation/relations/relation_3.ma". -include "basic_2/syntax/cext2.ma". -include "basic_2/relocation/sex.ma". - -(* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************) - -definition lex (R): relation lenv ≝ - λL1,L2. ∃∃f. 𝐈⦃f⦄ & L1 ⪤[cfull, cext2 R, f] L2. - -interpretation "generic extension (local environment)" - 'Relation R L1 L2 = (lex R L1 L2). - -definition lex_confluent: relation (relation3 …) ≝ λR1,R2. - ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 → - ∀L1. L0 ⪤[R1] L1 → ∀L2. L0 ⪤[R2] L2 → - ∃∃T. R2 L1 T1 T & R1 L2 T2 T. - -definition lex_transitive: relation (relation3 …) ≝ λR1,R2. - ∀L1,T1,T. R1 L1 T1 T → ∀L2. L1 ⪤[R1] L2 → - ∀T2. R2 L2 T T2 → R1 L1 T1 T2. - -(* Basic properties *********************************************************) - -(* Basic_2A1: was: lpx_sn_atom *) -lemma lex_atom (R): ⋆ ⪤[R] ⋆. -/2 width=3 by sex_atom, ex2_intro/ qed. - -lemma lex_bind (R): ∀I1,I2,K1,K2. K1 ⪤[R] K2 → cext2 R K1 I1 I2 → - K1.ⓘ{I1} ⪤[R] K2.ⓘ{I2}. -#R #I1 #I2 #K1 #K2 * #f #Hf #HK12 #HI12 -/3 width=3 by sex_push, isid_push, ex2_intro/ -qed. - -(* Basic_2A1: was: lpx_sn_refl *) -lemma lex_refl (R): c_reflexive … R → reflexive … (lex R). -/4 width=3 by sex_refl, ext2_refl, ex2_intro/ qed. - -lemma lex_co (R1) (R2): (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → - ∀L1,L2. L1 ⪤[R1] L2 → L1 ⪤[R2] L2. -#R1 #R2 #HR #L1 #L2 * /5 width=7 by sex_co, cext2_co, ex2_intro/ -qed-. - -(* Advanced properties ******************************************************) - -lemma lex_bind_refl_dx (R): c_reflexive … R → - ∀I,K1,K2. K1 ⪤[R] K2 → K1.ⓘ{I} ⪤[R] K2.ⓘ{I}. -/3 width=3 by ext2_refl, lex_bind/ qed. - -lemma lex_unit (R): ∀I,K1,K2. K1 ⪤[R] K2 → K1.ⓤ{I} ⪤[R] K2.ⓤ{I}. -/3 width=1 by lex_bind, ext2_unit/ qed. - -(* Basic_2A1: was: lpx_sn_pair *) -lemma lex_pair (R): ∀I,K1,K2,V1,V2. K1 ⪤[R] K2 → R K1 V1 V2 → - K1.ⓑ{I}V1 ⪤[R] K2.ⓑ{I}V2. -/3 width=1 by lex_bind, ext2_pair/ qed. - -(* Basic inversion lemmas ***************************************************) - -(* Basic_2A1: was: lpx_sn_inv_atom1: *) -lemma lex_inv_atom_sn (R): ∀L2. ⋆ ⪤[R] L2 → L2 = ⋆. -#R #L2 * #f #Hf #H >(sex_inv_atom1 … H) -L2 // -qed-. - -lemma lex_inv_bind_sn (R): ∀I1,L2,K1. K1.ⓘ{I1} ⪤[R] L2 → - ∃∃I2,K2. K1 ⪤[R] K2 & cext2 R K1 I1 I2 & L2 = K2.ⓘ{I2}. -#R #I1 #L2 #K1 * #f #Hf #H -lapply (sex_eq_repl_fwd … H (⫯f) ?) -H /2 width=1 by eq_push_inv_isid/ #H -elim (sex_inv_push1 … H) -H #I2 #K2 #HK12 #HI12 #H destruct -/3 width=5 by ex2_intro, ex3_2_intro/ -qed-. - -(* Basic_2A1: was: lpx_sn_inv_atom2 *) -lemma lex_inv_atom_dx (R): ∀L1. L1 ⪤[R] ⋆ → L1 = ⋆. -#R #L1 * #f #Hf #H >(sex_inv_atom2 … H) -L1 // -qed-. - -lemma lex_inv_bind_dx (R): ∀I2,L1,K2. L1 ⪤[R] K2.ⓘ{I2} → - ∃∃I1,K1. K1 ⪤[R] K2 & cext2 R K1 I1 I2 & L1 = K1.ⓘ{I1}. -#R #I2 #L1 #K2 * #f #Hf #H -lapply (sex_eq_repl_fwd … H (⫯f) ?) -H /2 width=1 by eq_push_inv_isid/ #H -elim (sex_inv_push2 … H) -H #I1 #K1 #HK12 #HI12 #H destruct -/3 width=5 by ex3_2_intro, ex2_intro/ -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma lex_inv_unit_sn (R): ∀I,L2,K1. K1.ⓤ{I} ⪤[R] L2 → - ∃∃K2. K1 ⪤[R] K2 & L2 = K2.ⓤ{I}. -#R #I #L2 #K1 #H -elim (lex_inv_bind_sn … H) -H #Z2 #K2 #HK12 #HZ2 #H destruct -elim (ext2_inv_unit_sn … HZ2) -HZ2 -/2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: was: lpx_sn_inv_pair1 *) -lemma lex_inv_pair_sn (R): ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R] L2 → - ∃∃K2,V2. K1 ⪤[R] K2 & R K1 V1 V2 & L2 = K2.ⓑ{I}V2. -#R #I #L2 #K1 #V1 #H -elim (lex_inv_bind_sn … H) -H #Z2 #K2 #HK12 #HZ2 #H destruct -elim (ext2_inv_pair_sn … HZ2) -HZ2 #V2 #HV12 #H destruct -/2 width=5 by ex3_2_intro/ -qed-. - -lemma lex_inv_unit_dx (R): ∀I,L1,K2. L1 ⪤[R] K2.ⓤ{I} → - ∃∃K1. K1 ⪤[R] K2 & L1 = K1.ⓤ{I}. -#R #I #L1 #K2 #H -elim (lex_inv_bind_dx … H) -H #Z1 #K1 #HK12 #HZ1 #H destruct -elim (ext2_inv_unit_dx … HZ1) -HZ1 -/2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: was: lpx_sn_inv_pair2 *) -lemma lex_inv_pair_dx (R): ∀I,L1,K2,V2. L1 ⪤[R] K2.ⓑ{I}V2 → - ∃∃K1,V1. K1 ⪤[R] K2 & R K1 V1 V2 & L1 = K1.ⓑ{I}V1. -#R #I #L1 #K2 #V2 #H -elim (lex_inv_bind_dx … H) -H #Z1 #K1 #HK12 #HZ1 #H destruct -elim (ext2_inv_pair_dx … HZ1) -HZ1 #V1 #HV12 #H destruct -/2 width=5 by ex3_2_intro/ -qed-. - -(* Basic_2A1: was: lpx_sn_inv_pair *) -lemma lex_inv_pair (R): ∀I1,I2,L1,L2,V1,V2. - L1.ⓑ{I1}V1 ⪤[R] L2.ⓑ{I2}V2 → - ∧∧ L1 ⪤[R] L2 & R L1 V1 V2 & I1 = I2. -#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lex_inv_pair_sn … H) -H -#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/ -qed-. - -(* Basic eliminators ********************************************************) - -lemma lex_ind (R) (Q:relation2 …): - Q (⋆) (⋆) → - ( - ∀I,K1,K2. K1 ⪤[R] K2 → Q K1 K2 → Q (K1.ⓤ{I}) (K2.ⓤ{I}) - ) → ( - ∀I,K1,K2,V1,V2. K1 ⪤[R] K2 → Q K1 K2 → R K1 V1 V2 →Q (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) - ) → - ∀L1,L2. L1 ⪤[R] L2 → Q L1 L2. -#R #Q #IH1 #IH2 #IH3 #L1 #L2 * #f @pull_2 #H -elim H -f -L1 -L2 // #f #I1 #I2 #K1 #K2 @pull_4 #H -[ elim (isid_inv_next … H) -| lapply (isid_inv_push … H ??) -] -H [5:|*: // ] #Hf @pull_2 #H -elim H -H /3 width=3 by ex2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_length.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_length.ma deleted file mode 100644 index 4f77163fe..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_length.ma +++ /dev/null @@ -1,25 +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/relocation/sex_length.ma". -include "basic_2/relocation/lex.ma". - -(* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************) - -(* Forward lemmas with length for local environments ************************) - -(* Basic_2A1: was: lpx_sn_fwd_length *) -lemma lex_fwd_length: ∀R,L1,L2. L1 ⪤[R] L2 → |L1| = |L2|. -#R #L1 #L2 * /2 width=4 by sex_fwd_length/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_lex.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_lex.ma deleted file mode 100644 index e8b30f23d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_lex.ma +++ /dev/null @@ -1,52 +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/relocation/lex.ma". - -(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) - -(* Main properties **********************************************************) - -(* Basic_2A1: was: lpx_sn_trans *) -theorem lex_trans (R): lex_transitive R R → Transitive … (lex R). -#R #HR #L1 #L #H @(lex_ind … H) -L1 -L // -[ #I #K1 #K #HK1 #IH #Y #H - elim (lex_inv_unit_sn … H) -H #K2 #K2 #H destruct - /3 width=1 by lex_unit/ -| #I #K1 #L #V1 #V #HK1 #IH #HV1 #X #H - elim (lex_inv_pair_sn … H) -H #K2 #V2 #HK2 #HV2 #H destruct - /3 width=5 by lex_pair/ -] -qed-. - -(* Basic_2A1: was: lpx_sn_conf *) -theorem lex_conf (R1) (R2): lex_confluent R1 R2 → confluent2 … (lex R1) (lex R2). -#R1 #R2 #HR12 #L0 elim L0 -L0 [| #K0 * ] -[ #Y1 #H1 #Y2 #H2 - >(lex_inv_atom_sn … H1) -Y1 - >(lex_inv_atom_sn … H2) -Y2 - /2 width=3 by lex_atom, ex2_intro/ -| #I #IH #Y1 #H1 #Y2 #H2 - elim (lex_inv_unit_sn … H1) -H1 #K1 #HK01 #H destruct - elim (lex_inv_unit_sn … H2) -H2 #K2 #HK02 #H destruct - elim (IH … HK01 … HK02) -K0 #K #HK1 #HK2 - /3 width=3 by lex_unit, ex2_intro/ -| #I #V0 #IH #Y1 #H1 #Y2 #H2 - elim (lex_inv_pair_sn … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct - elim (lex_inv_pair_sn … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct - elim (HR12 … HV01 … HV02 … HK01 … HK02) -V0 #V #HV1 #HV2 - elim (IH … HK01 … HK02) -K0 #K #HK1 #HK2 - /3 width=5 by lex_pair, ex2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_tc.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_tc.ma deleted file mode 100644 index 00b9db820..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lex_tc.ma +++ /dev/null @@ -1,89 +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/syntax/ext2_tc.ma". -include "basic_2/relocation/sex_tc.ma". -include "basic_2/relocation/lex.ma". - -alias symbol "subseteq" = "relation inclusion". - -(* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************) - -(* Inversion lemmas with transitive closure *********************************) - -(* Basic_2A1: was: lpx_sn_LTC_TC_lpx_sn *) -lemma lex_inv_CTC (R): c_reflexive … R → - lex (CTC … R) ⊆ TC … (lex R). -#R #HR #L1 #L2 * -/5 width=11 by sex_inv_tc_dx, sex_co, ext2_inv_tc, ext2_refl, monotonic_TC, ex2_intro/ -qed-. - -lemma s_rs_transitive_lex_inv_isid (R): s_rs_transitive … R (λ_.lex R) → - s_rs_transitive_isid cfull (cext2 R). -#R #HR #f #Hf #L2 #T1 #T2 #H #L1 #HL12 -elim (ext2_tc … H) -H -[ /3 width=1 by ext2_inv_tc, ext2_unit/ -| #I #V1 #V2 #HV12 - @ext2_inv_tc @ext2_pair - @(HR … HV12) -HV12 /2 width=3 by ex2_intro/ (**) (* auto fails *) -] -qed-. - -(* Properties with transitive closure ***************************************) - -(* Basic_2A1: was: TC_lpx_sn_inv_lpx_sn_LTC *) -lemma lex_CTC (R): s_rs_transitive … R (λ_. lex R) → - TC … (lex R) ⊆ lex (CTC … R). -#R #HR #L1 #L2 #HL12 -lapply (monotonic_TC … (sex cfull (cext2 R) 𝐈𝐝) … HL12) -HL12 -[ #L1 #L2 * /3 width=3 by sex_eq_repl_fwd, eq_id_inv_isid/ -| /5 width=9 by s_rs_transitive_lex_inv_isid, sex_tc_dx, sex_co, ext2_tc, ex2_intro/ -] -qed-. - -lemma lex_CTC_inj (R): s_rs_transitive … R (λ_. lex R) → - (lex R) ⊆ lex (CTC … R). -/3 width=1 by lex_CTC, inj/ qed-. - -lemma lex_CTC_step_dx (R): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → - ∀L1,L. lex (CTC … R) L1 L → - ∀L2. lex R L L2 → lex (CTC … R) L1 L2. -/4 width=3 by lex_CTC, lex_inv_CTC, step/ qed-. - -lemma lex_CTC_step_sn (R): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → - ∀L1,L. lex R L1 L → - ∀L2. lex (CTC … R) L L2 → lex (CTC … R) L1 L2. -/4 width=3 by lex_CTC, lex_inv_CTC, TC_strap/ qed-. - -(* Eliminators with transitive closure **************************************) - -lemma lex_CTC_ind_sn (R) (L2): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → - ∀Q:predicate lenv. Q L2 → - (∀L1,L. L1 ⪤[R] L → L ⪤[CTC … R] L2 → Q L → Q L1) → - ∀L1. L1 ⪤[CTC … R] L2 → Q L1. -#R #L2 #H1R #H2R #Q #IH1 #IH2 #L1 #H -lapply (lex_inv_CTC … H1R … H) -H #H -@(TC_star_ind_dx ???????? H) -H -/3 width=4 by lex_CTC, lex_refl/ -qed-. - -lemma lex_CTC_ind_dx (R) (L1): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → - ∀Q:predicate lenv. Q L1 → - (∀L,L2. L1 ⪤[CTC … R] L → L ⪤[R] L2 → Q L → Q L2) → - ∀L2. L1 ⪤[CTC … R] L2 → Q L2. -#R #L1 #H1R #H2R #Q #IH1 #IH2 #L2 #H -lapply (lex_inv_CTC … H1R … H) -H #H -@(TC_star_ind ???????? H) -H -/3 width=4 by lex_CTC, lex_refl/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma deleted file mode 100644 index 5198b2d58..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma +++ /dev/null @@ -1,451 +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 "ground_2/relocation/nstream_after.ma". -include "basic_2/notation/relations/rliftstar_3.ma". -include "basic_2/syntax/term.ma". - -(* GENERIC RELOCATION FOR TERMS *********************************************) - -(* Basic_1: includes: - lift_sort lift_lref_lt lift_lref_ge lift_bind lift_flat - lifts_nil lifts_cons -*) -inductive lifts: rtmap → relation term ≝ -| lifts_sort: ∀f,s. lifts f (⋆s) (⋆s) -| lifts_lref: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → lifts f (#i1) (#i2) -| lifts_gref: ∀f,l. lifts f (§l) (§l) -| lifts_bind: ∀f,p,I,V1,V2,T1,T2. - lifts f V1 V2 → lifts (⫯f) T1 T2 → - lifts f (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2) -| lifts_flat: ∀f,I,V1,V2,T1,T2. - lifts f V1 V2 → lifts f T1 T2 → - lifts f (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) -. - -interpretation "uniform relocation (term)" - 'RLiftStar i T1 T2 = (lifts (uni i) T1 T2). - -interpretation "generic relocation (term)" - 'RLiftStar f T1 T2 = (lifts f T1 T2). - -definition liftable2_sn: predicate (relation term) ≝ - λR. ∀T1,T2. R T1 T2 → ∀f,U1. ⬆*[f] T1 ≘ U1 → - ∃∃U2. ⬆*[f] T2 ≘ U2 & R U1 U2. - -definition deliftable2_sn: predicate (relation term) ≝ - λR. ∀U1,U2. R U1 U2 → ∀f,T1. ⬆*[f] T1 ≘ U1 → - ∃∃T2. ⬆*[f] T2 ≘ U2 & R T1 T2. - -definition liftable2_bi: predicate (relation term) ≝ - λR. ∀T1,T2. R T1 T2 → ∀f,U1. ⬆*[f] T1 ≘ U1 → - ∀U2. ⬆*[f] T2 ≘ U2 → R U1 U2. - -definition deliftable2_bi: predicate (relation term) ≝ - λR. ∀U1,U2. R U1 U2 → ∀f,T1. ⬆*[f] T1 ≘ U1 → - ∀T2. ⬆*[f] T2 ≘ U2 → R T1 T2. - -(* Basic inversion lemmas ***************************************************) - -fact lifts_inv_sort1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀s. X = ⋆s → Y = ⋆s. -#f #X #Y * -f -X -Y // -[ #f #i1 #i2 #_ #x #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -] -qed-. - -(* Basic_1: was: lift1_sort *) -(* Basic_2A1: includes: lift_inv_sort1 *) -lemma lifts_inv_sort1: ∀f,Y,s. ⬆*[f] ⋆s ≘ Y → Y = ⋆s. -/2 width=4 by lifts_inv_sort1_aux/ qed-. - -fact lifts_inv_lref1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀i1. X = #i1 → - ∃∃i2. @⦃i1, f⦄ ≘ i2 & Y = #i2. -#f #X #Y * -f -X -Y -[ #f #s #x #H destruct -| #f #i1 #i2 #Hi12 #x #H destruct /2 width=3 by ex2_intro/ -| #f #l #x #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -] -qed-. - -(* Basic_1: was: lift1_lref *) -(* Basic_2A1: includes: lift_inv_lref1 lift_inv_lref1_lt lift_inv_lref1_ge *) -lemma lifts_inv_lref1: ∀f,Y,i1. ⬆*[f] #i1 ≘ Y → - ∃∃i2. @⦃i1, f⦄ ≘ i2 & Y = #i2. -/2 width=3 by lifts_inv_lref1_aux/ qed-. - -fact lifts_inv_gref1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀l. X = §l → Y = §l. -#f #X #Y * -f -X -Y // -[ #f #i1 #i2 #_ #x #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -] -qed-. - -(* Basic_2A1: includes: lift_inv_gref1 *) -lemma lifts_inv_gref1: ∀f,Y,l. ⬆*[f] §l ≘ Y → Y = §l. -/2 width=4 by lifts_inv_gref1_aux/ qed-. - -fact lifts_inv_bind1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → - ∀p,I,V1,T1. X = ⓑ{p,I}V1.T1 → - ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & - Y = ⓑ{p,I}V2.T2. -#f #X #Y * -f -X -Y -[ #f #s #q #J #W1 #U1 #H destruct -| #f #i1 #i2 #_ #q #J #W1 #U1 #H destruct -| #f #l #b #J #W1 #U1 #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #HV12 #HT12 #q #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ -| #f #I #V1 #V2 #T1 #T2 #_ #_ #q #J #W1 #U1 #H destruct -] -qed-. - -(* Basic_1: was: lift1_bind *) -(* Basic_2A1: includes: lift_inv_bind1 *) -lemma lifts_inv_bind1: ∀f,p,I,V1,T1,Y. ⬆*[f] ⓑ{p,I}V1.T1 ≘ Y → - ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & - Y = ⓑ{p,I}V2.T2. -/2 width=3 by lifts_inv_bind1_aux/ qed-. - -fact lifts_inv_flat1_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → - ∀I,V1,T1. X = ⓕ{I}V1.T1 → - ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & - Y = ⓕ{I}V2.T2. -#f #X #Y * -f -X -Y -[ #f #s #J #W1 #U1 #H destruct -| #f #i1 #i2 #_ #J #W1 #U1 #H destruct -| #f #l #J #W1 #U1 #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct -| #f #I #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_1: was: lift1_flat *) -(* Basic_2A1: includes: lift_inv_flat1 *) -lemma lifts_inv_flat1: ∀f:rtmap. ∀I,V1,T1,Y. ⬆*[f] ⓕ{I}V1.T1 ≘ Y → - ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & - Y = ⓕ{I}V2.T2. -/2 width=3 by lifts_inv_flat1_aux/ qed-. - -fact lifts_inv_sort2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀s. Y = ⋆s → X = ⋆s. -#f #X #Y * -f -X -Y // -[ #f #i1 #i2 #_ #x #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -] -qed-. - -(* Basic_1: includes: lift_gen_sort *) -(* Basic_2A1: includes: lift_inv_sort2 *) -lemma lifts_inv_sort2: ∀f,X,s. ⬆*[f] X ≘ ⋆s → X = ⋆s. -/2 width=4 by lifts_inv_sort2_aux/ qed-. - -fact lifts_inv_lref2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀i2. Y = #i2 → - ∃∃i1. @⦃i1, f⦄ ≘ i2 & X = #i1. -#f #X #Y * -f -X -Y -[ #f #s #x #H destruct -| #f #i1 #i2 #Hi12 #x #H destruct /2 width=3 by ex2_intro/ -| #f #l #x #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -] -qed-. - -(* Basic_1: includes: lift_gen_lref lift_gen_lref_lt lift_gen_lref_false lift_gen_lref_ge *) -(* Basic_2A1: includes: lift_inv_lref2 lift_inv_lref2_lt lift_inv_lref2_be lift_inv_lref2_ge lift_inv_lref2_plus *) -lemma lifts_inv_lref2: ∀f,X,i2. ⬆*[f] X ≘ #i2 → - ∃∃i1. @⦃i1, f⦄ ≘ i2 & X = #i1. -/2 width=3 by lifts_inv_lref2_aux/ qed-. - -fact lifts_inv_gref2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀l. Y = §l → X = §l. -#f #X #Y * -f -X -Y // -[ #f #i1 #i2 #_ #x #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct -] -qed-. - -(* Basic_2A1: includes: lift_inv_gref1 *) -lemma lifts_inv_gref2: ∀f,X,l. ⬆*[f] X ≘ §l → X = §l. -/2 width=4 by lifts_inv_gref2_aux/ qed-. - -fact lifts_inv_bind2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → - ∀p,I,V2,T2. Y = ⓑ{p,I}V2.T2 → - ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & - X = ⓑ{p,I}V1.T1. -#f #X #Y * -f -X -Y -[ #f #s #q #J #W2 #U2 #H destruct -| #f #i1 #i2 #_ #q #J #W2 #U2 #H destruct -| #f #l #q #J #W2 #U2 #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #HV12 #HT12 #q #J #W2 #U2 #H destruct /2 width=5 by ex3_2_intro/ -| #f #I #V1 #V2 #T1 #T2 #_ #_ #q #J #W2 #U2 #H destruct -] -qed-. - -(* Basic_1: includes: lift_gen_bind *) -(* Basic_2A1: includes: lift_inv_bind2 *) -lemma lifts_inv_bind2: ∀f,p,I,V2,T2,X. ⬆*[f] X ≘ ⓑ{p,I}V2.T2 → - ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & - X = ⓑ{p,I}V1.T1. -/2 width=3 by lifts_inv_bind2_aux/ qed-. - -fact lifts_inv_flat2_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → - ∀I,V2,T2. Y = ⓕ{I}V2.T2 → - ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & - X = ⓕ{I}V1.T1. -#f #X #Y * -f -X -Y -[ #f #s #J #W2 #U2 #H destruct -| #f #i1 #i2 #_ #J #W2 #U2 #H destruct -| #f #l #J #W2 #U2 #H destruct -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #J #W2 #U2 #H destruct -| #f #I #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W2 #U2 #H destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_1: includes: lift_gen_flat *) -(* Basic_2A1: includes: lift_inv_flat2 *) -lemma lifts_inv_flat2: ∀f:rtmap. ∀I,V2,T2,X. ⬆*[f] X ≘ ⓕ{I}V2.T2 → - ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & - X = ⓕ{I}V1.T1. -/2 width=3 by lifts_inv_flat2_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma lifts_inv_atom1: ∀f,I,Y. ⬆*[f] ⓪{I} ≘ Y → - ∨∨ ∃∃s. I = Sort s & Y = ⋆s - | ∃∃i,j. @⦃i, f⦄ ≘ j & I = LRef i & Y = #j - | ∃∃l. I = GRef l & Y = §l. -#f * #n #Y #H -[ lapply (lifts_inv_sort1 … H) -| elim (lifts_inv_lref1 … H) -| lapply (lifts_inv_gref1 … H) -] -H /3 width=5 by or3_intro0, or3_intro1, or3_intro2, ex3_2_intro, ex2_intro/ -qed-. - -lemma lifts_inv_atom2: ∀f,I,X. ⬆*[f] X ≘ ⓪{I} → - ∨∨ ∃∃s. X = ⋆s & I = Sort s - | ∃∃i,j. @⦃i, f⦄ ≘ j & X = #i & I = LRef j - | ∃∃l. X = §l & I = GRef l. -#f * #n #X #H -[ lapply (lifts_inv_sort2 … H) -| elim (lifts_inv_lref2 … H) -| lapply (lifts_inv_gref2 … H) -] -H /3 width=5 by or3_intro0, or3_intro1, or3_intro2, ex3_2_intro, ex2_intro/ -qed-. - -(* Basic_2A1: includes: lift_inv_pair_xy_x *) -lemma lifts_inv_pair_xy_x: ∀f,I,V,T. ⬆*[f] ②{I}V.T ≘ V → ⊥. -#f #J #V elim V -V -[ * #i #U #H - [ lapply (lifts_inv_sort2 … H) -H #H destruct - | elim (lifts_inv_lref2 … H) -H - #x #_ #H destruct - | lapply (lifts_inv_gref2 … H) -H #H destruct - ] -| * [ #p ] #I #V2 #T2 #IHV2 #_ #U #H - [ elim (lifts_inv_bind2 … H) -H #V1 #T1 #HV12 #_ #H destruct /2 width=3 by/ - | elim (lifts_inv_flat2 … H) -H #V1 #T1 #HV12 #_ #H destruct /2 width=3 by/ - ] -] -qed-. - -(* Basic_1: includes: thead_x_lift_y_y *) -(* Basic_2A1: includes: lift_inv_pair_xy_y *) -lemma lifts_inv_pair_xy_y: ∀I,T,V,f. ⬆*[f] ②{I}V.T ≘ T → ⊥. -#J #T elim T -T -[ * #i #W #f #H - [ lapply (lifts_inv_sort2 … H) -H #H destruct - | elim (lifts_inv_lref2 … H) -H - #x #_ #H destruct - | lapply (lifts_inv_gref2 … H) -H #H destruct - ] -| * [ #p ] #I #V2 #T2 #_ #IHT2 #W #f #H - [ elim (lifts_inv_bind2 … H) -H #V1 #T1 #_ #HT12 #H destruct /2 width=4 by/ - | elim (lifts_inv_flat2 … H) -H #V1 #T1 #_ #HT12 #H destruct /2 width=4 by/ - ] -] -qed-. - -(* Inversion lemmas with uniform relocations ********************************) - -lemma lifts_inv_lref1_uni: ∀l,Y,i. ⬆*[l] #i ≘ Y → Y = #(l+i). -#l #Y #i1 #H elim (lifts_inv_lref1 … H) -H /4 width=4 by at_mono, eq_f/ -qed-. - -lemma lifts_inv_lref2_uni: ∀l,X,i2. ⬆*[l] X ≘ #i2 → - ∃∃i1. X = #i1 & i2 = l + i1. -#l #X #i2 #H elim (lifts_inv_lref2 … H) -H -/3 width=3 by at_inv_uni, ex2_intro/ -qed-. - -lemma lifts_inv_lref2_uni_ge: ∀l,X,i. ⬆*[l] X ≘ #(l + i) → X = #i. -#l #X #i2 #H elim (lifts_inv_lref2_uni … H) -H -#i1 #H1 #H2 destruct /4 width=2 by injective_plus_r, eq_f, sym_eq/ -qed-. - -lemma lifts_inv_lref2_uni_lt: ∀l,X,i. ⬆*[l] X ≘ #i → i < l → ⊥. -#l #X #i2 #H elim (lifts_inv_lref2_uni … H) -H -#i1 #_ #H1 #H2 destruct /2 width=4 by lt_le_false/ -qed-. - -(* Basic forward lemmas *****************************************************) - -(* Basic_2A1: includes: lift_inv_O2 *) -lemma lifts_fwd_isid: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → 𝐈⦃f⦄ → T1 = T2. -#f #T1 #T2 #H elim H -f -T1 -T2 -/4 width=3 by isid_inv_at_mono, isid_push, eq_f2, eq_f/ -qed-. - -(* Basic_2A1: includes: lift_fwd_pair1 *) -lemma lifts_fwd_pair1: ∀f:rtmap. ∀I,V1,T1,Y. ⬆*[f] ②{I}V1.T1 ≘ Y → - ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & Y = ②{I}V2.T2. -#f * [ #p ] #I #V1 #T1 #Y #H -[ elim (lifts_inv_bind1 … H) -H /2 width=4 by ex2_2_intro/ -| elim (lifts_inv_flat1 … H) -H /2 width=4 by ex2_2_intro/ -] -qed-. - -(* Basic_2A1: includes: lift_fwd_pair2 *) -lemma lifts_fwd_pair2: ∀f:rtmap. ∀I,V2,T2,X. ⬆*[f] X ≘ ②{I}V2.T2 → - ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & X = ②{I}V1.T1. -#f * [ #p ] #I #V2 #T2 #X #H -[ elim (lifts_inv_bind2 … H) -H /2 width=4 by ex2_2_intro/ -| elim (lifts_inv_flat2 … H) -H /2 width=4 by ex2_2_intro/ -] -qed-. - -(* Basic properties *********************************************************) - -lemma lifts_eq_repl_back: ∀T1,T2. eq_repl_back … (λf. ⬆*[f] T1 ≘ T2). -#T1 #T2 #f1 #H elim H -T1 -T2 -f1 -/4 width=5 by lifts_flat, lifts_bind, lifts_lref, at_eq_repl_back, eq_push/ -qed-. - -lemma lifts_eq_repl_fwd: ∀T1,T2. eq_repl_fwd … (λf. ⬆*[f] T1 ≘ T2). -#T1 #T2 @eq_repl_sym /2 width=3 by lifts_eq_repl_back/ (**) (* full auto fails *) -qed-. - -(* Basic_1: includes: lift_r *) -(* Basic_2A1: includes: lift_refl *) -lemma lifts_refl: ∀T,f. 𝐈⦃f⦄ → ⬆*[f] T ≘ T. -#T elim T -T * -/4 width=3 by lifts_flat, lifts_bind, lifts_lref, isid_inv_at, isid_push/ -qed. - -(* Basic_2A1: includes: lift_total *) -lemma lifts_total: ∀T1,f. ∃T2. ⬆*[f] T1 ≘ T2. -#T1 elim T1 -T1 * -/3 width=2 by lifts_lref, lifts_sort, lifts_gref, ex_intro/ -[ #p ] #I #V1 #T1 #IHV1 #IHT1 #f -elim (IHV1 f) -IHV1 #V2 #HV12 -[ elim (IHT1 (⫯f)) -IHT1 /3 width=2 by lifts_bind, ex_intro/ -| elim (IHT1 f) -IHT1 /3 width=2 by lifts_flat, ex_intro/ -] -qed-. - -lemma lift_lref_uni: ∀l,i. ⬆*[l] #i ≘ #(l+i). -#l elim l -l /2 width=1 by lifts_lref/ -qed. - -(* Basic_1: includes: lift_free (right to left) *) -(* Basic_2A1: includes: lift_split *) -lemma lifts_split_trans: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → - ∀f1,f2. f2 ⊚ f1 ≘ f → - ∃∃T. ⬆*[f1] T1 ≘ T & ⬆*[f2] T ≘ T2. -#f #T1 #T2 #H elim H -f -T1 -T2 -[ /3 width=3 by lifts_sort, ex2_intro/ -| #f #i1 #i2 #Hi #f1 #f2 #Ht elim (after_at_fwd … Hi … Ht) -Hi -Ht - /3 width=3 by lifts_lref, ex2_intro/ -| /3 width=3 by lifts_gref, ex2_intro/ -| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f1 #f2 #Ht - elim (IHV … Ht) elim (IHT (⫯f1) (⫯f2)) -IHV -IHT - /3 width=5 by lifts_bind, after_O2, ex2_intro/ -| #f #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f1 #f2 #Ht - elim (IHV … Ht) elim (IHT … Ht) -IHV -IHT -Ht - /3 width=5 by lifts_flat, ex2_intro/ -] -qed-. - -(* Note: apparently, this was missing in Basic_2A1 *) -lemma lifts_split_div: ∀f1,T1,T2. ⬆*[f1] T1 ≘ T2 → - ∀f2,f. f2 ⊚ f1 ≘ f → - ∃∃T. ⬆*[f2] T2 ≘ T & ⬆*[f] T1 ≘ T. -#f1 #T1 #T2 #H elim H -f1 -T1 -T2 -[ /3 width=3 by lifts_sort, ex2_intro/ -| #f1 #i1 #i2 #Hi #f2 #f #Ht elim (after_at1_fwd … Hi … Ht) -Hi -Ht - /3 width=3 by lifts_lref, ex2_intro/ -| /3 width=3 by lifts_gref, ex2_intro/ -| #f1 #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f2 #f #Ht - elim (IHV … Ht) elim (IHT (⫯f2) (⫯f)) -IHV -IHT - /3 width=5 by lifts_bind, after_O2, ex2_intro/ -| #f1 #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f2 #f #Ht - elim (IHV … Ht) elim (IHT … Ht) -IHV -IHT -Ht - /3 width=5 by lifts_flat, ex2_intro/ -] -qed-. - -(* Basic_1: includes: dnf_dec2 dnf_dec *) -(* Basic_2A1: includes: is_lift_dec *) -lemma is_lifts_dec: ∀T2,f. Decidable (∃T1. ⬆*[f] T1 ≘ T2). -#T1 elim T1 -T1 -[ * [1,3: /3 width=2 by lifts_sort, lifts_gref, ex_intro, or_introl/ ] - #i2 #f elim (is_at_dec f i2) // - [ * /4 width=3 by lifts_lref, ex_intro, or_introl/ - | #H @or_intror * - #X #HX elim (lifts_inv_lref2 … HX) -HX - /3 width=2 by ex_intro/ - ] -| * [ #p ] #I #V2 #T2 #IHV2 #IHT2 #f - [ elim (IHV2 f) -IHV2 - [ * #V1 #HV12 elim (IHT2 (⫯f)) -IHT2 - [ * #T1 #HT12 @or_introl /3 width=2 by lifts_bind, ex_intro/ - | -V1 #HT2 @or_intror * #X #H - elim (lifts_inv_bind2 … H) -H /3 width=2 by ex_intro/ - ] - | -IHT2 #HV2 @or_intror * #X #H - elim (lifts_inv_bind2 … H) -H /3 width=2 by ex_intro/ - ] - | elim (IHV2 f) -IHV2 - [ * #V1 #HV12 elim (IHT2 f) -IHT2 - [ * #T1 #HT12 /4 width=2 by lifts_flat, ex_intro, or_introl/ - | -V1 #HT2 @or_intror * #X #H - elim (lifts_inv_flat2 … H) -H /3 width=2 by ex_intro/ - ] - | -IHT2 #HV2 @or_intror * #X #H - elim (lifts_inv_flat2 … H) -H /3 width=2 by ex_intro/ - ] - ] -] -qed-. - -(* Properties with uniform relocation ***************************************) - -lemma lifts_uni: ∀n1,n2,T,U. ⬆*[𝐔❴n1❵∘𝐔❴n2❵] T ≘ U → ⬆*[n1+n2] T ≘ U. -/3 width=4 by lifts_eq_repl_back, after_inv_total/ qed. - -(* Basic_2A1: removed theorems 14: - lifts_inv_nil lifts_inv_cons - lift_inv_Y1 lift_inv_Y2 lift_inv_lref_Y1 lift_inv_lref_Y2 lift_lref_Y lift_Y1 - lift_lref_lt_eq lift_lref_ge_eq lift_lref_plus lift_lref_pred - lift_lref_ge_minus lift_lref_ge_minus_eq -*) -(* Basic_1: removed theorems 8: - lift_lref_gt - lift_head lift_gen_head - lift_weight_map lift_weight lift_weight_add lift_weight_add_O - lift_tlt_dx -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_bind.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_bind.ma deleted file mode 100644 index fd56f4e69..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_bind.ma +++ /dev/null @@ -1,71 +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/syntax/ext2.ma". -include "basic_2/relocation/lifts.ma". - -(* GENERIC RELOCATION FOR BINDERS *******************************************) - -definition liftsb: rtmap → relation bind ≝ - λf. ext2 (lifts f). - -interpretation "uniform relocation (binder for local environments)" - 'RLiftStar i I1 I2 = (liftsb (uni i) I1 I2). - -interpretation "generic relocation (binder for local environments)" - 'RLiftStar f I1 I2 = (liftsb f I1 I2). - -(* Basic_inversion lemmas **************************************************) - -lemma liftsb_inv_unit_sn: ∀f,I,Z2. ⬆*[f] BUnit I ≘ Z2 → Z2 = BUnit I. -/2 width=2 by ext2_inv_unit_sn/ qed-. - -lemma liftsb_inv_pair_sn: ∀f:rtmap. ∀Z2,I,V1. ⬆*[f] BPair I V1 ≘ Z2 → - ∃∃V2. ⬆*[f] V1 ≘ V2 & Z2 = BPair I V2. -/2 width=1 by ext2_inv_pair_sn/ qed-. - -lemma liftsb_inv_unit_dx: ∀f,I,Z1. ⬆*[f] Z1 ≘ BUnit I → Z1 = BUnit I. -/2 width=2 by ext2_inv_unit_dx/ qed-. - -lemma liftsb_inv_pair_dx: ∀f:rtmap. ∀Z1,I,V2. ⬆*[f] Z1 ≘ BPair I V2 → - ∃∃V1. ⬆*[f] V1 ≘ V2 & Z1 = BPair I V1. -/2 width=1 by ext2_inv_pair_dx/ qed-. - -(* Basic properties *********************************************************) - -lemma liftsb_eq_repl_back: ∀I1,I2. eq_repl_back … (λf. ⬆*[f] I1 ≘ I2). -#I1 #I2 #f1 * -I1 -I2 /3 width=3 by lifts_eq_repl_back, ext2_pair/ -qed-. - -lemma liftsb_refl: ∀f. 𝐈⦃f⦄ → reflexive … (liftsb f). -/3 width=1 by lifts_refl, ext2_refl/ qed. - -lemma liftsb_total: ∀I1,f. ∃I2. ⬆*[f] I1 ≘ I2. -* [2: #I #T1 #f elim (lifts_total T1 f) ] -/3 width=2 by ext2_unit, ext2_pair, ex_intro/ -qed-. - -lemma liftsb_split_trans: ∀f,I1,I2. ⬆*[f] I1 ≘ I2 → - ∀f1,f2. f2 ⊚ f1 ≘ f → - ∃∃I. ⬆*[f1] I1 ≘ I & ⬆*[f2] I ≘ I2. -#f #I1 #I2 * -I1 -I2 /2 width=3 by ext2_unit, ex2_intro/ -#I #V1 #V2 #HV12 #f1 #f2 #Hf elim (lifts_split_trans … HV12 … Hf) -f -/3 width=3 by ext2_pair, ex2_intro/ -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma liftsb_fwd_isid: ∀f,I1,I2. ⬆*[f] I1 ≘ I2 → 𝐈⦃f⦄ → I1 = I2. -#f #I1 #I2 * -I1 -I2 /3 width=3 by lifts_fwd_isid, eq_f2/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts.ma deleted file mode 100644 index 9d7fc61bf..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts.ma +++ /dev/null @@ -1,130 +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/relocation/lifts.ma". - -(* GENERIC RELOCATION FOR TERMS *********************************************) - -(* Main properties **********************************************************) - -(* Basic_1: includes: lift_gen_lift *) -(* Basic_2A1: includes: lift_div_le lift_div_be *) -theorem lifts_div4: ∀f2,Tf,T. ⬆*[f2] Tf ≘ T → ∀g2,Tg. ⬆*[g2] Tg ≘ T → - ∀f1,g1. H_at_div f2 g2 f1 g1 → - ∃∃T0. ⬆*[f1] T0 ≘ Tf & ⬆*[g1] T0 ≘ Tg. -#f2 #Tf #T #H elim H -f2 -Tf -T -[ #f2 #s #g2 #Tg #H #f1 #g1 #_ - lapply (lifts_inv_sort2 … H) -H #H destruct - /2 width=3 by ex2_intro/ -| #f2 #jf #j #Hf2 #g2 #Tg #H #f1 #g1 #H0 - elim (lifts_inv_lref2 … H) -H #jg #Hg2 #H destruct - elim (H0 … Hf2 Hg2) -H0 -j /3 width=3 by lifts_lref, ex2_intro/ -| #f2 #l #g2 #Tg #H #f1 #g1 #_ - lapply (lifts_inv_gref2 … H) -H #H destruct - /2 width=3 by ex2_intro/ -| #f2 #p #I #Vf #V #Tf #T #_ #_ #IHV #IHT #g2 #X #H #f1 #g1 #H0 - elim (lifts_inv_bind2 … H) -H #Vg #Tg #HVg #HTg #H destruct - elim (IHV … HVg … H0) -IHV -HVg - elim (IHT … HTg) -IHT -HTg [ |*: /2 width=8 by at_div_pp/ ] - /3 width=5 by lifts_bind, ex2_intro/ -| #f2 #I #Vf #V #Tf #T #_ #_ #IHV #IHT #g2 #X #H #f1 #g1 #H0 - elim (lifts_inv_flat2 … H) -H #Vg #Tg #HVg #HTg #H destruct - elim (IHV … HVg … H0) -IHV -HVg - elim (IHT … HTg … H0) -IHT -HTg -H0 - /3 width=5 by lifts_flat, ex2_intro/ -] -qed-. - -lemma lifts_div4_one: ∀f,Tf,T. ⬆*[⫯f] Tf ≘ T → - ∀T1. ⬆*[1] T1 ≘ T → - ∃∃T0. ⬆*[1] T0 ≘ Tf & ⬆*[f] T0 ≘ T1. -/4 width=6 by lifts_div4, at_div_id_dx, at_div_pn/ qed-. - -theorem lifts_div3: ∀f2,T,T2. ⬆*[f2] T2 ≘ T → ∀f,T1. ⬆*[f] T1 ≘ T → - ∀f1. f2 ⊚ f1 ≘ f → ⬆*[f1] T1 ≘ T2. -#f2 #T #T2 #H elim H -f2 -T -T2 -[ #f2 #s #f #T1 #H >(lifts_inv_sort2 … H) -T1 // -| #f2 #i2 #i #Hi2 #f #T1 #H #f1 #Ht21 elim (lifts_inv_lref2 … H) -H - #i1 #Hi1 #H destruct /3 width=6 by lifts_lref, after_fwd_at1/ -| #f2 #l #f #T1 #H >(lifts_inv_gref2 … H) -T1 // -| #f2 #p #I #W2 #W #U2 #U #_ #_ #IHW #IHU #f #T1 #H - elim (lifts_inv_bind2 … H) -H #W1 #U1 #HW1 #HU1 #H destruct - /4 width=3 by lifts_bind, after_O2/ -| #f2 #I #W2 #W #U2 #U #_ #_ #IHW #IHU #f #T1 #H - elim (lifts_inv_flat2 … H) -H #W1 #U1 #HW1 #HU1 #H destruct - /3 width=3 by lifts_flat/ -] -qed-. - -(* Basic_1: was: lift1_lift1 (left to right) *) -(* Basic_1: includes: lift_free (left to right) lift_d lift1_xhg (right to left) lift1_free (right to left) *) -(* Basic_2A1: includes: lift_trans_be lift_trans_le lift_trans_ge lifts_lift_trans_le lifts_lift_trans *) -theorem lifts_trans: ∀f1,T1,T. ⬆*[f1] T1 ≘ T → ∀f2,T2. ⬆*[f2] T ≘ T2 → - ∀f. f2 ⊚ f1 ≘ f → ⬆*[f] T1 ≘ T2. -#f1 #T1 #T #H elim H -f1 -T1 -T -[ #f1 #s #f2 #T2 #H >(lifts_inv_sort1 … H) -T2 // -| #f1 #i1 #i #Hi1 #f2 #T2 #H #f #Ht21 elim (lifts_inv_lref1 … H) -H - #i2 #Hi2 #H destruct /3 width=6 by lifts_lref, after_fwd_at/ -| #f1 #l #f2 #T2 #H >(lifts_inv_gref1 … H) -T2 // -| #f1 #p #I #W1 #W #U1 #U #_ #_ #IHW #IHU #f2 #T2 #H - elim (lifts_inv_bind1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct - /4 width=3 by lifts_bind, after_O2/ -| #f1 #I #W1 #W #U1 #U #_ #_ #IHW #IHU #f2 #T2 #H - elim (lifts_inv_flat1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct - /3 width=3 by lifts_flat/ -] -qed-. - -(* Basic_2A1: includes: lift_conf_O1 lift_conf_be *) -theorem lifts_conf: ∀f1,T,T1. ⬆*[f1] T ≘ T1 → ∀f,T2. ⬆*[f] T ≘ T2 → - ∀f2. f2 ⊚ f1 ≘ f → ⬆*[f2] T1 ≘ T2. -#f1 #T #T1 #H elim H -f1 -T -T1 -[ #f1 #s #f #T2 #H >(lifts_inv_sort1 … H) -T2 // -| #f1 #i #i1 #Hi1 #f #T2 #H #f2 #Ht21 elim (lifts_inv_lref1 … H) -H - #i2 #Hi2 #H destruct /3 width=6 by lifts_lref, after_fwd_at2/ -| #f1 #l #f #T2 #H >(lifts_inv_gref1 … H) -T2 // -| #f1 #p #I #W #W1 #U #U1 #_ #_ #IHW #IHU #f #T2 #H - elim (lifts_inv_bind1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct - /4 width=3 by lifts_bind, after_O2/ -| #f1 #I #W #W1 #U #U1 #_ #_ #IHW #IHU #f #T2 #H - elim (lifts_inv_flat1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct - /3 width=3 by lifts_flat/ -] -qed-. - -(* Advanced proprerties *****************************************************) - -(* Basic_2A1: includes: lift_inj *) -lemma lifts_inj: ∀f. is_inj2 … (lifts f). -#f #T1 #U #H1 #T2 #H2 lapply (after_isid_dx 𝐈𝐝 … f) -/3 width=6 by lifts_div3, lifts_fwd_isid/ -qed-. - -(* Basic_2A1: includes: lift_mono *) -lemma lifts_mono: ∀f,T. is_mono … (lifts f T). -#f #T #U1 #H1 #U2 #H2 lapply (after_isid_sn 𝐈𝐝 … f) -/3 width=6 by lifts_conf, lifts_fwd_isid/ -qed-. - -lemma liftable2_sn_bi: ∀R. liftable2_sn R → liftable2_bi R. -#R #HR #T1 #T2 #HT12 #f #U1 #HTU1 #U2 #HTU2 -elim (HR … HT12 … HTU1) -HR -T1 #X #HTX #HUX -<(lifts_mono … HTX … HTU2) -T2 -U2 -f // -qed-. - -lemma deliftable2_sn_bi: ∀R. deliftable2_sn R → deliftable2_bi R. -#R #HR #U1 #U2 #HU12 #f #T1 #HTU1 #T2 #HTU2 -elim (HR … HU12 … HTU1) -HR -U1 #X #HUX #HTX -<(lifts_inj … HUX … HTU2) -U2 -T2 -f // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts_bind.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts_bind.ma deleted file mode 100644 index e1647b35b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts_bind.ma +++ /dev/null @@ -1,53 +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/relocation/lifts_lifts.ma". -include "basic_2/relocation/lifts_bind.ma". - -(* GENERIC RELOCATION FOR BINDERS *******************************************) - -(* Main properties **********************************************************) - -theorem liftsb_div3: ∀f2,I,I2. ⬆*[f2] I2 ≘ I → ∀f,I1. ⬆*[f] I1 ≘ I → - ∀f1. f2 ⊚ f1 ≘ f → ⬆*[f1] I1 ≘ I2. -#f2 #I #I2 * -I -I2 #I [2: #V #V2 #HV2 ] #f #I1 #H -[ elim (liftsb_inv_pair_dx … H) | lapply (liftsb_inv_unit_dx … H) ] -H -/3 width=6 by lifts_div3, ext2_pair, ext2_unit/ -qed-. - -theorem liftsb_trans: ∀f1,I1,I. ⬆*[f1] I1 ≘ I → ∀f2,I2. ⬆*[f2] I ≘ I2 → - ∀f. f2 ⊚ f1 ≘ f → ⬆*[f] I1 ≘ I2. -#f1 #I1 #I * -I1 -I #I1 [2: #V1 #V #HV1 ] #f2 #I2 #H -[ elim (liftsb_inv_pair_sn … H) | lapply (liftsb_inv_unit_sn … H) ] -H -/3 width=6 by lifts_trans, ext2_pair, ext2_unit/ -qed-. - -theorem liftsb_conf: ∀f1,I,I1. ⬆*[f1] I ≘ I1 → ∀f,I2. ⬆*[f] I ≘ I2 → - ∀f2. f2 ⊚ f1 ≘ f → ⬆*[f2] I1 ≘ I2. -#f1 #I #I1 * -I -I1 #I [2: #V #V1 #HV1 ] #f2 #I2 #H -[ elim (liftsb_inv_pair_sn … H) | lapply (liftsb_inv_unit_sn … H) ] -H -/3 width=6 by lifts_conf, ext2_pair, ext2_unit/ -qed-. - -(* Advanced proprerties *****************************************************) - -lemma liftsb_inj: ∀f. is_inj2 … (liftsb f). -#f #T1 #U #H1 #T2 #H2 lapply (after_isid_dx 𝐈𝐝 … f) -/3 width=6 by liftsb_div3, liftsb_fwd_isid/ -qed-. - -lemma liftsb_mono: ∀f,T. is_mono … (liftsb f T). -#f #T #U1 #H1 #U2 #H2 lapply (after_isid_sn 𝐈𝐝 … f) -/3 width=6 by liftsb_conf, liftsb_fwd_isid/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts_vector.ma deleted file mode 100644 index 26a4fbede..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_lifts_vector.ma +++ /dev/null @@ -1,53 +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/relocation/lifts_lifts.ma". -include "basic_2/relocation/lifts_vector.ma". - -(* GENERIC RELOCATION FOR TERM VECTORS *************************************) - -(* Main properties **********************************************************) - -(* Basic_1: includes: lifts_inj *) -theorem liftsv_inj: ∀f,T1s,Us. ⬆*[f] T1s ≘ Us → - ∀T2s. ⬆*[f] T2s ≘ Us → T1s = T2s. -#f #T1s #Us #H elim H -T1s -Us -[ #T2s #H >(liftsv_inv_nil2 … H) -H // -| #T1s #Us #T1 #U #HT1U #_ #IHT1Us #X #H destruct - elim (liftsv_inv_cons2 … H) -H #T2 #T2s #HT2U #HT2Us #H destruct - >(lifts_inj … HT1U … HT2U) -U /3 width=1 by eq_f/ -] -qed-. - -(* Basic_2A1: includes: liftv_mono *) -theorem liftsv_mono: ∀f,Ts,U1s. ⬆*[f] Ts ≘ U1s → - ∀U2s. ⬆*[f] Ts ≘ U2s → U1s = U2s. -#f #Ts #U1s #H elim H -Ts -U1s -[ #U2s #H >(liftsv_inv_nil1 … H) -H // -| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct - elim (liftsv_inv_cons1 … H) -H #U2 #U2s #HTU2 #HTU2s #H destruct - >(lifts_mono … HTU1 … HTU2) -T /3 width=1 by eq_f/ -] -qed-. - -(* Basic_1: includes: lifts1_xhg (right to left) *) -(* Basic_2A1: includes: liftsv_liftv_trans_le *) -theorem liftsv_trans: ∀f1,T1s,Ts. ⬆*[f1] T1s ≘ Ts → ∀T2s,f2. ⬆*[f2] Ts ≘ T2s → - ∀f. f2 ⊚ f1 ≘ f → ⬆*[f] T1s ≘ T2s. -#f1 #T1s #Ts #H elim H -T1s -Ts -[ #T2s #f2 #H >(liftsv_inv_nil1 … H) -T2s /2 width=3 by liftsv_nil/ -| #T1s #Ts #T1 #T #HT1 #_ #IHT1s #X #f2 #H elim (liftsv_inv_cons1 … H) -H - #T2 #T2s #HT2 #HT2s #H destruct /3 width=6 by lifts_trans, liftsv_cons/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_simple.ma deleted file mode 100644 index 7d436c7b7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_simple.ma +++ /dev/null @@ -1,32 +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/syntax/term_simple.ma". -include "basic_2/relocation/lifts.ma". - -(* GENERIC RELOCATION FOR TERMS *********************************************) - -(* Forward lemmas with simple terms *****************************************) - -(* Basic_2A1: includes: lift_simple_dx *) -lemma lifts_simple_dx: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. -#f #T1 #T2 #H elim H -f -T1 -T2 // -#f #p #I #V1 #V2 #T1 #T2 #_ #_ #_ #_ #H elim (simple_inv_bind … H) -qed-. - -(* Basic_2A1: includes: lift_simple_sn *) -lemma lifts_simple_sn: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. -#f #T1 #T2 #H elim H -f -T1 -T2 // -#f #p #I #V1 #V2 #T1 #T2 #_ #_ #_ #_ #H elim (simple_inv_bind … H) -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_tdeq.ma deleted file mode 100644 index 828ee58a9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_tdeq.ma +++ /dev/null @@ -1,66 +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/syntax/tdeq.ma". -include "basic_2/relocation/lifts_lifts.ma". - -(* GENERIC RELOCATION FOR TERMS *********************************************) - -(* Properties with degree-based equivalence for terms ***********************) - -lemma tdeq_lifts_sn: ∀h,o. liftable2_sn (tdeq h o). -#h #o #T1 #T2 #H elim H -T1 -T2 [||| * ] -[ #s1 #s2 #d #Hs1 #Hs2 #f #X #H >(lifts_inv_sort1 … H) -H - /3 width=5 by lifts_sort, tdeq_sort, ex2_intro/ -| #i #f #X #H elim (lifts_inv_lref1 … H) -H - /3 width=3 by lifts_lref, tdeq_lref, ex2_intro/ -| #l #f #X #H >(lifts_inv_gref1 … H) -H - /2 width=3 by lifts_gref, tdeq_gref, ex2_intro/ -| #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H - #W1 #U1 #HVW1 #HTU1 #H destruct - elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 - /3 width=5 by lifts_bind, tdeq_pair, ex2_intro/ -| #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H - #W1 #U1 #HVW1 #HTU1 #H destruct - elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 - /3 width=5 by lifts_flat, tdeq_pair, ex2_intro/ -] -qed-. - -lemma tdeq_lifts_bi: ∀h,o. liftable2_bi (tdeq h o). -/3 width=6 by tdeq_lifts_sn, liftable2_sn_bi/ qed-. - -(* Inversion lemmas with degree-based equivalence for terms *****************) - -lemma tdeq_inv_lifts_sn: ∀h,o. deliftable2_sn (tdeq h o). -#h #o #U1 #U2 #H elim H -U1 -U2 [||| * ] -[ #s1 #s2 #d #Hs1 #Hs2 #f #X #H >(lifts_inv_sort2 … H) -H - /3 width=5 by lifts_sort, tdeq_sort, ex2_intro/ -| #i #f #X #H elim (lifts_inv_lref2 … H) -H - /3 width=3 by lifts_lref, tdeq_lref, ex2_intro/ -| #l #f #X #H >(lifts_inv_gref2 … H) -H - /2 width=3 by lifts_gref, tdeq_gref, ex2_intro/ -| #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H - #V1 #T1 #HVW1 #HTU1 #H destruct - elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 - /3 width=5 by lifts_bind, tdeq_pair, ex2_intro/ -| #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H - #V1 #T1 #HVW1 #HTU1 #H destruct - elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 - /3 width=5 by lifts_flat, tdeq_pair, ex2_intro/ -] -qed-. - -lemma tdeq_inv_lifts_bi: ∀h,o. deliftable2_bi (tdeq h o). -/3 width=6 by tdeq_inv_lifts_sn, deliftable2_sn_bi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_vector.ma deleted file mode 100644 index 8e234a5c1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_vector.ma +++ /dev/null @@ -1,137 +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/syntax/term_vector.ma". -include "basic_2/relocation/lifts.ma". - -(* GENERIC RELOCATION FOR TERM VECTORS *************************************) - -(* Basic_2A1: includes: liftv_nil liftv_cons *) -inductive liftsv (f:rtmap): relation (list term) ≝ -| liftsv_nil : liftsv f (Ⓔ) (Ⓔ) -| liftsv_cons: ∀T1s,T2s,T1,T2. - ⬆*[f] T1 ≘ T2 → liftsv f T1s T2s → - liftsv f (T1 ⨮ T1s) (T2 ⨮ T2s) -. - -interpretation "uniform relocation (term vector)" - 'RLiftStar i T1s T2s = (liftsv (uni i) T1s T2s). - -interpretation "generic relocation (term vector)" - 'RLiftStar f T1s T2s = (liftsv f T1s T2s). - -(* Basic inversion lemmas ***************************************************) - -fact liftsv_inv_nil1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → X = Ⓔ → Y = Ⓔ. -#f #X #Y * -X -Y // -#T1s #T2s #T1 #T2 #_ #_ #H destruct -qed-. - -(* Basic_2A1: includes: liftv_inv_nil1 *) -lemma liftsv_inv_nil1: ∀f,Y. ⬆*[f] Ⓔ ≘ Y → Y = Ⓔ. -/2 width=5 by liftsv_inv_nil1_aux/ qed-. - -fact liftsv_inv_cons1_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → - ∀T1,T1s. X = T1 ⨮ T1s → - ∃∃T2,T2s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & - Y = T2 ⨮ T2s. -#f #X #Y * -X -Y -[ #U1 #U1s #H destruct -| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_2A1: includes: liftv_inv_cons1 *) -lemma liftsv_inv_cons1: ∀f:rtmap. ∀T1,T1s,Y. ⬆*[f] T1 ⨮ T1s ≘ Y → - ∃∃T2,T2s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & - Y = T2 ⨮ T2s. -/2 width=3 by liftsv_inv_cons1_aux/ qed-. - -fact liftsv_inv_nil2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → Y = Ⓔ → X = Ⓔ. -#f #X #Y * -X -Y // -#T1s #T2s #T1 #T2 #_ #_ #H destruct -qed-. - -lemma liftsv_inv_nil2: ∀f,X. ⬆*[f] X ≘ Ⓔ → X = Ⓔ. -/2 width=5 by liftsv_inv_nil2_aux/ qed-. - -fact liftsv_inv_cons2_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → - ∀T2,T2s. Y = T2 ⨮ T2s → - ∃∃T1,T1s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & - X = T1 ⨮ T1s. -#f #X #Y * -X -Y -[ #U2 #U2s #H destruct -| #T1s #T2s #T1 #T2 #HT12 #HT12s #U2 #U2s #H destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma liftsv_inv_cons2: ∀f:rtmap. ∀X,T2,T2s. ⬆*[f] X ≘ T2 ⨮ T2s → - ∃∃T1,T1s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & - X = T1 ⨮ T1s. -/2 width=3 by liftsv_inv_cons2_aux/ qed-. - -(* Basic_1: was: lifts1_flat (left to right) *) -lemma lifts_inv_applv1: ∀f:rtmap. ∀V1s,U1,T2. ⬆*[f] Ⓐ V1s.U1 ≘ T2 → - ∃∃V2s,U2. ⬆*[f] V1s ≘ V2s & ⬆*[f] U1 ≘ U2 & - T2 = Ⓐ V2s.U2. -#f #V1s elim V1s -V1s -[ /3 width=5 by ex3_2_intro, liftsv_nil/ -| #V1 #V1s #IHV1s #T1 #X #H elim (lifts_inv_flat1 … H) -H - #V2 #Y #HV12 #HY #H destruct elim (IHV1s … HY) -IHV1s -HY - #V2s #T2 #HV12s #HT12 #H destruct /3 width=5 by ex3_2_intro, liftsv_cons/ -] -qed-. - -lemma lifts_inv_applv2: ∀f:rtmap. ∀V2s,U2,T1. ⬆*[f] T1 ≘ Ⓐ V2s.U2 → - ∃∃V1s,U1. ⬆*[f] V1s ≘ V2s & ⬆*[f] U1 ≘ U2 & - T1 = Ⓐ V1s.U1. -#f #V2s elim V2s -V2s -[ /3 width=5 by ex3_2_intro, liftsv_nil/ -| #V2 #V2s #IHV2s #T2 #X #H elim (lifts_inv_flat2 … H) -H - #V1 #Y #HV12 #HY #H destruct elim (IHV2s … HY) -IHV2s -HY - #V1s #T1 #HV12s #HT12 #H destruct /3 width=5 by ex3_2_intro, liftsv_cons/ -] -qed-. - -(* Basic properties *********************************************************) - -(* Basic_2A1: includes: liftv_total *) -lemma liftsv_total: ∀f. ∀T1s:list term. ∃T2s. ⬆*[f] T1s ≘ T2s. -#f #T1s elim T1s -T1s -[ /2 width=2 by liftsv_nil, ex_intro/ -| #T1 #T1s * #T2s #HT12s - elim (lifts_total T1 f) /3 width=2 by liftsv_cons, ex_intro/ -] -qed-. - -(* Basic_1: was: lifts1_flat (right to left) *) -lemma lifts_applv: ∀f:rtmap. ∀V1s,V2s. ⬆*[f] V1s ≘ V2s → - ∀T1,T2. ⬆*[f] T1 ≘ T2 → - ⬆*[f] Ⓐ V1s.T1 ≘ Ⓐ V2s.T2. -#f #V1s #V2s #H elim H -V1s -V2s /3 width=1 by lifts_flat/ -qed. - -lemma liftsv_split_trans: ∀f,T1s,T2s. ⬆*[f] T1s ≘ T2s → - ∀f1,f2. f2 ⊚ f1 ≘ f → - ∃∃Ts. ⬆*[f1] T1s ≘ Ts & ⬆*[f2] Ts ≘ T2s. -#f #T1s #T2s #H elim H -T1s -T2s -[ /2 width=3 by liftsv_nil, ex2_intro/ -| #T1s #T2s #T1 #T2 #HT12 #_ #IH #f1 #f2 #Hf - elim (IH … Hf) -IH - elim (lifts_split_trans … HT12 … Hf) -HT12 -Hf - /3 width=5 by liftsv_cons, ex2_intro/ -] -qed-. - -(* Basic_1: removed theorems 2: lifts1_nil lifts1_cons *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_weight.ma deleted file mode 100644 index 3504082ba..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_weight.ma +++ /dev/null @@ -1,25 +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/syntax/term_weight.ma". -include "basic_2/relocation/lifts.ma". - -(* GENERIC RELOCATION FOR TERMS *********************************************) - -(* Forward lemmas with weight for terms *************************************) - -(* Basic_2A1: includes: lift_fwd_tw *) -lemma lifts_fwd_tw: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → ♯{T1} = ♯{T2}. -#f #T1 #T2 #H elim H -f -T1 -T2 normalize // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_weight_bind.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_weight_bind.ma deleted file mode 100644 index f15143117..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts_weight_bind.ma +++ /dev/null @@ -1,25 +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/syntax/bind_weight.ma". -include "basic_2/relocation/lifts_weight.ma". -include "basic_2/relocation/lifts_bind.ma". - -(* GENERIC RELOCATION FOR BINDERS *******************************************) - -(* Forward lemmas with weight for binders ***********************************) - -lemma liftsb_fwd_bw: ∀f,I1,I2. ⬆*[f] I1 ≘ I2 → ♯{I1} = ♯{I2}. -#f #I1 #I2 * -I1 -I2 /2 width=2 by lifts_fwd_tw/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/seq.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/seq.ma deleted file mode 100644 index 8b833f570..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/seq.ma +++ /dev/null @@ -1,103 +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/ideqsn_3.ma". -include "basic_2/syntax/ceq_ext.ma". -include "basic_2/relocation/sex.ma". - -(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) - -(* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *) -definition seq: relation3 rtmap lenv lenv ≝ sex ceq_ext cfull. - -interpretation - "syntactic equivalence on selected entries (local environment)" - 'IdEqSn f L1 L2 = (seq f L1 L2). - -(* Basic properties *********************************************************) - -lemma seq_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2). -/2 width=3 by sex_eq_repl_back/ qed-. - -lemma seq_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2). -/2 width=3 by sex_eq_repl_fwd/ qed-. - -lemma sle_seq_trans: ∀f2,L1,L2. L1 ≡[f2] L2 → - ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2. -/2 width=3 by sle_sex_trans/ qed-. - -(* Basic_2A1: includes: lreq_refl *) -lemma seq_refl: ∀f. reflexive … (seq f). -/2 width=1 by sex_refl/ qed. - -(* Basic_2A1: includes: lreq_sym *) -lemma seq_sym: ∀f. symmetric … (seq f). -/3 width=2 by sex_sym, cext2_sym/ qed-. - -(* Basic inversion lemmas ***************************************************) - -(* Basic_2A1: includes: lreq_inv_atom1 *) -lemma seq_inv_atom1: ∀f,Y. ⋆ ≡[f] Y → Y = ⋆. -/2 width=4 by sex_inv_atom1/ qed-. - -(* Basic_2A1: includes: lreq_inv_pair1 *) -lemma seq_inv_next1: ∀g,J,K1,Y. K1.ⓘ{J} ≡[↑g] Y → - ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ{J}. -#g #J #K1 #Y #H -elim (sex_inv_next1 … H) -H #Z #K2 #HK12 #H1 #H2 destruct -<(ceq_ext_inv_eq … H1) -Z /2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *) -lemma seq_inv_push1: ∀g,J1,K1,Y. K1.ⓘ{J1} ≡[⫯g] Y → - ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ{J2}. -#g #J1 #K1 #Y #H elim (sex_inv_push1 … H) -H /2 width=4 by ex2_2_intro/ -qed-. - -(* Basic_2A1: includes: lreq_inv_atom2 *) -lemma seq_inv_atom2: ∀f,X. X ≡[f] ⋆ → X = ⋆. -/2 width=4 by sex_inv_atom2/ qed-. - -(* Basic_2A1: includes: lreq_inv_pair2 *) -lemma seq_inv_next2: ∀g,J,X,K2. X ≡[↑g] K2.ⓘ{J} → - ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ{J}. -#g #J #X #K2 #H -elim (sex_inv_next2 … H) -H #Z #K1 #HK12 #H1 #H2 destruct -<(ceq_ext_inv_eq … H1) -J /2 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *) -lemma seq_inv_push2: ∀g,J2,X,K2. X ≡[⫯g] K2.ⓘ{J2} → - ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ{J1}. -#g #J2 #X #K2 #H elim (sex_inv_push2 … H) -H /2 width=4 by ex2_2_intro/ -qed-. - -(* Basic_2A1: includes: lreq_inv_pair *) -lemma seq_inv_next: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[↑f] L2.ⓘ{I2} → - ∧∧ L1 ≡[f] L2 & I1 = I2. -#f #I1 #I2 #L1 #L2 #H elim (sex_inv_next … H) -H -/3 width=3 by ceq_ext_inv_eq, conj/ -qed-. - -(* Basic_2A1: includes: lreq_inv_succ *) -lemma seq_inv_push: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[⫯f] L2.ⓘ{I2} → L1 ≡[f] L2. -#f #I1 #I2 #L1 #L2 #H elim (sex_inv_push … H) -H /2 width=1 by conj/ -qed-. - -lemma seq_inv_tl: ∀f,I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ{I} ≡[f] L2.ⓘ{I}. -/2 width=1 by sex_inv_tl/ qed-. - -(* Basic_2A1: removed theorems 5: - lreq_pair_lt lreq_succ_lt lreq_pair_O_Y lreq_O2 lreq_inv_O_Y -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/seq_length.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/seq_length.ma deleted file mode 100644 index 4055f6638..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/seq_length.ma +++ /dev/null @@ -1,24 +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/relocation/sex_length.ma". -include "basic_2/relocation/seq.ma". - -(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) - -(* Forward lemmas with length for local environments ************************) - -(* Basic_2A1: includes: lreq_fwd_length *) -lemma seq_fwd_length: ∀f,L1,L2. L1 ≡[f] L2 → |L1| = |L2|. -/2 width=4 by sex_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/seq_seq.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/seq_seq.ma deleted file mode 100644 index cd8dbe3ea..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/seq_seq.ma +++ /dev/null @@ -1,37 +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/syntax/ceq_ext_ceq_ext.ma". -include "basic_2/relocation/sex_sex.ma". - -(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) - -(* Main properties **********************************************************) - -theorem seq_trans: ∀f. Transitive … (seq f). -/3 width=5 by sex_trans, ceq_ext_trans/ qed-. - -theorem seq_canc_sn: ∀f. left_cancellable … (seq f). -/3 width=3 by sex_canc_sn, seq_trans, seq_sym/ qed-. - -theorem seq_canc_dx: ∀f. right_cancellable … (seq f). -/3 width=3 by sex_canc_dx, seq_trans, seq_sym/ qed-. - -theorem seq_join: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → - ∀f. f1 ⋓ f2 ≘ f → L1 ≡[f] L2. -/2 width=5 by sex_join/ qed-. - -theorem seq_meet: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → - ∀f. f1 ⋒ f2 ≘ f → L1 ≡[f] L2. -/2 width=5 by sex_meet/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/sex.ma deleted file mode 100644 index 96f62f93e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex.ma +++ /dev/null @@ -1,296 +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 "ground_2/relocation/rtmap_sle.ma". -include "ground_2/relocation/rtmap_sdj.ma". -include "basic_2/notation/relations/relation_5.ma". -include "basic_2/syntax/lenv.ma". - -(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) - -inductive sex (RN,RP:relation3 lenv bind bind): rtmap → relation lenv ≝ -| sex_atom: ∀f. sex RN RP f (⋆) (⋆) -| sex_next: ∀f,I1,I2,L1,L2. - sex RN RP f L1 L2 → RN L1 I1 I2 → - sex RN RP (↑f) (L1.ⓘ{I1}) (L2.ⓘ{I2}) -| sex_push: ∀f,I1,I2,L1,L2. - sex RN RP f L1 L2 → RP L1 I1 I2 → - sex RN RP (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2}) -. - -interpretation "generic entrywise extension (local environment)" - 'Relation RN RP f L1 L2 = (sex RN RP f L1 L2). - -definition R_pw_confluent2_sex: relation3 lenv bind bind → relation3 lenv bind bind → - relation3 lenv bind bind → relation3 lenv bind bind → - relation3 lenv bind bind → relation3 lenv bind bind → - relation3 rtmap lenv bind ≝ - λR1,R2,RN1,RP1,RN2,RP2,f,L0,I0. - ∀I1. R1 L0 I0 I1 → ∀I2. R2 L0 I0 I2 → - ∀L1. L0 ⪤[RN1, RP1, f] L1 → ∀L2. L0 ⪤[RN2, RP2, f] L2 → - ∃∃I. R2 L1 I1 I & R1 L2 I2 I. - -definition sex_transitive: relation3 lenv bind bind → relation3 lenv bind bind → - relation3 lenv bind bind → - relation3 lenv bind bind → relation3 lenv bind bind → - relation3 rtmap lenv bind ≝ - λR1,R2,R3,RN,RP,f,L1,I1. - ∀I. R1 L1 I1 I → ∀L2. L1 ⪤[RN, RP, f] L2 → - ∀I2. R2 L2 I I2 → R3 L1 I1 I2. - -(* Basic inversion lemmas ***************************************************) - -fact sex_inv_atom1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → X = ⋆ → Y = ⋆. -#RN #RP #f #X #Y * -f -X -Y // -#f #I1 #I2 #L1 #L2 #_ #_ #H destruct -qed-. - -(* Basic_2A1: includes lpx_sn_inv_atom1 *) -lemma sex_inv_atom1: ∀RN,RP,f,Y. ⋆ ⪤[RN, RP, f] Y → Y = ⋆. -/2 width=6 by sex_inv_atom1_aux/ qed-. - -fact sex_inv_next1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ↑g → - ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}. -#RN #RP #f #X #Y * -f -X -Y -[ #f #g #J1 #K1 #H destruct -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_next … H2) -g destruct - /2 width=5 by ex3_2_intro/ -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_push_next … H) -] -qed-. - -(* Basic_2A1: includes lpx_sn_inv_pair1 *) -lemma sex_inv_next1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN, RP, ↑g] Y → - ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}. -/2 width=7 by sex_inv_next1_aux/ qed-. - -fact sex_inv_push1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ⫯g → - ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}. -#RN #RP #f #X #Y * -f -X -Y -[ #f #g #J1 #K1 #H destruct -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_next_push … H) -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_push … H2) -g destruct - /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma sex_inv_push1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN, RP, ⫯g] Y → - ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}. -/2 width=7 by sex_inv_push1_aux/ qed-. - -fact sex_inv_atom2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → Y = ⋆ → X = ⋆. -#RN #RP #f #X #Y * -f -X -Y // -#f #I1 #I2 #L1 #L2 #_ #_ #H destruct -qed-. - -(* Basic_2A1: includes lpx_sn_inv_atom2 *) -lemma sex_inv_atom2: ∀RN,RP,f,X. X ⪤[RN, RP, f] ⋆ → X = ⋆. -/2 width=6 by sex_inv_atom2_aux/ qed-. - -fact sex_inv_next2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ↑g → - ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}. -#RN #RP #f #X #Y * -f -X -Y -[ #f #g #J2 #K2 #H destruct -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_next … H2) -g destruct - /2 width=5 by ex3_2_intro/ -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_push_next … H) -] -qed-. - -(* Basic_2A1: includes lpx_sn_inv_pair2 *) -lemma sex_inv_next2: ∀RN,RP,g,J2,X,K2. X ⪤[RN, RP, ↑g] K2.ⓘ{J2} → - ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}. -/2 width=7 by sex_inv_next2_aux/ qed-. - -fact sex_inv_push2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ⫯g → - ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}. -#RN #RP #f #X #Y * -f -X -Y -[ #f #J2 #K2 #g #H destruct -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_next_push … H) -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_push … H2) -g destruct - /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma sex_inv_push2: ∀RN,RP,g,J2,X,K2. X ⪤[RN, RP, ⫯g] K2.ⓘ{J2} → - ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}. -/2 width=7 by sex_inv_push2_aux/ qed-. - -(* Basic_2A1: includes lpx_sn_inv_pair *) -lemma sex_inv_next: ∀RN,RP,f,I1,I2,L1,L2. - L1.ⓘ{I1} ⪤[RN, RP, ↑f] L2.ⓘ{I2} → - L1 ⪤[RN, RP, f] L2 ∧ RN L1 I1 I2. -#RN #RP #f #I1 #I2 #L1 #L2 #H elim (sex_inv_next1 … H) -H -#I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/ -qed-. - -lemma sex_inv_push: ∀RN,RP,f,I1,I2,L1,L2. - L1.ⓘ{I1} ⪤[RN, RP, ⫯f] L2.ⓘ{I2} → - L1 ⪤[RN, RP, f] L2 ∧ RP L1 I1 I2. -#RN #RP #f #I1 #I2 #L1 #L2 #H elim (sex_inv_push1 … H) -H -#I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/ -qed-. - -lemma sex_inv_tl: ∀RN,RP,f,I1,I2,L1,L2. L1 ⪤[RN, RP, ⫱f] L2 → - RN L1 I1 I2 → RP L1 I1 I2 → - L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2}. -#RN #RP #f #I1 #I2 #L2 #L2 elim (pn_split f) * -/2 width=1 by sex_next, sex_push/ -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma sex_fwd_bind: ∀RN,RP,f,I1,I2,L1,L2. - L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2} → - L1 ⪤[RN, RP, ⫱f] L2. -#RN #RP #f #I1 #I2 #L1 #L2 #Hf -elim (pn_split f) * #g #H destruct -[ elim (sex_inv_push … Hf) | elim (sex_inv_next … Hf) ] -Hf // -qed-. - -(* Basic properties *********************************************************) - -lemma sex_eq_repl_back: ∀RN,RP,L1,L2. eq_repl_back … (λf. L1 ⪤[RN, RP, f] L2). -#RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // -#f1 #I1 #I2 #L1 #L2 #_ #HI #IH #f2 #H -[ elim (eq_inv_nx … H) -H /3 width=3 by sex_next/ -| elim (eq_inv_px … H) -H /3 width=3 by sex_push/ -] -qed-. - -lemma sex_eq_repl_fwd: ∀RN,RP,L1,L2. eq_repl_fwd … (λf. L1 ⪤[RN, RP, f] L2). -#RN #RP #L1 #L2 @eq_repl_sym /2 width=3 by sex_eq_repl_back/ (**) (* full auto fails *) -qed-. - -lemma sex_refl: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f.reflexive … (sex RN RP f). -#RN #RP #HRN #HRP #f #L generalize in match f; -f elim L -L // -#L #I #IH #f elim (pn_split f) * -#g #H destruct /2 width=1 by sex_next, sex_push/ -qed. - -lemma sex_sym: ∀RN,RP. - (∀L1,L2,I1,I2. RN L1 I1 I2 → RN L2 I2 I1) → - (∀L1,L2,I1,I2. RP L1 I1 I2 → RP L2 I2 I1) → - ∀f. symmetric … (sex RN RP f). -#RN #RP #HRN #HRP #f #L1 #L2 #H elim H -L1 -L2 -f -/3 width=2 by sex_next, sex_push/ -qed-. - -lemma sex_pair_repl: ∀RN,RP,f,I1,I2,L1,L2. - L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2} → - ∀J1,J2. RN L1 J1 J2 → RP L1 J1 J2 → - L1.ⓘ{J1} ⪤[RN, RP, f] L2.ⓘ{J2}. -/3 width=3 by sex_inv_tl, sex_fwd_bind/ qed-. - -lemma sex_co: ∀RN1,RP1,RN2,RP2. RN1 ⊆ RN2 → RP1 ⊆ RP2 → - ∀f,L1,L2. L1 ⪤[RN1, RP1, f] L2 → L1 ⪤[RN2, RP2, f] L2. -#RN1 #RP1 #RN2 #RP2 #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2 -/3 width=1 by sex_atom, sex_next, sex_push/ -qed-. - -lemma sex_co_isid: ∀RN1,RP1,RN2,RP2. RP1 ⊆ RP2 → - ∀f,L1,L2. L1 ⪤[RN1, RP1, f] L2 → 𝐈⦃f⦄ → - L1 ⪤[RN2, RP2, f] L2. -#RN1 #RP1 #RN2 #RP2 #HR #f #L1 #L2 #H elim H -f -L1 -L2 // -#f #I1 #I2 #K1 #K2 #_ #HI12 #IH #H -[ elim (isid_inv_next … H) -H // -| /4 width=3 by sex_push, isid_inv_push/ -] -qed-. - -lemma sex_sdj: ∀RN,RP. RP ⊆ RN → - ∀f1,L1,L2. L1 ⪤[RN, RP, f1] L2 → - ∀f2. f1 ∥ f2 → L1 ⪤[RP, RN, f2] L2. -#RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 // -#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12 -[ elim (sdj_inv_nx … H12) -H12 [2,3: // ] - #g2 #H #H2 destruct /3 width=1 by sex_push/ -| elim (sdj_inv_px … H12) -H12 [2,4: // ] * - #g2 #H #H2 destruct /3 width=1 by sex_next, sex_push/ -] -qed-. - -lemma sle_sex_trans: ∀RN,RP. RN ⊆ RP → - ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → - ∀f1. f1 ⊆ f2 → L1 ⪤[RN, RP, f1] L2. -#RN #RP #HR #f2 #L1 #L2 #H elim H -f2 -L1 -L2 // -#f2 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f1 #H12 -[ elim (pn_split f1) * ] -[ /4 width=5 by sex_push, sle_inv_pn/ -| /4 width=5 by sex_next, sle_inv_nn/ -| elim (sle_inv_xp … H12) -H12 [2,3: // ] - #g1 #H #H1 destruct /3 width=5 by sex_push/ -] -qed-. - -lemma sle_sex_conf: ∀RN,RP. RP ⊆ RN → - ∀f1,L1,L2. L1 ⪤[RN, RP, f1] L2 → - ∀f2. f1 ⊆ f2 → L1 ⪤[RN, RP, f2] L2. -#RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 // -#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12 -[2: elim (pn_split f2) * ] -[ /4 width=5 by sex_push, sle_inv_pp/ -| /4 width=5 by sex_next, sle_inv_pn/ -| elim (sle_inv_nx … H12) -H12 [2,3: // ] - #g2 #H #H2 destruct /3 width=5 by sex_next/ -] -qed-. - -lemma sex_sle_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 → - ∀f,L1,L2. L1 ⪤[R1, RP, f] L2 → ∀g. f ⊆ g → - ∃∃L. L1 ⪤[R1, RP, g] L & L ⪤[R2, cfull, f] L2. -#R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2 -[ /2 width=3 by sex_atom, ex2_intro/ ] -#f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H -[ elim (sle_inv_nx … H ??) -H [ |*: // ] #g #Hfg #H destruct - elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, ex2_intro/ -| elim (sle_inv_px … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct - elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ -] -qed-. - -lemma sex_sdj_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 → - ∀f,L1,L2. L1 ⪤[R1, RP, f] L2 → ∀g. f ∥ g → - ∃∃L. L1 ⪤[RP, R1, g] L & L ⪤[R2, cfull, f] L2. -#R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2 -[ /2 width=3 by sex_atom, ex2_intro/ ] -#f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H -[ elim (sdj_inv_nx … H ??) -H [ |*: // ] #g #Hfg #H destruct - elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ -| elim (sdj_inv_px … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct - elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ -] -qed-. - -lemma sex_dec: ∀RN,RP. - (∀L,I1,I2. Decidable (RN L I1 I2)) → - (∀L,I1,I2. Decidable (RP L I1 I2)) → - ∀L1,L2,f. Decidable (L1 ⪤[RN, RP, f] L2). -#RN #RP #HRN #HRP #L1 elim L1 -L1 [ * | #L1 #I1 #IH * ] -[ /2 width=1 by sex_atom, or_introl/ -| #L2 #I2 #f @or_intror #H - lapply (sex_inv_atom1 … H) -H #H destruct -| #f @or_intror #H - lapply (sex_inv_atom2 … H) -H #H destruct -| #L2 #I2 #f elim (IH L2 (⫱f)) -IH #HL12 - [2: /4 width=3 by sex_fwd_bind, or_intror/ ] - elim (pn_split f) * #g #H destruct - [ elim (HRP L1 I1 I2) | elim (HRN L1 I1 I2) ] -HRP -HRN #HV12 - [1,3: /3 width=1 by sex_push, sex_next, or_introl/ ] - @or_intror #H - [ elim (sex_inv_push … H) | elim (sex_inv_next … H) ] -H - /2 width=1 by/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_length.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_length.ma deleted file mode 100644 index 86473e631..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_length.ma +++ /dev/null @@ -1,46 +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/syntax/lenv_length.ma". -include "basic_2/relocation/sex.ma". - -(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) - -(* Forward lemmas with length for local environments ************************) - -lemma sex_fwd_length: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → |L1| = |L2|. -#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 // -#f #I1 #I2 #L1 #L2 >length_bind >length_bind // -qed-. - -(* Properties with length for local environments ****************************) - -lemma sex_length_cfull: ∀L1,L2. |L1| = |L2| → ∀f. L1 ⪤[cfull, cfull, f] L2. -#L1 elim L1 -L1 -[ #Y2 #H >(length_inv_zero_sn … H) -Y2 // -| #L1 #I1 #IH #Y2 #H #f - elim (length_inv_succ_sn … H) -H #I2 #L2 #HL12 #H destruct - elim (pn_split f) * #g #H destruct /3 width=1 by sex_next, sex_push/ -] -qed. - -lemma sex_length_isid: ∀R,L1,L2. |L1| = |L2| → - ∀f. 𝐈⦃f⦄ → L1 ⪤[R, cfull, f] L2. -#R #L1 elim L1 -L1 -[ #Y2 #H >(length_inv_zero_sn … H) -Y2 // -| #L1 #I1 #IH #Y2 #H #f #Hf - elim (length_inv_succ_sn … H) -H #I2 #L2 #HL12 #H destruct - elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct /3 width=1 by sex_push/ -] -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_sex.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_sex.ma deleted file mode 100644 index df181b7f6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_sex.ma +++ /dev/null @@ -1,119 +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 "ground_2/relocation/rtmap_sand.ma". -include "basic_2/relocation/drops.ma". - -(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) - -(* Main properties **********************************************************) - -theorem sex_trans_gen (RN1) (RP1) (RN2) (RP2) (RN) (RP): - ∀L1,f. - (∀g,I,K,n. ⬇*[n] L1 ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → sex_transitive RN1 RN2 RN RN1 RP1 g K I) → - (∀g,I,K,n. ⬇*[n] L1 ≘ K.ⓘ{I} → ⫯g = ⫱*[n] f → sex_transitive RP1 RP2 RP RN1 RP1 g K I) → - ∀L0. L1 ⪤[RN1, RP1, f] L0 → - ∀L2. L0 ⪤[RN2, RP2, f] L2 → - L1 ⪤[RN, RP, f] L2. -#RN1 #RP1 #RN2 #RP2 #RN #RP #L1 elim L1 -L1 -[ #f #_ #_ #L0 #H1 #L2 #H2 - lapply (sex_inv_atom1 … H1) -H1 #H destruct - lapply (sex_inv_atom1 … H2) -H2 #H destruct - /2 width=1 by sex_atom/ -| #K1 #I1 #IH #f elim (pn_split f) * #g #H destruct - #HN #HP #L0 #H1 #L2 #H2 - [ elim (sex_inv_push1 … H1) -H1 #I0 #K0 #HK10 #HI10 #H destruct - elim (sex_inv_push1 … H2) -H2 #I2 #K2 #HK02 #HI02 #H destruct - lapply (HP … 0 … HI10 … HK10 … HI02) -HI10 -HI02 /2 width=2 by drops_refl/ #HI12 - lapply (IH … HK10 … HK02) -IH -K0 /3 width=3 by sex_push, drops_drop/ - | elim (sex_inv_next1 … H1) -H1 #I0 #K0 #HK10 #HI10 #H destruct - elim (sex_inv_next1 … H2) -H2 #I2 #K2 #HK02 #HI02 #H destruct - lapply (HN … 0 … HI10 … HK10 … HI02) -HI10 -HI02 /2 width=2 by drops_refl/ #HI12 - lapply (IH … HK10 … HK02) -IH -K0 /3 width=3 by sex_next, drops_drop/ - ] -] -qed-. - -theorem sex_trans (RN) (RP) (f): (∀g,I,K. sex_transitive RN RN RN RN RP g K I) → - (∀g,I,K. sex_transitive RP RP RP RN RP g K I) → - Transitive … (sex RN RP f). -/2 width=9 by sex_trans_gen/ qed-. - -theorem sex_trans_id_cfull: ∀R1,R2,R3,L1,L,f. L1 ⪤[R1, cfull, f] L → 𝐈⦃f⦄ → - ∀L2. L ⪤[R2, cfull, f] L2 → L1 ⪤[R3, cfull, f] L2. -#R1 #R2 #R3 #L1 #L #f #H elim H -L1 -L -f -[ #f #Hf #L2 #H >(sex_inv_atom1 … H) -L2 // ] -#f #I1 #I #K1 #K #HK1 #_ #IH #Hf #L2 #H -[ elim (isid_inv_next … Hf) | lapply (isid_inv_push … Hf ??) ] -Hf [5: |*: // ] #Hf -elim (sex_inv_push1 … H) -H #I2 #K2 #HK2 #_ #H destruct -/3 width=1 by sex_push/ -qed-. - -theorem sex_conf (RN1) (RP1) (RN2) (RP2): - ∀L,f. - (∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → R_pw_confluent2_sex RN1 RN2 RN1 RP1 RN2 RP2 g K I) → - (∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ⫯g = ⫱*[n] f → R_pw_confluent2_sex RP1 RP2 RN1 RP1 RN2 RP2 g K I) → - pw_confluent2 … (sex RN1 RP1 f) (sex RN2 RP2 f) L. -#RN1 #RP1 #RN2 #RP2 #L elim L -L -[ #f #_ #_ #L1 #H1 #L2 #H2 >(sex_inv_atom1 … H1) >(sex_inv_atom1 … H2) -H2 -H1 - /2 width=3 by sex_atom, ex2_intro/ -| #L #I0 #IH #f elim (pn_split f) * #g #H destruct - #HN #HP #Y1 #H1 #Y2 #H2 - [ elim (sex_inv_push1 … H1) -H1 #I1 #L1 #HL1 #HI01 #H destruct - elim (sex_inv_push1 … H2) -H2 #I2 #L2 #HL2 #HI02 #H destruct - elim (HP … 0 … HI01 … HI02 … HL1 … HL2) -HI01 -HI02 /2 width=2 by drops_refl/ #I #HI1 #HI2 - elim (IH … HL1 … HL2) -IH -HL1 -HL2 /3 width=5 by drops_drop, sex_push, ex2_intro/ - | elim (sex_inv_next1 … H1) -H1 #I1 #L1 #HL1 #HI01 #H destruct - elim (sex_inv_next1 … H2) -H2 #I2 #L2 #HL2 #HI02 #H destruct - elim (HN … 0 … HI01 … HI02 … HL1 … HL2) -HI01 -HI02 /2 width=2 by drops_refl/ #I #HI1 #HI2 - elim (IH … HL1 … HL2) -IH -HL1 -HL2 /3 width=5 by drops_drop, sex_next, ex2_intro/ - ] -] -qed-. - -theorem sex_canc_sn: ∀RN,RP,f. Transitive … (sex RN RP f) → - symmetric … (sex RN RP f) → - left_cancellable … (sex RN RP f). -/3 width=3 by/ qed-. - -theorem sex_canc_dx: ∀RN,RP,f. Transitive … (sex RN RP f) → - symmetric … (sex RN RP f) → - right_cancellable … (sex RN RP f). -/3 width=3 by/ qed-. - -lemma sex_meet: ∀RN,RP,L1,L2. - ∀f1. L1 ⪤[RN, RP, f1] L2 → - ∀f2. L1 ⪤[RN, RP, f2] L2 → - ∀f. f1 ⋒ f2 ≘ f → L1 ⪤[RN, RP, f] L2. -#RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // -#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H #f #Hf -elim (pn_split f2) * #g2 #H2 destruct -try elim (sex_inv_push … H) try elim (sex_inv_next … H) -H -[ elim (sand_inv_npx … Hf) | elim (sand_inv_nnx … Hf) -| elim (sand_inv_ppx … Hf) | elim (sand_inv_pnx … Hf) -] -Hf /3 width=5 by sex_next, sex_push/ -qed-. - -lemma sex_join: ∀RN,RP,L1,L2. - ∀f1. L1 ⪤[RN, RP, f1] L2 → - ∀f2. L1 ⪤[RN, RP, f2] L2 → - ∀f. f1 ⋓ f2 ≘ f → L1 ⪤[RN, RP, f] L2. -#RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // -#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H #f #Hf -elim (pn_split f2) * #g2 #H2 destruct -try elim (sex_inv_push … H) try elim (sex_inv_next … H) -H -[ elim (sor_inv_npx … Hf) | elim (sor_inv_nnx … Hf) -| elim (sor_inv_ppx … Hf) | elim (sor_inv_pnx … Hf) -] -Hf /3 width=5 by sex_next, sex_push/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_tc.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_tc.ma deleted file mode 100644 index b2134410b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/sex_tc.ma +++ /dev/null @@ -1,119 +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 "ground_2/lib/star.ma". -include "basic_2/relocation/sex.ma". - -(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) - -definition s_rs_transitive_isid: relation (relation3 lenv bind bind) ≝ λRN,RP. - ∀f. 𝐈⦃f⦄ → s_rs_transitive … RP (λ_.sex RN RP f). - -(* Properties with transitive closure ***************************************) - -lemma sex_tc_refl: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f. reflexive … (TC … (sex RN RP f)). -/3 width=1 by sex_refl, TC_reflexive/ qed. - -lemma sex_tc_next_sn: ∀RN,RP. c_reflexive … RN → - ∀f,I2,L1,L2. TC … (sex RN RP f) L1 L2 → ∀I1. RN L1 I1 I2 → - TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). -#RN #RP #HRN #f #I2 #L1 #L2 #H @(TC_ind_dx ??????? H) -L1 -/3 width=3 by sex_next, TC_strap, inj/ -qed. - -lemma sex_tc_next_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. L1 ⪤[RN, RP, f] L2 → - TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). -#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 -/4 width=5 by sex_refl, sex_next, step, inj/ -qed. - -lemma sex_tc_push_sn: ∀RN,RP. c_reflexive … RP → - ∀f,I2,L1,L2. TC … (sex RN RP f) L1 L2 → ∀I1. RP L1 I1 I2 → - TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). -#RN #RP #HRP #f #I2 #L1 #L2 #H @(TC_ind_dx ??????? H) -L1 -/3 width=3 by sex_push, TC_strap, inj/ -qed. - -lemma sex_tc_push_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. L1 ⪤[RN, RP, f] L2 → - TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). -#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 -/4 width=5 by sex_refl, sex_push, step, inj/ -qed. - -lemma sex_tc_inj_sn: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → L1 ⪤[CTC … RN, RP, f] L2. -#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 -/3 width=1 by sex_push, sex_next, inj/ -qed. - -lemma sex_tc_inj_dx: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → L1 ⪤[RN, CTC … RP, f] L2. -#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 -/3 width=1 by sex_push, sex_next, inj/ -qed. - -(* Main properties with transitive closure **********************************) - -theorem sex_tc_next: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. TC … (sex RN RP f) L1 L2 → - TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). -#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 -/4 width=5 by sex_tc_next_sn, sex_tc_refl, trans_TC/ -qed. - -theorem sex_tc_push: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. TC … (sex RN RP f) L1 L2 → - TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). -#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 -/4 width=5 by sex_tc_push_sn, sex_tc_refl, trans_TC/ -qed. - -(* Basic_2A1: uses: TC_lpx_sn_ind *) -theorem sex_tc_step_dx: ∀RN,RP. s_rs_transitive_isid RN RP → - ∀f,L1,L. L1 ⪤[RN, RP, f] L → 𝐈⦃f⦄ → - ∀L2. L ⪤[RN, CTC … RP, f] L2 → L1⪤ [RN, CTC … RP, f] L2. -#RN #RP #HRP #f #L1 #L #H elim H -f -L1 -L -[ #f #_ #Y #H -HRP >(sex_inv_atom1 … H) -Y // ] -#f #I1 #I #L1 #L #HL1 #HI1 #IH #Hf #Y #H -[ elim (isid_inv_next … Hf) -Hf // -| lapply (isid_inv_push … Hf ??) -Hf [3: |*: // ] #Hf - elim (sex_inv_push1 … H) -H #I2 #L2 #HL2 #HI2 #H destruct - @sex_push [ /2 width=1 by/ ] -L2 -IH - @(TC_strap … HI1) -HI1 - @(HRP … HL1) // (**) (* auto fails *) -] -qed-. - -(* Advanced properties ******************************************************) - -lemma sex_tc_dx: ∀RN,RP. s_rs_transitive_isid RN RP → - ∀f. 𝐈⦃f⦄ → ∀L1,L2. TC … (sex RN RP f) L1 L2 → L1 ⪤[RN, CTC … RP, f] L2. -#RN #RP #HRP #f #Hf #L1 #L2 #H @(TC_ind_dx ??????? H) -L1 -/3 width=3 by sex_tc_step_dx, sex_tc_inj_dx/ -qed. - -(* Advanced inversion lemmas ************************************************) - -lemma sex_inv_tc_sn: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f,L1,L2. L1 ⪤[CTC … RN, RP, f] L2 → TC … (sex RN RP f) L1 L2. -#RN #RP #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2 -/2 width=1 by sex_tc_next, sex_tc_push_sn, sex_atom, inj/ -qed-. - -lemma sex_inv_tc_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → - ∀f,L1,L2. L1 ⪤[RN, CTC … RP, f] L2 → TC … (sex RN RP f) L1 L2. -#RN #RP #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2 -/2 width=1 by sex_tc_push, sex_tc_next_sn, sex_atom, inj/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_drops.ma index dce2cecf5..0e1d62090 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_ltc.ma". +include "static_2/relocation/drops_ltc.ma". include "basic_2/rt_transition/cpm_drops.ma". include "basic_2/rt_computation/cpms.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_ext.ma index 01da390f0..e69b27a31 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_ext.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_ext.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/cext2.ma". +include "static_2/syntax/cext2.ma". include "basic_2/rt_computation/cpms.ma". (* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR BINDERS *********************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_drops.ma index aac7f8c36..c42f94f83 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_ctc.ma". +include "static_2/relocation/drops_ctc.ma". include "basic_2/rt_transition/cpx_drops.ma". include "basic_2/rt_computation/cpxs.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_ext.ma index c600cc7d0..c3280871a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_ext.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_ext.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/cext2.ma". +include "static_2/syntax/cext2.ma". include "basic_2/rt_computation/cpxs.ma". (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR BINDERS ************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fdeq.ma index 16675efdb..1db09aeb5 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/fdeq.ma". +include "static_2/static/fdeq.ma". include "basic_2/rt_computation/cpxs_rdeq.ma". (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma index ae05d817e..d9e982b5e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/theq_tdeq.ma". +include "static_2/syntax/theq_tdeq.ma". include "basic_2/rt_computation/cpxs_lsubr.ma". include "basic_2/rt_computation/cpxs_cnx.ma". include "basic_2/rt_computation/lpxs_cpxs.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma index 9fb405b0c..147867a8b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/syntax/theq_simple_vector.ma". -include "basic_2/relocation/lifts_vector.ma". +include "static_2/syntax/theq_simple_vector.ma". +include "static_2/relocation/lifts_vector.ma". include "basic_2/rt_computation/cpxs_theq.ma". (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma index da0bbe1ee..4c8371a0b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predtystrong_5.ma". -include "basic_2/syntax/tdeq.ma". +include "static_2/syntax/tdeq.ma". include "basic_2/rt_transition/cpx.ma". (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma index 4d54a74a5..6cc0664aa 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/gcp_aaa.ma". +include "static_2/static/gcp_aaa.ma". include "basic_2/rt_computation/cpxs_aaa.ma". include "basic_2/rt_computation/csx_gcp.ma". include "basic_2/rt_computation/csx_gcr.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_drops.ma index 84c7ec146..c0ecbf084 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lifts_tdeq.ma". +include "static_2/relocation/lifts_tdeq.ma". include "basic_2/rt_transition/cpx_drops.ma". include "basic_2/rt_computation/csx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fdeq.ma index f8978c4cd..7c58163b3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/fdeq.ma". +include "static_2/static/fdeq.ma". include "basic_2/rt_computation/csx_rdeq.ma". (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fqus.ma index 69cf8e20a..0943a9add 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fqus.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/s_computation/fqus.ma". +include "static_2/s_computation/fqus.ma". include "basic_2/rt_computation/csx_lsubr.ma". (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcp.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcp.ma index 8ff4067e0..f5b170930 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcp.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcp.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/gcp.ma". +include "static_2/static/gcp.ma". include "basic_2/rt_transition/cnx_drops.ma". include "basic_2/rt_computation/csx_drops.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcr.ma index 668b023d5..03970d35b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcr.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/gcp_cr.ma". +include "static_2/static/gcp_cr.ma". include "basic_2/rt_computation/csx_cnx_vector.ma". include "basic_2/rt_computation/csx_csx_vector.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma index 54ef85a48..cc286ae6a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/syntax/theq_simple.ma". -include "basic_2/syntax/theq_theq.ma". +include "static_2/syntax/theq_simple.ma". +include "static_2/syntax/theq_theq.ma". include "basic_2/rt_transition/cpx_simple.ma". include "basic_2/rt_computation/cpxs.ma". include "basic_2/rt_computation/csx_csx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_vector.ma index 5d0552b95..32afe79a4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_vector.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_vector.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/term_vector.ma". +include "static_2/syntax/term_vector.ma". include "basic_2/rt_computation/csx.ma". (* STRONGLY NORMALIZING TERMS VECTORS FOR UNBOUND PARALLEL RT-TRANSITION ****) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma index 5608b1ff8..3641326f8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/fdeq_fqup.ma". -include "basic_2/static/fdeq_fdeq.ma". +include "static_2/static/fdeq_fqup.ma". +include "static_2/static/fdeq_fdeq.ma". include "basic_2/rt_transition/fpbq_fpb.ma". include "basic_2/rt_computation/fpbg.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma index b1e12a7a6..b625f889b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/s_computation/fqus_fqup.ma". -include "basic_2/static/fdeq_fqup.ma". +include "static_2/s_computation/fqus_fqup.ma". +include "static_2/static/fdeq_fqup.ma". include "basic_2/rt_computation/fpbs_fqus.ma". (* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqus.ma index 3c8274371..db3925f71 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqus.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/s_computation/fqus.ma". +include "static_2/s_computation/fqus.ma". include "basic_2/rt_computation/fpbs.ma". (* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma index 3a67b6f49..2760e2a33 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/fdeq_fqus.ma". -include "basic_2/static/fdeq_fdeq.ma". +include "static_2/static/fdeq_fqus.ma". +include "static_2/static/fdeq_fdeq.ma". include "basic_2/rt_computation/cpxs_fqus.ma". include "basic_2/rt_computation/cpxs_fdeq.ma". include "basic_2/rt_computation/lpxs_fdeq.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs.ma index 1ee9f365b..880278d22 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predsnstar_4.ma". -include "basic_2/relocation/lex.ma". +include "static_2/relocation/lex.ma". include "basic_2/rt_computation/cprs_ext.ma". (* PARALLEL R-COMPUTATION FOR FULL LOCAL ENVIRONMENTS ***********************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_drops.ma index aeef8e87a..ae0bcc6b4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_lex.ma". +include "static_2/relocation/drops_lex.ma". include "basic_2/rt_computation/cpms_drops.ma". (* PARALLEL R-COMPUTATION FOR FULL LOCAL ENVIRONMENTS ***********************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_length.ma index a488b1a3f..ae38e76a4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_length.ma". +include "static_2/relocation/lex_length.ma". include "basic_2/rt_computation/lprs.ma". (* PARALLEL R-COMPUTATION FOR FULL LOCAL ENVIRONMENTS ***********************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_tc.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_tc.ma index cec8e47f5..122051b4d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_tc.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_tc.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_tc.ma". +include "static_2/relocation/lex_tc.ma". include "basic_2/rt_computation/lprs_ctc.ma". include "basic_2/rt_computation/cprs_lpr.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs.ma index 61fa33126..322f43712 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predtysnstar_4.ma". -include "basic_2/relocation/lex.ma". +include "static_2/relocation/lex.ma". include "basic_2/rt_computation/cpxs_ext.ma". (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_drops.ma index 0482e3d19..9578dad4e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_lex.ma". +include "static_2/relocation/drops_lex.ma". include "basic_2/rt_computation/cpxs_drops.ma". (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_fdeq.ma index 3a280f96f..8a5676cc0 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_fdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_fdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/fdeq.ma". +include "static_2/static/fdeq.ma". include "basic_2/rt_computation/lpxs_rdeq.ma". (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_length.ma index 46dbd458d..fd664b95c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_length.ma". +include "static_2/relocation/lex_length.ma". include "basic_2/rt_computation/lpxs.ma". (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpx.ma index 96def5301..52a418617 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpx.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_tc.ma". +include "static_2/relocation/lex_tc.ma". include "basic_2/rt_computation/cpxs_lpx.ma". include "basic_2/rt_computation/lpxs.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpxs.ma index 861762abd..e20b65982 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpxs.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_lex.ma". +include "static_2/relocation/lex_lex.ma". include "basic_2/rt_computation/lpxs_lpx.ma". (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma index 3ec296cfa..5b62dbae1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predtysnstrong_5.ma". -include "basic_2/static/rdeq.ma". +include "static_2/static/rdeq.ma". include "basic_2/rt_transition/lpx.ma". (* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma index 6f0cc4da0..ed5e99053 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_drops.ma". +include "static_2/static/rdeq_drops.ma". include "basic_2/rt_transition/lpx_drops.ma". include "basic_2/rt_computation/rdsx_length.ma". include "basic_2/rt_computation/rdsx_fqup.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma index 6216111e0..2913cb998 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_fqup.ma". +include "static_2/static/rdeq_fqup.ma". include "basic_2/rt_computation/rdsx.ma". (* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma index e6ccab06a..22451994b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_length.ma". +include "static_2/static/rdeq_length.ma". include "basic_2/rt_transition/lpx_length.ma". include "basic_2/rt_computation/rdsx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma index 5aa9c9710..13e746d7f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predtynormal_5.ma". -include "basic_2/syntax/tdeq.ma". +include "static_2/syntax/tdeq.ma". include "basic_2/rt_transition/cpx.ma". (* NORMAL TERMS FOR UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma index c2479807a..2e593f991 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lifts_tdeq.ma". +include "static_2/relocation/lifts_tdeq.ma". include "basic_2/rt_transition/cpx_drops.ma". include "basic_2/rt_transition/cnx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg.ma index f640625ca..0ca16ee93 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg.ma @@ -15,10 +15,10 @@ include "ground_2/steps/rtc_max.ma". include "ground_2/steps/rtc_plus.ma". include "basic_2/notation/relations/predty_7.ma". -include "basic_2/syntax/item_sh.ma". -include "basic_2/syntax/lenv.ma". -include "basic_2/syntax/genv.ma". -include "basic_2/relocation/lifts.ma". +include "static_2/syntax/item_sh.ma". +include "static_2/syntax/lenv.ma". +include "static_2/syntax/genv.ma". +include "static_2/relocation/lifts.ma". (* BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *****************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_drops.ma index 8a5f96f91..a98e061f3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_drops.ma @@ -12,9 +12,9 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_drops.ma". -include "basic_2/s_computation/fqup_weight.ma". -include "basic_2/s_computation/fqup_drops.ma". +include "static_2/relocation/drops_drops.ma". +include "static_2/s_computation/fqup_weight.ma". +include "static_2/s_computation/fqup_drops.ma". include "basic_2/rt_transition/cpg.ma". (* BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *****************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_lsubr.ma index fcb9275a1..ed99d317a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_lsubr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_lsubr.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/lsubr.ma". +include "static_2/static/lsubr.ma". include "basic_2/rt_transition/cpg.ma". (* BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *****************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_simple.ma index c914decba..39228c247 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_simple.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_simple.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/term_simple.ma". +include "static_2/syntax/term_simple.ma". include "basic_2/rt_transition/cpg.ma". (* BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *****************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_ext.ma index c76a80fcc..3e3020fc3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_ext.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_ext.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/cext2.ma". +include "static_2/syntax/cext2.ma". include "basic_2/rt_transition/cpm.ma". (* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR BINDERS **********************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_ext.ma index a12c86faa..9e6020a22 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_ext.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_ext.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/syntax/cext2.ma". +include "static_2/syntax/cext2.ma". include "basic_2/rt_transition/cpx.ma". (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR BINDERS *************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fdeq.ma index 3a86118e1..5124d8684 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/fdeq.ma". +include "static_2/static/fdeq.ma". include "basic_2/rt_transition/cpx_rdeq.ma". include "basic_2/rt_transition/rpx_rdeq.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma index e4c7db152..c500be141 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma @@ -14,8 +14,8 @@ (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************) -include "basic_2/relocation/lifts_tdeq.ma". -include "basic_2/s_computation/fqus_fqup.ma". +include "static_2/relocation/lifts_tdeq.ma". +include "static_2/s_computation/fqus_fqup.ma". include "basic_2/rt_transition/cpx_drops.ma". include "basic_2/rt_transition/cpx_lsubr.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_rdeq.ma index 1f5e4a9bb..33f937a22 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_rdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_rdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_rdeq.ma". +include "static_2/static/rdeq_rdeq.ma". include "basic_2/rt_transition/rpx_fsle.ma". (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma index 44dcfb53c..a836bfbea 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/req.ma". +include "static_2/static/req.ma". include "basic_2/rt_transition/rpx_fsle.ma". (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma index 6d163a685..51c414112 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma @@ -13,8 +13,8 @@ (**************************************************************************) include "basic_2/notation/relations/predsubtyproper_8.ma". -include "basic_2/s_transition/fqu.ma". -include "basic_2/static/rdeq.ma". +include "static_2/s_transition/fqu.ma". +include "static_2/static/rdeq.ma". include "basic_2/rt_transition/lpr_lpx.ma". (* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_fdeq.ma index 4aaf35624..a0d041980 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_fdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_fdeq.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/s_transition/fqu_tdeq.ma". -include "basic_2/static/fdeq.ma". +include "static_2/s_transition/fqu_tdeq.ma". +include "static_2/static/fdeq.ma". include "basic_2/rt_transition/fpb_rdeq.ma". (* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_rdeq.ma index 6f9a66c72..eab2408fe 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_rdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_rdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_fqus.ma". +include "static_2/static/rdeq_fqus.ma". include "basic_2/rt_transition/cpx_rdeq.ma". include "basic_2/rt_transition/lpx_rdeq.ma". include "basic_2/rt_transition/fpb.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma index 12bd824fa..a652d5c18 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma @@ -13,8 +13,8 @@ (**************************************************************************) include "basic_2/notation/relations/predsubty_8.ma". -include "basic_2/static/fdeq.ma". -include "basic_2/s_transition/fquq.ma". +include "static_2/static/fdeq.ma". +include "static_2/s_transition/fquq.ma". include "basic_2/rt_transition/lpr_lpx.ma". (* PARALLEL RST-TRANSITION FOR CLOSURES *************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma index 55b946e58..7f539a77c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/aaa_fqus.ma". -include "basic_2/static/aaa_fdeq.ma". +include "static_2/static/aaa_fqus.ma". +include "static_2/static/aaa_fdeq.ma". include "basic_2/rt_transition/lpx_aaa.ma". include "basic_2/rt_transition/fpbq.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr.ma index e983823c1..f69cb5e67 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predsn_4.ma". -include "basic_2/relocation/lex.ma". +include "static_2/relocation/lex.ma". include "basic_2/rt_transition/cpr_ext.ma". (* PARALLEL R-TRANSITION FOR FULL LOCAL ENVIRONMENTS ************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_drops.ma index 2deb80367..b781f4f22 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_lex.ma". +include "static_2/relocation/drops_lex.ma". include "basic_2/rt_transition/cpm_drops.ma". include "basic_2/rt_transition/lpr.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_fquq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_fquq.ma index 70c4f676d..e1256efc5 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_fquq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_fquq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/s_transition/fquq.ma". +include "static_2/s_transition/fquq.ma". include "basic_2/rt_transition/cpm_drops.ma". include "basic_2/rt_transition/cpm_lsubr.ma". include "basic_2/rt_transition/cpr.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_length.ma index a00bda146..51f2da5f2 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_length.ma". +include "static_2/relocation/lex_length.ma". include "basic_2/rt_transition/lpr.ma". (* PARALLEL R-TRANSITION FOR FULL LOCAL ENVIRONMENTS ************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_lpr.ma index a4b3e42c3..3726639cd 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_lpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_lpr.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_lex.ma". +include "static_2/relocation/lex_lex.ma". include "basic_2/rt_transition/cpm_lsubr.ma". include "basic_2/rt_transition/cpr.ma". include "basic_2/rt_transition/cpr_drops.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma index db127642d..ae782872c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predtysn_4.ma". -include "basic_2/relocation/lex.ma". +include "static_2/relocation/lex.ma". include "basic_2/rt_transition/cpx_ext.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS ***************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_aaa.ma index 1091f0f9a..aaa4e94e7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_aaa.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/aaa_drops.ma". -include "basic_2/static/lsuba_aaa.ma". +include "static_2/static/aaa_drops.ma". +include "static_2/static/lsuba_aaa.ma". include "basic_2/rt_transition/lpx_drops.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS ***************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_drops.ma index 330ddecc4..21577aab4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/drops_lex.ma". +include "static_2/relocation/drops_lex.ma". include "basic_2/rt_transition/cpx_drops.ma". include "basic_2/rt_transition/lpx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_fquq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_fquq.ma index 2df357c91..11ae99e7d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_fquq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_fquq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/s_transition/fquq.ma". +include "static_2/s_transition/fquq.ma". include "basic_2/rt_transition/lpx.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS ***************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_length.ma index 1c8a2b9b6..29b3e5e46 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/relocation/lex_length.ma". +include "static_2/relocation/lex_length.ma". include "basic_2/rt_transition/lpx.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS ***************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_rdeq.ma index f63af0dcf..583214a04 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_rdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_rdeq.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_req.ma". +include "static_2/static/rdeq_req.ma". include "basic_2/rt_transition/rpx_rdeq.ma". include "basic_2/rt_transition/rpx_lpx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx.ma index 76364b2f1..f45abc6d7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/predtysn_5.ma". -include "basic_2/static/rex.ma". +include "static_2/static/rex.ma". include "basic_2/rt_transition/cpx_ext.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fqup.ma index 1b49ca7d3..8a71e9b6a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fqup.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rex_fqup.ma". +include "static_2/static/rex_fqup.ma". include "basic_2/rt_transition/rpx.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fsle.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fsle.ma index 05b8ba41c..d26a5d557 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fsle.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fsle.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/fsle_drops.ma". -include "basic_2/static/rex_fsle.ma". +include "static_2/static/fsle_drops.ma". +include "static_2/static/rex_fsle.ma". include "basic_2/rt_transition/rpx_length.ma". include "basic_2/rt_transition/rpx_fqup.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_length.ma index fe095d1df..209b010ed 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rex_length.ma". +include "static_2/static/rex_length.ma". include "basic_2/rt_transition/rpx.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma index 585078496..24e840b1f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rex_lex.ma". +include "static_2/static/rex_lex.ma". include "basic_2/rt_transition/rpx_fsle.ma". include "basic_2/rt_transition/lpx.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rdeq.ma index e2513c96f..42478e2b6 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rdeq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rdeq.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/rdeq_fqup.ma". -include "basic_2/static/rdeq_rdeq.ma". +include "static_2/static/rdeq_fqup.ma". +include "static_2/static/rdeq_rdeq.ma". include "basic_2/rt_transition/rpx_fsle.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rpx.ma index b5ccfa88c..56899e45d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rpx.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/rex_rex.ma". +include "static_2/static/rex_rex.ma". include "basic_2/rt_transition/rpx.ma". (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup.ma deleted file mode 100644 index a30e03a45..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup.ma +++ /dev/null @@ -1,86 +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 "ground_2/lib/star.ma". -include "basic_2/notation/relations/suptermplus_6.ma". -include "basic_2/notation/relations/suptermplus_7.ma". -include "basic_2/s_transition/fqu.ma". - -(* PLUS-ITERATED SUPCLOSURE *************************************************) - -definition fqup: bool → tri_relation genv lenv term ≝ - λb. tri_TC … (fqu b). - -interpretation "extended plus-iterated structural successor (closure)" - 'SupTermPlus b G1 L1 T1 G2 L2 T2 = (fqup b G1 L1 T1 G2 L2 T2). - -interpretation "plus-iterated structural successor (closure)" - 'SupTermPlus G1 L1 T1 G2 L2 T2 = (fqup true G1 L1 T1 G2 L2 T2). - -(* Basic properties *********************************************************) - -lemma fqu_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -/2 width=1 by tri_inj/ qed. - -lemma fqup_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -/2 width=5 by tri_step/ qed. - -lemma fqup_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. - ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -/2 width=5 by tri_TC_strap/ qed. - -lemma fqup_pair_sn: ∀b,I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+[b] ⦃G, L, V⦄. -/2 width=1 by fqu_pair_sn, fqu_fqup/ qed. - -lemma fqup_bind_dx: ∀b,p,I,G,L,V,T. ⦃G, L, ⓑ{p,I}V.T⦄ ⊐+[b] ⦃G, L.ⓑ{I}V, T⦄. -/2 width=1 by fqu_bind_dx, fqu_fqup/ qed. - -lemma fqup_clear: ∀p,I,G,L,V,T. ⦃G, L, ⓑ{p,I}V.T⦄ ⊐+[Ⓕ] ⦃G, L.ⓧ, T⦄. -/3 width=1 by fqu_clear, fqu_fqup/ qed. - -lemma fqup_flat_dx: ∀b,I,G,L,V,T. ⦃G, L, ⓕ{I}V.T⦄ ⊐+[b] ⦃G, L, T⦄. -/2 width=1 by fqu_flat_dx, fqu_fqup/ qed. - -lemma fqup_flat_dx_pair_sn: ∀b,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.②{I2}V2.T⦄ ⊐+[b] ⦃G, L, V2⦄. -/2 width=5 by fqu_pair_sn, fqup_strap1/ qed. - -lemma fqup_bind_dx_flat_dx: ∀b,p,G,I1,I2,L,V1,V2,T. ⦃G, L, ⓑ{p,I1}V1.ⓕ{I2}V2.T⦄ ⊐+[b] ⦃G, L.ⓑ{I1}V1, T⦄. -/2 width=5 by fqu_flat_dx, fqup_strap1/ qed. - -lemma fqup_flat_dx_bind_dx: ∀b,p,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.ⓑ{p,I2}V2.T⦄ ⊐+[b] ⦃G, L.ⓑ{I2}V2, T⦄. -/2 width=5 by fqu_bind_dx, fqup_strap1/ qed. - -(* Basic eliminators ********************************************************) - -lemma fqup_ind: ∀b,G1,L1,T1. ∀Q:relation3 …. - (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → - (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2. -#b #G1 #L1 #T1 #Q #IH1 #IH2 #G2 #L2 #T2 #H -@(tri_TC_ind … IH1 IH2 G2 L2 T2 H) -qed-. - -lemma fqup_ind_dx: ∀b,G2,L2,T2. ∀Q:relation3 …. - (∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1) → - (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) → - ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1. -#b #G2 #L2 #T2 #Q #IH1 #IH2 #G1 #L1 #T1 #H -@(tri_TC_ind_dx … IH1 IH2 G1 L1 T1 H) -qed-. - -(* Basic_2A1: removed theorems 1: fqup_drop *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma deleted file mode 100644 index f2db58c83..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma +++ /dev/null @@ -1,46 +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/relocation/drops.ma". -include "basic_2/s_computation/fqup.ma". - -(* PLUS-ITERATED SUPCLOSURE *************************************************) - -(* Properties with generic slicing for local environments *******************) - -lemma fqup_drops_succ: ∀b,G,K,T,i,L,U. ⬇*[↑i] L ≘ K → ⬆*[↑i] T ≘ U → - ⦃G, L, U⦄ ⊐+[b] ⦃G, K, T⦄. -#b #G #K #T #i elim i -i -[ #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK - #I #Y #HY #H destruct <(drops_fwd_isid … HY) -K // - /3 width=2 by fqu_fqup, fqu_drop/ -| #l #IH #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK - #I #Y #HY #H destruct - elim (lifts_split_trans … HTU … (𝐔❴↑l❵) (𝐔❴1❵)) -HTU - /4 width=5 by fqup_strap2, fqu_drop/ -] -qed. - -lemma fqup_drops_strap1: ∀b,G1,G2,L1,K1,K2,T1,T2,U1,i. ⬇*[i] L1 ≘ K1 → ⬆*[i] T1 ≘ U1 → - ⦃G1, K1, T1⦄ ⊐[b] ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, K2, T2⦄. -#b #G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 * -[ #HLK1 #HTU1 #HT12 - >(drops_fwd_isid … HLK1) -L1 // - <(lifts_fwd_isid … HTU1) -U1 /2 width=1 by fqu_fqup/ -| /3 width=5 by fqup_strap1, fqup_drops_succ/ -] -qed-. - -lemma fqup_lref: ∀b,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+[b] ⦃G, K, V⦄. -/2 width=6 by fqup_drops_strap1/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_fqup.ma deleted file mode 100644 index 4d7c02c08..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_fqup.ma +++ /dev/null @@ -1,22 +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/s_computation/fqup.ma". - -(* PLUS-ITERATED SUPCLOSURE *************************************************) - -(* Main properties **********************************************************) - -theorem fqup_trans: ∀b. tri_transitive … (fqup b). -/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma deleted file mode 100644 index 69af2d033..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma +++ /dev/null @@ -1,44 +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/s_transition/fqu_weight.ma". -include "basic_2/s_computation/fqup.ma". - -(* PLUS-ITERATED SUPCLOSURE *************************************************) - -(* Forward lemmas with weight for closures **********************************) - -lemma fqup_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → - ♯{G2, L2, T2} < ♯{G1, L1, T1}. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 -/3 width=3 by fqu_fwd_fw, transitive_lt/ -qed-. - -(* Advanced eliminators *****************************************************) - -lemma fqup_wf_ind: ∀b. ∀Q:relation3 …. ( - ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → - Q G1 L1 T1 - ) → ∀G1,L1,T1. Q G1 L1 T1. -#b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct -/4 width=2 by fqup_fwd_fw/ -qed-. - -lemma fqup_wf_ind_eq: ∀b. ∀Q:relation3 …. ( - ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → - ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → Q G2 L2 T2 - ) → ∀G1,L1,T1. Q G1 L1 T1. -#b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct -/4 width=7 by fqup_fwd_fw/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus.ma deleted file mode 100644 index 32555f1f6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus.ma +++ /dev/null @@ -1,166 +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 "ground_2/lib/star.ma". -include "basic_2/notation/relations/suptermstar_6.ma". -include "basic_2/notation/relations/suptermstar_7.ma". -include "basic_2/s_transition/fquq.ma". - -(* STAR-ITERATED SUPCLOSURE *************************************************) - -definition fqus: bool → tri_relation genv lenv term ≝ - λb. tri_TC … (fquq b). - -interpretation "extended star-iterated structural successor (closure)" - 'SupTermStar b G1 L1 T1 G2 L2 T2 = (fqus b G1 L1 T1 G2 L2 T2). - -interpretation "star-iterated structural successor (closure)" - 'SupTermStar G1 L1 T1 G2 L2 T2 = (fqus true G1 L1 T1 G2 L2 T2). - -(* Basic eliminators ********************************************************) - -lemma fqus_ind: ∀b,G1,L1,T1. ∀Q:relation3 …. Q G1 L1 T1 → - (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2. -#b #G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H -@(tri_TC_star_ind … IH1 IH2 G2 L2 T2 H) // -qed-. - -lemma fqus_ind_dx: ∀b,G2,L2,T2. ∀Q:relation3 …. Q G2 L2 T2 → - (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) → - ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1. -#b #G2 #L2 #T2 #Q #IH1 #IH2 #G1 #L1 #T1 #H -@(tri_TC_star_ind_dx … IH1 IH2 G1 L1 T1 H) // -qed-. - -(* Basic properties *********************************************************) - -lemma fqus_refl: ∀b. tri_reflexive … (fqus b). -/2 width=1 by tri_inj/ qed. - -lemma fquq_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. -/2 width=1 by tri_inj/ qed. - -lemma fqus_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. -/2 width=5 by tri_step/ qed-. - -lemma fqus_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. -/2 width=5 by tri_TC_strap/ qed-. - -(* Basic inversion lemmas ***************************************************) - -lemma fqus_inv_fqu_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1 = L2 & T1 = T2) ∨ - ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H12 @(fqus_ind_dx … H12) -G1 -L1 -T1 /3 width=1 by and3_intro, or_introl/ -#G1 #G #L1 #L #T1 #T * /3 width=5 by ex2_3_intro, or_intror/ -* #HG #HL #HT #_ destruct // -qed-. - -lemma fqus_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1, L1, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1 = L2 & ⋆s = T2) ∨ - ∃∃J,L. ⦃G1, L, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J}. -#b #G1 #G2 #L1 #L2 #T2 #s #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ -#G #L #T #H elim (fqu_inv_sort1 … H) -H /3 width=4 by ex2_2_intro, or_intror/ -qed-. - -lemma fqus_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & #i = T2 - | ∃∃J,L,V. ⦃G1, L, V⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓑ{J}V & i = 0 - | ∃∃J,L,j. ⦃G1, L, #j⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J} & i = ↑j. -#b #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or3_intro0/ -#G #L #T #H elim (fqu_inv_lref1 … H) -H * /3 width=7 by or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro/ -qed-. - -lemma fqus_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1, L1, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1 = L2 & §l = T2) ∨ - ∃∃J,L. ⦃G1, L, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J}. -#b #G1 #G2 #L1 #L2 #T2 #l #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ -#G #L #T #H elim (fqu_inv_gref1 … H) -H /3 width=4 by ex2_2_intro, or_intror/ -qed-. - -lemma fqus_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓑ{p,I}V1.T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ{p,I}V1.T1 = T2 - | ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄ - | ⦃G1, L1.ⓑ{I}V1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ - | ⦃G1, L1.ⓧ, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ ∧ b = Ⓕ - | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}. -#b #p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or5_intro0/ -#G #L #T #H elim (fqu_inv_bind1 … H) -H * -[4: #J ] #H1 #H2 #H3 [4: #Hb ] #H destruct -/3 width=6 by or5_intro1, or5_intro2, or5_intro3, or5_intro4, ex3_3_intro, conj/ -qed-. - - -lemma fqus_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓑ{p,I}V1.T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ{p,I}V1.T1 = T2 - | ⦃G1, L1, V1⦄ ⊐* ⦃G2, L2, T2⦄ - | ⦃G1, L1.ⓑ{I}V1, T1⦄ ⊐* ⦃G2, L2, T2⦄ - | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐* ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}. -#p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_bind1 … H) -H [1,4: * ] -/3 width=1 by and3_intro, or4_intro0, or4_intro1, or4_intro2, or4_intro3, ex3_3_intro/ -#_ #H destruct -qed-. - -lemma fqus_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓕ{I}V1.T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓕ{I}V1.T1 = T2 - | ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄ - | ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ - | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓕ{I}V1.T1 & L1 = L.ⓘ{J}. -#b #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or4_intro0/ -#G #L #T #H elim (fqu_inv_flat1 … H) -H * -[3: #J ] #H1 #H2 #H3 #H destruct -/3 width=6 by or4_intro1, or4_intro2, or4_intro3, ex3_3_intro/ -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma fqus_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1, ⋆, ⓪{I}⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & ⋆ = L2 & ⓪{I} = T2. -#b #I #G1 #G2 #L2 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /2 width=1 by and3_intro/ -#G #L #T #H elim (fqu_inv_atom1 … H) -qed-. - -lemma fqus_inv_sort1_bind: ∀b,I,G1,G2,L1,L2,T2,s. ⦃G1, L1.ⓘ{I}, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & ⋆s = T2) ∨ ⦃G1, L1, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #I #G1 #G2 #L1 #L2 #T2 #s #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ -#G #L #T #H elim (fqu_inv_sort1_bind … H) -H -#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ -qed-. - -lemma fqus_inv_zero1_pair: ∀b,I,G1,G2,L1,L2,V1,T2. ⦃G1, L1.ⓑ{I}V1, #0⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & #0 = T2) ∨ ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #I #G1 #G2 #L1 #L2 #V1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ -#G #L #T #H elim (fqu_inv_zero1_pair … H) -H -#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ -qed-. - -lemma fqus_inv_lref1_bind: ∀b,I,G1,G2,L1,L2,T2,i. ⦃G1, L1.ⓘ{I}, #↑i⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & #(↑i) = T2) ∨ ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #I #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ -#G #L #T #H elim (fqu_inv_lref1_bind … H) -H -#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ -qed-. - -lemma fqus_inv_gref1_bind: ∀b,I,G1,G2,L1,L2,T2,l. ⦃G1, L1.ⓘ{I}, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & §l = T2) ∨ ⦃G1, L1, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #I #G1 #G2 #L1 #L2 #T2 #l #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ -#G #L #T #H elim (fqu_inv_gref1_bind … H) -H -#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ -qed-. - -(* Basic_2A1: removed theorems 1: fqus_drop *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma deleted file mode 100644 index cfcecbb00..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma +++ /dev/null @@ -1,26 +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/s_computation/fqup_drops.ma". -include "basic_2/s_computation/fqus_fqup.ma". - -(* STAR-ITERATED SUPCLOSURE *************************************************) - -(* Properties with generic slicing for local environments *******************) - -lemma fqus_drops: ∀b,G,L,K,T,U,i. ⬇*[i] L ≘ K → ⬆*[i] T ≘ U → - ⦃G, L, U⦄ ⊐*[b] ⦃G, K, T⦄. -#b #G #L #K #T #U * /3 width=3 by fqup_drops_succ, fqup_fqus/ -#HLK #HTU <(lifts_fwd_isid … HTU) -U // <(drops_fwd_isid … HLK) -K // -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqup.ma deleted file mode 100644 index 9a0ce6312..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqup.ma +++ /dev/null @@ -1,74 +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/s_computation/fqup.ma". -include "basic_2/s_computation/fqus.ma". - -(* STAR-ITERATED SUPCLOSURE *************************************************) - -(* Alternative definition with plus-iterated supclosure *********************) - -lemma fqup_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 -/3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/ -qed. - -(* Basic_2A1: was: fqus_inv_gen *) -lemma fqus_inv_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). -#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 // -#G #G2 #L #L2 #T #T2 #_ * -[ #H2 * /3 width=5 by fqup_strap1, or_introl/ - * /3 width=1 by fqu_fqup, or_introl/ -| * #HG #HL #HT destruct // -] -qed-. - -(* Advanced properties ******************************************************) - -lemma fqus_strap1_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H1) -H1 -[ /2 width=5 by fqup_strap1/ -| * /2 width=1 by fqu_fqup/ -] -qed-. - -lemma fqus_strap2_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H2) -H2 -[ /2 width=5 by fqup_strap2/ -| * /2 width=1 by fqu_fqup/ -] -qed-. - -lemma fqus_fqup_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fqup_ind … H2) -H2 -G2 -L2 -T2 -/2 width=5 by fqus_strap1_fqu, fqup_strap1/ -qed-. - -lemma fqup_fqus_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. -#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 @(fqup_ind_dx … H1) -H1 -G1 -L1 -T1 -/3 width=5 by fqus_strap2_fqu, fqup_strap2/ -qed-. - -(* Advanced inversion lemmas for plus-iterated supclosure *******************) - -lemma fqup_inv_step_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → - ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/ -#G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqus.ma deleted file mode 100644 index 1d41130e5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqus.ma +++ /dev/null @@ -1,22 +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/s_computation/fqus.ma". - -(* STAR-ITERATED SUPCLOSURE *************************************************) - -(* Main properties **********************************************************) - -theorem fqus_trans: ∀b. tri_transitive … (fqus b). -/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma deleted file mode 100644 index 335651bc4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma +++ /dev/null @@ -1,35 +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/s_transition/fquq_weight.ma". -include "basic_2/s_computation/fqus.ma". - -(* STAR-ITERATED SUPCLOSURE *************************************************) - -(* Forward lemmas with weight for closures **********************************) - -lemma fqus_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2 -/3 width=3 by fquq_fwd_fw, transitive_le/ -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma fqus_inv_refl_atom3: ∀b,I,G,L,X. ⦃G, L, ⓪{I}⦄ ⊐*[b] ⦃G, L, X⦄ → ⓪{I} = X. -#b #I #G #L #X #H elim (fqus_inv_fqu_sn … H) -H * // -#G0 #L0 #T0 #H1 #H2 lapply (fqu_fwd_fw … H1) lapply (fqus_fwd_fw … H2) -H2 -H1 -#H2 #H1 lapply (le_to_lt_to_lt … H2 H1) -G0 -L0 -T0 -#H elim (lt_le_false … H) -H /2 width=1 by monotonic_le_plus_r/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu.ma deleted file mode 100644 index 0377df1a1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu.ma +++ /dev/null @@ -1,201 +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/supterm_6.ma". -include "basic_2/notation/relations/supterm_7.ma". -include "basic_2/syntax/lenv.ma". -include "basic_2/syntax/genv.ma". -include "basic_2/relocation/lifts.ma". - -(* SUPCLOSURE ***************************************************************) - -(* activate genv *) -(* Note: frees_total requires fqu_drop for all atoms - fqu_cpx_trans requires fqu_drop for all terms - frees_fqus_drops requires fqu_drop restricted on atoms -*) -inductive fqu (b:bool): tri_relation genv lenv term ≝ -| fqu_lref_O : ∀I,G,L,V. fqu b G (L.ⓑ{I}V) (#0) G L V -| fqu_pair_sn: ∀I,G,L,V,T. fqu b G L (②{I}V.T) G L V -| fqu_bind_dx: ∀p,I,G,L,V,T. fqu b G L (ⓑ{p,I}V.T) G (L.ⓑ{I}V) T -| fqu_clear : ∀p,I,G,L,V,T. b = Ⓕ → fqu b G L (ⓑ{p,I}V.T) G (L.ⓧ) T -| fqu_flat_dx: ∀I,G,L,V,T. fqu b G L (ⓕ{I}V.T) G L T -| fqu_drop : ∀I,G,L,T,U. ⬆*[1] T ≘ U → fqu b G (L.ⓘ{I}) U G L T -. - -interpretation - "extended structural successor (closure)" - 'SupTerm b G1 L1 T1 G2 L2 T2 = (fqu b G1 L1 T1 G2 L2 T2). - -interpretation - "structural successor (closure)" - 'SupTerm G1 L1 T1 G2 L2 T2 = (fqu true G1 L1 T1 G2 L2 T2). - -(* Basic properties *********************************************************) - -lemma fqu_sort: ∀b,I,G,L,s. ⦃G, L.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G, L, ⋆s⦄. -/2 width=1 by fqu_drop/ qed. - -lemma fqu_lref_S: ∀b,I,G,L,i. ⦃G, L.ⓘ{I}, #↑i⦄ ⊐[b] ⦃G, L, #i⦄. -/2 width=1 by fqu_drop/ qed. - -lemma fqu_gref: ∀b,I,G,L,l. ⦃G, L.ⓘ{I}, §l⦄ ⊐[b] ⦃G, L, §l⦄. -/2 width=1 by fqu_drop/ qed. - -(* Basic inversion lemmas ***************************************************) - -fact fqu_inv_sort1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∀s. T1 = ⋆s → - ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = ⋆s. -#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 -[ #I #G #L #T #s #H destruct -| #I #G #L #V #T #s #H destruct -| #p #I #G #L #V #T #s #H destruct -| #p #I #G #L #V #T #_ #s #H destruct -| #I #G #L #V #T #s #H destruct -| #I #G #L #T #U #HI12 #s #H destruct - lapply (lifts_inv_sort2 … HI12) -HI12 /2 width=2 by ex3_intro/ -] -qed-. - -lemma fqu_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1, L1, ⋆s⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = ⋆s. -/2 width=4 by fqu_inv_sort1_aux/ qed-. - -fact fqu_inv_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∀i. T1 = #i → - (∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨ - ∃∃J,j. G1 = G2 & L1 = L2.ⓘ{J} & T2 = #j & i = ↑j. -#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 -[ #I #G #L #T #i #H destruct /3 width=4 by ex4_2_intro, or_introl/ -| #I #G #L #V #T #i #H destruct -| #p #I #G #L #V #T #i #H destruct -| #p #I #G #L #V #T #_ #i #H destruct -| #I #G #L #V #T #i #H destruct -| #I #G #L #T #U #HI12 #i #H destruct - elim (lifts_inv_lref2_uni … HI12) -HI12 /3 width=3 by ex4_2_intro, or_intror/ -] -qed-. - -lemma fqu_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ → - (∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨ - ∃∃J,j. G1 = G2 & L1 = L2.ⓘ{J} & T2 = #j & i = ↑j. -/2 width=4 by fqu_inv_lref1_aux/ qed-. - -fact fqu_inv_gref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∀l. T1 = §l → - ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = §l. -#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 -[ #I #G #L #T #l #H destruct -| #I #G #L #V #T #l #H destruct -| #p #I #G #L #V #T #l #H destruct -| #p #I #G #L #V #T #_ #l #H destruct -| #I #G #L #V #T #s #H destruct -| #I #G #L #T #U #HI12 #l #H destruct - lapply (lifts_inv_gref2 … HI12) -HI12 /2 width=3 by ex3_intro/ -] -qed-. - -lemma fqu_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1, L1, §l⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = §l. -/2 width=4 by fqu_inv_gref1_aux/ qed-. - -fact fqu_inv_bind1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∀p,I,V1,U1. T1 = ⓑ{p,I}V1.U1 → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 - | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 - | ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ - | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1. -#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 -[ #I #G #L #T #q #J #V0 #U0 #H destruct -| #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro0/ -| #p #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro1/ -| #p #I #G #L #V #T #Hb #q #J #V0 #U0 #H destruct /3 width=1 by and4_intro, or4_intro2/ -| #I #G #L #V #T #q #J #V0 #U0 #H destruct -| #I #G #L #T #U #HTU #q #J #V0 #U0 #H destruct /3 width=2 by or4_intro3, ex3_intro/ -] -qed-. - -lemma fqu_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓑ{p,I}V1.U1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 - | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 - | ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ - | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1. -/2 width=4 by fqu_inv_bind1_aux/ qed-. - -lemma fqu_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓑ{p,I}V1.U1⦄ ⊐ ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 - | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 - | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1. -#p #I #G1 #G2 #L1 #L2 #V1 #U1 #T2 #H elim (fqu_inv_bind1 … H) -H -/3 width=1 by or3_intro0, or3_intro1, or3_intro2/ -* #_ #_ #_ #H destruct -qed-. - -fact fqu_inv_flat1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∀I,V1,U1. T1 = ⓕ{I}V1.U1 → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 - | ∧∧ G1 = G2 & L1 = L2 & U1 = T2 - | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓕ{I}V1.U1. -#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 -[ #I #G #L #T #J #V0 #U0 #H destruct -| #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro0/ -| #p #I #G #L #V #T #J #V0 #U0 #H destruct -| #p #I #G #L #V #T #_ #J #V0 #U0 #H destruct -| #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro1/ -| #I #G #L #T #U #HTU #J #V0 #U0 #H destruct /3 width=2 by or3_intro2, ex3_intro/ -] -qed-. - -lemma fqu_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓕ{I}V1.U1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 - | ∧∧ G1 = G2 & L1 = L2 & U1 = T2 - | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓕ{I}V1.U1. -/2 width=4 by fqu_inv_flat1_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma fqu_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1, ⋆, ⓪{I}⦄ ⊐[b] ⦃G2, L2, T2⦄ → ⊥. -#b * #x #G1 #G2 #L2 #T2 #H -[ elim (fqu_inv_sort1 … H) | elim (fqu_inv_lref1 … H) * | elim (fqu_inv_gref1 … H) ] -H -#I [2: #V |3: #i ] #_ #H destruct -qed-. - -lemma fqu_inv_sort1_bind: ∀b,I,G1,G2,K,L2,T2,s. ⦃G1, K.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & L2 = K & T2 = ⋆s. -#b #I #G1 #G2 #K #L2 #T2 #s #H elim (fqu_inv_sort1 … H) -H -#Z #X #H1 #H2 destruct /2 width=1 by and3_intro/ -qed-. - -lemma fqu_inv_zero1_pair: ∀b,I,G1,G2,K,L2,V,T2. ⦃G1, K.ⓑ{I}V, #0⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & L2 = K & T2 = V. -#b #I #G1 #G2 #K #L2 #V #T2 #H elim (fqu_inv_lref1 … H) -H * -#Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/ -qed-. - -lemma fqu_inv_lref1_bind: ∀b,I,G1,G2,K,L2,T2,i. ⦃G1, K.ⓘ{I}, #(↑i)⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & L2 = K & T2 = #i. -#b #I #G1 #G2 #K #L2 #T2 #i #H elim (fqu_inv_lref1 … H) -H * -#Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/ -qed-. - -lemma fqu_inv_gref1_bind: ∀b,I,G1,G2,K,L2,T2,l. ⦃G1, K.ⓘ{I}, §l⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & L2 = K & T2 = §l. -#b #I #G1 #G2 #K #L2 #T2 #l #H elim (fqu_inv_gref1 … H) -H -#Z #H1 #H2 #H3 destruct /2 width=1 by and3_intro/ -qed-. - -(* Basic_2A1: removed theorems 3: - fqu_drop fqu_drop_lt fqu_lref_S_lt -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_length.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_length.ma deleted file mode 100644 index 467283ff1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_length.ma +++ /dev/null @@ -1,31 +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/syntax/lenv_length.ma". -include "basic_2/s_transition/fqu.ma". - -(* SUPCLOSURE ***************************************************************) - -(* Forward lemmas with length for local environments ************************) - -fact fqu_fwd_length_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ∀i. T1 = #i → |L2| < |L1|. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // [2,3: #p] -#I #G #L #V #T [2: #_ ] #j #H destruct -qed-. - -lemma fqu_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ → - |L2| < |L1|. -/2 width=8 by fqu_fwd_length_lref1_aux/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_tdeq.ma deleted file mode 100644 index 2c7d03371..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_tdeq.ma +++ /dev/null @@ -1,36 +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/syntax/tdeq.ma". -include "basic_2/s_transition/fqu_length.ma". - -(* SUPCLOSURE ***************************************************************) - -(* Inversion lemmas with context-free degree-based equivalence for terms ****) - -fact fqu_inv_tdeq_aux: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - G1 = G2 → |L1| = |L2| → T1 ≛[h, o] T2 → ⊥. -#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 -[1: #I #G #L #V #_ #H elim (succ_inv_refl_sn … H) -|6: #I #G #L #T #U #_ #_ #H elim (succ_inv_refl_sn … H) -] -/2 width=6 by tdeq_inv_pair_xy_y, tdeq_inv_pair_xy_x/ -qed-. - -(* Basic_2A1: uses: fqu_inv_eq *) -lemma fqu_inv_tdeq: ∀h,o,b,G,L1,L2,T1,T2. ⦃G, L1, T1⦄ ⊐[b] ⦃G, L2, T2⦄ → - |L1| = |L2| → T1 ≛[h, o] T2 → ⊥. -#h #o #b #G #L1 #L2 #T1 #T2 #H -@(fqu_inv_tdeq_aux … H) // (**) (* full auto fails *) -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_weight.ma deleted file mode 100644 index 8f6d321a2..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fqu_weight.ma +++ /dev/null @@ -1,37 +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/syntax/cl_weight.ma". -include "basic_2/relocation/lifts_weight.ma". -include "basic_2/s_transition/fqu.ma". - -(* SUPCLOSURE ***************************************************************) - -(* Forward lemmas with weight for closures **********************************) - -lemma fqu_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → - ♯{G2, L2, T2} < ♯{G1, L1, T1}. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // -#I #I1 #I2 #G #L #HI12 normalize in ⊢ (?%%); -I1 -<(lifts_fwd_tw … HI12) /3 width=1 by monotonic_lt_plus_r, monotonic_lt_plus_l/ -qed-. - -(* Advanced eliminators *****************************************************) - -lemma fqu_wf_ind: ∀b. ∀Q:relation3 …. ( - ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → - Q G1 L1 T1 - ) → ∀G1,L1,T1. Q G1 L1 T1. -#b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=2 by fqu_fwd_fw/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq.ma deleted file mode 100644 index 4c7446e31..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq.ma +++ /dev/null @@ -1,46 +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/suptermopt_6.ma". -include "basic_2/notation/relations/suptermopt_7.ma". -include "basic_2/s_transition/fqu.ma". - -(* OPTIONAL SUPCLOSURE ******************************************************) - -(* Basic_2A1: was: fquqa *) -(* Basic_2A1: includes: fquq_inv_gen *) -definition fquq: bool → tri_relation genv lenv term ≝ - λb. tri_RC … (fqu b). - -interpretation - "extended optional structural successor (closure)" - 'SupTermOpt b G1 L1 T1 G2 L2 T2 = (fquq b G1 L1 T1 G2 L2 T2). - -interpretation - "optional structural successor (closure)" - 'SupTermOpt G1 L1 T1 G2 L2 T2 = (fquq true G1 L1 T1 G2 L2 T2). - -(* Basic properties *********************************************************) - -(* Basic_2A1: includes: fquqa_refl *) -lemma fquq_refl: ∀b. tri_reflexive … (fquq b). -// qed. - -lemma fqu_fquq: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄. -/2 width=1 by or_introl/ qed. - -(* Basic_2A1: removed theorems 8: - fquq_lref_O fquq_pair_sn fquq_bind_dx fquq_flat_dx fquq_drop - fquqa_drop fquq_fquqa fquqa_inv_fquq -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq_length.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq_length.ma deleted file mode 100644 index 9cd369686..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq_length.ma +++ /dev/null @@ -1,26 +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/s_transition/fqu_length.ma". -include "basic_2/s_transition/fquq.ma". - -(* OPTIONAL SUPCLOSURE ******************************************************) - -(* Forward lemmas with length for local environments ************************) - -lemma fquq_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → - |L2| ≤ |L1|. -#b #G1 #G2 #L1 #L2 #T2 #i #H elim H -H [2: * ] -/3 width=6 by fqu_fwd_length_lref1, lt_to_le/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq_weight.ma deleted file mode 100644 index faddd7dc6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/s_transition/fquq_weight.ma +++ /dev/null @@ -1,26 +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/s_transition/fqu_weight.ma". -include "basic_2/s_transition/fquq.ma". - -(* OPTIONAL SUPCLOSURE ******************************************************) - -(* Forward lemmas with weight for closures **********************************) - -lemma fquq_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → - ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. -#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H [2: * ] -/3 width=2 by fqu_fwd_fw, lt_to_le/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa.ma deleted file mode 100644 index 6ea5a39c4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/aaa.ma +++ /dev/null @@ -1,168 +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/atomicarity_4.ma". -include "basic_2/syntax/aarity.ma". -include "basic_2/syntax/lenv.ma". -include "basic_2/syntax/genv.ma". - -(* ATONIC ARITY ASSIGNMENT FOR TERMS ****************************************) - -(* activate genv *) -inductive aaa: relation4 genv lenv term aarity ≝ -| aaa_sort: ∀G,L,s. aaa G L (⋆s) (⓪) -| aaa_zero: ∀I,G,L,V,B. aaa G L V B → aaa G (L.ⓑ{I}V) (#0) B -| aaa_lref: ∀I,G,L,A,i. aaa G L (#i) A → aaa G (L.ⓘ{I}) (#↑i) A -| aaa_abbr: ∀p,G,L,V,T,B,A. - aaa G L V B → aaa G (L.ⓓV) T A → aaa G L (ⓓ{p}V.T) A -| aaa_abst: ∀p,G,L,V,T,B,A. - aaa G L V B → aaa G (L.ⓛV) T A → aaa G L (ⓛ{p}V.T) (②B.A) -| aaa_appl: ∀G,L,V,T,B,A. aaa G L V B → aaa G L T (②B.A) → aaa G L (ⓐV.T) A -| aaa_cast: ∀G,L,V,T,A. aaa G L V A → aaa G L T A → aaa G L (ⓝV.T) A -. - -interpretation "atomic arity assignment (term)" - 'AtomicArity G L T A = (aaa G L T A). - -(* Basic inversion lemmas ***************************************************) - -fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀s. T = ⋆s → A = ⓪. -#G #L #T #A * -G -L -T -A // -[ #I #G #L #V #B #_ #s #H destruct -| #I #G #L #A #i #_ #s #H destruct -| #p #G #L #V #T #B #A #_ #_ #s #H destruct -| #p #G #L #V #T #B #A #_ #_ #s #H destruct -| #G #L #V #T #B #A #_ #_ #s #H destruct -| #G #L #V #T #A #_ #_ #s #H destruct -] -qed-. - -lemma aaa_inv_sort: ∀G,L,A,s. ⦃G, L⦄ ⊢ ⋆s ⁝ A → A = ⓪. -/2 width=6 by aaa_inv_sort_aux/ qed-. - -fact aaa_inv_zero_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → T = #0 → - ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A. -#G #L #T #A * -G -L -T -A /2 width=5 by ex2_3_intro/ -[ #G #L #s #H destruct -| #I #G #L #A #i #_ #H destruct -| #p #G #L #V #T #B #A #_ #_ #H destruct -| #p #G #L #V #T #B #A #_ #_ #H destruct -| #G #L #V #T #B #A #_ #_ #H destruct -| #G #L #V #T #A #_ #_ #H destruct -] -qed-. - -lemma aaa_inv_zero: ∀G,L,A. ⦃G, L⦄ ⊢ #0 ⁝ A → - ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A. -/2 width=3 by aaa_inv_zero_aux/ qed-. - -fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #(↑i) → - ∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A. -#G #L #T #A * -G -L -T -A -[ #G #L #s #j #H destruct -| #I #G #L #V #B #_ #j #H destruct -| #I #G #L #A #i #HA #j #H destruct /2 width=4 by ex2_2_intro/ -| #p #G #L #V #T #B #A #_ #_ #j #H destruct -| #p #G #L #V #T #B #A #_ #_ #j #H destruct -| #G #L #V #T #B #A #_ #_ #j #H destruct -| #G #L #V #T #A #_ #_ #j #H destruct -] -qed-. - -lemma aaa_inv_lref: ∀G,L,A,i. ⦃G, L⦄ ⊢ #↑i ⁝ A → - ∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A. -/2 width=3 by aaa_inv_lref_aux/ qed-. - -fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀l. T = §l → ⊥. -#G #L #T #A * -G -L -T -A -[ #G #L #s #k #H destruct -| #I #G #L #V #B #_ #k #H destruct -| #I #G #L #A #i #_ #k #H destruct -| #p #G #L #V #T #B #A #_ #_ #k #H destruct -| #p #G #L #V #T #B #A #_ #_ #k #H destruct -| #G #L #V #T #B #A #_ #_ #k #H destruct -| #G #L #V #T #A #_ #_ #k #H destruct -] -qed-. - -lemma aaa_inv_gref: ∀G,L,A,l. ⦃G, L⦄ ⊢ §l ⁝ A → ⊥. -/2 width=7 by aaa_inv_gref_aux/ qed-. - -fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓓ{p}W.U → - ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L.ⓓW⦄ ⊢ U ⁝ A. -#G #L #T #A * -G -L -T -A -[ #G #L #s #q #W #U #H destruct -| #I #G #L #V #B #_ #q #W #U #H destruct -| #I #G #L #A #i #_ #q #W #U #H destruct -| #p #G #L #V #T #B #A #HV #HT #q #W #U #H destruct /2 width=2 by ex2_intro/ -| #p #G #L #V #T #B #A #_ #_ #q #W #U #H destruct -| #G #L #V #T #B #A #_ #_ #q #W #U #H destruct -| #G #L #V #T #A #_ #_ #q #W #U #H destruct -] -qed-. - -lemma aaa_inv_abbr: ∀p,G,L,V,T,A. ⦃G, L⦄ ⊢ ⓓ{p}V.T ⁝ A → - ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L.ⓓV⦄ ⊢ T ⁝ A. -/2 width=4 by aaa_inv_abbr_aux/ qed-. - -fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓛ{p}W.U → - ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ U ⁝ B2 & A = ②B1.B2. -#G #L #T #A * -G -L -T -A -[ #G #L #s #q #W #U #H destruct -| #I #G #L #V #B #_ #q #W #U #H destruct -| #I #G #L #A #i #_ #q #W #U #H destruct -| #p #G #L #V #T #B #A #_ #_ #q #W #U #H destruct -| #p #G #L #V #T #B #A #HV #HT #q #W #U #H destruct /2 width=5 by ex3_2_intro/ -| #G #L #V #T #B #A #_ #_ #q #W #U #H destruct -| #G #L #V #T #A #_ #_ #q #W #U #H destruct -] -qed-. - -lemma aaa_inv_abst: ∀p,G,L,W,T,A. ⦃G, L⦄ ⊢ ⓛ{p}W.T ⁝ A → - ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ T ⁝ B2 & A = ②B1.B2. -/2 width=4 by aaa_inv_abst_aux/ qed-. - -fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U → - ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L⦄ ⊢ U ⁝ ②B.A. -#G #L #T #A * -G -L -T -A -[ #G #L #s #W #U #H destruct -| #I #G #L #V #B #_ #W #U #H destruct -| #I #G #L #A #i #_ #W #U #H destruct -| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct -| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct -| #G #L #V #T #B #A #HV #HT #W #U #H destruct /2 width=3 by ex2_intro/ -| #G #L #V #T #A #_ #_ #W #U #H destruct -] -qed-. - -lemma aaa_inv_appl: ∀G,L,V,T,A. ⦃G, L⦄ ⊢ ⓐV.T ⁝ A → - ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L⦄ ⊢ T ⁝ ②B.A. -/2 width=3 by aaa_inv_appl_aux/ qed-. - -fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW.U → - ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ U ⁝ A. -#G #L #T #A * -G -L -T -A -[ #G #L #s #W #U #H destruct -| #I #G #L #V #B #_ #W #U #H destruct -| #I #G #L #A #i #_ #W #U #H destruct -| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct -| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct -| #G #L #V #T #B #A #_ #_ #W #U #H destruct -| #G #L #V #T #A #HV #HT #W #U #H destruct /2 width=1 by conj/ -] -qed-. - -lemma aaa_inv_cast: ∀G,L,W,T,A. ⦃G, L⦄ ⊢ ⓝW.T ⁝ A → - ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ T ⁝ A. -/2 width=3 by aaa_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma deleted file mode 100644 index f6224a96e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma +++ /dev/null @@ -1,38 +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/static/aaa.ma". - -(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) - -(* Main inversion lemmas ****************************************************) - -theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T ⁝ A2 → A1 = A2. -#G #L #T #A1 #H elim H -G -L -T -A1 -[ #G #L #s #A2 #H >(aaa_inv_sort … H) -H // -| #I1 #G #L #V1 #B #_ #IH #A2 #H - elim (aaa_inv_zero … H) -H #I2 #K2 #V2 #H #HA2 destruct /2 width=1 by/ -| #I1 #G #L #B #i #_ #IH #A2 #H - elim (aaa_inv_lref … H) -H #I2 #K2 #H #HA2 destruct /2 width=1 by/ -| #p #G #L #V #T #B1 #A1 #_ #_ #_ #IH #A2 #H - elim (aaa_inv_abbr … H) -H /2 width=1 by/ -| #p #G #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H - elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1 by eq_f2/ -| #G #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H - elim (aaa_inv_appl … H) -H #B2 #_ #HA2 - lapply (IHA1 … HA2) -L #H destruct // -| #G #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H - elim (aaa_inv_cast … H) -H /2 width=1 by/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_drops.ma deleted file mode 100644 index 930ca157c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_drops.ma +++ /dev/null @@ -1,123 +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/relocation/drops_drops.ma". -include "basic_2/s_computation/fqup_weight.ma". -include "basic_2/s_computation/fqup_drops.ma". -include "basic_2/static/aaa.ma". - -(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) - -(* Advanced properties ******************************************************) - -(* Basic_2A1: was: aaa_lref *) -lemma aaa_lref_drops: ∀I,G,K,V,B,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ⁝ B → ⦃G, L⦄ ⊢ #i ⁝ B. -#I #G #K #V #B #i elim i -i -[ #L #H lapply (drops_fwd_isid … H ?) -H // - #H destruct /2 width=1 by aaa_zero/ -| #i #IH #L (lifts_inv_sort1 … HX) -HX // -| #i1 #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX - elim (aaa_inv_lref_drops … H) -H #J #K1 #V1 #HLK1 #HA - elim (lifts_inv_lref1 … HX) -HX #i2 #Hf #H destruct - lapply (drops_trans … HL21 … HLK1 ??) -HL21 [1,2: // ] #H - elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK2 #HY - lapply (drops_tls_at … Hf … HY) -HY #HY -Hf - elim (drops_inv_skip2 … HY) -HY #Z #K2 #HK21 #HZ #H destruct - elim (liftsb_inv_pair_sn … HZ) -HZ #V2 #HV12 #H destruct - /4 width=12 by aaa_lref_drops, fqup_lref, drops_inv_gen/ -| #l #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX -b -f -IH - elim (aaa_inv_gref … H) -| #p * #V1 #T1 #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX - [ elim (aaa_inv_abbr … H) -H #B #HB #HA - elim (lifts_inv_bind1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct - /5 width=9 by aaa_abbr, drops_skip, ext2_pair/ - | elim (aaa_inv_abst … H) -H #B #A0 #HB #HA #H0 - elim (lifts_inv_bind1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct - /5 width=8 by aaa_abst, drops_skip, ext2_pair/ - ] -| * #V1 #T1 #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX - [ elim (aaa_inv_appl … H) -H #B #HB #HA - elim (lifts_inv_flat1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct - /3 width=10 by aaa_appl/ - | elim (aaa_inv_cast … H) -H #H1A #H2A - elim (lifts_inv_flat1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct - /3 width=8 by aaa_cast/ - ] -] -qed-. - -(* Inversion lemmas with generic slicing for local environments *************) - -(* Basic_2A1: includes: aaa_inv_lift *) -lemma aaa_inv_lifts: ∀G,L2,T2,A. ⦃G, L2⦄ ⊢ T2 ⁝ A → ∀b,f,L1. ⬇*[b, f] L2 ≘ L1 → - ∀T1. ⬆*[f] T1 ≘ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A. -@(fqup_wf_ind_eq (Ⓣ)) #G0 #L0 #T0 #IH #G #L2 * * -[ #s #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX -b -IH - lapply (aaa_inv_sort … H) -H #H destruct - >(lifts_inv_sort2 … HX) -HX // -| #i2 #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX - elim (aaa_inv_lref_drops … H) -H #J #K2 #V2 #HLK2 #HA - elim (lifts_inv_lref2 … HX) -HX #i1 #Hf #H destruct - lapply (drops_split_div … HL21 (𝐔❴i1❵) ???) -HL21 [4: * |*: // ] #Y #HLK1 #HY - lapply (drops_conf … HLK2 … HY ??) -HY [1,2: /2 width=6 by after_uni_dx/ ] #HY - lapply (drops_tls_at … Hf … HY) -HY #HY -Hf - elim (drops_inv_skip1 … HY) -HY #Z #K1 #HK21 #HZ #H destruct - elim (liftsb_inv_pair_dx … HZ) -HZ #V1 #HV12 #H destruct - /4 width=12 by aaa_lref_drops, fqup_lref, drops_inv_F/ -| #l #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX -IH -b -f - elim (aaa_inv_gref … H) -| #p * #V2 #T2 #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX - [ elim (aaa_inv_abbr … H) -H #B #HB #HA - elim (lifts_inv_bind2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct - /5 width=9 by aaa_abbr, drops_skip, ext2_pair/ - | elim (aaa_inv_abst … H) -H #B #A0 #HB #HA #H0 - elim (lifts_inv_bind2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct - /5 width=8 by aaa_abst, drops_skip, ext2_pair/ - ] -| * #V2 #T2 #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX - [ elim (aaa_inv_appl … H) -H #B #HB #HA - elim (lifts_inv_flat2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct - /3 width=10 by aaa_appl/ - | elim (aaa_inv_cast … H) -H #H1A #H2A - elim (lifts_inv_flat2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct - /3 width=8 by aaa_cast/ - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_fdeq.ma deleted file mode 100644 index 13b5acbd6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_fdeq.ma +++ /dev/null @@ -1,25 +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/static/fdeq.ma". -include "basic_2/static/aaa_rdeq.ma". - -(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) - -(* Properties with degree-based equivalence on referred entries *************) - -lemma aaa_fdeq_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → - ∀A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → ⦃G2, L2⦄ ⊢ T2 ⁝ A. -#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 -/2 width=7 by aaa_tdeq_conf_rdeq/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_fqus.ma deleted file mode 100644 index 812bcc365..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_fqus.ma +++ /dev/null @@ -1,63 +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/s_computation/fqus_fqup.ma". -include "basic_2/static/aaa_drops.ma". - -(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) - -(* Properties on supclosure *************************************************) - -lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → - ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. -#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 -[ #I #G #L #T #A #H elim (aaa_inv_zero … H) -H - #J #K #V #H #HA destruct /2 width=2 by ex_intro/ -| * [ #p ] * #G #L #V #T #X #H - [ elim (aaa_inv_abbr … H) - | elim (aaa_inv_abst … H) - | elim (aaa_inv_appl … H) - | elim (aaa_inv_cast … H) - ] -H /2 width=2 by ex_intro/ -| #p * #G #L #V #T #X #H - [ elim (aaa_inv_abbr … H) - | elim (aaa_inv_abst … H) - ] -H /2 width=2 by ex_intro/ -| #p #I #G #L #V #T #H destruct -| * #G #L #V #T #X #H - [ elim (aaa_inv_appl … H) - | elim (aaa_inv_cast … H) - ] -H /2 width=2 by ex_intro/ -| /5 width=8 by aaa_inv_lifts, drops_refl, drops_drop, ex_intro/ -] -qed-. - -lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → - ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. -#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=6 by aaa_fqu_conf/ -* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ -qed-. - -lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. -#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 -[2: #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A ] -/2 width=6 by aaa_fqu_conf/ -qed-. - -lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. -#G1 #G2 #L1 #L2 #T1 #T2 #H elim(fqus_inv_fqup … H) -H /2 width=6 by aaa_fqup_conf/ -* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_rdeq.ma deleted file mode 100644 index d55f97ce7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_rdeq.ma +++ /dev/null @@ -1,45 +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/static/rdeq.ma". -include "basic_2/static/aaa.ma". - -(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) - -(* Properties with degree-based equivalence on referred entries *************) - -lemma aaa_tdeq_conf_rdeq: ∀h,o,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → ∀T2. T1 ≛[h, o] T2 → - ∀L2. L1 ≛[h, o, T1] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A. -#h #o #G #L1 #T1 #A #H elim H -G -L1 -T1 -A -[ #G #L1 #s1 #X #H1 elim (tdeq_inv_sort1 … H1) -H1 // -| #I #G #L1 #V1 #B #_ #IH #X #H1 >(tdeq_inv_lref1 … H1) -H1 - #Y #H2 elim (rdeq_inv_zero_pair_sn … H2) -H2 - #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by aaa_zero/ -| #I #G #L1 #A #i #_ #IH #X #H1 >(tdeq_inv_lref1 … H1) -H1 - #Y #H2 elim (rdeq_inv_lref_bind_sn … H2) -H2 - #J #L2 #HL12 #H destruct /3 width=1 by aaa_lref/ -| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_bind … H2) -H2 destruct - /5 width=2 by aaa_abbr, rdeq_bind_repl_dx, ext2_pair/ -| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_bind … H2) -H2 destruct - /5 width=2 by aaa_abst, rdeq_bind_repl_dx, ext2_pair/ -| #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_flat … H2) -H2 destruct - /3 width=3 by aaa_appl/ -| #G #L1 #V1 #T1 #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_flat … H2) -H2 destruct - /3 width=1 by aaa_cast/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/fdeq.ma deleted file mode 100644 index 6d8dd1589..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq.ma +++ /dev/null @@ -1,52 +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/stareqsn_8.ma". -include "basic_2/syntax/genv.ma". -include "basic_2/static/rdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) - -inductive fdeq (h) (o) (G) (L1) (T1): relation3 genv lenv term ≝ -| fdeq_intro_sn: ∀L2,T2. L1 ≛[h, o, T1] L2 → T1 ≛[h, o] T2 → - fdeq h o G L1 T1 G L2 T2 -. - -interpretation - "degree-based equivalence on referred entries (closure)" - 'StarEqSn h o G1 L1 T1 G2 L2 T2 = (fdeq h o G1 L1 T1 G2 L2 T2). - -(* Basic_properties *********************************************************) - -lemma fdeq_intro_dx (h) (o) (G): ∀L1,L2,T2. L1 ≛[h, o, T2] L2 → - ∀T1. T1 ≛[h, o] T2 → ⦃G, L1, T1⦄ ≛[h, o] ⦃G, L2, T2⦄. -/3 width=3 by fdeq_intro_sn, tdeq_rdeq_div/ qed. - -(* Basic inversion lemmas ***************************************************) - -lemma fdeq_inv_gen_sn: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & L1 ≛[h, o, T1] L2 & T1 ≛[h, o] T2. -#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=1 by and3_intro/ -qed-. - -lemma fdeq_inv_gen_dx: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → - ∧∧ G1 = G2 & L1 ≛[h, o, T2] L2 & T1 ≛[h, o] T2. -#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 -/3 width=3 by tdeq_rdeq_conf, and3_intro/ -qed-. - -(* Basic_2A1: removed theorems 6: - fleq_refl fleq_sym fleq_inv_gen - fleq_trans fleq_canc_sn fleq_canc_dx -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fdeq.ma deleted file mode 100644 index 13ab8ff2f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fdeq.ma +++ /dev/null @@ -1,52 +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/static/rdeq_rdeq.ma". -include "basic_2/static/fdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) - -(* Advanced properties ******************************************************) - -lemma fdeq_sym: ∀h,o. tri_symmetric … (fdeq h o). -#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1 -/3 width=1 by fdeq_intro_dx, rdeq_sym, tdeq_sym/ -qed-. - -(* Main properties **********************************************************) - -theorem fdeq_trans: ∀h,o. tri_transitive … (fdeq h o). -#h #o #G1 #G #L1 #L #T1 #T * -G -L -T -#L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2 -/4 width=5 by fdeq_intro_sn, rdeq_trans, tdeq_rdeq_div, tdeq_trans/ -qed-. - -theorem fdeq_canc_sn: ∀h,o,G,G1,G2,L,L1,L2,T,T1,T2. - ⦃G, L, T⦄ ≛[h, o] ⦃G1, L1, T1⦄→ ⦃G, L, T⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄. -/3 width=5 by fdeq_trans, fdeq_sym/ qed-. - -theorem fdeq_canc_dx: ∀h,o,G1,G2,G,L1,L2,L,T1,T2,T. - ⦃G1, L1, T1⦄ ≛[h, o] ⦃G, L, T⦄ → ⦃G2, L2, T2⦄ ≛[h, o] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄. -/3 width=5 by fdeq_trans, fdeq_sym/ qed-. - -(* Main inversion lemmas with degree-based equivalence on terms *************) - -theorem fdeq_tdneq_repl_dx: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → - ∀U1,U2. ⦃G1, L1, U1⦄ ≛[h, o] ⦃G2, L2, U2⦄ → - (T2 ≛[h, o] U2 → ⊥) → (T1 ≛[h, o] U1 → ⊥). -#h #o #G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1 -elim (fdeq_inv_gen_sn … HT) -HT #_ #_ #HT -elim (fdeq_inv_gen_sn … HU) -HU #_ #_ #HU -/3 width=5 by tdeq_repl/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fqup.ma deleted file mode 100644 index e9cc92a39..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fqup.ma +++ /dev/null @@ -1,29 +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/static/rdeq_fqup.ma". -include "basic_2/static/fdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) - -(* Properties with degree-based equivalence for terms ***********************) - -lemma tdeq_fdeq: ∀h,o,T1,T2. T1 ≛[h, o] T2 → - ∀G,L. ⦃G, L, T1⦄ ≛[h, o] ⦃G, L, T2⦄. -/2 width=1 by fdeq_intro_sn/ qed. - -(* Advanced properties ******************************************************) - -lemma fdeq_refl: ∀h,o. tri_reflexive … (fdeq h o). -/2 width=1 by fdeq_intro_sn/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fqus.ma deleted file mode 100644 index 6c2246cad..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_fqus.ma +++ /dev/null @@ -1,31 +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/static/rdeq_fqus.ma". -include "basic_2/static/fdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) - -(* Properties with star-iterated structural successor for closures **********) - -lemma fdeq_fqus_trans: ∀h,o,b,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G, L, T⦄ → - ∀G2,L2,T2. ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → - ∃∃G,L0,T0. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L0, T0⦄ & ⦃G, L0, T0⦄ ≛[h, o] ⦃G2, L2, T2⦄. -#h #o #b #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2 -elim(fdeq_inv_gen_dx … H1) -H1 #HG #HL1 #HT1 destruct -elim (rdeq_fqus_trans … H2 … HL1) -L #L #T0 #H2 #HT02 #HL2 -elim (tdeq_fqus_trans … H2 … HT1) -T #L0 #T #H2 #HT0 #HL0 -lapply (tdeq_rdeq_conf … HT02 … HL0) -HL0 #HL0 -/4 width=7 by fdeq_intro_dx, rdeq_trans, tdeq_trans, ex2_3_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_req.ma b/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_req.ma deleted file mode 100644 index 7f98713a0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/fdeq_req.ma +++ /dev/null @@ -1,27 +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/static/rdeq_req.ma". -include "basic_2/static/fdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) - -(* Properties with syntactic equivalence on referred entries ****************) - -lemma req_rdeq_trans: ∀h,o,L1,L,T1. L1 ≡[T1] L → - ∀G1,G2,L2,T2. ⦃G1, L, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄. -#h #o #L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H -elim (fdeq_inv_gen_sn … H) -H #H #HL2 #T12 destruct -/3 width=3 by fdeq_intro_sn, req_rdeq_trans/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/frees.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees.ma deleted file mode 100644 index b35ea99b8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/frees.ma +++ /dev/null @@ -1,226 +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 "ground_2/relocation/rtmap_sor.ma". -include "basic_2/notation/relations/freestar_3.ma". -include "basic_2/syntax/lenv.ma". - -(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) - -inductive frees: relation3 lenv term rtmap ≝ -| frees_sort: ∀f,L,s. 𝐈⦃f⦄ → frees L (⋆s) f -| frees_atom: ∀f,i. 𝐈⦃f⦄ → frees (⋆) (#i) (⫯*[i]↑f) -| frees_pair: ∀f,I,L,V. frees L V f → - frees (L.ⓑ{I}V) (#0) (↑f) -| frees_unit: ∀f,I,L. 𝐈⦃f⦄ → frees (L.ⓤ{I}) (#0) (↑f) -| frees_lref: ∀f,I,L,i. frees L (#i) f → - frees (L.ⓘ{I}) (#↑i) (⫯f) -| frees_gref: ∀f,L,l. 𝐈⦃f⦄ → frees L (§l) f -| frees_bind: ∀f1,f2,f,p,I,L,V,T. frees L V f1 → frees (L.ⓑ{I}V) T f2 → - f1 ⋓ ⫱f2 ≘ f → frees L (ⓑ{p,I}V.T) f -| frees_flat: ∀f1,f2,f,I,L,V,T. frees L V f1 → frees L T f2 → - f1 ⋓ f2 ≘ f → frees L (ⓕ{I}V.T) f -. - -interpretation - "context-sensitive free variables (term)" - 'FreeStar L T f = (frees L T f). - -(* Basic inversion lemmas ***************************************************) - -fact frees_inv_sort_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = ⋆x → 𝐈⦃f⦄. -#L #X #f #H elim H -f -L -X // -[ #f #i #_ #x #H destruct -| #f #_ #L #V #_ #_ #x #H destruct -| #f #_ #L #_ #x #H destruct -| #f #_ #L #i #_ #_ #x #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct -] -qed-. - -lemma frees_inv_sort: ∀f,L,s. L ⊢ 𝐅*⦃⋆s⦄ ≘ f → 𝐈⦃f⦄. -/2 width=5 by frees_inv_sort_aux/ qed-. - -fact frees_inv_atom_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀i. L = ⋆ → X = #i → - ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g. -#f #L #X #H elim H -f -L -X -[ #f #L #s #_ #j #_ #H destruct -| #f #i #Hf #j #_ #H destruct /2 width=3 by ex2_intro/ -| #f #I #L #V #_ #_ #j #H destruct -| #f #I #L #_ #j #H destruct -| #f #I #L #i #_ #_ #j #H destruct -| #f #L #l #_ #j #_ #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #_ #_ #j #_ #H destruct -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #_ #_ #j #_ #H destruct -] -qed-. - -lemma frees_inv_atom: ∀f,i. ⋆ ⊢ 𝐅*⦃#i⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g. -/2 width=5 by frees_inv_atom_aux/ qed-. - -fact frees_inv_pair_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,V. L = K.ⓑ{I}V → X = #0 → - ∃∃g. K ⊢ 𝐅*⦃V⦄ ≘ g & f = ↑g. -#f #L #X * -f -L -X -[ #f #L #s #_ #Z #Y #X #_ #H destruct -| #f #i #_ #Z #Y #X #H destruct -| #f #I #L #V #Hf #Z #Y #X #H #_ destruct /2 width=3 by ex2_intro/ -| #f #I #L #_ #Z #Y #X #H destruct -| #f #I #L #i #_ #Z #Y #X #_ #H destruct -| #f #L #l #_ #Z #Y #X #_ #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #Z #Y #X #_ #H destruct -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #Z #Y #X #_ #H destruct -] -qed-. - -lemma frees_inv_pair: ∀f,I,K,V. K.ⓑ{I}V ⊢ 𝐅*⦃#0⦄ ≘ f → ∃∃g. K ⊢ 𝐅*⦃V⦄ ≘ g & f = ↑g. -/2 width=6 by frees_inv_pair_aux/ qed-. - -fact frees_inv_unit_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K. L = K.ⓤ{I} → X = #0 → - ∃∃g. 𝐈⦃g⦄ & f = ↑g. -#f #L #X * -f -L -X -[ #f #L #s #_ #Z #Y #_ #H destruct -| #f #i #_ #Z #Y #H destruct -| #f #I #L #V #_ #Z #Y #H destruct -| #f #I #L #Hf #Z #Y #H destruct /2 width=3 by ex2_intro/ -| #f #I #L #i #_ #Z #Y #_ #H destruct -| #f #L #l #_ #Z #Y #_ #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #Z #Y #_ #H destruct -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #Z #Y #_ #H destruct -] -qed-. - -lemma frees_inv_unit: ∀f,I,K. K.ⓤ{I} ⊢ 𝐅*⦃#0⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ↑g. -/2 width=7 by frees_inv_unit_aux/ qed-. - -fact frees_inv_lref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,j. L = K.ⓘ{I} → X = #(↑j) → - ∃∃g. K ⊢ 𝐅*⦃#j⦄ ≘ g & f = ⫯g. -#f #L #X * -f -L -X -[ #f #L #s #_ #Z #Y #j #_ #H destruct -| #f #i #_ #Z #Y #j #H destruct -| #f #I #L #V #_ #Z #Y #j #_ #H destruct -| #f #I #L #_ #Z #Y #j #_ #H destruct -| #f #I #L #i #Hf #Z #Y #j #H1 #H2 destruct /2 width=3 by ex2_intro/ -| #f #L #l #_ #Z #Y #j #_ #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #Z #Y #j #_ #H destruct -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #Z #Y #j #_ #H destruct -] -qed-. - -lemma frees_inv_lref: ∀f,I,K,i. K.ⓘ{I} ⊢ 𝐅*⦃#(↑i)⦄ ≘ f → - ∃∃g. K ⊢ 𝐅*⦃#i⦄ ≘ g & f = ⫯g. -/2 width=6 by frees_inv_lref_aux/ qed-. - -fact frees_inv_gref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = §x → 𝐈⦃f⦄. -#f #L #X #H elim H -f -L -X // -[ #f #i #_ #x #H destruct -| #f #_ #L #V #_ #_ #x #H destruct -| #f #_ #L #_ #x #H destruct -| #f #_ #L #i #_ #_ #x #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct -] -qed-. - -lemma frees_inv_gref: ∀f,L,l. L ⊢ 𝐅*⦃§l⦄ ≘ f → 𝐈⦃f⦄. -/2 width=5 by frees_inv_gref_aux/ qed-. - -fact frees_inv_bind_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀p,I,V,T. X = ⓑ{p,I}V.T → - ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f. -#f #L #X * -f -L -X -[ #f #L #s #_ #q #J #W #U #H destruct -| #f #i #_ #q #J #W #U #H destruct -| #f #I #L #V #_ #q #J #W #U #H destruct -| #f #I #L #_ #q #J #W #U #H destruct -| #f #I #L #i #_ #q #J #W #U #H destruct -| #f #L #l #_ #q #J #W #U #H destruct -| #f1 #f2 #f #p #I #L #V #T #HV #HT #Hf #q #J #W #U #H destruct /2 width=5 by ex3_2_intro/ -| #f1 #f2 #f #I #L #V #T #_ #_ #_ #q #J #W #U #H destruct -] -qed-. - -lemma frees_inv_bind: ∀f,p,I,L,V,T. L ⊢ 𝐅*⦃ⓑ{p,I}V.T⦄ ≘ f → - ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f. -/2 width=4 by frees_inv_bind_aux/ qed-. - -fact frees_inv_flat_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,V,T. X = ⓕ{I}V.T → - ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f. -#f #L #X * -f -L -X -[ #f #L #s #_ #J #W #U #H destruct -| #f #i #_ #J #W #U #H destruct -| #f #I #L #V #_ #J #W #U #H destruct -| #f #I #L #_ #J #W #U #H destruct -| #f #I #L #i #_ #J #W #U #H destruct -| #f #L #l #_ #J #W #U #H destruct -| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #J #W #U #H destruct -| #f1 #f2 #f #I #L #V #T #HV #HT #Hf #J #W #U #H destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma frees_inv_flat: ∀f,I,L,V,T. L ⊢ 𝐅*⦃ⓕ{I}V.T⦄ ≘ f → - ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f. -/2 width=4 by frees_inv_flat_aux/ qed-. - -(* Basic properties ********************************************************) - -lemma frees_eq_repl_back: ∀L,T. eq_repl_back … (λf. L ⊢ 𝐅*⦃T⦄ ≘ f). -#L #T #f1 #H elim H -f1 -L -T -[ /3 width=3 by frees_sort, isid_eq_repl_back/ -| #f1 #i #Hf1 #g2 #H - elim (eq_inv_pushs_sn … H) -H #g #Hg #H destruct - elim (eq_inv_nx … Hg) -Hg - /3 width=3 by frees_atom, isid_eq_repl_back/ -| #f1 #I #L #V #_ #IH #g2 #H - elim (eq_inv_nx … H) -H - /3 width=3 by frees_pair/ -| #f1 #I #L #Hf1 #g2 #H - elim (eq_inv_nx … H) -H - /3 width=3 by frees_unit, isid_eq_repl_back/ -| #f1 #I #L #i #_ #IH #g2 #H - elim (eq_inv_px … H) -H /3 width=3 by frees_lref/ -| /3 width=3 by frees_gref, isid_eq_repl_back/ -| /3 width=7 by frees_bind, sor_eq_repl_back3/ -| /3 width=7 by frees_flat, sor_eq_repl_back3/ -] -qed-. - -lemma frees_eq_repl_fwd: ∀L,T. eq_repl_fwd … (λf. L ⊢ 𝐅*⦃T⦄ ≘ f). -#L #T @eq_repl_sym /2 width=3 by frees_eq_repl_back/ -qed-. - -lemma frees_lref_push: ∀f,i. ⋆ ⊢ 𝐅*⦃#i⦄ ≘ f → ⋆ ⊢ 𝐅*⦃#↑i⦄ ≘ ⫯f. -#f #i #H -elim (frees_inv_atom … H) -H #g #Hg #H destruct -/2 width=1 by frees_atom/ -qed. - -(* Forward lemmas with test for finite colength *****************************) - -lemma frees_fwd_isfin: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → 𝐅⦃f⦄. -#f #L #T #H elim H -f -L -T -/4 width=5 by sor_isfin, isfin_isid, isfin_tl, isfin_pushs, isfin_push, isfin_next/ -qed-. - -(* Basic_2A1: removed theorems 30: - frees_eq frees_be frees_inv - frees_inv_sort frees_inv_gref frees_inv_lref frees_inv_lref_free - frees_inv_lref_skip frees_inv_lref_ge frees_inv_lref_lt - frees_inv_bind frees_inv_flat frees_inv_bind_O - frees_lref_eq frees_lref_be frees_weak - frees_bind_sn frees_bind_dx frees_flat_sn frees_flat_dx - frees_lift_ge frees_inv_lift_be frees_inv_lift_ge - lreq_frees_trans frees_lreq_conf - llor_atom llor_skip llor_total - llor_tail_frees llor_tail_cofrees -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/frees_append.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees_append.ma deleted file mode 100644 index 9cf6bfe19..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/frees_append.ma +++ /dev/null @@ -1,59 +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/syntax/append.ma". -include "basic_2/static/frees.ma". - -(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) - -(* Properties with append for local environments ****************************) - -lemma frees_append_void: ∀f,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f → ⓧ.K ⊢ 𝐅*⦃T⦄ ≘ f. -#f #K #T #H elim H -f -K -T -[ /2 width=1 by frees_sort/ -| #f * /3 width=1 by frees_atom, frees_unit, frees_lref/ -| /2 width=1 by frees_pair/ -| /2 width=1 by frees_unit/ -| /2 width=1 by frees_lref/ -| /2 width=1 by frees_gref/ -| /3 width=5 by frees_bind/ -| /3 width=5 by frees_flat/ -] -qed. - -(* Inversion lemmas with append for local environments **********************) - -fact frees_inv_append_void_aux: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → - ∀K. L = ⓧ.K → K ⊢ 𝐅*⦃T⦄ ≘ f. -#f #L #T #H elim H -f -L -T -[ /2 width=1 by frees_sort/ -| #f #i #_ #K #H - elim (append_inv_atom3_sn … H) -H #H1 #H2 destruct -| #f #I #L #V #_ #IH #K #H - elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct - /3 width=1 by frees_pair/ -| #f #I #L #Hf #K #H - elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct - /2 width=1 by frees_atom, frees_unit/ -| #f #I #L #i #Hf #IH #K #H - elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct - /3 width=1 by frees_lref, frees_lref_push/ -| /2 width=1 by frees_gref/ -| /3 width=5 by frees_bind/ -| /3 width=5 by frees_flat/ -] -qed-. - -lemma frees_inv_append_void: ∀f,K,T. ⓧ.K ⊢ 𝐅*⦃T⦄ ≘ f → K ⊢ 𝐅*⦃T⦄ ≘ f. -/2 width=3 by frees_inv_append_void_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/frees_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees_drops.ma deleted file mode 100644 index fe24eadf5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/frees_drops.ma +++ /dev/null @@ -1,245 +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 "ground_2/relocation/nstream_coafter.ma". -include "basic_2/relocation/drops_drops.ma". -include "basic_2/static/frees_fqup.ma". - -(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) - -(* Advanced properties ******************************************************) - -lemma frees_atom_drops: ∀b,L,i. ⬇*[b, 𝐔❴i❵] L ≘ ⋆ → - ∀f. 𝐈⦃f⦄ → L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i]↑f. -#b #L elim L -L /2 width=1 by frees_atom/ -#L #I #IH * -[ #H lapply (drops_fwd_isid … H ?) -H // #H destruct -| /4 width=3 by frees_lref, drops_inv_drop1/ -] -qed. - -lemma frees_pair_drops: ∀f,K,V. K ⊢ 𝐅*⦃V⦄ ≘ f → - ∀i,I,L. ⬇*[i] L ≘ K.ⓑ{I}V → L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i] ↑f. -#f #K #V #Hf #i elim i -i -[ #I #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_pair/ -| #i #IH #I #L #H elim (drops_inv_succ … H) -H /3 width=2 by frees_lref/ -] -qed. - -lemma frees_unit_drops: ∀f. 𝐈⦃f⦄ → ∀I,K,i,L. ⬇*[i] L ≘ K.ⓤ{I} → - L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i] ↑f. -#f #Hf #I #K #i elim i -i -[ #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_unit/ -| #i #IH #Y #H elim (drops_inv_succ … H) -H - #J #L #HLK #H destruct /3 width=1 by frees_lref/ -] -qed. -(* -lemma frees_sort_pushs: ∀f,K,s. K ⊢ 𝐅*⦃⋆s⦄ ≘ f → - ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃⋆s⦄ ≘ ⫯*[i] f. -#f #K #s #Hf #i elim i -i -[ #L #H lapply (drops_fwd_isid … H ?) -H // -| #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_sort/ -] -qed. -*) -lemma frees_lref_pushs: ∀f,K,j. K ⊢ 𝐅*⦃#j⦄ ≘ f → - ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃#(i+j)⦄ ≘ ⫯*[i] f. -#f #K #j #Hf #i elim i -i -[ #L #H lapply (drops_fwd_isid … H ?) -H // -| #i #IH #L #H elim (drops_inv_succ … H) -H - #I #Y #HYK #H destruct /3 width=1 by frees_lref/ -] -qed. -(* -lemma frees_gref_pushs: ∀f,K,l. K ⊢ 𝐅*⦃§l⦄ ≘ f → - ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃§l⦄ ≘ ⫯*[i] f. -#f #K #l #Hf #i elim i -i -[ #L #H lapply (drops_fwd_isid … H ?) -H // -| #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_gref/ -] -qed. -*) -(* Advanced inversion lemmas ************************************************) - -lemma frees_inv_lref_drops: ∀L,i,f. L ⊢ 𝐅*⦃#i⦄ ≘ f → - ∨∨ ∃∃g. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ & 𝐈⦃g⦄ & f = ⫯*[i] ↑g - | ∃∃g,I,K,V. K ⊢ 𝐅*⦃V⦄ ≘ g & - ⬇*[i] L ≘ K.ⓑ{I}V & f = ⫯*[i] ↑g - | ∃∃g,I,K. ⬇*[i] L ≘ K.ⓤ{I} & 𝐈⦃g⦄ & f = ⫯*[i] ↑g. -#L elim L -L -[ #i #g | #L #I #IH * [ #g cases I -I [ #I | #I #V ] -IH | #i #g ] ] #H -[ elim (frees_inv_atom … H) -H #f #Hf #H destruct - /3 width=3 by or3_intro0, ex3_intro/ -| elim (frees_inv_unit … H) -H #f #Hf #H destruct - /4 width=3 by drops_refl, or3_intro2, ex3_3_intro/ -| elim (frees_inv_pair … H) -H #f #Hf #H destruct - /4 width=7 by drops_refl, or3_intro1, ex3_4_intro/ -| elim (frees_inv_lref … H) -H #f #Hf #H destruct - elim (IH … Hf) -IH -Hf * - [ /4 width=3 by drops_drop, or3_intro0, ex3_intro/ - | /4 width=7 by drops_drop, or3_intro1, ex3_4_intro/ - | /4 width=3 by drops_drop, or3_intro2, ex3_3_intro/ - ] -] -qed-. - -(* Properties with generic slicing for local environments *******************) - -lemma frees_lifts: ∀b,f1,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f1 → - ∀f,L. ⬇*[b, f] L ≘ K → ∀U. ⬆*[f] T ≘ U → - ∀f2. f ~⊚ f1 ≘ f2 → L ⊢ 𝐅*⦃U⦄ ≘ f2. -#b #f1 #K #T #H lapply (frees_fwd_isfin … H) elim H -f1 -K -T -[ #f1 #K #s #Hf1 #_ #f #L #HLK #U #H2 #f2 #H3 - lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hf2 - >(lifts_inv_sort1 … H2) -U /2 width=1 by frees_sort/ -| #f1 #i #Hf1 #_ #f #L #H1 #U #H2 #f2 #H3 - elim (lifts_inv_lref1 … H2) -H2 #j #Hij #H destruct - elim (coafter_fwd_xnx_pushs … Hij H3) -H3 #g2 #Hg2 #H2 destruct - lapply (coafter_isid_inv_dx … Hg2 … Hf1) -f1 #Hf2 - elim (drops_inv_atom2 … H1) -H1 #n #g #H1 #Hf - elim (after_at_fwd … Hij … Hf) -f #x #_ #Hj -g -i - lapply (at_inv_uni … Hj) -Hj #H destruct - /3 width=8 by frees_atom_drops, drops_trans/ -| #f1 #I #K #V #_ #IH #Hf1 #f #L #H1 #U #H2 #f2 #H3 - lapply (isfin_inv_next … Hf1 ??) -Hf1 [3: |*: // ] #Hf1 - lapply (lifts_inv_lref1 … H2) -H2 * #j #Hf #H destruct - elim (drops_split_trans_bind2 … H1) -H1 [ |*: // ] #Z #Y #HLY #HYK #H - elim (liftsb_inv_pair_sn … H) -H #W #HVW #H destruct - elim (coafter_fwd_xnx_pushs … Hf H3) -H3 #g2 #H3 #H2 destruct - lapply (IH … HYK … HVW … H3) -IH -H3 -HYK -HVW // - /2 width=5 by frees_pair_drops/ -| #f1 #I #K #Hf1 #_ #f #L #H1 #U #H2 #f2 #H3 - lapply (lifts_inv_lref1 … H2) -H2 * #j #Hf #H destruct - elim (coafter_fwd_xnx_pushs … Hf H3) -H3 #g2 #H3 #H2 destruct - lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hg2 - elim (drops_split_trans_bind2 … H1 … Hf) -H1 -Hf #Z #Y #HLY #_ #H - lapply (liftsb_inv_unit_sn … H) -H #H destruct - /2 width=3 by frees_unit_drops/ -| #f1 #I #K #i #_ #IH #Hf1 #f #L #H1 #U #H2 #f2 #H3 - lapply (isfin_inv_push … Hf1 ??) -Hf1 [3: |*: // ] #Hf1 - lapply (lifts_inv_lref1 … H2) -H2 * #x #Hf #H destruct - elim (at_inv_nxx … Hf) -Hf [ |*: // ] #j #Hf #H destruct - elim (drops_split_trans_bind2 … H1) -H1 [ |*: // ] #Z #Y #HLY #HYK #_ - elim (coafter_fwd_xpx_pushs … 0 … H3) [ |*: // ] #g2 #H3 #H2 destruct - lapply (drops_isuni_fwd_drop2 … HLY) -HLY // #HLY - lapply (IH … HYK … H3) -IH -H3 -HYK [4: |*: /2 width=2 by lifts_lref/ ] - >plus_S1 /2 width=3 by frees_lref_pushs/ (**) (* full auto fails *) -| #f1 #K #l #Hf1 #_ #f #L #HLK #U #H2 #f2 #H3 - lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hf2 - >(lifts_inv_gref1 … H2) -U /2 width=1 by frees_gref/ -| #f1V #f1T #f1 #p #I #K #V #T #_ #_ #H1f1 #IHV #IHT #H2f1 #f #L #H1 #Y #H2 #f2 #H3 - elim (sor_inv_isfin3 … H1f1) // #Hf1V #H - lapply (isfin_inv_tl … H) -H - elim (lifts_inv_bind1 … H2) -H2 #W #U #HVW #HTU #H destruct - elim (coafter_sor … H3 … H1f1) /2 width=5 by coafter_isfin2_fwd/ -H3 -H1f1 #f2V #f2T #Hf2V #H - elim (coafter_inv_tl1 … H) -H - /5 width=5 by frees_bind, drops_skip, ext2_pair/ -| #f1V #f1T #f1 #I #K #V #T #_ #_ #H1f1 #IHV #IHT #H2f1 #f #L #H1 #Y #H2 #f2 #H3 - elim (sor_inv_isfin3 … H1f1) // - elim (lifts_inv_flat1 … H2) -H2 #W #U #HVW #HTU #H destruct - elim (coafter_sor … H3 … H1f1) - /3 width=5 by coafter_isfin2_fwd, frees_flat/ -] -qed-. - -lemma frees_lifts_SO: ∀b,L,K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T,U. ⬆*[1] T ≘ U → - ∀f. K ⊢ 𝐅*⦃T⦄ ≘ f → L ⊢ 𝐅*⦃U⦄ ≘ ⫯f. -#b #L #K #HLK #T #U #HTU #f #Hf -@(frees_lifts b … Hf … HTU) // (**) (* auto fails *) -qed. - -(* Forward lemmas with generic slicing for local environments ***************) - -lemma frees_fwd_coafter: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 → - ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U → - ∀f1. K ⊢ 𝐅*⦃T⦄ ≘ f1 → f ~⊚ f1 ≘ f2. -/4 width=11 by frees_lifts, frees_mono, coafter_eq_repl_back0/ qed-. - -(* Inversion lemmas with generic slicing for local environments *************) - -lemma frees_inv_lifts_ex: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 → - ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U → - ∃∃f1. f ~⊚ f1 ≘ f2 & K ⊢ 𝐅*⦃T⦄ ≘ f1. -#b #f2 #L #U #Hf2 #f #K #HLK #T elim (frees_total K T) -/3 width=9 by frees_fwd_coafter, ex2_intro/ -qed-. - -lemma frees_inv_lifts_SO: ∀b,f,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f → - ∀K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T. ⬆*[1] T ≘ U → - K ⊢ 𝐅*⦃T⦄ ≘ ⫱f. -#b #f #L #U #H #K #HLK #T #HTU elim(frees_inv_lifts_ex … H … HLK … HTU) -b -L -U -#f1 #Hf #Hf1 elim (coafter_inv_nxx … Hf) -Hf -/3 width=5 by frees_eq_repl_back, coafter_isid_inv_sn/ -qed-. - -lemma frees_inv_lifts: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 → - ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U → - ∀f1. f ~⊚ f1 ≘ f2 → K ⊢ 𝐅*⦃T⦄ ≘ f1. -#b #f2 #L #U #H #f #K #HLK #T #HTU #f1 #Hf2 elim (frees_inv_lifts_ex … H … HLK … HTU) -b -L -U -/3 width=7 by frees_eq_repl_back, coafter_inj/ -qed-. - -(* Note: this is used by rex_conf and might be modified *) -lemma frees_inv_drops_next: ∀f1,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 → - ∀I2,L2,V2,n. ⬇*[n] L1 ≘ L2.ⓑ{I2}V2 → - ∀g1. ↑g1 = ⫱*[n] f1 → - ∃∃g2. L2 ⊢ 𝐅*⦃V2⦄ ≘ g2 & g2 ⊆ g1. -#f1 #L1 #T1 #H elim H -f1 -L1 -T1 -[ #f1 #L1 #s #Hf1 #I2 #L2 #V2 #n #_ #g1 #H1 -I2 -L1 -s - lapply (isid_tls n … Hf1) -Hf1

(injective_next … Hgf1) -g1 - /2 width=3 by ex2_intro/ - | -Hf1 #n #HL12 lapply (drops_inv_drop1 … HL12) -HL12 - #HL12 #g1 tls_xn #H2 elim (IHT1 … H2) -IHT1 -H2 - /3 width=6 by drops_drop, sor_inv_sle_dx_trans, ex2_intro/ - ] -| #fV1 #fT1 #f1 #I1 #L1 #V1 #T1 #_ #_ #Hf1 #IHV1 #IHT1 #I2 #L2 #V2 #n #HL12 #g1 #Hgf1 - lapply (sor_tls … Hf1 n) -Hf1 (lifts_inv_sort1 … H0) -H0 - lapply (acr_gcr … H1RP H2RP (⓪)) #HAtom - lapply (s4 … HAtom G L2 (Ⓔ)) /2 width=1 by/ -| #i #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct - elim (aaa_inv_lref_drops … HA) -HA #I #K1 #V1 #HLK1 #HKV1 - elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct - lapply (acr_gcr … H1RP H2RP A) #HA - lapply (drops_trans … HL01 … HLK1 ??) -HL01 [3: |*: // ] #H - elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK0 #HY - lapply (drops_tls_at … Hf … HY) -Hf -HY #HY - elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK01 #HZ #H destruct - elim (liftsb_inv_pair_sn … HZ) -HZ #V0 #HV10 #H destruct - elim (lifts_total V0 (𝐔❴↑j❵)) #V #HV0 - elim (lsubc_drops_trans_isuni … HL20 … HLK0) -HL20 -HLK0 // #Y #HLK2 #H - elim (lsubc_inv_bind2 … H) -H * - [ #K2 #HK20 #H destruct - lapply (drops_isuni_fwd_drop2 … HLK2) // #HLK2b - lapply (s5 … HA ? G ? ? (Ⓔ) … HV0 ?) -HA - /4 width=11 by acr_lifts, fqup_lref, drops_inv_gen/ - | #K2 #V2 #W2 #B #HKV2 #HK2V0 #HKV0B #_ #H1 #H2 destruct -IH -HLK1 - lapply (drops_isuni_fwd_drop2 … HLK2) // #HLK2b - lapply (aaa_lifts … HKV1 … HK01 … HV10) -HKV1 -HK01 -HV10 #HKV0A - lapply (aaa_mono … HKV0B … HKV0A) #H destruct -HKV0B -HKV0A - elim (lifts_total V2 (𝐔❴↑j❵)) #V3 #HV23 - lapply (s5 … HA … G … (Ⓔ) … (ⓝW2.V2) (ⓝV.V3) ????) - [3: |*: /2 width=9 by drops_inv_gen, lifts_flat/ ] -HLK2 - lapply (s7 … HA G L2 (Ⓔ)) -HA /3 width=7 by acr_lifts/ - ] -| #l #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct -IH - elim (aaa_inv_gref … HA) -| #V #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct - elim (aaa_inv_abbr … HA) -HA #B #HV #HT - elim (lifts_inv_bind1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct - lapply (acr_gcr … H1RP H2RP A) #HA - lapply (acr_gcr … H1RP H2RP B) #HB - lapply (s1 … HB) -HB #HB - lapply (s6 … HA G L2 (Ⓔ) (Ⓔ)) /5 width=10 by lsubc_bind, liftsv_nil, drops_skip, ext2_pair/ -| #W #T #HG #HL #HT #Z0 #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct - elim (aaa_inv_abst … HA) -HA #B #A #HW #HT #H destruct - elim (lifts_inv_bind1 … H0) -H0 #W0 #T0 #HW0 #HT0 #H destruct - @(acr_abst … H1RP H2RP) /2 width=10 by/ - #b3 #f3 #L3 #V3 #W3 #T3 #HL32 #HW03 #HT03 #H1B #H2B - elim (drops_lsubc_trans … H1RP … HL32 … HL20) -L2 #L2 #HL32 #HL20 - lapply (aaa_lifts … HW … (f3∘f) L2 … W3 ?) -HW - [4: |*: /2 width=8 by drops_trans, lifts_trans/ ] #HW3 - @(IH … ((⫯f3)∘⫯f) … (L2. ⓛW3)) -IH - /4 width=12 by lsubc_beta, drops_trans, drops_skip, lifts_trans, ext2_pair/ -| #V #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct - elim (aaa_inv_appl … HA) -HA #B #HV #HT - elim (lifts_inv_flat1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct - lapply (IH … HT … HL01 … HT0 … HL20) -HT -HT0 - /3 width=10 by drops_refl, lifts_refl/ -| #W #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct - elim (aaa_inv_cast … HA) -HA #HW #HT - elim (lifts_inv_flat1 … H0) -H0 #W0 #T0 #HW0 #HT0 #H destruct - lapply (acr_gcr … H1RP H2RP A) #HA - lapply (s7 … HA G L2 (Ⓔ)) /3 width=10 by/ -] -qed. - -(* Basic_1: was: sc3_arity *) -lemma acr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → - ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L, T⦄ ϵ[RP] 〚A〛. -/3 width=9 by drops_refl, lifts_refl, acr_aaa_csubc_lifts/ qed. - -lemma gcr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → - ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → RP G L T. -#RR #RS #RP #H1RP #H2RP #G #L #T #A #HT -lapply (acr_gcr … H1RP H2RP A) #HA -@(s1 … HA) /2 width=4 by acr_aaa/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/gcp_cr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/gcp_cr.ma deleted file mode 100644 index f9b13438a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/gcp_cr.ma +++ /dev/null @@ -1,177 +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/ineint_5.ma". -include "basic_2/syntax/aarity.ma". -include "basic_2/relocation/lifts_simple.ma". -include "basic_2/relocation/lifts_lifts_vector.ma". -include "basic_2/relocation/drops_drops.ma". -include "basic_2/static/gcp.ma". - -(* GENERIC COMPUTATION PROPERTIES *******************************************) - -(* Note: this is Girard's CR1 *) -definition S1 ≝ λRP,C:candidate. - ∀G,L,T. C G L T → RP G L T. - -(* Note: this is Tait's iii, or Girard's CR4 *) -definition S2 ≝ λRR:relation4 genv lenv term term. λRS:relation term. λRP,C:candidate. - ∀G,L,Vs. all … (RP G L) Vs → - ∀T. 𝐒⦃T⦄ → NF … (RR G L) RS T → C G L (ⒶVs.T). - -(* Note: this generalizes Tait's ii *) -definition S3 ≝ λC:candidate. - ∀a,G,L,Vs,V,T,W. - C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T). - -definition S4 ≝ λRP,C:candidate. - ∀G,L,Vs. all … (RP G L) Vs → ∀s. C G L (ⒶVs.⋆s). - -definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i. - C G L (ⒶVs.V2) → ⬆*[↑i] V1 ≘ V2 → - ⬇*[i] L ≘ K.ⓑ{I}V1 → C G L (ⒶVs.#i). - -definition S6 ≝ λRP,C:candidate. - ∀G,L,V1b,V2b. ⬆*[1] V1b ≘ V2b → - ∀a,V,T. C G (L.ⓓV) (ⒶV2b.T) → RP G L V → C G L (ⒶV1b.ⓓ{a}V.T). - -definition S7 ≝ λC:candidate. - ∀G,L,Vs,T,W. C G L (ⒶVs.T) → C G L (ⒶVs.W) → C G L (ⒶVs.ⓝW.T). - -(* requirements for the generic reducibility candidate *) -record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate) : Prop ≝ -{ s1: S1 RP C; - s2: S2 RR RS RP C; - s3: S3 C; - s4: S4 RP C; - s5: S5 C; - s6: S6 RP C; - s7: S7 C -}. - -(* the functional construction for candidates *) -definition cfun: candidate → candidate → candidate ≝ - λC1,C2,G,K,T. ∀f,L,W,U. - ⬇*[Ⓕ, f] L ≘ K → ⬆*[f] T ≘ U → C1 G L W → C2 G L (ⓐW.U). - -(* the reducibility candidate associated to an atomic arity *) -rec definition acr (RP:candidate) (A:aarity) on A: candidate ≝ -match A with -[ AAtom ⇒ RP -| APair B A ⇒ cfun (acr RP B) (acr RP A) -]. - -interpretation - "reducibility candidate of an atomic arity (abstract)" - 'InEInt RP G L T A = (acr RP A G L T). - -(* Basic properties *********************************************************) - -(* Note: this requires Ⓕ-slicing in cfun since b is unknown in d_liftable_1 *) -(* Note: this requires multiple relocation *) -(* Basic 1: includes: sc3_lift *) -(* Basic 2A1: includes: gcr_lift *) -(* Basic 2A1: note: gcr_lift should be acr_lift *) -(* Basic_1: was: sc3_lift1 *) -(* Basic 2A1: was: gcr_lifts *) -(* Basic 2A1: note: gcr_lifts should be acr_lifts *) -lemma acr_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. d_liftable1 (acr RP A G). -#RR #RS #RP #H #A #G elim A -A -[ /2 width=7 by cp2/ -| #B #A #HB #HA #K #T #HKT #b #f #L #HLK #U #HTU #f0 #L0 #W #U0 #HL0 #HU0 #HW - lapply (drops_trans … HL0 … HLK ??) [3:|*: // ] -L #HL0K - lapply (lifts_trans … HTU … HU0 ??) [3:|*: // ] -U #HTU0 - /2 width=3 by/ (**) (* full auto fails *) -] -qed-. - -(* Basic_1: was: - sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast -*) -lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → - ∀A. gcr RR RS RP (acr RP A). -#RR #RS #RP #H1RP #H2RP #A elim A -A // -#B #A #IHB #IHA @mk_gcr -[ #G #L #T #H - elim (cp1 … H1RP G L) #s #HK - lapply (s2 … IHB G L (Ⓔ) … HK) // #HB - lapply (H (𝐈𝐝) L (⋆s) T ? ? ?) -H - /3 width=6 by s1, cp3, drops_refl, lifts_refl/ -| #G #L #Vs #HVs #T #H1T #H2T #f #L0 #V0 #X #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct - lapply (s1 … IHB … HB) #HV0 - @(s2 … IHA … (V0⨮V0s)) /3 width=13 by cp0, gcp2_all, lifts_simple_dx, conj/ -| #p #G #L #Vs #U #T #W #HA #f #L0 #V0 #X #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct - elim (lifts_inv_flat1 … H0) -H0 #U0 #X #HU0 #HX #H destruct - elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct - @(s3 … IHA … (V0⨮V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/ -| #G #L #Vs #HVs #s #f #L0 #V0 #X #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct - >(lifts_inv_sort1 … H0) -X0 - lapply (s1 … IHB … HB) #HV0 - @(s4 … IHA … (V0⨮V0s)) /3 width=7 by gcp2_all, conj/ -| #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #f #L0 #V0 #X #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct - elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct - lapply (drops_trans … HL0 … HLK ??) [3: |*: // ] -HLK #H - elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK0 #HY - lapply (drops_tls_at … Hf … HY) -HY #HY - elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK0 #HZ #H destruct - elim (liftsb_inv_pair_sn … HZ) -HZ #W1 #HVW1 #H destruct - elim (lifts_total W1 (𝐔❴↑j❵)) #W2 #HW12 - lapply (lifts_trans … HVW1 … HW12 ??) -HVW1 [3: |*: // ] #H - lapply (lifts_conf … HV12 … H f ?) -V1 [ /2 width=3 by after_uni_succ_sn/ ] #HVW2 - @(s5 … IHA … (V0⨮V0s) … HW12) /3 width=4 by drops_inv_gen, lifts_applv/ -| #G #L #V1s #V2s #HV12s #p #V #T #HA #HV #f #L0 #V10 #X #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V10s #X0 #HV10s #H0 #H destruct - elim (lifts_inv_bind1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct - elim (lifts_total V10 (𝐔❴1❵)) #V20 #HV120 - elim (liftsv_total (𝐔❴1❵) V10s) #V20s #HV120s - @(s6 … IHA … (V10⨮V10s) (V20⨮V20s)) /3 width=7 by cp2, liftsv_cons/ - @(HA … (⫯f)) /3 width=2 by drops_skip, ext2_pair/ - [ @lifts_applv // - lapply (liftsv_trans … HV10s … HV120s ??) -V10s [3: |*: // ] #H - elim (liftsv_split_trans … H (𝐔❴1❵) (⫯f)) /2 width=1 by after_uni_one_sn/ #V10s #HV10s #HV120s - >(liftsv_mono … HV12s … HV10s) -V1s // - | @(acr_lifts … H1RP … HB … HV120) /3 width=2 by drops_refl, drops_drop/ - ] -| #G #L #Vs #T #W #HA #HW #f #L0 #V0 #X #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct - elim (lifts_inv_flat1 … H0) -H0 #W0 #T0 #HW0 #HT0 #H destruct - @(s7 … IHA … (V0⨮V0s)) /3 width=5 by lifts_applv/ -] -qed. - -lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → - ∀p,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → ( - ∀b,f,L0,V0,W0,T0. ⬇*[b, f] L0 ≘ L → ⬆*[f] W ≘ W0 → ⬆*[⫯f] T ≘ T0 → - ⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛 - ) → - ⦃G, L, ⓛ{p}W.T⦄ ϵ[RP] 〚②B.A〛. -#RR #RS #RP #H1RP #H2RP #p #G #L #W #T #A #B #HW #HA #f #L0 #V0 #X #HL0 #H #HB -lapply (acr_gcr … H1RP H2RP A) #HCA -lapply (acr_gcr … H1RP H2RP B) #HCB -elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct -lapply (acr_lifts … H1RP … HW … HL0 … HW0) -HW #HW0 -lapply (s3 … HCA … p G L0 (Ⓔ)) #H @H -H -lapply (s6 … HCA G L0 (Ⓔ) (Ⓔ) ?) // #H @H -H -[ @(HA … HL0) // -| lapply (s1 … HCB) -HCB #HCB - lapply (s7 … H2RP G L0 (Ⓔ)) /3 width=1 by/ -] -qed. - -(* Basic_1: removed theorems 2: sc3_arity_gen sc3_repl *) -(* Basic_1: removed local theorems 1: sc3_sn3_abst *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba.ma deleted file mode 100644 index e16decefa..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba.ma +++ /dev/null @@ -1,93 +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/lrsubeqa_3.ma". -include "basic_2/static/aaa.ma". - -(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) - -inductive lsuba (G:genv): relation lenv ≝ -| lsuba_atom: lsuba G (⋆) (⋆) -| lsuba_bind: ∀I,L1,L2. lsuba G L1 L2 → lsuba G (L1.ⓘ{I}) (L2.ⓘ{I}) -| lsuba_beta: ∀L1,L2,W,V,A. ⦃G, L1⦄ ⊢ ⓝW.V ⁝ A → ⦃G, L2⦄ ⊢ W ⁝ A → - lsuba G L1 L2 → lsuba G (L1.ⓓⓝW.V) (L2.ⓛW) -. - -interpretation - "local environment refinement (atomic arity assignment)" - 'LRSubEqA G L1 L2 = (lsuba G L1 L2). - -(* Basic inversion lemmas ***************************************************) - -fact lsuba_inv_atom1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 = ⋆ → L2 = ⋆. -#G #L1 #L2 * -L1 -L2 -[ // -| #I #L1 #L2 #_ #H destruct -| #L1 #L2 #W #V #A #_ #_ #_ #H destruct -] -qed-. - -lemma lsuba_inv_atom1: ∀G,L2. G ⊢ ⋆ ⫃⁝ L2 → L2 = ⋆. -/2 width=4 by lsuba_inv_atom1_aux/ qed-. - -fact lsuba_inv_bind1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K1. L1 = K1.ⓘ{I} → - (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓘ{I}) ∨ - ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & - G ⊢ K1 ⫃⁝ K2 & I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW. -#G #L1 #L2 * -L1 -L2 -[ #J #K1 #H destruct -| #I #L1 #L2 #HL12 #J #K1 #H destruct /3 width=3 by ex2_intro, or_introl/ -| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K1 #H destruct /3 width=9 by ex5_4_intro, or_intror/ -] -qed-. - -lemma lsuba_inv_bind1: ∀I,G,K1,L2. G ⊢ K1.ⓘ{I} ⫃⁝ L2 → - (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓘ{I}) ∨ - ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & - I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW. -/2 width=3 by lsuba_inv_bind1_aux/ qed-. - -fact lsuba_inv_atom2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L2 = ⋆ → L1 = ⋆. -#G #L1 #L2 * -L1 -L2 -[ // -| #I #L1 #L2 #_ #H destruct -| #L1 #L2 #W #V #A #_ #_ #_ #H destruct -] -qed-. - -lemma lsubc_inv_atom2: ∀G,L1. G ⊢ L1 ⫃⁝ ⋆ → L1 = ⋆. -/2 width=4 by lsuba_inv_atom2_aux/ qed-. - -fact lsuba_inv_bind2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K2. L2 = K2.ⓘ{I} → - (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓘ{I}) ∨ - ∃∃K1,V,W, A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & - G ⊢ K1 ⫃⁝ K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V. -#G #L1 #L2 * -L1 -L2 -[ #J #K2 #H destruct -| #I #L1 #L2 #HL12 #J #K2 #H destruct /3 width=3 by ex2_intro, or_introl/ -| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K2 #H destruct /3 width=9 by ex5_4_intro, or_intror/ -] -qed-. - -lemma lsuba_inv_bind2: ∀I,G,L1,K2. G ⊢ L1 ⫃⁝ K2.ⓘ{I} → - (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓘ{I}) ∨ - ∃∃K1,V,W,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & - I = BPair Abst W & L1 = K1.ⓓⓝW.V. -/2 width=3 by lsuba_inv_bind2_aux/ qed-. - -(* Basic properties *********************************************************) - -lemma lsuba_refl: ∀G,L. G ⊢ L ⫃⁝ L. -#G #L elim L -L /2 width=1 by lsuba_atom, lsuba_bind/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_aaa.ma deleted file mode 100644 index 7bd8f30ed..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_aaa.ma +++ /dev/null @@ -1,54 +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/static/aaa_aaa.ma". -include "basic_2/static/lsuba.ma". - -(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) - -(* Properties with atomic arity assignment **********************************) - -lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G, L1⦄ ⊢ V ⁝ A → - ∀L2. G ⊢ L1 ⫃⁝ L2 → ⦃G, L2⦄ ⊢ V ⁝ A. -#G #L1 #V #A #H elim H -G -L1 -V -A -[ // -| #I #G #L1 #V #A #HA #IH #L2 #H - elim (lsuba_inv_bind1 … H) -H * /3 width=1 by aaa_zero/ - #L0 #W0 #V0 #A0 #HV0 #HW0 #HL10 #H1 #H2 destruct - lapply (aaa_mono … HV0 … HA) #H destruct -V0 -L1 /2 width=1 by aaa_zero/ -| #I #G #K1 #A #i #_ #IH #L2 #H - elim (lsuba_inv_bind1 … H) -H * /3 width=1 by aaa_lref/ -| /4 width=2 by lsuba_bind, aaa_abbr/ -| /4 width=1 by lsuba_bind, aaa_abst/ -| /3 width=3 by aaa_appl/ -| /3 width=1 by aaa_cast/ -] -qed-. - -lemma lsuba_aaa_trans: ∀G,L2,V,A. ⦃G, L2⦄ ⊢ V ⁝ A → - ∀L1. G ⊢ L1 ⫃⁝ L2 → ⦃G, L1⦄ ⊢ V ⁝ A. -#G #L2 #V #A #H elim H -G -L2 -V -A -[ // -| #I #G #L2 #V #A #HA #IH #L1 #H - elim (lsuba_inv_bind2 … H) -H * /3 width=1 by aaa_zero/ - #L0 #V0 #W0 #A0 #HV0 #HW0 #HL02 #H1 #H2 destruct - lapply (aaa_mono … HW0 … HA) #H destruct -L2 /2 width=1 by aaa_zero/ -| #I #G #K2 #A #i #_ #IH #L1 #H - elim (lsuba_inv_bind2 … H) -H * /3 width=1 by aaa_lref/ -| /4 width=2 by lsuba_bind, aaa_abbr/ -| /4 width=1 by lsuba_bind, aaa_abst/ -| /3 width=3 by aaa_appl/ -| /3 width=1 by aaa_cast/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_drops.ma deleted file mode 100644 index e55602e4f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_drops.ma +++ /dev/null @@ -1,68 +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/relocation/drops.ma". -include "basic_2/static/lsuba.ma". - -(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) - -(* Properties with generic slicing for local environments *******************) - -(* Note: the premise 𝐔⦃f⦄ cannot be removed *) -(* Basic_2A1: includes: lsuba_drop_O1_conf *) -lemma lsuba_drops_conf_isuni: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → - ∀b,f,K1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K1 → - ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇*[b, f] L2 ≘ K2. -#G #L1 #L2 #H elim H -L1 -L2 -[ /2 width=3 by ex2_intro/ -| #I #L1 #L2 #HL12 #IH #b #f #K1 #Hf #H - elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct -IH - /3 width=3 by lsuba_bind, drops_refl, ex2_intro/ - | #g #Hg #HLK1 #H destruct -HL12 - elim (IH … Hg HLK1) -L1 -Hg /3 width=3 by drops_drop, ex2_intro/ - ] -| #L1 #L2 #W #V #A #HV #HW #HL12 #IH #b #f #K1 #Hf #H - elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct -IH - /3 width=3 by drops_refl, lsuba_beta, ex2_intro/ - | #g #Hg #HLK1 #H destruct -HL12 - elim (IH … Hg HLK1) -L1 -Hg /3 width=3 by drops_drop, ex2_intro/ - ] -] -qed-. - -(* Note: the premise 𝐔⦃f⦄ cannot be removed *) -(* Basic_2A1: includes: lsuba_drop_O1_trans *) -lemma lsuba_drops_trans_isuni: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → - ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2 → - ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇*[b, f] L1 ≘ K1. -#G #L1 #L2 #H elim H -L1 -L2 -[ /2 width=3 by ex2_intro/ -| #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H - elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct -IH - /3 width=3 by lsuba_bind, drops_refl, ex2_intro/ - | #g #Hg #HLK2 #H destruct -HL12 - elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ - ] -| #L1 #L2 #W #V #A #HV #HW #HL12 #IH #b #f #K2 #Hf #H - elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct -IH - /3 width=3 by drops_refl, lsuba_beta, ex2_intro/ - | #g #Hg #HLK2 #H destruct -HL12 - elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsuba.ma deleted file mode 100644 index 28dc2d8ee..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsuba.ma +++ /dev/null @@ -1,36 +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/static/lsuba_aaa.ma". - -(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) - -(* Main properties **********************************************************) - -theorem lsuba_trans: ∀G. Transitive … (lsuba G). -#G #L1 #L #H elim H -L1 -L -[ #X #H >(lsuba_inv_atom1 … H) -H // -| #I #L1 #L #HL1 #IHL1 #Y #H - elim (lsuba_inv_bind1 … H) -H * #L2 - [ #HL2 #H destruct /3 width=1 by lsuba_bind/ - | #W #V #A #HV #HW #HL2 #H1 #H2 destruct - /3 width=3 by lsuba_beta, lsuba_aaa_trans/ - ] -| #L1 #L #W #V #A #HV #HW #HL1 #IHL1 #Y #H - elim (lsuba_inv_bind1 … H) -H * #L2 - [ #HL2 #H destruct /3 width=5 by lsuba_beta, lsuba_aaa_conf/ - | #W0 #V0 #A0 #_ #_ #_ #H destruct - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsubr.ma deleted file mode 100644 index dc36ae778..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsubr.ma +++ /dev/null @@ -1,24 +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/static/lsubr.ma". -include "basic_2/static/lsuba.ma". - -(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) - -(* Forward lemmas with restricted refinement for local environments *********) - -lemma lsuba_fwd_lsubr: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 ⫃ L2. -#G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_bind, lsubr_beta/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubc.ma deleted file mode 100644 index bb4b27fe3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc.ma +++ /dev/null @@ -1,109 +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/lrsubeqc_4.ma". -include "basic_2/static/aaa.ma". -include "basic_2/static/gcp_cr.ma". - -(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) - -inductive lsubc (RP) (G): relation lenv ≝ -| lsubc_atom: lsubc RP G (⋆) (⋆) -| lsubc_bind: ∀I,L1,L2. lsubc RP G L1 L2 → lsubc RP G (L1.ⓘ{I}) (L2.ⓘ{I}) -| lsubc_beta: ∀L1,L2,V,W,A. ⦃G, L1, V⦄ ϵ[RP] 〚A〛 → ⦃G, L1, W⦄ ϵ[RP] 〚A〛 → ⦃G, L2⦄ ⊢ W ⁝ A → - lsubc RP G L1 L2 → lsubc RP G (L1. ⓓⓝW.V) (L2.ⓛW) -. - -interpretation - "local environment refinement (generic reducibility)" - 'LRSubEqC RP G L1 L2 = (lsubc RP G L1 L2). - -(* Basic inversion lemmas ***************************************************) - -fact lsubc_inv_atom1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 = ⋆ → L2 = ⋆. -#RP #G #L1 #L2 * -L1 -L2 -[ // -| #I #L1 #L2 #_ #H destruct -| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct -] -qed-. - -(* Basic_1: was just: csubc_gen_sort_r *) -lemma lsubc_inv_atom1: ∀RP,G,L2. G ⊢ ⋆ ⫃[RP] L2 → L2 = ⋆. -/2 width=5 by lsubc_inv_atom1_aux/ qed-. - -fact lsubc_inv_bind1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K1. L1 = K1.ⓘ{I} → - (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓘ{I}) ∨ - ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & - G ⊢ K1 ⫃[RP] K2 & - L2 = K2. ⓛW & I = BPair Abbr (ⓝW.V). -#RP #G #L1 #L2 * -L1 -L2 -[ #I #K1 #H destruct -| #J #L1 #L2 #HL12 #I #K1 #H destruct /3 width=3 by ex2_intro, or_introl/ -| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K1 #H destruct - /3 width=10 by ex6_4_intro, or_intror/ -] -qed-. - -(* Basic_1: was: csubc_gen_head_r *) -lemma lsubc_inv_bind1: ∀RP,I,G,K1,L2. G ⊢ K1.ⓘ{I} ⫃[RP] L2 → - (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓘ{I}) ∨ - ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & - G ⊢ K1 ⫃[RP] K2 & - L2 = K2.ⓛW & I = BPair Abbr (ⓝW.V). -/2 width=3 by lsubc_inv_bind1_aux/ qed-. - -fact lsubc_inv_atom2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L2 = ⋆ → L1 = ⋆. -#RP #G #L1 #L2 * -L1 -L2 -[ // -| #I #L1 #L2 #_ #H destruct -| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct -] -qed-. - -(* Basic_1: was just: csubc_gen_sort_l *) -lemma lsubc_inv_atom2: ∀RP,G,L1. G ⊢ L1 ⫃[RP] ⋆ → L1 = ⋆. -/2 width=5 by lsubc_inv_atom2_aux/ qed-. - -fact lsubc_inv_bind2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K2. L2 = K2.ⓘ{I} → - (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1. ⓘ{I}) ∨ - ∃∃K1,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & - G ⊢ K1 ⫃[RP] K2 & - L1 = K1.ⓓⓝW.V & I = BPair Abst W. -#RP #G #L1 #L2 * -L1 -L2 -[ #I #K2 #H destruct -| #J #L1 #L2 #HL12 #I #K2 #H destruct /3 width=3 by ex2_intro, or_introl/ -| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K2 #H destruct - /3 width=10 by ex6_4_intro, or_intror/ -] -qed-. - -(* Basic_1: was just: csubc_gen_head_l *) -lemma lsubc_inv_bind2: ∀RP,I,G,L1,K2. G ⊢ L1 ⫃[RP] K2.ⓘ{I} → - (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1.ⓘ{I}) ∨ - ∃∃K1,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & - G ⊢ K1 ⫃[RP] K2 & - L1 = K1.ⓓⓝW.V & I = BPair Abst W. -/2 width=3 by lsubc_inv_bind2_aux/ qed-. - -(* Basic properties *********************************************************) - -(* Basic_1: was just: csubc_refl *) -lemma lsubc_refl: ∀RP,G,L. G ⊢ L ⫃[RP] L. -#RP #G #L elim L -L /2 width=1 by lsubc_bind/ -qed. - -(* Basic_1: removed theorems 3: - csubc_clear_conf csubc_getl_conf csubc_csuba -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_drops.ma deleted file mode 100644 index 1916a81b4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_drops.ma +++ /dev/null @@ -1,70 +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/static/aaa_drops.ma". -include "basic_2/static/lsubc.ma". - -(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) - -(* Properties with generic slicing ******************************************) - -(* Note: the premise 𝐔⦃f⦄ cannot be removed *) -(* Basic_1: includes: csubc_drop_conf_O *) -(* Basic_2A1: includes: lsubc_drop_O1_trans *) -lemma lsubc_drops_trans_isuni: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → - ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2 → - ∃∃K1. ⬇*[b, f] L1 ≘ K1 & G ⊢ K1 ⫃[RP] K2. -#RP #G #L1 #L2 #H elim H -L1 -L2 -[ /2 width=3 by ex2_intro/ -| #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H - elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct -IH - /3 width=3 by lsubc_bind, drops_refl, ex2_intro/ - | #g #Hg #HLK2 #H destruct -HL12 - elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ - ] -| #L1 #L2 #V #W #A #HV #H1W #H2W #HL12 #IH #b #f #K2 #Hf #H - elim (drops_inv_bind1_isuni … Hf H) -Hf -H * - [ #Hf #H destruct -IH - /3 width=8 by drops_refl, lsubc_beta, ex2_intro/ - | #g #Hg #HLK2 #H destruct -HL12 - elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ - ] -] -qed-. - -(* Basic_1: was: csubc_drop1_conf_rev *) -(* Basic_1: includes: csubc_drop_conf_rev *) -(* Basic_2A1: includes: drop_lsubc_trans *) -lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → - ∀b,f,G,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → - ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[b, f] L2 ≘ K2. -#RR #RS #RP #HR #b #f #G #L1 #K1 #H elim H -f -L1 -K1 -[ #f #Hf #Y #H lapply (lsubc_inv_atom1 … H) -H - #H destruct /4 width=3 by lsubc_atom, drops_atom, ex2_intro/ -| #f #I #L1 #K1 #_ #IH #K2 #HK12 elim (IH … HK12) -K1 - /3 width=5 by lsubc_bind, drops_drop, ex2_intro/ -| #f #Z #I #L1 #K1 #HLK1 #HZ #IH #Y #H elim (lsubc_inv_bind1 … H) -H * - [ #K2 #HK12 #H destruct -HLK1 - elim (IH … HK12) -K1 /3 width=5 by lsubc_bind, drops_skip, ex2_intro/ - | #K2 #V2 #W2 #A #HV2 #H1W2 #H2W2 #HK12 #H1 #H2 destruct - elim (liftsb_inv_pair_sn … HZ) -HZ #V1 #HV21 #H destruct - elim (lifts_inv_flat1 … HV21) -HV21 #W3 #V3 #HW23 #HV3 #H destruct - elim (IH … HK12) -IH -HK12 #K #HL1K #HK2 - lapply (acr_lifts … HR … HV2 … HLK1 … HV3) -HV2 - lapply (acr_lifts … HR … H1W2 … HLK1 … HW23) -H1W2 - /4 width=10 by lsubc_beta, aaa_lifts, drops_skip, ext2_pair, ex2_intro/ - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_lsuba.ma deleted file mode 100644 index 5a11f0ba1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_lsuba.ma +++ /dev/null @@ -1,26 +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/static/lsuba.ma". -include "basic_2/static/gcp_aaa.ma". - -(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) - -(* Properties with lenv refinement for atomic arity assignment **************) - -lemma lsuba_lsubc: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → - ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → G ⊢ L1 ⫃[RP] L2. -#RR #RS #RP #H1RP #H2RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubc_bind/ -#L1 #L2 #W #V #A #H elim (aaa_inv_cast … H) -H /3 width=4 by acr_aaa, lsubc_beta/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_lsubr.ma deleted file mode 100644 index 0b1ab85f4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubc_lsubr.ma +++ /dev/null @@ -1,24 +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/static/lsubr.ma". -include "basic_2/static/lsubc.ma". - -(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) - -(* Forward lemmas with restricted refinement for local environments *********) - -lemma lsubc_fwd_lsubr: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 ⫃ L2. -#RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_bind, lsubr_beta/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubf.ma deleted file mode 100644 index 6eec91277..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf.ma +++ /dev/null @@ -1,358 +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/lrsubeqf_4.ma". -include "ground_2/relocation/nstream_sor.ma". -include "basic_2/static/frees.ma". - -(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) - -inductive lsubf: relation4 lenv rtmap lenv rtmap ≝ -| lsubf_atom: ∀f1,f2. f1 ≡ f2 → lsubf (⋆) f1 (⋆) f2 -| lsubf_push: ∀f1,f2,I1,I2,L1,L2. lsubf L1 (f1) L2 (f2) → - lsubf (L1.ⓘ{I1}) (⫯f1) (L2.ⓘ{I2}) (⫯f2) -| lsubf_bind: ∀f1,f2,I,L1,L2. lsubf L1 f1 L2 f2 → - lsubf (L1.ⓘ{I}) (↑f1) (L2.ⓘ{I}) (↑f2) -| lsubf_beta: ∀f,f0,f1,f2,L1,L2,W,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 → - lsubf L1 f0 L2 f2 → lsubf (L1.ⓓⓝW.V) (↑f1) (L2.ⓛW) (↑f2) -| lsubf_unit: ∀f,f0,f1,f2,I1,I2,L1,L2,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 → - lsubf L1 f0 L2 f2 → lsubf (L1.ⓑ{I1}V) (↑f1) (L2.ⓤ{I2}) (↑f2) -. - -interpretation - "local environment refinement (context-sensitive free variables)" - 'LRSubEqF L1 f1 L2 f2 = (lsubf L1 f1 L2 f2). - -(* Basic inversion lemmas ***************************************************) - -fact lsubf_inv_atom1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 = ⋆ → - f1 ≡ f2 ∧ L2 = ⋆. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ /2 width=1 by conj/ -| #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct -| #f1 #f2 #I #L1 #L2 #_ #H destruct -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #H destruct -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #H destruct -] -qed-. - -lemma lsubf_inv_atom1: ∀f1,f2,L2. ⦃⋆, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → f1 ≡ f2 ∧ L2 = ⋆. -/2 width=3 by lsubf_inv_atom1_aux/ qed-. - -fact lsubf_inv_push1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀g1,I1,K1. f1 = ⫯g1 → L1 = K1.ⓘ{I1} → - ∃∃g2,I2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ #f1 #f2 #_ #g1 #J1 #K1 #_ #H destruct -| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J1 #K1 #H1 #H2 destruct - <(injective_push … H1) -g1 /2 width=6 by ex3_3_intro/ -| #f1 #f2 #I #L1 #L2 #_ #g1 #J1 #K1 #H elim (discr_next_push … H) -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g1 #J1 #K1 #H elim (discr_next_push … H) -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g1 #J1 #K1 #H elim (discr_next_push … H) -] -qed-. - -lemma lsubf_inv_push1: ∀g1,f2,I1,K1,L2. ⦃K1.ⓘ{I1}, ⫯g1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∃∃g2,I2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}. -/2 width=6 by lsubf_inv_push1_aux/ qed-. - -fact lsubf_inv_pair1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀g1,I,K1,X. f1 = ↑g1 → L1 = K1.ⓑ{I}X → - ∨∨ ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X - | ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & - I = Abbr & X = ⓝW.V & L2 = K2.ⓛW - | ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & - L2 = K2.ⓤ{J}. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ #f1 #f2 #_ #g1 #J #K1 #X #_ #H destruct -| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #X #H elim (discr_push_next … H) -| #f1 #f2 #I #L1 #L2 #H12 #g1 #J #K1 #X #H1 #H2 destruct - <(injective_next … H1) -g1 /3 width=5 by or3_intro0, ex3_2_intro/ -| #f #f0 #f1 #f2 #L1 #L2 #W #V #Hf #Hf1 #H12 #g1 #J #K1 #X #H1 #H2 destruct - <(injective_next … H1) -g1 /3 width=12 by or3_intro1, ex7_6_intro/ -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #Hf #Hf1 #H12 #g1 #J #K1 #X #H1 #H2 destruct - <(injective_next … H1) -g1 /3 width=10 by or3_intro2, ex5_5_intro/ -] -qed-. - -lemma lsubf_inv_pair1: ∀g1,f2,I,K1,L2,X. ⦃K1.ⓑ{I}X, ↑g1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∨∨ ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X - | ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & - I = Abbr & X = ⓝW.V & L2 = K2.ⓛW - | ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & - L2 = K2.ⓤ{J}. -/2 width=5 by lsubf_inv_pair1_aux/ qed-. - -fact lsubf_inv_unit1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀g1,I,K1. f1 = ↑g1 → L1 = K1.ⓤ{I} → - ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ #f1 #f2 #_ #g1 #J #K1 #_ #H destruct -| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #H elim (discr_push_next … H) -| #f1 #f2 #I #L1 #L2 #H12 #g1 #J #K1 #H1 #H2 destruct - <(injective_next … H1) -g1 /2 width=5 by ex3_2_intro/ -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g1 #J #K1 #_ #H destruct -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g1 #J #K1 #_ #H destruct -] -qed-. - -lemma lsubf_inv_unit1: ∀g1,f2,I,K1,L2. ⦃K1.ⓤ{I}, ↑g1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}. -/2 width=5 by lsubf_inv_unit1_aux/ qed-. - -fact lsubf_inv_atom2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L2 = ⋆ → - f1 ≡ f2 ∧ L1 = ⋆. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ /2 width=1 by conj/ -| #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct -| #f1 #f2 #I #L1 #L2 #_ #H destruct -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #H destruct -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #H destruct -] -qed-. - -lemma lsubf_inv_atom2: ∀f1,f2,L1. ⦃L1, f1⦄ ⫃𝐅* ⦃⋆, f2⦄ → f1 ≡ f2 ∧ L1 = ⋆. -/2 width=3 by lsubf_inv_atom2_aux/ qed-. - -fact lsubf_inv_push2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀g2,I2,K2. f2 = ⫯g2 → L2 = K2.ⓘ{I2} → - ∃∃g1,I1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ #f1 #f2 #_ #g2 #J2 #K2 #_ #H destruct -| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J2 #K2 #H1 #H2 destruct - <(injective_push … H1) -g2 /2 width=6 by ex3_3_intro/ -| #f1 #f2 #I #L1 #L2 #_ #g2 #J2 #K2 #H elim (discr_next_push … H) -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g2 #J2 #K2 #H elim (discr_next_push … H) -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g2 #J2 #K2 #H elim (discr_next_push … H) -] -qed-. - -lemma lsubf_inv_push2: ∀f1,g2,I2,L1,K2. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, ⫯g2⦄ → - ∃∃g1,I1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}. -/2 width=6 by lsubf_inv_push2_aux/ qed-. - -fact lsubf_inv_pair2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀g2,I,K2,W. f2 = ↑g2 → L2 = K2.ⓑ{I}W → - ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W - | ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & - I = Abst & L1 = K1.ⓓⓝW.V. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ #f1 #f2 #_ #g2 #J #K2 #X #_ #H destruct -| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J #K2 #X #H elim (discr_push_next … H) -| #f1 #f2 #I #L1 #L2 #H12 #g2 #J #K2 #X #H1 #H2 destruct - <(injective_next … H1) -g2 /3 width=5 by ex3_2_intro, or_introl/ -| #f #f0 #f1 #f2 #L1 #L2 #W #V #Hf #Hf1 #H12 #g2 #J #K2 #X #H1 #H2 destruct - <(injective_next … H1) -g2 /3 width=10 by ex6_5_intro, or_intror/ -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g2 #J #K2 #X #_ #H destruct -] -qed-. - -lemma lsubf_inv_pair2: ∀f1,g2,I,L1,K2,W. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓑ{I}W, ↑g2⦄ → - ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W - | ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & - I = Abst & L1 = K1.ⓓⓝW.V. -/2 width=5 by lsubf_inv_pair2_aux/ qed-. - -fact lsubf_inv_unit2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀g2,I,K2. f2 = ↑g2 → L2 = K2.ⓤ{I} → - ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I} - | ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & - L1 = K1.ⓑ{J}V. -#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 -[ #f1 #f2 #_ #g2 #J #K2 #_ #H destruct -| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J #K2 #H elim (discr_push_next … H) -| #f1 #f2 #I #L1 #L2 #H12 #g2 #J #K2 #H1 #H2 destruct - <(injective_next … H1) -g2 /3 width=5 by ex3_2_intro, or_introl/ -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g2 #J #K2 #_ #H destruct -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #Hf #Hf1 #H12 #g2 #J #K2 #H1 #H2 destruct - <(injective_next … H1) -g2 /3 width=11 by ex5_6_intro, or_intror/ -] -qed-. - -lemma lsubf_inv_unit2: ∀f1,g2,I,L1,K2. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓤ{I}, ↑g2⦄ → - ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I} - | ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & - K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & - L1 = K1.ⓑ{J}V. -/2 width=5 by lsubf_inv_unit2_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma lsubf_inv_atom: ∀f1,f2. ⦃⋆, f1⦄ ⫃𝐅* ⦃⋆, f2⦄ → f1 ≡ f2. -#f1 #f2 #H elim (lsubf_inv_atom1 … H) -H // -qed-. - -lemma lsubf_inv_push_sn: ∀g1,f2,I1,I2,K1,K2. ⦃K1.ⓘ{I1}, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, f2⦄ → - ∃∃g2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2. -#g1 #f2 #I #K1 #K2 #X #H elim (lsubf_inv_push1 … H) -H -#g2 #I #Y #H0 #H2 #H destruct /2 width=3 by ex2_intro/ -qed-. - -lemma lsubf_inv_bind_sn: ∀g1,f2,I,K1,K2. ⦃K1.ⓘ{I}, ↑g1⦄ ⫃𝐅* ⦃K2.ⓘ{I}, f2⦄ → - ∃∃g2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2. -#g1 #f2 * #I [2: #X ] #K1 #K2 #H -[ elim (lsubf_inv_pair1 … H) -H * - [ #z2 #Y2 #H2 #H #H0 destruct /2 width=3 by ex2_intro/ - | #z #z0 #z2 #Y2 #W #V #_ #_ #_ #_ #H0 #_ #H destruct - | #z #z0 #z2 #Z2 #Y2 #_ #_ #_ #_ #H destruct - ] -| elim (lsubf_inv_unit1 … H) -H - #z2 #Y2 #H2 #H #H0 destruct /2 width=3 by ex2_intro/ -] -qed-. - -lemma lsubf_inv_beta_sn: ∀g1,f2,K1,K2,V,W. ⦃K1.ⓓⓝW.V, ↑g1⦄ ⫃𝐅* ⦃K2.ⓛW, f2⦄ → - ∃∃g,g0,g2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2. -#g1 #f2 #K1 #K2 #V #W #H elim (lsubf_inv_pair1 … H) -H * -[ #z2 #Y2 #_ #_ #H destruct -| #z #z0 #z2 #Y2 #X0 #X #H02 #Hz #Hg1 #H #_ #H0 #H1 destruct - /2 width=7 by ex4_3_intro/ -| #z #z0 #z2 #Z2 #Y2 #_ #_ #_ #_ #H destruct -] -qed-. - -lemma lsubf_inv_unit_sn: ∀g1,f2,I,J,K1,K2,V. ⦃K1.ⓑ{I}V, ↑g1⦄ ⫃𝐅* ⦃K2.ⓤ{J}, f2⦄ → - ∃∃g,g0,g2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2. -#g1 #f2 #I #J #K1 #K2 #V #H elim (lsubf_inv_pair1 … H) -H * -[ #z2 #Y2 #_ #_ #H destruct -| #z #z0 #z2 #Y2 #X0 #X #_ #_ #_ #_ #_ #_ #H destruct -| #z #z0 #z2 #Z2 #Y2 #H02 #Hz #Hg1 #H0 #H1 destruct - /2 width=7 by ex4_3_intro/ -] -qed-. - -lemma lsubf_inv_refl: ∀L,f1,f2. ⦃L,f1⦄ ⫃𝐅* ⦃L,f2⦄ → f1 ≡ f2. -#L elim L -L /2 width=1 by lsubf_inv_atom/ -#L #I #IH #f1 #f2 #H12 -elim (pn_split f1) * #g1 #H destruct -[ elim (lsubf_inv_push_sn … H12) | elim (lsubf_inv_bind_sn … H12) ] -H12 -#g2 #H12 #H destruct /3 width=5 by eq_next, eq_push/ -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma lsubf_fwd_bind_tl: ∀f1,f2,I,L1,L2. - ⦃L1.ⓘ{I}, f1⦄ ⫃𝐅* ⦃L2.ⓘ{I}, f2⦄ → ⦃L1, ⫱f1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄. -#f1 #f2 #I #L1 #L2 #H -elim (pn_split f1) * #g1 #H0 destruct -[ elim (lsubf_inv_push_sn … H) | elim (lsubf_inv_bind_sn … H) ] -H -#g2 #H12 #H destruct // -qed-. - -lemma lsubf_fwd_isid_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → 𝐈⦃f2⦄ → 𝐈⦃f1⦄. -#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 -[ /2 width=3 by isid_eq_repl_fwd/ -| /4 width=3 by isid_inv_push, isid_push/ -| #f1 #f2 #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) -H // -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // -] -qed-. - -lemma lsubf_fwd_isid_sn: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → 𝐈⦃f1⦄ → 𝐈⦃f2⦄. -#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 -[ /2 width=3 by isid_eq_repl_back/ -| /4 width=3 by isid_inv_push, isid_push/ -| #f1 #f2 #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) -H // -| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // -| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // -] -qed-. - -lemma lsubf_fwd_sle: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → f2 ⊆ f1. -#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 -/3 width=5 by sor_inv_sle_sn_trans, sle_next, sle_push, sle_refl_eq, eq_sym/ -qed-. - -(* Basic properties *********************************************************) - -axiom lsubf_eq_repl_back1: ∀f2,L1,L2. eq_repl_back … (λf1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). - -lemma lsubf_eq_repl_fwd1: ∀f2,L1,L2. eq_repl_fwd … (λf1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). -#f2 #L1 #L2 @eq_repl_sym /2 width=3 by lsubf_eq_repl_back1/ -qed-. - -axiom lsubf_eq_repl_back2: ∀f1,L1,L2. eq_repl_back … (λf2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). - -lemma lsubf_eq_repl_fwd2: ∀f1,L1,L2. eq_repl_fwd … (λf2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). -#f1 #L1 #L2 @eq_repl_sym /2 width=3 by lsubf_eq_repl_back2/ -qed-. - -lemma lsubf_refl: bi_reflexive … lsubf. -#L elim L -L /2 width=1 by lsubf_atom, eq_refl/ -#L #I #IH #f elim (pn_split f) * #g #H destruct -/2 width=1 by lsubf_push, lsubf_bind/ -qed. - -lemma lsubf_refl_eq: ∀f1,f2,L. f1 ≡ f2 → ⦃L, f1⦄ ⫃𝐅* ⦃L, f2⦄. -/2 width=3 by lsubf_eq_repl_back2/ qed. - -lemma lsubf_bind_tl_dx: ∀g1,f2,I,L1,L2. ⦃L1, g1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ → - ∃∃f1. ⦃L1.ⓘ{I}, f1⦄ ⫃𝐅* ⦃L2.ⓘ{I}, f2⦄ & g1 = ⫱f1. -#g1 #f2 #I #L1 #L2 #H -elim (pn_split f2) * #g2 #H2 destruct -@ex2_intro [1,2,4,5: /2 width=2 by lsubf_push, lsubf_bind/ ] // (**) (* constructor needed *) -qed-. - -lemma lsubf_beta_tl_dx: ∀f,f0,g1,L1,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ g1 → - ∀f2,L2,W. ⦃L1, f0⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ → - ∃∃f1. ⦃L1.ⓓⓝW.V, f1⦄ ⫃𝐅* ⦃L2.ⓛW, f2⦄ & ⫱f1 ⊆ g1. -#f #f0 #g1 #L1 #V #Hf #Hg1 #f2 -elim (pn_split f2) * #x2 #H2 #L2 #W #HL12 destruct -[ /3 width=4 by lsubf_push, sor_inv_sle_sn, ex2_intro/ -| @(ex2_intro … (↑g1)) /2 width=5 by lsubf_beta/ (**) (* full auto fails *) -] -qed-. - -(* Note: this might be moved *) -lemma lsubf_inv_sor_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - ∀f2l,f2r. f2l⋓f2r ≘ f2 → - ∃∃f1l,f1r. ⦃L1, f1l⦄ ⫃𝐅* ⦃L2, f2l⦄ & ⦃L1, f1r⦄ ⫃𝐅* ⦃L2, f2r⦄ & f1l⋓f1r ≘ f1. -#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 -[ /3 width=7 by sor_eq_repl_fwd3, ex3_2_intro/ -| #g1 #g2 #I1 #I2 #L1 #L2 #_ #IH #f2l #f2r #H - elim (sor_inv_xxp … H) -H [|*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct - elim (IH … Hg2) -g2 /3 width=11 by lsubf_push, sor_pp, ex3_2_intro/ -| #g1 #g2 #I #L1 #L2 #_ #IH #f2l #f2r #H - elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct - elim (IH … Hg2) -g2 /3 width=11 by lsubf_push, lsubf_bind, sor_np, sor_pn, sor_nn, ex3_2_intro/ -| #g #g0 #g1 #g2 #L1 #L2 #W #V #Hg #Hg1 #_ #IH #f2l #f2r #H - elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct - elim (IH … Hg2) -g2 #g1l #g1r #Hl #Hr #Hg0 - [ lapply (sor_comm_23 … Hg0 Hg1 ?) -g0 [3: |*: // ] #Hg1 - /3 width=11 by lsubf_push, lsubf_beta, sor_np, ex3_2_intro/ - | lapply (sor_assoc_dx … Hg1 … Hg0 ??) -g0 [3: |*: // ] #Hg1 - /3 width=11 by lsubf_push, lsubf_beta, sor_pn, ex3_2_intro/ - | lapply (sor_distr_dx … Hg0 … Hg1) -g0 [5: |*: // ] #Hg1 - /3 width=11 by lsubf_beta, sor_nn, ex3_2_intro/ - ] -| #g #g0 #g1 #g2 #I1 #I2 #L1 #L2 #V #Hg #Hg1 #_ #IH #f2l #f2r #H - elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct - elim (IH … Hg2) -g2 #g1l #g1r #Hl #Hr #Hg0 - [ lapply (sor_comm_23 … Hg0 Hg1 ?) -g0 [3: |*: // ] #Hg1 - /3 width=11 by lsubf_push, lsubf_unit, sor_np, ex3_2_intro/ - | lapply (sor_assoc_dx … Hg1 … Hg0 ??) -g0 [3: |*: // ] #Hg1 - /3 width=11 by lsubf_push, lsubf_unit, sor_pn, ex3_2_intro/ - | lapply (sor_distr_dx … Hg0 … Hg1) -g0 [5: |*: // ] #Hg1 - /3 width=11 by lsubf_unit, sor_nn, ex3_2_intro/ - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_frees.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_frees.ma deleted file mode 100644 index 390e6f13a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_frees.ma +++ /dev/null @@ -1,51 +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/static/lsubf.ma". - -(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) - -(* Properties with context-sensitive free variables *************************) - -lemma lsubf_frees_trans: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 → - ∀f1,L1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 ⊢ 𝐅*⦃T⦄ ≘ f1. -#f2 #L2 #T #H elim H -f2 -L2 -T -[ /3 width=5 by lsubf_fwd_isid_dx, frees_sort/ -| #f2 #i #Hf2 #g1 #Y1 #H - elim (lsubf_inv_atom2 … H) -H #Hg1 #H destruct - elim (eq_inv_pushs_dx … Hg1) -Hg1 #g #Hg #H destruct - elim (eq_inv_xn … Hg) -Hg - /3 width=3 by frees_atom, isid_eq_repl_fwd/ -| #f2 #I #K2 #W #_ #IH #g1 #Y1 #H elim (lsubf_inv_pair2 … H) -H * - [ #f1 #K1 #H12 #H1 #H2 destruct /3 width=1 by frees_pair/ - | #f #f0 #f1 #K1 #V #H12 #Hf #Hf1 #H1 #H2 #H3 destruct - /4 width=5 by frees_pair, frees_flat/ - ] -| #f2 #I #L2 #Hf2 #g1 #Y1 #H elim (lsubf_inv_unit2 … H) -H * - [ #f1 #L1 #H12 #H1 #H2 destruct - /3 width=5 by lsubf_fwd_isid_dx, frees_unit/ - | #f #f0 #f1 #J #L1 #V #H12 #Hf #Hf1 #H1 #H2 destruct - /5 width=9 by lsubf_fwd_isid_dx, frees_eq_repl_back, frees_pair, sor_isid_inv_sn/ - ] -| #f2 #I #L2 #i #_ #IH #g1 #L1 #H elim (lsubf_inv_push2 … H) -H - /3 width=1 by frees_lref/ -| /3 width=5 by lsubf_fwd_isid_dx, frees_gref/ -| #f2V #f2T #f2 #p #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #f1 #L1 #H12 - elim (lsubf_inv_sor_dx … H12 … Hf2) -f2 #f1V #g1T #HV #HT #Hf1 - elim (lsubf_bind_tl_dx … (BPair I V) … HT) -HT #f1T #HT #H destruct - /3 width=5 by frees_bind/ -| #f2V #f2T #f2 #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #f1 #L1 #H12 - elim (lsubf_inv_sor_dx … H12 … Hf2) -f2 /3 width=5 by frees_flat/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_lsubf.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_lsubf.ma deleted file mode 100644 index 63211ac45..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_lsubf.ma +++ /dev/null @@ -1,83 +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/static/frees_frees.ma". -include "basic_2/static/lsubf.ma". - -(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) - -(* Main properties **********************************************************) - -theorem lsubf_sor: ∀K,L,g1,f1. ⦃K, g1⦄ ⫃𝐅* ⦃L, f1⦄ → - ∀g2,f2. ⦃K, g2⦄ ⫃𝐅* ⦃L, f2⦄ → - ∀g. g1 ⋓ g2 ≘ g → ∀f. f1 ⋓ f2 ≘ f → ⦃K, g⦄ ⫃𝐅* ⦃L, f⦄. -#K elim K -K -[ #L #g1 #f1 #H1 #g2 #f2 #H2 #g #Hg #f #Hf - elim (lsubf_inv_atom1 … H1) -H1 #H1 #H destruct - lapply (lsubf_inv_atom … H2) -H2 #H2 - /5 width=4 by lsubf_atom, sor_mono, sor_eq_repl_back2, sor_eq_repl_back1/ -| #K #J #IH #L #g1 #f1 #H1 #g2 #f2 #H2 #g #Hg #f #Hf - elim (pn_split g1) * #y1 #H destruct - elim (pn_split g2) * #y2 #H destruct - [ elim (sor_inv_ppx … Hg) -Hg [|*: // ] #y #Hy #H destruct - elim (lsubf_inv_push1 … H1) -H1 #x1 #Z1 #Y1 #H1 #H #H0 destruct - elim (lsubf_inv_push_sn … H2) -H2 #x2 #H2 #H destruct - elim (sor_inv_ppx … Hf) -Hf [|*: // ] #x #Hx #H destruct - /3 width=8 by lsubf_push/ - | elim (sor_inv_pnx … Hg) -Hg [|*: // ] #y #Hy #H destruct - elim (lsubf_inv_push1 … H1) -H1 #x1 #Z1 #Y1 #H1 #H #H0 destruct - generalize in match H2; -H2 cases J -J #J [| #V ] #H2 - [ elim (lsubf_inv_unit1 … H2) -H2 #x2 #Y2 #H2 #H #H0 destruct - | elim (lsubf_inv_pair1 … H2) -H2 * - [ #x2 #Z2 #H2 #H #H0 destruct - | #y3 #y4 #x2 #Y2 #W #U #H2 #Hy3 #Hy2 #H #H0 #H3 #H4 destruct - | #y3 #y4 #x2 #Z2 #Y2 #H2 #Hy3 #Hy2 #H #H0 destruct - ] - ] - elim (sor_inv_pnx … Hf) -Hf [1,6,11,16:|*: // ] #x #Hx #H destruct - /3 width=12 by lsubf_unit, lsubf_beta, lsubf_bind, sor_assoc_sn/ - | elim (sor_inv_npx … Hg) -Hg [|*: // ] #y #Hy #H destruct - elim (lsubf_inv_push1 … H2) -H2 #x2 #Z2 #Y2 #H2 #H #H0 destruct - generalize in match H1; -H1 cases J -J #J [| #V ] #H1 - [ elim (lsubf_inv_unit1 … H1) -H1 #x1 #Y1 #H1 #H #H0 destruct - | elim (lsubf_inv_pair1 … H1) -H1 * - [ #x1 #Z1 #H1 #H #H0 destruct - | #y3 #y4 #x1 #Y1 #W #U #H1 #Hy3 #Hy1 #H #H0 #H3 #H4 destruct - | #y3 #y4 #x1 #Z1 #Y1 #H1 #Hy3 #Hy1 #H #H0 destruct - ] - ] - elim (sor_inv_npx … Hf) -Hf [1,6,11,16:|*: // ] #x #Hx #H destruct - /3 width=12 by lsubf_unit, lsubf_beta, lsubf_bind, sor_comm_23/ - | elim (sor_inv_nnx … Hg) -Hg [|*: // ] #y #Hy #H destruct - generalize in match H2; generalize in match H1; -H1 -H2 cases J -J #J [| #V ] #H1 #H2 - [ elim (lsubf_inv_unit1 … H1) -H1 #x1 #Y1 #H1 #H #H0 destruct - elim (lsubf_inv_bind_sn … H2) -H2 #x2 #H2 #H destruct - | elim (lsubf_inv_pair1 … H1) -H1 * - [ #x1 #Z1 #H1 #H #H0 destruct - elim (lsubf_inv_bind_sn … H2) -H2 #x2 #H2 #H destruct - | #y3 #y4 #x1 #Y1 #W #U #H1 #Hy3 #Hy1 #H #H0 #H3 #H4 destruct - elim (lsubf_inv_beta_sn … H2) -H2 #z3 #z4 #x2 #H2 #Hz3 #Hy2 #H destruct - lapply (frees_mono … Hz3 … Hy3) -Hz3 #H3 - lapply (sor_eq_repl_back2 … Hy2 … H3) -z3 #Hy2 - | #y3 #y4 #x1 #Z1 #Y1 #H1 #Hy3 #Hy1 #H #H0 destruct - elim (lsubf_inv_unit_sn … H2) -H2 #z3 #z4 #x2 #H2 #Hz3 #Hy2 #H destruct - lapply (frees_mono … Hz3 … Hy3) -Hz3 #H3 - lapply (sor_eq_repl_back2 … Hy2 … H3) -z3 #Hy2 - ] - ] - elim (sor_inv_nnx … Hf) -Hf [1,6,11,16:|*: // ] #x #Hx #H destruct - /3 width=12 by lsubf_unit, lsubf_beta, lsubf_bind, sor_coll_dx/ - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_lsubr.ma deleted file mode 100644 index 24b7e90d2..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubf_lsubr.ma +++ /dev/null @@ -1,85 +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/static/lsubr.ma". -include "basic_2/static/lsubf_lsubf.ma". - -(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) - -(* Forward lemmas with restricted refinement for local environments *********) - -lemma lsubf_fwd_lsubr_isdiv: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → - 𝛀⦃f1⦄ → 𝛀⦃f2⦄ → L1 ⫃ L2. -#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 -/4 width=3 by lsubr_bind, isdiv_inv_next/ -[ #f1 #f2 #I1 #I2 #L1 #L2 #_ #_ #H - elim (isdiv_inv_push … H) // -| /5 width=5 by lsubf_fwd_sle, lsubr_beta, sle_inv_isdiv_sn, isdiv_inv_next/ -| /5 width=5 by lsubf_fwd_sle, lsubr_unit, sle_inv_isdiv_sn, isdiv_inv_next/ -] -qed-. - -(* Properties with restricted refinement for local environments *************) - -lemma lsubr_lsubf_isid: ∀L1,L2. L1 ⫃ L2 → - ∀f1,f2. 𝐈⦃f1⦄ → 𝐈⦃f2⦄ → ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄. -#L1 #L2 #H elim H -L1 -L2 -[ /3 width=1 by lsubf_atom, isid_inv_eq_repl/ -| #I #L1 #L2 | #L1 #L2 #V #W | #I1 #I2 #L1 #L2 #V -] -#_ #IH #f1 #f2 #Hf1 #Hf2 -elim (isid_inv_gen … Hf1) -Hf1 #g1 #Hg1 #H destruct -elim (isid_inv_gen … Hf2) -Hf2 #g2 #Hg2 #H destruct -/3 width=1 by lsubf_push/ -qed. - -lemma lsubr_lsubf: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 → ∀L1. L1 ⫃ L2 → - ∀f1. L1 ⊢ 𝐅*⦃T⦄ ≘ f1 → ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄. -#f2 #L2 #T #H elim H -f2 -L2 -T -[ #f2 #L2 #s #Hf2 #L1 #HL12 #f1 #Hf1 - lapply (frees_inv_sort … Hf1) -Hf1 /2 width=1 by lsubr_lsubf_isid/ -| #f2 #i #Hf2 #Y1 #HY1 - >(lsubr_inv_atom2 … HY1) -Y1 #g1 #Hg1 - elim (frees_inv_atom … Hg1) -Hg1 #f1 #Hf1 #H destruct - /5 width=5 by lsubf_atom, isid_inv_eq_repl, pushs_eq_repl, eq_next/ -| #f2 #Z #L2 #W #_ #IH #Y1 #HY1 #g1 #Hg1 elim (lsubr_inv_pair2 … HY1) -HY1 * - [ #L1 #HL12 #H destruct - elim (frees_inv_pair … Hg1) -Hg1 #f1 #Hf1 #H destruct - /3 width=1 by lsubf_bind/ - | #L1 #V #HL12 #H1 #H2 destruct - elim (frees_inv_pair … Hg1) -Hg1 #f1 #Hf1 #H destruct - elim (frees_inv_flat … Hf1) -Hf1 /3 width=5 by lsubf_beta/ - ] -| #f2 #I2 #L2 #Hf2 #Y1 #HY1 #g1 #Hg1 elim (lsubr_inv_unit2 … HY1) -HY1 * - [ #L1 #HL12 #H destruct - elim (frees_inv_unit … Hg1) -Hg1 #f1 #Hf1 #H destruct - /3 width=1 by lsubf_bind, lsubr_lsubf_isid/ - | #I #L1 #V #HL12 #H destruct - elim (frees_inv_pair … Hg1) -Hg1 #f1 #Hf1 #H destruct - /3 width=5 by lsubf_unit, sor_isid_sn, lsubr_lsubf_isid/ - ] -| #f2 #I2 #L2 #i #_ #IH #Y1 #HY1 #g1 #Hg1 - elim (lsubr_fwd_bind2 … HY1) -HY1 #I1 #L1 #HL12 #H destruct - elim (frees_inv_lref … Hg1) -Hg1 #f1 #Hf1 #H destruct - /3 width=1 by lsubf_push/ -| #f2 #L2 #l #Hf2 #L1 #HL12 #f1 #Hf1 - lapply (frees_inv_gref … Hf1) -Hf1 /2 width=1 by lsubr_lsubf_isid/ -| #f2V #f2T #f2 #p #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #L1 #HL12 #f1 #Hf1 - elim (frees_inv_bind … Hf1) -Hf1 #f1V #f1T #Hf1V #Hf1T #Hf1 - /5 width=8 by lsubf_sor, lsubf_fwd_bind_tl, lsubr_bind/ -| #f2V #f2T #f2 #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #L1 #HL12 #f1 #Hf1 - elim (frees_inv_flat … Hf1) -Hf1 #f1V #f1T #Hf1V #Hf1T #Hf1 - /3 width=8 by lsubf_sor/ -] -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma deleted file mode 100644 index 382458d9e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma +++ /dev/null @@ -1,176 +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/lrsubeqc_2.ma". -include "basic_2/syntax/lenv.ma". - -(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) - -(* Basic_2A1: just tpr_cpr and tprs_cprs require the extended lsubr_atom *) -(* Basic_2A1: includes: lsubr_pair *) -inductive lsubr: relation lenv ≝ -| lsubr_atom: lsubr (⋆) (⋆) -| lsubr_bind: ∀I,L1,L2. lsubr L1 L2 → lsubr (L1.ⓘ{I}) (L2.ⓘ{I}) -| lsubr_beta: ∀L1,L2,V,W. lsubr L1 L2 → lsubr (L1.ⓓⓝW.V) (L2.ⓛW) -| lsubr_unit: ∀I1,I2,L1,L2,V. lsubr L1 L2 → lsubr (L1.ⓑ{I1}V) (L2.ⓤ{I2}) -. - -interpretation - "restricted refinement (local environment)" - 'LRSubEqC L1 L2 = (lsubr L1 L2). - -(* Basic properties *********************************************************) - -lemma lsubr_refl: ∀L. L ⫃ L. -#L elim L -L /2 width=1 by lsubr_atom, lsubr_bind/ -qed. - -(* Basic inversion lemmas ***************************************************) - -fact lsubr_inv_atom1_aux: ∀L1,L2. L1 ⫃ L2 → L1 = ⋆ → L2 = ⋆. -#L1 #L2 * -L1 -L2 // -[ #I #L1 #L2 #_ #H destruct -| #L1 #L2 #V #W #_ #H destruct -| #I1 #I2 #L1 #L2 #V #_ #H destruct -] -qed-. - -lemma lsubr_inv_atom1: ∀L2. ⋆ ⫃ L2 → L2 = ⋆. -/2 width=3 by lsubr_inv_atom1_aux/ qed-. - -fact lsubr_inv_bind1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1. L1 = K1.ⓘ{I} → - ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I} - | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & - I = BPair Abbr (ⓝW.V) - | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} & - I = BPair J1 V. -#L1 #L2 * -L1 -L2 -[ #J #K1 #H destruct -| #I #L1 #L2 #HL12 #J #K1 #H destruct /3 width=3 by or3_intro0, ex2_intro/ -| #L1 #L2 #V #W #HL12 #J #K1 #H destruct /3 width=6 by or3_intro1, ex3_3_intro/ -| #I1 #I2 #L1 #L2 #V #HL12 #J #K1 #H destruct /3 width=4 by or3_intro2, ex3_4_intro/ -] -qed-. - -(* Basic_2A1: uses: lsubr_inv_pair1 *) -lemma lsubr_inv_bind1: ∀I,K1,L2. K1.ⓘ{I} ⫃ L2 → - ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I} - | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & - I = BPair Abbr (ⓝW.V) - | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} & - I = BPair J1 V. -/2 width=3 by lsubr_inv_bind1_aux/ qed-. - -fact lsubr_inv_atom2_aux: ∀L1,L2. L1 ⫃ L2 → L2 = ⋆ → L1 = ⋆. -#L1 #L2 * -L1 -L2 // -[ #I #L1 #L2 #_ #H destruct -| #L1 #L2 #V #W #_ #H destruct -| #I1 #I2 #L1 #L2 #V #_ #H destruct -] -qed-. - -lemma lsubr_inv_atom2: ∀L1. L1 ⫃ ⋆ → L1 = ⋆. -/2 width=3 by lsubr_inv_atom2_aux/ qed-. - -fact lsubr_inv_bind2_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K2. L2 = K2.ⓘ{I} → - ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I} - | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W - | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2. -#L1 #L2 * -L1 -L2 -[ #J #K2 #H destruct -| #I #L1 #L2 #HL12 #J #K2 #H destruct /3 width=3 by ex2_intro, or3_intro0/ -| #L1 #L2 #V1 #V2 #HL12 #J #K2 #H destruct /3 width=6 by ex3_3_intro, or3_intro1/ -| #I1 #I2 #L1 #L2 #V #HL12 #J #K2 #H destruct /3 width=5 by ex3_4_intro, or3_intro2/ -] -qed-. - -lemma lsubr_inv_bind2: ∀I,L1,K2. L1 ⫃ K2.ⓘ{I} → - ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I} - | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W - | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2. -/2 width=3 by lsubr_inv_bind2_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma lsubr_inv_abst1: ∀K1,L2,W. K1.ⓛW ⫃ L2 → - ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW - | ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓤ{I2}. -#K1 #L2 #W #H elim (lsubr_inv_bind1 … H) -H * -/3 width=4 by ex2_2_intro, ex2_intro, or_introl, or_intror/ -#K2 #V2 #W2 #_ #_ #H destruct -qed-. - -lemma lsubr_inv_unit1: ∀I,K1,L2. K1.ⓤ{I} ⫃ L2 → - ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓤ{I}. -#I #K1 #L2 #H elim (lsubr_inv_bind1 … H) -H * -[ #K2 #HK12 #H destruct /2 width=3 by ex2_intro/ -| #K2 #V #W #_ #_ #H destruct -| #I1 #I2 #K2 #V #_ #_ #H destruct -] -qed-. - -lemma lsubr_inv_pair2: ∀I,L1,K2,W. L1 ⫃ K2.ⓑ{I}W → - ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓑ{I}W - | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = Abst. -#I #L1 #K2 #W #H elim (lsubr_inv_bind2 … H) -H * -[ /3 width=3 by ex2_intro, or_introl/ -| #K2 #X #V #HK12 #H1 #H2 destruct /3 width=4 by ex3_2_intro, or_intror/ -| #I1 #I1 #K2 #V #_ #_ #H destruct -] -qed-. - -lemma lsubr_inv_abbr2: ∀L1,K2,V. L1 ⫃ K2.ⓓV → - ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓV. -#L1 #K2 #V #H elim (lsubr_inv_pair2 … H) -H * -[ /2 width=3 by ex2_intro/ -| #K1 #X #_ #_ #H destruct -] -qed-. - -lemma lsubr_inv_abst2: ∀L1,K2,W. L1 ⫃ K2.ⓛW → - ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓛW - | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V. -#L1 #K2 #W #H elim (lsubr_inv_pair2 … H) -H * -/3 width=4 by ex2_2_intro, ex2_intro, or_introl, or_intror/ -qed-. - -lemma lsubr_inv_unit2: ∀I,L1,K2. L1 ⫃ K2.ⓤ{I} → - ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓤ{I} - | ∃∃J,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J}V. -#I #L1 #K2 #H elim (lsubr_inv_bind2 … H) -H * -[ /3 width=3 by ex2_intro, or_introl/ -| #K1 #W #V #_ #_ #H destruct -| #I1 #I2 #K1 #V #HK12 #H1 #H2 destruct /3 width=5 by ex2_3_intro, or_intror/ -] -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma lsubr_fwd_bind1: ∀I1,K1,L2. K1.ⓘ{I1} ⫃ L2 → - ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓘ{I2}. -#I1 #K1 #L2 #H elim (lsubr_inv_bind1 … H) -H * -[ #K2 #HK12 #H destruct /3 width=4 by ex2_2_intro/ -| #K2 #W1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ -| #I1 #I2 #K2 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ -] -qed-. - -lemma lsubr_fwd_bind2: ∀I2,L1,K2. L1 ⫃ K2.ⓘ{I2} → - ∃∃I1,K1. K1 ⫃ K2 & L1 = K1.ⓘ{I1}. -#I2 #L1 #K2 #H elim (lsubr_inv_bind2 … H) -H * -[ #K1 #HK12 #H destruct /3 width=4 by ex2_2_intro/ -| #K1 #W1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ -| #I1 #I2 #K1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_drops.ma deleted file mode 100644 index f69618336..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_drops.ma +++ /dev/null @@ -1,52 +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/relocation/drops.ma". -include "basic_2/static/lsubr.ma". - -(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) - -(* Forward lemmas with generic slicing for local environments ***************) - -(* Basic_2A1: includes: lsubr_fwd_drop2_pair *) -lemma lsubr_fwd_drops2_bind: ∀L1,L2. L1 ⫃ L2 → - ∀b,f,I,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2.ⓘ{I} → - ∨∨ ∃∃K1. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓘ{I} - | ∃∃K1,W,V. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓓⓝW.V & I = BPair Abst W - | ∃∃J1,J2,K1,V. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓑ{J1}V & I = BUnit J2. -#L1 #L2 #H elim H -L1 -L2 -[ #b #f #I #K2 #_ #H - elim (drops_inv_atom1 … H) -H #H destruct -| #J #L1 #L2 | #L1 #L2 #V #W | #I1 #I2 #L1 #L2 #V1 -] -#HL12 #IH #b #f #I #K2 #Hf #H -elim (drops_inv_bind1_isuni … Hf H) -Hf -H * -[1,3,5: #Hf #H destruct -IH - /4 width=6 by drops_refl, or3_intro0, or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro, ex2_intro/ -|2,4,6: #g #Hg #HLK2 #H destruct -HL12 - elim (IH … Hg HLK2) -IH -Hg -HLK2 * - /4 width=6 by drops_drop, or3_intro0, or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro, ex2_intro/ -] -qed-. - -(* Basic_2A1: includes: lsubr_fwd_drop2_abbr *) -lemma lsubr_fwd_drops2_abbr: ∀L1,L2. L1 ⫃ L2 → - ∀b,f,K2,V. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2.ⓓV → - ∃∃K1. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓓV. -#L1 #L2 #HL12 #b #f #K2 #V #Hf #HLK2 -elim (lsubr_fwd_drops2_bind … HL12 … Hf HLK2) -L2 -Hf // * -[ #K1 #W #V #_ #_ #H destruct -| #I1 #I2 #K1 #V #_ #_ #H destruct -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_length.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_length.ma deleted file mode 100644 index db04cd8fa..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_length.ma +++ /dev/null @@ -1,24 +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/syntax/lenv_length.ma". -include "basic_2/static/lsubr.ma". - -(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) - -(* Forward lemmas with length for local environments ************************) - -lemma lsubr_fwd_length: ∀L1,L2. L1 ⫃ L2 → |L2| = |L1|. -#L1 #L2 #H elim H -L1 -L2 normalize // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_lsubr.ma deleted file mode 100644 index ac9691aa6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr_lsubr.ma +++ /dev/null @@ -1,32 +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/static/lsubr.ma". - -(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) - -(* Main properties **********************************************************) - -theorem lsubr_trans: Transitive … lsubr. -#L1 #L #H elim H -L1 -L // -[ #I #L1 #L #_ #IH #X #H elim (lsubr_inv_bind1 … H) -H * - [ #L2 #HL2 #H | #L2 #V #W #HL2 #H1 #H2 | #I1 #I2 #L2 #V #Hl2 #H1 #H2 ] - destruct /3 width=1 by lsubr_bind, lsubr_beta, lsubr_unit/ -| #L1 #L #V #W #_ #IH #X #H elim (lsubr_inv_abst1 … H) -H * - [ #L2 #HL2 #H | #I #L2 #HL2 #H ] - destruct /3 width=1 by lsubr_beta, lsubr_unit/ -| #I1 #I2 #L1 #L #V #_ #IH #X #H elim (lsubr_inv_unit1 … H) -H - /4 width=1 by lsubr_unit/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq.ma deleted file mode 100644 index efbd69ae1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq.ma +++ /dev/null @@ -1,194 +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/stareqsn_5.ma". -include "basic_2/syntax/tdeq_ext.ma". -include "basic_2/static/rex.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -definition rdeq (h) (o): relation3 term lenv lenv ≝ - rex (cdeq h o). - -interpretation - "degree-based equivalence on referred entries (local environment)" - 'StarEqSn h o T L1 L2 = (rdeq h o T L1 L2). - -interpretation - "degree-based ranged equivalence (local environment)" - 'StarEqSn h o f L1 L2 = (sex (cdeq_ext h o) cfull f L1 L2). - -(* Basic properties ***********************************************************) - -lemma frees_tdeq_conf_rdeq (h) (o): ∀f,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → ∀T2. T1 ≛[h, o] T2 → - ∀L2. L1 ≛[h, o, f] L2 → L2 ⊢ 𝐅*⦃T2⦄ ≘ f. -#h #o #f #L1 #T1 #H elim H -f -L1 -T1 -[ #f #L1 #s1 #Hf #X #H1 #L2 #_ - elim (tdeq_inv_sort1 … H1) -H1 #s2 #d #_ #_ #H destruct - /2 width=3 by frees_sort/ -| #f #i #Hf #X #H1 - >(tdeq_inv_lref1 … H1) -X #Y #H2 - >(sex_inv_atom1 … H2) -Y - /2 width=1 by frees_atom/ -| #f #I #L1 #V1 #_ #IH #X #H1 - >(tdeq_inv_lref1 … H1) -X #Y #H2 - elim (sex_inv_next1 … H2) -H2 #Z #L2 #HL12 #HZ #H destruct - elim (ext2_inv_pair_sn … HZ) -HZ #V2 #HV12 #H destruct - /3 width=1 by frees_pair/ -| #f #I #L1 #Hf #X #H1 - >(tdeq_inv_lref1 … H1) -X #Y #H2 - elim (sex_inv_next1 … H2) -H2 #Z #L2 #_ #HZ #H destruct - >(ext2_inv_unit_sn … HZ) -Z /2 width=1 by frees_unit/ -| #f #I #L1 #i #_ #IH #X #H1 - >(tdeq_inv_lref1 … H1) -X #Y #H2 - elim (sex_inv_push1 … H2) -H2 #J #L2 #HL12 #_ #H destruct - /3 width=1 by frees_lref/ -| #f #L1 #l #Hf #X #H1 #L2 #_ - >(tdeq_inv_gref1 … H1) -X /2 width=1 by frees_gref/ -| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1 - elim (tdeq_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct - /6 width=5 by frees_bind, sex_inv_tl, ext2_pair, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/ -| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1 - elim (tdeq_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct - /5 width=5 by frees_flat, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/ -] -qed-. - -lemma frees_tdeq_conf (h) (o): ∀f,L,T1. L ⊢ 𝐅*⦃T1⦄ ≘ f → - ∀T2. T1 ≛[h, o] T2 → L ⊢ 𝐅*⦃T2⦄ ≘ f. -/4 width=7 by frees_tdeq_conf_rdeq, sex_refl, ext2_refl/ qed-. - -lemma frees_rdeq_conf (h) (o): ∀f,L1,T. L1 ⊢ 𝐅*⦃T⦄ ≘ f → - ∀L2. L1 ≛[h, o, f] L2 → L2 ⊢ 𝐅*⦃T⦄ ≘ f. -/2 width=7 by frees_tdeq_conf_rdeq, tdeq_refl/ qed-. - -lemma tdeq_rex_conf (R) (h) (o): s_r_confluent1 … (cdeq h o) (rex R). -#R #h #o #L1 #T1 #T2 #HT12 #L2 * -/3 width=5 by frees_tdeq_conf, ex2_intro/ -qed-. - -lemma tdeq_rex_div (R) (h) (o): ∀T1,T2. T1 ≛[h, o] T2 → - ∀L1,L2. L1 ⪤[R, T2] L2 → L1 ⪤[R, T1] L2. -/3 width=5 by tdeq_rex_conf, tdeq_sym/ qed-. - -lemma tdeq_rdeq_conf (h) (o): s_r_confluent1 … (cdeq h o) (rdeq h o). -/2 width=5 by tdeq_rex_conf/ qed-. - -lemma tdeq_rdeq_div (h) (o): ∀T1,T2. T1 ≛[h, o] T2 → - ∀L1,L2. L1 ≛[h, o, T2] L2 → L1 ≛[h, o, T1] L2. -/2 width=5 by tdeq_rex_div/ qed-. - -lemma rdeq_atom (h) (o): ∀I. ⋆ ≛[h, o, ⓪{I}] ⋆. -/2 width=1 by rex_atom/ qed. - -lemma rdeq_sort (h) (o): ∀I1,I2,L1,L2,s. - L1 ≛[h, o, ⋆s] L2 → L1.ⓘ{I1} ≛[h, o, ⋆s] L2.ⓘ{I2}. -/2 width=1 by rex_sort/ qed. - -lemma rdeq_pair (h) (o): ∀I,L1,L2,V1,V2. L1 ≛[h, o, V1] L2 → V1 ≛[h, o] V2 → - L1.ⓑ{I}V1 ≛[h, o, #0] L2.ⓑ{I}V2. -/2 width=1 by rex_pair/ qed. -(* -lemma rdeq_unit (h) (o): ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cdeq_ext h o, cfull, f] L2 → - L1.ⓤ{I} ≛[h, o, #0] L2.ⓤ{I}. -/2 width=3 by rex_unit/ qed. -*) -lemma rdeq_lref (h) (o): ∀I1,I2,L1,L2,i. - L1 ≛[h, o, #i] L2 → L1.ⓘ{I1} ≛[h, o, #↑i] L2.ⓘ{I2}. -/2 width=1 by rex_lref/ qed. - -lemma rdeq_gref (h) (o): ∀I1,I2,L1,L2,l. - L1 ≛[h, o, §l] L2 → L1.ⓘ{I1} ≛[h, o, §l] L2.ⓘ{I2}. -/2 width=1 by rex_gref/ qed. - -lemma rdeq_bind_repl_dx (h) (o): ∀I,I1,L1,L2.∀T:term. - L1.ⓘ{I} ≛[h, o, T] L2.ⓘ{I1} → - ∀I2. I ≛[h, o] I2 → - L1.ⓘ{I} ≛[h, o, T] L2.ⓘ{I2}. -/2 width=2 by rex_bind_repl_dx/ qed-. - -(* Basic inversion lemmas ***************************************************) - -lemma rdeq_inv_atom_sn (h) (o): ∀Y2. ∀T:term. ⋆ ≛[h, o, T] Y2 → Y2 = ⋆. -/2 width=3 by rex_inv_atom_sn/ qed-. - -lemma rdeq_inv_atom_dx (h) (o): ∀Y1. ∀T:term. Y1 ≛[h, o, T] ⋆ → Y1 = ⋆. -/2 width=3 by rex_inv_atom_dx/ qed-. -(* -lemma rdeq_inv_zero (h) (o): ∀Y1,Y2. Y1 ≛[h, o, #0] Y2 → - ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ - | ∃∃I,L1,L2,V1,V2. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & - Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 - | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cdeq_ext h o, cfull, f] L2 & - Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. -#h #o #Y1 #Y2 #H elim (rex_inv_zero … H) -H * -/3 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex4_4_intro, conj/ -qed-. -*) -lemma rdeq_inv_lref (h) (o): ∀Y1,Y2,i. Y1 ≛[h, o, #↑i] Y2 → - ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ - | ∃∃I1,I2,L1,L2. L1 ≛[h, o, #i] L2 & - Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. -/2 width=1 by rex_inv_lref/ qed-. - -(* Basic_2A1: uses: lleq_inv_bind lleq_inv_bind_O *) -lemma rdeq_inv_bind (h) (o): ∀p,I,L1,L2,V,T. L1 ≛[h, o, ⓑ{p,I}V.T] L2 → - ∧∧ L1 ≛[h, o, V] L2 & L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V. -/2 width=2 by rex_inv_bind/ qed-. - -(* Basic_2A1: uses: lleq_inv_flat *) -lemma rdeq_inv_flat (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ⓕ{I}V.T] L2 → - ∧∧ L1 ≛[h, o, V] L2 & L1 ≛[h, o, T] L2. -/2 width=2 by rex_inv_flat/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma rdeq_inv_zero_pair_sn (h) (o): ∀I,Y2,L1,V1. L1.ⓑ{I}V1 ≛[h, o, #0] Y2 → - ∃∃L2,V2. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y2 = L2.ⓑ{I}V2. -/2 width=1 by rex_inv_zero_pair_sn/ qed-. - -lemma rdeq_inv_zero_pair_dx (h) (o): ∀I,Y1,L2,V2. Y1 ≛[h, o, #0] L2.ⓑ{I}V2 → - ∃∃L1,V1. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y1 = L1.ⓑ{I}V1. -/2 width=1 by rex_inv_zero_pair_dx/ qed-. - -lemma rdeq_inv_lref_bind_sn (h) (o): ∀I1,Y2,L1,i. L1.ⓘ{I1} ≛[h, o, #↑i] Y2 → - ∃∃I2,L2. L1 ≛[h, o, #i] L2 & Y2 = L2.ⓘ{I2}. -/2 width=2 by rex_inv_lref_bind_sn/ qed-. - -lemma rdeq_inv_lref_bind_dx (h) (o): ∀I2,Y1,L2,i. Y1 ≛[h, o, #↑i] L2.ⓘ{I2} → - ∃∃I1,L1. L1 ≛[h, o, #i] L2 & Y1 = L1.ⓘ{I1}. -/2 width=2 by rex_inv_lref_bind_dx/ qed-. - -(* Basic forward lemmas *****************************************************) - -lemma rdeq_fwd_zero_pair (h) (o): ∀I,K1,K2,V1,V2. - K1.ⓑ{I}V1 ≛[h, o, #0] K2.ⓑ{I}V2 → K1 ≛[h, o, V1] K2. -/2 width=3 by rex_fwd_zero_pair/ qed-. - -(* Basic_2A1: uses: lleq_fwd_bind_sn lleq_fwd_flat_sn *) -lemma rdeq_fwd_pair_sn (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ②{I}V.T] L2 → L1 ≛[h, o, V] L2. -/2 width=3 by rex_fwd_pair_sn/ qed-. - -(* Basic_2A1: uses: lleq_fwd_bind_dx lleq_fwd_bind_O_dx *) -lemma rdeq_fwd_bind_dx (h) (o): ∀p,I,L1,L2,V,T. - L1 ≛[h, o, ⓑ{p,I}V.T] L2 → L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V. -/2 width=2 by rex_fwd_bind_dx/ qed-. - -(* Basic_2A1: uses: lleq_fwd_flat_dx *) -lemma rdeq_fwd_flat_dx (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ⓕ{I}V.T] L2 → L1 ≛[h, o, T] L2. -/2 width=3 by rex_fwd_flat_dx/ qed-. - -lemma rdeq_fwd_dx (h) (o): ∀I2,L1,K2. ∀T:term. L1 ≛[h, o, T] K2.ⓘ{I2} → - ∃∃I1,K1. L1 = K1.ⓘ{I1}. -/2 width=5 by rex_fwd_dx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_drops.ma deleted file mode 100644 index 1cff3b95c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_drops.ma +++ /dev/null @@ -1,47 +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/relocation/lifts_tdeq.ma". -include "basic_2/static/rex_drops.ma". -include "basic_2/static/rdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -(* Properties with generic slicing for local environments *******************) - -lemma rdeq_lifts_sn: ∀h,o. f_dedropable_sn (cdeq h o). -/3 width=5 by rex_liftable_dedropable_sn, tdeq_lifts_sn/ qed-. - -(* Inversion lemmas with generic slicing for local environments *************) - -lemma rdeq_inv_lifts_sn: ∀h,o. f_dropable_sn (cdeq h o). -/2 width=5 by rex_dropable_sn/ qed-. - -(* Note: missing in basic_2A1 *) -lemma rdeq_inv_lifts_dx: ∀h,o. f_dropable_dx (cdeq h o). -/2 width=5 by rex_dropable_dx/ qed-. - -(* Basic_2A1: uses: lleq_inv_lift_le lleq_inv_lift_be lleq_inv_lift_ge *) -lemma rdeq_inv_lifts_bi: ∀h,o,L1,L2,U. L1 ≛[h, o, U] L2 → ∀b,f. 𝐔⦃f⦄ → - ∀K1,K2. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → - ∀T. ⬆*[f] T ≘ U → K1 ≛[h, o, T] K2. -/2 width=10 by rex_inv_lifts_bi/ qed-. - -lemma rdeq_inv_lref_pair_sn: ∀h,o,L1,L2,i. L1 ≛[h, o, #i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 → - ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ≛[h, o, V1] K2 & V1 ≛[h, o] V2. -/2 width=3 by rex_inv_lref_pair_sn/ qed-. - -lemma rdeq_inv_lref_pair_dx: ∀h,o,L1,L2,i. L1 ≛[h, o, #i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 → - ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ≛[h, o, V1] K2 & V1 ≛[h, o] V2. -/2 width=3 by rex_inv_lref_pair_dx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_fqup.ma deleted file mode 100644 index 5ee09e1c8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_fqup.ma +++ /dev/null @@ -1,39 +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/static/rex_fqup.ma". -include "basic_2/static/rdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -(* Advanced properties ******************************************************) - -lemma rdeq_refl: ∀h,o,T. reflexive … (rdeq h o T). -/2 width=1 by rex_refl/ qed. - -lemma rdeq_pair_refl: ∀h,o,V1,V2. V1 ≛[h, o] V2 → - ∀I,L. ∀T:term. L.ⓑ{I}V1 ≛[h, o, T] L.ⓑ{I}V2. -/2 width=1 by rex_pair_refl/ qed. - -(* Advanced inversion lemmas ************************************************) - -lemma rdeq_inv_bind_void: ∀h,o,p,I,L1,L2,V,T. L1 ≛[h, o, ⓑ{p,I}V.T] L2 → - L1 ≛[h, o, V] L2 ∧ L1.ⓧ ≛[h, o, T] L2.ⓧ. -/2 width=3 by rex_inv_bind_void/ qed-. - -(* Advanced forward lemmas **************************************************) - -lemma rdeq_fwd_bind_dx_void: ∀h,o,p,I,L1,L2,V,T. - L1 ≛[h, o, ⓑ{p,I}V.T] L2 → L1.ⓧ ≛[h, o, T] L2.ⓧ. -/2 width=4 by rex_fwd_bind_dx_void/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_fqus.ma deleted file mode 100644 index 8fe8c8f89..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_fqus.ma +++ /dev/null @@ -1,156 +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/s_computation/fqus_fqup.ma". -include "basic_2/static/rdeq_drops.ma". -include "basic_2/static/rdeq_fqup.ma". -include "basic_2/static/rdeq_rdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -(* Properties with extended structural successor for closures ***************) - -lemma fqu_tdeq_conf: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ → - ∀U2. U1 ≛[h, o] U2 → - ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & L2 ≛[h, o, T1] L & T1 ≛[h, o] T2. -#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1 -[ #I #G #L #W #X #H >(tdeq_inv_lref1 … H) -X - /2 width=5 by fqu_lref_O, ex3_2_intro/ -| #I #G #L #W1 #U1 #X #H - elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct - /2 width=5 by fqu_pair_sn, ex3_2_intro/ -| #p #I #G #L #W1 #U1 #X #H - elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct - /3 width=5 by rdeq_pair_refl, fqu_bind_dx, ex3_2_intro/ -| #p #I #G #L #W1 #U1 #Hb #X #H - elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct - /3 width=5 by fqu_clear, ex3_2_intro/ -| #I #G #L #W1 #U1 #X #H - elim (tdeq_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct - /2 width=5 by fqu_flat_dx, ex3_2_intro/ -| #I #G #L #T1 #U1 #HTU1 #U2 #HU12 - elim (tdeq_inv_lifts_sn … HU12 … HTU1) -U1 - /3 width=5 by fqu_drop, ex3_2_intro/ -] -qed-. - -lemma tdeq_fqu_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ → - ∀U2. U2 ≛[h, o] U1 → - ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. -#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21 -elim (fqu_tdeq_conf … o … H12 U2) -H12 -/3 width=5 by rdeq_sym, tdeq_sym, ex3_2_intro/ -qed-. - -(* Basic_2A1: uses: lleq_fqu_trans *) -lemma rdeq_fqu_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐[b] ⦃G2, K2, U⦄ → - ∀L1. L1 ≛[h, o, T] L2 → - ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. -#h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U -[ #I #G #L2 #V2 #L1 #H elim (rdeq_inv_zero_pair_dx … H) -H - #K1 #V1 #HV1 #HV12 #H destruct - /3 width=7 by tdeq_rdeq_conf, fqu_lref_O, ex3_2_intro/ -| * [ #p ] #I #G #L2 #V #T #L1 #H - [ elim (rdeq_inv_bind … H) - | elim (rdeq_inv_flat … H) - ] -H - /2 width=5 by fqu_pair_sn, ex3_2_intro/ -| #p #I #G #L2 #V #T #L1 #H elim (rdeq_inv_bind … H) -H - /2 width=5 by fqu_bind_dx, ex3_2_intro/ -| #p #I #G #L2 #V #T #Hb #L1 #H elim (rdeq_inv_bind_void … H) -H - /3 width=5 by fqu_clear, ex3_2_intro/ -| #I #G #L2 #V #T #L1 #H elim (rdeq_inv_flat … H) -H - /2 width=5 by fqu_flat_dx, ex3_2_intro/ -| #I #G #L2 #T #U #HTU #Y #HU - elim (rdeq_fwd_dx … HU) #L1 #V1 #H destruct - /5 width=14 by rdeq_inv_lifts_bi, fqu_drop, drops_refl, drops_drop, ex3_2_intro/ -] -qed-. - -(* Properties with optional structural successor for closures ***************) - -lemma tdeq_fquq_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, T1⦄ → - ∀U2. U2 ≛[h, o] U1 → - ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐⸮[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. -#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H -[ #H #U2 #HU21 elim (tdeq_fqu_trans … H … HU21) -U1 - /3 width=5 by fqu_fquq, ex3_2_intro/ -| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_2A1: was just: lleq_fquq_trans *) -lemma rdeq_fquq_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐⸮[b] ⦃G2, K2, U⦄ → - ∀L1. L1 ≛[h, o, T] L2 → - ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐⸮[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. -#h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -H -[ #H #L1 #HL12 elim (rdeq_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/ -| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Properties with plus-iterated structural successor for closures **********) - -(* Basic_2A1: was just: lleq_fqup_trans *) -lemma rdeq_fqup_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+[b] ⦃G2, K2, U⦄ → - ∀L1. L1 ≛[h, o, T] L2 → - ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐+[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. -#h #o #b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U -[ #G2 #K2 #U #HTU #L1 #HL12 elim (rdeq_fqu_trans … HTU … HL12) -L2 - /3 width=5 by fqu_fqup, ex3_2_intro/ -| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12 - elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0 - elim (rdeq_fqu_trans … HU2 … HK0) -K #K1 #U1 #HU1 #HU12 #HK12 - elim (tdeq_fqu_trans … HU1 … HU0) -U #K3 #U3 #HU03 #HU31 #HK31 - @(ex3_2_intro … K3 U3) (**) (* full auto too slow *) - /3 width=5 by rdeq_trans, tdeq_rdeq_conf, fqup_strap1, tdeq_trans/ -] -qed-. - -lemma tdeq_fqup_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, T1⦄ → - ∀U2. U2 ≛[h, o] U1 → - ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐+[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. -#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1 -[ #G1 #L1 #U1 #H #U2 #HU21 elim (tdeq_fqu_trans … H … HU21) -U1 - /3 width=5 by fqu_fqup, ex3_2_intro/ -| #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21 - elim (tdeq_fqu_trans … H … HU21) -U1 #L0 #T #H1 #HTU #HL0 - lapply (tdeq_rdeq_div … HTU … HL0) -HL0 #HL0 - elim (IH … HTU) -U #K2 #U1 #H2 #HUT1 #HKL2 - elim (rdeq_fqup_trans … H2 … HL0) -L #K #U #H2 #HU1 #HK2 - lapply (tdeq_rdeq_conf … HUT1 … HK2) -HK2 #HK2 - /3 width=7 by rdeq_trans, fqup_strap2, tdeq_trans, ex3_2_intro/ -] -qed-. - -(* Properties with star-iterated structural successor for closures **********) - -lemma tdeq_fqus_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, T1⦄ → - ∀U2. U2 ≛[h, o] U1 → - ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐*[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. -#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H -[ #H elim (tdeq_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/ -| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -(* Basic_2A1: was just: lleq_fqus_trans *) -lemma rdeq_fqus_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐*[b] ⦃G2, K2, U⦄ → - ∀L1. L1 ≛[h, o, T] L2 → - ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐*[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. -#h #o #b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H -[ #H elim (rdeq_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/ -| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_length.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_length.ma deleted file mode 100644 index a877646c9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_length.ma +++ /dev/null @@ -1,55 +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/relocation/lifts_tdeq.ma". -include "basic_2/static/rex_length.ma". -include "basic_2/static/rex_fsle.ma". -include "basic_2/static/rdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -(* Advanved properties with free variables inclusion ************************) - -lemma rdeq_fsge_comp (h) (o): rex_fsge_compatible (cdeq h o). -#h #o #L1 #L2 #T * #f1 #Hf1 #HL12 -lapply (frees_rdeq_conf h o … Hf1 … HL12) -lapply (sex_fwd_length … HL12) -/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *) -qed-. - -(* Properties with length for local environments ****************************) - -(* Basic_2A1: uses: lleq_sort *) -lemma rdeq_sort_length (h) (o): ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[h, o, ⋆s] L2. -/2 width=1 by rex_sort_length/ qed. - -(* Basic_2A1: uses: lleq_gref *) -lemma rdeq_gref_length (h) (o): ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[h, o, §l] L2. -/2 width=1 by rex_gref_length/ qed. - -lemma rdeq_unit_length (h) (o): ∀L1,L2. |L1| = |L2| → - ∀I. L1.ⓤ{I} ≛[h, o, #0] L2.ⓤ{I}. -/2 width=1 by rex_unit_length/ qed. - -(* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *) -lemma rdeq_lifts_bi (h) (o): ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[h, o, T] K2 → - ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → - ∀U. ⬆*[f] T ≘ U → L1 ≛[h, o, U] L2. -/3 width=9 by rex_lifts_bi, tdeq_lifts_sn/ qed-. - -(* Forward lemmas with length for local environments ************************) - -(* Basic_2A1: lleq_fwd_length *) -lemma rdeq_fwd_length (h) (o): ∀L1,L2. ∀T:term. L1 ≛[h, o, T] L2 → |L1| = |L2|. -/2 width=3 by rex_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_rdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_rdeq.ma deleted file mode 100644 index 6bd574d2b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_rdeq.ma +++ /dev/null @@ -1,100 +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/syntax/ext2_ext2.ma". -include "basic_2/syntax/tdeq_tdeq.ma". -include "basic_2/static/rdeq_length.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -(* Advanced properties ******************************************************) - -(* Basic_2A1: uses: lleq_sym *) -lemma rdeq_sym: ∀h,o,T. symmetric … (rdeq h o T). -/3 width=3 by rdeq_fsge_comp, rex_sym, tdeq_sym/ qed-. - -(* Basic_2A1: uses: lleq_dec *) -lemma rdeq_dec: ∀h,o,L1,L2. ∀T:term. Decidable (L1 ≛[h, o, T] L2). -/3 width=1 by rex_dec, tdeq_dec/ qed-. - -(* Main properties **********************************************************) - -(* Basic_2A1: uses: lleq_bind lleq_bind_O *) -theorem rdeq_bind: ∀h,o,p,I,L1,L2,V1,V2,T. - L1 ≛[h, o, V1] L2 → L1.ⓑ{I}V1 ≛[h, o, T] L2.ⓑ{I}V2 → - L1 ≛[h, o, ⓑ{p,I}V1.T] L2. -/2 width=2 by rex_bind/ qed. - -(* Basic_2A1: uses: lleq_flat *) -theorem rdeq_flat: ∀h,o,I,L1,L2,V,T. L1 ≛[h, o, V] L2 → L1 ≛[h, o, T] L2 → - L1 ≛[h, o, ⓕ{I}V.T] L2. -/2 width=1 by rex_flat/ qed. - -theorem rdeq_bind_void: ∀h,o,p,I,L1,L2,V,T. - L1 ≛[h, o, V] L2 → L1.ⓧ ≛[h, o, T] L2.ⓧ → - L1 ≛[h, o, ⓑ{p,I}V.T] L2. -/2 width=1 by rex_bind_void/ qed. - -(* Basic_2A1: uses: lleq_trans *) -theorem rdeq_trans: ∀h,o,T. Transitive … (rdeq h o T). -#h #o #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2 -lapply (frees_tdeq_conf_rdeq … Hf1 T … HL1) // #H0 -lapply (frees_mono … Hf2 … H0) -Hf2 -H0 -/5 width=7 by sex_trans, sex_eq_repl_back, tdeq_trans, ext2_trans, ex2_intro/ -qed-. - -(* Basic_2A1: uses: lleq_canc_sn *) -theorem rdeq_canc_sn: ∀h,o,T. left_cancellable … (rdeq h o T). -/3 width=3 by rdeq_trans, rdeq_sym/ qed-. - -(* Basic_2A1: uses: lleq_canc_dx *) -theorem rdeq_canc_dx: ∀h,o,T. right_cancellable … (rdeq h o T). -/3 width=3 by rdeq_trans, rdeq_sym/ qed-. - -theorem rdeq_repl: ∀h,o,L1,L2. ∀T:term. L1 ≛[h, o, T] L2 → - ∀K1. L1 ≛[h, o, T] K1 → ∀K2. L2 ≛[h, o, T] K2 → K1 ≛[h, o, T] K2. -/3 width=3 by rdeq_canc_sn, rdeq_trans/ qed-. - -(* Negated properties *******************************************************) - -(* Note: auto works with /4 width=8/ so rdeq_canc_sn is preferred **********) -(* Basic_2A1: uses: lleq_nlleq_trans *) -lemma rdeq_rdneq_trans: ∀h,o.∀T:term.∀L1,L. L1 ≛[h, o, T] L → - ∀L2. (L ≛[h, o, T] L2 → ⊥) → (L1 ≛[h, o, T] L2 → ⊥). -/3 width=3 by rdeq_canc_sn/ qed-. - -(* Basic_2A1: uses: nlleq_lleq_div *) -lemma rdneq_rdeq_div: ∀h,o.∀T:term.∀L2,L. L2 ≛[h, o, T] L → - ∀L1. (L1 ≛[h, o, T] L → ⊥) → (L1 ≛[h, o, T] L2 → ⊥). -/3 width=3 by rdeq_trans/ qed-. - -theorem rdneq_rdeq_canc_dx: ∀h,o,L1,L. ∀T:term. (L1 ≛[h, o, T] L → ⊥) → - ∀L2. L2 ≛[h, o, T] L → L1 ≛[h, o, T] L2 → ⊥. -/3 width=3 by rdeq_trans/ qed-. - -(* Negated inversion lemmas *************************************************) - -(* Basic_2A1: uses: nlleq_inv_bind nlleq_inv_bind_O *) -lemma rdneq_inv_bind: ∀h,o,p,I,L1,L2,V,T. (L1 ≛[h, o, ⓑ{p,I}V.T] L2 → ⊥) → - (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V → ⊥). -/3 width=2 by rnex_inv_bind, tdeq_dec/ qed-. - -(* Basic_2A1: uses: nlleq_inv_flat *) -lemma rdneq_inv_flat: ∀h,o,I,L1,L2,V,T. (L1 ≛[h, o, ⓕ{I}V.T] L2 → ⊥) → - (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1 ≛[h, o, T] L2 → ⊥). -/3 width=2 by rnex_inv_flat, tdeq_dec/ qed-. - -lemma rdneq_inv_bind_void: ∀h,o,p,I,L1,L2,V,T. (L1 ≛[h, o, ⓑ{p,I}V.T] L2 → ⊥) → - (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1.ⓧ ≛[h, o, T] L2.ⓧ → ⊥). -/3 width=3 by rnex_inv_bind_void, tdeq_dec/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_req.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_req.ma deleted file mode 100644 index 46ab07b2b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rdeq_req.ma +++ /dev/null @@ -1,27 +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/static/req_fsle.ma". -include "basic_2/static/rdeq.ma". - -(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) - -(* Properties with syntactic equivalence on referred entries ****************) - -lemma req_rdeq: ∀h,o,L1,L2. ∀T:term. L1 ≡[T] L2 → L1 ≛[h, o, T] L2. -/2 width=3 by rex_co/ qed. - -lemma req_rdeq_trans: ∀h,o,L1,L. ∀T:term. L1 ≡[T] L → - ∀L2. L ≛[h, o, T] L2 → L1 ≛[h, o, T] L2. -/2 width=3 by req_rex_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/req.ma b/matita/matita/contribs/lambdadelta/basic_2/static/req.ma deleted file mode 100644 index d01f4ea5d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/req.ma +++ /dev/null @@ -1,109 +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/ideqsn_3.ma". -include "basic_2/static/rex.ma". - -(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) - -(* Basic_2A1: was: lleq *) -definition req: relation3 term lenv lenv ≝ - rex ceq. - -interpretation - "syntactic equivalence on referred entries (local environment)" - 'IdEqSn T L1 L2 = (req T L1 L2). - -(* Note: "req_transitive R" is equivalent to "rex_transitive ceq R R" *) -(* Basic_2A1: uses: lleq_transitive *) -definition req_transitive: predicate (relation3 lenv term term) ≝ - λR. ∀L2,T1,T2. R L2 T1 T2 → ∀L1. L1 ≡[T1] L2 → R L1 T1 T2. - -(* Basic inversion lemmas ***************************************************) - -lemma req_inv_bind: ∀p,I,L1,L2,V,T. L1 ≡[ⓑ{p,I}V.T] L2 → - ∧∧ L1 ≡[V] L2 & L1.ⓑ{I}V ≡[T] L2.ⓑ{I}V. -/2 width=2 by rex_inv_bind/ qed-. - -lemma req_inv_flat: ∀I,L1,L2,V,T. L1 ≡[ⓕ{I}V.T] L2 → - ∧∧ L1 ≡[V] L2 & L1 ≡[T] L2. -/2 width=2 by rex_inv_flat/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma req_inv_zero_pair_sn: ∀I,L2,K1,V. K1.ⓑ{I}V ≡[#0] L2 → - ∃∃K2. K1 ≡[V] K2 & L2 = K2.ⓑ{I}V. -#I #L2 #K1 #V #H -elim (rex_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct -/2 width=3 by ex2_intro/ -qed-. - -lemma req_inv_zero_pair_dx: ∀I,L1,K2,V. L1 ≡[#0] K2.ⓑ{I}V → - ∃∃K1. K1 ≡[V] K2 & L1 = K1.ⓑ{I}V. -#I #L1 #K2 #V #H -elim (rex_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct -/2 width=3 by ex2_intro/ -qed-. - -lemma req_inv_lref_bind_sn: ∀I1,K1,L2,i. K1.ⓘ{I1} ≡[#↑i] L2 → - ∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ{I2}. -/2 width=2 by rex_inv_lref_bind_sn/ qed-. - -lemma req_inv_lref_bind_dx: ∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ{I2} → - ∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ{I1}. -/2 width=2 by rex_inv_lref_bind_dx/ qed-. - -(* Basic forward lemmas *****************************************************) - -(* Basic_2A1: was: llpx_sn_lrefl *) -(* Basic_2A1: this should have been lleq_fwd_llpx_sn *) -lemma req_fwd_rex: ∀R. c_reflexive … R → - ∀L1,L2,T. L1 ≡[T] L2 → L1 ⪤[R, T] L2. -#R #HR #L1 #L2 #T * #f #Hf #HL12 -/4 width=7 by sex_co, cext2_co, ex2_intro/ -qed-. - -(* Basic_properties *********************************************************) - -lemma frees_req_conf: ∀f,L1,T. L1 ⊢ 𝐅*⦃T⦄ ≘ f → - ∀L2. L1 ≡[T] L2 → L2 ⊢ 𝐅*⦃T⦄ ≘ f. -#f #L1 #T #H elim H -f -L1 -T -[ /2 width=3 by frees_sort/ -| #f #i #Hf #L2 #H2 - >(rex_inv_atom_sn … H2) -L2 - /2 width=1 by frees_atom/ -| #f #I #L1 #V1 #_ #IH #Y #H2 - elim (req_inv_zero_pair_sn … H2) -H2 #L2 #HL12 #H destruct - /3 width=1 by frees_pair/ -| #f #I #L1 #Hf #Y #H2 - elim (rex_inv_zero_unit_sn … H2) -H2 #g #L2 #_ #_ #H destruct - /2 width=1 by frees_unit/ -| #f #I #L1 #i #_ #IH #Y #H2 - elim (req_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct - /3 width=1 by frees_lref/ -| /2 width=1 by frees_gref/ -| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 - elim (req_inv_bind … H2) -H2 /3 width=5 by frees_bind/ -| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 - elim (req_inv_flat … H2) -H2 /3 width=5 by frees_flat/ -] -qed-. - -(* Basic_2A1: removed theorems 10: - lleq_ind lleq_fwd_lref - lleq_fwd_drop_sn lleq_fwd_drop_dx - lleq_skip lleq_lref lleq_free - lleq_Y lleq_ge_up lleq_ge - -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/req_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/static/req_fqup.ma deleted file mode 100644 index 3fe7ad753..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/req_fqup.ma +++ /dev/null @@ -1,24 +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/static/rex_fqup.ma". -include "basic_2/static/req.ma". - -(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) - -(* Advanced properties ******************************************************) - -(* Basic_2A1: was: lleq_refl *) -lemma req_refl: ∀T. reflexive … (req T). -/2 width=1 by rex_refl/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/req_fsle.ma b/matita/matita/contribs/lambdadelta/basic_2/static/req_fsle.ma deleted file mode 100644 index 7662395c0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/req_fsle.ma +++ /dev/null @@ -1,33 +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/static/rex_length.ma". -include "basic_2/static/rex_fsle.ma". -include "basic_2/static/req.ma". - -(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) - -(* Properties with free variables inclusion for restricted closures *********) - -lemma req_fsle_comp: rex_fsle_compatible ceq. -#L1 #L2 #T #HL12 -elim (frees_total L1 T) -/4 width=8 by frees_req_conf, rex_fwd_length, lveq_length_eq, sle_refl, ex4_4_intro/ -qed. - -(* Forward lemmas with free variables inclusion for restricted closures *****) - -lemma req_rex_trans: ∀R. req_transitive R → - ∀L1,L,T. L1 ≡[T] L → ∀L2. L ⪤[R, T] L2 → L1 ⪤[R, T] L2. -/4 width=16 by req_fsle_comp, rex_trans_fsle, rex_trans_next/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex.ma deleted file mode 100644 index cc175f08f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex.ma +++ /dev/null @@ -1,320 +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 "ground_2/relocation/rtmap_id.ma". -include "basic_2/notation/relations/relation_4.ma". -include "basic_2/syntax/cext2.ma". -include "basic_2/relocation/sex.ma". -include "basic_2/static/frees.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -definition rex (R) (T): relation lenv ≝ - λL1,L2. ∃∃f. L1 ⊢ 𝐅*⦃T⦄ ≘ f & L1 ⪤[cext2 R, cfull, f] L2. - -interpretation "generic extension on referred entries (local environment)" - 'Relation R T L1 L2 = (rex R T L1 L2). - -definition R_confluent2_rex: relation4 (relation3 lenv term term) - (relation3 lenv term term) … ≝ - λR1,R2,RP1,RP2. - ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 → - ∀L1. L0 ⪤[RP1, T0] L1 → ∀L2. L0 ⪤[RP2, T0] L2 → - ∃∃T. R2 L1 T1 T & R1 L2 T2 T. - -definition rex_confluent: relation … ≝ - λR1,R2. - ∀K1,K,V1. K1 ⪤[R1, V1] K → ∀V. R1 K1 V1 V → - ∀K2. K ⪤[R2, V] K2 → K ⪤[R2, V1] K2. - -definition rex_transitive: relation3 ? (relation3 ?? term) … ≝ - λR1,R2,R3. - ∀K1,K,V1. K1 ⪤[R1, V1] K → - ∀V. R1 K1 V1 V → ∀V2. R2 K V V2 → R3 K1 V1 V2. - -(* Basic inversion lemmas ***************************************************) - -lemma rex_inv_atom_sn (R): ∀Y2,T. ⋆ ⪤[R, T] Y2 → Y2 = ⋆. -#R #Y2 #T * /2 width=4 by sex_inv_atom1/ -qed-. - -lemma rex_inv_atom_dx (R): ∀Y1,T. Y1 ⪤[R, T] ⋆ → Y1 = ⋆. -#R #I #Y1 * /2 width=4 by sex_inv_atom2/ -qed-. - -lemma rex_inv_sort (R): ∀Y1,Y2,s. Y1 ⪤[R, ⋆s] Y2 → - ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ - | ∃∃I1,I2,L1,L2. L1 ⪤[R, ⋆s] L2 & - Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. -#R * [ | #Y1 #I1 ] #Y2 #s * #f #H1 #H2 -[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/ -| lapply (frees_inv_sort … H1) -H1 #Hf - elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct - elim (sex_inv_push1 … H2) -H2 #I2 #L2 #H12 #_ #H destruct - /5 width=7 by frees_sort, ex3_4_intro, ex2_intro, or_intror/ -] -qed-. - -lemma rex_inv_zero (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 → - ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ - | ∃∃I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 & R L1 V1 V2 & - Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 - | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cext2 R, cfull, f] L2 & - Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. -#R * [ | #Y1 * #I1 [ | #X ] ] #Y2 * #f #H1 #H2 -[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or3_intro0, conj/ -| elim (frees_inv_unit … H1) -H1 #g #HX #H destruct - elim (sex_inv_next1 … H2) -H2 #I2 #L2 #HL12 #H #H2 destruct - >(ext2_inv_unit_sn … H) -H /3 width=8 by or3_intro2, ex4_4_intro/ -| elim (frees_inv_pair … H1) -H1 #g #Hg #H destruct - elim (sex_inv_next1 … H2) -H2 #Z2 #L2 #HL12 #H - elim (ext2_inv_pair_sn … H) -H - /4 width=9 by or3_intro1, ex4_5_intro, ex2_intro/ -] -qed-. - -lemma rex_inv_lref (R): ∀Y1,Y2,i. Y1 ⪤[R, #↑i] Y2 → - ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ - | ∃∃I1,I2,L1,L2. L1 ⪤[R, #i] L2 & - Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. -#R * [ | #Y1 #I1 ] #Y2 #i * #f #H1 #H2 -[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/ -| elim (frees_inv_lref … H1) -H1 #g #Hg #H destruct - elim (sex_inv_push1 … H2) -H2 - /4 width=7 by ex3_4_intro, ex2_intro, or_intror/ -] -qed-. - -lemma rex_inv_gref (R): ∀Y1,Y2,l. Y1 ⪤[R, §l] Y2 → - ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ - | ∃∃I1,I2,L1,L2. L1 ⪤[R, §l] L2 & - Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. -#R * [ | #Y1 #I1 ] #Y2 #l * #f #H1 #H2 -[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/ -| lapply (frees_inv_gref … H1) -H1 #Hf - elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct - elim (sex_inv_push1 … H2) -H2 #I2 #L2 #H12 #_ #H destruct - /5 width=7 by frees_gref, ex3_4_intro, ex2_intro, or_intror/ -] -qed-. - -(* Basic_2A1: uses: llpx_sn_inv_bind llpx_sn_inv_bind_O *) -lemma rex_inv_bind (R): ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R, ⓑ{p,I}V1.T] L2 → R L1 V1 V2 → - ∧∧ L1 ⪤[R, V1] L2 & L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2. -#R #p #I #L1 #L2 #V1 #V2 #T * #f #Hf #HL #HV elim (frees_inv_bind … Hf) -Hf -/6 width=6 by sle_sex_trans, sex_inv_tl, ext2_pair, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/ -qed-. - -(* Basic_2A1: uses: llpx_sn_inv_flat *) -lemma rex_inv_flat (R): ∀I,L1,L2,V,T. L1 ⪤[R, ⓕ{I}V.T] L2 → - ∧∧ L1 ⪤[R, V] L2 & L1 ⪤[R, T] L2. -#R #I #L1 #L2 #V #T * #f #Hf #HL elim (frees_inv_flat … Hf) -Hf -/5 width=6 by sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/ -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma rex_inv_sort_bind_sn (R): ∀I1,K1,L2,s. K1.ⓘ{I1} ⪤[R, ⋆s] L2 → - ∃∃I2,K2. K1 ⪤[R, ⋆s] K2 & L2 = K2.ⓘ{I2}. -#R #I1 #K1 #L2 #s #H elim (rex_inv_sort … H) -H * -[ #H destruct -| #Z1 #I2 #Y1 #K2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rex_inv_sort_bind_dx (R): ∀I2,K2,L1,s. L1 ⪤[R, ⋆s] K2.ⓘ{I2} → - ∃∃I1,K1. K1 ⪤[R, ⋆s] K2 & L1 = K1.ⓘ{I1}. -#R #I2 #K2 #L1 #s #H elim (rex_inv_sort … H) -H * -[ #_ #H destruct -| #I1 #Z2 #K1 #Y2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rex_inv_zero_pair_sn (R): ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R, #0] L2 → - ∃∃K2,V2. K1 ⪤[R, V1] K2 & R K1 V1 V2 & - L2 = K2.ⓑ{I}V2. -#R #I #L2 #K1 #V1 #H elim (rex_inv_zero … H) -H * -[ #H destruct -| #Z #Y1 #K2 #X1 #V2 #HK12 #HV12 #H1 #H2 destruct - /2 width=5 by ex3_2_intro/ -| #f #Z #Y1 #Y2 #_ #_ #H destruct -] -qed-. - -lemma rex_inv_zero_pair_dx (R): ∀I,L1,K2,V2. L1 ⪤[R, #0] K2.ⓑ{I}V2 → - ∃∃K1,V1. K1 ⪤[R, V1] K2 & R K1 V1 V2 & - L1 = K1.ⓑ{I}V1. -#R #I #L1 #K2 #V2 #H elim (rex_inv_zero … H) -H * -[ #_ #H destruct -| #Z #K1 #Y2 #V1 #X2 #HK12 #HV12 #H1 #H2 destruct - /2 width=5 by ex3_2_intro/ -| #f #Z #Y1 #Y2 #_ #_ #_ #H destruct -] -qed-. - -lemma rex_inv_zero_unit_sn (R): ∀I,K1,L2. K1.ⓤ{I} ⪤[R, #0] L2 → - ∃∃f,K2. 𝐈⦃f⦄ & K1 ⪤[cext2 R, cfull, f] K2 & - L2 = K2.ⓤ{I}. -#R #I #K1 #L2 #H elim (rex_inv_zero … H) -H * -[ #H destruct -| #Z #Y1 #Y2 #X1 #X2 #_ #_ #H destruct -| #f #Z #Y1 #K2 #Hf #HK12 #H1 #H2 destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma rex_inv_zero_unit_dx (R): ∀I,L1,K2. L1 ⪤[R, #0] K2.ⓤ{I} → - ∃∃f,K1. 𝐈⦃f⦄ & K1 ⪤[cext2 R, cfull, f] K2 & - L1 = K1.ⓤ{I}. -#R #I #L1 #K2 #H elim (rex_inv_zero … H) -H * -[ #_ #H destruct -| #Z #Y1 #Y2 #X1 #X2 #_ #_ #_ #H destruct -| #f #Z #K1 #Y2 #Hf #HK12 #H1 #H2 destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma rex_inv_lref_bind_sn (R): ∀I1,K1,L2,i. K1.ⓘ{I1} ⪤[R, #↑i] L2 → - ∃∃I2,K2. K1 ⪤[R, #i] K2 & L2 = K2.ⓘ{I2}. -#R #I1 #K1 #L2 #i #H elim (rex_inv_lref … H) -H * -[ #H destruct -| #Z1 #I2 #Y1 #K2 #Hi #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rex_inv_lref_bind_dx (R): ∀I2,K2,L1,i. L1 ⪤[R, #↑i] K2.ⓘ{I2} → - ∃∃I1,K1. K1 ⪤[R, #i] K2 & L1 = K1.ⓘ{I1}. -#R #I2 #K2 #L1 #i #H elim (rex_inv_lref … H) -H * -[ #_ #H destruct -| #I1 #Z2 #K1 #Y2 #Hi #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rex_inv_gref_bind_sn (R): ∀I1,K1,L2,l. K1.ⓘ{I1} ⪤[R, §l] L2 → - ∃∃I2,K2. K1 ⪤[R, §l] K2 & L2 = K2.ⓘ{I2}. -#R #I1 #K1 #L2 #l #H elim (rex_inv_gref … H) -H * -[ #H destruct -| #Z1 #I2 #Y1 #K2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -lemma rex_inv_gref_bind_dx (R): ∀I2,K2,L1,l. L1 ⪤[R, §l] K2.ⓘ{I2} → - ∃∃I1,K1. K1 ⪤[R, §l] K2 & L1 = K1.ⓘ{I1}. -#R #I2 #K2 #L1 #l #H elim (rex_inv_gref … H) -H * -[ #_ #H destruct -| #I1 #Z2 #K1 #Y2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ -] -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma rex_fwd_zero_pair (R): ∀I,K1,K2,V1,V2. - K1.ⓑ{I}V1 ⪤[R, #0] K2.ⓑ{I}V2 → K1 ⪤[R, V1] K2. -#R #I #K1 #K2 #V1 #V2 #H -elim (rex_inv_zero_pair_sn … H) -H #Y #X #HK12 #_ #H destruct // -qed-. - -(* Basic_2A1: uses: llpx_sn_fwd_pair_sn llpx_sn_fwd_bind_sn llpx_sn_fwd_flat_sn *) -lemma rex_fwd_pair_sn (R): ∀I,L1,L2,V,T. L1 ⪤[R, ②{I}V.T] L2 → L1 ⪤[R, V] L2. -#R * [ #p ] #I #L1 #L2 #V #T * #f #Hf #HL -[ elim (frees_inv_bind … Hf) | elim (frees_inv_flat … Hf) ] -Hf -/4 width=6 by sle_sex_trans, sor_inv_sle_sn, ex2_intro/ -qed-. - -(* Basic_2A1: uses: llpx_sn_fwd_bind_dx llpx_sn_fwd_bind_O_dx *) -lemma rex_fwd_bind_dx (R): ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R, ⓑ{p,I}V1.T] L2 → - R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2. -#R #p #I #L1 #L2 #V1 #V2 #T #H #HV elim (rex_inv_bind … H HV) -H -HV // -qed-. - -(* Basic_2A1: uses: llpx_sn_fwd_flat_dx *) -lemma rex_fwd_flat_dx (R): ∀I,L1,L2,V,T. L1 ⪤[R, ⓕ{I}V.T] L2 → L1 ⪤[R, T] L2. -#R #I #L1 #L2 #V #T #H elim (rex_inv_flat … H) -H // -qed-. - -lemma rex_fwd_dx (R): ∀I2,L1,K2,T. L1 ⪤[R, T] K2.ⓘ{I2} → - ∃∃I1,K1. L1 = K1.ⓘ{I1}. -#R #I2 #L1 #K2 #T * #f elim (pn_split f) * #g #Hg #_ #Hf destruct -[ elim (sex_inv_push2 … Hf) | elim (sex_inv_next2 … Hf) ] -Hf #I1 #K1 #_ #_ #H destruct -/2 width=3 by ex1_2_intro/ -qed-. - -(* Basic properties *********************************************************) - -lemma rex_atom (R): ∀I. ⋆ ⪤[R, ⓪{I}] ⋆. -#R * /3 width=3 by frees_sort, frees_atom, frees_gref, sex_atom, ex2_intro/ -qed. - -lemma rex_sort (R): ∀I1,I2,L1,L2,s. - L1 ⪤[R, ⋆s] L2 → L1.ⓘ{I1} ⪤[R, ⋆s] L2.ⓘ{I2}. -#R #I1 #I2 #L1 #L2 #s * #f #Hf #H12 -lapply (frees_inv_sort … Hf) -Hf -/4 width=3 by frees_sort, sex_push, isid_push, ex2_intro/ -qed. - -lemma rex_pair (R): ∀I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 → - R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R, #0] L2.ⓑ{I}V2. -#R #I1 #I2 #L1 #L2 #V1 * -/4 width=3 by ext2_pair, frees_pair, sex_next, ex2_intro/ -qed. - -lemma rex_unit (R): ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R, cfull, f] L2 → - L1.ⓤ{I} ⪤[R, #0] L2.ⓤ{I}. -/4 width=3 by frees_unit, sex_next, ext2_unit, ex2_intro/ qed. - -lemma rex_lref (R): ∀I1,I2,L1,L2,i. - L1 ⪤[R, #i] L2 → L1.ⓘ{I1} ⪤[R, #↑i] L2.ⓘ{I2}. -#R #I1 #I2 #L1 #L2 #i * /3 width=3 by sex_push, frees_lref, ex2_intro/ -qed. - -lemma rex_gref (R): ∀I1,I2,L1,L2,l. - L1 ⪤[R, §l] L2 → L1.ⓘ{I1} ⪤[R, §l] L2.ⓘ{I2}. -#R #I1 #I2 #L1 #L2 #l * #f #Hf #H12 -lapply (frees_inv_gref … Hf) -Hf -/4 width=3 by frees_gref, sex_push, isid_push, ex2_intro/ -qed. - -lemma rex_bind_repl_dx (R): ∀I,I1,L1,L2,T. - L1.ⓘ{I} ⪤[R, T] L2.ⓘ{I1} → - ∀I2. cext2 R L1 I I2 → - L1.ⓘ{I} ⪤[R, T] L2.ⓘ{I2}. -#R #I #I1 #L1 #L2 #T * #f #Hf #HL12 #I2 #HR -/3 width=5 by sex_pair_repl, ex2_intro/ -qed-. - -(* Basic_2A1: uses: llpx_sn_co *) -lemma rex_co (R1) (R2): (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → - ∀L1,L2,T. L1 ⪤[R1, T] L2 → L1 ⪤[R2, T] L2. -#R1 #R2 #HR #L1 #L2 #T * /5 width=7 by sex_co, cext2_co, ex2_intro/ -qed-. - -lemma rex_isid (R1) (R2): ∀L1,L2,T1,T2. - (∀f. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → 𝐈⦃f⦄) → - (∀f. 𝐈⦃f⦄ → L1 ⊢ 𝐅*⦃T2⦄ ≘ f) → - L1 ⪤[R1, T1] L2 → L1 ⪤[R2, T2] L2. -#R1 #R2 #L1 #L2 #T1 #T2 #H1 #H2 * -/4 width=7 by sex_co_isid, ex2_intro/ -qed-. - -lemma rex_unit_sn (R1) (R2): - ∀I,K1,L2. K1.ⓤ{I} ⪤[R1, #0] L2 → K1.ⓤ{I} ⪤[R2, #0] L2. -#R1 #R2 #I #K1 #L2 #H -elim (rex_inv_zero_unit_sn … H) -H #f #K2 #Hf #HK12 #H destruct -/3 width=7 by rex_unit, sex_co_isid/ -qed-. - -(* Basic_2A1: removed theorems 9: - llpx_sn_skip llpx_sn_lref llpx_sn_free - llpx_sn_fwd_lref - llpx_sn_Y llpx_sn_ge_up llpx_sn_ge - llpx_sn_fwd_drop_sn llpx_sn_fwd_drop_dx -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex_drops.ma deleted file mode 100644 index 7ce890273..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex_drops.ma +++ /dev/null @@ -1,124 +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/relocation/drops_cext2.ma". -include "basic_2/relocation/drops_sex.ma". -include "basic_2/static/frees_drops.ma". -include "basic_2/static/rex.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -definition f_dedropable_sn: predicate (relation3 lenv term term) ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → - ∀K2,T. K1 ⪤[R, T] K2 → ∀U. ⬆*[f] T ≘ U → - ∃∃L2. L1 ⪤[R, U] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. - -definition f_dropable_sn: predicate (relation3 lenv term term) ≝ - λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → - ∀L2,U. L1 ⪤[R, U] L2 → ∀T. ⬆*[f] T ≘ U → - ∃∃K2. K1 ⪤[R, T] K2 & ⬇*[b, f] L2 ≘ K2. - -definition f_dropable_dx: predicate (relation3 lenv term term) ≝ - λR. ∀L1,L2,U. L1 ⪤[R, U] L2 → - ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U → - ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[R, T] K2. - -definition f_transitive_next: relation3 … ≝ λR1,R2,R3. - ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → - ∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → - sex_transitive (cext2 R1) (cext2 R2) (cext2 R3) (cext2 R1) cfull g K I. - -(* Properties with generic slicing for local environments *******************) - -lemma rex_liftable_dedropable_sn: ∀R. (∀L. reflexive ? (R L)) → - d_liftable2_sn … lifts R → f_dedropable_sn R. -#R #H1R #H2R #b #f #L1 #K1 #HLK1 #K2 #T * #f1 #Hf1 #HK12 #U #HTU -elim (frees_total L1 U) #f2 #Hf2 -lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf -elim (sex_liftable_co_dedropable_sn … HLK1 … HK12 … Hf) -f1 -K1 -/3 width=6 by cext2_d_liftable2_sn, cfull_lift_sn, ext2_refl, ex3_intro, ex2_intro/ -qed-. - -lemma rex_trans_next: ∀R1,R2,R3. rex_transitive R1 R2 R3 → f_transitive_next R1 R2 R3. -#R1 #R2 #R3 #HR #f #L1 #T #Hf #g #I1 #K1 #n #HLK #Hgf #I #H -generalize in match HLK; -HLK elim H -I1 -I -[ #I #_ #L2 #_ #I2 #H - lapply (ext2_inv_unit_sn … H) -H #H destruct - /2 width=1 by ext2_unit/ -| #I #V1 #V #HV1 #HLK1 #L2 #HL12 #I2 #H - elim (ext2_inv_pair_sn … H) -H #V2 #HV2 #H destruct - elim (frees_inv_drops_next … Hf … HLK1 … Hgf) -f -HLK1 #f #Hf #Hfg - /5 width=5 by ext2_pair, sle_sex_trans, ex2_intro/ -] -qed. - -(* Inversion lemmas with generic slicing for local environments *************) - -(* Basic_2A1: uses: llpx_sn_inv_lift_le llpx_sn_inv_lift_be llpx_sn_inv_lift_ge *) -(* Basic_2A1: was: llpx_sn_drop_conf_O *) -lemma rex_dropable_sn: ∀R. f_dropable_sn R. -#R #b #f #L1 #K1 #HLK1 #H1f #L2 #U * #f2 #Hf2 #HL12 #T #HTU -elim (frees_total K1 T) #f1 #Hf1 -lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #H2f -elim (sex_co_dropable_sn … HLK1 … HL12 … H2f) -f2 -L1 -/3 width=3 by ex2_intro/ -qed-. - -(* Basic_2A1: was: llpx_sn_drop_trans_O *) -(* Note: the proof might be simplified *) -lemma rex_dropable_dx: ∀R. f_dropable_dx R. -#R #L1 #L2 #U * #f2 #Hf2 #HL12 #b #f #K2 #HLK2 #H1f #T #HTU -elim (drops_isuni_ex … H1f L1) #K1 #HLK1 -elim (frees_total K1 T) #f1 #Hf1 -lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -K1 #H2f -elim (sex_co_dropable_dx … HL12 … HLK2 … H2f) -L2 -/4 width=9 by frees_inv_lifts, ex2_intro/ -qed-. - -(* Basic_2A1: uses: llpx_sn_inv_lift_O *) -lemma rex_inv_lifts_bi: ∀R,L1,L2,U. L1 ⪤[R, U] L2 → ∀b,f. 𝐔⦃f⦄ → - ∀K1,K2. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → - ∀T. ⬆*[f] T ≘ U → K1 ⪤[R, T] K2. -#R #L1 #L2 #U #HL12 #b #f #Hf #K1 #K2 #HLK1 #HLK2 #T #HTU -elim (rex_dropable_sn … HLK1 … HL12 … HTU) -L1 -U // #Y #HK12 #HY -lapply (drops_mono … HY … HLK2) -b -f -L2 #H destruct // -qed-. - -lemma rex_inv_lref_pair_sn: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 → - ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R, V1] K2 & R K1 V1 V2. -#R #L1 #L2 #i #HL12 #I #K1 #V1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 // -#Y #HY #HLK2 elim (rex_inv_zero_pair_sn … HY) -HY -#K2 #V2 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma rex_inv_lref_pair_dx: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 → - ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R, V1] K2 & R K1 V1 V2. -#R #L1 #L2 #i #HL12 #I #K2 #V2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 // -#Y #HLK1 #HY elim (rex_inv_zero_pair_dx … HY) -HY -#K1 #V1 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma rex_inv_lref_unit_sn: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} → - ∃∃f,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} & K1 ⪤[cext2 R, cfull, f] K2 & 𝐈⦃f⦄. -#R #L1 #L2 #i #HL12 #I #K1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 // -#Y #HY #HLK2 elim (rex_inv_zero_unit_sn … HY) -HY -#f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. - -lemma rex_inv_lref_unit_dx: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} → - ∃∃f,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} & K1 ⪤[cext2 R, cfull, f] K2 & 𝐈⦃f⦄. -#R #L1 #L2 #i #HL12 #I #K2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 // -#Y #HLK1 #HY elim (rex_inv_zero_unit_dx … HY) -HY -#f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex_fqup.ma deleted file mode 100644 index 6060d3ff6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex_fqup.ma +++ /dev/null @@ -1,49 +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/static/frees_fqup.ma". -include "basic_2/static/rex.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -(* Advanced properties ******************************************************) - -(* Basic_2A1: uses: llpx_sn_refl *) -lemma rex_refl: ∀R. (∀L. reflexive … (R L)) → ∀L,T. L ⪤[R, T] L. -#R #HR #L #T elim (frees_total L T) -/4 width=3 by sex_refl, ext2_refl, ex2_intro/ -qed. - -lemma rex_pair_refl: ∀R. (∀L. reflexive … (R L)) → - ∀L,V1,V2. R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤[R, T] L.ⓑ{I}V2. -#R #HR #L #V1 #V2 #HV12 #I #T -elim (frees_total (L.ⓑ{I}V1) T) #f #Hf -elim (pn_split f) * #g #H destruct -/5 width=3 by sex_refl, sex_next, sex_push, ext2_refl, ext2_pair, ex2_intro/ -qed. - -(* Advanced inversion lemmas ************************************************) - -lemma rex_inv_bind_void: ∀R,p,I,L1,L2,V,T. L1 ⪤[R, ⓑ{p,I}V.T] L2 → - L1 ⪤[R, V] L2 ∧ L1.ⓧ ⪤[R, T] L2.ⓧ. -#R #p #I #L1 #L2 #V #T * #f #Hf #HL elim (frees_inv_bind_void … Hf) -Hf -/6 width=6 by sle_sex_trans, sex_inv_tl, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/ -qed-. - -(* Advanced forward lemmas **************************************************) - -lemma rex_fwd_bind_dx_void: ∀R,p,I,L1,L2,V,T. L1 ⪤[R, ⓑ{p,I}V.T] L2 → - L1.ⓧ ⪤[R, T] L2.ⓧ. -#R #p #I #L1 #L2 #V #T #H elim (rex_inv_bind_void … H) -H // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex_fsle.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex_fsle.ma deleted file mode 100644 index b69cd2efb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex_fsle.ma +++ /dev/null @@ -1,176 +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/relocation/sex_length.ma". -include "basic_2/static/fsle_fsle.ma". -include "basic_2/static/rex_drops.ma". -include "basic_2/static/rex_rex.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -definition R_fsge_compatible: predicate (relation3 …) ≝ λRN. - ∀L,T1,T2. RN L T1 T2 → ⦃L, T2⦄ ⊆ ⦃L, T1⦄. - -definition rex_fsge_compatible: predicate (relation3 …) ≝ λRN. - ∀L1,L2,T. L1 ⪤[RN, T] L2 → ⦃L2, T⦄ ⊆ ⦃L1, T⦄. - -definition rex_fsle_compatible: predicate (relation3 …) ≝ λRN. - ∀L1,L2,T. L1 ⪤[RN, T] L2 → ⦃L1, T⦄ ⊆ ⦃L2, T⦄. - -(* Basic inversions with free variables inclusion for restricted closures ***) - -lemma frees_sex_conf: ∀R. rex_fsge_compatible R → - ∀L1,T,f1. L1 ⊢ 𝐅*⦃T⦄ ≘ f1 → - ∀L2. L1 ⪤[cext2 R, cfull, f1] L2 → - ∃∃f2. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 & f2 ⊆ f1. -#R #HR #L1 #T #f1 #Hf1 #L2 #H1L -lapply (HR L1 L2 T ?) /2 width=3 by ex2_intro/ #H2L -@(fsle_frees_trans_eq … H2L … Hf1) /3 width=4 by sex_fwd_length, sym_eq/ -qed-. - -(* Properties with free variables inclusion for restricted closures *********) - -(* Note: we just need lveq_inv_refl: ∀L,n1,n2. L ≋ⓧ*[n1, n2] L → ∧∧ 0 = n1 & 0 = n2 *) -lemma fsge_rex_trans: ∀R,L1,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L1, T2⦄ → - ∀L2. L1 ⪤[R, T2] L2 → L1 ⪤[R, T1] L2. -#R #L1 #T1 #T2 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #Hn #Hf #L2 #HL12 -elim (lveq_inj_length … Hn ?) // #H1 #H2 destruct -/4 width=5 by rex_inv_frees, sle_sex_trans, ex2_intro/ -qed-. - -lemma rex_sym: ∀R. rex_fsge_compatible R → - (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) → - ∀T. symmetric … (rex R T). -#R #H1R #H2R #T #L1 #L2 -* #f1 #Hf1 #HL12 -elim (frees_sex_conf … Hf1 … HL12) -Hf1 // -/5 width=5 by sle_sex_trans, sex_sym, cext2_sym, ex2_intro/ -qed-. - -lemma rex_pair_sn_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → - rex_fsge_compatible R1 → - ∀L1,L2,V. L1 ⪤[R1, V] L2 → ∀I,T. - ∃∃L. L1 ⪤[R1, ②{I}V.T] L & L ⪤[R2, V] L2. -#R1 #R2 #HR1 #HR2 #HR #L1 #L2 #V * #f #Hf #HL12 * [ #p ] #I #T -[ elim (frees_total L1 (ⓑ{p,I}V.T)) #g #Hg - elim (frees_inv_bind … Hg) #y1 #y2 #H #_ #Hy -| elim (frees_total L1 (ⓕ{I}V.T)) #g #Hg - elim (frees_inv_flat … Hg) #y1 #y2 #H #_ #Hy -] -lapply(frees_mono … H … Hf) -H #H1 -lapply (sor_eq_repl_back1 … Hy … H1) -y1 #Hy -lapply (sor_inv_sle_sn … Hy) -y2 #Hfg -elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #L #HL1 #HL2 -lapply (sle_sex_trans … HL1 … Hfg) // #H -elim (frees_sex_conf … Hf … H) -Hf -H -/4 width=7 by sle_sex_trans, ex2_intro/ -qed-. - -lemma rex_flat_dx_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → - rex_fsge_compatible R1 → - ∀L1,L2,T. L1 ⪤[R1, T] L2 → ∀I,V. - ∃∃L. L1 ⪤[R1, ⓕ{I}V.T] L & L ⪤[R2, T] L2. -#R1 #R2 #HR1 #HR2 #HR #L1 #L2 #T * #f #Hf #HL12 #I #V -elim (frees_total L1 (ⓕ{I}V.T)) #g #Hg -elim (frees_inv_flat … Hg) #y1 #y2 #_ #H #Hy -lapply(frees_mono … H … Hf) -H #H2 -lapply (sor_eq_repl_back2 … Hy … H2) -y2 #Hy -lapply (sor_inv_sle_dx … Hy) -y1 #Hfg -elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #L #HL1 #HL2 -lapply (sle_sex_trans … HL1 … Hfg) // #H -elim (frees_sex_conf … Hf … H) -Hf -H -/4 width=7 by sle_sex_trans, ex2_intro/ -qed-. - -lemma rex_bind_dx_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → - rex_fsge_compatible R1 → - ∀I,L1,L2,V1,T. L1.ⓑ{I}V1 ⪤[R1, T] L2 → ∀p. - ∃∃L,V. L1 ⪤[R1, ⓑ{p,I}V1.T] L & L.ⓑ{I}V ⪤[R2, T] L2 & R1 L1 V1 V. -#R1 #R2 #HR1 #HR2 #HR #I #L1 #L2 #V1 #T * #f #Hf #HL12 #p -elim (frees_total L1 (ⓑ{p,I}V1.T)) #g #Hg -elim (frees_inv_bind … Hg) #y1 #y2 #_ #H #Hy -lapply(frees_mono … H … Hf) -H #H2 -lapply (tl_eq_repl … H2) -H2 #H2 -lapply (sor_eq_repl_back2 … Hy … H2) -y2 #Hy -lapply (sor_inv_sle_dx … Hy) -y1 #Hfg -lapply (sle_inv_tl_sn … Hfg) -Hfg #Hfg -elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #Y #H #HL2 -lapply (sle_sex_trans … H … Hfg) // #H0 -elim (sex_inv_next1 … H) -H #Z #L #HL1 #H -elim (ext2_inv_pair_sn … H) -H #V #HV #H1 #H2 destruct -elim (frees_sex_conf … Hf … H0) -Hf -H0 -/4 width=7 by sle_sex_trans, ex3_2_intro, ex2_intro/ -qed-. - -lemma rex_bind_dx_split_void: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → - rex_fsge_compatible R1 → - ∀L1,L2,T. L1.ⓧ ⪤[R1, T] L2 → ∀p,I,V. - ∃∃L. L1 ⪤[R1, ⓑ{p,I}V.T] L & L.ⓧ ⪤[R2, T] L2. -#R1 #R2 #HR1 #HR2 #HR #L1 #L2 #T * #f #Hf #HL12 #p #I #V -elim (frees_total L1 (ⓑ{p,I}V.T)) #g #Hg -elim (frees_inv_bind_void … Hg) #y1 #y2 #_ #H #Hy -lapply(frees_mono … H … Hf) -H #H2 -lapply (tl_eq_repl … H2) -H2 #H2 -lapply (sor_eq_repl_back2 … Hy … H2) -y2 #Hy -lapply (sor_inv_sle_dx … Hy) -y1 #Hfg -lapply (sle_inv_tl_sn … Hfg) -Hfg #Hfg -elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #Y #H #HL2 -lapply (sle_sex_trans … H … Hfg) // #H0 -elim (sex_inv_next1 … H) -H #Z #L #HL1 #H -elim (ext2_inv_unit_sn … H) -H #H destruct -elim (frees_sex_conf … Hf … H0) -Hf -H0 -/4 width=7 by sle_sex_trans, ex2_intro/ (* note: 2 ex2_intro *) -qed-. - -(* Main properties with free variables inclusion for restricted closures ****) - -theorem rex_conf: ∀R1,R2. - rex_fsge_compatible R1 → - rex_fsge_compatible R2 → - R_confluent2_rex R1 R2 R1 R2 → - ∀T. confluent2 … (rex R1 T) (rex R2 T). -#R1 #R2 #HR1 #HR2 #HR12 #T #L0 #L1 * #f1 #Hf1 #HL01 #L2 * #f #Hf #HL02 -lapply (frees_mono … Hf1 … Hf) -Hf1 #Hf12 -lapply (sex_eq_repl_back … HL01 … Hf12) -f1 #HL01 -elim (sex_conf … HL01 … HL02) /2 width=3 by ex2_intro/ [ | -HL01 -HL02 ] -[ #L #HL1 #HL2 - elim (frees_sex_conf … Hf … HL01) // -HR1 -HL01 #f1 #Hf1 #H1 - elim (frees_sex_conf … Hf … HL02) // -HR2 -HL02 #f2 #Hf2 #H2 - lapply (sle_sex_trans … HL1 … H1) // -HL1 -H1 #HL1 - lapply (sle_sex_trans … HL2 … H2) // -HL2 -H2 #HL2 - /3 width=5 by ex2_intro/ -| #g * #I0 [2: #V0 ] #K0 #n #HLK0 #Hgf #Z1 #H1 #Z2 #H2 #K1 #HK01 #K2 #HK02 - [ elim (ext2_inv_pair_sn … H1) -H1 #V1 #HV01 #H destruct - elim (ext2_inv_pair_sn … H2) -H2 #V2 #HV02 #H destruct - elim (frees_inv_drops_next … Hf … HLK0 … Hgf) -Hf -HLK0 -Hgf #g0 #Hg0 #H0 - lapply (sle_sex_trans … HK01 … H0) // -HK01 #HK01 - lapply (sle_sex_trans … HK02 … H0) // -HK02 #HK02 - elim (HR12 … HV01 … HV02 K1 … K2) /3 width=3 by ext2_pair, ex2_intro/ - | lapply (ext2_inv_unit_sn … H1) -H1 #H destruct - lapply (ext2_inv_unit_sn … H2) -H2 #H destruct - /3 width=3 by ext2_unit, ex2_intro/ - ] -] -qed-. - -theorem rex_trans_fsle: ∀R1,R2,R3. - rex_fsle_compatible R1 → f_transitive_next R1 R2 R3 → - ∀L1,L,T. L1 ⪤[R1, T] L → - ∀L2. L ⪤[R2, T] L2 → L1 ⪤[R3, T] L2. -#R1 #R2 #R3 #H1R #H2R #L1 #L #T #H -lapply (H1R … H) -H1R #H0 -cases H -H #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2 -lapply (fsle_inv_frees_eq … H0 … Hf1 … Hf2) -H0 -Hf2 -/4 width=14 by sex_trans_gen, sex_fwd_length, sle_sex_trans, ex2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex_length.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex_length.ma deleted file mode 100644 index bd6b0d6c2..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex_length.ma +++ /dev/null @@ -1,72 +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/relocation/sex_length.ma". -include "basic_2/static/rex_drops.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -(* Forward lemmas with length for local environments ************************) - -(* Basic_2A1: uses: llpx_sn_fwd_length *) -lemma rex_fwd_length (R): ∀L1,L2,T. L1 ⪤[R, T] L2 → |L1| = |L2|. -#R #L1 #L2 #T * /2 width=4 by sex_fwd_length/ -qed-. - -(* Properties with length for local environments ****************************) - -(* Basic_2A1: uses: llpx_sn_sort *) -lemma rex_sort_length (R): ∀L1,L2. |L1| = |L2| → ∀s. L1 ⪤[R, ⋆s] L2. -#R #L1 elim L1 -L1 -[ #Y #H #s >(length_inv_zero_sn … H) -H // -| #K1 #I1 #IH #Y #H #s - elim (length_inv_succ_sn … H) -H #I2 #K2 #HK12 #H destruct - /3 width=1 by rex_sort/ -] -qed. - -(* Basic_2A1: uses: llpx_sn_gref *) -lemma rex_gref_length (R): ∀L1,L2. |L1| = |L2| → ∀l. L1 ⪤[R, §l] L2. -#R #L1 elim L1 -L1 -[ #Y #H #s >(length_inv_zero_sn … H) -H // -| #K1 #I1 #IH #Y #H #s - elim (length_inv_succ_sn … H) -H #I2 #K2 #HK12 #H destruct - /3 width=1 by rex_gref/ -] -qed. - -lemma rex_unit_length (R): ∀L1,L2. |L1| = |L2| → ∀I. L1.ⓤ{I} ⪤[R, #0] L2.ⓤ{I}. -/3 width=3 by rex_unit, sex_length_isid/ qed. - -(* Basic_2A1: uses: llpx_sn_lift_le llpx_sn_lift_ge *) -lemma rex_lifts_bi (R): d_liftable2_sn … lifts R → - ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ⪤[R, T] K2 → - ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → - ∀U. ⬆*[f] T ≘ U → L1 ⪤[R, U] L2. -#R #HR #L1 #L2 #HL12 #K1 #K2 #T * #f1 #Hf1 #HK12 #b #f #HLK1 #HLK2 #U #HTU -elim (frees_total L1 U) #f2 #Hf2 -lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf -/4 width=12 by sex_length_cfull, sex_liftable_co_dedropable_bi, cext2_d_liftable2_sn, cfull_lift_sn, ex2_intro/ -qed-. - -(* Inversion lemmas with length for local environment ***********************) - -lemma rex_inv_zero_length (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 → - ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ - | ∃∃I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 & R L1 V1 V2 & - Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 - | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. -#R #Y1 #Y2 #H elim (rex_inv_zero … H) -H * -/4 width=9 by sex_fwd_length, ex4_5_intro, ex3_3_intro, or3_intro2, or3_intro1, or3_intro0, conj/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex_lex.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex_lex.ma deleted file mode 100644 index 970588d1a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex_lex.ma +++ /dev/null @@ -1,41 +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/relocation/lex.ma". -include "basic_2/static/rex_fsle.ma". -include "basic_2/static/req.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -(* Properties with generic extension of a context-sensitive relation ********) - -lemma rex_lex: ∀R,L1,L2. L1 ⪤[R] L2 → ∀T. L1 ⪤[R, T] L2. -#R #L1 #L2 * #f #Hf #HL12 #T -elim (frees_total L1 T) #g #Hg -/4 width=5 by sex_sdj, sdj_isid_sn, ex2_intro/ -qed. - -(* Inversion lemmas with generic extension of a context sensitive relation **) - -lemma rex_inv_lex_req: ∀R. c_reflexive … R → - rex_fsge_compatible R → - ∀L1,L2,T. L1 ⪤[R, T] L2 → - ∃∃L. L1 ⪤[R] L & L ≡[T] L2. -#R #H1R #H2R #L1 #L2 #T * #f1 #Hf1 #HL -elim (sex_sdj_split … ceq_ext … HL 𝐈𝐝 ?) -HL -[ #L0 #HL10 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ] -H1R -lapply (sex_sdj … HL10 f1 ?) /2 width=1 by sdj_isid_sn/ #H -elim (frees_sex_conf … Hf1 … H) // -H2R -H #f0 #Hf0 #Hf01 -/4 width=7 by sle_sex_trans, (* 2x *) ex2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/rex_rex.ma b/matita/matita/contribs/lambdadelta/basic_2/static/rex_rex.ma deleted file mode 100644 index 96162fd38..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/static/rex_rex.ma +++ /dev/null @@ -1,89 +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/relocation/sex_sex.ma". -include "basic_2/static/frees_fqup.ma". -include "basic_2/static/rex.ma". - -(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) - -(* Advanced inversion lemmas ************************************************) - -lemma rex_inv_frees: ∀R,L1,L2,T. L1 ⪤[R, T] L2 → - ∀f. L1 ⊢ 𝐅*⦃T⦄ ≘ f → L1 ⪤[cext2 R, cfull, f] L2. -#R #L1 #L2 #T * /3 width=6 by frees_mono, sex_eq_repl_back/ -qed-. - -(* Advanced properties ******************************************************) - -(* Basic_2A1: uses: llpx_sn_dec *) -lemma rex_dec: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → - ∀L1,L2,T. Decidable (L1 ⪤[R, T] L2). -#R #HR #L1 #L2 #T -elim (frees_total L1 T) #f #Hf -elim (sex_dec (cext2 R) cfull … L1 L2 f) -/4 width=3 by rex_inv_frees, cfull_dec, ext2_dec, ex2_intro, or_intror, or_introl/ -qed-. - -(* Main properties **********************************************************) - -(* Basic_2A1: uses: llpx_sn_bind llpx_sn_bind_O *) -theorem rex_bind: ∀R,p,I,L1,L2,V1,V2,T. - L1 ⪤[R, V1] L2 → L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2 → - L1 ⪤[R, ⓑ{p,I}V1.T] L2. -#R #p #I #L1 #L2 #V1 #V2 #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 -lapply (sex_fwd_bind … Hf2) -Hf2 #Hf2 elim (sor_isfin_ex f1 (⫱f2)) -/3 width=7 by frees_fwd_isfin, frees_bind, sex_join, isfin_tl, ex2_intro/ -qed. - -(* Basic_2A1: llpx_sn_flat *) -theorem rex_flat: ∀R,I,L1,L2,V,T. - L1 ⪤[R, V] L2 → L1 ⪤[R, T] L2 → - L1 ⪤[R, ⓕ{I}V.T] L2. -#R #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 elim (sor_isfin_ex f1 f2) -/3 width=7 by frees_fwd_isfin, frees_flat, sex_join, ex2_intro/ -qed. - -theorem rex_bind_void: ∀R,p,I,L1,L2,V,T. - L1 ⪤[R, V] L2 → L1.ⓧ ⪤[R, T] L2.ⓧ → - L1 ⪤[R, ⓑ{p,I}V.T] L2. -#R #p #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 -lapply (sex_fwd_bind … Hf2) -Hf2 #Hf2 elim (sor_isfin_ex f1 (⫱f2)) -/3 width=7 by frees_fwd_isfin, frees_bind_void, sex_join, isfin_tl, ex2_intro/ -qed. - -(* Negated inversion lemmas *************************************************) - -(* Basic_2A1: uses: nllpx_sn_inv_bind nllpx_sn_inv_bind_O *) -lemma rnex_inv_bind: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → - ∀p,I,L1,L2,V,T. (L1 ⪤[R, ⓑ{p,I}V.T] L2 → ⊥) → - (L1 ⪤[R, V] L2 → ⊥) ∨ (L1.ⓑ{I}V ⪤[R, T] L2.ⓑ{I}V → ⊥). -#R #HR #p #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V) -/4 width=2 by rex_bind, or_intror, or_introl/ -qed-. - -(* Basic_2A1: uses: nllpx_sn_inv_flat *) -lemma rnex_inv_flat: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → - ∀I,L1,L2,V,T. (L1 ⪤[R, ⓕ{I}V.T] L2 → ⊥) → - (L1 ⪤[R, V] L2 → ⊥) ∨ (L1 ⪤[R, T] L2 → ⊥). -#R #HR #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V) -/4 width=1 by rex_flat, or_intror, or_introl/ -qed-. - -lemma rnex_inv_bind_void: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → - ∀p,I,L1,L2,V,T. (L1 ⪤[R, ⓑ{p,I}V.T] L2 → ⊥) → - (L1 ⪤[R, V] L2 → ⊥) ∨ (L1.ⓧ ⪤[R, T] L2.ⓧ → ⊥). -#R #HR #p #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V) -/4 width=2 by rex_bind_void, or_intror, or_introl/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/aarity.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/aarity.ma deleted file mode 100644 index 4db5d3115..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/aarity.ma +++ /dev/null @@ -1,74 +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 *) -(* *) -(**************************************************************************) - -(* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES - * Initial invocation: - Patience on me to gain peace and perfection! - - *) - -include "ground_2/lib/relations.ma". -include "basic_2/notation/constructors/item0_0.ma". -include "basic_2/notation/constructors/snitem2_2.ma". - -(* ATOMIC ARITY *************************************************************) - -inductive aarity: Type[0] ≝ - | AAtom: aarity (* atomic aarity construction *) - | APair: aarity → aarity → aarity (* binary aarity construction *) -. - -interpretation "atomic arity construction (atomic)" - 'Item0 = AAtom. - -interpretation "atomic arity construction (binary)" - 'SnItem2 A1 A2 = (APair A1 A2). - -(* Basic inversion lemmas ***************************************************) - -fact destruct_apair_apair_aux: ∀A1,A2,B1,B2. ②B1.A1 = ②B2.A2 → B1 = B2 ∧ A1 = A2. -#A1 #A2 #B1 #B2 #H destruct /2 width=1 by conj/ -qed-. - -lemma discr_apair_xy_x: ∀A,B. ②B.A = B → ⊥. -#A #B elim B -B -[ #H destruct -| #Y #X #IHY #_ #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) -] -qed-. - -(* Basic_2A1: was: discr_tpair_xy_y *) -lemma discr_apair_xy_y: ∀B,A. ②B. A = A → ⊥. -#B #A elim A -A -[ #H destruct -| #Y #X #_ #IHX #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) -] -qed-. - -(* Basic properties *********************************************************) - -lemma eq_aarity_dec: ∀A1,A2:aarity. Decidable (A1 = A2). -#A1 elim A1 -A1 -[ #A2 elim A2 -A2 /2 width=1 by or_introl/ - #B2 #A2 #_ #_ @or_intror #H destruct -| #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2 - [ -IHB1 -IHA1 @or_intror #H destruct - | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1 - [ #H destruct elim (IHA1 A2) -IHA1 - [ #H destruct /2 width=1 by or_introl/ - | #HA12 @or_intror #H destruct /2 width=1 by/ - ] - | -IHA1 #HB12 @or_intror #H destruct /2 width=1 by/ - ] - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/append.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/append.ma deleted file mode 100644 index b3a07339b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/append.ma +++ /dev/null @@ -1,100 +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/functions/snitem_2.ma". -include "basic_2/notation/functions/snbind1_2.ma". -include "basic_2/notation/functions/snbind2_3.ma". -include "basic_2/notation/functions/snvoid_1.ma". -include "basic_2/notation/functions/snabbr_2.ma". -include "basic_2/notation/functions/snabst_2.ma". -include "basic_2/syntax/lenv.ma". - -(* APPEND FOR LOCAL ENVIRONMENTS ********************************************) - -rec definition append L K on K ≝ match K with -[ LAtom ⇒ L -| LBind K I ⇒ (append L K).ⓘ{I} -]. - -interpretation "append (local environment)" 'plus L1 L2 = (append L1 L2). - -interpretation "local environment tail binding construction (generic)" - 'SnItem I L = (append (LBind LAtom I) L). - -interpretation "local environment tail binding construction (unary)" - 'SnBind1 I L = (append (LBind LAtom (BUnit I)) L). - -interpretation "local environment tail binding construction (binary)" - 'SnBind2 I T L = (append (LBind LAtom (BPair I T)) L). - -interpretation "tail exclusion (local environment)" - 'SnVoid L = (append (LBind LAtom (BUnit Void)) L). - -interpretation "tail abbreviation (local environment)" - 'SnAbbr T L = (append (LBind LAtom (BPair Abbr T)) L). - -interpretation "tail abstraction (local environment)" - 'SnAbst L T = (append (LBind LAtom (BPair Abst T)) L). - -definition d_appendable_sn: predicate (lenv→relation term) ≝ λR. - ∀K,T1,T2. R K T1 T2 → ∀L. R (L+K) T1 T2. - -(* Basic properties *********************************************************) - -lemma append_atom: ∀L. (L + ⋆) = L. (**) (* () should be redundant *) -// qed. - -(* Basic_2A1: uses: append_pair *) -lemma append_bind: ∀I,L,K. L+(K.ⓘ{I}) = (L+K).ⓘ{I}. -// qed. - -lemma append_atom_sn: ∀L. ⋆ + L = L. -#L elim L -L // -#L #I >append_bind // -qed. - -lemma append_assoc: associative … append. -#L1 #L2 #L3 elim L3 -L3 // -qed. - -lemma append_shift: ∀L,K,I. L+(ⓘ{I}.K) = (L.ⓘ{I})+K. -#L #K #I append_bind #H destruct -qed-. - -lemma append_inv_bind3_sn: ∀I0,L,L0,K. L0.ⓘ{I0} = L + K → - ∨∨ ∧∧ L0.ⓘ{I0} = L & ⋆ = K - | ∃∃K0. K = K0.ⓘ{I0} & L0 = L + K0. -#I0 #L #L0 * /3 width=1 by or_introl, conj/ -#K #I >append_bind #H destruct /3 width=3 by ex2_intro, or_intror/ -qed-. - -lemma append_inj_sn: ∀K,L1,L2. L1+K = L2+K → L1 = L2. -#K elim K -K // -#K #I #IH #L1 #L2 >append_bind #H -elim (destruct_lbind_lbind_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) -qed-. - -(* Basic_1: uses: chead_ctail *) -(* Basic_2A1: uses: lpair_ltail *) -lemma lenv_case_tail: ∀L. L = ⋆ ∨ ∃∃K,I. L = ⓘ{I}.K. -#L elim L -L /2 width=1 by or_introl/ -#L #I * [2: * ] /3 width=3 by ex1_2_intro, or_intror/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/append_length.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/append_length.ma deleted file mode 100644 index e7c79ebee..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/append_length.ma +++ /dev/null @@ -1,112 +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/syntax/lenv_length.ma". -include "basic_2/syntax/append.ma". - -(* APPEND FOR LOCAL ENVIRONMENTS ********************************************) - -(* Properties with length for local environments ****************************) - -lemma append_length: ∀L1,L2. |L1 + L2| = |L1| + |L2|. -#L1 #L2 elim L2 -L2 // -#L2 #I >append_bind >length_bind >length_bind // -qed. - -lemma ltail_length: ∀I,L. |ⓘ{I}.L| = ↑|L|. -#I #L >append_length // -qed. - -(* Advanced inversion lemmas on length for local environments ***************) - -(* Basic_2A1: was: length_inv_pos_dx_ltail *) -lemma length_inv_succ_dx_ltail: ∀L,n. |L| = ↑n → - ∃∃I,K. |K| = n & L = ⓘ{I}.K. -#Y #n #H elim (length_inv_succ_dx … H) -H #I #L #Hn #HLK destruct -elim (lenv_case_tail … L) [2: * #K #J ] -#H destruct /2 width=4 by ex2_2_intro/ -qed-. - -(* Basic_2A1: was: length_inv_pos_sn_ltail *) -lemma length_inv_succ_sn_ltail: ∀L,n. ↑n = |L| → - ∃∃I,K. n = |K| & L = ⓘ{I}.K. -#Y #n #H elim (length_inv_succ_sn … H) -H #I #L #Hn #HLK destruct -elim (lenv_case_tail … L) [2: * #K #J ] -#H destruct /2 width=4 by ex2_2_intro/ -qed-. - -(* Inversion lemmas with length for local environments **********************) - -(* Basic_2A1: was: append_inj_sn *) -lemma append_inj_length_sn: ∀K1,K2,L1,L2. L1 + K1 = L2 + K2 → |K1| = |K2| → - L1 = L2 ∧ K1 = K2. -#K1 elim K1 -K1 -[ * /2 width=1 by conj/ - #K2 #I2 #L1 #L2 #_ >length_atom >length_bind - #H destruct -| #K1 #I1 #IH * - [ #L1 #L2 #_ >length_atom >length_bind - #H destruct - | #K2 #I2 #L1 #L2 #H1 >length_bind >length_bind #H2 - elim (destruct_lbind_lbind_aux … H1) -H1 #H1 #H3 destruct (**) (* destruct lemma needed *) - elim (IH … H1) -IH -H1 /3 width=4 by conj/ - ] -] -qed-. - -(* Note: lemma 750 *) -(* Basic_2A1: was: append_inj_dx *) -lemma append_inj_length_dx: ∀K1,K2,L1,L2. L1 + K1 = L2 + K2 → |L1| = |L2| → - L1 = L2 ∧ K1 = K2. -#K1 elim K1 -K1 -[ * /2 width=1 by conj/ - #K2 #I2 #L1 #L2 >append_atom >append_bind #H destruct - >length_bind >append_length >plus_n_Sm - #H elim (plus_xSy_x_false … H) -| #K1 #I1 #IH * - [ #L1 #L2 >append_bind >append_atom #H destruct - >length_bind >append_length >plus_n_Sm #H - lapply (discr_plus_x_xy … H) -H #H destruct - | #K2 #I2 #L1 #L2 >append_bind >append_bind #H1 #H2 - elim (destruct_lbind_lbind_aux … H1) -H1 #H1 #H3 destruct (**) (* destruct lemma needed *) - elim (IH … H1) -IH -H1 /2 width=1 by conj/ - ] -] -qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma append_inj_dx: ∀L,K1,K2. L+K1 = L+K2 → K1 = K2. -#L #K1 #K2 #H elim (append_inj_length_dx … H) -H // -qed-. - -lemma append_inv_refl_dx: ∀L,K. L+K = L → K = ⋆. -#L #K #H elim (append_inj_dx … (⋆) … H) // -qed-. - -lemma append_inv_pair_dx: ∀I,L,K,V. L+K = L.ⓑ{I}V → K = ⋆.ⓑ{I}V. -#I #L #K #V #H elim (append_inj_dx … (⋆.ⓑ{I}V) … H) // -qed-. - -(* Basic eliminators ********************************************************) - -(* Basic_1: was: c_tail_ind *) -(* Basic_2A1: was: lenv_ind_alt *) -lemma lenv_ind_tail: ∀Q:predicate lenv. - Q (⋆) → (∀I,L. Q L → Q (ⓘ{I}.L)) → ∀L. Q L. -#Q #IH1 #IH2 #L @(f_ind … length … L) -L #x #IHx * // -#L #I -IH1 #H destruct -elim (lenv_case_tail … L) [2: * #K #J ] -#H destruct /3 width=1 by/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/bind.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/bind.ma deleted file mode 100644 index 487722c44..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/bind.ma +++ /dev/null @@ -1,34 +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/syntax/term.ma". - -(* BINDERS FOR LOCAL ENVIRONMENTS ******************************************) - -inductive bind: Type[0] ≝ -| BUnit: bind1 → bind -| BPair: bind2 → term → bind -. - -(* Basic properties ********************************************************) - -lemma eq_bind_dec: ∀I1,I2:bind. Decidable (I1 = I2). -* #I1 [2: #V1 ] * #I2 [2,4: #V2 ] -[1: elim (eq_bind2_dec I1 I2) #HI - [ elim (eq_term_dec V1 V2) #HV ] -|4: elim (eq_bind1_dec I1 I2) #HI -] -/2 width=1 by or_introl/ -@or_intror #H destruct /2 width=1 by/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/bind_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/bind_weight.ma deleted file mode 100644 index 85277a353..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/bind_weight.ma +++ /dev/null @@ -1,31 +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/syntax/term_weight.ma". -include "basic_2/syntax/bind.ma". - -(* WEIGHT OF A BINDER FOR LOCAL ENVIRONMENTS *******************************) - -rec definition bw I ≝ match I with -[ BUnit _ ⇒ 1 -| BPair _ V ⇒ ♯{V} -]. - -interpretation "weight (binder for local environments)" 'Weight I = (bw I). - -(* Basic properties *********************************************************) - -lemma bw_pos: ∀I. 1 ≤ ♯{I}. -* // -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/ceq_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/ceq_ext.ma deleted file mode 100644 index f89840135..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/ceq_ext.ma +++ /dev/null @@ -1,31 +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/syntax/cext2.ma". - -(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************) - -definition ceq_ext: lenv → relation bind ≝ - cext2 ceq. - -(* Basic properties *********************************************************) - -lemma ceq_ext_refl (L): reflexive … (ceq_ext L). -/2 width=1 by ext2_refl/ qed. - -(* Basic inversion lemmas ***************************************************) - -lemma ceq_ext_inv_eq: ∀L,I1,I2. ceq_ext L I1 I2 → I1 = I2. -#L #I1 #I2 * -I1 -I2 // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/ceq_ext_ceq_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/ceq_ext_ceq_ext.ma deleted file mode 100644 index 2ab3768a0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/ceq_ext_ceq_ext.ma +++ /dev/null @@ -1,25 +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/syntax/ceq_ext.ma". - -(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************) - -(* Main properties **********************************************************) - -theorem ceq_ext_trans: ∀L1,I1,I. ceq_ext L1 I1 I → - ∀L2,I2. ceq_ext L2 I I2 → ∀L3. ceq_ext L3 I1 I2. -#L1 #I1 #I * -I1 -I // -#I1 #V1 #V #HV1 #L2 #Z #H elim (ext2_inv_pair_sn … H) -H // -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/cext2.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/cext2.ma deleted file mode 100644 index 6595ba704..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/cext2.ma +++ /dev/null @@ -1,33 +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/syntax/ext2.ma". -include "basic_2/syntax/lenv.ma". - -(* EXTENSION TO BINDERS OF A CONTEXT-SENSITIVE RELATION FOR TERMS ***********) - -definition cext2: (lenv → relation term) → lenv → relation bind ≝ - λR,L. ext2 (R L). - -(* Basic properties *********************************************************) - -lemma cext2_sym: ∀R. (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) → - ∀L1,L2,I1,I2. cext2 R L1 I1 I2 → cext2 R L2 I2 I1. -#R #HR #L1 #L2 #I1 #I2 * /3 width=2 by ext2_pair/ -qed-. - -lemma cext2_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → - ∀L,I1,I2. cext2 R1 L I1 I2 → cext2 R2 L I1 I2. -#R1 #R2 #HR #L #I1 #I2 * /3 width=2 by ext2_unit, ext2_pair/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/cl_restricted_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/cl_restricted_weight.ma deleted file mode 100644 index 5af875355..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/cl_restricted_weight.ma +++ /dev/null @@ -1,55 +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/functions/weight_2.ma". -include "basic_2/syntax/lenv_weight.ma". - -(* WEIGHT OF A RESTRICTED CLOSURE *******************************************) - -definition rfw: lenv → term → ? ≝ λL,T. ♯{L} + ♯{T}. - -interpretation "weight (restricted closure)" 'Weight L T = (rfw L T). - -(* Basic properties *********************************************************) - -(* Basic_1: was: flt_shift *) -lemma rfw_shift: ∀p,I,K,V,T. ♯{K.ⓑ{I}V, T} < ♯{K, ⓑ{p,I}V.T}. -normalize /2 width=1 by monotonic_le_plus_r/ -qed. - -lemma rfw_clear: ∀p,I1,I2,K,V,T. ♯{K.ⓤ{I1}, T} < ♯{K, ⓑ{p,I2}V.T}. -normalize /4 width=1 by monotonic_le_plus_r, le_S_S/ -qed. - -lemma rfw_tpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L, ②{I}V.T}. -normalize in ⊢ (?→?→?→?→?%%); // -qed. - -lemma rfw_tpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L, ②{I}V.T}. -normalize in ⊢ (?→?→?→?→?%%); // -qed. - -lemma rfw_lpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L.ⓑ{I}V, T}. -normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ -qed. - -lemma rfw_lpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L.ⓑ{I}V, T}. -normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ -qed. - -(* Basic_1: removed theorems 7: - flt_thead_sx flt_thead_dx flt_trans - flt_arith0 flt_arith1 flt_arith2 flt_wf_ind -*) -(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/cl_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/cl_weight.ma deleted file mode 100644 index c4226cd83..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/cl_weight.ma +++ /dev/null @@ -1,53 +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/functions/weight_3.ma". -include "basic_2/syntax/lenv_weight.ma". -include "basic_2/syntax/genv.ma". - -(* WEIGHT OF A CLOSURE ******************************************************) - -(* activate genv *) -definition fw: genv → lenv → term → ? ≝ λG,L,T. ♯{L} + ♯{T}. - -interpretation "weight (closure)" 'Weight G L T = (fw G L T). - -(* Basic properties *********************************************************) - -(* Basic_1: was: flt_shift *) -lemma fw_shift: ∀p,I,G,K,V,T. ♯{G, K.ⓑ{I}V, T} < ♯{G, K, ⓑ{p,I}V.T}. -normalize /2 width=1 by monotonic_le_plus_r/ -qed. - -lemma fw_clear: ∀p,I1,I2,G,K,V,T. ♯{G, K.ⓤ{I1}, T} < ♯{G, K, ⓑ{p,I2}V.T}. -normalize /4 width=1 by monotonic_le_plus_r, le_S_S/ -qed. - -lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L, ②{I}V.T}. -normalize in ⊢ (?→?→?→?→?→?%%); // -qed. - -lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G, L, T} < ♯{G, L, ②{I}V.T}. -normalize in ⊢ (?→?→?→?→?→?%%); // -qed. - -lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L.ⓑ{I}V, T}. -normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ -qed. - -(* Basic_1: removed theorems 7: - flt_thead_sx flt_thead_dx flt_trans - flt_arith0 flt_arith1 flt_arith2 flt_wf_ind -*) -(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2.ma deleted file mode 100644 index a7d8d7f20..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2.ma +++ /dev/null @@ -1,102 +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/syntax/bind.ma". - -(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************) - -inductive ext2 (R:relation term): relation bind ≝ -| ext2_unit: ∀I. ext2 R (BUnit I) (BUnit I) -| ext2_pair: ∀I,V1,V2. R V1 V2 → ext2 R (BPair I V1) (BPair I V2) -. - -(* Basic_inversion lemmas **************************************************) - -fact ext2_inv_unit_sn_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → - ∀I. Z1 = BUnit I → Z2 = BUnit I. -#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #_ ] -#J #H destruct // -qed-. - -lemma ext2_inv_unit_sn: ∀R,I,Z2. ext2 R (BUnit I) Z2 → Z2 = BUnit I. -/2 width=4 by ext2_inv_unit_sn_aux/ qed-. - -fact ext2_inv_pair_sn_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → - ∀I,V1. Z1 = BPair I V1 → - ∃∃V2. R V1 V2 & Z2 = BPair I V2. -#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #HV12 ] -#J #W1 #H destruct /2 width=3 by ex2_intro/ -qed-. - -lemma ext2_inv_pair_sn: ∀R,Z2,I,V1. ext2 R (BPair I V1) Z2 → - ∃∃V2. R V1 V2 & Z2 = BPair I V2. -/2 width=3 by ext2_inv_pair_sn_aux/ qed-. - -fact ext2_inv_unit_dx_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → - ∀I. Z2 = BUnit I → Z1 = BUnit I. -#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #_ ] -#J #H destruct // -qed-. - -lemma ext2_inv_unit_dx: ∀R,I,Z1. ext2 R Z1 (BUnit I) → Z1 = BUnit I. -/2 width=4 by ext2_inv_unit_dx_aux/ qed-. - -fact ext2_inv_pair_dx_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → - ∀I,V2. Z2 = BPair I V2 → - ∃∃V1. R V1 V2 & Z1 = BPair I V1. -#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #HV12 ] -#J #W2 #H destruct /2 width=3 by ex2_intro/ -qed-. - -lemma ext2_inv_pair_dx: ∀R,Z1,I,V2. ext2 R Z1 (BPair I V2) → - ∃∃V1. R V1 V2 & Z1 = BPair I V1. -/2 width=3 by ext2_inv_pair_dx_aux/ qed-. - -(* Advanced inversion lemmas ***********************************************) - -lemma ext2_inv_unit: ∀R,I1,I2. ext2 R (BUnit I1) (BUnit I2) → I1 = I2. -#R #I1 #I2 #H lapply (ext2_inv_unit_sn … H) -H -#H destruct // -qed-. - -lemma ext2_inv_pair: ∀R,I1,I2,V1,V2. ext2 R (BPair I1 V1) (BPair I2 V2) → - I1 = I2 ∧ R V1 V2. -#R #I1 #I2 #V1 #V2 #H elim (ext2_inv_pair_sn … H) -H -#V #HV #H destruct /2 width=1 by conj/ -qed-. - -(* Basic properties ********************************************************) - -lemma ext2_refl: ∀R. reflexive … R → reflexive … (ext2 R). -#R #HR * /2 width=1 by ext2_pair/ -qed. - -lemma ext2_sym: ∀R. symmetric … R → symmetric … (ext2 R). -#R #HR #T1 #T2 * /3 width=1 by ext2_unit, ext2_pair/ -qed-. - -lemma ext2_dec: ∀R. (∀T1,T2. Decidable (R T1 T2)) → - ∀I1,I2. Decidable (ext2 R I1 I2). -#R #HR * #I1 [2: #T1 ] * #I2 [2,4: #T2 ] -[ elim (eq_bind2_dec I1 I2) #HI12 destruct - [ elim (HR T1 T2) -HR #HT12 /3 width=1 by ext2_pair, or_introl/ ] - @or_intror #H elim (ext2_inv_pair … H) -H /2 width=1 by/ -| @or_intror #H lapply (ext2_inv_unit_sn … H) -H - #H destruct -| @or_intror #H lapply (ext2_inv_unit_dx … H) -H - #H destruct -| elim (eq_bind1_dec I1 I2) #HI12 destruct - /4 width=2 by ext2_inv_unit, ext2_unit, or_intror, or_introl/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2_ext2.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2_ext2.ma deleted file mode 100644 index 9abbbc0ba..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2_ext2.ma +++ /dev/null @@ -1,27 +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/syntax/ext2.ma". - -(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************) - -(* Main properties **********************************************************) - -theorem ext2_trans: ∀R. Transitive … R → Transitive … (ext2 R). -#R #HR #I1 #I #H elim H -I1 -I -[ #I1 #J #H >(ext2_inv_unit_sn … H) -J /2 width=1 by ext2_unit/ -| #I1 #V1 #V #HV1 #J #H elim (ext2_inv_pair_sn … H) -H - #V2 #HV2 #H destruct /3 width=3 by ext2_pair/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2_tc.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2_tc.ma deleted file mode 100644 index 1fc4bd4bf..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/ext2_tc.ma +++ /dev/null @@ -1,57 +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 "ground_2/lib/star.ma". -include "basic_2/syntax/ext2.ma". - -(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************) - -(* Properties with transitive closure ***************************************) - -lemma ext2_tc_pair: ∀R,I,V1,V2. TC … R V1 V2 → - TC … (ext2 R) (BPair I V1) (BPair I V2). -#R #I #V1 #V2 #H elim H -H -V2 -/3 width=3 by ext2_pair, step, inj/ -qed. - -lemma ext2_tc_inj: ∀R,I1,I2. ext2 R I1 I2 → ext2 (TC … R) I1 I2. -#R #I1 #I2 * -I1 -I2 -/3 width=1 by ext2_unit, ext2_pair, inj/ -qed. - -(* Main properties with transitive closure **********************************) - -theorem ext2_tc_step: ∀R,I1,I. ext2 (TC … R) I1 I → - ∀I2. ext2 R I I2 → ext2 (TC … R) I1 I2. -#R #I1 #I * -I1 -I -[ #I #Z #H >(ext2_inv_unit_sn … H) -Z /2 width=1 by ext2_unit/ -| #I #V1 #V #HV1 #Z #H - elim (ext2_inv_pair_sn … H) -H #V2 #HV2 #H destruct - /3 width=3 by ext2_pair, step/ -] -qed-. - -(* Advanced properties with transitive closure ******************************) - -lemma ext2_tc: ∀R,I1,I2. TC … (ext2 R) I1 I2 → ext2 (TC … R) I1 I2. -#R #I1 #I2 #H elim H -I2 -/2 width=3 by ext2_tc_step, ext2_tc_inj/ -qed. - -(* Advanced inversion lemmas with transitive closure ************************) - -lemma ext2_inv_tc: ∀R,I1,I2. ext2 (TC … R) I1 I2 → TC … (ext2 R) I1 I2. -#R #I1 #I2 * -I1 -I2 -/3 width=1 by ext2_tc_pair, ext2_unit, inj/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma deleted file mode 100644 index 3e899a829..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma +++ /dev/null @@ -1,52 +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/constructors/star_0.ma". -include "basic_2/notation/constructors/dxbind2_3.ma". -include "basic_2/notation/constructors/dxabbr_2.ma". -include "basic_2/notation/constructors/dxabst_2.ma". -include "basic_2/syntax/term.ma". - -(* GLOBAL ENVIRONMENTS ******************************************************) - -(* global environments *) -inductive genv: Type[0] ≝ -| GAtom: genv (* empty *) -| GPair: genv → bind2 → term → genv (* binary binding construction *) -. - -interpretation "sort (global environment)" - 'Star = (GAtom). - -interpretation "global environment binding construction (binary)" - 'DxBind2 G I T = (GPair G I T). - -interpretation "abbreviation (global environment)" - 'DxAbbr G T = (GPair G Abbr T). - -interpretation "abstraction (global environment)" - 'DxAbst G T = (GPair G Abst T). - -(* Basic properties *********************************************************) - -lemma eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2). -#G1 elim G1 -G1 [| #G1 #I1 #T1 #IHG1 ] * [2,4: #G2 #I2 #T2 ] -[3: /2 width=1 by or_introl/ -|2: elim (eq_bind2_dec I1 I2) #HI - [ elim (IHG1 G2) -IHG1 #HG - [ elim (eq_term_dec T1 T2) #HT /2 width=1 by or_introl/ ] - ] -] -@or_intror #H destruct /2 width=1 by/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv_length.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/genv_length.ma deleted file mode 100644 index bda7b391e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv_length.ma +++ /dev/null @@ -1,25 +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/syntax/genv.ma". - -(* LENGTH OF A GLOBAL ENVIRONMENT *******************************************) - -rec definition glength G on G ≝ match G with -[ GAtom ⇒ 0 -| GPair G _ _ ⇒ ↑(glength G) -]. - -interpretation "length (global environment)" - 'card G = (glength G). diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/genv_weight.ma deleted file mode 100644 index 632fdc8e5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv_weight.ma +++ /dev/null @@ -1,30 +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/syntax/term_weight.ma". -include "basic_2/syntax/genv.ma". - -(* WEIGHT OF A GLOBAL ENVIRONMENT *******************************************) - -rec definition gw G ≝ match G with -[ GAtom ⇒ 0 -| GPair G I T ⇒ gw G + ♯{T} -]. - -interpretation "weight (global environment)" 'Weight G = (gw G). - -(* Basic properties *********************************************************) - -lemma gw_pair: ∀I,G,T. ♯{G} < ♯{G.ⓑ{I}T}. -normalize /2 width=1 by monotonic_le_plus_r/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/item.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/item.ma deleted file mode 100644 index ba8357260..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/item.ma +++ /dev/null @@ -1,97 +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 "ground_2/lib/bool.ma". -include "ground_2/lib/arith.ma". - -(* ITEMS ********************************************************************) - -(* atomic items *) -inductive item0: Type[0] ≝ - | Sort: nat → item0 (* sort: starting at 0 *) - | LRef: nat → item0 (* reference by index: starting at 0 *) - | GRef: nat → item0 (* reference by position: starting at 0 *) -. - -(* unary binding items *) -inductive bind1: Type[0] ≝ - | Void: bind1 (* exclusion *) -. - -(* binary binding items *) -inductive bind2: Type[0] ≝ - | Abbr: bind2 (* abbreviation *) - | Abst: bind2 (* abstraction *) -. - -(* binary non-binding items *) -inductive flat2: Type[0] ≝ - | Appl: flat2 (* application *) - | Cast: flat2 (* explicit type annotation *) -. - -(* binary items *) -inductive item2: Type[0] ≝ - | Bind2: bool → bind2 → item2 (* polarized binding item *) - | Flat2: flat2 → item2 (* non-binding item *) -. - -(* Basic inversion lemmas ***************************************************) - -fact destruct_sort_sort_aux: ∀s1,s2. Sort s1 = Sort s2 → s1 = s2. -#s1 #s2 #H destruct // -qed-. - -(* Basic properties *********************************************************) - -lemma eq_item0_dec: ∀I1,I2:item0. Decidable (I1 = I2). -* #i1 * #i2 [2,3,4,6,7,8: @or_intror #H destruct ] -[2: elim (eq_nat_dec i1 i2) |1,3: elim (eq_nat_dec i1 i2) ] /2 width=1 by or_introl/ -#Hni12 @or_intror #H destruct /2 width=1 by/ -qed-. - -lemma eq_bind1_dec: ∀I1,I2:bind1. Decidable (I1 = I2). -* * /2 width=1 by or_introl/ -qed-. - -(* Basic_1: was: bind_dec *) -lemma eq_bind2_dec: ∀I1,I2:bind2. Decidable (I1 = I2). -* * /2 width=1 by or_introl/ -@or_intror #H destruct -qed-. - -(* Basic_1: was: flat_dec *) -lemma eq_flat2_dec: ∀I1,I2:flat2. Decidable (I1 = I2). -* * /2 width=1 by or_introl/ -@or_intror #H destruct -qed-. - -(* Basic_1: was: kind_dec *) -lemma eq_item2_dec: ∀I1,I2:item2. Decidable (I1 = I2). -* [ #p1 ] #I1 * [1,3: #p2 ] #I2 -[2,3: @or_intror #H destruct -| elim (eq_bool_dec p1 p2) #Hp - [ elim (eq_bind2_dec I1 I2) /2 width=1 by or_introl/ #HI ] - @or_intror #H destruct /2 width=1 by/ -| elim (eq_flat2_dec I1 I2) /2 width=1 by or_introl/ #HI - @or_intror #H destruct /2 width=1 by/ -] -qed-. - -(* Basic_1: removed theorems 21: - s_S s_plus s_plus_sym s_minus minus_s_s s_le s_lt s_inj s_inc - s_arith0 s_arith1 - r_S r_plus r_plus_sym r_minus r_dis s_r r_arith0 r_arith1 - not_abbr_abst bind_dec_not -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/item_sd.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/item_sd.ma deleted file mode 100644 index 15be7977f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/item_sd.ma +++ /dev/null @@ -1,124 +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/syntax/item_sh.ma". - -(* SORT DEGREE **************************************************************) - -(* sort degree specification *) -record sd (h:sh): Type[0] ≝ { - deg : relation nat; (* degree of the sort *) - deg_total: ∀s. ∃d. deg s d; (* functional relation axioms *) - deg_mono : ∀s,d1,d2. deg s d1 → deg s d2 → d1 = d2; - deg_next : ∀s,d. deg s d → deg (next h s) (↓d) (* compatibility condition *) -}. - -(* Notable specifications ***************************************************) - -definition deg_O: relation nat ≝ λs,d. d = 0. - -definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O …. -/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ defined. - -(* Basic_2A1: includes: deg_SO_pos *) -inductive deg_SO (h:sh) (s:nat) (s0:nat): predicate nat ≝ -| deg_SO_succ : ∀n. (next h)^n s0 = s → deg_SO h s s0 (↑n) -| deg_SO_zero: ((∃n. (next h)^n s0 = s) → ⊥) → deg_SO h s s0 0 -. - -fact deg_SO_inv_succ_aux: ∀h,s,s0,n0. deg_SO h s s0 n0 → ∀n. n0 = ↑n → - (next h)^n s0 = s. -#h #s #s0 #n0 * -n0 -[ #n #Hn #x #H destruct // -| #_ #x #H destruct -] -qed-. - -(* Basic_2A1: was: deg_SO_inv_pos *) -lemma deg_SO_inv_succ: ∀h,s,s0,n. deg_SO h s s0 (↑n) → (next h)^n s0 = s. -/2 width=3 by deg_SO_inv_succ_aux/ qed-. - -lemma deg_SO_refl: ∀h,s. deg_SO h s s 1. -#h #s @(deg_SO_succ … 0 ?) // -qed. - -lemma deg_SO_gt: ∀h,s1,s2. s1 < s2 → deg_SO h s1 s2 0. -#h #s1 #s2 #HK12 @deg_SO_zero * #n elim n -n normalize -[ #H destruct - elim (lt_refl_false … HK12) -| #n #_ #H - lapply (next_lt h ((next h)^n s2)) >H -H #H - lapply (transitive_lt … H HK12) -s1 #H1 - lapply (nexts_le h s2 n) #H2 - lapply (le_to_lt_to_lt … H2 H1) -h -n #H - elim (lt_refl_false … H) -] -qed. - -definition sd_SO: ∀h. nat → sd h ≝ λh,s. mk_sd h (deg_SO h s) …. -[ #s0 - lapply (nexts_dec h s0 s) * - [ * /3 width=2 by deg_SO_succ, ex_intro/ | /4 width=2 by deg_SO_zero, ex_intro/ ] -| #K0 #d1 #d2 * [ #n1 ] #H1 * [1,3: #n2 ] #H2 // - [ < H2 in H1; -H2 #H - lapply (nexts_inj … H) -H #H destruct // - | elim H1 /2 width=2 by ex_intro/ - | elim H2 /2 width=2 by ex_intro/ - ] -| #s0 #n * - [ #d #H destruct elim d -d normalize - /2 width=1 by deg_SO_gt, deg_SO_succ, next_lt/ - | #H1 @deg_SO_zero * #d #H2 destruct - @H1 -H1 @(ex_intro … (↑d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *) - ] -] -defined. - -rec definition sd_d (h:sh) (s:nat) (d:nat) on d : sd h ≝ - match d with - [ O ⇒ sd_O h - | S d ⇒ match d with - [ O ⇒ sd_SO h s - | _ ⇒ sd_d h (next h s) d - ] - ]. - -(* Basic inversion lemmas ***************************************************) - -lemma deg_inv_pred: ∀h,o,s,d. deg h o (next h s) (↑d) → deg h o s (↑↑d). -#h #o #s #d #H1 -elim (deg_total h o s) #n #H0 -lapply (deg_next … H0) #H2 -lapply (deg_mono … H1 H2) -H1 -H2 #H >H >S_pred /2 width=2 by ltn_to_ltO/ -qed-. - -lemma deg_inv_prec: ∀h,o,s,n,d. deg h o ((next h)^n s) (↑d) → deg h o s (↑(d+n)). -#h #o #s #n elim n -n normalize /3 width=1 by deg_inv_pred/ -qed-. - -(* Basic properties *********************************************************) - -lemma deg_iter: ∀h,o,s,d,n. deg h o s d → deg h o ((next h)^n s) (d-n). -#h #o #s #d #n elim n -n normalize /3 width=1 by deg_next/ -qed. - -lemma deg_next_SO: ∀h,o,s,d. deg h o s (↑d) → deg h o (next h s) d. -/2 width=1 by deg_next/ qed-. - -lemma sd_d_SS: ∀h,s,d. sd_d h s (↑↑d) = sd_d h (next h s) (↑d). -// qed. - -lemma sd_d_correct: ∀h,d,s. deg h (sd_d h s d) s d. -#h #d elim d -d // #d elim d -d /3 width=1 by deg_inv_pred/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/item_sh.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/item_sh.ma deleted file mode 100644 index 9e0b03f73..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/item_sh.ma +++ /dev/null @@ -1,44 +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 "ground_2/lib/arith.ma". - -(* SORT HIERARCHY ***********************************************************) - -(* sort hierarchy specification *) -record sh: Type[0] ≝ { - next : nat → nat; (* next sort in the hierarchy *) - next_lt: ∀s. s < next s (* strict monotonicity condition *) -}. - -definition sh_N: sh ≝ mk_sh S …. -// defined. - -(* Basic properties *********************************************************) - -lemma nexts_le: ∀h,s,n. s ≤ (next h)^n s. -#h #s #n elim n -n // normalize #n #IH -lapply (next_lt h ((next h)^n s)) #H -lapply (le_to_lt_to_lt … IH H) -IH -H /2 width=2 by lt_to_le/ -qed. - -lemma nexts_lt: ∀h,s,n. s < (next h)^(↑n) s. -#h #s #n normalize -lapply (nexts_le h s n) #H -@(le_to_lt_to_lt … H) // -qed. - -axiom nexts_dec: ∀h,s1,s2. Decidable (∃n. (next h)^n s1 = s2). - -axiom nexts_inj: ∀h,s,n1,n2. (next h)^n1 s = (next h)^n2 s → n1 = n2. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv.ma deleted file mode 100644 index 2822b5d4b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv.ma +++ /dev/null @@ -1,89 +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/constructors/star_0.ma". -include "basic_2/notation/constructors/dxitem_2.ma". -include "basic_2/notation/constructors/dxbind1_2.ma". -include "basic_2/notation/constructors/dxbind2_3.ma". -include "basic_2/notation/constructors/dxvoid_1.ma". -include "basic_2/notation/constructors/dxabbr_2.ma". -include "basic_2/notation/constructors/dxabst_2.ma". -include "basic_2/syntax/bind.ma". - -(* LOCAL ENVIRONMENTS *******************************************************) - -(* local environments *) -inductive lenv: Type[0] ≝ -| LAtom: lenv (* empty *) -| LBind: lenv → bind → lenv (* binding construction *) -. - -interpretation "sort (local environment)" - 'Star = LAtom. - -interpretation "local environment binding construction (generic)" - 'DxItem L I = (LBind L I). - -interpretation "local environment binding construction (unary)" - 'DxBind1 L I = (LBind L (BUnit I)). - -interpretation "local environment binding construction (binary)" - 'DxBind2 L I T = (LBind L (BPair I T)). - -interpretation "void (local environment)" - 'DxVoid L = (LBind L (BUnit Void)). - -interpretation "abbreviation (local environment)" - 'DxAbbr L T = (LBind L (BPair Abbr T)). - -interpretation "abstraction (local environment)" - 'DxAbst L T = (LBind L (BPair Abst T)). - -definition cfull: relation3 lenv bind bind ≝ λL,I1,I2. ⊤. - -definition ceq: relation3 lenv term term ≝ λL. eq …. - -(* Basic properties *********************************************************) - -lemma eq_lenv_dec: ∀L1,L2:lenv. Decidable (L1 = L2). -#L1 elim L1 -L1 [| #L1 #I1 #IHL1 ] * [2,4: #L2 #I2 ] -[3: /2 width=1 by or_introl/ -|2: elim (eq_bind_dec I1 I2) #HI - [ elim (IHL1 L2) -IHL1 #HL /2 width=1 by or_introl/ ] -] -@or_intror #H destruct /2 width=1 by/ -qed-. - -lemma cfull_dec: ∀L,T1,T2. Decidable (cfull L T1 T2). -/2 width=1 by or_introl/ qed-. - -(* Basic inversion lemmas ***************************************************) - -fact destruct_lbind_lbind_aux: ∀I1,I2,L1,L2. L1.ⓘ{I1} = L2.ⓘ{I2} → - L1 = L2 ∧ I1 = I2. -#I1 #I2 #L1 #L2 #H destruct /2 width=1 by conj/ -qed-. - -(* Basic_2A1: uses: discr_lpair_x_xy *) -lemma discr_lbind_x_xy: ∀I,L. L = L.ⓘ{I} → ⊥. -#I #L elim L -L -[ #H destruct -| #L #J #IHL #H elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *) - #H1 #H2 destruct /2 width=1 by/ -] -qed-. - -(* Basic_2A1: uses: discr_lpair_xy_x *) -lemma discr_lbind_xy_x: ∀I,L. L.ⓘ{I} = L → ⊥. -/2 width=4 by discr_lbind_x_xy/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv_length.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv_length.ma deleted file mode 100644 index 440c5497a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv_length.ma +++ /dev/null @@ -1,61 +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/syntax/lenv.ma". - -(* LENGTH OF A LOCAL ENVIRONMENT ********************************************) - -rec definition length L ≝ match L with -[ LAtom ⇒ 0 -| LBind L _ ⇒ ↑(length L) -]. - -interpretation "length (local environment)" 'card L = (length L). - -(* Basic properties *********************************************************) - -lemma length_atom: |⋆| = 0. -// qed. - -(* Basic_2A1: uses: length_pair *) -lemma length_bind: ∀I,L. |L.ⓘ{I}| = ↑|L|. -// qed. - -(* Basic inversion lemmas ***************************************************) - -lemma length_inv_zero_dx: ∀L. |L| = 0 → L = ⋆. -* // #L #I >length_bind -#H destruct -qed-. - -lemma length_inv_zero_sn: ∀L. 0 = |L| → L = ⋆. -/2 width=1 by length_inv_zero_dx/ qed-. - -(* Basic_2A1: was: length_inv_pos_dx *) -lemma length_inv_succ_dx: ∀n,L. |L| = ↑n → - ∃∃I,K. |K| = n & L = K. ⓘ{I}. -#n * -[ >length_atom #H destruct -| #L #I >length_bind /3 width=4 by ex2_2_intro, injective_S/ -] -qed-. - -(* Basic_2A1: was: length_inv_pos_sn *) -lemma length_inv_succ_sn: ∀n,L. ↑n = |L| → - ∃∃I,K. n = |K| & L = K. ⓘ{I}. -#n #L #H lapply (sym_eq ??? H) -H -#H elim (length_inv_succ_dx … H) -H /2 width=4 by ex2_2_intro/ -qed-. - -(* Basic_2A1: removed theorems 1: length_inj *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv_weight.ma deleted file mode 100644 index 74a388944..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/lenv_weight.ma +++ /dev/null @@ -1,35 +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/syntax/bind_weight.ma". -include "basic_2/syntax/lenv.ma". - -(* WEIGHT OF A LOCAL ENVIRONMENT ********************************************) - -rec definition lw L ≝ match L with -[ LAtom ⇒ 0 -| LBind L I ⇒ lw L + ♯{I} -]. - -interpretation "weight (local environment)" 'Weight L = (lw L). - -(* Basic properties *********************************************************) - -(* Basic_2A1: uses: lw_pair *) -lemma lw_bind: ∀I,L. ♯{L} < ♯{L.ⓘ{I}}. -normalize /2 width=1 by monotonic_le_plus_r/ qed. - -(* Basic_1: removed theorems 4: clt_cong clt_head clt_thead clt_wf_ind *) -(* Basic_1: removed local theorems 1: clt_wf__q_ind *) -(* Basic_1: note: clt_thead should be renamed clt_ctail *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq.ma deleted file mode 100644 index 9dd335a05..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq.ma +++ /dev/null @@ -1,176 +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/voidstareq_4.ma". -include "basic_2/syntax/lenv.ma". - -(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************) - -inductive lveq: bi_relation nat lenv ≝ -| lveq_atom : lveq 0 (⋆) 0 (⋆) -| lveq_bind : ∀I1,I2,K1,K2. lveq 0 K1 0 K2 → - lveq 0 (K1.ⓘ{I1}) 0 (K2.ⓘ{I2}) -| lveq_void_sn: ∀K1,K2,n1. lveq n1 K1 0 K2 → - lveq (↑n1) (K1.ⓧ) 0 K2 -| lveq_void_dx: ∀K1,K2,n2. lveq 0 K1 n2 K2 → - lveq 0 K1 (↑n2) (K2.ⓧ) -. - -interpretation "equivalence up to exclusion binders (local environment)" - 'VoidStarEq L1 n1 n2 L2 = (lveq n1 L1 n2 L2). - -(* Basic properties *********************************************************) - -lemma lveq_refl: ∀L. L ≋ⓧ*[0, 0] L. -#L elim L -L /2 width=1 by lveq_atom, lveq_bind/ -qed. - -lemma lveq_sym: bi_symmetric … lveq. -#n1 #n2 #L1 #L2 #H elim H -L1 -L2 -n1 -n2 -/2 width=1 by lveq_atom, lveq_bind, lveq_void_sn, lveq_void_dx/ -qed-. - -(* Basic inversion lemmas ***************************************************) - -fact lveq_inv_zero_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - 0 = n1 → 0 = n2 → - ∨∨ ∧∧ ⋆ = L1 & ⋆ = L2 - | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0, 0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2. -#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2 -[1: /3 width=1 by or_introl, conj/ -|2: /3 width=7 by ex3_4_intro, or_intror/ -|*: #K1 #K2 #n #_ #H1 #H2 destruct -] -qed-. - -lemma lveq_inv_zero: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 → - ∨∨ ∧∧ ⋆ = L1 & ⋆ = L2 - | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0, 0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2. -/2 width=5 by lveq_inv_zero_aux/ qed-. - -fact lveq_inv_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - ∀m1. ↑m1 = n1 → - ∃∃K1. K1 ≋ⓧ*[m1, 0] L2 & K1.ⓧ = L1 & 0 = n2. -#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2 -[1: #m #H destruct -|2: #I1 #I2 #K1 #K2 #_ #m #H destruct -|*: #K1 #K2 #n #HK #m #H destruct /2 width=3 by ex3_intro/ -] -qed-. - -lemma lveq_inv_succ_sn: ∀L1,K2,n1,n2. L1 ≋ⓧ*[↑n1, n2] K2 → - ∃∃K1. K1 ≋ⓧ*[n1, 0] K2 & K1.ⓧ = L1 & 0 = n2. -/2 width=3 by lveq_inv_succ_sn_aux/ qed-. - -lemma lveq_inv_succ_dx: ∀K1,L2,n1,n2. K1 ≋ⓧ*[n1, ↑n2] L2 → - ∃∃K2. K1 ≋ⓧ*[0, n2] K2 & K2.ⓧ = L2 & 0 = n1. -#K1 #L2 #n1 #n2 #H -lapply (lveq_sym … H) -H #H -elim (lveq_inv_succ_sn … H) -H /3 width=3 by lveq_sym, ex3_intro/ -qed-. - -fact lveq_inv_succ_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - ∀m1,m2. ↑m1 = n1 → ↑m2 = n2 → ⊥. -#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2 -[1: #m1 #m2 #H1 #H2 destruct -|2: #I1 #I2 #K1 #K2 #_ #m1 #m2 #H1 #H2 destruct -|*: #K1 #K2 #n #_ #m1 #m2 #H1 #H2 destruct -] -qed-. - -lemma lveq_inv_succ: ∀L1,L2,n1,n2. L1 ≋ⓧ*[↑n1, ↑n2] L2 → ⊥. -/2 width=9 by lveq_inv_succ_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma lveq_inv_bind: ∀I1,I2,K1,K2. K1.ⓘ{I1} ≋ⓧ*[0, 0] K2.ⓘ{I2} → K1 ≋ⓧ*[0, 0] K2. -#I1 #I2 #K1 #K2 #H -elim (lveq_inv_zero … H) -H * [| #Z1 #Z2 #Y1 #Y2 #HY ] #H1 #H2 destruct // -qed-. - -lemma lveq_inv_atom_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1, n2] ⋆ → ∧∧ 0 = n1 & 0 = n2. -* [2: #n1 ] * [2,4: #n2 ] #H -[ elim (lveq_inv_succ … H) -| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct -| elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct -| /2 width=1 by conj/ -] -qed-. - -lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1, n2] ⋆ → - ∃∃m1. K1 ≋ⓧ*[m1, 0] ⋆ & BUnit Void = I1 & ↑m1 = n1 & 0 = n2. -#I1 #K1 * [2: #n1 ] * [2,4: #n2 ] #H -[ elim (lveq_inv_succ … H) -| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct -| elim (lveq_inv_succ_sn … H) -H #Y #HY #H1 #H2 destruct /2 width=3 by ex4_intro/ -| elim (lveq_inv_zero … H) -H * - [ #H1 #H2 destruct - | #Z1 #Z2 #Y1 #Y2 #_ #H1 #H2 destruct - ] -] -qed-. - -lemma lveq_inv_atom_bind: ∀I2,K2,n1,n2. ⋆ ≋ⓧ*[n1, n2] K2.ⓘ{I2} → - ∃∃m2. ⋆ ≋ⓧ*[0, m2] K2 & BUnit Void = I2 & 0 = n1 & ↑m2 = n2. -#I2 #K2 #n1 #n2 #H -lapply (lveq_sym … H) -H #H -elim (lveq_inv_bind_atom … H) -H -/3 width=3 by lveq_sym, ex4_intro/ -qed-. - -lemma lveq_inv_pair_pair: ∀I1,I2,K1,K2,V1,V2,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] K2.ⓑ{I2}V2 → - ∧∧ K1 ≋ⓧ*[0, 0] K2 & 0 = n1 & 0 = n2. -#I1 #I2 #K1 #K2 #V1 #V2 * [2: #n1 ] * [2,4: #n2 ] #H -[ elim (lveq_inv_succ … H) -| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct -| elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct -| elim (lveq_inv_zero … H) -H * - [ #H1 #H2 destruct - | #Z1 #Z2 #Y1 #Y2 #HY #H1 #H2 destruct /3 width=1 by and3_intro/ - ] -] -qed-. - -lemma lveq_inv_void_succ_sn: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[↑n1, n2] L2 → - ∧∧ L1 ≋ ⓧ*[n1, 0] L2 & 0 = n2. -#L1 #L2 #n1 #n2 #H -elim (lveq_inv_succ_sn … H) -H #Y #HY #H1 #H2 destruct /2 width=1 by conj/ -qed-. - -lemma lveq_inv_void_succ_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, ↑n2] L2.ⓧ → - ∧∧ L1 ≋ ⓧ*[0, n2] L2 & 0 = n1. -#L1 #L2 #n1 #n2 #H -lapply (lveq_sym … H) -H #H -elim (lveq_inv_void_succ_sn … H) -H -/3 width=1 by lveq_sym, conj/ -qed-. - -(* Advanced forward lemmas **************************************************) - -lemma lveq_fwd_gen: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - ∨∨ 0 = n1 | 0 = n2. -#L1 #L2 * [2: #n1 ] * [2,4: #n2 ] #H -[ elim (lveq_inv_succ … H) ] -/2 width=1 by or_introl, or_intror/ -qed-. - -lemma lveq_fwd_pair_sn: ∀I1,K1,L2,V1,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2 → 0 = n1. -#I1 #K1 #L2 #V1 * [2: #n1 ] // * [2: #n2 ] #H -[ elim (lveq_inv_succ … H) -| elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct -] -qed-. - -lemma lveq_fwd_pair_dx: ∀I2,L1,K2,V2,n1,n2. L1 ≋ⓧ*[n1, n2] K2.ⓑ{I2}V2 → 0 = n2. -/3 width=6 by lveq_fwd_pair_sn, lveq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_length.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_length.ma deleted file mode 100644 index eca38567c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_length.ma +++ /dev/null @@ -1,109 +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/syntax/lenv_length.ma". -include "basic_2/syntax/lveq.ma". - -(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************) - -(* Properties with length for local environments ****************************) - -lemma lveq_length_eq: ∀L1,L2. |L1| = |L2| → L1 ≋ⓧ*[0, 0] L2. -#L1 elim L1 -L1 -[ #Y2 #H >(length_inv_zero_sn … H) -Y2 /2 width=3 by lveq_atom, ex_intro/ -| #K1 #I1 #IH #Y2 #H - elim (length_inv_succ_sn … H) -H #I2 #K2 #HK #H destruct - /3 width=1 by lveq_bind/ -] -qed. - -(* Forward lemmas with length for local environments ************************) - -lemma lveq_fwd_length_le_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → n1 ≤ |L1|. -#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize -/2 width=1 by le_S_S/ -qed-. - -lemma lveq_fwd_length_le_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → n2 ≤ |L2|. -#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize -/2 width=1 by le_S_S/ -qed-. - -lemma lveq_fwd_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - ∧∧ |L1|-|L2| = n1 & |L2|-|L1| = n2. -#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 /2 width=1 by conj/ -#K1 #K2 #n #_ * #H1 #H2 >length_bind /3 width=1 by minus_Sn_m, conj/ -qed-. - -lemma lveq_length_fwd_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → |L1| ≤ |L2| → 0 = n1. -#L1 #L2 #n1 #n2 #H #HL -elim (lveq_fwd_length … H) -H ->(eq_minus_O … HL) // -qed-. - -lemma lveq_length_fwd_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| → 0 = n2. -#L1 #L2 #n1 #n2 #H #HL -elim (lveq_fwd_length … H) -H ->(eq_minus_O … HL) // -qed-. - -lemma lveq_inj_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - |L1| = |L2| → ∧∧ 0 = n1 & 0 = n2. -#L1 #L2 #n1 #n2 #H #HL -elim (lveq_fwd_length … H) -H ->HL -HL /2 width=1 by conj/ -qed-. - -lemma lveq_fwd_length_plus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - |L1| + n2 = |L2| + n1. -#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize -/2 width=2 by injective_plus_r/ -qed-. - -lemma lveq_fwd_length_eq: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 → |L1| = |L2|. -/3 width=2 by lveq_fwd_length_plus, injective_plus_l/ qed-. - -lemma lveq_fwd_length_minus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - |L1| - n1 = |L2| - n2. -/3 width=3 by lveq_fwd_length_plus, lveq_fwd_length_le_dx, lveq_fwd_length_le_sn, plus_to_minus_2/ qed-. - -lemma lveq_fwd_abst_bind_length_le: ∀I1,I2,L1,L2,V1,n1,n2. - L1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2.ⓘ{I2} → |L1| ≤ |L2|. -#I1 #I2 #L1 #L2 #V1 #n1 #n2 #HL -lapply (lveq_fwd_pair_sn … HL) #H destruct -elim (lveq_fwd_length … HL) -HL >length_bind >length_bind // -qed-. - -lemma lveq_fwd_bind_abst_length_le: ∀I1,I2,L1,L2,V2,n1,n2. - L1.ⓘ{I1} ≋ⓧ*[n1, n2] L2.ⓑ{I2}V2 → |L2| ≤ |L1|. -/3 width=6 by lveq_fwd_abst_bind_length_le, lveq_sym/ qed-. - -(* Inversion lemmas with length for local environments **********************) - -lemma lveq_inv_void_dx_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2.ⓧ → |L1| ≤ |L2| → - ∃∃m2. L1 ≋ ⓧ*[n1, m2] L2 & 0 = n1 & ↑m2 = n2. -#L1 #L2 #n1 #n2 #H #HL12 -lapply (lveq_fwd_length_plus … H) normalize >plus_n_Sm #H0 -lapply (plus2_inv_le_sn … H0 HL12) -H0 -HL12 #H0 -elim (le_inv_S1 … H0) -H0 #m2 #_ #H0 destruct -elim (lveq_inv_void_succ_dx … H) -H /2 width=3 by ex3_intro/ -qed-. - -lemma lveq_inv_void_sn_length: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| → - ∃∃m1. L1 ≋ ⓧ*[m1, n2] L2 & ↑m1 = n1 & 0 = n2. -#L1 #L2 #n1 #n2 #H #HL -lapply (lveq_sym … H) -H #H -elim (lveq_inv_void_dx_length … H HL) -H -HL -/3 width=4 by lveq_sym, ex3_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_lveq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_lveq.ma deleted file mode 100644 index 40a5fb5c8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_lveq.ma +++ /dev/null @@ -1,53 +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/syntax/lveq_length.ma". - -(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************) - -(* Main inversion lemmas ****************************************************) - -theorem lveq_inv_bind: ∀K1,K2. K1 ≋ⓧ*[0, 0] K2 → - ∀I1,I2,m1,m2. K1.ⓘ{I1} ≋ⓧ*[m1, m2] K2.ⓘ{I2} → - ∧∧ 0 = m1 & 0 = m2. -#K1 #K2 #HK #I1 #I2 #m1 #m2 #H -lapply (lveq_fwd_length_eq … HK) -HK #HK -elim (lveq_inj_length … H) -H normalize /3 width=1 by conj, eq_f/ -qed-. - -theorem lveq_inj: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → - ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 → - ∧∧ n1 = m1 & n2 = m2. -#L1 #L2 #n1 #n2 #Hn #m1 #m2 #Hm -elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct -elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct -/2 width=1 by conj/ -qed-. - -theorem lveq_inj_void_sn_ge: ∀K1,K2. |K2| ≤ |K1| → - ∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 → - ∀m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2 → - ∧∧ ↑n1 = m1 & 0 = m2 & 0 = n2. -#L1 #L2 #HL #n1 #n2 #Hn #m1 #m2 #Hm -elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct -elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct ->length_bind >eq_minus_S_pred >(eq_minus_O … HL) -/3 width=4 by plus_minus, and3_intro/ -qed-. - -theorem lveq_inj_void_dx_le: ∀K1,K2. |K1| ≤ |K2| → - ∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 → - ∀m1,m2. K1 ≋ⓧ*[m1, m2] K2.ⓧ → - ∧∧ ↑n2 = m2 & 0 = m1 & 0 = n1. -/3 width=5 by lveq_inj_void_sn_ge, lveq_sym/ qed-. (* auto: 2x lveq_sym *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq.ma deleted file mode 100644 index d431b7677..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq.ma +++ /dev/null @@ -1,187 +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/stareq_4.ma". -include "basic_2/syntax/item_sd.ma". -include "basic_2/syntax/term.ma". - -(* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************) - -inductive tdeq (h) (o): relation term ≝ -| tdeq_sort: ∀s1,s2,d. deg h o s1 d → deg h o s2 d → tdeq h o (⋆s1) (⋆s2) -| tdeq_lref: ∀i. tdeq h o (#i) (#i) -| tdeq_gref: ∀l. tdeq h o (§l) (§l) -| tdeq_pair: ∀I,V1,V2,T1,T2. tdeq h o V1 V2 → tdeq h o T1 T2 → tdeq h o (②{I}V1.T1) (②{I}V2.T2) -. - -interpretation - "context-free degree-based equivalence (term)" - 'StarEq h o T1 T2 = (tdeq h o T1 T2). - -(* Basic inversion lemmas ***************************************************) - -fact tdeq_inv_sort1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀s1. X = ⋆s1 → - ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. -#h #o #X #Y * -X -Y -[ #s1 #s2 #d #Hs1 #Hs2 #s #H destruct /2 width=5 by ex3_2_intro/ -| #i #s #H destruct -| #l #s #H destruct -| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct -] -qed-. - -lemma tdeq_inv_sort1: ∀h,o,Y,s1. ⋆s1 ≛[h, o] Y → - ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. -/2 width=3 by tdeq_inv_sort1_aux/ qed-. - -fact tdeq_inv_lref1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀i. X = #i → Y = #i. -#h #o #X #Y * -X -Y // -[ #s1 #s2 #d #_ #_ #j #H destruct -| #I #V1 #V2 #T1 #T2 #_ #_ #j #H destruct -] -qed-. - -lemma tdeq_inv_lref1: ∀h,o,Y,i. #i ≛[h, o] Y → Y = #i. -/2 width=5 by tdeq_inv_lref1_aux/ qed-. - -fact tdeq_inv_gref1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀l. X = §l → Y = §l. -#h #o #X #Y * -X -Y // -[ #s1 #s2 #d #_ #_ #k #H destruct -| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct -] -qed-. - -lemma tdeq_inv_gref1: ∀h,o,Y,l. §l ≛[h, o] Y → Y = §l. -/2 width=5 by tdeq_inv_gref1_aux/ qed-. - -fact tdeq_inv_pair1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀I,V1,T1. X = ②{I}V1.T1 → - ∃∃V2,T2. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & Y = ②{I}V2.T2. -#h #o #X #Y * -X -Y -[ #s1 #s2 #d #_ #_ #J #W1 #U1 #H destruct -| #i #J #W1 #U1 #H destruct -| #l #J #W1 #U1 #H destruct -| #I #V1 #V2 #T1 #T2 #HV #HT #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ -] -qed-. - -lemma tdeq_inv_pair1: ∀h,o,I,V1,T1,Y. ②{I}V1.T1 ≛[h, o] Y → - ∃∃V2,T2. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & Y = ②{I}V2.T2. -/2 width=3 by tdeq_inv_pair1_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma tdeq_inv_sort1_deg: ∀h,o,Y,s1. ⋆s1 ≛[h, o] Y → ∀d. deg h o s1 d → - ∃∃s2. deg h o s2 d & Y = ⋆s2. -#h #o #Y #s1 #H #d #Hs1 elim (tdeq_inv_sort1 … H) -H -#s2 #x #Hx <(deg_mono h o … Hx … Hs1) -s1 -d /2 width=3 by ex2_intro/ -qed-. - -lemma tdeq_inv_sort_deg: ∀h,o,s1,s2. ⋆s1 ≛[h, o] ⋆s2 → - ∀d1,d2. deg h o s1 d1 → deg h o s2 d2 → - d1 = d2. -#h #o #s1 #y #H #d1 #d2 #Hs1 #Hy -elim (tdeq_inv_sort1_deg … H … Hs1) -s1 #s2 #Hs2 #H destruct -<(deg_mono h o … Hy … Hs2) -s2 -d1 // -qed-. - -lemma tdeq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ≛[h, o] ②{I2}V2.T2 → - ∧∧ I1 = I2 & V1 ≛[h, o] V2 & T1 ≛[h, o] T2. -#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H elim (tdeq_inv_pair1 … H) -H -#V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/ -qed-. - -lemma tdeq_inv_pair_xy_x: ∀h,o,I,V,T. ②{I}V.T ≛[h, o] V → ⊥. -#h #o #I #V elim V -V -[ #J #T #H elim (tdeq_inv_pair1 … H) -H #X #Y #_ #_ #H destruct -| #J #X #Y #IHX #_ #T #H elim (tdeq_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/ -] -qed-. - -lemma tdeq_inv_pair_xy_y: ∀h,o,I,T,V. ②{I}V.T ≛[h, o] T → ⊥. -#h #o #I #T elim T -T -[ #J #V #H elim (tdeq_inv_pair1 … H) -H #X #Y #_ #_ #H destruct -| #J #X #Y #_ #IHY #V #H elim (tdeq_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/ -] -qed-. - -(* Basic forward lemmas *****************************************************) - -lemma tdeq_fwd_atom1: ∀h,o,I,Y. ⓪{I} ≛[h, o] Y → ∃J. Y = ⓪{J}. -#h #o * #x #Y #H [ elim (tdeq_inv_sort1 … H) -H ] -/3 width=4 by tdeq_inv_gref1, tdeq_inv_lref1, ex_intro/ -qed-. - -(* Basic properties *********************************************************) - -lemma tdeq_refl: ∀h,o. reflexive … (tdeq h o). -#h #o #T elim T -T /2 width=1 by tdeq_pair/ -* /2 width=1 by tdeq_lref, tdeq_gref/ -#s elim (deg_total h o s) /2 width=3 by tdeq_sort/ -qed. - -lemma tdeq_sym: ∀h,o. symmetric … (tdeq h o). -#h #o #T1 #T2 #H elim H -T1 -T2 -/2 width=3 by tdeq_sort, tdeq_lref, tdeq_gref, tdeq_pair/ -qed-. - -lemma tdeq_dec: ∀h,o,T1,T2. Decidable (T1 ≛[h, o] T2). -#h #o #T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] -[ elim (deg_total h o s1) #d1 #H1 - elim (deg_total h o s2) #d2 #H2 - elim (eq_nat_dec d1 d2) #Hd12 destruct /3 width=3 by tdeq_sort, or_introl/ - @or_intror #H - lapply (tdeq_inv_sort_deg … H … H1 H2) -H -H1 -H2 /2 width=1 by/ -|2,3,13: - @or_intror #H - elim (tdeq_inv_sort1 … H) -H #x1 #x2 #_ #_ #H destruct -|4,6,14: - @or_intror #H - lapply (tdeq_inv_lref1 … H) -H #H destruct -|5: - elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ - @or_intror #H - lapply (tdeq_inv_lref1 … H) -H #H destruct /2 width=1 by/ -|7,8,15: - @or_intror #H - lapply (tdeq_inv_gref1 … H) -H #H destruct -|9: - elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ - @or_intror #H - lapply (tdeq_inv_gref1 … H) -H #H destruct /2 width=1 by/ -|10,11,12: - @or_intror #H - elim (tdeq_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct -|16: - elim (eq_item2_dec I1 I2) #HI12 destruct - [ elim (IHV V2) -IHV #HV12 - elim (IHT T2) -IHT #HT12 - [ /3 width=1 by tdeq_pair, or_introl/ ] - ] - @or_intror #H - elim (tdeq_inv_pair … H) -H /2 width=1 by/ -] -qed-. - -(* Negated inversion lemmas *************************************************) - -lemma tdneq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. - (②{I1}V1.T1 ≛[h, o] ②{I2}V2.T2 → ⊥) → - ∨∨ I1 = I2 → ⊥ - | (V1 ≛[h, o] V2 → ⊥) - | (T1 ≛[h, o] T2 → ⊥). -#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H12 -elim (eq_item2_dec I1 I2) /3 width=1 by or3_intro0/ #H destruct -elim (tdeq_dec h o V1 V2) /3 width=1 by or3_intro1/ -elim (tdeq_dec h o T1 T2) /4 width=1 by tdeq_pair, or3_intro2/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq_ext.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq_ext.ma deleted file mode 100644 index 93a3be18d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq_ext.ma +++ /dev/null @@ -1,40 +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/stareq_5.ma". -include "basic_2/syntax/cext2.ma". -include "basic_2/syntax/tdeq.ma". - -(* EXTENDED DEGREE-BASED EQUIVALENCE ****************************************) - -definition tdeq_ext: ∀h. sd h → relation bind ≝ - λh,o. ext2 (tdeq h o). - -definition cdeq: ∀h. sd h → relation3 lenv term term ≝ - λh,o,L. tdeq h o. - -definition cdeq_ext: ∀h. sd h → relation3 lenv bind bind ≝ - λh,o. cext2 (cdeq h o). - -interpretation - "context-free degree-based equivalence (binder)" - 'StarEq h o I1 I2 = (tdeq_ext h o I1 I2). - -interpretation - "context-dependent degree-based equivalence (term)" - 'StarEq h o L T1 T2 = (cdeq h o L T1 T2). - -interpretation - "context-dependent degree-based equivalence (binder)" - 'StarEq h o L I1 I2 = (cdeq_ext h o L I1 I2). diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq_tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq_tdeq.ma deleted file mode 100644 index 80d13f4e6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/tdeq_tdeq.ma +++ /dev/null @@ -1,50 +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/syntax/tdeq.ma". - -(* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************) - -(* Main properties **********************************************************) - -theorem tdeq_trans: ∀h,o. Transitive … (tdeq h o). -#h #o #T1 #T #H elim H -T1 -T -[ #s1 #s #d #Hs1 #Hs #X #H - elim (tdeq_inv_sort1_deg … H … Hs) -s /2 width=3 by tdeq_sort/ -| #i1 #i #H <(tdeq_inv_lref1 … H) -H // -| #l1 #l #H <(tdeq_inv_gref1 … H) -H // -| #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H - elim (tdeq_inv_pair1 … H) -H /3 width=1 by tdeq_pair/ -] -qed-. - -theorem tdeq_canc_sn: ∀h,o. left_cancellable … (tdeq h o). -/3 width=3 by tdeq_trans, tdeq_sym/ qed-. - -theorem tdeq_canc_dx: ∀h,o. right_cancellable … (tdeq h o). -/3 width=3 by tdeq_trans, tdeq_sym/ qed-. - -theorem tdeq_repl: ∀h,o,T1,T2. T1 ≛[h, o] T2 → - ∀U1. T1 ≛[h, o] U1 → ∀U2. T2 ≛[h, o] U2 → U1 ≛[h, o] U2. -/3 width=3 by tdeq_canc_sn, tdeq_trans/ qed-. - -(* Negated main properies ***************************************************) - -theorem tdeq_tdneq_trans: ∀h,o,T1,T. T1 ≛[h, o] T → ∀T2. (T ≛[h, o] T2 → ⊥) → - T1 ≛[h, o] T2 → ⊥. -/3 width=3 by tdeq_canc_sn/ qed-. - -theorem tdneq_tdeq_canc_dx: ∀h,o,T1,T. (T1 ≛[h, o] T → ⊥) → ∀T2. T2 ≛[h, o] T → - T1 ≛[h, o] T2 → ⊥. -/3 width=3 by tdeq_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/term.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/term.ma deleted file mode 100644 index ccbb494dd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/term.ma +++ /dev/null @@ -1,153 +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/constructors/item0_1.ma". -include "basic_2/notation/constructors/snitem2_3.ma". -include "basic_2/notation/constructors/snbind2_4.ma". -include "basic_2/notation/constructors/snbind2pos_3.ma". -include "basic_2/notation/constructors/snbind2neg_3.ma". -include "basic_2/notation/constructors/snflat2_3.ma". -include "basic_2/notation/constructors/star_1.ma". -include "basic_2/notation/constructors/lref_1.ma". -include "basic_2/notation/constructors/gref_1.ma". -include "basic_2/notation/constructors/snabbr_3.ma". -include "basic_2/notation/constructors/snabbrpos_2.ma". -include "basic_2/notation/constructors/snabbrneg_2.ma". -include "basic_2/notation/constructors/snabst_3.ma". -include "basic_2/notation/constructors/snabstpos_2.ma". -include "basic_2/notation/constructors/snabstneg_2.ma". -include "basic_2/notation/constructors/snappl_2.ma". -include "basic_2/notation/constructors/sncast_2.ma". -include "basic_2/syntax/item.ma". - -(* TERMS ********************************************************************) - -(* terms *) -inductive term: Type[0] ≝ - | TAtom: item0 → term (* atomic item construction *) - | TPair: item2 → term → term → term (* binary item construction *) -. - -interpretation "term construction (atomic)" - 'Item0 I = (TAtom I). - -interpretation "term construction (binary)" - 'SnItem2 I T1 T2 = (TPair I T1 T2). - -interpretation "term binding construction (binary)" - 'SnBind2 p I T1 T2 = (TPair (Bind2 p I) T1 T2). - -interpretation "term positive binding construction (binary)" - 'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2). - -interpretation "term negative binding construction (binary)" - 'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2). - -interpretation "term flat construction (binary)" - 'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2). - -interpretation "sort (term)" - 'Star s = (TAtom (Sort s)). - -interpretation "local reference (term)" - 'LRef i = (TAtom (LRef i)). - -interpretation "global reference (term)" - 'GRef l = (TAtom (GRef l)). - -interpretation "abbreviation (term)" - 'SnAbbr p T1 T2 = (TPair (Bind2 p Abbr) T1 T2). - -interpretation "positive abbreviation (term)" - 'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2). - -interpretation "negative abbreviation (term)" - 'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2). - -interpretation "abstraction (term)" - 'SnAbst p T1 T2 = (TPair (Bind2 p Abst) T1 T2). - -interpretation "positive abstraction (term)" - 'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2). - -interpretation "negative abstraction (term)" - 'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2). - -interpretation "application (term)" - 'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2). - -interpretation "native type annotation (term)" - 'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2). - -(* Basic properties *********************************************************) - -(* Basic_1: was: term_dec *) -lemma eq_term_dec: ∀T1,T2:term. Decidable (T1 = T2). -#T1 elim T1 -T1 #I1 [| #V1 #T1 #IHV1 #IHT1 ] * #I2 [2,4: #V2 #T2 ] -[1,4: @or_intror #H destruct -| elim (eq_item2_dec I1 I2) #HI - [ elim (IHV1 V2) -IHV1 #HV - [ elim (IHT1 T2) -IHT1 /2 width=1 by or_introl/ #HT ] - ] - @or_intror #H destruct /2 width=1 by/ -| elim (eq_item0_dec I1 I2) /2 width=1 by or_introl/ #HI - @or_intror #H destruct /2 width=1 by/ -] -qed-. - -(* Basic inversion lemmas ***************************************************) - -fact destruct_tatom_tatom_aux: ∀I1,I2. ⓪{I1} = ⓪{I2} → I1 = I2. -#I1 #I2 #H destruct // -qed-. - -fact destruct_tpair_tpair_aux: ∀I1,I2,T1,T2,V1,V2. ②{I1}T1.V1 = ②{I2}T2.V2 → - ∧∧T1 = T2 & I1 = I2 & V1 = V2. -#I1 #I2 #T1 #T2 #V1 #V2 #H destruct /2 width=1 by and3_intro/ -qed-. - -lemma discr_tpair_xy_x: ∀I,T,V. ②{I}V.T = V → ⊥. -#I #T #V elim V -V -[ #J #H destruct -| #J #W #U #IHW #_ #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) -] -qed-. - -(* Basic_1: was: thead_x_y_y *) -lemma discr_tpair_xy_y: ∀I,V,T. ②{I}V.T = T → ⊥. -#I #V #T elim T -T -[ #J #H destruct -| #J #W #U #_ #IHU #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) -] -qed-. - -lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2. - (②{I}V1.T1 = ②{I}V2.T2 → ⊥) → - (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)). -#I #V1 #T1 #V2 #T2 #H -elim (eq_term_dec V1 V2) /3 width=1 by or_introl/ #HV12 destruct -@or_intror @conj // #HT12 destruct /2 width=1 by/ -qed-. - -lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2. - (②{I} V1. T1 = ②{I}V2.T2 → ⊥) → - (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)). -#I #V1 #T1 #V2 #T2 #H -elim (eq_term_dec T1 T2) /3 width=1 by or_introl/ #HT12 destruct -@or_intror @conj // #HT12 destruct /2 width=1 by/ -qed-. - -(* Basic_1: removed theorems 3: - not_void_abst not_abbr_void not_abst_void -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/term_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/term_simple.ma deleted file mode 100644 index e6cfdb3c0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/term_simple.ma +++ /dev/null @@ -1,42 +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/simple_1.ma". -include "basic_2/syntax/term.ma". - -(* SIMPLE (NEUTRAL) TERMS ***************************************************) - -inductive simple: predicate term ≝ - | simple_atom: ∀I. simple (⓪{I}) - | simple_flat: ∀I,V,T. simple (ⓕ{I}V.T) -. - -interpretation "simple (term)" 'Simple T = (simple T). - -(* Basic inversion lemmas ***************************************************) - -fact simple_inv_bind_aux: ∀T. 𝐒⦃T⦄ → ∀p,J,W,U. T = ⓑ{p,J}W.U → ⊥. -#T * -T -[ #I #p #J #W #U #H destruct -| #I #V #T #a #J #W #U #H destruct -] -qed-. - -lemma simple_inv_bind: ∀p,I,V,T. 𝐒⦃ⓑ{p,I} V. T⦄ → ⊥. -/2 width=7 by simple_inv_bind_aux/ qed-. - -lemma simple_inv_pair: ∀I,V,T. 𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J. -* /2 width=2 by ex_intro/ -#p #I #V #T #H elim (simple_inv_bind … H) -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/term_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/term_vector.ma deleted file mode 100644 index df6e6e1cf..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/term_vector.ma +++ /dev/null @@ -1,42 +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 "ground_2/lib/list.ma". -include "basic_2/notation/functions/snapplvector_2.ma". -include "basic_2/syntax/term_simple.ma". - -(* TERMS ********************************************************************) - -rec definition applv Vs T on Vs ≝ - match Vs with - [ nil ⇒ T - | cons hd tl ⇒ ⓐhd. (applv tl T) - ]. - -interpretation "application to vector (term)" - 'SnApplVector Vs T = (applv Vs T). - -(* Basic properties *********************************************************) - -lemma applv_nil: ∀T. ⒶⒺ.T = T. -// qed. - -lemma applv_cons: ∀V,Vs,T. ⒶV⨮Vs.T = ⓐV.ⒶVs.T. -// qed. - -(* Properties with simple terms *********************************************) - -lemma applv_simple: ∀T,Vs. 𝐒⦃T⦄ → 𝐒⦃ⒶVs.T⦄. -#T * // -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/term_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/term_weight.ma deleted file mode 100644 index 6a0a4ea31..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/term_weight.ma +++ /dev/null @@ -1,38 +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/functions/weight_1.ma". -include "basic_2/syntax/term.ma". - -(* WEIGHT OF A TERM *********************************************************) - -rec definition tw T ≝ match T with -[ TAtom _ ⇒ 1 -| TPair _ V T ⇒ ↑(tw V + tw T) -]. - -interpretation "weight (term)" 'Weight T = (tw T). - -(* Basic properties *********************************************************) - -(* Basic_1: was: tweight_lt *) -lemma tw_pos: ∀T. 1 ≤ ♯{T}. -#T elim T -T // -qed. - -(* Basic_1: removed theorems 11: - wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O - weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind -*) -(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/theq.ma deleted file mode 100644 index a09a53533..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq.ma +++ /dev/null @@ -1,177 +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/topiso_4.ma". -include "basic_2/syntax/item_sd.ma". -include "basic_2/syntax/term.ma". - -(* HEAD EQUIVALENCE FOR TERMS ***********************************************) - -(* Basic_2A1: includes: tsts_atom tsts_pair *) -inductive theq (h) (o): relation term ≝ -| theq_sort: ∀s1,s2,d. deg h o s1 d → deg h o s2 d → theq h o (⋆s1) (⋆s2) -| theq_lref: ∀i. theq h o (#i) (#i) -| theq_gref: ∀l. theq h o (§l) (§l) -| theq_pair: ∀I,V1,V2,T1,T2. theq h o (②{I}V1.T1) (②{I}V2.T2) -. - -interpretation "head equivalence (term)" 'TopIso h o T1 T2 = (theq h o T1 T2). - -(* Basic inversion lemmas ***************************************************) - -fact theq_inv_sort1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀s1. X = ⋆s1 → - ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. -#h #o #X #Y * -X -Y -[ #s1 #s2 #d #Hs1 #Hs2 #s #H destruct /2 width=5 by ex3_2_intro/ -| #i #s #H destruct -| #l #s #H destruct -| #I #V1 #V2 #T1 #T2 #s #H destruct -] -qed-. - -(* Basic_1: was just: iso_gen_sort *) -lemma theq_inv_sort1: ∀h,o,Y,s1. ⋆s1 ⩳[h, o] Y → - ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. -/2 width=3 by theq_inv_sort1_aux/ qed-. - -fact theq_inv_lref1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀i. X = #i → Y = #i. -#h #o #X #Y * -X -Y // -[ #s1 #s2 #d #_ #_ #j #H destruct -| #I #V1 #V2 #T1 #T2 #j #H destruct -] -qed-. - -(* Basic_1: was: iso_gen_lref *) -lemma theq_inv_lref1: ∀h,o,Y,i. #i ⩳[h, o] Y → Y = #i. -/2 width=5 by theq_inv_lref1_aux/ qed-. - -fact theq_inv_gref1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀l. X = §l → Y = §l. -#h #o #X #Y * -X -Y // -[ #s1 #s2 #d #_ #_ #k #H destruct -| #I #V1 #V2 #T1 #T2 #k #H destruct -] -qed-. - -lemma theq_inv_gref1: ∀h,o,Y,l. §l ⩳[h, o] Y → Y = §l. -/2 width=5 by theq_inv_gref1_aux/ qed-. - -fact theq_inv_pair1_aux: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → - ∀J,W1,U1. T1 = ②{J}W1.U1 → - ∃∃W2,U2. T2 = ②{J}W2.U2. -#h #o #T1 #T2 * -T1 -T2 -[ #s1 #s2 #d #_ #_ #J #W1 #U1 #H destruct -| #i #J #W1 #U1 #H destruct -| #l #J #W1 #U1 #H destruct -| #I #V1 #V2 #T1 #T2 #J #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/ -] -qed-. - -(* Basic_1: was: iso_gen_head *) -(* Basic_2A1: was: tsts_inv_pair1 *) -lemma theq_inv_pair1: ∀h,o,J,W1,U1,T2. ②{J}W1.U1 ⩳[h, o] T2 → - ∃∃W2,U2. T2 = ②{J}W2. U2. -/2 width=7 by theq_inv_pair1_aux/ qed-. - -fact theq_inv_pair2_aux: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → - ∀J,W2,U2. T2 = ②{J}W2.U2 → - ∃∃W1,U1. T1 = ②{J}W1.U1. -#h #o #T1 #T2 * -T1 -T2 -[ #s1 #s2 #d #_ #_ #J #W2 #U2 #H destruct -| #i #J #W2 #U2 #H destruct -| #l #J #W2 #U2 #H destruct -| #I #V1 #V2 #T1 #T2 #J #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/ -] -qed-. - -(* Basic_2A1: was: tsts_inv_pair2 *) -lemma theq_inv_pair2: ∀h,o,J,T1,W2,U2. T1 ⩳[h, o] ②{J}W2.U2 → - ∃∃W1,U1. T1 = ②{J}W1.U1. -/2 width=7 by theq_inv_pair2_aux/ qed-. - -(* Advanced inversion lemmas ************************************************) - -lemma theq_inv_sort1_deg: ∀h,o,Y,s1. ⋆s1 ⩳[h, o] Y → ∀d. deg h o s1 d → - ∃∃s2. deg h o s2 d & Y = ⋆s2. -#h #o #Y #s1 #H #d #Hs1 elim (theq_inv_sort1 … H) -H -#s2 #x #Hx <(deg_mono h o … Hx … Hs1) -s1 -d /2 width=3 by ex2_intro/ -qed-. - -lemma theq_inv_sort_deg: ∀h,o,s1,s2. ⋆s1 ⩳[h, o] ⋆s2 → - ∀d1,d2. deg h o s1 d1 → deg h o s2 d2 → - d1 = d2. -#h #o #s1 #y #H #d1 #d2 #Hs1 #Hy -elim (theq_inv_sort1_deg … H … Hs1) -s1 #s2 #Hs2 #H destruct -<(deg_mono h o … Hy … Hs2) -s2 -d1 // -qed-. - -lemma theq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ⩳[h, o] ②{I2}V2.T2 → - I1 = I2. -#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H elim (theq_inv_pair1 … H) -H -#V0 #T0 #H destruct // -qed-. - -(* Basic properties *********************************************************) - -(* Basic_1: was: iso_refl *) -(* Basic_2A1: was: tsts_refl *) -lemma theq_refl: ∀h,o. reflexive … (theq h o). -#h #o * // -* /2 width=1 by theq_lref, theq_gref/ -#s elim (deg_total h o s) /2 width=3 by theq_sort/ -qed. - -(* Basic_2A1: was: tsts_sym *) -lemma theq_sym: ∀h,o. symmetric … (theq h o). -#h #o #T1 #T2 * -T1 -T2 /2 width=3 by theq_sort/ -qed-. - -(* Basic_2A1: was: tsts_dec *) -lemma theq_dec: ∀h,o,T1,T2. Decidable (T1 ⩳[h, o] T2). -#h #o * [ * #s1 | #I1 #V1 #T1 ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] -[ elim (deg_total h o s1) #d1 #H1 - elim (deg_total h o s2) #d2 #H2 - elim (eq_nat_dec d1 d2) #Hd12 destruct /3 width=3 by theq_sort, or_introl/ - @or_intror #H - lapply (theq_inv_sort_deg … H … H1 H2) -H -H1 -H2 /2 width=1 by/ -|2,3,13: - @or_intror #H - elim (theq_inv_sort1 … H) -H #x1 #x2 #_ #_ #H destruct -|4,6,14: - @or_intror #H - lapply (theq_inv_lref1 … H) -H #H destruct -|5: - elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ - @or_intror #H - lapply (theq_inv_lref1 … H) -H #H destruct /2 width=1 by/ -|7,8,15: - @or_intror #H - lapply (theq_inv_gref1 … H) -H #H destruct -|9: - elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ - @or_intror #H - lapply (theq_inv_gref1 … H) -H #H destruct /2 width=1 by/ -|10,11,12: - @or_intror #H - elim (theq_inv_pair1 … H) -H #X1 #X2 #H destruct -|16: - elim (eq_item2_dec I1 I2) #HI12 destruct - [ /3 width=1 by theq_pair, or_introl/ ] - @or_intror #H - lapply (theq_inv_pair … H) -H /2 width=1 by/ -] -qed-. - -(* Basic_2A1: removed theorems 2: - tsts_inv_atom1 tsts_inv_atom2 -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_simple.ma deleted file mode 100644 index a260edd75..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_simple.ma +++ /dev/null @@ -1,31 +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/syntax/term_simple.ma". -include "basic_2/syntax/theq.ma". - -(* HEAD EQUIVALENCE FOR TERMS ***********************************************) - -(* Properies with simple (neutral) terms ************************************) - -(* Basic_2A1: was: simple_tsts_repl_dx *) -lemma simple_theq_repl_dx: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. -#h #o #T1 #T2 * -T1 -T2 // -#I #V1 #V2 #T1 #T2 #H -elim (simple_inv_pair … H) -H #J #H destruct // -qed-. - -(* Basic_2A1: was: simple_tsts_repl_sn *) -lemma simple_theq_repl_sn: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. -/3 width=5 by simple_theq_repl_dx, theq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_simple_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_simple_vector.ma deleted file mode 100644 index a17c97090..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_simple_vector.ma +++ /dev/null @@ -1,31 +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/syntax/term_vector.ma". -include "basic_2/syntax/theq_simple.ma". - -(* HEAD EQUIVALENCE FOR TERMS ***********************************************) - -(* Advanced inversion lemmas with simple (neutral) terms ********************) - -(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *) -(* Basic_2A1: was: tsts_inv_bind_applv_simple *) -lemma theq_inv_applv_bind_simple: ∀h,o,p,I,Vs,V2,T1,T2. ⒶVs.T1 ⩳[h, o] ⓑ{p,I}V2.T2 → - 𝐒⦃T1⦄ → ⊥. -#h #o #p #I #Vs #V2 #T1 #T2 #H elim (theq_inv_pair2 … H) -H -#V0 #T0 elim Vs -Vs normalize -[ #H destruct #H /2 width=5 by simple_inv_bind/ -| #V #Vs #_ #H destruct -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_tdeq.ma deleted file mode 100644 index e151e40f0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_tdeq.ma +++ /dev/null @@ -1,24 +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/syntax/tdeq.ma". -include "basic_2/syntax/theq.ma". - -(* HEAD EQUIVALENCE FOR TERMS ***********************************************) - -(* Properties with degree-based equivalence for terms ***********************) - -lemma tdeq_theq: ∀h,o,T1,T2. T1 ≛[h, o] T2 → T1 ⩳[h, o] T2. -#h #o #T1 #T2 * -T1 -T2 /2 width=3 by theq_sort, theq_pair/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_theq.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_theq.ma deleted file mode 100644 index 88547d98e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/theq_theq.ma +++ /dev/null @@ -1,40 +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/syntax/theq.ma". - -(* HEAD EQUIVALENCE FOR TERMS ***********************************************) - -(* Main properties **********************************************************) - -(* Basic_1: was: iso_trans *) -(* Basic_2A1: was: tsts_trans *) -theorem theq_trans: ∀h,o. Transitive … (theq h o). -#h #o #T1 #T * -T1 -T -[ #s1 #s #d #Hs1 #Hs #X #H - elim (theq_inv_sort1_deg … H … Hs) -s /2 width=3 by theq_sort/ -| #i1 #i #H <(theq_inv_lref1 … H) -H // -| #l1 #l #H <(theq_inv_gref1 … H) -H // -| #I #V1 #V #T1 #T #X #H - elim (theq_inv_pair1 … H) -H #V2 #T2 #H destruct // -] -qed-. - -(* Basic_2A1: was: tsts_canc_sn *) -theorem theq_canc_sn: ∀h,o. left_cancellable … (theq h o). -/3 width=3 by theq_trans, theq_sym/ qed-. - -(* Basic_2A1: was: tsts_canc_dx *) -theorem theq_canc_dx: ∀h,o. right_cancellable … (theq h o). -/3 width=3 by theq_trans, theq_sym/ 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 7d94ab507..205227ec5 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 @@ -119,155 +119,6 @@ table { ] } ] - class "water" - [ { "iterated static typing" * } { - [ { "iterated generic extension of a context-sensitive relation" * } { - [ [ "for lenvs on referred entries" ] "rexs" + "( ? ⪤*[?,?] ? )" "rexs_length" + "rexs_lex" + "rexs_drops" + "rexs_fqup" + "rexs_rexs" * ] - } - ] - } - ] - class "green" - [ { "static typing" * } { - [ { "generic reducibility" * } { - [ [ "restricted refinement for lenvs" ] "lsubc" + "( ? ⊢ ? ⫃[?] ? )" "lsubc_drops" + "lsubc_lsubr" + "lsubc_lsuba" * ] - [ [ "candidates" ] "gcp_cr" + "( ⦃?,?,?⦄ ϵ[?] 〚?〛 )" "gcp_aaa" * ] - [ [ "computation properties" ] "gcp" *] - } - ] - [ { "atomic arity assignment" * } { - [ [ "restricted refinement for lenvs" ] "lsuba" + "( ? ⊢ ? ⫃⁝ ? )" "lsuba_drops" + "lsuba_lsubr" + "lsuba_aaa" + "lsuba_lsuba" * ] - [ [ "for terms" ] "aaa" + "( ⦃?,?⦄ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_rdeq" + "aaa_fdeq" + "aaa_aaa" * ] - } - ] - [ { "degree-based equivalence" * } { - [ [ "for closures on referred entries" ] "fdeq" + "( ⦃?,?,?⦄ ≛[?,?] ⦃?,?,?⦄ )" "fdeq_fqup" + "fdeq_fqus" + "fdeq_req" + "fdeq_fdeq" * ] - [ [ "for lenvs on referred entries" ] "rdeq" + "( ? ≛[?,?,?] ? )" "rdeq_length" + "rdeq_drops" + "rdeq_fqup" + "rdeq_fqus" + "rdeq_req" + "rdeq_rdeq" * ] - } - ] - [ { "syntactic equivalence" * } { - [ [ "for lenvs on referred entries" ] "req" + "( ? ≡[?] ? )" "req_fqup" + "req_fsle" * ] - } - ] - [ { "generic extension of a context-sensitive relation" * } { - [ [ "for lenvs on referred entries" ] "rex" + "( ? ⪤[?,?] ? )" "rex_length" + "rex_lex" + "rex_drops" + "rex_fqup" + "rex_fsle" + "rex_rex" * ] - } - ] - [ { "context-sensitive free variables" * } { - [ [ "inclusion for restricted closures" ] "fsle" + "( ⦃?,?⦄ ⊆ ⦃?,?⦄ )" "fsle_length" + "fsle_drops" + "fsle_fqup" + "fsle_fsle" * ] - [ [ "restricted refinement for lenvs" ] "lsubf" + "( ⦃?,?⦄ ⫃𝐅* ⦃?,?⦄ )" "lsubf_lsubr" + "lsubf_frees" + "lsubf_lsubf" * ] - [ [ "for terms" ] "frees" + "( ? ⊢ 𝐅*⦃?⦄ ≘ ? )" "frees_append" + "frees_drops" + "frees_fqup" + "frees_frees" * ] - } - ] - [ { "local environments" * } { - [ [ "restricted refinement" ] "lsubr" + "( ? ⫃ ? )" "lsubr_length" + "lsubr_drops" + "lsubr_lsubr" * ] - } - ] - } - ] - class "grass" - [ { "s-computation" * } { - [ { "iterated structural successor" * } { - [ [ "for closures" ] "fqus" + "( ⦃?,?,?⦄ ⊐*[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐* ⦃?,?,?⦄ )" "fqus_weight" + "fqus_drops" + "fqus_fqup" + "fqus_fqus" * ] - [ [ "proper for closures" ] "fqup" + "( ⦃?,?,?⦄ ⊐+[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐+ ⦃?,?,?⦄ )" "fqup_weight" + "fqup_drops" + "fqup_fqup" * ] - } - ] - } - ] - class "yellow" - [ { "s-transition" * } { - [ { "structural successor" * } { - [ [ "for closures" ] "fquq" + "( ⦃?,?,?⦄ ⊐⸮[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐⸮ ⦃?,?,?⦄ )" "fquq_length" + "fquq_weight" * ] - [ [ "proper for closures" ] "fqu" + "( ⦃?,?,?⦄ ⊐[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐ ⦃?,?,?⦄ )" "fqu_length" + "fqu_weight" + "fqu_tdeq" * ] - } - ] - } - ] - class "orange" - [ { "relocation" * } { - [ { "generic slicing" * } { - [ [ "for lenvs" ] "drops" + "( ⬇*[?,?] ? ≘ ? )" + "( ⬇*[?] ? ≘ ? )" "drops_ctc" + "drops_ltc" + "drops_weight" + "drops_length" + "drops_cext2" + "drops_sex" + "drops_lex" + "drops_seq" + "drops_drops" + "drops_vector" * ] - } - ] - [ { "generic relocation" * } { - [ [ "for binders" ] "lifts_bind" + "( ⬆*[?] ? ≘ ? )" "lifts_weight_bind" + "lifts_lifts_bind" * ] - [ [ "for term vectors" ] "lifts_vector" + "( ⬆*[?] ? ≘ ? )" "lifts_lifts_vector" * ] - [ [ "for terms" ] "lifts" + "( ⬆*[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_tdeq" + "lifts_lifts" * ] - } - ] - [ { "syntactic equivalence" * } { - [ [ "for lenvs on selected entries" ] "seq" + "( ? ≡[?] ? )" "seq_length" + "seq_seq" * ] - } - ] - [ { "generic entrywise extension" * } { - [ [ "for lenvs of one contex-sensitive relation" ] "lex" + "( ? ⪤[?] ? )" "lex_tc" + "lex_length" + "lex_lex" * ] - [ [ "for lenvs of two contex-sensitive relations" ] "sex" + "( ? ⪤[?,?,?] ? )" "sex_tc" + "sex_length" + "sex_sex" * ] - } - ] - } - ] - class "red" - [ { "syntax" * } { - [ { "equivalence up to exclusion binders" * } { - [ [ "for lenvs" ] "lveq" + "( ? ≋ⓧ*[?,?] ? )" "lveq_length" + "lveq_lveq" * ] - } - ] - [ { "append" * } { - [ [ "for lenvs" ] "append" + "( ? + ? )" "append_length" * ] - } - ] - [ { "head equivalence" * } { - [ [ "for terms" ] "theq" + "( ? ⩳[?,?] ? )" "theq_simple" + "theq_tdeq" + "theq_theq" + "theq_simple_vector" * ] - } - ] - [ { "degree-based equivalence" * } { - [ [ "" ] "tdeq_ext" + "( ? ≛[?,?] ? )" + "( ? ⊢ ? ≛[?,?] ? )" * ] - [ [ "" ] "tdeq" + "( ? ≛[?,?] ? )" "tdeq_tdeq" * ] - } - ] - [ { "closures" * } { - [ [ "" ] "cl_weight" + "( ♯{?,?,?} )" * ] - [ [ "" ] "cl_restricted_weight" + "( ♯{?,?} )" * ] - } - ] - [ { "global environments" * } { - [ [ "" ] "genv_length" + "( |?| )" * ] - [ [ "" ] "genv_weight" + "( ♯{?} )" * ] - [ [ "" ] "genv" * ] - } - ] - [ { "local environments" * } { - [ [ "" ] "ceq_ext" "ceq_ext_ceq_ext" * ] - [ [ "" ] "cext2" * ] - [ [ "" ] "lenv_length" + "( |?| )" * ] - [ [ "" ] "lenv_weight" + "( ♯{?} )" * ] - [ [ "" ] "lenv" * ] - } - ] - [ { "binders for local environments" * } { - [ [ "" ] "ext2" "ext2_tc" + "ext2_ext2" * ] - [ [ "" ] "bind" "bind_weight" * ] - } - ] - [ { "terms" * } { - [ [ "" ] "term_vector" + "( Ⓐ?.? )" * ] - [ [ "" ] "term_simple" + "( 𝐒⦃?⦄ )" * ] - [ [ "" ] "term_weight" + "( ♯{?} )" * ] - [ [ "" ] "term" * ] - } - ] - [ { "items" * } { - [ [ "" ] "item_sd" * ] - [ [ "" ] "item_sh" * ] - [ [ "" ] "item" * ] - } - ] - [ { "atomic arities" * } { - [ [ "" ] "aarity" * ] - } - ] - } - ] } class "top" { * } diff --git a/matita/matita/contribs/lambdadelta/compile_static.sh b/matita/matita/contribs/lambdadelta/compile_static.sh deleted file mode 100644 index 827c52e18..000000000 --- a/matita/matita/contribs/lambdadelta/compile_static.sh +++ /dev/null @@ -1 +0,0 @@ -../../matitac.opt `cat static.txt` diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma index 1c13de648..dde95e8a7 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "ground_2/notation/constructors/uparrow_1.ma". +include "ground_2/notation/functions/uparrow_1.ma". include "ground_2/notation/functions/downarrow_1.ma". include "arithmetics/nat.ma". include "ground_2/lib/relations.ma". diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/bool.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/bool.ma index 01f2780ff..7dd817f97 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/bool.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/bool.ma @@ -14,8 +14,8 @@ include "basics/bool.ma". include "ground_2/lib/relations.ma". -include "ground_2/notation/constructors/no_0.ma". -include "ground_2/notation/constructors/yes_0.ma". +include "ground_2/notation/functions/no_0.ma". +include "ground_2/notation/functions/yes_0.ma". (* BOOLEAN PROPERTIES *******************************************************) diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma index 07e13ea8f..fb643311a 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "ground_2/notation/constructors/circledE_1.ma". -include "ground_2/notation/constructors/oplusright_3.ma". +include "ground_2/notation/functions/circledE_1.ma". +include "ground_2/notation/functions/oplusright_3.ma". include "ground_2/lib/relations.ma". (* LISTS ********************************************************************) diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma index a308e5481..e1b3a6812 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "ground_2/notation/constructors/oplusright_3.ma". +include "ground_2/notation/functions/oplusright_3.ma". include "ground_2/lib/relations.ma". (* STREAMS ******************************************************************) diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/circledE_1.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/circledE_1.ma deleted file mode 100644 index 53cf85698..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/circledE_1.ma +++ /dev/null @@ -1,27 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation < "hvbox( Ⓔ )" - non associative with precedence 55 - for @{ 'CircledE $S }. - -notation > "hvbox( Ⓔ )" - non associative with precedence 55 - for @{ 'CircledE ? }. - -notation > "hvbox( Ⓔ{ term 46 C } )" - non associative with precedence 55 - for @{ 'CircledE $S }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/diamond_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/diamond_0.ma deleted file mode 100644 index 4f218dd61..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/diamond_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "◊" - non associative with precedence 55 - for @{ 'Diamond }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/infinity_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/infinity_0.ma deleted file mode 100644 index f5c849158..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/infinity_0.ma +++ /dev/null @@ -1,20 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "∞" - non associative with precedence 55 - for @{ 'Infinity }. - diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/no_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/no_0.ma deleted file mode 100644 index af692211e..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/no_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "Ⓕ" - non associative with precedence 55 - for @{'no}. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/onezero_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/onezero_0.ma deleted file mode 100644 index 5df776e6a..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/onezero_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "𝟙𝟘" - non associative with precedence 55 - for @{ 'OneZero }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/oplusright_3.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/oplusright_3.ma deleted file mode 100644 index e172f4abe..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/oplusright_3.ma +++ /dev/null @@ -1,27 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation < "hvbox( hd ⨮ break tl )" - right associative with precedence 47 - for @{ 'OPlusRight $S $hd $tl }. - -notation > "hvbox( hd ⨮ break tl )" - right associative with precedence 47 - for @{ 'OPlusRight ? $hd $tl }. - -notation > "hvbox( hd ⨮{ break term 46 S } break term 46 tl )" - non associative with precedence 47 - for @{ 'OPlusRight $S $hd $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/semicolon_3.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/semicolon_3.ma deleted file mode 100644 index 44b7c17a5..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/semicolon_3.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "hvbox( { term 46 hd1, break term 46 hd2 }; break term 46 tl )" - non associative with precedence 47 - for @{ 'Semicolon $hd1 $hd2 $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/tuple_4.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/tuple_4.ma deleted file mode 100644 index 551ee0d94..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/tuple_4.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "hvbox ( 〈 term 46 x1, break term 46 x2 , break term 46 x3, break term 46 x4 〉 )" - non associative with precedence 55 - for @{ 'Tuple $x1 $x2 $x3 $x4 }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/uparrow_1.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/uparrow_1.ma deleted file mode 100644 index 01bc8d156..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/uparrow_1.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "hvbox( ↑ term 70 T )" - non associative with precedence 70 - for @{ 'UpArrow $T }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/yes_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/yes_0.ma deleted file mode 100644 index c321749ae..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/yes_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "Ⓣ" - non associative with precedence 55 - for @{'yes}. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/zeroone_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/zeroone_0.ma deleted file mode 100644 index ff195abe1..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/zeroone_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "𝟘𝟙" - non associative with precedence 55 - for @{ 'ZeroOne }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/zerozero_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/zerozero_0.ma deleted file mode 100644 index cb4b10dad..000000000 --- a/matita/matita/contribs/lambdadelta/ground_2/notation/constructors/zerozero_0.ma +++ /dev/null @@ -1,19 +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 *) -(* *) -(**************************************************************************) - -(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) - -notation "𝟘𝟘" - non associative with precedence 55 - for @{ 'ZeroZero }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/circledE_1.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/circledE_1.ma new file mode 100644 index 000000000..53cf85698 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/circledE_1.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation < "hvbox( Ⓔ )" + non associative with precedence 55 + for @{ 'CircledE $S }. + +notation > "hvbox( Ⓔ )" + non associative with precedence 55 + for @{ 'CircledE ? }. + +notation > "hvbox( Ⓔ{ term 46 C } )" + non associative with precedence 55 + for @{ 'CircledE $S }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/diamond_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/diamond_0.ma new file mode 100644 index 000000000..4f218dd61 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/diamond_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "◊" + non associative with precedence 55 + for @{ 'Diamond }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/infinity_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/infinity_0.ma new file mode 100644 index 000000000..f5c849158 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/infinity_0.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "∞" + non associative with precedence 55 + for @{ 'Infinity }. + diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/no_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/no_0.ma new file mode 100644 index 000000000..af692211e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/no_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "Ⓕ" + non associative with precedence 55 + for @{'no}. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/onezero_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/onezero_0.ma new file mode 100644 index 000000000..5df776e6a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/onezero_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "𝟙𝟘" + non associative with precedence 55 + for @{ 'OneZero }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/oplusright_3.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/oplusright_3.ma new file mode 100644 index 000000000..e172f4abe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/oplusright_3.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation < "hvbox( hd ⨮ break tl )" + right associative with precedence 47 + for @{ 'OPlusRight $S $hd $tl }. + +notation > "hvbox( hd ⨮ break tl )" + right associative with precedence 47 + for @{ 'OPlusRight ? $hd $tl }. + +notation > "hvbox( hd ⨮{ break term 46 S } break term 46 tl )" + non associative with precedence 47 + for @{ 'OPlusRight $S $hd $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/semicolon_3.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/semicolon_3.ma new file mode 100644 index 000000000..44b7c17a5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/semicolon_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( { term 46 hd1, break term 46 hd2 }; break term 46 tl )" + non associative with precedence 47 + for @{ 'Semicolon $hd1 $hd2 $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/tuple_4.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/tuple_4.ma new file mode 100644 index 000000000..551ee0d94 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/tuple_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox ( 〈 term 46 x1, break term 46 x2 , break term 46 x3, break term 46 x4 〉 )" + non associative with precedence 55 + for @{ 'Tuple $x1 $x2 $x3 $x4 }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/uparrow_1.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/uparrow_1.ma new file mode 100644 index 000000000..01bc8d156 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/uparrow_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( ↑ term 70 T )" + non associative with precedence 70 + for @{ 'UpArrow $T }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/yes_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/yes_0.ma new file mode 100644 index 000000000..c321749ae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/yes_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "Ⓣ" + non associative with precedence 55 + for @{'yes}. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/zeroone_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/zeroone_0.ma new file mode 100644 index 000000000..ff195abe1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/zeroone_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "𝟘𝟙" + non associative with precedence 55 + for @{ 'ZeroOne }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/functions/zerozero_0.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/zerozero_0.ma new file mode 100644 index 000000000..cb4b10dad --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/notation/functions/zerozero_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "𝟘𝟘" + non associative with precedence 55 + for @{ 'ZeroZero }. diff --git a/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2.ma b/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2.ma index b6062f295..6efc427c8 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "ground_2/notation/constructors/diamond_0.ma". -include "ground_2/notation/constructors/semicolon_3.ma". +include "ground_2/notation/functions/diamond_0.ma". +include "ground_2/notation/functions/semicolon_3.ma". include "ground_2/lib/arith.ma". (* MULTIPLE RELOCATION WITH PAIRS *******************************************) diff --git a/matita/matita/contribs/lambdadelta/ground_2/steps/rtc.ma b/matita/matita/contribs/lambdadelta/ground_2/steps/rtc.ma index 87c091b19..1e08d2474 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/steps/rtc.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/steps/rtc.ma @@ -12,10 +12,10 @@ (* *) (**************************************************************************) -include "ground_2/notation/constructors/tuple_4.ma". -include "ground_2/notation/constructors/zerozero_0.ma". -include "ground_2/notation/constructors/zeroone_0.ma". -include "ground_2/notation/constructors/onezero_0.ma". +include "ground_2/notation/functions/tuple_4.ma". +include "ground_2/notation/functions/zerozero_0.ma". +include "ground_2/notation/functions/zeroone_0.ma". +include "ground_2/notation/functions/onezero_0.ma". include "ground_2/lib/arith.ma". (* RT-TRANSITION COUNTER ****************************************************) diff --git a/matita/matita/contribs/lambdadelta/ground_2/ynat/ynat.ma b/matita/matita/contribs/lambdadelta/ground_2/ynat/ynat.ma index 7e2c2dc6c..4f3f85bb9 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/ynat/ynat.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/ynat/ynat.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "ground_2/lib/arith.ma". -include "ground_2/notation/constructors/infinity_0.ma". +include "ground_2/notation/functions/infinity_0.ma". (* NATURAL NUMBERS WITH INFINITY ********************************************) diff --git a/matita/matita/contribs/lambdadelta/partial.txt b/matita/matita/contribs/lambdadelta/partial.txt index 40cb2929d..9ab2c9283 100644 --- a/matita/matita/contribs/lambdadelta/partial.txt +++ b/matita/matita/contribs/lambdadelta/partial.txt @@ -1,10 +1,5 @@ ground_2 -basic_2/syntax -basic_2/relocation -basic_2/s_transition -basic_2/s_computation -basic_2/static -basic_2/i_static +static_2 basic_2/rt_transition basic_2/rt_computation basic_2/rt_conversion diff --git a/matita/matita/contribs/lambdadelta/replace.sh b/matita/matita/contribs/lambdadelta/replace.sh index 291dc454a..fcc328a85 100644 --- a/matita/matita/contribs/lambdadelta/replace.sh +++ b/matita/matita/contribs/lambdadelta/replace.sh @@ -1,5 +1,5 @@ #!/bin/sh -for SRC in `find ground_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do +for SRC in `find grond_2 static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do sed "s!$1!$2!g" ${SRC} > ${SRC}.new if [ ! -s ${SRC}.new ] || diff ${SRC} ${SRC}.new > /dev/null; then rm -f ${SRC}.new; diff --git a/matita/matita/contribs/lambdadelta/static.txt b/matita/matita/contribs/lambdadelta/static.txt deleted file mode 100644 index 7596031ba..000000000 --- a/matita/matita/contribs/lambdadelta/static.txt +++ /dev/null @@ -1,7 +0,0 @@ -ground_2 -basic_2/syntax -basic_2/relocation -basic_2/s_transition -basic_2/s_computation -basic_2/static -basic_2/i_static diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs.ma new file mode 100644 index 000000000..8beb5bc3f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs.ma @@ -0,0 +1,195 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/star.ma". +include "static_2/notation/relations/relationstar_4.ma". +include "static_2/static/rex.ma". + +(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) + +definition rexs (R): term → relation lenv ≝ CTC … (rex R). + +interpretation "iterated extension on referred entries (local environment)" + 'RelationStar R T L1 L2 = (rexs R T L1 L2). + +(* Basic properties *********************************************************) + +lemma rexs_step_dx: ∀R,L1,L,T. L1 ⪤*[R, T] L → + ∀L2. L ⪤[R, T] L2 → L1 ⪤*[R, T] L2. +#R #L1 #L2 #T #HL1 #L2 @step @HL1 (**) (* auto fails *) +qed-. + +lemma rexs_step_sn: ∀R,L1,L,T. L1 ⪤[R, T] L → + ∀L2. L ⪤*[R, T] L2 → L1 ⪤*[R, T] L2. +#R #L1 #L2 #T #HL1 #L2 @TC_strap @HL1 (**) (* auto fails *) +qed-. + +lemma rexs_atom: ∀R,I. ⋆ ⪤*[R, ⓪{I}] ⋆. +/2 width=1 by inj/ qed. + +lemma rexs_sort: ∀R,I,L1,L2,V1,V2,s. + L1 ⪤*[R, ⋆s] L2 → L1.ⓑ{I}V1 ⪤*[R, ⋆s] L2.ⓑ{I}V2. +#R #I #L1 #L2 #V1 #V2 #s #H elim H -L2 +/3 width=4 by rex_sort, rexs_step_dx, inj/ +qed. + +lemma rexs_pair: ∀R. (∀L. reflexive … (R L)) → + ∀I,L1,L2,V. L1 ⪤*[R, V] L2 → + L1.ⓑ{I}V ⪤*[R, #0] L2.ⓑ{I}V. +#R #HR #I #L1 #L2 #V #H elim H -L2 +/3 width=5 by rex_pair, rexs_step_dx, inj/ +qed. + +lemma rexs_unit: ∀R,f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R, cfull, f] L2 → + L1.ⓤ{I} ⪤*[R, #0] L2.ⓤ{I}. +/3 width=3 by rex_unit, inj/ qed. + +lemma rexs_lref: ∀R,I,L1,L2,V1,V2,i. + L1 ⪤*[R, #i] L2 → L1.ⓑ{I}V1 ⪤*[R, #↑i] L2.ⓑ{I}V2. +#R #I #L1 #L2 #V1 #V2 #i #H elim H -L2 +/3 width=4 by rex_lref, rexs_step_dx, inj/ +qed. + +lemma rexs_gref: ∀R,I,L1,L2,V1,V2,l. + L1 ⪤*[R, §l] L2 → L1.ⓑ{I}V1 ⪤*[R, §l] L2.ⓑ{I}V2. +#R #I #L1 #L2 #V1 #V2 #l #H elim H -L2 +/3 width=4 by rex_gref, rexs_step_dx, inj/ +qed. + +lemma rexs_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → + ∀L1,L2,T. L1 ⪤*[R1, T] L2 → L1 ⪤*[R2, T] L2. +#R1 #R2 #HR #L1 #L2 #T #H elim H -L2 +/4 width=5 by rex_co, rexs_step_dx, inj/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +(* Basic_2A1: uses: TC_lpx_sn_inv_atom1 *) +lemma rexs_inv_atom_sn: ∀R,I,Y2. ⋆ ⪤*[R, ⓪{I}] Y2 → Y2 = ⋆. +#R #I #Y2 #H elim H -Y2 /3 width=3 by inj, rex_inv_atom_sn/ +qed-. + +(* Basic_2A1: uses: TC_lpx_sn_inv_atom2 *) +lemma rexs_inv_atom_dx: ∀R,I,Y1. Y1 ⪤*[R, ⓪{I}] ⋆ → Y1 = ⋆. +#R #I #Y1 #H @(TC_ind_dx ??????? H) -Y1 +/3 width=3 by inj, rex_inv_atom_dx/ +qed-. + +lemma rexs_inv_sort: ∀R,Y1,Y2,s. Y1 ⪤*[R, ⋆s] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ⪤*[R, ⋆s] L2 & + Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. +#R #Y1 #Y2 #s #H elim H -Y2 +[ #Y2 #H elim (rex_inv_sort … H) -H * + /4 width=8 by ex3_4_intro, inj, or_introl, or_intror, conj/ +| #Y #Y2 #_ #H elim (rex_inv_sort … H) -H * + [ #H #H2 * * /3 width=7 by ex3_4_intro, or_introl, or_intror, conj/ + | #I #I2 #L #L2 #HL2 #H #H2 * * + [ #H1 #H0 destruct + | #I1 #I0 #L1 #L0 #HL10 #H1 #H0 destruct + /4 width=7 by ex3_4_intro, rexs_step_dx, or_intror/ + ] + ] +] +qed-. + +lemma rexs_inv_gref: ∀R,Y1,Y2,l. Y1 ⪤*[R, §l] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ⪤*[R, §l] L2 & + Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. +#R #Y1 #Y2 #l #H elim H -Y2 +[ #Y2 #H elim (rex_inv_gref … H) -H * + /4 width=8 by ex3_4_intro, inj, or_introl, or_intror, conj/ +| #Y #Y2 #_ #H elim (rex_inv_gref … H) -H * + [ #H #H2 * * /3 width=7 by ex3_4_intro, or_introl, or_intror, conj/ + | #I #I2 #L #L2 #HL2 #H #H2 * * + [ #H1 #H0 destruct + | #I1 #I0 #L1 #L0 #HL10 #H1 #H0 destruct + /4 width=7 by ex3_4_intro, rexs_step_dx, or_intror/ + ] + ] +] +qed-. + +lemma rexs_inv_bind: ∀R. (∀L. reflexive … (R L)) → + ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → + ∧∧ L1 ⪤*[R, V] L2 & L1.ⓑ{I}V ⪤*[R, T] L2.ⓑ{I}V. +#R #HR #p #I #L1 #L2 #V #T #H elim H -L2 +[ #L2 #H elim (rex_inv_bind … V ? H) -H /3 width=1 by inj, conj/ +| #L #L2 #_ #H * elim (rex_inv_bind … V ? H) -H /3 width=3 by rexs_step_dx, conj/ +] +qed-. + +lemma rexs_inv_flat: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ⓕ{I}V.T] L2 → + ∧∧ L1 ⪤*[R, V] L2 & L1 ⪤*[R, T] L2. +#R #I #L1 #L2 #V #T #H elim H -L2 +[ #L2 #H elim (rex_inv_flat … H) -H /3 width=1 by inj, conj/ +| #L #L2 #_ #H * elim (rex_inv_flat … H) -H /3 width=3 by rexs_step_dx, conj/ +] +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma rexs_inv_sort_bind_sn: ∀R,I1,Y2,L1,s. L1.ⓘ{I1} ⪤*[R, ⋆s] Y2 → + ∃∃I2,L2. L1 ⪤*[R, ⋆s] L2 & Y2 = L2.ⓘ{I2}. +#R #I1 #Y2 #L1 #s #H elim (rexs_inv_sort … H) -H * +[ #H destruct +| #Z #I2 #Y1 #L2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rexs_inv_sort_bind_dx: ∀R,I2,Y1,L2,s. Y1 ⪤*[R, ⋆s] L2.ⓘ{I2} → + ∃∃I1,L1. L1 ⪤*[R, ⋆s] L2 & Y1 = L1.ⓘ{I1}. +#R #I2 #Y1 #L2 #s #H elim (rexs_inv_sort … H) -H * +[ #_ #H destruct +| #I1 #Z #L1 #Y2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rexs_inv_gref_bind_sn: ∀R,I1,Y2,L1,l. L1.ⓘ{I1} ⪤*[R, §l] Y2 → + ∃∃I2,L2. L1 ⪤*[R, §l] L2 & Y2 = L2.ⓘ{I2}. +#R #I1 #Y2 #L1 #l #H elim (rexs_inv_gref … H) -H * +[ #H destruct +| #Z #I2 #Y1 #L2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rexs_inv_gref_bind_dx: ∀R,I2,Y1,L2,l. Y1 ⪤*[R, §l] L2.ⓘ{I2} → + ∃∃I1,L1. L1 ⪤*[R, §l] L2 & Y1 = L1.ⓘ{I1}. +#R #I2 #Y1 #L2 #l #H elim (rexs_inv_gref … H) -H * +[ #_ #H destruct +| #I1 #Z #L1 #Y2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma rexs_fwd_pair_sn: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ②{I}V.T] L2 → L1 ⪤*[R, V] L2. +#R #I #L1 #L2 #V #T #H elim H -L2 +/3 width=5 by rex_fwd_pair_sn, rexs_step_dx, inj/ +qed-. + +lemma rexs_fwd_bind_dx: ∀R. (∀L. reflexive … (R L)) → + ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → + L1.ⓑ{I}V ⪤*[R, T] L2.ⓑ{I}V. +#R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind … H) -H // +qed-. + +lemma rexs_fwd_flat_dx: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ⓕ{I}V.T] L2 → L1 ⪤*[R, T] L2. +#R #I #L1 #L2 #V #T #H elim (rexs_inv_flat … H) -H // +qed-. + +(* Basic_2A1: removed theorems 2: + TC_lpx_sn_inv_pair1 TC_lpx_sn_inv_pair2 +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_drops.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_drops.ma new file mode 100644 index 000000000..0b83c6431 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_drops.ma @@ -0,0 +1,72 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/seq_seq.ma". +include "static_2/static/rex_drops.ma". +include "static_2/i_static/rexs.ma". + +(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) + +definition tc_f_dedropable_sn: predicate (relation3 lenv term term) ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → + ∀K2,T. K1 ⪤*[R, T] K2 → ∀U. ⬆*[f] T ≘ U → + ∃∃L2. L1 ⪤*[R, U] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. + +definition tc_f_dropable_sn: predicate (relation3 lenv term term) ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → + ∀L2,U. L1 ⪤*[R, U] L2 → ∀T. ⬆*[f] T ≘ U → + ∃∃K2. K1 ⪤*[R, T] K2 & ⬇*[b, f] L2 ≘ K2. + +definition tc_f_dropable_dx: predicate (relation3 lenv term term) ≝ + λR. ∀L1,L2,U. L1 ⪤*[R, U] L2 → + ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U → + ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤*[R, T] K2. + +(* Properties with generic slicing for local environments *******************) + +lemma dedropable_sn_CTC: ∀R. f_dedropable_sn R → tc_f_dedropable_sn R. +#R #HR #b #f #L1 #K1 #HLK1 #K2 #T #H elim H -K2 +[ #K2 #HK12 #U #HTU elim (HR … HLK1 … HK12 … HTU) -K1 -T -HR + /3 width=4 by ex3_intro, inj/ +| #K #K2 #_ #HK2 #IH #U #HTU -HLK1 + elim (IH … HTU) -IH #L #HL1 #HLK + elim (HR … HLK … HK2 … HTU) -K -T -HR + /3 width=6 by seq_trans, rexs_step_dx, ex3_intro/ +] +qed-. + +(* Inversion lemmas with generic slicing for local environments *************) + +lemma dropable_sn_CTC: ∀R. f_dropable_sn R → tc_f_dropable_sn R. +#R #HR #b #f #L1 #K1 #HLK1 #Hf #L2 #U #H elim H -L2 +[ #L2 #HL12 #T #HTU elim (HR … HLK1 … HL12 … HTU) -L1 -U -HR + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 #IH #T #HTU -HLK1 + elim (IH … HTU) -IH #K #HK1 #HLK + elim (HR … HLK … HL2 … HTU) -L -U -HR + /3 width=3 by rexs_step_dx, ex2_intro/ +] +qed-. + +lemma dropable_dx_CTC: ∀R. f_dropable_dx R → tc_f_dropable_dx R. +#R #HR #L1 #L2 #U #H elim H -L2 +[ #L2 #HL12 #b #f #K2 #HLK2 #Hf #T #HTU + elim (HR … HL12 … HLK2 … HTU) -L2 -U -HR + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 #IH #b #f #K2 #HLK2 #Hf #T #HTU + elim (HR … HL2 … HLK2 … HTU) -L2 -HR // #K #HLK #HK2 + elim (IH … HLK … HTU) -IH -L -U + /3 width=5 by rexs_step_dx, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_fqup.ma new file mode 100644 index 000000000..c21d82017 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_fqup.ma @@ -0,0 +1,75 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rex_fqup.ma". +include "static_2/i_static/rexs.ma". + +(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) + +(* Advanced properties ******************************************************) + +lemma rexs_refl: ∀R. c_reflexive … R → + ∀T. reflexive … (rexs R T). +/3 width=1 by rex_refl, inj/ qed. + +(* Basic_2A1: uses: TC_lpx_sn_pair TC_lpx_sn_pair_refl *) +lemma rexs_pair_refl: ∀R. c_reflexive … R → + ∀L,V1,V2. CTC … R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤*[R, T] L.ⓑ{I}V2. +#R #HR #L #V1 #V2 #H elim H -V2 +/3 width=3 by rexs_step_dx, rex_pair_refl, inj/ +qed. + +lemma rexs_tc: ∀R,L1,L2,T,f. 𝐈⦃f⦄ → TC … (sex cfull (cext2 R) f) L1 L2 → + L1 ⪤*[R, T] L2. +#R #L1 #L2 #T #f #Hf #H elim H -L2 +[ elim (frees_total L1 T) | #L elim (frees_total L T) ] +/5 width=7 by sex_sdj, rexs_step_dx, sdj_isid_sn, inj, ex2_intro/ +qed. + +(* Advanced eliminators *****************************************************) + +lemma rexs_ind_sn: ∀R. c_reflexive … R → + ∀L1,T. ∀Q:predicate …. Q L1 → + (∀L,L2. L1 ⪤*[R, T] L → L ⪤[R, T] L2 → Q L → Q L2) → + ∀L2. L1 ⪤*[R, T] L2 → Q L2. +#R #HR #L1 #T #Q #HL1 #IHL1 #L2 #HL12 +@(TC_star_ind … HL1 IHL1 … HL12) /2 width=1 by rex_refl/ +qed-. + +lemma rexs_ind_dx: ∀R. c_reflexive … R → + ∀L2,T. ∀Q:predicate …. Q L2 → + (∀L1,L. L1 ⪤[R, T] L → L ⪤*[R, T] L2 → Q L → Q L1) → + ∀L1. L1 ⪤*[R, T] L2 → Q L1. +#R #HR #L2 #Q #HL2 #IHL2 #L1 #HL12 +@(TC_star_ind_dx … HL2 IHL2 … HL12) /2 width=4 by rex_refl/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma rexs_inv_bind_void: ∀R. c_reflexive … R → + ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → + ∧∧ L1 ⪤*[R, V] L2 & L1.ⓧ ⪤*[R, T] L2.ⓧ. +#R #HR #p #I #L1 #L2 #V #T #H @(rexs_ind_sn … HR … H) -L2 +[ /3 width=1 by rexs_refl, conj/ +| #L #L2 #_ #H * elim (rex_inv_bind_void … H) -H /3 width=3 by rexs_step_dx, conj/ +] +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma rexs_fwd_bind_dx_void: ∀R. c_reflexive … R → + ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 → + L1.ⓧ ⪤*[R, T] L2.ⓧ. +#R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind_void … H) -H // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_length.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_length.ma new file mode 100644 index 000000000..a5c82f9f5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_length.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rex_length.ma". +include "static_2/i_static/rexs.ma". + +(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: uses: TC_lpx_sn_fwd_length *) +lemma rexs_fwd_length: ∀R,L1,L2,T. L1 ⪤*[R, T] L2 → |L1| = |L2|. +#R #L1 #L2 #T #H elim H -L2 +[ #L2 #HL12 >(rex_fwd_length … HL12) -HL12 // +| #L #L2 #_ #HL2 #IHL1 + >IHL1 -L1 >(rex_fwd_length … HL2) -HL2 // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma new file mode 100644 index 000000000..4ac00b7a1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lex_tc.ma". +include "static_2/static/req_fqup.ma". +include "static_2/static/req_fsle.ma". +include "static_2/i_static/rexs_fqup.ma". + +(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) + +(* Properties with generic extension of a context sensitive relation ********) + +lemma rexs_lex: ∀R. c_reflexive … R → + ∀L1,L2,T. L1 ⪤[CTC … R] L2 → L1 ⪤*[R, T] L2. +#R #HR #L1 #L2 #T * +/5 width=7 by rexs_tc, sex_inv_tc_dx, sex_co, ext2_inv_tc, ext2_refl/ +qed. + +lemma rexs_lex_req: ∀R. c_reflexive … R → + ∀L1,L. L1 ⪤[CTC … R] L → ∀L2,T. L ≡[T] L2 → + L1 ⪤*[R, T] L2. +/3 width=3 by rexs_lex, rexs_step_dx, req_fwd_rex/ qed. + +(* Inversion lemmas with generic extension of a context sensitive relation **) + +(* Note: s_rs_transitive_lex_inv_isid could be invoked in the last auto but makes it too slow *) +lemma rexs_inv_lex_req: ∀R. c_reflexive … R → + rex_fsge_compatible R → + s_rs_transitive … R (λ_.lex R) → + req_transitive R → + ∀L1,L2,T. L1 ⪤*[R, T] L2 → + ∃∃L. L1 ⪤[CTC … R] L & L ≡[T] L2. +#R #H1R #H2R #H3R #H4R #L1 #L2 #T #H +lapply (s_rs_transitive_lex_inv_isid … H3R) -H3R #H3R +@(rexs_ind_sn … H1R … H) -H -L2 +[ /4 width=3 by req_refl, lex_refl, inj, ex2_intro/ +| #L0 #L2 #_ #HL02 * #L * #f0 #Hf0 #HL1 #HL0 + lapply (req_rex_trans … HL0 … HL02) -L0 // * #f1 #Hf1 #HL2 + elim (sex_sdj_split … ceq_ext … HL2 f0 ?) -HL2 + [ #L0 #HL0 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ] + lapply (sex_sdj … HL0 f1 ?) /2 width=1 by sdj_isid_sn/ #H + elim (frees_sex_conf … Hf1 … H) // -H2R -H #f2 #Hf2 #Hf21 + lapply (sle_sex_trans … HL02 … Hf21) -f1 // #HL02 + lapply (sex_co ?? cfull (CTC … (cext2 R)) … HL1) -HL1 /2 width=1 by ext2_inv_tc/ #HL1 + /8 width=11 by sex_inv_tc_dx, sex_tc_dx, sex_co, ext2_tc, ext2_refl, step, ex2_intro/ (**) (* full auto too slow *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_rexs.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_rexs.ma new file mode 100644 index 000000000..2a1a9b0d8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_rexs.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rex_fsle.ma". +include "static_2/i_static/rexs.ma". + +(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) + +(* Advanced properties ******************************************************) + +lemma rexs_sym: ∀R. rex_fsge_compatible R → + (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) → + ∀T. symmetric … (rexs R T). +#R #H1R #H2R #T #L1 #L2 #H elim H -L2 +/4 width=3 by rex_sym, rexs_step_sn, inj/ +qed-. + +(* Main properties **********************************************************) + +theorem rexs_trans: ∀R,T. Transitive … (rexs R T). +#R #T #L1 #L #HL1 #L2 #HL2 @(trans_TC … HL1 HL2) (**) (* auto fails *) +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabbr_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabbr_2.ma new file mode 100644 index 000000000..1eea5226e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabbr_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L. break ⓓ T1 )" + left associative with precedence 50 + for @{ 'DxAbbr $L $T1 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabst_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabst_2.ma new file mode 100644 index 000000000..3bb334e86 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabst_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L. break ⓛ T1 )" + left associative with precedence 51 + for @{ 'DxAbst $L $T1 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind1_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind1_2.ma new file mode 100644 index 000000000..5e78eeb18 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind1_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L. break ⓤ { term 46 I } )" + non associative with precedence 47 + for @{ 'DxBind1 $L $I }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind2_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind2_3.ma new file mode 100644 index 000000000..6800d8e5c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L. break ⓑ { term 46 I } break term 49 T1 )" + non associative with precedence 48 + for @{ 'DxBind2 $L $I $T1 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxitem_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxitem_2.ma new file mode 100644 index 000000000..c2e0b42dd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxitem_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L. ⓘ { break term 46 I } )" + non associative with precedence 46 + for @{'DxItem $L $I }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxvoid_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxvoid_1.ma new file mode 100644 index 000000000..58faf0664 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/dxvoid_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L. ⓧ )" + non associative with precedence 49 + for @{ 'DxVoid $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/gref_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/gref_1.ma new file mode 100644 index 000000000..c67265063 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/gref_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( § term 90 l )" + non associative with precedence 55 + for @{ 'GRef $l }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/item0_0.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/item0_0.ma new file mode 100644 index 000000000..b6e471d3d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/item0_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "⓪" + non associative with precedence 55 + for @{ 'Item0 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/item0_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/item0_1.ma new file mode 100644 index 000000000..2c9e41aef --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/item0_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓪ { term 46 I } )" + non associative with precedence 55 + for @{ 'Item0 $I }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/lref_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/lref_1.ma new file mode 100644 index 000000000..ebab03c01 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/lref_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( # term 90 i )" + non associative with precedence 55 + for @{ 'LRef $i }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbr_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbr_2.ma new file mode 100644 index 000000000..25c3ca773 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbr_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓓ term 55 T. break term 55 L )" + non associative with precedence 55 + for @{ 'SnAbbr $T $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbr_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbr_3.ma new file mode 100644 index 000000000..192f6cd70 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbr_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓓ { term 46 p } break term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbr $p $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbrneg_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbrneg_2.ma new file mode 100644 index 000000000..ecd1a7c63 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbrneg_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓓ term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbrNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbrpos_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbrpos_2.ma new file mode 100644 index 000000000..84aa4d213 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabbrpos_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓓ term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbrPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabst_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabst_2.ma new file mode 100644 index 000000000..f5219bf69 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabst_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓛ term 55 T. break term 55 L )" + non associative with precedence 55 + for @{ 'SnAbst $T $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabst_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabst_3.ma new file mode 100644 index 000000000..2c9253d98 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabst_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓛ { term 46 p } break term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbst $p $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabstneg_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabstneg_2.ma new file mode 100644 index 000000000..e4dc84a10 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabstneg_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓛ term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbstNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabstpos_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabstpos_2.ma new file mode 100644 index 000000000..a54fadce2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snabstpos_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓛ term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbstPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snappl_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snappl_2.ma new file mode 100644 index 000000000..615e70bd3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snappl_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓐ term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAppl $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snapplvector_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snapplvector_2.ma new file mode 100644 index 000000000..a7c92b4fe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snapplvector_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( Ⓐ term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnApplVector $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind1_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind1_2.ma new file mode 100644 index 000000000..8cac6eac6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind1_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓤ { term 46 I }. break term 55 L )" + non associative with precedence 55 + for @{ 'SnBind1 $I $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2_3.ma new file mode 100644 index 000000000..7e73c0fb5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓑ { term 46 I } break term 55 T. break term 55 L )" + non associative with precedence 55 + for @{ 'SnBind2 $I $T $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2_4.ma new file mode 100644 index 000000000..b36457861 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓑ { term 46 p, break term 46 I } break term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2 $p $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2neg_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2neg_3.ma new file mode 100644 index 000000000..c75fe170d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2neg_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓑ { term 46 I } break term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2Neg $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2pos_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2pos_3.ma new file mode 100644 index 000000000..ca7a9d921 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snbind2pos_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓑ { term 46 I } break term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2Pos $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/sncast_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/sncast_2.ma new file mode 100644 index 000000000..eddb2e583 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/sncast_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓝ term 55 T1. break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnCast $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snflat2_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snflat2_3.ma new file mode 100644 index 000000000..b0fdc8987 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snflat2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓕ { term 46 I } break term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnFlat2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem2_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem2_2.ma new file mode 100644 index 000000000..90bc4ed5b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem2_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ② term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnItem2 $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem2_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem2_3.ma new file mode 100644 index 000000000..d455b5103 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ② { term 46 I } break term 55 T1. break term 55 T )" + non associative with precedence 55 + for @{ 'SnItem2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem_2.ma new file mode 100644 index 000000000..7046d2247 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snitem_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓘ { term 46 I }. break term 55 L )" + non associative with precedence 55 + for @{ 'SnItem $I $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/snvoid_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snvoid_1.ma new file mode 100644 index 000000000..2615d8c66 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/snvoid_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓧ. term 55 L )" + non associative with precedence 55 + for @{ 'SnVoid $L }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/star_0.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/star_0.ma new file mode 100644 index 000000000..8cf6da569 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/star_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "⋆" + non associative with precedence 46 + for @{ 'Star }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/star_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/star_1.ma new file mode 100644 index 000000000..af8fa6675 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/star_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⋆ term 90 s )" + non associative with precedence 55 + for @{ 'Star $s }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_1.ma new file mode 100644 index 000000000..3cd52cc2f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 X } )" + non associative with precedence 90 + for @{ 'Weight $X }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_2.ma new file mode 100644 index 000000000..8d13242c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 L, break term 46 T } )" + non associative with precedence 90 + for @{ 'Weight $L $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_3.ma new file mode 100644 index 000000000..de765db43 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/functions/weight_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 G, break term 46 L, break term 46 T } )" + non associative with precedence 90 + for @{ 'Weight $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/atomicarity_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/atomicarity_4.ma new file mode 100644 index 000000000..9659409b9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/atomicarity_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L⦄ ⊢ break term 46 T ⁝ break term 46 A )" + non associative with precedence 45 + for @{ 'AtomicArity $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/freestar_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/freestar_3.ma new file mode 100644 index 000000000..02c33853c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/freestar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L ⊢ 𝐅 * ⦃ break term 46 T ⦄ ≘ break term 46 f )" + non associative with precedence 45 + for @{ 'FreeStar $L $T $f }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/ideqsn_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/ideqsn_3.ma new file mode 100644 index 000000000..3ba302519 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/ideqsn_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ≡ [ break term 46 f ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'IdEqSn $f $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/ineint_5.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/ineint_5.ma new file mode 100644 index 000000000..1705b31be --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/ineint_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L, break term 46 T ⦄ ϵ [ break term 46 R ] 〚 break term 46 A 〛 )" + non associative with precedence 45 + for @{ 'InEInt $R $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqa_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqa_3.ma new file mode 100644 index 000000000..c3b74a96a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqa_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ⁝ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqA $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqc_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqc_2.ma new file mode 100644 index 000000000..3a6e5eded --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqc_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⫃ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqC $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqc_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqc_4.ma new file mode 100644 index 000000000..6b9fa4dfd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqc_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ [ break term 46 R ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqC $R $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqf_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqf_4.ma new file mode 100644 index 000000000..413553ccd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqf_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 L1, break term 46 f1 ⦄ ⫃ 𝐅* ⦃ break term 46 L2, break term 46 f2 ⦄ )" + non associative with precedence 45 + for @{ 'LRSubEqF $L1 $f1 $L2 $f2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/rdropstar_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rdropstar_3.ma new file mode 100644 index 000000000..0e0a3273d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rdropstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ * [ term 46 i ] break term 46 L1 ≘ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDropStar $i $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/rdropstar_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rdropstar_4.ma new file mode 100644 index 000000000..ce4ce12b9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rdropstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ * [ term 46 b, break term 46 f ] break term 46 L1 ≘ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDropStar $b $f $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_3.ma new file mode 100644 index 000000000..251dbf3f9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⪤ [ break term 46 R ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'Relation $R $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_4.ma new file mode 100644 index 000000000..6d4e20cea --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⪤[ break term 46 R, break term 46 T ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'Relation $R $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_5.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_5.ma new file mode 100644 index 000000000..6ad4bb3e7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relation_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⪤[ break term 46 R1, break term 46 R2, break term 46 f ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'Relation $R1 $R2 $f $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/relationstar_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relationstar_4.ma new file mode 100644 index 000000000..bc5939830 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/relationstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⪤*[ break term 46 R, break term 46 T ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'RelationStar $R $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/rliftstar_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rliftstar_3.ma new file mode 100644 index 000000000..26d0262de --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rliftstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬆ * [ term 46 f ] break term 46 T1 ≘ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RLiftStar $f $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/simple_1.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/simple_1.ma new file mode 100644 index 000000000..0acfb4ef7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/simple_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( 𝐒 ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'Simple $T }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma new file mode 100644 index 000000000..0f67a8382 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 ≛ [ break term 46 h, break term 46 o ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'StarEq $h $o $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_5.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_5.ma new file mode 100644 index 000000000..553205960 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L ⊢ break term 46 T1 ≛ [ break term 46 h, break term 46 o ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'StarEq $h $o $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_5.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_5.ma new file mode 100644 index 000000000..af611f765 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ≛ [ break term 46 h, break term 46 o, break term 46 T ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'StarEqSn $h $o $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_8.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_8.ma new file mode 100644 index 000000000..6e4ed5d11 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≛ [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'StarEqSn $h $o $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/subseteq_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/subseteq_4.ma new file mode 100644 index 000000000..f7a000112 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/subseteq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊆ ⦃ break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SubSetEq $L1 $T1 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_6.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_6.ma new file mode 100644 index 000000000..72533dc3c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTerm $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_7.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_7.ma new file mode 100644 index 000000000..2e12296b4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐ [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTerm $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_6.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_6.ma new file mode 100644 index 000000000..62a8cbb0b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⸮ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermOpt $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_7.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_7.ma new file mode 100644 index 000000000..dd6db78c2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⸮ [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermOpt $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_6.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_6.ma new file mode 100644 index 000000000..57bdc3d94 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + ⦃ break term 46 G2, term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermPlus $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_7.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_7.ma new file mode 100644 index 000000000..3bbe31a83 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + [ break term 46 b ] ⦃ break term 46 G2, term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermPlus $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_6.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_6.ma new file mode 100644 index 000000000..a0bf55faa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermStar $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_7.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_7.ma new file mode 100644 index 000000000..865019860 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermStar $b $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_4.ma new file mode 100644 index 000000000..e8c080f6a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 ⩳ [ break term 46 h, break term 46 o ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'TopIso $h $o $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/voidstareq_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/voidstareq_4.ma new file mode 100644 index 000000000..77841c6bb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/voidstareq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ≋ⓧ* [ break term 46 n1, break term 46 n2 ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'VoidStarEq $L1 $n1 $n2 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops.ma new file mode 100644 index 000000000..939aeb534 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops.ma @@ -0,0 +1,469 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/rtmap_coafter.ma". +include "static_2/notation/relations/rdropstar_3.ma". +include "static_2/notation/relations/rdropstar_4.ma". +include "static_2/relocation/seq.ma". +include "static_2/relocation/lifts_bind.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Basic_1: includes: drop_skip_bind drop1_skip_bind *) +(* Basic_2A1: includes: drop_atom drop_pair drop_drop drop_skip + drop_refl_atom_O2 drop_drop_lt drop_skip_lt +*) +inductive drops (b:bool): rtmap → relation lenv ≝ +| drops_atom: ∀f. (b = Ⓣ → 𝐈⦃f⦄) → drops b (f) (⋆) (⋆) +| drops_drop: ∀f,I,L1,L2. drops b f L1 L2 → drops b (↑f) (L1.ⓘ{I}) L2 +| drops_skip: ∀f,I1,I2,L1,L2. + drops b f L1 L2 → ⬆*[f] I2 ≘ I1 → + drops b (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2}) +. + +interpretation "uniform slicing (local environment)" + 'RDropStar i L1 L2 = (drops true (uni i) L1 L2). + +interpretation "generic slicing (local environment)" + 'RDropStar b f L1 L2 = (drops b f L1 L2). + +definition d_liftable1: predicate (relation2 lenv term) ≝ + λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b, f] L ≘ K → + ∀U. ⬆*[f] T ≘ U → R L U. + +definition d_liftable1_isuni: predicate (relation2 lenv term) ≝ + λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b, f] L ≘ K → 𝐔⦃f⦄ → + ∀U. ⬆*[f] T ≘ U → R L U. + +definition d_deliftable1: predicate (relation2 lenv term) ≝ + λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b, f] L ≘ K → + ∀T. ⬆*[f] T ≘ U → R K T. + +definition d_deliftable1_isuni: predicate (relation2 lenv term) ≝ + λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b, f] L ≘ K → 𝐔⦃f⦄ → + ∀T. ⬆*[f] T ≘ U → R K T. + +definition d_liftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C. + predicate (lenv → relation C) ≝ + λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b, f] L ≘ K → + ∀U1. S f T1 U1 → + ∃∃U2. S f T2 U2 & R L U1 U2. + +definition d_deliftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C. + predicate (lenv → relation C) ≝ + λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b, f] L ≘ K → + ∀T1. S f T1 U1 → + ∃∃T2. S f T2 U2 & R K T1 T2. + +definition d_liftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C. + predicate (lenv → relation C) ≝ + λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b, f] L ≘ K → + ∀U1. S f T1 U1 → + ∀U2. S f T2 U2 → R L U1 U2. + +definition d_deliftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C. + predicate (lenv → relation C) ≝ + λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b, f] L ≘ K → + ∀T1. S f T1 U1 → + ∀T2. S f T2 U2 → R K T1 T2. + +definition co_dropable_sn: predicate (rtmap → relation lenv) ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → + ∀f2,L2. R f2 L1 L2 → ∀f1. f ~⊚ f1 ≘ f2 → + ∃∃K2. R f1 K1 K2 & ⬇*[b, f] L2 ≘ K2. + +definition co_dropable_dx: predicate (rtmap → relation lenv) ≝ + λR. ∀f2,L1,L2. R f2 L1 L2 → + ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → + ∀f1. f ~⊚ f1 ≘ f2 → + ∃∃K1. ⬇*[b, f] L1 ≘ K1 & R f1 K1 K2. + +definition co_dedropable_sn: predicate (rtmap → relation lenv) ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀f1,K2. R f1 K1 K2 → + ∀f2. f ~⊚ f1 ≘ f2 → + ∃∃L2. R f2 L1 L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. + +(* Basic properties *********************************************************) + +lemma drops_atom_F: ∀f. ⬇*[Ⓕ, f] ⋆ ≘ ⋆. +#f @drops_atom #H destruct +qed. + +lemma drops_eq_repl_back: ∀b,L1,L2. eq_repl_back … (λf. ⬇*[b, f] L1 ≘ L2). +#b #L1 #L2 #f1 #H elim H -f1 -L1 -L2 +[ /4 width=3 by drops_atom, isid_eq_repl_back/ +| #f1 #I #L1 #L2 #_ #IH #f2 #H elim (eq_inv_nx … H) -H + /3 width=3 by drops_drop/ +| #f1 #I1 #I2 #L1 #L2 #_ #HI #IH #f2 #H elim (eq_inv_px … H) -H + /3 width=3 by drops_skip, liftsb_eq_repl_back/ +] +qed-. + +lemma drops_eq_repl_fwd: ∀b,L1,L2. eq_repl_fwd … (λf. ⬇*[b, f] L1 ≘ L2). +#b #L1 #L2 @eq_repl_sym /2 width=3 by drops_eq_repl_back/ (**) (* full auto fails *) +qed-. + +(* Basic_2A1: includes: drop_FT *) +lemma drops_TF: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → ⬇*[Ⓕ, f] L1 ≘ L2. +#f #L1 #L2 #H elim H -f -L1 -L2 +/3 width=1 by drops_atom, drops_drop, drops_skip/ +qed. + +(* Basic_2A1: includes: drop_gen *) +lemma drops_gen: ∀b,f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → ⬇*[b, f] L1 ≘ L2. +* /2 width=1 by drops_TF/ +qed-. + +(* Basic_2A1: includes: drop_T *) +lemma drops_F: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ⬇*[Ⓕ, f] L1 ≘ L2. +* /2 width=1 by drops_TF/ +qed-. + +lemma d_liftable2_sn_bi: ∀C,S. (∀f,c. is_mono … (S f c)) → + ∀R. d_liftable2_sn C S R → d_liftable2_bi C S R. +#C #S #HS #R #HR #K #T1 #T2 #HT12 #b #f #L #HLK #U1 #HTU1 #U2 #HTU2 +elim (HR … HT12 … HLK … HTU1) -HR -K -T1 #X #HTX #HUX +<(HS … HTX … HTU2) -T2 -U2 -b -f // +qed-. + +lemma d_deliftable2_sn_bi: ∀C,S. (∀f. is_inj2 … (S f)) → + ∀R. d_deliftable2_sn C S R → d_deliftable2_bi C S R. +#C #S #HS #R #HR #L #U1 #U2 #HU12 #b #f #K #HLK #T1 #HTU1 #T2 #HTU2 +elim (HR … HU12 … HLK … HTU1) -HR -L -U1 #X #HUX #HTX +<(HS … HUX … HTU2) -U2 -T2 -b -f // +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact drops_inv_atom1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → X = ⋆ → + Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄). +#b #f #X #Y * -f -X -Y +[ /3 width=1 by conj/ +| #f #I #L1 #L2 #_ #H destruct +| #f #I1 #I2 #L1 #L2 #_ #_ #H destruct +] +qed-. + +(* Basic_1: includes: drop_gen_sort *) +(* Basic_2A1: includes: drop_inv_atom1 *) +lemma drops_inv_atom1: ∀b,f,Y. ⬇*[b, f] ⋆ ≘ Y → Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄). +/2 width=3 by drops_inv_atom1_aux/ qed-. + +fact drops_inv_drop1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I,K. X = K.ⓘ{I} → f = ↑g → + ⬇*[b, g] K ≘ Y. +#b #f #X #Y * -f -X -Y +[ #f #Hf #g #J #K #H destruct +| #f #I #L1 #L2 #HL #g #J #K #H1 #H2 <(injective_next … H2) -g destruct // +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J #K #_ #H2 elim (discr_push_next … H2) +] +qed-. + +(* Basic_1: includes: drop_gen_drop *) +(* Basic_2A1: includes: drop_inv_drop1_lt drop_inv_drop1 *) +lemma drops_inv_drop1: ∀b,f,I,K,Y. ⬇*[b, ↑f] K.ⓘ{I} ≘ Y → ⬇*[b, f] K ≘ Y. +/2 width=6 by drops_inv_drop1_aux/ qed-. + +fact drops_inv_skip1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I1,K1. X = K1.ⓘ{I1} → f = ⫯g → + ∃∃I2,K2. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & Y = K2.ⓘ{I2}. +#b #f #X #Y * -f -X -Y +[ #f #Hf #g #J1 #K1 #H destruct +| #f #I #L1 #L2 #_ #g #J1 #K1 #_ #H2 elim (discr_next_push … H2) +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_push … H2) -g destruct + /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: includes: drop_gen_skip_l *) +(* Basic_2A1: includes: drop_inv_skip1 *) +lemma drops_inv_skip1: ∀b,f,I1,K1,Y. ⬇*[b, ⫯f] K1.ⓘ{I1} ≘ Y → + ∃∃I2,K2. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & Y = K2.ⓘ{I2}. +/2 width=5 by drops_inv_skip1_aux/ qed-. + +fact drops_inv_skip2_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I2,K2. Y = K2.ⓘ{I2} → f = ⫯g → + ∃∃I1,K1. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & X = K1.ⓘ{I1}. +#b #f #X #Y * -f -X -Y +[ #f #Hf #g #J2 #K2 #H destruct +| #f #I #L1 #L2 #_ #g #J2 #K2 #_ #H2 elim (discr_next_push … H2) +| #f #I1 #I2 #L1 #L2 #HL #HV #g #J2 #K2 #H1 #H2 <(injective_push … H2) -g destruct + /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: includes: drop_gen_skip_r *) +(* Basic_2A1: includes: drop_inv_skip2 *) +lemma drops_inv_skip2: ∀b,f,I2,X,K2. ⬇*[b, ⫯f] X ≘ K2.ⓘ{I2} → + ∃∃I1,K1. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & X = K1.ⓘ{I1}. +/2 width=5 by drops_inv_skip2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +fact drops_fwd_drop2_aux: ∀b,f2,X,Y. ⬇*[b, f2] X ≘ Y → ∀I,K. Y = K.ⓘ{I} → + ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b, f] X ≘ K. +#b #f2 #X #Y #H elim H -f2 -X -Y +[ #f2 #Hf2 #J #K #H destruct +| #f2 #I #L1 #L2 #_ #IHL #J #K #H elim (IHL … H) -IHL + /3 width=7 by after_next, ex3_2_intro, drops_drop/ +| #f2 #I1 #I2 #L1 #L2 #HL #_ #_ #J #K #H destruct + lapply (after_isid_dx 𝐈𝐝 … f2) /3 width=9 by after_push, ex3_2_intro, drops_drop/ +] +qed-. + +lemma drops_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} → + ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b, f] X ≘ K. +/2 width=4 by drops_fwd_drop2_aux/ qed-. + +(* Properties with test for identity ****************************************) + +(* Basic_2A1: includes: drop_refl *) +lemma drops_refl: ∀b,L,f. 𝐈⦃f⦄ → ⬇*[b, f] L ≘ L. +#b #L elim L -L /2 width=1 by drops_atom/ +#L #I #IHL #f #Hf elim (isid_inv_gen … Hf) -Hf +/3 width=1 by drops_skip, liftsb_refl/ +qed. + +(* Forward lemmas test for identity *****************************************) + +(* Basic_1: includes: drop_gen_refl *) +(* Basic_2A1: includes: drop_inv_O2 *) +lemma drops_fwd_isid: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → 𝐈⦃f⦄ → L1 = L2. +#b #f #L1 #L2 #H elim H -f -L1 -L2 // +[ #f #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) // +| /5 width=5 by isid_inv_push, liftsb_fwd_isid, eq_f2, sym_eq/ +] +qed-. + +lemma drops_after_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} → + ∀f1,f. 𝐈⦃f1⦄ → f2 ⊚ ↑f1 ≘ f → ⬇*[b, f] X ≘ K. +#b #f2 #I #X #K #H #f1 #f #Hf1 #Hf elim (drops_fwd_drop2 … H) -H +#g1 #g #Hg1 #Hg #HK lapply (after_mono_eq … Hg … Hf ??) -Hg -Hf +/3 width=5 by drops_eq_repl_back, isid_inv_eq_repl, eq_next/ +qed-. + +(* Forward lemmas with test for finite colength *****************************) + +lemma drops_fwd_isfin: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐅⦃f⦄. +#f #L1 #L2 #H elim H -f -L1 -L2 +/3 width=1 by isfin_next, isfin_push, isfin_isid/ +qed-. + +(* Properties with test for uniformity **************************************) + +lemma drops_isuni_ex: ∀f. 𝐔⦃f⦄ → ∀L. ∃K. ⬇*[Ⓕ, f] L ≘ K. +#f #H elim H -f /4 width=2 by drops_refl, drops_TF, ex_intro/ +#f #_ #g #H #IH destruct * /2 width=2 by ex_intro/ +#L #I elim (IH L) -IH /3 width=2 by drops_drop, ex_intro/ +qed-. + +(* Inversion lemmas with test for uniformity ********************************) + +lemma drops_inv_isuni: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐔⦃f⦄ → + (𝐈⦃f⦄ ∧ L1 = L2) ∨ + ∃∃g,I,K. ⬇*[Ⓣ, g] K ≘ L2 & 𝐔⦃g⦄ & L1 = K.ⓘ{I} & f = ↑g. +#f #L1 #L2 * -f -L1 -L2 +[ /4 width=1 by or_introl, conj/ +| /4 width=7 by isuni_inv_next, ex4_3_intro, or_intror/ +| /7 width=6 by drops_fwd_isid, liftsb_fwd_isid, isuni_inv_push, isid_push, or_introl, conj, eq_f2, sym_eq/ +] +qed-. + +(* Basic_2A1: was: drop_inv_O1_pair1 *) +lemma drops_inv_bind1_isuni: ∀b,f,I,K,L2. 𝐔⦃f⦄ → ⬇*[b, f] K.ⓘ{I} ≘ L2 → + (𝐈⦃f⦄ ∧ L2 = K.ⓘ{I}) ∨ + ∃∃g. 𝐔⦃g⦄ & ⬇*[b, g] K ≘ L2 & f = ↑g. +#b #f #I #K #L2 #Hf #H elim (isuni_split … Hf) -Hf * #g #Hg #H0 destruct +[ lapply (drops_inv_skip1 … H) -H * #Z #Y #HY #HZ #H destruct + <(drops_fwd_isid … HY Hg) -Y >(liftsb_fwd_isid … HZ Hg) -Z + /4 width=3 by isid_push, or_introl, conj/ +| lapply (drops_inv_drop1 … H) -H /3 width=4 by ex3_intro, or_intror/ +] +qed-. + +(* Basic_2A1: was: drop_inv_O1_pair2 *) +lemma drops_inv_bind2_isuni: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K.ⓘ{I} → + (𝐈⦃f⦄ ∧ L1 = K.ⓘ{I}) ∨ + ∃∃g,I1,K1. 𝐔⦃g⦄ & ⬇*[b, g] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1} & f = ↑g. +#b #f #I #K * +[ #Hf #H elim (drops_inv_atom1 … H) -H #H destruct +| #L1 #I1 #Hf #H elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct /3 width=1 by or_introl, conj/ + | /3 width=7 by ex4_3_intro, or_intror/ + ] +] +qed-. + +lemma drops_inv_bind2_isuni_next: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, ↑f] L1 ≘ K.ⓘ{I} → + ∃∃I1,K1. ⬇*[b, f] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1}. +#b #f #I #K #L1 #Hf #H elim (drops_inv_bind2_isuni … H) -H /2 width=3 by isuni_next/ -Hf * +[ #H elim (isid_inv_next … H) -H // +| /2 width=4 by ex2_2_intro/ +] +qed-. + +fact drops_inv_TF_aux: ∀f,L1,L2. ⬇*[Ⓕ, f] L1 ≘ L2 → 𝐔⦃f⦄ → + ∀I,K. L2 = K.ⓘ{I} → ⬇*[Ⓣ, f] L1 ≘ K.ⓘ{I}. +#f #L1 #L2 #H elim H -f -L1 -L2 +[ #f #_ #_ #J #K #H destruct +| #f #I #L1 #L2 #_ #IH #Hf #J #K #H destruct + /4 width=3 by drops_drop, isuni_inv_next/ +| #f #I1 #I2 #L1 #L2 #HL12 #HI21 #_ #Hf #J #K #H destruct + lapply (isuni_inv_push … Hf ??) -Hf [1,2: // ] #Hf + <(drops_fwd_isid … HL12) -K // <(liftsb_fwd_isid … HI21) -I1 + /3 width=3 by drops_refl, isid_push/ +] +qed-. + +(* Basic_2A1: includes: drop_inv_FT *) +lemma drops_inv_TF: ∀f,I,L,K. ⬇*[Ⓕ, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ, f] L ≘ K.ⓘ{I}. +/2 width=3 by drops_inv_TF_aux/ qed-. + +(* Basic_2A1: includes: drop_inv_gen *) +lemma drops_inv_gen: ∀b,f,I,L,K. ⬇*[b, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ, f] L ≘ K.ⓘ{I}. +* /2 width=1 by drops_inv_TF/ +qed-. + +(* Basic_2A1: includes: drop_inv_T *) +lemma drops_inv_F: ∀b,f,I,L,K. ⬇*[Ⓕ, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[b, f] L ≘ K.ⓘ{I}. +* /2 width=1 by drops_inv_TF/ +qed-. + +(* Forward lemmas with test for uniformity **********************************) + +(* Basic_1: was: drop_S *) +(* Basic_2A1: was: drop_fwd_drop2 *) +lemma drops_isuni_fwd_drop2: ∀b,f,I,X,K. 𝐔⦃f⦄ → ⬇*[b, f] X ≘ K.ⓘ{I} → ⬇*[b, ↑f] X ≘ K. +/3 width=7 by drops_after_fwd_drop2, after_isid_isuni/ qed-. + +(* Inversion lemmas with uniform relocations ********************************) + +lemma drops_inv_atom2: ∀b,L,f. ⬇*[b, f] L ≘ ⋆ → + ∃∃n,f1. ⬇*[b, 𝐔❴n❵] L ≘ ⋆ & 𝐔❴n❵ ⊚ f1 ≘ f. +#b #L elim L -L +[ /3 width=4 by drops_atom, after_isid_sn, ex2_2_intro/ +| #L #I #IH #f #H elim (pn_split f) * #g #H0 destruct + [ elim (drops_inv_skip1 … H) -H #J #K #_ #_ #H destruct + | lapply (drops_inv_drop1 … H) -H #HL + elim (IH … HL) -IH -HL /3 width=8 by drops_drop, after_next, ex2_2_intro/ + ] +] +qed-. + +lemma drops_inv_succ: ∀L1,L2,i. ⬇*[↑i] L1 ≘ L2 → + ∃∃I,K. ⬇*[i] K ≘ L2 & L1 = K.ⓘ{I}. +#L1 #L2 #i #H elim (drops_inv_isuni … H) -H // * +[ #H elim (isid_inv_next … H) -H // +| /2 width=4 by ex2_2_intro/ +] +qed-. + +(* Properties with uniform relocations **************************************) + +lemma drops_F_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ ∨ ∃∃I,K. ⬇*[i] L ≘ K.ⓘ{I}. +#L elim L -L /2 width=1 by or_introl/ +#L #I #IH * /4 width=3 by drops_refl, ex1_2_intro, or_intror/ +#i elim (IH i) -IH /3 width=1 by drops_drop, or_introl/ +* /4 width=3 by drops_drop, ex1_2_intro, or_intror/ +qed-. + +(* Basic_2A1: includes: drop_split *) +lemma drops_split_trans: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ∀f1,f2. f1 ⊚ f2 ≘ f → 𝐔⦃f1⦄ → + ∃∃L. ⬇*[b, f1] L1 ≘ L & ⬇*[b, f2] L ≘ L2. +#b #f #L1 #L2 #H elim H -f -L1 -L2 +[ #f #H0f #f1 #f2 #Hf #Hf1 @(ex2_intro … (⋆)) @drops_atom + #H lapply (H0f H) -b + #H elim (after_inv_isid3 … Hf H) -f // +| #f #I #L1 #L2 #HL12 #IHL12 #f1 #f2 #Hf #Hf1 elim (after_inv_xxn … Hf) -Hf [1,3: * |*: // ] + [ #g1 #g2 #Hf #H1 #H2 destruct + lapply (isuni_inv_push … Hf1 ??) -Hf1 [1,2: // ] #Hg1 + elim (IHL12 … Hf) -f + /4 width=5 by drops_drop, drops_skip, liftsb_refl, isuni_isid, ex2_intro/ + | #g1 #Hf #H destruct elim (IHL12 … Hf) -f + /3 width=5 by ex2_intro, drops_drop, isuni_inv_next/ + ] +| #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 #f1 #f2 #Hf #Hf1 elim (after_inv_xxp … Hf) -Hf [2,3: // ] + #g1 #g2 #Hf #H1 #H2 destruct elim (liftsb_split_trans … HI21 … Hf) -HI21 + elim (IHL12 … Hf) -f /3 width=5 by ex2_intro, drops_skip, isuni_fwd_push/ +] +qed-. + +lemma drops_split_div: ∀b,f1,L1,L. ⬇*[b, f1] L1 ≘ L → ∀f2,f. f1 ⊚ f2 ≘ f → 𝐔⦃f2⦄ → + ∃∃L2. ⬇*[Ⓕ, f2] L ≘ L2 & ⬇*[Ⓕ, f] L1 ≘ L2. +#b #f1 #L1 #L #H elim H -f1 -L1 -L +[ #f1 #Hf1 #f2 #f #Hf #Hf2 @(ex2_intro … (⋆)) @drops_atom #H destruct +| #f1 #I #L1 #L #HL1 #IH #f2 #f #Hf #Hf2 elim (after_inv_nxx … Hf) -Hf [2,3: // ] + #g #Hg #H destruct elim (IH … Hg) -IH -Hg /3 width=5 by drops_drop, ex2_intro/ +| #f1 #I1 #I #L1 #L #HL1 #HI1 #IH #f2 #f #Hf #Hf2 + elim (after_inv_pxx … Hf) -Hf [1,3: * |*: // ] + #g2 #g #Hg #H2 #H0 destruct + [ lapply (isuni_inv_push … Hf2 ??) -Hf2 [1,2: // ] #Hg2 -IH + lapply (after_isid_inv_dx … Hg … Hg2) -Hg #Hg + /5 width=7 by drops_eq_repl_back, drops_F, drops_refl, drops_skip, liftsb_eq_repl_back, isid_push, ex2_intro/ + | lapply (isuni_inv_next … Hf2 ??) -Hf2 [1,2: // ] #Hg2 -HL1 -HI1 + elim (IH … Hg) -f1 /3 width=3 by drops_drop, ex2_intro/ + ] +] +qed-. + +(* Properties with application **********************************************) + +lemma drops_tls_at: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → + ∀b,L1,L2. ⬇*[b,⫱*[i2]f] L1 ≘ L2 → + ⬇*[b,⫯⫱*[↑i2]f] L1 ≘ L2. +/3 width=3 by drops_eq_repl_fwd, at_inv_tls/ qed-. + +lemma drops_split_trans_bind2: ∀b,f,I,L,K0. ⬇*[b, f] L ≘ K0.ⓘ{I} → ∀i. @⦃O, f⦄ ≘ i → + ∃∃J,K. ⬇*[i]L ≘ K.ⓘ{J} & ⬇*[b, ⫱*[↑i]f] K ≘ K0 & ⬆*[⫱*[↑i]f] I ≘ J. +#b #f #I #L #K0 #H #i #Hf +elim (drops_split_trans … H) -H [ |5: @(after_uni_dx … Hf) |2,3: skip ] /2 width=1 by after_isid_dx/ #Y #HLY #H +lapply (drops_tls_at … Hf … H) -H #H +elim (drops_inv_skip2 … H) -H #J #K #HK0 #HIJ #H destruct +/3 width=5 by drops_inv_gen, ex3_2_intro/ +qed-. + +(* Properties with context-sensitive equivalence for terms ******************) + +lemma ceq_lift_sn: d_liftable2_sn … liftsb ceq_ext. +#K #I1 #I2 #H <(ceq_ext_inv_eq … H) -I2 +/2 width=3 by ex2_intro/ qed-. + +lemma ceq_inv_lift_sn: d_deliftable2_sn … liftsb ceq_ext. +#L #J1 #J2 #H <(ceq_ext_inv_eq … H) -J2 +/2 width=3 by ex2_intro/ qed-. + +(* Note: d_deliftable2_sn cfull does not hold *) +lemma cfull_lift_sn: d_liftable2_sn … liftsb cfull. +#K #I1 #I2 #_ #b #f #L #_ #J1 #_ -K -I1 -b +elim (liftsb_total I2 f) /2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: removed theorems 12: + drops_inv_nil drops_inv_cons d1_liftable_liftables + drop_refl_atom_O2 drop_inv_pair1 + drop_inv_Y1 drop_Y1 drop_O_Y drop_fwd_Y2 + drop_fwd_length_minus2 drop_fwd_length_minus4 +*) +(* Basic_1: removed theorems 53: + drop1_gen_pnil drop1_gen_pcons drop1_getl_trans + drop_ctail drop_skip_flat + cimp_flat_sx cimp_flat_dx cimp_bind cimp_getl_conf + drop_clear drop_clear_O drop_clear_S + clear_gen_sort clear_gen_bind clear_gen_flat clear_gen_flat_r + clear_gen_all clear_clear clear_mono clear_trans clear_ctail clear_cle + getl_ctail_clen getl_gen_tail clear_getl_trans getl_clear_trans + getl_clear_bind getl_clear_conf getl_dec getl_drop getl_drop_conf_lt + getl_drop_conf_ge getl_conf_ge_drop getl_drop_conf_rev + drop_getl_trans_lt drop_getl_trans_le drop_getl_trans_ge + getl_drop_trans getl_flt getl_gen_all getl_gen_sort getl_gen_O + getl_gen_S getl_gen_2 getl_gen_flat getl_gen_bind getl_conf_le + getl_trans getl_refl getl_head getl_flat getl_ctail getl_mono +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_cext2.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_cext2.ma new file mode 100644 index 000000000..c55f9332f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_cext2.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Properties with the extension to binders of a context-sensitive relation *) + +lemma cext2_d_liftable2_sn: ∀R. d_liftable2_sn … lifts R → + d_liftable2_sn … liftsb (cext2 R). +#R #HR #K #I1 #I2 * -I1 -I2 #I [| #T1 #T2 #HT12 ] +#b #f #L #HLK #Z1 #H +[ lapply (liftsb_inv_unit_sn … H) +| lapply (liftsb_inv_pair_sn … H) * #U1 #HTU1 +] -H #H destruct /3 width=3 by ext2_unit, ex2_intro/ +elim (HR … HT12 … HLK … HTU1) -HR -b -K -T1 /3 width=3 by ext2_pair, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_ctc.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_ctc.ma new file mode 100644 index 000000000..acd929c41 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_ctc.ma @@ -0,0 +1,72 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/star.ma". +include "static_2/relocation/seq_seq.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Properties with contextual transitive closure ****************************) + +(* Basic_2A1: was: d_liftable_LTC *) +lemma d2_liftable_sn_CTC: ∀C,S,R. d_liftable2_sn C S R → d_liftable2_sn C S (CTC … R). +#C #S #R #HR #K #T1 #T2 #H elim H -T2 +[ #T2 #HT12 #b #f #L #HLK #U1 #HTU1 + elim (HR … HT12 … HLK … HTU1) /3 width=3 by inj, ex2_intro/ +| #T #T2 #_ #HT2 #IHT1 #b #f #L #HLK #U1 #HTU1 + elim (IHT1 … HLK … HTU1) -T1 #U #HTU #HU1 + elim (HR … HT2 … HLK … HTU) -HR -K -T /3 width=5 by step, ex2_intro/ +] +qed-. + +(* Basic_2A1: was: d_deliftable_sn_LTC *) +lemma d2_deliftable_sn_CTC: ∀C,S,R. d_deliftable2_sn C S R → d_deliftable2_sn C S (CTC … R). +#C #S #R #HR #L #U1 #U2 #H elim H -U2 +[ #U2 #HU12 #b #f #K #HLK #T1 #HTU1 + elim (HR … HU12 … HLK … HTU1) -HR -L -U1 /3 width=3 by inj, ex2_intro/ +| #U #U2 #_ #HU2 #IHU1 #b #f #K #HLK #T1 #HTU1 + elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 + elim (HR … HU2 … HLK … HTU) -HR -L -U /3 width=5 by step, ex2_intro/ +] +qed-. + +lemma co_dropable_sn_CTC: ∀R. co_dropable_sn R → co_dropable_sn (CTC … R). +#R #HR #b #f #L1 #K1 #HLK1 #Hf #f2 #L2 #H elim H -L2 +[ #L2 #HL12 #f1 #H elim (HR … HLK1 … Hf … HL12 … H) -HR -Hf -f2 -L1 + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 #IH #f1 #H elim (IH … H) -IH + #K #HK1 #HLK elim (HR … HLK … HL2 … H) -HR -f2 -L + /3 width=3 by step, ex2_intro/ +] +qed-. + +lemma co_dropable_dx_CTC: ∀R. co_dropable_dx R → co_dropable_dx (CTC … R). +#R #HR #f2 #L1 #L2 #H elim H -L2 +[ #L2 #HL12 #b #f #K2 #HLK2 #Hf #f1 #Hf2 elim (HR … HL12 … HLK2 … Hf … Hf2) -HR -Hf -f2 -L2 + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 #IHL1 #b #f #K2 #HLK2 #Hf #f1 #Hf2 elim (HR … HL2 … HLK2 … Hf … Hf2) -HR -L2 + #K #HLK #HK2 elim (IHL1 … HLK … Hf … Hf2) -Hf -f2 -L + /3 width=5 by step, ex2_intro/ +] +qed-. + +lemma co_dedropable_sn_CTC: ∀R. co_dedropable_sn R → co_dedropable_sn (CTC … R). +#R #HR #b #f #L1 #K1 #HLK1 #f1 #K2 #H elim H -K2 +[ #K2 #HK12 #f2 #Hf elim (HR … HLK1 … HK12 … Hf) -HR -f1 -K1 + /3 width=4 by inj, ex3_intro/ +| #K #K2 #_ #HK2 #IH #f2 #Hf elim (IH … Hf) -IH -K1 + #L #H1L1 #HLK #H2L1 elim (HR … HLK … HK2 … Hf) -HR -f1 -K + /3 width=6 by seq_trans, step, ex3_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_drops.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_drops.ma new file mode 100644 index 000000000..1c44ed555 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_drops.ma @@ -0,0 +1,133 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_lifts_bind.ma". +include "static_2/relocation/drops_weight.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Main properties **********************************************************) + +(* Basic_2A1: includes: drop_conf_ge drop_conf_be drop_conf_le *) +theorem drops_conf: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L → + ∀b2,f,L2. ⬇*[b2, f] L1 ≘ L2 → + ∀f2. f1 ⊚ f2 ≘ f → ⬇*[b2, f2] L ≘ L2. +#b1 #f1 #L1 #L #H elim H -f1 -L1 -L +[ #f1 #_ #b2 #f #L2 #HL2 #f2 #Hf12 elim (drops_inv_atom1 … HL2) -b1 -HL2 + #H #Hf destruct @drops_atom + #H elim (after_inv_isid3 … Hf12) -Hf12 /2 width=1 by/ +| #f1 #I1 #K1 #K #_ #IH #b2 #f #L2 #HL2 #f2 #Hf elim (after_inv_nxx … Hf) -Hf [2,3: // ] + #g #Hg #H destruct /3 width=3 by drops_inv_drop1/ +| #f1 #I1 #I #K1 #K #_ #HI1 #IH #b2 #f #L2 #HL2 #f2 #Hf elim (after_inv_pxx … Hf) -Hf [1,3: * |*:// ] + #g2 #g #Hf #H1 #H2 destruct + [ elim (drops_inv_skip1 … HL2) -HL2 /3 width=6 by drops_skip, liftsb_div3/ + | /4 width=3 by drops_inv_drop1, drops_drop/ + ] +] +qed-. + +(* Basic_1: was: drop1_trans *) +(* Basic_2A1: includes: drop_trans_ge drop_trans_le drop_trans_ge_comm + drops_drop_trans +*) +theorem drops_trans: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L → + ∀b2,f2,L2. ⬇*[b2, f2] L ≘ L2 → + ∀f. f1 ⊚ f2 ≘ f → ⬇*[b1∧b2, f] L1 ≘ L2. +#b1 #f1 #L1 #L #H elim H -f1 -L1 -L +[ #f1 #Hf1 #b2 #f2 #L2 #HL2 #f #Hf elim (drops_inv_atom1 … HL2) -HL2 + #H #Hf2 destruct @drops_atom #H elim (andb_inv_true_dx … H) -H + #H1 #H2 lapply (after_isid_inv_sn … Hf ?) -Hf + /3 width=3 by isid_eq_repl_back/ +| #f1 #I1 #K1 #K #_ #IH #b2 #f2 #L2 #HL2 #f #Hf elim (after_inv_nxx … Hf) -Hf + /3 width=3 by drops_drop/ +| #f1 #I1 #I #K1 #K #_ #HI1 #IH #b2 #f2 #L2 #HL2 #f #Hf elim (after_inv_pxx … Hf) -Hf [1,3: * |*: // ] + #g2 #g #Hg #H1 #H2 destruct + [ elim (drops_inv_skip1 … HL2) -HL2 /3 width=6 by drops_skip, liftsb_trans/ + | /4 width=3 by drops_inv_drop1, drops_drop/ + ] +] +qed-. + +theorem drops_conf_div: ∀f1,L,K. ⬇*[Ⓣ,f1] L ≘ K → ∀f2. ⬇*[Ⓣ,f2] L ≘ K → + 𝐔⦃f1⦄ → 𝐔⦃f2⦄ → f1 ≡ f2. +#f1 #L #K #H elim H -f1 -L -K +[ #f1 #Hf1 #f2 #Hf2 elim (drops_inv_atom1 … Hf2) -Hf2 + /3 width=1 by isid_inv_eq_repl/ +| #f1 #I #L #K #Hf1 #IH #f2 elim (pn_split f2) * + #g2 #H2 #Hf2 #HU1 #HU2 destruct + [ elim (drops_inv_skip1 … Hf2) -IH -HU1 -Hf2 #Y2 #X2 #HY2 #_ #H destruct + lapply (drops_fwd_isid … HY2 ?) -HY2 /2 width=3 by isuni_inv_push/ -HU2 + #H destruct elim (drops_inv_x_bind_xy … Hf1) + | /4 width=5 by drops_inv_drop1, isuni_inv_next, eq_next/ + ] +| #f1 #I1 #I2 #L #K #Hf1 #_ #IH #f2 elim (pn_split f2) * + #g2 #H2 #Hf2 #HU1 #HU2 destruct + [ elim (drops_inv_skip1 … Hf2) -Hf2 #Y2 #X2 #HY2 #_ #H destruct -Hf1 + /4 width=5 by isuni_fwd_push, eq_push/ + | lapply (drops_inv_drop1 … Hf2) -Hf2 -IH -HU2 #Hg2 + lapply (drops_fwd_isid … Hf1 ?) -Hf1 /2 width=3 by isuni_inv_push/ -HU1 + #H destruct elim (drops_inv_x_bind_xy … Hg2) + ] +] +qed-. + +(* Advanced properties ******************************************************) + +(* Basic_2A1: includes: drop_mono *) +lemma drops_mono: ∀b1,f,L,L1. ⬇*[b1, f] L ≘ L1 → + ∀b2,L2. ⬇*[b2, f] L ≘ L2 → L1 = L2. +#b1 #f #L #L1 lapply (after_isid_dx 𝐈𝐝 … f) +/3 width=8 by drops_conf, drops_fwd_isid/ +qed-. + +(* Basic_2A1: includes: drop_conf_lt *) +lemma drops_conf_skip1: ∀b2,f,L,L2. ⬇*[b2, f] L ≘ L2 → + ∀b1,f1,I1,K1. ⬇*[b1, f1] L ≘ K1.ⓘ{I1} → + ∀f2. f1 ⊚ ⫯f2 ≘ f → + ∃∃I2,K2. L2 = K2.ⓘ{I2} & + ⬇*[b2, f2] K1 ≘ K2 & ⬆*[f2] I2 ≘ I1. +#b2 #f #L #L2 #H2 #b1 #f1 #I1 #K1 #H1 #f2 #Hf lapply (drops_conf … H1 … H2 … Hf) -L -Hf +#H elim (drops_inv_skip1 … H) -H /2 width=5 by ex3_2_intro/ +qed-. + +(* Basic_2A1: includes: drop_trans_lt *) +lemma drops_trans_skip2: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L → + ∀b2,f2,I2,K2. ⬇*[b2, f2] L ≘ K2.ⓘ{I2} → + ∀f. f1 ⊚ f2 ≘ ⫯f → + ∃∃I1,K1. L1 = K1.ⓘ{I1} & + ⬇*[b1∧b2, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1. +#b1 #f1 #L1 #L #H1 #b2 #f2 #I2 #K2 #H2 #f #Hf +lapply (drops_trans … H1 … H2 … Hf) -L -Hf +#H elim (drops_inv_skip2 … H) -H /2 width=5 by ex3_2_intro/ +qed-. + +(* Basic_2A1: includes: drops_conf_div *) +lemma drops_conf_div_bind: ∀f1,f2,I1,I2,L,K. + ⬇*[Ⓣ, f1] L ≘ K.ⓘ{I1} → ⬇*[Ⓣ, f2] L ≘ K.ⓘ{I2} → + 𝐔⦃f1⦄ → 𝐔⦃f2⦄ → f1 ≡ f2 ∧ I1 = I2. +#f1 #f2 #I1 #I2 #L #K #Hf1 #Hf2 #HU1 #HU2 +lapply (drops_isuni_fwd_drop2 … Hf1) // #H1 +lapply (drops_isuni_fwd_drop2 … Hf2) // #H2 +lapply (drops_conf_div … H1 … H2 ??) /2 width=3 by isuni_next/ -H1 -H2 -HU1 -HU2 #H +lapply (eq_inv_nn … H ????) -H [5: |*: // ] #H12 +lapply (drops_eq_repl_back … Hf1 … H12) -Hf1 #H0 +lapply (drops_mono … H0 … Hf2) -L #H +destruct /2 width=1 by conj/ +qed-. + +lemma drops_inv_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ → ∀I,K. ⬇*[i] L ≘ K.ⓘ{I} → ⊥. +#L #i #H1 #I #K #H2 +lapply (drops_F … H2) -H2 #H2 +lapply (drops_mono … H2 … H1) -L -i #H destruct +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_length.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_length.ma new file mode 100644 index 000000000..94085a331 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_length.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 "static_2/syntax/lenv_length.ma". +include "static_2/relocation/drops.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: includes: drop_fwd_length_le4 *) +lemma drops_fwd_length_le4: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → |L2| ≤ |L1|. +#b #f #L1 #L2 #H elim H -f -L1 -L2 /2 width=1 by le_S, le_S_S/ +qed-. + +(* Basic_2A1: includes: drop_fwd_length_eq1 *) +theorem drops_fwd_length_eq1: ∀b1,b2,f,L1,K1. ⬇*[b1, f] L1 ≘ K1 → + ∀L2,K2. ⬇*[b2, f] L2 ≘ K2 → + |L1| = |L2| → |K1| = |K2|. +#b1 #b2 #f #L1 #K1 #HLK1 elim HLK1 -f -L1 -K1 +[ #f #_ #L2 #K2 #HLK2 #H lapply (length_inv_zero_sn … H) -H + #H destruct elim (drops_inv_atom1 … HLK2) -HLK2 // +| #f #I1 #L1 #K1 #_ #IH #X2 #K2 #HX #H elim (length_inv_succ_sn … H) -H + #I2 #L2 #H12 #H destruct lapply (drops_inv_drop1 … HX) -HX + #HLK2 @(IH … HLK2 H12) (**) (* auto fails *) +| #f #I1 #I2 #L1 #K1 #_ #_ #IH #X2 #Y2 #HX #H elim (length_inv_succ_sn … H) -H + #I2 #L2 #H12 #H destruct elim (drops_inv_skip1 … HX) -HX + #I2 #K2 #HLK2 #_ #H destruct + lapply (IH … HLK2 H12) -f >length_bind >length_bind /2 width=1 by/ (**) (* full auto fails *) +] +qed-. + +(* forward lemmas with finite colength assignment ***************************) + +lemma drops_fwd_fcla: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → + ∃∃n. 𝐂⦃f⦄ ≘ n & |L1| = |L2| + n. +#f #L1 #L2 #H elim H -f -L1 -L2 +[ /4 width=3 by fcla_isid, ex2_intro/ +| #f #I #L1 #L2 #_ * >length_bind /3 width=3 by fcla_next, ex2_intro, eq_f/ +| #f #I1 #I2 #L1 #L2 #_ #_ * >length_bind >length_bind /3 width=3 by fcla_push, ex2_intro/ +] +qed-. + +(* Basic_2A1: includes: drop_fwd_length *) +lemma drops_fcla_fwd: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → + |L1| = |L2| + n. +#f #l1 #l2 #n #Hf #Hn elim (drops_fwd_fcla … Hf) -Hf +#k #Hm #H <(fcla_mono … Hm … Hn) -f // +qed-. + +lemma drops_fwd_fcla_le2: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → + ∃∃n. 𝐂⦃f⦄ ≘ n & n ≤ |L1|. +#f #L1 #L2 #H elim (drops_fwd_fcla … H) -H /2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: includes: drop_fwd_length_le2 *) +lemma drops_fcla_fwd_le2: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → + n ≤ |L1|. +#f #L1 #L2 #n #H #Hn elim (drops_fwd_fcla_le2 … H) -H +#k #Hm #H <(fcla_mono … Hm … Hn) -f // +qed-. + +lemma drops_fwd_fcla_lt2: ∀f,L1,I2,K2. ⬇*[Ⓣ, f] L1 ≘ K2.ⓘ{I2} → + ∃∃n. 𝐂⦃f⦄ ≘ n & n < |L1|. +#f #L1 #I2 #K2 #H elim (drops_fwd_fcla … H) -H +#n #Hf #H >H -L1 /3 width=3 by le_S_S, ex2_intro/ +qed-. + +(* Basic_2A1: includes: drop_fwd_length_lt2 *) +lemma drops_fcla_fwd_lt2: ∀f,L1,I2,K2,n. + ⬇*[Ⓣ, f] L1 ≘ K2.ⓘ{I2} → 𝐂⦃f⦄ ≘ n → + n < |L1|. +#f #L1 #I2 #K2 #n #H #Hn elim (drops_fwd_fcla_lt2 … H) -H +#k #Hm #H <(fcla_mono … Hm … Hn) -f // +qed-. + +(* Basic_2A1: includes: drop_fwd_length_lt4 *) +lemma drops_fcla_fwd_lt4: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → 0 < n → + |L2| < |L1|. +#f #L1 #L2 #n #H #Hf #Hn lapply (drops_fcla_fwd … H Hf) -f +/2 width=1 by lt_minus_to_plus_r/ qed-. + +(* Basic_2A1: includes: drop_inv_length_eq *) +lemma drops_inv_length_eq: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → |L1| = |L2| → 𝐈⦃f⦄. +#f #L1 #L2 #H #HL12 elim (drops_fwd_fcla … H) -H +#n #Hn H1 -L1 +elim (drops_fwd_fcla … HLK2) -HLK2 #n2 #Hn2 #H2 >H2 -L2 +<(fcla_mono … Hn2 … Hn1) -f // +qed-. + +theorem drops_conf_div: ∀f1,f2,L1,L2. ⬇*[Ⓣ, f1] L1 ≘ L2 → ⬇*[Ⓣ, f2] L1 ≘ L2 → + ∃∃n. 𝐂⦃f1⦄ ≘ n & 𝐂⦃f2⦄ ≘ n. +#f1 #f2 #L1 #L2 #H1 #H2 +elim (drops_fwd_fcla … H1) -H1 #n1 #Hf1 #H1 +elim (drops_fwd_fcla … H2) -H2 #n2 #Hf2 >H1 -L1 #H +lapply (injective_plus_r … H) -L2 #H destruct /2 width=3 by ex2_intro/ +qed-. + +theorem drops_conf_div_fcla: ∀f1,f2,L1,L2,n1,n2. + ⬇*[Ⓣ, f1] L1 ≘ L2 → ⬇*[Ⓣ, f2] L1 ≘ L2 → 𝐂⦃f1⦄ ≘ n1 → 𝐂⦃f2⦄ ≘ n2 → + n1 = n2. +#f1 #f2 #L1 #L2 #n1 #n2 #Hf1 #Hf2 #Hn1 #Hn2 +lapply (drops_fcla_fwd … Hf1 Hn1) -f1 #H1 +lapply (drops_fcla_fwd … Hf2 Hn2) -f2 >H1 -L1 +/2 width=1 by injective_plus_r/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_lex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_lex.ma new file mode 100644 index 000000000..1e33fc3d8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_lex.ma @@ -0,0 +1,83 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lex.ma". +include "static_2/relocation/drops_cext2.ma". +include "static_2/relocation/drops_sex.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +definition dedropable_sn: predicate … ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀K2. K1 ⪤[R] K2 → + ∃∃L2. L1 ⪤[R] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. + +definition dropable_sn: predicate … ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → ∀L2. L1 ⪤[R] L2 → + ∃∃K2. K1 ⪤[R] K2 & ⬇*[b, f] L2 ≘ K2. + +definition dropable_dx: predicate … ≝ + λR. ∀L1,L2. L1 ⪤[R] L2 → ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → + ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[R] K2. + +(* Properties with generic extension ****************************************) + +(* Basic_2A1: was: lpx_sn_liftable_dedropable *) +lemma lex_liftable_dedropable_sn (R): c_reflexive … R → + d_liftable2_sn … lifts R → dedropable_sn R. +#R #H1R #H2R #b #f #L1 #K1 #HLK1 #K2 * #f1 #Hf1 #HK12 +elim (sex_liftable_co_dedropable_sn … HLK1 … HK12) -K1 +/3 width=6 by cext2_d_liftable2_sn, cfull_lift_sn, ext2_refl, coafter_isid_dx, ex3_intro, ex2_intro/ +qed-. + +(* Inversion lemmas with generic extension **********************************) + +(* Basic_2A1: was: lpx_sn_deliftable_dropable *) +lemma lex_dropable_sn (R): dropable_sn R. +#R #b #f #L1 #K1 #HLK1 #H1f #L2 * #f2 #Hf2 #HL12 +elim (sex_co_dropable_sn … HLK1 … HL12) -L1 +/3 width=3 by coafter_isid_dx, ex2_intro/ +qed-. + +(* Basic_2A1: was: lpx_sn_dropable *) +lemma lex_dropable_dx (R): dropable_dx R. +#R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #K2 #HLK2 #Hf +elim (sex_co_dropable_dx … HL12 … HLK2) -L2 +/3 width=5 by coafter_isid_dx, ex2_intro/ +qed-. + +(* Basic_2A1: includes: lpx_sn_drop_conf *) +lemma lex_drops_conf_pair (R): ∀L1,L2. L1 ⪤[R] L2 → + ∀b,f,I,K1,V1. ⬇*[b, f] L1 ≘ K1.ⓑ{I}V1 → 𝐔⦃f⦄ → + ∃∃K2,V2. ⬇*[b, f] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R] K2 & R K1 V1 V2. +#R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #I #K1 #V1 #HLK1 #Hf +elim (sex_drops_conf_push … HL12 … HLK1 Hf f2) -L1 -Hf +[ #Z2 #K2 #HLK2 #HK12 #H + elim (ext2_inv_pair_sn … H) -H #V2 #HV12 #H destruct + /3 width=5 by ex3_2_intro, ex2_intro/ +| /3 width=3 by coafter_isid_dx, isid_push/ +] +qed-. + +(* Basic_2A1: includes: lpx_sn_drop_trans *) +lemma lex_drops_trans_pair (R): ∀L1,L2. L1 ⪤[R] L2 → + ∀b,f,I,K2,V2. ⬇*[b, f] L2 ≘ K2.ⓑ{I}V2 → 𝐔⦃f⦄ → + ∃∃K1,V1. ⬇*[b, f] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R] K2 & R K1 V1 V2. +#R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #I #K2 #V2 #HLK2 #Hf +elim (sex_drops_trans_push … HL12 … HLK2 Hf f2) -L2 -Hf +[ #Z1 #K1 #HLK1 #HK12 #H + elim (ext2_inv_pair_dx … H) -H #V1 #HV12 #H destruct + /3 width=5 by ex3_2_intro, ex2_intro/ +| /3 width=3 by coafter_isid_dx, isid_push/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_ltc.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_ltc.ma new file mode 100644 index 000000000..d2ca57bba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_ltc.ma @@ -0,0 +1,95 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/ltc.ma". +include "static_2/relocation/seq_seq.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Properties with labeled transitive closure *******************************) + +lemma d2_liftable_sn_ltc: ∀A,f. associative … f → + ∀C,S,R. (∀n. d_liftable2_sn C S (λL. R L n)) → + ∀n. d_liftable2_sn C S (λL. ltc A f … (R L) n). +#A #g #Hg #C #S #R #HR #n #K #T1 #T2 #H +@(ltc_ind_dx … Hg ???? H) -n -T2 +[ #n #T2 #HT12 #b #g #L #HLK #U1 #HTU1 + elim (HR … HT12 … HLK … HTU1) -b -K -T1 -HR + /3 width=3 by ltc_rc, ex2_intro/ +| #n1 #n2 #T #T2 #_ #IHT1 #HT2 #b #f #L #HLK #U1 #HTU1 + elim (IHT1 … HLK … HTU1) -T1 #U #HTU #HU1 + elim (HR … HT2 … HLK … HTU) -HR -K -T + /3 width=5 by ltc_dx, ex2_intro/ +] +qed-. + +lemma d2_deliftable_sn_ltc: ∀A,f. associative … f → + ∀C,S,R. (∀n. d_deliftable2_sn C S (λL. R L n)) → + ∀n. d_deliftable2_sn C S (λL. ltc A f … (R L) n). +#A #g #Hg #C #S #R #HR #n #L #U1 #U2 #H +@(ltc_ind_dx … Hg ???? H) -n -U2 +[ #n #U2 #HU12 #b #g #K #HLK #T1 #HTU1 + elim (HR … HU12 … HLK … HTU1) -b -L -U1 -HR + /3 width=3 by ltc_rc, ex2_intro/ +| #n1 #n2 #U #U2 #_ #IHU1 #HU2 #b #f #K #HLK #T1 #HTU1 + elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 + elim (HR … HU2 … HLK … HTU) -L -U -HR + /3 width=5 by ltc_dx, ex2_intro/ +] +qed-. + +lemma co_dropable_sn_ltc: ∀A,f. associative … f → + ∀R. (∀n. co_dropable_sn (λL. R L n)) → + ∀n. co_dropable_sn (λL. ltc A f … (R L) n). +#A #g #Hg #R #HR #n #b #f #L1 #K1 #HLK1 #Hf #f2 #L2 #H +@(ltc_ind_dx … Hg ???? H) -n -L2 +[ #n #L2 #HL12 #g1 #H + elim (HR … HLK1 … Hf … HL12 … H) -f2 -L1 -HR -Hf + /3 width=3 by ltc_rc, ex2_intro/ +| #n1 #n2 #L #L2 #_ #IH #HL2 #f1 #H + elim (IH … H) -IH #K #HK1 #HLK + elim (HR … HLK … HL2 … H) -f2 -L -HR + /3 width=3 by ltc_dx, ex2_intro/ +] +qed-. + +lemma co_dropable_dx_ltc: ∀A,f. associative … f → + ∀R. (∀n. co_dropable_dx (λL. R L n)) → + ∀n. co_dropable_dx (λL. ltc A f … (R L) n). +#A #g #Hg #R #HR #n #f2 #L1 #L2 #H +@(ltc_ind_dx … Hg ???? H) -n -L2 +[ #n #L2 #HL12 #b #f #K2 #HLK2 #Hf #f1 #Hf2 + elim (HR … HL12 … HLK2 … Hf … Hf2) -f2 -L2 -HR -Hf + /3 width=3 by ltc_rc, ex2_intro/ +| #n1 #n2 #L #L2 #_ #IHL1 #HL2 #b #f #K2 #HLK2 #Hf #f1 #Hf2 + elim (HR … HL2 … HLK2 … Hf … Hf2) -L2 -HR #K #HLK #HK2 + elim (IHL1 … HLK … Hf … Hf2) -Hf -f2 -L + /3 width=5 by ltc_dx, ex2_intro/ +] +qed-. + +lemma co_dedropable_sn_ltc: ∀A,f. associative … f → + ∀R. (∀n. co_dedropable_sn (λL. R L n)) → + ∀n. co_dedropable_sn (λL. ltc A f … (R L) n). +#A #g #Hg #R #HR #n #b #f #L1 #K1 #HLK1 #f1 #K2 #H +@(ltc_ind_dx … Hg ???? H) -n -K2 +[ #n #K2 #HK12 #f2 #Hf + elim (HR … HLK1 … HK12 … Hf) -f1 -K1 -HR + /3 width=4 by ltc_rc, ex3_intro/ +| #n1 #n2 #K #K2 #_ #IH #HK2 #f2 #Hf + elim (IH … Hf) -K1 -IH #L #H1L1 #HLK #H2L1 + elim (HR … HLK … HK2 … Hf) -f1 -K -HR + /3 width=6 by seq_trans, ltc_dx, ex3_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_seq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_seq.ma new file mode 100644 index 000000000..94beb0a71 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_seq.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops_sex.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Properties with syntactic equivalence for selected local environments ****) + +lemma seq_co_dedropable_sn: co_dedropable_sn seq. +@sex_liftable_co_dedropable_sn +/2 width=6 by cfull_lift_sn, ceq_lift_sn/ qed-. + +lemma seq_co_dropable_sn: co_dropable_sn seq. +@sex_co_dropable_sn qed-. + +lemma seq_co_dropable_dx: co_dropable_dx seq. +@sex_co_dropable_dx qed-. + +(* Basic_2A1: includes: lreq_drop_trans_be *) +lemma seq_drops_trans_next: ∀f2,L1,L2. L1 ≡[f2] L2 → + ∀b,f,I,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} → 𝐔⦃f⦄ → + ∀f1. f ~⊚ ↑f1 ≘ f2 → + ∃∃K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} & K1 ≡[f1] K2. +#f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2 +elim (sex_drops_trans_next … HL12 … HLK2 Hf … Hf2) -f2 -L2 -Hf +#I1 #K1 #HLK1 #HK12 #H <(ceq_ext_inv_eq … H) -I2 +/2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: includes: lreq_drop_conf_be *) +lemma seq_drops_conf_next: ∀f2,L1,L2. L1 ≡[f2] L2 → + ∀b,f,I,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} → 𝐔⦃f⦄ → + ∀f1. f ~⊚ ↑f1 ≘ f2 → + ∃∃K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} & K1 ≡[f1] K2. +#f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2 +elim (seq_drops_trans_next … (seq_sym … HL12) … HLK1 … Hf2) // -f2 -L1 -Hf +/3 width=3 by seq_sym, ex2_intro/ +qed-. + +lemma drops_seq_trans_next: ∀f1,K1,K2. K1 ≡[f1] K2 → + ∀b,f,I,L1. ⬇*[b, f] L1.ⓘ{I} ≘ K1 → + ∀f2. f ~⊚ f1 ≘ ↑f2 → + ∃∃L2. ⬇*[b, f] L2.ⓘ{I} ≘ K2 & L1 ≡[f2] L2 & L1.ⓘ{I} ≡[f] L2.ⓘ{I}. +#f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2 +elim (drops_sex_trans_next … HK12 … HLK1 … Hf2) -f1 -K1 +/2 width=6 by cfull_lift_sn, ceq_lift_sn/ +#I2 #L2 #HLK2 #HL12 #H >(ceq_ext_inv_eq … H) -I1 +/2 width=4 by ex3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_sex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_sex.ma new file mode 100644 index 000000000..e1263a2fd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_sex.ma @@ -0,0 +1,187 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_lifts_bind.ma". +include "static_2/relocation/drops.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Properties with entrywise extension of context-sensitive relations *******) + +(**) (* changed after commit 13218 *) +lemma sex_co_dropable_sn: ∀RN,RP. co_dropable_sn (sex RN RP). +#RN #RP #b #f #L1 #K1 #H elim H -f -L1 -K1 +[ #f #Hf #_ #f2 #X #H #f1 #Hf2 >(sex_inv_atom1 … H) -X + /4 width=3 by sex_atom, drops_atom, ex2_intro/ +| #f #I1 #L1 #K1 #_ #IH #Hf #f2 #X #H #f1 #Hf2 + elim (coafter_inv_nxx … Hf2) -Hf2 [2,3: // ] #g2 #Hg2 #H2 destruct + elim (sex_inv_push1 … H) -H #I2 #L2 #HL12 #HI12 #H destruct + elim (IH … HL12 … Hg2) -g2 + /3 width=3 by isuni_inv_next, drops_drop, ex2_intro/ +| #f #I1 #J1 #L1 #K1 #HLK #HJI1 #IH #Hf #f2 #X #H #f1 #Hf2 + lapply (isuni_inv_push … Hf ??) -Hf [3: |*: // ] #Hf + lapply (drops_fwd_isid … HLK … Hf) -HLK #H0 destruct + lapply (liftsb_fwd_isid … HJI1 … Hf) -HJI1 #H0 destruct + elim (coafter_inv_pxx … Hf2) -Hf2 [1,3:* |*: // ] #g1 #g2 #Hg2 #H1 #H2 destruct + [ elim (sex_inv_push1 … H) | elim (sex_inv_next1 … H) ] -H #I2 #L2 #HL12 #HI12 #H destruct + elim (IH … HL12 … Hg2) -g2 -IH /2 width=1 by isuni_isid/ #K2 #HK12 #HLK2 + lapply (drops_fwd_isid … HLK2 … Hf) -HLK2 #H0 destruct + /4 width=3 by drops_refl, sex_next, sex_push, isid_push, ex2_intro/ +] +qed-. + +lemma sex_liftable_co_dedropable_bi: ∀RN,RP. d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → + ∀f2,L1,L2. L1 ⪤[cfull, RP, f2] L2 → ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 → + ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → + f ~⊚ f1 ≘ f2 → L1 ⪤[RN, RP, f2] L2. +#RN #RP #HRN #HRP #f2 #L1 #L2 #H elim H -f2 -L1 -L2 // +#g2 #I1 #I2 #L1 #L2 #HL12 #HI12 #IH #f1 #Y1 #Y2 #HK12 #b #f #HY1 #HY2 #H +[ elim (coafter_inv_xxn … H) [ |*: // ] -H #g #g1 #Hg2 #H1 #H2 destruct + elim (drops_inv_skip1 … HY1) -HY1 #J1 #K1 #HLK1 #HJI1 #H destruct + elim (drops_inv_skip1 … HY2) -HY2 #J2 #K2 #HLK2 #HJI2 #H destruct + elim (sex_inv_next … HK12) -HK12 #HK12 #HJ12 + elim (HRN … HJ12 … HLK1 … HJI1) -HJ12 -HJI1 #Z #Hz + >(liftsb_mono … Hz … HJI2) -Z /3 width=9 by sex_next/ +| elim (coafter_inv_xxp … H) [1,2: |*: // ] -H * + [ #g #g1 #Hg2 #H1 #H2 destruct + elim (drops_inv_skip1 … HY1) -HY1 #J1 #K1 #HLK1 #HJI1 #H destruct + elim (drops_inv_skip1 … HY2) -HY2 #J2 #K2 #HLK2 #HJI2 #H destruct + elim (sex_inv_push … HK12) -HK12 #HK12 #HJ12 + elim (HRP … HJ12 … HLK1 … HJI1) -HJ12 -HJI1 #Z #Hz + >(liftsb_mono … Hz … HJI2) -Z /3 width=9 by sex_push/ + | #g #Hg2 #H destruct + lapply (drops_inv_drop1 … HY1) -HY1 #HLK1 + lapply (drops_inv_drop1 … HY2) -HY2 #HLK2 + /3 width=9 by sex_push/ + ] +] +qed-. + +lemma sex_liftable_co_dedropable_sn: ∀RN,RP. (∀L. reflexive … (RN L)) → (∀L. reflexive … (RP L)) → + d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → + co_dedropable_sn (sex RN RP). +#RN #RP #H1RN #H1RP #H2RN #H2RP #b #f #L1 #K1 #H elim H -f -L1 -K1 +[ #f #Hf #X #f1 #H #f2 #Hf2 >(sex_inv_atom1 … H) -X + /4 width=4 by drops_atom, sex_atom, ex3_intro/ +| #f #I1 #L1 #K1 #_ #IHLK1 #K2 #f1 #HK12 #f2 #Hf2 + elim (coafter_inv_nxx … Hf2) -Hf2 [2,3: // ] #g2 #Hg2 #H destruct + elim (IHLK1 … HK12 … Hg2) -K1 + /3 width=6 by drops_drop, sex_next, sex_push, ex3_intro/ +| #f #I1 #J1 #L1 #K1 #HLK1 #HJI1 #IHLK1 #X #f1 #H #f2 #Hf2 + elim (coafter_inv_pxx … Hf2) -Hf2 [1,3: * |*: // ] #g1 #g2 #Hg2 #H1 #H2 destruct + [ elim (sex_inv_push1 … H) | elim (sex_inv_next1 … H) ] -H #J2 #K2 #HK12 #HJ12 #H destruct + [ elim (H2RP … HJ12 … HLK1 … HJI1) | elim (H2RN … HJ12 … HLK1 … HJI1) ] -J1 + elim (IHLK1 … HK12 … Hg2) -K1 + /3 width=6 by drops_skip, sex_next, sex_push, ex3_intro/ +] +qed-. + +fact sex_dropable_dx_aux: ∀RN,RP,b,f,L2,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → + ∀f2,L1. L1 ⪤[RN, RP, f2] L2 → ∀f1. f ~⊚ f1 ≘ f2 → + ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[RN, RP, f1] K2. +#RN #RP #b #f #L2 #K2 #H elim H -f -L2 -K2 +[ #f #Hf #_ #f2 #X #H #f1 #Hf2 lapply (sex_inv_atom2 … H) -H + #H destruct /4 width=3 by sex_atom, drops_atom, ex2_intro/ +| #f #I2 #L2 #K2 #_ #IH #Hf #f2 #X #HX #f1 #Hf2 + elim (coafter_inv_nxx … Hf2) -Hf2 [2,3: // ] #g2 #Hg2 #H destruct + elim (sex_inv_push2 … HX) -HX #I1 #L1 #HL12 #HI12 #H destruct + elim (IH … HL12 … Hg2) -L2 -I2 -g2 + /3 width=3 by drops_drop, isuni_inv_next, ex2_intro/ +| #f #I2 #J2 #L2 #K2 #_ #HJI2 #IH #Hf #f2 #X #HX #f1 #Hf2 + elim (coafter_inv_pxx … Hf2) -Hf2 [1,3: * |*: // ] #g1 #g2 #Hg2 #H1 #H2 destruct + [ elim (sex_inv_push2 … HX) | elim (sex_inv_next2 … HX) ] -HX #I1 #L1 #HL12 #HI12 #H destruct + elim (IH … HL12 … Hg2) -L2 -g2 /2 width=3 by isuni_fwd_push/ #K1 #HLK1 #HK12 + lapply (isuni_inv_push … Hf ??) -Hf [3,6: |*: // ] #Hf + lapply (liftsb_fwd_isid … HJI2 … Hf) #H destruct -HJI2 + lapply (drops_fwd_isid … HLK1 … Hf) #H destruct -HLK1 + /4 width=5 by sex_next, sex_push, drops_refl, isid_push, ex2_intro/ +] +qed-. + +lemma sex_co_dropable_dx: ∀RN,RP. co_dropable_dx (sex RN RP). +/2 width=5 by sex_dropable_dx_aux/ qed-. + +lemma sex_drops_conf_next: ∀RN,RP. + ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → + ∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ → + ∀f1. f ~⊚ ↑f1 ≘ f2 → + ∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN, RP, f1] K2 & RN K1 I1 I2. +#RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2 +elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf +#X #HX #HLK2 elim (sex_inv_next1 … HX) -HX +#I2 #K2 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma sex_drops_conf_push: ∀RN,RP. + ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → + ∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ → + ∀f1. f ~⊚ ⫯f1 ≘ f2 → + ∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN, RP, f1] K2 & RP K1 I1 I2. +#RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2 +elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf +#X #HX #HLK2 elim (sex_inv_push1 … HX) -HX +#I2 #K2 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma sex_drops_trans_next: ∀RN,RP,f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → + ∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ → + ∀f1. f ~⊚ ↑f1 ≘ f2 → + ∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN, RP, f1] K2 & RN K1 I1 I2. +#RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2 +elim (sex_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf +#X #HLK1 #HX elim (sex_inv_next2 … HX) -HX +#I1 #K1 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma sex_drops_trans_push: ∀RN,RP,f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → + ∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ → + ∀f1. f ~⊚ ⫯f1 ≘ f2 → + ∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN, RP, f1] K2 & RP K1 I1 I2. +#RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2 +elim (sex_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf +#X #HLK1 #HX elim (sex_inv_push2 … HX) -HX +#I1 #K1 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma drops_sex_trans_next: ∀RN,RP. (∀L. reflexive ? (RN L)) → (∀L. reflexive ? (RP L)) → + d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → + ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 → + ∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 → + ∀f2. f ~⊚ f1 ≘ ↑f2 → + ∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN, RP, f2] L2 & RN L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}. +#RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2 +elim (sex_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP +#X #HX #HLK2 #H1L12 elim (sex_inv_next1 … HX) -HX +#I2 #L2 #H2L12 #HI12 #H destruct /2 width=6 by ex4_2_intro/ +qed-. + +lemma drops_sex_trans_push: ∀RN,RP. (∀L. reflexive ? (RN L)) → (∀L. reflexive ? (RP L)) → + d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP → + ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 → + ∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 → + ∀f2. f ~⊚ f1 ≘ ⫯f2 → + ∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN, RP, f2] L2 & RP L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}. +#RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2 +elim (sex_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP +#X #HX #HLK2 #H1L12 elim (sex_inv_push1 … HX) -HX +#I2 #L2 #H2L12 #HI12 #H destruct /2 width=6 by ex4_2_intro/ +qed-. + +lemma drops_atom2_sex_conf: ∀RN,RP,b,f1,L1. ⬇*[b, f1] L1 ≘ ⋆ → 𝐔⦃f1⦄ → + ∀f,L2. L1 ⪤[RN, RP, f] L2 → + ∀f2. f1 ~⊚ f2 ≘f → ⬇*[b, f1] L2 ≘ ⋆. +#RN #RP #b #f1 #L1 #H1 #Hf1 #f #L2 #H2 #f2 #H3 +elim (sex_co_dropable_sn … H1 … H2 … H3) // -H1 -H2 -H3 -Hf1 +#L #H #HL2 lapply (sex_inv_atom1 … H) -H // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_vector.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_vector.ma new file mode 100644 index 000000000..8c43b6404 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_vector.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_vector.ma". +include "static_2/relocation/drops.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +definition d_liftable1_all: predicate (relation2 lenv term) ≝ + λR. ∀K,Ts. all … (R K) Ts → + ∀b,f,L. ⬇*[b, f] L ≘ K → + ∀Us. ⬆*[f] Ts ≘ Us → all … (R L) Us. + +(* Properties with generic relocation for term vectors **********************) + +(* Basic_2A1: was: d1_liftables_liftables_all *) +lemma d1_liftable_liftable_all: ∀R. d_liftable1 R → d_liftable1_all R. +#R #HR #K #Ts #HTs #b #f #L #HLK #Us #H +generalize in match HTs; -HTs elim H -Ts -Us normalize // +#Ts #Us #T #U #HTU #_ #IHTUs * /3 width=7 by conj/ +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/drops_weight.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_weight.ma new file mode 100644 index 000000000..dfcb44500 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/drops_weight.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/cl_restricted_weight.ma". +include "static_2/relocation/lifts_weight_bind.ma". +include "static_2/relocation/drops.ma". + +(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************) + +(* Forward lemmas with weight for local environments ************************) + +(* Basic_2A1: includes: drop_fwd_lw *) +lemma drops_fwd_lw: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ♯{L2} ≤ ♯{L1}. +#b #f #L1 #L2 #H elim H -f -L1 -L2 // +[ /2 width=3 by transitive_le/ +| #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 normalize + >(liftsb_fwd_bw … HI21) -HI21 /2 width=1 by monotonic_le_plus_l/ +] +qed-. + +(* Basic_2A1: includes: drop_fwd_lw_lt *) +lemma drops_fwd_lw_lt: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → + (𝐈⦃f⦄ → ⊥) → ♯{L2} < ♯{L1}. +#f #L1 #L2 #H elim H -f -L1 -L2 +[ #f #Hf #Hnf elim Hnf -Hnf /2 width=1 by/ +| /3 width=3 by drops_fwd_lw, le_to_lt_to_lt/ +| #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 #H normalize in ⊢ (?%%); + >(liftsb_fwd_bw … HI21) -I2 /5 width=3 by isid_push, monotonic_lt_plus_l/ +] +qed-. + +(* Forward lemmas with restricted weight for closures ***********************) + +(* Basic_2A1: includes: drop_fwd_rfw *) +lemma drops_bind2_fwd_rfw: ∀b,f,I,L,K,V. ⬇*[b, f] L ≘ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}. +#b #f #I #L #K #V #HLK lapply (drops_fwd_lw … HLK) -HLK +normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt, monotonic_lt_plus_r/ +qed-. + +(* Advanced inversion lemma *************************************************) + +lemma drops_inv_x_bind_xy: ∀b,f,I,L. ⬇*[b, f] L ≘ L.ⓘ{I} → ⊥. +#b #f #I #L #H lapply (drops_fwd_lw … H) -b -f +/2 width=4 by lt_le_false/ (**) (* full auto is a bit slow: 19s *) +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lex.ma new file mode 100644 index 000000000..1900d273d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lex.ma @@ -0,0 +1,162 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/pull/pull_2.ma". +include "ground_2/pull/pull_4.ma". +include "ground_2/relocation/rtmap_uni.ma". +include "static_2/notation/relations/relation_3.ma". +include "static_2/syntax/cext2.ma". +include "static_2/relocation/sex.ma". + +(* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************) + +definition lex (R): relation lenv ≝ + λL1,L2. ∃∃f. 𝐈⦃f⦄ & L1 ⪤[cfull, cext2 R, f] L2. + +interpretation "generic extension (local environment)" + 'Relation R L1 L2 = (lex R L1 L2). + +definition lex_confluent: relation (relation3 …) ≝ λR1,R2. + ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 → + ∀L1. L0 ⪤[R1] L1 → ∀L2. L0 ⪤[R2] L2 → + ∃∃T. R2 L1 T1 T & R1 L2 T2 T. + +definition lex_transitive: relation (relation3 …) ≝ λR1,R2. + ∀L1,T1,T. R1 L1 T1 T → ∀L2. L1 ⪤[R1] L2 → + ∀T2. R2 L2 T T2 → R1 L1 T1 T2. + +(* Basic properties *********************************************************) + +(* Basic_2A1: was: lpx_sn_atom *) +lemma lex_atom (R): ⋆ ⪤[R] ⋆. +/2 width=3 by sex_atom, ex2_intro/ qed. + +lemma lex_bind (R): ∀I1,I2,K1,K2. K1 ⪤[R] K2 → cext2 R K1 I1 I2 → + K1.ⓘ{I1} ⪤[R] K2.ⓘ{I2}. +#R #I1 #I2 #K1 #K2 * #f #Hf #HK12 #HI12 +/3 width=3 by sex_push, isid_push, ex2_intro/ +qed. + +(* Basic_2A1: was: lpx_sn_refl *) +lemma lex_refl (R): c_reflexive … R → reflexive … (lex R). +/4 width=3 by sex_refl, ext2_refl, ex2_intro/ qed. + +lemma lex_co (R1) (R2): (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → + ∀L1,L2. L1 ⪤[R1] L2 → L1 ⪤[R2] L2. +#R1 #R2 #HR #L1 #L2 * /5 width=7 by sex_co, cext2_co, ex2_intro/ +qed-. + +(* Advanced properties ******************************************************) + +lemma lex_bind_refl_dx (R): c_reflexive … R → + ∀I,K1,K2. K1 ⪤[R] K2 → K1.ⓘ{I} ⪤[R] K2.ⓘ{I}. +/3 width=3 by ext2_refl, lex_bind/ qed. + +lemma lex_unit (R): ∀I,K1,K2. K1 ⪤[R] K2 → K1.ⓤ{I} ⪤[R] K2.ⓤ{I}. +/3 width=1 by lex_bind, ext2_unit/ qed. + +(* Basic_2A1: was: lpx_sn_pair *) +lemma lex_pair (R): ∀I,K1,K2,V1,V2. K1 ⪤[R] K2 → R K1 V1 V2 → + K1.ⓑ{I}V1 ⪤[R] K2.ⓑ{I}V2. +/3 width=1 by lex_bind, ext2_pair/ qed. + +(* Basic inversion lemmas ***************************************************) + +(* Basic_2A1: was: lpx_sn_inv_atom1: *) +lemma lex_inv_atom_sn (R): ∀L2. ⋆ ⪤[R] L2 → L2 = ⋆. +#R #L2 * #f #Hf #H >(sex_inv_atom1 … H) -L2 // +qed-. + +lemma lex_inv_bind_sn (R): ∀I1,L2,K1. K1.ⓘ{I1} ⪤[R] L2 → + ∃∃I2,K2. K1 ⪤[R] K2 & cext2 R K1 I1 I2 & L2 = K2.ⓘ{I2}. +#R #I1 #L2 #K1 * #f #Hf #H +lapply (sex_eq_repl_fwd … H (⫯f) ?) -H /2 width=1 by eq_push_inv_isid/ #H +elim (sex_inv_push1 … H) -H #I2 #K2 #HK12 #HI12 #H destruct +/3 width=5 by ex2_intro, ex3_2_intro/ +qed-. + +(* Basic_2A1: was: lpx_sn_inv_atom2 *) +lemma lex_inv_atom_dx (R): ∀L1. L1 ⪤[R] ⋆ → L1 = ⋆. +#R #L1 * #f #Hf #H >(sex_inv_atom2 … H) -L1 // +qed-. + +lemma lex_inv_bind_dx (R): ∀I2,L1,K2. L1 ⪤[R] K2.ⓘ{I2} → + ∃∃I1,K1. K1 ⪤[R] K2 & cext2 R K1 I1 I2 & L1 = K1.ⓘ{I1}. +#R #I2 #L1 #K2 * #f #Hf #H +lapply (sex_eq_repl_fwd … H (⫯f) ?) -H /2 width=1 by eq_push_inv_isid/ #H +elim (sex_inv_push2 … H) -H #I1 #K1 #HK12 #HI12 #H destruct +/3 width=5 by ex3_2_intro, ex2_intro/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lex_inv_unit_sn (R): ∀I,L2,K1. K1.ⓤ{I} ⪤[R] L2 → + ∃∃K2. K1 ⪤[R] K2 & L2 = K2.ⓤ{I}. +#R #I #L2 #K1 #H +elim (lex_inv_bind_sn … H) -H #Z2 #K2 #HK12 #HZ2 #H destruct +elim (ext2_inv_unit_sn … HZ2) -HZ2 +/2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: was: lpx_sn_inv_pair1 *) +lemma lex_inv_pair_sn (R): ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R] L2 → + ∃∃K2,V2. K1 ⪤[R] K2 & R K1 V1 V2 & L2 = K2.ⓑ{I}V2. +#R #I #L2 #K1 #V1 #H +elim (lex_inv_bind_sn … H) -H #Z2 #K2 #HK12 #HZ2 #H destruct +elim (ext2_inv_pair_sn … HZ2) -HZ2 #V2 #HV12 #H destruct +/2 width=5 by ex3_2_intro/ +qed-. + +lemma lex_inv_unit_dx (R): ∀I,L1,K2. L1 ⪤[R] K2.ⓤ{I} → + ∃∃K1. K1 ⪤[R] K2 & L1 = K1.ⓤ{I}. +#R #I #L1 #K2 #H +elim (lex_inv_bind_dx … H) -H #Z1 #K1 #HK12 #HZ1 #H destruct +elim (ext2_inv_unit_dx … HZ1) -HZ1 +/2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: was: lpx_sn_inv_pair2 *) +lemma lex_inv_pair_dx (R): ∀I,L1,K2,V2. L1 ⪤[R] K2.ⓑ{I}V2 → + ∃∃K1,V1. K1 ⪤[R] K2 & R K1 V1 V2 & L1 = K1.ⓑ{I}V1. +#R #I #L1 #K2 #V2 #H +elim (lex_inv_bind_dx … H) -H #Z1 #K1 #HK12 #HZ1 #H destruct +elim (ext2_inv_pair_dx … HZ1) -HZ1 #V1 #HV12 #H destruct +/2 width=5 by ex3_2_intro/ +qed-. + +(* Basic_2A1: was: lpx_sn_inv_pair *) +lemma lex_inv_pair (R): ∀I1,I2,L1,L2,V1,V2. + L1.ⓑ{I1}V1 ⪤[R] L2.ⓑ{I2}V2 → + ∧∧ L1 ⪤[R] L2 & R L1 V1 V2 & I1 = I2. +#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lex_inv_pair_sn … H) -H +#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/ +qed-. + +(* Basic eliminators ********************************************************) + +lemma lex_ind (R) (Q:relation2 …): + Q (⋆) (⋆) → + ( + ∀I,K1,K2. K1 ⪤[R] K2 → Q K1 K2 → Q (K1.ⓤ{I}) (K2.ⓤ{I}) + ) → ( + ∀I,K1,K2,V1,V2. K1 ⪤[R] K2 → Q K1 K2 → R K1 V1 V2 →Q (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L1,L2. L1 ⪤[R] L2 → Q L1 L2. +#R #Q #IH1 #IH2 #IH3 #L1 #L2 * #f @pull_2 #H +elim H -f -L1 -L2 // #f #I1 #I2 #K1 #K2 @pull_4 #H +[ elim (isid_inv_next … H) +| lapply (isid_inv_push … H ??) +] -H [5:|*: // ] #Hf @pull_2 #H +elim H -H /3 width=3 by ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lex_length.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lex_length.ma new file mode 100644 index 000000000..053070fa5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lex_length.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/sex_length.ma". +include "static_2/relocation/lex.ma". + +(* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************) + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: was: lpx_sn_fwd_length *) +lemma lex_fwd_length: ∀R,L1,L2. L1 ⪤[R] L2 → |L1| = |L2|. +#R #L1 #L2 * /2 width=4 by sex_fwd_length/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lex_lex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lex_lex.ma new file mode 100644 index 000000000..24bfebe65 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lex_lex.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lex.ma". + +(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) + +(* Main properties **********************************************************) + +(* Basic_2A1: was: lpx_sn_trans *) +theorem lex_trans (R): lex_transitive R R → Transitive … (lex R). +#R #HR #L1 #L #H @(lex_ind … H) -L1 -L // +[ #I #K1 #K #HK1 #IH #Y #H + elim (lex_inv_unit_sn … H) -H #K2 #K2 #H destruct + /3 width=1 by lex_unit/ +| #I #K1 #L #V1 #V #HK1 #IH #HV1 #X #H + elim (lex_inv_pair_sn … H) -H #K2 #V2 #HK2 #HV2 #H destruct + /3 width=5 by lex_pair/ +] +qed-. + +(* Basic_2A1: was: lpx_sn_conf *) +theorem lex_conf (R1) (R2): lex_confluent R1 R2 → confluent2 … (lex R1) (lex R2). +#R1 #R2 #HR12 #L0 elim L0 -L0 [| #K0 * ] +[ #Y1 #H1 #Y2 #H2 + >(lex_inv_atom_sn … H1) -Y1 + >(lex_inv_atom_sn … H2) -Y2 + /2 width=3 by lex_atom, ex2_intro/ +| #I #IH #Y1 #H1 #Y2 #H2 + elim (lex_inv_unit_sn … H1) -H1 #K1 #HK01 #H destruct + elim (lex_inv_unit_sn … H2) -H2 #K2 #HK02 #H destruct + elim (IH … HK01 … HK02) -K0 #K #HK1 #HK2 + /3 width=3 by lex_unit, ex2_intro/ +| #I #V0 #IH #Y1 #H1 #Y2 #H2 + elim (lex_inv_pair_sn … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct + elim (lex_inv_pair_sn … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct + elim (HR12 … HV01 … HV02 … HK01 … HK02) -V0 #V #HV1 #HV2 + elim (IH … HK01 … HK02) -K0 #K #HK1 #HK2 + /3 width=5 by lex_pair, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lex_tc.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lex_tc.ma new file mode 100644 index 000000000..5dadd4e18 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lex_tc.ma @@ -0,0 +1,89 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ext2_tc.ma". +include "static_2/relocation/sex_tc.ma". +include "static_2/relocation/lex.ma". + +alias symbol "subseteq" = "relation inclusion". + +(* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************) + +(* Inversion lemmas with transitive closure *********************************) + +(* Basic_2A1: was: lpx_sn_LTC_TC_lpx_sn *) +lemma lex_inv_CTC (R): c_reflexive … R → + lex (CTC … R) ⊆ TC … (lex R). +#R #HR #L1 #L2 * +/5 width=11 by sex_inv_tc_dx, sex_co, ext2_inv_tc, ext2_refl, monotonic_TC, ex2_intro/ +qed-. + +lemma s_rs_transitive_lex_inv_isid (R): s_rs_transitive … R (λ_.lex R) → + s_rs_transitive_isid cfull (cext2 R). +#R #HR #f #Hf #L2 #T1 #T2 #H #L1 #HL12 +elim (ext2_tc … H) -H +[ /3 width=1 by ext2_inv_tc, ext2_unit/ +| #I #V1 #V2 #HV12 + @ext2_inv_tc @ext2_pair + @(HR … HV12) -HV12 /2 width=3 by ex2_intro/ (**) (* auto fails *) +] +qed-. + +(* Properties with transitive closure ***************************************) + +(* Basic_2A1: was: TC_lpx_sn_inv_lpx_sn_LTC *) +lemma lex_CTC (R): s_rs_transitive … R (λ_. lex R) → + TC … (lex R) ⊆ lex (CTC … R). +#R #HR #L1 #L2 #HL12 +lapply (monotonic_TC … (sex cfull (cext2 R) 𝐈𝐝) … HL12) -HL12 +[ #L1 #L2 * /3 width=3 by sex_eq_repl_fwd, eq_id_inv_isid/ +| /5 width=9 by s_rs_transitive_lex_inv_isid, sex_tc_dx, sex_co, ext2_tc, ex2_intro/ +] +qed-. + +lemma lex_CTC_inj (R): s_rs_transitive … R (λ_. lex R) → + (lex R) ⊆ lex (CTC … R). +/3 width=1 by lex_CTC, inj/ qed-. + +lemma lex_CTC_step_dx (R): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → + ∀L1,L. lex (CTC … R) L1 L → + ∀L2. lex R L L2 → lex (CTC … R) L1 L2. +/4 width=3 by lex_CTC, lex_inv_CTC, step/ qed-. + +lemma lex_CTC_step_sn (R): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → + ∀L1,L. lex R L1 L → + ∀L2. lex (CTC … R) L L2 → lex (CTC … R) L1 L2. +/4 width=3 by lex_CTC, lex_inv_CTC, TC_strap/ qed-. + +(* Eliminators with transitive closure **************************************) + +lemma lex_CTC_ind_sn (R) (L2): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → + ∀Q:predicate lenv. Q L2 → + (∀L1,L. L1 ⪤[R] L → L ⪤[CTC … R] L2 → Q L → Q L1) → + ∀L1. L1 ⪤[CTC … R] L2 → Q L1. +#R #L2 #H1R #H2R #Q #IH1 #IH2 #L1 #H +lapply (lex_inv_CTC … H1R … H) -H #H +@(TC_star_ind_dx ???????? H) -H +/3 width=4 by lex_CTC, lex_refl/ +qed-. + +lemma lex_CTC_ind_dx (R) (L1): c_reflexive … R → s_rs_transitive … R (λ_. lex R) → + ∀Q:predicate lenv. Q L1 → + (∀L,L2. L1 ⪤[CTC … R] L → L ⪤[R] L2 → Q L → Q L2) → + ∀L2. L1 ⪤[CTC … R] L2 → Q L2. +#R #L1 #H1R #H2R #Q #IH1 #IH2 #L2 #H +lapply (lex_inv_CTC … H1R … H) -H #H +@(TC_star_ind ???????? H) -H +/3 width=4 by lex_CTC, lex_refl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts.ma new file mode 100644 index 000000000..56f69a641 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts.ma @@ -0,0 +1,451 @@ + +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/nstream_after.ma". +include "static_2/notation/relations/rliftstar_3.ma". +include "static_2/syntax/term.ma". + +(* GENERIC RELOCATION FOR TERMS *********************************************) + +(* Basic_1: includes: + lift_sort lift_lref_lt lift_lref_ge lift_bind lift_flat + lifts_nil lifts_cons +*) +inductive lifts: rtmap → relation term ≝ +| lifts_sort: ∀f,s. lifts f (⋆s) (⋆s) +| lifts_lref: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → lifts f (#i1) (#i2) +| lifts_gref: ∀f,l. lifts f (§l) (§l) +| lifts_bind: ∀f,p,I,V1,V2,T1,T2. + lifts f V1 V2 → lifts (⫯f) T1 T2 → + lifts f (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2) +| lifts_flat: ∀f,I,V1,V2,T1,T2. + lifts f V1 V2 → lifts f T1 T2 → + lifts f (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +. + +interpretation "uniform relocation (term)" + 'RLiftStar i T1 T2 = (lifts (uni i) T1 T2). + +interpretation "generic relocation (term)" + 'RLiftStar f T1 T2 = (lifts f T1 T2). + +definition liftable2_sn: predicate (relation term) ≝ + λR. ∀T1,T2. R T1 T2 → ∀f,U1. ⬆*[f] T1 ≘ U1 → + ∃∃U2. ⬆*[f] T2 ≘ U2 & R U1 U2. + +definition deliftable2_sn: predicate (relation term) ≝ + λR. ∀U1,U2. R U1 U2 → ∀f,T1. ⬆*[f] T1 ≘ U1 → + ∃∃T2. ⬆*[f] T2 ≘ U2 & R T1 T2. + +definition liftable2_bi: predicate (relation term) ≝ + λR. ∀T1,T2. R T1 T2 → ∀f,U1. ⬆*[f] T1 ≘ U1 → + ∀U2. ⬆*[f] T2 ≘ U2 → R U1 U2. + +definition deliftable2_bi: predicate (relation term) ≝ + λR. ∀U1,U2. R U1 U2 → ∀f,T1. ⬆*[f] T1 ≘ U1 → + ∀T2. ⬆*[f] T2 ≘ U2 → R T1 T2. + +(* Basic inversion lemmas ***************************************************) + +fact lifts_inv_sort1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀s. X = ⋆s → Y = ⋆s. +#f #X #Y * -f -X -Y // +[ #f #i1 #i2 #_ #x #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +] +qed-. + +(* Basic_1: was: lift1_sort *) +(* Basic_2A1: includes: lift_inv_sort1 *) +lemma lifts_inv_sort1: ∀f,Y,s. ⬆*[f] ⋆s ≘ Y → Y = ⋆s. +/2 width=4 by lifts_inv_sort1_aux/ qed-. + +fact lifts_inv_lref1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀i1. X = #i1 → + ∃∃i2. @⦃i1, f⦄ ≘ i2 & Y = #i2. +#f #X #Y * -f -X -Y +[ #f #s #x #H destruct +| #f #i1 #i2 #Hi12 #x #H destruct /2 width=3 by ex2_intro/ +| #f #l #x #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +] +qed-. + +(* Basic_1: was: lift1_lref *) +(* Basic_2A1: includes: lift_inv_lref1 lift_inv_lref1_lt lift_inv_lref1_ge *) +lemma lifts_inv_lref1: ∀f,Y,i1. ⬆*[f] #i1 ≘ Y → + ∃∃i2. @⦃i1, f⦄ ≘ i2 & Y = #i2. +/2 width=3 by lifts_inv_lref1_aux/ qed-. + +fact lifts_inv_gref1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀l. X = §l → Y = §l. +#f #X #Y * -f -X -Y // +[ #f #i1 #i2 #_ #x #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +] +qed-. + +(* Basic_2A1: includes: lift_inv_gref1 *) +lemma lifts_inv_gref1: ∀f,Y,l. ⬆*[f] §l ≘ Y → Y = §l. +/2 width=4 by lifts_inv_gref1_aux/ qed-. + +fact lifts_inv_bind1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → + ∀p,I,V1,T1. X = ⓑ{p,I}V1.T1 → + ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & + Y = ⓑ{p,I}V2.T2. +#f #X #Y * -f -X -Y +[ #f #s #q #J #W1 #U1 #H destruct +| #f #i1 #i2 #_ #q #J #W1 #U1 #H destruct +| #f #l #b #J #W1 #U1 #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #HV12 #HT12 #q #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +| #f #I #V1 #V2 #T1 #T2 #_ #_ #q #J #W1 #U1 #H destruct +] +qed-. + +(* Basic_1: was: lift1_bind *) +(* Basic_2A1: includes: lift_inv_bind1 *) +lemma lifts_inv_bind1: ∀f,p,I,V1,T1,Y. ⬆*[f] ⓑ{p,I}V1.T1 ≘ Y → + ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & + Y = ⓑ{p,I}V2.T2. +/2 width=3 by lifts_inv_bind1_aux/ qed-. + +fact lifts_inv_flat1_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → + ∀I,V1,T1. X = ⓕ{I}V1.T1 → + ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & + Y = ⓕ{I}V2.T2. +#f #X #Y * -f -X -Y +[ #f #s #J #W1 #U1 #H destruct +| #f #i1 #i2 #_ #J #W1 #U1 #H destruct +| #f #l #J #W1 #U1 #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct +| #f #I #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: was: lift1_flat *) +(* Basic_2A1: includes: lift_inv_flat1 *) +lemma lifts_inv_flat1: ∀f:rtmap. ∀I,V1,T1,Y. ⬆*[f] ⓕ{I}V1.T1 ≘ Y → + ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & + Y = ⓕ{I}V2.T2. +/2 width=3 by lifts_inv_flat1_aux/ qed-. + +fact lifts_inv_sort2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀s. Y = ⋆s → X = ⋆s. +#f #X #Y * -f -X -Y // +[ #f #i1 #i2 #_ #x #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +] +qed-. + +(* Basic_1: includes: lift_gen_sort *) +(* Basic_2A1: includes: lift_inv_sort2 *) +lemma lifts_inv_sort2: ∀f,X,s. ⬆*[f] X ≘ ⋆s → X = ⋆s. +/2 width=4 by lifts_inv_sort2_aux/ qed-. + +fact lifts_inv_lref2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀i2. Y = #i2 → + ∃∃i1. @⦃i1, f⦄ ≘ i2 & X = #i1. +#f #X #Y * -f -X -Y +[ #f #s #x #H destruct +| #f #i1 #i2 #Hi12 #x #H destruct /2 width=3 by ex2_intro/ +| #f #l #x #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +] +qed-. + +(* Basic_1: includes: lift_gen_lref lift_gen_lref_lt lift_gen_lref_false lift_gen_lref_ge *) +(* Basic_2A1: includes: lift_inv_lref2 lift_inv_lref2_lt lift_inv_lref2_be lift_inv_lref2_ge lift_inv_lref2_plus *) +lemma lifts_inv_lref2: ∀f,X,i2. ⬆*[f] X ≘ #i2 → + ∃∃i1. @⦃i1, f⦄ ≘ i2 & X = #i1. +/2 width=3 by lifts_inv_lref2_aux/ qed-. + +fact lifts_inv_gref2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀l. Y = §l → X = §l. +#f #X #Y * -f -X -Y // +[ #f #i1 #i2 #_ #x #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +| #f #I #V1 #V2 #T1 #T2 #_ #_ #x #H destruct +] +qed-. + +(* Basic_2A1: includes: lift_inv_gref1 *) +lemma lifts_inv_gref2: ∀f,X,l. ⬆*[f] X ≘ §l → X = §l. +/2 width=4 by lifts_inv_gref2_aux/ qed-. + +fact lifts_inv_bind2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → + ∀p,I,V2,T2. Y = ⓑ{p,I}V2.T2 → + ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & + X = ⓑ{p,I}V1.T1. +#f #X #Y * -f -X -Y +[ #f #s #q #J #W2 #U2 #H destruct +| #f #i1 #i2 #_ #q #J #W2 #U2 #H destruct +| #f #l #q #J #W2 #U2 #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #HV12 #HT12 #q #J #W2 #U2 #H destruct /2 width=5 by ex3_2_intro/ +| #f #I #V1 #V2 #T1 #T2 #_ #_ #q #J #W2 #U2 #H destruct +] +qed-. + +(* Basic_1: includes: lift_gen_bind *) +(* Basic_2A1: includes: lift_inv_bind2 *) +lemma lifts_inv_bind2: ∀f,p,I,V2,T2,X. ⬆*[f] X ≘ ⓑ{p,I}V2.T2 → + ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[⫯f] T1 ≘ T2 & + X = ⓑ{p,I}V1.T1. +/2 width=3 by lifts_inv_bind2_aux/ qed-. + +fact lifts_inv_flat2_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → + ∀I,V2,T2. Y = ⓕ{I}V2.T2 → + ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & + X = ⓕ{I}V1.T1. +#f #X #Y * -f -X -Y +[ #f #s #J #W2 #U2 #H destruct +| #f #i1 #i2 #_ #J #W2 #U2 #H destruct +| #f #l #J #W2 #U2 #H destruct +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #J #W2 #U2 #H destruct +| #f #I #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W2 #U2 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: includes: lift_gen_flat *) +(* Basic_2A1: includes: lift_inv_flat2 *) +lemma lifts_inv_flat2: ∀f:rtmap. ∀I,V2,T2,X. ⬆*[f] X ≘ ⓕ{I}V2.T2 → + ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & ⬆*[f] T1 ≘ T2 & + X = ⓕ{I}V1.T1. +/2 width=3 by lifts_inv_flat2_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lifts_inv_atom1: ∀f,I,Y. ⬆*[f] ⓪{I} ≘ Y → + ∨∨ ∃∃s. I = Sort s & Y = ⋆s + | ∃∃i,j. @⦃i, f⦄ ≘ j & I = LRef i & Y = #j + | ∃∃l. I = GRef l & Y = §l. +#f * #n #Y #H +[ lapply (lifts_inv_sort1 … H) +| elim (lifts_inv_lref1 … H) +| lapply (lifts_inv_gref1 … H) +] -H /3 width=5 by or3_intro0, or3_intro1, or3_intro2, ex3_2_intro, ex2_intro/ +qed-. + +lemma lifts_inv_atom2: ∀f,I,X. ⬆*[f] X ≘ ⓪{I} → + ∨∨ ∃∃s. X = ⋆s & I = Sort s + | ∃∃i,j. @⦃i, f⦄ ≘ j & X = #i & I = LRef j + | ∃∃l. X = §l & I = GRef l. +#f * #n #X #H +[ lapply (lifts_inv_sort2 … H) +| elim (lifts_inv_lref2 … H) +| lapply (lifts_inv_gref2 … H) +] -H /3 width=5 by or3_intro0, or3_intro1, or3_intro2, ex3_2_intro, ex2_intro/ +qed-. + +(* Basic_2A1: includes: lift_inv_pair_xy_x *) +lemma lifts_inv_pair_xy_x: ∀f,I,V,T. ⬆*[f] ②{I}V.T ≘ V → ⊥. +#f #J #V elim V -V +[ * #i #U #H + [ lapply (lifts_inv_sort2 … H) -H #H destruct + | elim (lifts_inv_lref2 … H) -H + #x #_ #H destruct + | lapply (lifts_inv_gref2 … H) -H #H destruct + ] +| * [ #p ] #I #V2 #T2 #IHV2 #_ #U #H + [ elim (lifts_inv_bind2 … H) -H #V1 #T1 #HV12 #_ #H destruct /2 width=3 by/ + | elim (lifts_inv_flat2 … H) -H #V1 #T1 #HV12 #_ #H destruct /2 width=3 by/ + ] +] +qed-. + +(* Basic_1: includes: thead_x_lift_y_y *) +(* Basic_2A1: includes: lift_inv_pair_xy_y *) +lemma lifts_inv_pair_xy_y: ∀I,T,V,f. ⬆*[f] ②{I}V.T ≘ T → ⊥. +#J #T elim T -T +[ * #i #W #f #H + [ lapply (lifts_inv_sort2 … H) -H #H destruct + | elim (lifts_inv_lref2 … H) -H + #x #_ #H destruct + | lapply (lifts_inv_gref2 … H) -H #H destruct + ] +| * [ #p ] #I #V2 #T2 #_ #IHT2 #W #f #H + [ elim (lifts_inv_bind2 … H) -H #V1 #T1 #_ #HT12 #H destruct /2 width=4 by/ + | elim (lifts_inv_flat2 … H) -H #V1 #T1 #_ #HT12 #H destruct /2 width=4 by/ + ] +] +qed-. + +(* Inversion lemmas with uniform relocations ********************************) + +lemma lifts_inv_lref1_uni: ∀l,Y,i. ⬆*[l] #i ≘ Y → Y = #(l+i). +#l #Y #i1 #H elim (lifts_inv_lref1 … H) -H /4 width=4 by at_mono, eq_f/ +qed-. + +lemma lifts_inv_lref2_uni: ∀l,X,i2. ⬆*[l] X ≘ #i2 → + ∃∃i1. X = #i1 & i2 = l + i1. +#l #X #i2 #H elim (lifts_inv_lref2 … H) -H +/3 width=3 by at_inv_uni, ex2_intro/ +qed-. + +lemma lifts_inv_lref2_uni_ge: ∀l,X,i. ⬆*[l] X ≘ #(l + i) → X = #i. +#l #X #i2 #H elim (lifts_inv_lref2_uni … H) -H +#i1 #H1 #H2 destruct /4 width=2 by injective_plus_r, eq_f, sym_eq/ +qed-. + +lemma lifts_inv_lref2_uni_lt: ∀l,X,i. ⬆*[l] X ≘ #i → i < l → ⊥. +#l #X #i2 #H elim (lifts_inv_lref2_uni … H) -H +#i1 #_ #H1 #H2 destruct /2 width=4 by lt_le_false/ +qed-. + +(* Basic forward lemmas *****************************************************) + +(* Basic_2A1: includes: lift_inv_O2 *) +lemma lifts_fwd_isid: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → 𝐈⦃f⦄ → T1 = T2. +#f #T1 #T2 #H elim H -f -T1 -T2 +/4 width=3 by isid_inv_at_mono, isid_push, eq_f2, eq_f/ +qed-. + +(* Basic_2A1: includes: lift_fwd_pair1 *) +lemma lifts_fwd_pair1: ∀f:rtmap. ∀I,V1,T1,Y. ⬆*[f] ②{I}V1.T1 ≘ Y → + ∃∃V2,T2. ⬆*[f] V1 ≘ V2 & Y = ②{I}V2.T2. +#f * [ #p ] #I #V1 #T1 #Y #H +[ elim (lifts_inv_bind1 … H) -H /2 width=4 by ex2_2_intro/ +| elim (lifts_inv_flat1 … H) -H /2 width=4 by ex2_2_intro/ +] +qed-. + +(* Basic_2A1: includes: lift_fwd_pair2 *) +lemma lifts_fwd_pair2: ∀f:rtmap. ∀I,V2,T2,X. ⬆*[f] X ≘ ②{I}V2.T2 → + ∃∃V1,T1. ⬆*[f] V1 ≘ V2 & X = ②{I}V1.T1. +#f * [ #p ] #I #V2 #T2 #X #H +[ elim (lifts_inv_bind2 … H) -H /2 width=4 by ex2_2_intro/ +| elim (lifts_inv_flat2 … H) -H /2 width=4 by ex2_2_intro/ +] +qed-. + +(* Basic properties *********************************************************) + +lemma lifts_eq_repl_back: ∀T1,T2. eq_repl_back … (λf. ⬆*[f] T1 ≘ T2). +#T1 #T2 #f1 #H elim H -T1 -T2 -f1 +/4 width=5 by lifts_flat, lifts_bind, lifts_lref, at_eq_repl_back, eq_push/ +qed-. + +lemma lifts_eq_repl_fwd: ∀T1,T2. eq_repl_fwd … (λf. ⬆*[f] T1 ≘ T2). +#T1 #T2 @eq_repl_sym /2 width=3 by lifts_eq_repl_back/ (**) (* full auto fails *) +qed-. + +(* Basic_1: includes: lift_r *) +(* Basic_2A1: includes: lift_refl *) +lemma lifts_refl: ∀T,f. 𝐈⦃f⦄ → ⬆*[f] T ≘ T. +#T elim T -T * +/4 width=3 by lifts_flat, lifts_bind, lifts_lref, isid_inv_at, isid_push/ +qed. + +(* Basic_2A1: includes: lift_total *) +lemma lifts_total: ∀T1,f. ∃T2. ⬆*[f] T1 ≘ T2. +#T1 elim T1 -T1 * +/3 width=2 by lifts_lref, lifts_sort, lifts_gref, ex_intro/ +[ #p ] #I #V1 #T1 #IHV1 #IHT1 #f +elim (IHV1 f) -IHV1 #V2 #HV12 +[ elim (IHT1 (⫯f)) -IHT1 /3 width=2 by lifts_bind, ex_intro/ +| elim (IHT1 f) -IHT1 /3 width=2 by lifts_flat, ex_intro/ +] +qed-. + +lemma lift_lref_uni: ∀l,i. ⬆*[l] #i ≘ #(l+i). +#l elim l -l /2 width=1 by lifts_lref/ +qed. + +(* Basic_1: includes: lift_free (right to left) *) +(* Basic_2A1: includes: lift_split *) +lemma lifts_split_trans: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → + ∀f1,f2. f2 ⊚ f1 ≘ f → + ∃∃T. ⬆*[f1] T1 ≘ T & ⬆*[f2] T ≘ T2. +#f #T1 #T2 #H elim H -f -T1 -T2 +[ /3 width=3 by lifts_sort, ex2_intro/ +| #f #i1 #i2 #Hi #f1 #f2 #Ht elim (after_at_fwd … Hi … Ht) -Hi -Ht + /3 width=3 by lifts_lref, ex2_intro/ +| /3 width=3 by lifts_gref, ex2_intro/ +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f1 #f2 #Ht + elim (IHV … Ht) elim (IHT (⫯f1) (⫯f2)) -IHV -IHT + /3 width=5 by lifts_bind, after_O2, ex2_intro/ +| #f #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f1 #f2 #Ht + elim (IHV … Ht) elim (IHT … Ht) -IHV -IHT -Ht + /3 width=5 by lifts_flat, ex2_intro/ +] +qed-. + +(* Note: apparently, this was missing in Basic_2A1 *) +lemma lifts_split_div: ∀f1,T1,T2. ⬆*[f1] T1 ≘ T2 → + ∀f2,f. f2 ⊚ f1 ≘ f → + ∃∃T. ⬆*[f2] T2 ≘ T & ⬆*[f] T1 ≘ T. +#f1 #T1 #T2 #H elim H -f1 -T1 -T2 +[ /3 width=3 by lifts_sort, ex2_intro/ +| #f1 #i1 #i2 #Hi #f2 #f #Ht elim (after_at1_fwd … Hi … Ht) -Hi -Ht + /3 width=3 by lifts_lref, ex2_intro/ +| /3 width=3 by lifts_gref, ex2_intro/ +| #f1 #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f2 #f #Ht + elim (IHV … Ht) elim (IHT (⫯f2) (⫯f)) -IHV -IHT + /3 width=5 by lifts_bind, after_O2, ex2_intro/ +| #f1 #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f2 #f #Ht + elim (IHV … Ht) elim (IHT … Ht) -IHV -IHT -Ht + /3 width=5 by lifts_flat, ex2_intro/ +] +qed-. + +(* Basic_1: includes: dnf_dec2 dnf_dec *) +(* Basic_2A1: includes: is_lift_dec *) +lemma is_lifts_dec: ∀T2,f. Decidable (∃T1. ⬆*[f] T1 ≘ T2). +#T1 elim T1 -T1 +[ * [1,3: /3 width=2 by lifts_sort, lifts_gref, ex_intro, or_introl/ ] + #i2 #f elim (is_at_dec f i2) // + [ * /4 width=3 by lifts_lref, ex_intro, or_introl/ + | #H @or_intror * + #X #HX elim (lifts_inv_lref2 … HX) -HX + /3 width=2 by ex_intro/ + ] +| * [ #p ] #I #V2 #T2 #IHV2 #IHT2 #f + [ elim (IHV2 f) -IHV2 + [ * #V1 #HV12 elim (IHT2 (⫯f)) -IHT2 + [ * #T1 #HT12 @or_introl /3 width=2 by lifts_bind, ex_intro/ + | -V1 #HT2 @or_intror * #X #H + elim (lifts_inv_bind2 … H) -H /3 width=2 by ex_intro/ + ] + | -IHT2 #HV2 @or_intror * #X #H + elim (lifts_inv_bind2 … H) -H /3 width=2 by ex_intro/ + ] + | elim (IHV2 f) -IHV2 + [ * #V1 #HV12 elim (IHT2 f) -IHT2 + [ * #T1 #HT12 /4 width=2 by lifts_flat, ex_intro, or_introl/ + | -V1 #HT2 @or_intror * #X #H + elim (lifts_inv_flat2 … H) -H /3 width=2 by ex_intro/ + ] + | -IHT2 #HV2 @or_intror * #X #H + elim (lifts_inv_flat2 … H) -H /3 width=2 by ex_intro/ + ] + ] +] +qed-. + +(* Properties with uniform relocation ***************************************) + +lemma lifts_uni: ∀n1,n2,T,U. ⬆*[𝐔❴n1❵∘𝐔❴n2❵] T ≘ U → ⬆*[n1+n2] T ≘ U. +/3 width=4 by lifts_eq_repl_back, after_inv_total/ qed. + +(* Basic_2A1: removed theorems 14: + lifts_inv_nil lifts_inv_cons + lift_inv_Y1 lift_inv_Y2 lift_inv_lref_Y1 lift_inv_lref_Y2 lift_lref_Y lift_Y1 + lift_lref_lt_eq lift_lref_ge_eq lift_lref_plus lift_lref_pred + lift_lref_ge_minus lift_lref_ge_minus_eq +*) +(* Basic_1: removed theorems 8: + lift_lref_gt + lift_head lift_gen_head + lift_weight_map lift_weight lift_weight_add lift_weight_add_O + lift_tlt_dx +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_bind.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_bind.ma new file mode 100644 index 000000000..10630903b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_bind.ma @@ -0,0 +1,71 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ext2.ma". +include "static_2/relocation/lifts.ma". + +(* GENERIC RELOCATION FOR BINDERS *******************************************) + +definition liftsb: rtmap → relation bind ≝ + λf. ext2 (lifts f). + +interpretation "uniform relocation (binder for local environments)" + 'RLiftStar i I1 I2 = (liftsb (uni i) I1 I2). + +interpretation "generic relocation (binder for local environments)" + 'RLiftStar f I1 I2 = (liftsb f I1 I2). + +(* Basic_inversion lemmas **************************************************) + +lemma liftsb_inv_unit_sn: ∀f,I,Z2. ⬆*[f] BUnit I ≘ Z2 → Z2 = BUnit I. +/2 width=2 by ext2_inv_unit_sn/ qed-. + +lemma liftsb_inv_pair_sn: ∀f:rtmap. ∀Z2,I,V1. ⬆*[f] BPair I V1 ≘ Z2 → + ∃∃V2. ⬆*[f] V1 ≘ V2 & Z2 = BPair I V2. +/2 width=1 by ext2_inv_pair_sn/ qed-. + +lemma liftsb_inv_unit_dx: ∀f,I,Z1. ⬆*[f] Z1 ≘ BUnit I → Z1 = BUnit I. +/2 width=2 by ext2_inv_unit_dx/ qed-. + +lemma liftsb_inv_pair_dx: ∀f:rtmap. ∀Z1,I,V2. ⬆*[f] Z1 ≘ BPair I V2 → + ∃∃V1. ⬆*[f] V1 ≘ V2 & Z1 = BPair I V1. +/2 width=1 by ext2_inv_pair_dx/ qed-. + +(* Basic properties *********************************************************) + +lemma liftsb_eq_repl_back: ∀I1,I2. eq_repl_back … (λf. ⬆*[f] I1 ≘ I2). +#I1 #I2 #f1 * -I1 -I2 /3 width=3 by lifts_eq_repl_back, ext2_pair/ +qed-. + +lemma liftsb_refl: ∀f. 𝐈⦃f⦄ → reflexive … (liftsb f). +/3 width=1 by lifts_refl, ext2_refl/ qed. + +lemma liftsb_total: ∀I1,f. ∃I2. ⬆*[f] I1 ≘ I2. +* [2: #I #T1 #f elim (lifts_total T1 f) ] +/3 width=2 by ext2_unit, ext2_pair, ex_intro/ +qed-. + +lemma liftsb_split_trans: ∀f,I1,I2. ⬆*[f] I1 ≘ I2 → + ∀f1,f2. f2 ⊚ f1 ≘ f → + ∃∃I. ⬆*[f1] I1 ≘ I & ⬆*[f2] I ≘ I2. +#f #I1 #I2 * -I1 -I2 /2 width=3 by ext2_unit, ex2_intro/ +#I #V1 #V2 #HV12 #f1 #f2 #Hf elim (lifts_split_trans … HV12 … Hf) -f +/3 width=3 by ext2_pair, ex2_intro/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma liftsb_fwd_isid: ∀f,I1,I2. ⬆*[f] I1 ≘ I2 → 𝐈⦃f⦄ → I1 = I2. +#f #I1 #I2 * -I1 -I2 /3 width=3 by lifts_fwd_isid, eq_f2/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts.ma new file mode 100644 index 000000000..41c641716 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts.ma @@ -0,0 +1,130 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts.ma". + +(* GENERIC RELOCATION FOR TERMS *********************************************) + +(* Main properties **********************************************************) + +(* Basic_1: includes: lift_gen_lift *) +(* Basic_2A1: includes: lift_div_le lift_div_be *) +theorem lifts_div4: ∀f2,Tf,T. ⬆*[f2] Tf ≘ T → ∀g2,Tg. ⬆*[g2] Tg ≘ T → + ∀f1,g1. H_at_div f2 g2 f1 g1 → + ∃∃T0. ⬆*[f1] T0 ≘ Tf & ⬆*[g1] T0 ≘ Tg. +#f2 #Tf #T #H elim H -f2 -Tf -T +[ #f2 #s #g2 #Tg #H #f1 #g1 #_ + lapply (lifts_inv_sort2 … H) -H #H destruct + /2 width=3 by ex2_intro/ +| #f2 #jf #j #Hf2 #g2 #Tg #H #f1 #g1 #H0 + elim (lifts_inv_lref2 … H) -H #jg #Hg2 #H destruct + elim (H0 … Hf2 Hg2) -H0 -j /3 width=3 by lifts_lref, ex2_intro/ +| #f2 #l #g2 #Tg #H #f1 #g1 #_ + lapply (lifts_inv_gref2 … H) -H #H destruct + /2 width=3 by ex2_intro/ +| #f2 #p #I #Vf #V #Tf #T #_ #_ #IHV #IHT #g2 #X #H #f1 #g1 #H0 + elim (lifts_inv_bind2 … H) -H #Vg #Tg #HVg #HTg #H destruct + elim (IHV … HVg … H0) -IHV -HVg + elim (IHT … HTg) -IHT -HTg [ |*: /2 width=8 by at_div_pp/ ] + /3 width=5 by lifts_bind, ex2_intro/ +| #f2 #I #Vf #V #Tf #T #_ #_ #IHV #IHT #g2 #X #H #f1 #g1 #H0 + elim (lifts_inv_flat2 … H) -H #Vg #Tg #HVg #HTg #H destruct + elim (IHV … HVg … H0) -IHV -HVg + elim (IHT … HTg … H0) -IHT -HTg -H0 + /3 width=5 by lifts_flat, ex2_intro/ +] +qed-. + +lemma lifts_div4_one: ∀f,Tf,T. ⬆*[⫯f] Tf ≘ T → + ∀T1. ⬆*[1] T1 ≘ T → + ∃∃T0. ⬆*[1] T0 ≘ Tf & ⬆*[f] T0 ≘ T1. +/4 width=6 by lifts_div4, at_div_id_dx, at_div_pn/ qed-. + +theorem lifts_div3: ∀f2,T,T2. ⬆*[f2] T2 ≘ T → ∀f,T1. ⬆*[f] T1 ≘ T → + ∀f1. f2 ⊚ f1 ≘ f → ⬆*[f1] T1 ≘ T2. +#f2 #T #T2 #H elim H -f2 -T -T2 +[ #f2 #s #f #T1 #H >(lifts_inv_sort2 … H) -T1 // +| #f2 #i2 #i #Hi2 #f #T1 #H #f1 #Ht21 elim (lifts_inv_lref2 … H) -H + #i1 #Hi1 #H destruct /3 width=6 by lifts_lref, after_fwd_at1/ +| #f2 #l #f #T1 #H >(lifts_inv_gref2 … H) -T1 // +| #f2 #p #I #W2 #W #U2 #U #_ #_ #IHW #IHU #f #T1 #H + elim (lifts_inv_bind2 … H) -H #W1 #U1 #HW1 #HU1 #H destruct + /4 width=3 by lifts_bind, after_O2/ +| #f2 #I #W2 #W #U2 #U #_ #_ #IHW #IHU #f #T1 #H + elim (lifts_inv_flat2 … H) -H #W1 #U1 #HW1 #HU1 #H destruct + /3 width=3 by lifts_flat/ +] +qed-. + +(* Basic_1: was: lift1_lift1 (left to right) *) +(* Basic_1: includes: lift_free (left to right) lift_d lift1_xhg (right to left) lift1_free (right to left) *) +(* Basic_2A1: includes: lift_trans_be lift_trans_le lift_trans_ge lifts_lift_trans_le lifts_lift_trans *) +theorem lifts_trans: ∀f1,T1,T. ⬆*[f1] T1 ≘ T → ∀f2,T2. ⬆*[f2] T ≘ T2 → + ∀f. f2 ⊚ f1 ≘ f → ⬆*[f] T1 ≘ T2. +#f1 #T1 #T #H elim H -f1 -T1 -T +[ #f1 #s #f2 #T2 #H >(lifts_inv_sort1 … H) -T2 // +| #f1 #i1 #i #Hi1 #f2 #T2 #H #f #Ht21 elim (lifts_inv_lref1 … H) -H + #i2 #Hi2 #H destruct /3 width=6 by lifts_lref, after_fwd_at/ +| #f1 #l #f2 #T2 #H >(lifts_inv_gref1 … H) -T2 // +| #f1 #p #I #W1 #W #U1 #U #_ #_ #IHW #IHU #f2 #T2 #H + elim (lifts_inv_bind1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct + /4 width=3 by lifts_bind, after_O2/ +| #f1 #I #W1 #W #U1 #U #_ #_ #IHW #IHU #f2 #T2 #H + elim (lifts_inv_flat1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct + /3 width=3 by lifts_flat/ +] +qed-. + +(* Basic_2A1: includes: lift_conf_O1 lift_conf_be *) +theorem lifts_conf: ∀f1,T,T1. ⬆*[f1] T ≘ T1 → ∀f,T2. ⬆*[f] T ≘ T2 → + ∀f2. f2 ⊚ f1 ≘ f → ⬆*[f2] T1 ≘ T2. +#f1 #T #T1 #H elim H -f1 -T -T1 +[ #f1 #s #f #T2 #H >(lifts_inv_sort1 … H) -T2 // +| #f1 #i #i1 #Hi1 #f #T2 #H #f2 #Ht21 elim (lifts_inv_lref1 … H) -H + #i2 #Hi2 #H destruct /3 width=6 by lifts_lref, after_fwd_at2/ +| #f1 #l #f #T2 #H >(lifts_inv_gref1 … H) -T2 // +| #f1 #p #I #W #W1 #U #U1 #_ #_ #IHW #IHU #f #T2 #H + elim (lifts_inv_bind1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct + /4 width=3 by lifts_bind, after_O2/ +| #f1 #I #W #W1 #U #U1 #_ #_ #IHW #IHU #f #T2 #H + elim (lifts_inv_flat1 … H) -H #W2 #U2 #HW2 #HU2 #H destruct + /3 width=3 by lifts_flat/ +] +qed-. + +(* Advanced proprerties *****************************************************) + +(* Basic_2A1: includes: lift_inj *) +lemma lifts_inj: ∀f. is_inj2 … (lifts f). +#f #T1 #U #H1 #T2 #H2 lapply (after_isid_dx 𝐈𝐝 … f) +/3 width=6 by lifts_div3, lifts_fwd_isid/ +qed-. + +(* Basic_2A1: includes: lift_mono *) +lemma lifts_mono: ∀f,T. is_mono … (lifts f T). +#f #T #U1 #H1 #U2 #H2 lapply (after_isid_sn 𝐈𝐝 … f) +/3 width=6 by lifts_conf, lifts_fwd_isid/ +qed-. + +lemma liftable2_sn_bi: ∀R. liftable2_sn R → liftable2_bi R. +#R #HR #T1 #T2 #HT12 #f #U1 #HTU1 #U2 #HTU2 +elim (HR … HT12 … HTU1) -HR -T1 #X #HTX #HUX +<(lifts_mono … HTX … HTU2) -T2 -U2 -f // +qed-. + +lemma deliftable2_sn_bi: ∀R. deliftable2_sn R → deliftable2_bi R. +#R #HR #U1 #U2 #HU12 #f #T1 #HTU1 #T2 #HTU2 +elim (HR … HU12 … HTU1) -HR -U1 #X #HUX #HTX +<(lifts_inj … HUX … HTU2) -U2 -T2 -f // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts_bind.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts_bind.ma new file mode 100644 index 000000000..e08ce9962 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts_bind.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_lifts.ma". +include "static_2/relocation/lifts_bind.ma". + +(* GENERIC RELOCATION FOR BINDERS *******************************************) + +(* Main properties **********************************************************) + +theorem liftsb_div3: ∀f2,I,I2. ⬆*[f2] I2 ≘ I → ∀f,I1. ⬆*[f] I1 ≘ I → + ∀f1. f2 ⊚ f1 ≘ f → ⬆*[f1] I1 ≘ I2. +#f2 #I #I2 * -I -I2 #I [2: #V #V2 #HV2 ] #f #I1 #H +[ elim (liftsb_inv_pair_dx … H) | lapply (liftsb_inv_unit_dx … H) ] -H +/3 width=6 by lifts_div3, ext2_pair, ext2_unit/ +qed-. + +theorem liftsb_trans: ∀f1,I1,I. ⬆*[f1] I1 ≘ I → ∀f2,I2. ⬆*[f2] I ≘ I2 → + ∀f. f2 ⊚ f1 ≘ f → ⬆*[f] I1 ≘ I2. +#f1 #I1 #I * -I1 -I #I1 [2: #V1 #V #HV1 ] #f2 #I2 #H +[ elim (liftsb_inv_pair_sn … H) | lapply (liftsb_inv_unit_sn … H) ] -H +/3 width=6 by lifts_trans, ext2_pair, ext2_unit/ +qed-. + +theorem liftsb_conf: ∀f1,I,I1. ⬆*[f1] I ≘ I1 → ∀f,I2. ⬆*[f] I ≘ I2 → + ∀f2. f2 ⊚ f1 ≘ f → ⬆*[f2] I1 ≘ I2. +#f1 #I #I1 * -I -I1 #I [2: #V #V1 #HV1 ] #f2 #I2 #H +[ elim (liftsb_inv_pair_sn … H) | lapply (liftsb_inv_unit_sn … H) ] -H +/3 width=6 by lifts_conf, ext2_pair, ext2_unit/ +qed-. + +(* Advanced proprerties *****************************************************) + +lemma liftsb_inj: ∀f. is_inj2 … (liftsb f). +#f #T1 #U #H1 #T2 #H2 lapply (after_isid_dx 𝐈𝐝 … f) +/3 width=6 by liftsb_div3, liftsb_fwd_isid/ +qed-. + +lemma liftsb_mono: ∀f,T. is_mono … (liftsb f T). +#f #T #U1 #H1 #U2 #H2 lapply (after_isid_sn 𝐈𝐝 … f) +/3 width=6 by liftsb_conf, liftsb_fwd_isid/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts_vector.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts_vector.ma new file mode 100644 index 000000000..033de1fb4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_lifts_vector.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_lifts.ma". +include "static_2/relocation/lifts_vector.ma". + +(* GENERIC RELOCATION FOR TERM VECTORS *************************************) + +(* Main properties **********************************************************) + +(* Basic_1: includes: lifts_inj *) +theorem liftsv_inj: ∀f,T1s,Us. ⬆*[f] T1s ≘ Us → + ∀T2s. ⬆*[f] T2s ≘ Us → T1s = T2s. +#f #T1s #Us #H elim H -T1s -Us +[ #T2s #H >(liftsv_inv_nil2 … H) -H // +| #T1s #Us #T1 #U #HT1U #_ #IHT1Us #X #H destruct + elim (liftsv_inv_cons2 … H) -H #T2 #T2s #HT2U #HT2Us #H destruct + >(lifts_inj … HT1U … HT2U) -U /3 width=1 by eq_f/ +] +qed-. + +(* Basic_2A1: includes: liftv_mono *) +theorem liftsv_mono: ∀f,Ts,U1s. ⬆*[f] Ts ≘ U1s → + ∀U2s. ⬆*[f] Ts ≘ U2s → U1s = U2s. +#f #Ts #U1s #H elim H -Ts -U1s +[ #U2s #H >(liftsv_inv_nil1 … H) -H // +| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct + elim (liftsv_inv_cons1 … H) -H #U2 #U2s #HTU2 #HTU2s #H destruct + >(lifts_mono … HTU1 … HTU2) -T /3 width=1 by eq_f/ +] +qed-. + +(* Basic_1: includes: lifts1_xhg (right to left) *) +(* Basic_2A1: includes: liftsv_liftv_trans_le *) +theorem liftsv_trans: ∀f1,T1s,Ts. ⬆*[f1] T1s ≘ Ts → ∀T2s,f2. ⬆*[f2] Ts ≘ T2s → + ∀f. f2 ⊚ f1 ≘ f → ⬆*[f] T1s ≘ T2s. +#f1 #T1s #Ts #H elim H -T1s -Ts +[ #T2s #f2 #H >(liftsv_inv_nil1 … H) -T2s /2 width=3 by liftsv_nil/ +| #T1s #Ts #T1 #T #HT1 #_ #IHT1s #X #f2 #H elim (liftsv_inv_cons1 … H) -H + #T2 #T2s #HT2 #HT2s #H destruct /3 width=6 by lifts_trans, liftsv_cons/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_simple.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_simple.ma new file mode 100644 index 000000000..115a0b473 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_simple.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_simple.ma". +include "static_2/relocation/lifts.ma". + +(* GENERIC RELOCATION FOR TERMS *********************************************) + +(* Forward lemmas with simple terms *****************************************) + +(* Basic_2A1: includes: lift_simple_dx *) +lemma lifts_simple_dx: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. +#f #T1 #T2 #H elim H -f -T1 -T2 // +#f #p #I #V1 #V2 #T1 #T2 #_ #_ #_ #_ #H elim (simple_inv_bind … H) +qed-. + +(* Basic_2A1: includes: lift_simple_sn *) +lemma lifts_simple_sn: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. +#f #T1 #T2 #H elim H -f -T1 -T2 // +#f #p #I #V1 #V2 #T1 #T2 #_ #_ #_ #_ #H elim (simple_inv_bind … H) +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tdeq.ma new file mode 100644 index 000000000..0b0dbf92f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tdeq.ma @@ -0,0 +1,66 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/tdeq.ma". +include "static_2/relocation/lifts_lifts.ma". + +(* GENERIC RELOCATION FOR TERMS *********************************************) + +(* Properties with degree-based equivalence for terms ***********************) + +lemma tdeq_lifts_sn: ∀h,o. liftable2_sn (tdeq h o). +#h #o #T1 #T2 #H elim H -T1 -T2 [||| * ] +[ #s1 #s2 #d #Hs1 #Hs2 #f #X #H >(lifts_inv_sort1 … H) -H + /3 width=5 by lifts_sort, tdeq_sort, ex2_intro/ +| #i #f #X #H elim (lifts_inv_lref1 … H) -H + /3 width=3 by lifts_lref, tdeq_lref, ex2_intro/ +| #l #f #X #H >(lifts_inv_gref1 … H) -H + /2 width=3 by lifts_gref, tdeq_gref, ex2_intro/ +| #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H + #W1 #U1 #HVW1 #HTU1 #H destruct + elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 + /3 width=5 by lifts_bind, tdeq_pair, ex2_intro/ +| #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H + #W1 #U1 #HVW1 #HTU1 #H destruct + elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 + /3 width=5 by lifts_flat, tdeq_pair, ex2_intro/ +] +qed-. + +lemma tdeq_lifts_bi: ∀h,o. liftable2_bi (tdeq h o). +/3 width=6 by tdeq_lifts_sn, liftable2_sn_bi/ qed-. + +(* Inversion lemmas with degree-based equivalence for terms *****************) + +lemma tdeq_inv_lifts_sn: ∀h,o. deliftable2_sn (tdeq h o). +#h #o #U1 #U2 #H elim H -U1 -U2 [||| * ] +[ #s1 #s2 #d #Hs1 #Hs2 #f #X #H >(lifts_inv_sort2 … H) -H + /3 width=5 by lifts_sort, tdeq_sort, ex2_intro/ +| #i #f #X #H elim (lifts_inv_lref2 … H) -H + /3 width=3 by lifts_lref, tdeq_lref, ex2_intro/ +| #l #f #X #H >(lifts_inv_gref2 … H) -H + /2 width=3 by lifts_gref, tdeq_gref, ex2_intro/ +| #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H + #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 + /3 width=5 by lifts_bind, tdeq_pair, ex2_intro/ +| #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H + #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 + /3 width=5 by lifts_flat, tdeq_pair, ex2_intro/ +] +qed-. + +lemma tdeq_inv_lifts_bi: ∀h,o. deliftable2_bi (tdeq h o). +/3 width=6 by tdeq_inv_lifts_sn, deliftable2_sn_bi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_vector.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_vector.ma new file mode 100644 index 000000000..4721eafe0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_vector.ma @@ -0,0 +1,137 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_vector.ma". +include "static_2/relocation/lifts.ma". + +(* GENERIC RELOCATION FOR TERM VECTORS *************************************) + +(* Basic_2A1: includes: liftv_nil liftv_cons *) +inductive liftsv (f:rtmap): relation (list term) ≝ +| liftsv_nil : liftsv f (Ⓔ) (Ⓔ) +| liftsv_cons: ∀T1s,T2s,T1,T2. + ⬆*[f] T1 ≘ T2 → liftsv f T1s T2s → + liftsv f (T1 ⨮ T1s) (T2 ⨮ T2s) +. + +interpretation "uniform relocation (term vector)" + 'RLiftStar i T1s T2s = (liftsv (uni i) T1s T2s). + +interpretation "generic relocation (term vector)" + 'RLiftStar f T1s T2s = (liftsv f T1s T2s). + +(* Basic inversion lemmas ***************************************************) + +fact liftsv_inv_nil1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → X = Ⓔ → Y = Ⓔ. +#f #X #Y * -X -Y // +#T1s #T2s #T1 #T2 #_ #_ #H destruct +qed-. + +(* Basic_2A1: includes: liftv_inv_nil1 *) +lemma liftsv_inv_nil1: ∀f,Y. ⬆*[f] Ⓔ ≘ Y → Y = Ⓔ. +/2 width=5 by liftsv_inv_nil1_aux/ qed-. + +fact liftsv_inv_cons1_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → + ∀T1,T1s. X = T1 ⨮ T1s → + ∃∃T2,T2s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & + Y = T2 ⨮ T2s. +#f #X #Y * -X -Y +[ #U1 #U1s #H destruct +| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_2A1: includes: liftv_inv_cons1 *) +lemma liftsv_inv_cons1: ∀f:rtmap. ∀T1,T1s,Y. ⬆*[f] T1 ⨮ T1s ≘ Y → + ∃∃T2,T2s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & + Y = T2 ⨮ T2s. +/2 width=3 by liftsv_inv_cons1_aux/ qed-. + +fact liftsv_inv_nil2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → Y = Ⓔ → X = Ⓔ. +#f #X #Y * -X -Y // +#T1s #T2s #T1 #T2 #_ #_ #H destruct +qed-. + +lemma liftsv_inv_nil2: ∀f,X. ⬆*[f] X ≘ Ⓔ → X = Ⓔ. +/2 width=5 by liftsv_inv_nil2_aux/ qed-. + +fact liftsv_inv_cons2_aux: ∀f:rtmap. ∀X,Y. ⬆*[f] X ≘ Y → + ∀T2,T2s. Y = T2 ⨮ T2s → + ∃∃T1,T1s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & + X = T1 ⨮ T1s. +#f #X #Y * -X -Y +[ #U2 #U2s #H destruct +| #T1s #T2s #T1 #T2 #HT12 #HT12s #U2 #U2s #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma liftsv_inv_cons2: ∀f:rtmap. ∀X,T2,T2s. ⬆*[f] X ≘ T2 ⨮ T2s → + ∃∃T1,T1s. ⬆*[f] T1 ≘ T2 & ⬆*[f] T1s ≘ T2s & + X = T1 ⨮ T1s. +/2 width=3 by liftsv_inv_cons2_aux/ qed-. + +(* Basic_1: was: lifts1_flat (left to right) *) +lemma lifts_inv_applv1: ∀f:rtmap. ∀V1s,U1,T2. ⬆*[f] Ⓐ V1s.U1 ≘ T2 → + ∃∃V2s,U2. ⬆*[f] V1s ≘ V2s & ⬆*[f] U1 ≘ U2 & + T2 = Ⓐ V2s.U2. +#f #V1s elim V1s -V1s +[ /3 width=5 by ex3_2_intro, liftsv_nil/ +| #V1 #V1s #IHV1s #T1 #X #H elim (lifts_inv_flat1 … H) -H + #V2 #Y #HV12 #HY #H destruct elim (IHV1s … HY) -IHV1s -HY + #V2s #T2 #HV12s #HT12 #H destruct /3 width=5 by ex3_2_intro, liftsv_cons/ +] +qed-. + +lemma lifts_inv_applv2: ∀f:rtmap. ∀V2s,U2,T1. ⬆*[f] T1 ≘ Ⓐ V2s.U2 → + ∃∃V1s,U1. ⬆*[f] V1s ≘ V2s & ⬆*[f] U1 ≘ U2 & + T1 = Ⓐ V1s.U1. +#f #V2s elim V2s -V2s +[ /3 width=5 by ex3_2_intro, liftsv_nil/ +| #V2 #V2s #IHV2s #T2 #X #H elim (lifts_inv_flat2 … H) -H + #V1 #Y #HV12 #HY #H destruct elim (IHV2s … HY) -IHV2s -HY + #V1s #T1 #HV12s #HT12 #H destruct /3 width=5 by ex3_2_intro, liftsv_cons/ +] +qed-. + +(* Basic properties *********************************************************) + +(* Basic_2A1: includes: liftv_total *) +lemma liftsv_total: ∀f. ∀T1s:list term. ∃T2s. ⬆*[f] T1s ≘ T2s. +#f #T1s elim T1s -T1s +[ /2 width=2 by liftsv_nil, ex_intro/ +| #T1 #T1s * #T2s #HT12s + elim (lifts_total T1 f) /3 width=2 by liftsv_cons, ex_intro/ +] +qed-. + +(* Basic_1: was: lifts1_flat (right to left) *) +lemma lifts_applv: ∀f:rtmap. ∀V1s,V2s. ⬆*[f] V1s ≘ V2s → + ∀T1,T2. ⬆*[f] T1 ≘ T2 → + ⬆*[f] Ⓐ V1s.T1 ≘ Ⓐ V2s.T2. +#f #V1s #V2s #H elim H -V1s -V2s /3 width=1 by lifts_flat/ +qed. + +lemma liftsv_split_trans: ∀f,T1s,T2s. ⬆*[f] T1s ≘ T2s → + ∀f1,f2. f2 ⊚ f1 ≘ f → + ∃∃Ts. ⬆*[f1] T1s ≘ Ts & ⬆*[f2] Ts ≘ T2s. +#f #T1s #T2s #H elim H -T1s -T2s +[ /2 width=3 by liftsv_nil, ex2_intro/ +| #T1s #T2s #T1 #T2 #HT12 #_ #IH #f1 #f2 #Hf + elim (IH … Hf) -IH + elim (lifts_split_trans … HT12 … Hf) -HT12 -Hf + /3 width=5 by liftsv_cons, ex2_intro/ +] +qed-. + +(* Basic_1: removed theorems 2: lifts1_nil lifts1_cons *) diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_weight.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_weight.ma new file mode 100644 index 000000000..358660fe2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_weight.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_weight.ma". +include "static_2/relocation/lifts.ma". + +(* GENERIC RELOCATION FOR TERMS *********************************************) + +(* Forward lemmas with weight for terms *************************************) + +(* Basic_2A1: includes: lift_fwd_tw *) +lemma lifts_fwd_tw: ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → ♯{T1} = ♯{T2}. +#f #T1 #T2 #H elim H -f -T1 -T2 normalize // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_weight_bind.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_weight_bind.ma new file mode 100644 index 000000000..62135a027 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_weight_bind.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/bind_weight.ma". +include "static_2/relocation/lifts_weight.ma". +include "static_2/relocation/lifts_bind.ma". + +(* GENERIC RELOCATION FOR BINDERS *******************************************) + +(* Forward lemmas with weight for binders ***********************************) + +lemma liftsb_fwd_bw: ∀f,I1,I2. ⬆*[f] I1 ≘ I2 → ♯{I1} = ♯{I2}. +#f #I1 #I2 * -I1 -I2 /2 width=2 by lifts_fwd_tw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma new file mode 100644 index 000000000..dcfbb0323 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma @@ -0,0 +1,103 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/ideqsn_3.ma". +include "static_2/syntax/ceq_ext.ma". +include "static_2/relocation/sex.ma". + +(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) + +(* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *) +definition seq: relation3 rtmap lenv lenv ≝ sex ceq_ext cfull. + +interpretation + "syntactic equivalence on selected entries (local environment)" + 'IdEqSn f L1 L2 = (seq f L1 L2). + +(* Basic properties *********************************************************) + +lemma seq_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2). +/2 width=3 by sex_eq_repl_back/ qed-. + +lemma seq_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2). +/2 width=3 by sex_eq_repl_fwd/ qed-. + +lemma sle_seq_trans: ∀f2,L1,L2. L1 ≡[f2] L2 → + ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2. +/2 width=3 by sle_sex_trans/ qed-. + +(* Basic_2A1: includes: lreq_refl *) +lemma seq_refl: ∀f. reflexive … (seq f). +/2 width=1 by sex_refl/ qed. + +(* Basic_2A1: includes: lreq_sym *) +lemma seq_sym: ∀f. symmetric … (seq f). +/3 width=2 by sex_sym, cext2_sym/ qed-. + +(* Basic inversion lemmas ***************************************************) + +(* Basic_2A1: includes: lreq_inv_atom1 *) +lemma seq_inv_atom1: ∀f,Y. ⋆ ≡[f] Y → Y = ⋆. +/2 width=4 by sex_inv_atom1/ qed-. + +(* Basic_2A1: includes: lreq_inv_pair1 *) +lemma seq_inv_next1: ∀g,J,K1,Y. K1.ⓘ{J} ≡[↑g] Y → + ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ{J}. +#g #J #K1 #Y #H +elim (sex_inv_next1 … H) -H #Z #K2 #HK12 #H1 #H2 destruct +<(ceq_ext_inv_eq … H1) -Z /2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *) +lemma seq_inv_push1: ∀g,J1,K1,Y. K1.ⓘ{J1} ≡[⫯g] Y → + ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ{J2}. +#g #J1 #K1 #Y #H elim (sex_inv_push1 … H) -H /2 width=4 by ex2_2_intro/ +qed-. + +(* Basic_2A1: includes: lreq_inv_atom2 *) +lemma seq_inv_atom2: ∀f,X. X ≡[f] ⋆ → X = ⋆. +/2 width=4 by sex_inv_atom2/ qed-. + +(* Basic_2A1: includes: lreq_inv_pair2 *) +lemma seq_inv_next2: ∀g,J,X,K2. X ≡[↑g] K2.ⓘ{J} → + ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ{J}. +#g #J #X #K2 #H +elim (sex_inv_next2 … H) -H #Z #K1 #HK12 #H1 #H2 destruct +<(ceq_ext_inv_eq … H1) -J /2 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *) +lemma seq_inv_push2: ∀g,J2,X,K2. X ≡[⫯g] K2.ⓘ{J2} → + ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ{J1}. +#g #J2 #X #K2 #H elim (sex_inv_push2 … H) -H /2 width=4 by ex2_2_intro/ +qed-. + +(* Basic_2A1: includes: lreq_inv_pair *) +lemma seq_inv_next: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[↑f] L2.ⓘ{I2} → + ∧∧ L1 ≡[f] L2 & I1 = I2. +#f #I1 #I2 #L1 #L2 #H elim (sex_inv_next … H) -H +/3 width=3 by ceq_ext_inv_eq, conj/ +qed-. + +(* Basic_2A1: includes: lreq_inv_succ *) +lemma seq_inv_push: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[⫯f] L2.ⓘ{I2} → L1 ≡[f] L2. +#f #I1 #I2 #L1 #L2 #H elim (sex_inv_push … H) -H /2 width=1 by conj/ +qed-. + +lemma seq_inv_tl: ∀f,I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ{I} ≡[f] L2.ⓘ{I}. +/2 width=1 by sex_inv_tl/ qed-. + +(* Basic_2A1: removed theorems 5: + lreq_pair_lt lreq_succ_lt lreq_pair_O_Y lreq_O2 lreq_inv_O_Y +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma new file mode 100644 index 000000000..3ea6b84b1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/sex_length.ma". +include "static_2/relocation/seq.ma". + +(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: includes: lreq_fwd_length *) +lemma seq_fwd_length: ∀f,L1,L2. L1 ≡[f] L2 → |L1| = |L2|. +/2 width=4 by sex_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma new file mode 100644 index 000000000..a06f1f527 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma @@ -0,0 +1,37 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ceq_ext_ceq_ext.ma". +include "static_2/relocation/sex_sex.ma". + +(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) + +(* Main properties **********************************************************) + +theorem seq_trans: ∀f. Transitive … (seq f). +/3 width=5 by sex_trans, ceq_ext_trans/ qed-. + +theorem seq_canc_sn: ∀f. left_cancellable … (seq f). +/3 width=3 by sex_canc_sn, seq_trans, seq_sym/ qed-. + +theorem seq_canc_dx: ∀f. right_cancellable … (seq f). +/3 width=3 by sex_canc_dx, seq_trans, seq_sym/ qed-. + +theorem seq_join: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → + ∀f. f1 ⋓ f2 ≘ f → L1 ≡[f] L2. +/2 width=5 by sex_join/ qed-. + +theorem seq_meet: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → + ∀f. f1 ⋒ f2 ≘ f → L1 ≡[f] L2. +/2 width=5 by sex_meet/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma new file mode 100644 index 000000000..df09463c8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma @@ -0,0 +1,296 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/rtmap_sle.ma". +include "ground_2/relocation/rtmap_sdj.ma". +include "static_2/notation/relations/relation_5.ma". +include "static_2/syntax/lenv.ma". + +(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) + +inductive sex (RN,RP:relation3 lenv bind bind): rtmap → relation lenv ≝ +| sex_atom: ∀f. sex RN RP f (⋆) (⋆) +| sex_next: ∀f,I1,I2,L1,L2. + sex RN RP f L1 L2 → RN L1 I1 I2 → + sex RN RP (↑f) (L1.ⓘ{I1}) (L2.ⓘ{I2}) +| sex_push: ∀f,I1,I2,L1,L2. + sex RN RP f L1 L2 → RP L1 I1 I2 → + sex RN RP (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2}) +. + +interpretation "generic entrywise extension (local environment)" + 'Relation RN RP f L1 L2 = (sex RN RP f L1 L2). + +definition R_pw_confluent2_sex: relation3 lenv bind bind → relation3 lenv bind bind → + relation3 lenv bind bind → relation3 lenv bind bind → + relation3 lenv bind bind → relation3 lenv bind bind → + relation3 rtmap lenv bind ≝ + λR1,R2,RN1,RP1,RN2,RP2,f,L0,I0. + ∀I1. R1 L0 I0 I1 → ∀I2. R2 L0 I0 I2 → + ∀L1. L0 ⪤[RN1, RP1, f] L1 → ∀L2. L0 ⪤[RN2, RP2, f] L2 → + ∃∃I. R2 L1 I1 I & R1 L2 I2 I. + +definition sex_transitive: relation3 lenv bind bind → relation3 lenv bind bind → + relation3 lenv bind bind → + relation3 lenv bind bind → relation3 lenv bind bind → + relation3 rtmap lenv bind ≝ + λR1,R2,R3,RN,RP,f,L1,I1. + ∀I. R1 L1 I1 I → ∀L2. L1 ⪤[RN, RP, f] L2 → + ∀I2. R2 L2 I I2 → R3 L1 I1 I2. + +(* Basic inversion lemmas ***************************************************) + +fact sex_inv_atom1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → X = ⋆ → Y = ⋆. +#RN #RP #f #X #Y * -f -X -Y // +#f #I1 #I2 #L1 #L2 #_ #_ #H destruct +qed-. + +(* Basic_2A1: includes lpx_sn_inv_atom1 *) +lemma sex_inv_atom1: ∀RN,RP,f,Y. ⋆ ⪤[RN, RP, f] Y → Y = ⋆. +/2 width=6 by sex_inv_atom1_aux/ qed-. + +fact sex_inv_next1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ↑g → + ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}. +#RN #RP #f #X #Y * -f -X -Y +[ #f #g #J1 #K1 #H destruct +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_next … H2) -g destruct + /2 width=5 by ex3_2_intro/ +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_push_next … H) +] +qed-. + +(* Basic_2A1: includes lpx_sn_inv_pair1 *) +lemma sex_inv_next1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN, RP, ↑g] Y → + ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}. +/2 width=7 by sex_inv_next1_aux/ qed-. + +fact sex_inv_push1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ⫯g → + ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}. +#RN #RP #f #X #Y * -f -X -Y +[ #f #g #J1 #K1 #H destruct +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_next_push … H) +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_push … H2) -g destruct + /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma sex_inv_push1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN, RP, ⫯g] Y → + ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}. +/2 width=7 by sex_inv_push1_aux/ qed-. + +fact sex_inv_atom2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → Y = ⋆ → X = ⋆. +#RN #RP #f #X #Y * -f -X -Y // +#f #I1 #I2 #L1 #L2 #_ #_ #H destruct +qed-. + +(* Basic_2A1: includes lpx_sn_inv_atom2 *) +lemma sex_inv_atom2: ∀RN,RP,f,X. X ⪤[RN, RP, f] ⋆ → X = ⋆. +/2 width=6 by sex_inv_atom2_aux/ qed-. + +fact sex_inv_next2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ↑g → + ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}. +#RN #RP #f #X #Y * -f -X -Y +[ #f #g #J2 #K2 #H destruct +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_next … H2) -g destruct + /2 width=5 by ex3_2_intro/ +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_push_next … H) +] +qed-. + +(* Basic_2A1: includes lpx_sn_inv_pair2 *) +lemma sex_inv_next2: ∀RN,RP,g,J2,X,K2. X ⪤[RN, RP, ↑g] K2.ⓘ{J2} → + ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}. +/2 width=7 by sex_inv_next2_aux/ qed-. + +fact sex_inv_push2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ⫯g → + ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}. +#RN #RP #f #X #Y * -f -X -Y +[ #f #J2 #K2 #g #H destruct +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_next_push … H) +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_push … H2) -g destruct + /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma sex_inv_push2: ∀RN,RP,g,J2,X,K2. X ⪤[RN, RP, ⫯g] K2.ⓘ{J2} → + ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}. +/2 width=7 by sex_inv_push2_aux/ qed-. + +(* Basic_2A1: includes lpx_sn_inv_pair *) +lemma sex_inv_next: ∀RN,RP,f,I1,I2,L1,L2. + L1.ⓘ{I1} ⪤[RN, RP, ↑f] L2.ⓘ{I2} → + L1 ⪤[RN, RP, f] L2 ∧ RN L1 I1 I2. +#RN #RP #f #I1 #I2 #L1 #L2 #H elim (sex_inv_next1 … H) -H +#I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/ +qed-. + +lemma sex_inv_push: ∀RN,RP,f,I1,I2,L1,L2. + L1.ⓘ{I1} ⪤[RN, RP, ⫯f] L2.ⓘ{I2} → + L1 ⪤[RN, RP, f] L2 ∧ RP L1 I1 I2. +#RN #RP #f #I1 #I2 #L1 #L2 #H elim (sex_inv_push1 … H) -H +#I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/ +qed-. + +lemma sex_inv_tl: ∀RN,RP,f,I1,I2,L1,L2. L1 ⪤[RN, RP, ⫱f] L2 → + RN L1 I1 I2 → RP L1 I1 I2 → + L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2}. +#RN #RP #f #I1 #I2 #L2 #L2 elim (pn_split f) * +/2 width=1 by sex_next, sex_push/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma sex_fwd_bind: ∀RN,RP,f,I1,I2,L1,L2. + L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2} → + L1 ⪤[RN, RP, ⫱f] L2. +#RN #RP #f #I1 #I2 #L1 #L2 #Hf +elim (pn_split f) * #g #H destruct +[ elim (sex_inv_push … Hf) | elim (sex_inv_next … Hf) ] -Hf // +qed-. + +(* Basic properties *********************************************************) + +lemma sex_eq_repl_back: ∀RN,RP,L1,L2. eq_repl_back … (λf. L1 ⪤[RN, RP, f] L2). +#RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // +#f1 #I1 #I2 #L1 #L2 #_ #HI #IH #f2 #H +[ elim (eq_inv_nx … H) -H /3 width=3 by sex_next/ +| elim (eq_inv_px … H) -H /3 width=3 by sex_push/ +] +qed-. + +lemma sex_eq_repl_fwd: ∀RN,RP,L1,L2. eq_repl_fwd … (λf. L1 ⪤[RN, RP, f] L2). +#RN #RP #L1 #L2 @eq_repl_sym /2 width=3 by sex_eq_repl_back/ (**) (* full auto fails *) +qed-. + +lemma sex_refl: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f.reflexive … (sex RN RP f). +#RN #RP #HRN #HRP #f #L generalize in match f; -f elim L -L // +#L #I #IH #f elim (pn_split f) * +#g #H destruct /2 width=1 by sex_next, sex_push/ +qed. + +lemma sex_sym: ∀RN,RP. + (∀L1,L2,I1,I2. RN L1 I1 I2 → RN L2 I2 I1) → + (∀L1,L2,I1,I2. RP L1 I1 I2 → RP L2 I2 I1) → + ∀f. symmetric … (sex RN RP f). +#RN #RP #HRN #HRP #f #L1 #L2 #H elim H -L1 -L2 -f +/3 width=2 by sex_next, sex_push/ +qed-. + +lemma sex_pair_repl: ∀RN,RP,f,I1,I2,L1,L2. + L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2} → + ∀J1,J2. RN L1 J1 J2 → RP L1 J1 J2 → + L1.ⓘ{J1} ⪤[RN, RP, f] L2.ⓘ{J2}. +/3 width=3 by sex_inv_tl, sex_fwd_bind/ qed-. + +lemma sex_co: ∀RN1,RP1,RN2,RP2. RN1 ⊆ RN2 → RP1 ⊆ RP2 → + ∀f,L1,L2. L1 ⪤[RN1, RP1, f] L2 → L1 ⪤[RN2, RP2, f] L2. +#RN1 #RP1 #RN2 #RP2 #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2 +/3 width=1 by sex_atom, sex_next, sex_push/ +qed-. + +lemma sex_co_isid: ∀RN1,RP1,RN2,RP2. RP1 ⊆ RP2 → + ∀f,L1,L2. L1 ⪤[RN1, RP1, f] L2 → 𝐈⦃f⦄ → + L1 ⪤[RN2, RP2, f] L2. +#RN1 #RP1 #RN2 #RP2 #HR #f #L1 #L2 #H elim H -f -L1 -L2 // +#f #I1 #I2 #K1 #K2 #_ #HI12 #IH #H +[ elim (isid_inv_next … H) -H // +| /4 width=3 by sex_push, isid_inv_push/ +] +qed-. + +lemma sex_sdj: ∀RN,RP. RP ⊆ RN → + ∀f1,L1,L2. L1 ⪤[RN, RP, f1] L2 → + ∀f2. f1 ∥ f2 → L1 ⪤[RP, RN, f2] L2. +#RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 // +#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12 +[ elim (sdj_inv_nx … H12) -H12 [2,3: // ] + #g2 #H #H2 destruct /3 width=1 by sex_push/ +| elim (sdj_inv_px … H12) -H12 [2,4: // ] * + #g2 #H #H2 destruct /3 width=1 by sex_next, sex_push/ +] +qed-. + +lemma sle_sex_trans: ∀RN,RP. RN ⊆ RP → + ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 → + ∀f1. f1 ⊆ f2 → L1 ⪤[RN, RP, f1] L2. +#RN #RP #HR #f2 #L1 #L2 #H elim H -f2 -L1 -L2 // +#f2 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f1 #H12 +[ elim (pn_split f1) * ] +[ /4 width=5 by sex_push, sle_inv_pn/ +| /4 width=5 by sex_next, sle_inv_nn/ +| elim (sle_inv_xp … H12) -H12 [2,3: // ] + #g1 #H #H1 destruct /3 width=5 by sex_push/ +] +qed-. + +lemma sle_sex_conf: ∀RN,RP. RP ⊆ RN → + ∀f1,L1,L2. L1 ⪤[RN, RP, f1] L2 → + ∀f2. f1 ⊆ f2 → L1 ⪤[RN, RP, f2] L2. +#RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 // +#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12 +[2: elim (pn_split f2) * ] +[ /4 width=5 by sex_push, sle_inv_pp/ +| /4 width=5 by sex_next, sle_inv_pn/ +| elim (sle_inv_nx … H12) -H12 [2,3: // ] + #g2 #H #H2 destruct /3 width=5 by sex_next/ +] +qed-. + +lemma sex_sle_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 → + ∀f,L1,L2. L1 ⪤[R1, RP, f] L2 → ∀g. f ⊆ g → + ∃∃L. L1 ⪤[R1, RP, g] L & L ⪤[R2, cfull, f] L2. +#R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2 +[ /2 width=3 by sex_atom, ex2_intro/ ] +#f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H +[ elim (sle_inv_nx … H ??) -H [ |*: // ] #g #Hfg #H destruct + elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, ex2_intro/ +| elim (sle_inv_px … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct + elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ +] +qed-. + +lemma sex_sdj_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 → + ∀f,L1,L2. L1 ⪤[R1, RP, f] L2 → ∀g. f ∥ g → + ∃∃L. L1 ⪤[RP, R1, g] L & L ⪤[R2, cfull, f] L2. +#R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2 +[ /2 width=3 by sex_atom, ex2_intro/ ] +#f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H +[ elim (sdj_inv_nx … H ??) -H [ |*: // ] #g #Hfg #H destruct + elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ +| elim (sdj_inv_px … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct + elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ +] +qed-. + +lemma sex_dec: ∀RN,RP. + (∀L,I1,I2. Decidable (RN L I1 I2)) → + (∀L,I1,I2. Decidable (RP L I1 I2)) → + ∀L1,L2,f. Decidable (L1 ⪤[RN, RP, f] L2). +#RN #RP #HRN #HRP #L1 elim L1 -L1 [ * | #L1 #I1 #IH * ] +[ /2 width=1 by sex_atom, or_introl/ +| #L2 #I2 #f @or_intror #H + lapply (sex_inv_atom1 … H) -H #H destruct +| #f @or_intror #H + lapply (sex_inv_atom2 … H) -H #H destruct +| #L2 #I2 #f elim (IH L2 (⫱f)) -IH #HL12 + [2: /4 width=3 by sex_fwd_bind, or_intror/ ] + elim (pn_split f) * #g #H destruct + [ elim (HRP L1 I1 I2) | elim (HRN L1 I1 I2) ] -HRP -HRN #HV12 + [1,3: /3 width=1 by sex_push, sex_next, or_introl/ ] + @or_intror #H + [ elim (sex_inv_push … H) | elim (sex_inv_next … H) ] -H + /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/sex_length.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/sex_length.ma new file mode 100644 index 000000000..a7b2a5d71 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/sex_length.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lenv_length.ma". +include "static_2/relocation/sex.ma". + +(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) + +(* Forward lemmas with length for local environments ************************) + +(* Note: "#f #I1 #I2 #L1 #L2 >length_bind >length_bind //" was needed to conclude *) +lemma sex_fwd_length: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → |L1| = |L2|. +#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 // +qed-. + +(* Properties with length for local environments ****************************) + +lemma sex_length_cfull: ∀L1,L2. |L1| = |L2| → ∀f. L1 ⪤[cfull, cfull, f] L2. +#L1 elim L1 -L1 +[ #Y2 #H >(length_inv_zero_sn … H) -Y2 // +| #L1 #I1 #IH #Y2 #H #f + elim (length_inv_succ_sn … H) -H #I2 #L2 #HL12 #H destruct + elim (pn_split f) * #g #H destruct /3 width=1 by sex_next, sex_push/ +] +qed. + +lemma sex_length_isid: ∀R,L1,L2. |L1| = |L2| → + ∀f. 𝐈⦃f⦄ → L1 ⪤[R, cfull, f] L2. +#R #L1 elim L1 -L1 +[ #Y2 #H >(length_inv_zero_sn … H) -Y2 // +| #L1 #I1 #IH #Y2 #H #f #Hf + elim (length_inv_succ_sn … H) -H #I2 #L2 #HL12 #H destruct + elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct /3 width=1 by sex_push/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/sex_sex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/sex_sex.ma new file mode 100644 index 000000000..571379e2f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/sex_sex.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/rtmap_sand.ma". +include "static_2/relocation/drops.ma". + +(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) + +(* Main properties **********************************************************) + +theorem sex_trans_gen (RN1) (RP1) (RN2) (RP2) (RN) (RP): + ∀L1,f. + (∀g,I,K,n. ⬇*[n] L1 ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → sex_transitive RN1 RN2 RN RN1 RP1 g K I) → + (∀g,I,K,n. ⬇*[n] L1 ≘ K.ⓘ{I} → ⫯g = ⫱*[n] f → sex_transitive RP1 RP2 RP RN1 RP1 g K I) → + ∀L0. L1 ⪤[RN1, RP1, f] L0 → + ∀L2. L0 ⪤[RN2, RP2, f] L2 → + L1 ⪤[RN, RP, f] L2. +#RN1 #RP1 #RN2 #RP2 #RN #RP #L1 elim L1 -L1 +[ #f #_ #_ #L0 #H1 #L2 #H2 + lapply (sex_inv_atom1 … H1) -H1 #H destruct + lapply (sex_inv_atom1 … H2) -H2 #H destruct + /2 width=1 by sex_atom/ +| #K1 #I1 #IH #f elim (pn_split f) * #g #H destruct + #HN #HP #L0 #H1 #L2 #H2 + [ elim (sex_inv_push1 … H1) -H1 #I0 #K0 #HK10 #HI10 #H destruct + elim (sex_inv_push1 … H2) -H2 #I2 #K2 #HK02 #HI02 #H destruct + lapply (HP … 0 … HI10 … HK10 … HI02) -HI10 -HI02 /2 width=2 by drops_refl/ #HI12 + lapply (IH … HK10 … HK02) -IH -K0 /3 width=3 by sex_push, drops_drop/ + | elim (sex_inv_next1 … H1) -H1 #I0 #K0 #HK10 #HI10 #H destruct + elim (sex_inv_next1 … H2) -H2 #I2 #K2 #HK02 #HI02 #H destruct + lapply (HN … 0 … HI10 … HK10 … HI02) -HI10 -HI02 /2 width=2 by drops_refl/ #HI12 + lapply (IH … HK10 … HK02) -IH -K0 /3 width=3 by sex_next, drops_drop/ + ] +] +qed-. + +theorem sex_trans (RN) (RP) (f): (∀g,I,K. sex_transitive RN RN RN RN RP g K I) → + (∀g,I,K. sex_transitive RP RP RP RN RP g K I) → + Transitive … (sex RN RP f). +/2 width=9 by sex_trans_gen/ qed-. + +theorem sex_trans_id_cfull: ∀R1,R2,R3,L1,L,f. L1 ⪤[R1, cfull, f] L → 𝐈⦃f⦄ → + ∀L2. L ⪤[R2, cfull, f] L2 → L1 ⪤[R3, cfull, f] L2. +#R1 #R2 #R3 #L1 #L #f #H elim H -L1 -L -f +[ #f #Hf #L2 #H >(sex_inv_atom1 … H) -L2 // ] +#f #I1 #I #K1 #K #HK1 #_ #IH #Hf #L2 #H +[ elim (isid_inv_next … Hf) | lapply (isid_inv_push … Hf ??) ] -Hf [5: |*: // ] #Hf +elim (sex_inv_push1 … H) -H #I2 #K2 #HK2 #_ #H destruct +/3 width=1 by sex_push/ +qed-. + +theorem sex_conf (RN1) (RP1) (RN2) (RP2): + ∀L,f. + (∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → R_pw_confluent2_sex RN1 RN2 RN1 RP1 RN2 RP2 g K I) → + (∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ⫯g = ⫱*[n] f → R_pw_confluent2_sex RP1 RP2 RN1 RP1 RN2 RP2 g K I) → + pw_confluent2 … (sex RN1 RP1 f) (sex RN2 RP2 f) L. +#RN1 #RP1 #RN2 #RP2 #L elim L -L +[ #f #_ #_ #L1 #H1 #L2 #H2 >(sex_inv_atom1 … H1) >(sex_inv_atom1 … H2) -H2 -H1 + /2 width=3 by sex_atom, ex2_intro/ +| #L #I0 #IH #f elim (pn_split f) * #g #H destruct + #HN #HP #Y1 #H1 #Y2 #H2 + [ elim (sex_inv_push1 … H1) -H1 #I1 #L1 #HL1 #HI01 #H destruct + elim (sex_inv_push1 … H2) -H2 #I2 #L2 #HL2 #HI02 #H destruct + elim (HP … 0 … HI01 … HI02 … HL1 … HL2) -HI01 -HI02 /2 width=2 by drops_refl/ #I #HI1 #HI2 + elim (IH … HL1 … HL2) -IH -HL1 -HL2 /3 width=5 by drops_drop, sex_push, ex2_intro/ + | elim (sex_inv_next1 … H1) -H1 #I1 #L1 #HL1 #HI01 #H destruct + elim (sex_inv_next1 … H2) -H2 #I2 #L2 #HL2 #HI02 #H destruct + elim (HN … 0 … HI01 … HI02 … HL1 … HL2) -HI01 -HI02 /2 width=2 by drops_refl/ #I #HI1 #HI2 + elim (IH … HL1 … HL2) -IH -HL1 -HL2 /3 width=5 by drops_drop, sex_next, ex2_intro/ + ] +] +qed-. + +theorem sex_canc_sn: ∀RN,RP,f. Transitive … (sex RN RP f) → + symmetric … (sex RN RP f) → + left_cancellable … (sex RN RP f). +/3 width=3 by/ qed-. + +theorem sex_canc_dx: ∀RN,RP,f. Transitive … (sex RN RP f) → + symmetric … (sex RN RP f) → + right_cancellable … (sex RN RP f). +/3 width=3 by/ qed-. + +lemma sex_meet: ∀RN,RP,L1,L2. + ∀f1. L1 ⪤[RN, RP, f1] L2 → + ∀f2. L1 ⪤[RN, RP, f2] L2 → + ∀f. f1 ⋒ f2 ≘ f → L1 ⪤[RN, RP, f] L2. +#RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // +#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H #f #Hf +elim (pn_split f2) * #g2 #H2 destruct +try elim (sex_inv_push … H) try elim (sex_inv_next … H) -H +[ elim (sand_inv_npx … Hf) | elim (sand_inv_nnx … Hf) +| elim (sand_inv_ppx … Hf) | elim (sand_inv_pnx … Hf) +] -Hf /3 width=5 by sex_next, sex_push/ +qed-. + +lemma sex_join: ∀RN,RP,L1,L2. + ∀f1. L1 ⪤[RN, RP, f1] L2 → + ∀f2. L1 ⪤[RN, RP, f2] L2 → + ∀f. f1 ⋓ f2 ≘ f → L1 ⪤[RN, RP, f] L2. +#RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // +#f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H #f #Hf +elim (pn_split f2) * #g2 #H2 destruct +try elim (sex_inv_push … H) try elim (sex_inv_next … H) -H +[ elim (sor_inv_npx … Hf) | elim (sor_inv_nnx … Hf) +| elim (sor_inv_ppx … Hf) | elim (sor_inv_pnx … Hf) +] -Hf /3 width=5 by sex_next, sex_push/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/sex_tc.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/sex_tc.ma new file mode 100644 index 000000000..339ac98a7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/sex_tc.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/star.ma". +include "static_2/relocation/sex.ma". + +(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) + +definition s_rs_transitive_isid: relation (relation3 lenv bind bind) ≝ λRN,RP. + ∀f. 𝐈⦃f⦄ → s_rs_transitive … RP (λ_.sex RN RP f). + +(* Properties with transitive closure ***************************************) + +lemma sex_tc_refl: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f. reflexive … (TC … (sex RN RP f)). +/3 width=1 by sex_refl, TC_reflexive/ qed. + +lemma sex_tc_next_sn: ∀RN,RP. c_reflexive … RN → + ∀f,I2,L1,L2. TC … (sex RN RP f) L1 L2 → ∀I1. RN L1 I1 I2 → + TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). +#RN #RP #HRN #f #I2 #L1 #L2 #H @(TC_ind_dx ??????? H) -L1 +/3 width=3 by sex_next, TC_strap, inj/ +qed. + +lemma sex_tc_next_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. L1 ⪤[RN, RP, f] L2 → + TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). +#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 +/4 width=5 by sex_refl, sex_next, step, inj/ +qed. + +lemma sex_tc_push_sn: ∀RN,RP. c_reflexive … RP → + ∀f,I2,L1,L2. TC … (sex RN RP f) L1 L2 → ∀I1. RP L1 I1 I2 → + TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). +#RN #RP #HRP #f #I2 #L1 #L2 #H @(TC_ind_dx ??????? H) -L1 +/3 width=3 by sex_push, TC_strap, inj/ +qed. + +lemma sex_tc_push_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. L1 ⪤[RN, RP, f] L2 → + TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). +#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 +/4 width=5 by sex_refl, sex_push, step, inj/ +qed. + +lemma sex_tc_inj_sn: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → L1 ⪤[CTC … RN, RP, f] L2. +#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 +/3 width=1 by sex_push, sex_next, inj/ +qed. + +lemma sex_tc_inj_dx: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → L1 ⪤[RN, CTC … RP, f] L2. +#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 +/3 width=1 by sex_push, sex_next, inj/ +qed. + +(* Main properties with transitive closure **********************************) + +theorem sex_tc_next: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. TC … (sex RN RP f) L1 L2 → + TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). +#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 +/4 width=5 by sex_tc_next_sn, sex_tc_refl, trans_TC/ +qed. + +theorem sex_tc_push: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. TC … (sex RN RP f) L1 L2 → + TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}). +#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2 +/4 width=5 by sex_tc_push_sn, sex_tc_refl, trans_TC/ +qed. + +(* Basic_2A1: uses: TC_lpx_sn_ind *) +theorem sex_tc_step_dx: ∀RN,RP. s_rs_transitive_isid RN RP → + ∀f,L1,L. L1 ⪤[RN, RP, f] L → 𝐈⦃f⦄ → + ∀L2. L ⪤[RN, CTC … RP, f] L2 → L1⪤ [RN, CTC … RP, f] L2. +#RN #RP #HRP #f #L1 #L #H elim H -f -L1 -L +[ #f #_ #Y #H -HRP >(sex_inv_atom1 … H) -Y // ] +#f #I1 #I #L1 #L #HL1 #HI1 #IH #Hf #Y #H +[ elim (isid_inv_next … Hf) -Hf // +| lapply (isid_inv_push … Hf ??) -Hf [3: |*: // ] #Hf + elim (sex_inv_push1 … H) -H #I2 #L2 #HL2 #HI2 #H destruct + @sex_push [ /2 width=1 by/ ] -L2 -IH + @(TC_strap … HI1) -HI1 + @(HRP … HL1) // (**) (* auto fails *) +] +qed-. + +(* Advanced properties ******************************************************) + +lemma sex_tc_dx: ∀RN,RP. s_rs_transitive_isid RN RP → + ∀f. 𝐈⦃f⦄ → ∀L1,L2. TC … (sex RN RP f) L1 L2 → L1 ⪤[RN, CTC … RP, f] L2. +#RN #RP #HRP #f #Hf #L1 #L2 #H @(TC_ind_dx ??????? H) -L1 +/3 width=3 by sex_tc_step_dx, sex_tc_inj_dx/ +qed. + +(* Advanced inversion lemmas ************************************************) + +lemma sex_inv_tc_sn: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f,L1,L2. L1 ⪤[CTC … RN, RP, f] L2 → TC … (sex RN RP f) L1 L2. +#RN #RP #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2 +/2 width=1 by sex_tc_next, sex_tc_push_sn, sex_atom, inj/ +qed-. + +lemma sex_inv_tc_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP → + ∀f,L1,L2. L1 ⪤[RN, CTC … RP, f] L2 → TC … (sex RN RP f) L1 L2. +#RN #RP #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2 +/2 width=1 by sex_tc_push, sex_tc_next_sn, sex_atom, inj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup.ma new file mode 100644 index 000000000..51c5afc6a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup.ma @@ -0,0 +1,86 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/star.ma". +include "static_2/notation/relations/suptermplus_6.ma". +include "static_2/notation/relations/suptermplus_7.ma". +include "static_2/s_transition/fqu.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +definition fqup: bool → tri_relation genv lenv term ≝ + λb. tri_TC … (fqu b). + +interpretation "extended plus-iterated structural successor (closure)" + 'SupTermPlus b G1 L1 T1 G2 L2 T2 = (fqup b G1 L1 T1 G2 L2 T2). + +interpretation "plus-iterated structural successor (closure)" + 'SupTermPlus G1 L1 T1 G2 L2 T2 = (fqup true G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fqu_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fqup_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed. + +lemma fqup_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed. + +lemma fqup_pair_sn: ∀b,I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+[b] ⦃G, L, V⦄. +/2 width=1 by fqu_pair_sn, fqu_fqup/ qed. + +lemma fqup_bind_dx: ∀b,p,I,G,L,V,T. ⦃G, L, ⓑ{p,I}V.T⦄ ⊐+[b] ⦃G, L.ⓑ{I}V, T⦄. +/2 width=1 by fqu_bind_dx, fqu_fqup/ qed. + +lemma fqup_clear: ∀p,I,G,L,V,T. ⦃G, L, ⓑ{p,I}V.T⦄ ⊐+[Ⓕ] ⦃G, L.ⓧ, T⦄. +/3 width=1 by fqu_clear, fqu_fqup/ qed. + +lemma fqup_flat_dx: ∀b,I,G,L,V,T. ⦃G, L, ⓕ{I}V.T⦄ ⊐+[b] ⦃G, L, T⦄. +/2 width=1 by fqu_flat_dx, fqu_fqup/ qed. + +lemma fqup_flat_dx_pair_sn: ∀b,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.②{I2}V2.T⦄ ⊐+[b] ⦃G, L, V2⦄. +/2 width=5 by fqu_pair_sn, fqup_strap1/ qed. + +lemma fqup_bind_dx_flat_dx: ∀b,p,G,I1,I2,L,V1,V2,T. ⦃G, L, ⓑ{p,I1}V1.ⓕ{I2}V2.T⦄ ⊐+[b] ⦃G, L.ⓑ{I1}V1, T⦄. +/2 width=5 by fqu_flat_dx, fqup_strap1/ qed. + +lemma fqup_flat_dx_bind_dx: ∀b,p,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.ⓑ{p,I2}V2.T⦄ ⊐+[b] ⦃G, L.ⓑ{I2}V2, T⦄. +/2 width=5 by fqu_bind_dx, fqup_strap1/ qed. + +(* Basic eliminators ********************************************************) + +lemma fqup_ind: ∀b,G1,L1,T1. ∀Q:relation3 …. + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2. +#b #G1 #L1 #T1 #Q #IH1 #IH2 #G2 #L2 #T2 #H +@(tri_TC_ind … IH1 IH2 G2 L2 T2 H) +qed-. + +lemma fqup_ind_dx: ∀b,G2,L2,T2. ∀Q:relation3 …. + (∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1) → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1. +#b #G2 #L2 #T2 #Q #IH1 #IH2 #G1 #L1 #T1 #H +@(tri_TC_ind_dx … IH1 IH2 G1 L1 T1 H) +qed-. + +(* Basic_2A1: removed theorems 1: fqup_drop *) diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_drops.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_drops.ma new file mode 100644 index 000000000..4eafa94d2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_drops.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops.ma". +include "static_2/s_computation/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Properties with generic slicing for local environments *******************) + +lemma fqup_drops_succ: ∀b,G,K,T,i,L,U. ⬇*[↑i] L ≘ K → ⬆*[↑i] T ≘ U → + ⦃G, L, U⦄ ⊐+[b] ⦃G, K, T⦄. +#b #G #K #T #i elim i -i +[ #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK + #I #Y #HY #H destruct <(drops_fwd_isid … HY) -K // + /3 width=2 by fqu_fqup, fqu_drop/ +| #l #IH #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK + #I #Y #HY #H destruct + elim (lifts_split_trans … HTU … (𝐔❴↑l❵) (𝐔❴1❵)) -HTU + /4 width=5 by fqup_strap2, fqu_drop/ +] +qed. + +lemma fqup_drops_strap1: ∀b,G1,G2,L1,K1,K2,T1,T2,U1,i. ⬇*[i] L1 ≘ K1 → ⬆*[i] T1 ≘ U1 → + ⦃G1, K1, T1⦄ ⊐[b] ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, K2, T2⦄. +#b #G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 * +[ #HLK1 #HTU1 #HT12 + >(drops_fwd_isid … HLK1) -L1 // + <(lifts_fwd_isid … HTU1) -U1 /2 width=1 by fqu_fqup/ +| /3 width=5 by fqup_strap1, fqup_drops_succ/ +] +qed-. + +lemma fqup_lref: ∀b,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+[b] ⦃G, K, V⦄. +/2 width=6 by fqup_drops_strap1/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_fqup.ma new file mode 100644 index 000000000..ab0b4fbf8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_fqup.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_computation/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Main properties **********************************************************) + +theorem fqup_trans: ∀b. tri_transitive … (fqup b). +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_weight.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_weight.ma new file mode 100644 index 000000000..25a81dfa8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_weight.ma @@ -0,0 +1,44 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_transition/fqu_weight.ma". +include "static_2/s_computation/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Forward lemmas with weight for closures **********************************) + +lemma fqup_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → + ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=3 by fqu_fwd_fw, transitive_lt/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqup_wf_ind: ∀b. ∀Q:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → + Q G1 L1 T1 + ) → ∀G1,L1,T1. Q G1 L1 T1. +#b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct +/4 width=2 by fqup_fwd_fw/ +qed-. + +lemma fqup_wf_ind_eq: ∀b. ∀Q:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → + ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → Q G2 L2 T2 + ) → ∀G1,L1,T1. Q G1 L1 T1. +#b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct +/4 width=7 by fqup_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus.ma new file mode 100644 index 000000000..fb6a7ea7d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus.ma @@ -0,0 +1,166 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/star.ma". +include "static_2/notation/relations/suptermstar_6.ma". +include "static_2/notation/relations/suptermstar_7.ma". +include "static_2/s_transition/fquq.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +definition fqus: bool → tri_relation genv lenv term ≝ + λb. tri_TC … (fquq b). + +interpretation "extended star-iterated structural successor (closure)" + 'SupTermStar b G1 L1 T1 G2 L2 T2 = (fqus b G1 L1 T1 G2 L2 T2). + +interpretation "star-iterated structural successor (closure)" + 'SupTermStar G1 L1 T1 G2 L2 T2 = (fqus true G1 L1 T1 G2 L2 T2). + +(* Basic eliminators ********************************************************) + +lemma fqus_ind: ∀b,G1,L1,T1. ∀Q:relation3 …. Q G1 L1 T1 → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2. +#b #G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H +@(tri_TC_star_ind … IH1 IH2 G2 L2 T2 H) // +qed-. + +lemma fqus_ind_dx: ∀b,G2,L2,T2. ∀Q:relation3 …. Q G2 L2 T2 → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1. +#b #G2 #L2 #T2 #Q #IH1 #IH2 #G1 #L1 #T1 #H +@(tri_TC_star_ind_dx … IH1 IH2 G1 L1 T1 H) // +qed-. + +(* Basic properties *********************************************************) + +lemma fqus_refl: ∀b. tri_reflexive … (fqus b). +/2 width=1 by tri_inj/ qed. + +lemma fquq_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fqus_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed-. + +lemma fqus_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fqus_inv_fqu_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1 = L2 & T1 = T2) ∨ + ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H12 @(fqus_ind_dx … H12) -G1 -L1 -T1 /3 width=1 by and3_intro, or_introl/ +#G1 #G #L1 #L #T1 #T * /3 width=5 by ex2_3_intro, or_intror/ +* #HG #HL #HT #_ destruct // +qed-. + +lemma fqus_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1, L1, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1 = L2 & ⋆s = T2) ∨ + ∃∃J,L. ⦃G1, L, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J}. +#b #G1 #G2 #L1 #L2 #T2 #s #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ +#G #L #T #H elim (fqu_inv_sort1 … H) -H /3 width=4 by ex2_2_intro, or_intror/ +qed-. + +lemma fqus_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & #i = T2 + | ∃∃J,L,V. ⦃G1, L, V⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓑ{J}V & i = 0 + | ∃∃J,L,j. ⦃G1, L, #j⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J} & i = ↑j. +#b #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or3_intro0/ +#G #L #T #H elim (fqu_inv_lref1 … H) -H * /3 width=7 by or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro/ +qed-. + +lemma fqus_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1, L1, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1 = L2 & §l = T2) ∨ + ∃∃J,L. ⦃G1, L, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J}. +#b #G1 #G2 #L1 #L2 #T2 #l #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ +#G #L #T #H elim (fqu_inv_gref1 … H) -H /3 width=4 by ex2_2_intro, or_intror/ +qed-. + +lemma fqus_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓑ{p,I}V1.T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ{p,I}V1.T1 = T2 + | ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄ + | ⦃G1, L1.ⓑ{I}V1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ + | ⦃G1, L1.ⓧ, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ ∧ b = Ⓕ + | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}. +#b #p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or5_intro0/ +#G #L #T #H elim (fqu_inv_bind1 … H) -H * +[4: #J ] #H1 #H2 #H3 [4: #Hb ] #H destruct +/3 width=6 by or5_intro1, or5_intro2, or5_intro3, or5_intro4, ex3_3_intro, conj/ +qed-. + + +lemma fqus_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓑ{p,I}V1.T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ{p,I}V1.T1 = T2 + | ⦃G1, L1, V1⦄ ⊐* ⦃G2, L2, T2⦄ + | ⦃G1, L1.ⓑ{I}V1, T1⦄ ⊐* ⦃G2, L2, T2⦄ + | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐* ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}. +#p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_bind1 … H) -H [1,4: * ] +/3 width=1 by and3_intro, or4_intro0, or4_intro1, or4_intro2, or4_intro3, ex3_3_intro/ +#_ #H destruct +qed-. + +lemma fqus_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓕ{I}V1.T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓕ{I}V1.T1 = T2 + | ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄ + | ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ + | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓕ{I}V1.T1 & L1 = L.ⓘ{J}. +#b #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or4_intro0/ +#G #L #T #H elim (fqu_inv_flat1 … H) -H * +[3: #J ] #H1 #H2 #H3 #H destruct +/3 width=6 by or4_intro1, or4_intro2, or4_intro3, ex3_3_intro/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma fqus_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1, ⋆, ⓪{I}⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & ⋆ = L2 & ⓪{I} = T2. +#b #I #G1 #G2 #L2 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /2 width=1 by and3_intro/ +#G #L #T #H elim (fqu_inv_atom1 … H) +qed-. + +lemma fqus_inv_sort1_bind: ∀b,I,G1,G2,L1,L2,T2,s. ⦃G1, L1.ⓘ{I}, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & ⋆s = T2) ∨ ⦃G1, L1, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #I #G1 #G2 #L1 #L2 #T2 #s #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ +#G #L #T #H elim (fqu_inv_sort1_bind … H) -H +#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ +qed-. + +lemma fqus_inv_zero1_pair: ∀b,I,G1,G2,L1,L2,V1,T2. ⦃G1, L1.ⓑ{I}V1, #0⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & #0 = T2) ∨ ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #I #G1 #G2 #L1 #L2 #V1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ +#G #L #T #H elim (fqu_inv_zero1_pair … H) -H +#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ +qed-. + +lemma fqus_inv_lref1_bind: ∀b,I,G1,G2,L1,L2,T2,i. ⦃G1, L1.ⓘ{I}, #↑i⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & #(↑i) = T2) ∨ ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #I #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ +#G #L #T #H elim (fqu_inv_lref1_bind … H) -H +#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ +qed-. + +lemma fqus_inv_gref1_bind: ∀b,I,G1,G2,L1,L2,T2,l. ⦃G1, L1.ⓘ{I}, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & §l = T2) ∨ ⦃G1, L1, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #I #G1 #G2 #L1 #L2 #T2 #l #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/ +#G #L #T #H elim (fqu_inv_gref1_bind … H) -H +#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/ +qed-. + +(* Basic_2A1: removed theorems 1: fqus_drop *) diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_drops.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_drops.ma new file mode 100644 index 000000000..0d2797139 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_drops.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_computation/fqup_drops.ma". +include "static_2/s_computation/fqus_fqup.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Properties with generic slicing for local environments *******************) + +lemma fqus_drops: ∀b,G,L,K,T,U,i. ⬇*[i] L ≘ K → ⬆*[i] T ≘ U → + ⦃G, L, U⦄ ⊐*[b] ⦃G, K, T⦄. +#b #G #L #K #T #U * /3 width=3 by fqup_drops_succ, fqup_fqus/ +#HLK #HTU <(lifts_fwd_isid … HTU) -U // <(drops_fwd_isid … HLK) -K // +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqup.ma new file mode 100644 index 000000000..05a450dae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqup.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_computation/fqup.ma". +include "static_2/s_computation/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Alternative definition with plus-iterated supclosure *********************) + +lemma fqup_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/ +qed. + +(* Basic_2A1: was: fqus_inv_gen *) +lemma fqus_inv_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). +#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 // +#G #G2 #L #L2 #T #T2 #_ * +[ #H2 * /3 width=5 by fqup_strap1, or_introl/ + * /3 width=1 by fqu_fqup, or_introl/ +| * #HG #HL #HT destruct // +] +qed-. + +(* Advanced properties ******************************************************) + +lemma fqus_strap1_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H1) -H1 +[ /2 width=5 by fqup_strap1/ +| * /2 width=1 by fqu_fqup/ +] +qed-. + +lemma fqus_strap2_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H2) -H2 +[ /2 width=5 by fqup_strap2/ +| * /2 width=1 by fqu_fqup/ +] +qed-. + +lemma fqus_fqup_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fqup_ind … H2) -H2 -G2 -L2 -T2 +/2 width=5 by fqus_strap1_fqu, fqup_strap1/ +qed-. + +lemma fqup_fqus_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄. +#b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 @(fqup_ind_dx … H1) -H1 -G1 -L1 -T1 +/3 width=5 by fqus_strap2_fqu, fqup_strap2/ +qed-. + +(* Advanced inversion lemmas for plus-iterated supclosure *******************) + +lemma fqup_inv_step_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → + ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/ +#G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqus.ma new file mode 100644 index 000000000..02e42e19b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqus.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_computation/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Main properties **********************************************************) + +theorem fqus_trans: ∀b. tri_transitive … (fqus b). +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_weight.ma b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_weight.ma new file mode 100644 index 000000000..f94366706 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_weight.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_transition/fquq_weight.ma". +include "static_2/s_computation/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Forward lemmas with weight for closures **********************************) + +lemma fqus_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2 +/3 width=3 by fquq_fwd_fw, transitive_le/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma fqus_inv_refl_atom3: ∀b,I,G,L,X. ⦃G, L, ⓪{I}⦄ ⊐*[b] ⦃G, L, X⦄ → ⓪{I} = X. +#b #I #G #L #X #H elim (fqus_inv_fqu_sn … H) -H * // +#G0 #L0 #T0 #H1 #H2 lapply (fqu_fwd_fw … H1) lapply (fqus_fwd_fw … H2) -H2 -H1 +#H2 #H1 lapply (le_to_lt_to_lt … H2 H1) -G0 -L0 -T0 +#H elim (lt_le_false … H) -H /2 width=1 by monotonic_le_plus_r/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu.ma new file mode 100644 index 000000000..b834566d3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu.ma @@ -0,0 +1,201 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/supterm_6.ma". +include "static_2/notation/relations/supterm_7.ma". +include "static_2/syntax/lenv.ma". +include "static_2/syntax/genv.ma". +include "static_2/relocation/lifts.ma". + +(* SUPCLOSURE ***************************************************************) + +(* activate genv *) +(* Note: frees_total requires fqu_drop for all atoms + fqu_cpx_trans requires fqu_drop for all terms + frees_fqus_drops requires fqu_drop restricted on atoms +*) +inductive fqu (b:bool): tri_relation genv lenv term ≝ +| fqu_lref_O : ∀I,G,L,V. fqu b G (L.ⓑ{I}V) (#0) G L V +| fqu_pair_sn: ∀I,G,L,V,T. fqu b G L (②{I}V.T) G L V +| fqu_bind_dx: ∀p,I,G,L,V,T. fqu b G L (ⓑ{p,I}V.T) G (L.ⓑ{I}V) T +| fqu_clear : ∀p,I,G,L,V,T. b = Ⓕ → fqu b G L (ⓑ{p,I}V.T) G (L.ⓧ) T +| fqu_flat_dx: ∀I,G,L,V,T. fqu b G L (ⓕ{I}V.T) G L T +| fqu_drop : ∀I,G,L,T,U. ⬆*[1] T ≘ U → fqu b G (L.ⓘ{I}) U G L T +. + +interpretation + "extended structural successor (closure)" + 'SupTerm b G1 L1 T1 G2 L2 T2 = (fqu b G1 L1 T1 G2 L2 T2). + +interpretation + "structural successor (closure)" + 'SupTerm G1 L1 T1 G2 L2 T2 = (fqu true G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fqu_sort: ∀b,I,G,L,s. ⦃G, L.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G, L, ⋆s⦄. +/2 width=1 by fqu_drop/ qed. + +lemma fqu_lref_S: ∀b,I,G,L,i. ⦃G, L.ⓘ{I}, #↑i⦄ ⊐[b] ⦃G, L, #i⦄. +/2 width=1 by fqu_drop/ qed. + +lemma fqu_gref: ∀b,I,G,L,l. ⦃G, L.ⓘ{I}, §l⦄ ⊐[b] ⦃G, L, §l⦄. +/2 width=1 by fqu_drop/ qed. + +(* Basic inversion lemmas ***************************************************) + +fact fqu_inv_sort1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀s. T1 = ⋆s → + ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = ⋆s. +#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #s #H destruct +| #I #G #L #V #T #s #H destruct +| #p #I #G #L #V #T #s #H destruct +| #p #I #G #L #V #T #_ #s #H destruct +| #I #G #L #V #T #s #H destruct +| #I #G #L #T #U #HI12 #s #H destruct + lapply (lifts_inv_sort2 … HI12) -HI12 /2 width=2 by ex3_intro/ +] +qed-. + +lemma fqu_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1, L1, ⋆s⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = ⋆s. +/2 width=4 by fqu_inv_sort1_aux/ qed-. + +fact fqu_inv_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀i. T1 = #i → + (∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨ + ∃∃J,j. G1 = G2 & L1 = L2.ⓘ{J} & T2 = #j & i = ↑j. +#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #i #H destruct /3 width=4 by ex4_2_intro, or_introl/ +| #I #G #L #V #T #i #H destruct +| #p #I #G #L #V #T #i #H destruct +| #p #I #G #L #V #T #_ #i #H destruct +| #I #G #L #V #T #i #H destruct +| #I #G #L #T #U #HI12 #i #H destruct + elim (lifts_inv_lref2_uni … HI12) -HI12 /3 width=3 by ex4_2_intro, or_intror/ +] +qed-. + +lemma fqu_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ → + (∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨ + ∃∃J,j. G1 = G2 & L1 = L2.ⓘ{J} & T2 = #j & i = ↑j. +/2 width=4 by fqu_inv_lref1_aux/ qed-. + +fact fqu_inv_gref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀l. T1 = §l → + ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = §l. +#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #l #H destruct +| #I #G #L #V #T #l #H destruct +| #p #I #G #L #V #T #l #H destruct +| #p #I #G #L #V #T #_ #l #H destruct +| #I #G #L #V #T #s #H destruct +| #I #G #L #T #U #HI12 #l #H destruct + lapply (lifts_inv_gref2 … HI12) -HI12 /2 width=3 by ex3_intro/ +] +qed-. + +lemma fqu_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1, L1, §l⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = §l. +/2 width=4 by fqu_inv_gref1_aux/ qed-. + +fact fqu_inv_bind1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀p,I,V1,U1. T1 = ⓑ{p,I}V1.U1 → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 + | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 + | ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ + | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1. +#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #q #J #V0 #U0 #H destruct +| #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro0/ +| #p #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro1/ +| #p #I #G #L #V #T #Hb #q #J #V0 #U0 #H destruct /3 width=1 by and4_intro, or4_intro2/ +| #I #G #L #V #T #q #J #V0 #U0 #H destruct +| #I #G #L #T #U #HTU #q #J #V0 #U0 #H destruct /3 width=2 by or4_intro3, ex3_intro/ +] +qed-. + +lemma fqu_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓑ{p,I}V1.U1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 + | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 + | ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ + | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1. +/2 width=4 by fqu_inv_bind1_aux/ qed-. + +lemma fqu_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓑ{p,I}V1.U1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 + | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 + | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1. +#p #I #G1 #G2 #L1 #L2 #V1 #U1 #T2 #H elim (fqu_inv_bind1 … H) -H +/3 width=1 by or3_intro0, or3_intro1, or3_intro2/ +* #_ #_ #_ #H destruct +qed-. + +fact fqu_inv_flat1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀I,V1,U1. T1 = ⓕ{I}V1.U1 → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 + | ∧∧ G1 = G2 & L1 = L2 & U1 = T2 + | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓕ{I}V1.U1. +#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #J #V0 #U0 #H destruct +| #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro0/ +| #p #I #G #L #V #T #J #V0 #U0 #H destruct +| #p #I #G #L #V #T #_ #J #V0 #U0 #H destruct +| #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro1/ +| #I #G #L #T #U #HTU #J #V0 #U0 #H destruct /3 width=2 by or3_intro2, ex3_intro/ +] +qed-. + +lemma fqu_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓕ{I}V1.U1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2 + | ∧∧ G1 = G2 & L1 = L2 & U1 = T2 + | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓕ{I}V1.U1. +/2 width=4 by fqu_inv_flat1_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma fqu_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1, ⋆, ⓪{I}⦄ ⊐[b] ⦃G2, L2, T2⦄ → ⊥. +#b * #x #G1 #G2 #L2 #T2 #H +[ elim (fqu_inv_sort1 … H) | elim (fqu_inv_lref1 … H) * | elim (fqu_inv_gref1 … H) ] -H +#I [2: #V |3: #i ] #_ #H destruct +qed-. + +lemma fqu_inv_sort1_bind: ∀b,I,G1,G2,K,L2,T2,s. ⦃G1, K.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L2 = K & T2 = ⋆s. +#b #I #G1 #G2 #K #L2 #T2 #s #H elim (fqu_inv_sort1 … H) -H +#Z #X #H1 #H2 destruct /2 width=1 by and3_intro/ +qed-. + +lemma fqu_inv_zero1_pair: ∀b,I,G1,G2,K,L2,V,T2. ⦃G1, K.ⓑ{I}V, #0⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L2 = K & T2 = V. +#b #I #G1 #G2 #K #L2 #V #T2 #H elim (fqu_inv_lref1 … H) -H * +#Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/ +qed-. + +lemma fqu_inv_lref1_bind: ∀b,I,G1,G2,K,L2,T2,i. ⦃G1, K.ⓘ{I}, #(↑i)⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L2 = K & T2 = #i. +#b #I #G1 #G2 #K #L2 #T2 #i #H elim (fqu_inv_lref1 … H) -H * +#Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/ +qed-. + +lemma fqu_inv_gref1_bind: ∀b,I,G1,G2,K,L2,T2,l. ⦃G1, K.ⓘ{I}, §l⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L2 = K & T2 = §l. +#b #I #G1 #G2 #K #L2 #T2 #l #H elim (fqu_inv_gref1 … H) -H +#Z #H1 #H2 #H3 destruct /2 width=1 by and3_intro/ +qed-. + +(* Basic_2A1: removed theorems 3: + fqu_drop fqu_drop_lt fqu_lref_S_lt +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_length.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_length.ma new file mode 100644 index 000000000..2cfea06b8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_length.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lenv_length.ma". +include "static_2/s_transition/fqu.ma". + +(* SUPCLOSURE ***************************************************************) + +(* Forward lemmas with length for local environments ************************) + +fact fqu_fwd_length_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ∀i. T1 = #i → |L2| < |L1|. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // [2,3: #p] +#I #G #L #V #T [2: #_ ] #j #H destruct +qed-. + +lemma fqu_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ → + |L2| < |L1|. +/2 width=8 by fqu_fwd_length_lref1_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_tdeq.ma new file mode 100644 index 000000000..7deebbc61 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_tdeq.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/tdeq.ma". +include "static_2/s_transition/fqu_length.ma". + +(* SUPCLOSURE ***************************************************************) + +(* Inversion lemmas with context-free degree-based equivalence for terms ****) + +fact fqu_inv_tdeq_aux: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + G1 = G2 → |L1| = |L2| → T1 ≛[h, o] T2 → ⊥. +#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +[1: #I #G #L #V #_ #H elim (succ_inv_refl_sn … H) +|6: #I #G #L #T #U #_ #_ #H elim (succ_inv_refl_sn … H) +] +/2 width=6 by tdeq_inv_pair_xy_y, tdeq_inv_pair_xy_x/ +qed-. + +(* Basic_2A1: uses: fqu_inv_eq *) +lemma fqu_inv_tdeq: ∀h,o,b,G,L1,L2,T1,T2. ⦃G, L1, T1⦄ ⊐[b] ⦃G, L2, T2⦄ → + |L1| = |L2| → T1 ≛[h, o] T2 → ⊥. +#h #o #b #G #L1 #L2 #T1 #T2 #H +@(fqu_inv_tdeq_aux … H) // (**) (* full auto fails *) +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_weight.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_weight.ma new file mode 100644 index 000000000..365f5c2db --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_weight.ma @@ -0,0 +1,37 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/cl_weight.ma". +include "static_2/relocation/lifts_weight.ma". +include "static_2/s_transition/fqu.ma". + +(* SUPCLOSURE ***************************************************************) + +(* Forward lemmas with weight for closures **********************************) + +lemma fqu_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → + ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // +#I #I1 #I2 #G #L #HI12 normalize in ⊢ (?%%); -I1 +<(lifts_fwd_tw … HI12) /3 width=1 by monotonic_lt_plus_r, monotonic_lt_plus_l/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqu_wf_ind: ∀b. ∀Q:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) → + Q G1 L1 T1 + ) → ∀G1,L1,T1. Q G1 L1 T1. +#b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=2 by fqu_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq.ma new file mode 100644 index 000000000..fc36281aa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/suptermopt_6.ma". +include "static_2/notation/relations/suptermopt_7.ma". +include "static_2/s_transition/fqu.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* Basic_2A1: was: fquqa *) +(* Basic_2A1: includes: fquq_inv_gen *) +definition fquq: bool → tri_relation genv lenv term ≝ + λb. tri_RC … (fqu b). + +interpretation + "extended optional structural successor (closure)" + 'SupTermOpt b G1 L1 T1 G2 L2 T2 = (fquq b G1 L1 T1 G2 L2 T2). + +interpretation + "optional structural successor (closure)" + 'SupTermOpt G1 L1 T1 G2 L2 T2 = (fquq true G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +(* Basic_2A1: includes: fquqa_refl *) +lemma fquq_refl: ∀b. tri_reflexive … (fquq b). +// qed. + +lemma fqu_fquq: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄. +/2 width=1 by or_introl/ qed. + +(* Basic_2A1: removed theorems 8: + fquq_lref_O fquq_pair_sn fquq_bind_dx fquq_flat_dx fquq_drop + fquqa_drop fquq_fquqa fquqa_inv_fquq +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_length.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_length.ma new file mode 100644 index 000000000..08a70b7c3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_length.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_transition/fqu_length.ma". +include "static_2/s_transition/fquq.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* Forward lemmas with length for local environments ************************) + +lemma fquq_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → + |L2| ≤ |L1|. +#b #G1 #G2 #L1 #L2 #T2 #i #H elim H -H [2: * ] +/3 width=6 by fqu_fwd_length_lref1, lt_to_le/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_weight.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_weight.ma new file mode 100644 index 000000000..8a8ef78a7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_weight.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_transition/fqu_weight.ma". +include "static_2/s_transition/fquq.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* Forward lemmas with weight for closures **********************************) + +lemma fquq_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → + ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H [2: * ] +/3 width=2 by fqu_fwd_fw, lt_to_le/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa.ma new file mode 100644 index 000000000..b7e9ca046 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa.ma @@ -0,0 +1,168 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/atomicarity_4.ma". +include "static_2/syntax/aarity.ma". +include "static_2/syntax/lenv.ma". +include "static_2/syntax/genv.ma". + +(* ATONIC ARITY ASSIGNMENT FOR TERMS ****************************************) + +(* activate genv *) +inductive aaa: relation4 genv lenv term aarity ≝ +| aaa_sort: ∀G,L,s. aaa G L (⋆s) (⓪) +| aaa_zero: ∀I,G,L,V,B. aaa G L V B → aaa G (L.ⓑ{I}V) (#0) B +| aaa_lref: ∀I,G,L,A,i. aaa G L (#i) A → aaa G (L.ⓘ{I}) (#↑i) A +| aaa_abbr: ∀p,G,L,V,T,B,A. + aaa G L V B → aaa G (L.ⓓV) T A → aaa G L (ⓓ{p}V.T) A +| aaa_abst: ∀p,G,L,V,T,B,A. + aaa G L V B → aaa G (L.ⓛV) T A → aaa G L (ⓛ{p}V.T) (②B.A) +| aaa_appl: ∀G,L,V,T,B,A. aaa G L V B → aaa G L T (②B.A) → aaa G L (ⓐV.T) A +| aaa_cast: ∀G,L,V,T,A. aaa G L V A → aaa G L T A → aaa G L (ⓝV.T) A +. + +interpretation "atomic arity assignment (term)" + 'AtomicArity G L T A = (aaa G L T A). + +(* Basic inversion lemmas ***************************************************) + +fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀s. T = ⋆s → A = ⓪. +#G #L #T #A * -G -L -T -A // +[ #I #G #L #V #B #_ #s #H destruct +| #I #G #L #A #i #_ #s #H destruct +| #p #G #L #V #T #B #A #_ #_ #s #H destruct +| #p #G #L #V #T #B #A #_ #_ #s #H destruct +| #G #L #V #T #B #A #_ #_ #s #H destruct +| #G #L #V #T #A #_ #_ #s #H destruct +] +qed-. + +lemma aaa_inv_sort: ∀G,L,A,s. ⦃G, L⦄ ⊢ ⋆s ⁝ A → A = ⓪. +/2 width=6 by aaa_inv_sort_aux/ qed-. + +fact aaa_inv_zero_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → T = #0 → + ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A. +#G #L #T #A * -G -L -T -A /2 width=5 by ex2_3_intro/ +[ #G #L #s #H destruct +| #I #G #L #A #i #_ #H destruct +| #p #G #L #V #T #B #A #_ #_ #H destruct +| #p #G #L #V #T #B #A #_ #_ #H destruct +| #G #L #V #T #B #A #_ #_ #H destruct +| #G #L #V #T #A #_ #_ #H destruct +] +qed-. + +lemma aaa_inv_zero: ∀G,L,A. ⦃G, L⦄ ⊢ #0 ⁝ A → + ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A. +/2 width=3 by aaa_inv_zero_aux/ qed-. + +fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #(↑i) → + ∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #s #j #H destruct +| #I #G #L #V #B #_ #j #H destruct +| #I #G #L #A #i #HA #j #H destruct /2 width=4 by ex2_2_intro/ +| #p #G #L #V #T #B #A #_ #_ #j #H destruct +| #p #G #L #V #T #B #A #_ #_ #j #H destruct +| #G #L #V #T #B #A #_ #_ #j #H destruct +| #G #L #V #T #A #_ #_ #j #H destruct +] +qed-. + +lemma aaa_inv_lref: ∀G,L,A,i. ⦃G, L⦄ ⊢ #↑i ⁝ A → + ∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A. +/2 width=3 by aaa_inv_lref_aux/ qed-. + +fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀l. T = §l → ⊥. +#G #L #T #A * -G -L -T -A +[ #G #L #s #k #H destruct +| #I #G #L #V #B #_ #k #H destruct +| #I #G #L #A #i #_ #k #H destruct +| #p #G #L #V #T #B #A #_ #_ #k #H destruct +| #p #G #L #V #T #B #A #_ #_ #k #H destruct +| #G #L #V #T #B #A #_ #_ #k #H destruct +| #G #L #V #T #A #_ #_ #k #H destruct +] +qed-. + +lemma aaa_inv_gref: ∀G,L,A,l. ⦃G, L⦄ ⊢ §l ⁝ A → ⊥. +/2 width=7 by aaa_inv_gref_aux/ qed-. + +fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓓ{p}W.U → + ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L.ⓓW⦄ ⊢ U ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #s #q #W #U #H destruct +| #I #G #L #V #B #_ #q #W #U #H destruct +| #I #G #L #A #i #_ #q #W #U #H destruct +| #p #G #L #V #T #B #A #HV #HT #q #W #U #H destruct /2 width=2 by ex2_intro/ +| #p #G #L #V #T #B #A #_ #_ #q #W #U #H destruct +| #G #L #V #T #B #A #_ #_ #q #W #U #H destruct +| #G #L #V #T #A #_ #_ #q #W #U #H destruct +] +qed-. + +lemma aaa_inv_abbr: ∀p,G,L,V,T,A. ⦃G, L⦄ ⊢ ⓓ{p}V.T ⁝ A → + ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L.ⓓV⦄ ⊢ T ⁝ A. +/2 width=4 by aaa_inv_abbr_aux/ qed-. + +fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓛ{p}W.U → + ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ U ⁝ B2 & A = ②B1.B2. +#G #L #T #A * -G -L -T -A +[ #G #L #s #q #W #U #H destruct +| #I #G #L #V #B #_ #q #W #U #H destruct +| #I #G #L #A #i #_ #q #W #U #H destruct +| #p #G #L #V #T #B #A #_ #_ #q #W #U #H destruct +| #p #G #L #V #T #B #A #HV #HT #q #W #U #H destruct /2 width=5 by ex3_2_intro/ +| #G #L #V #T #B #A #_ #_ #q #W #U #H destruct +| #G #L #V #T #A #_ #_ #q #W #U #H destruct +] +qed-. + +lemma aaa_inv_abst: ∀p,G,L,W,T,A. ⦃G, L⦄ ⊢ ⓛ{p}W.T ⁝ A → + ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ T ⁝ B2 & A = ②B1.B2. +/2 width=4 by aaa_inv_abst_aux/ qed-. + +fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U → + ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L⦄ ⊢ U ⁝ ②B.A. +#G #L #T #A * -G -L -T -A +[ #G #L #s #W #U #H destruct +| #I #G #L #V #B #_ #W #U #H destruct +| #I #G #L #A #i #_ #W #U #H destruct +| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #B #A #HV #HT #W #U #H destruct /2 width=3 by ex2_intro/ +| #G #L #V #T #A #_ #_ #W #U #H destruct +] +qed-. + +lemma aaa_inv_appl: ∀G,L,V,T,A. ⦃G, L⦄ ⊢ ⓐV.T ⁝ A → + ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L⦄ ⊢ T ⁝ ②B.A. +/2 width=3 by aaa_inv_appl_aux/ qed-. + +fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW.U → + ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ U ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #s #W #U #H destruct +| #I #G #L #V #B #_ #W #U #H destruct +| #I #G #L #A #i #_ #W #U #H destruct +| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #p #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #A #HV #HT #W #U #H destruct /2 width=1 by conj/ +] +qed-. + +lemma aaa_inv_cast: ∀G,L,W,T,A. ⦃G, L⦄ ⊢ ⓝW.T ⁝ A → + ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ T ⁝ A. +/2 width=3 by aaa_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_aaa.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_aaa.ma new file mode 100644 index 000000000..15b4fe4e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_aaa.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Main inversion lemmas ****************************************************) + +theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T ⁝ A2 → A1 = A2. +#G #L #T #A1 #H elim H -G -L -T -A1 +[ #G #L #s #A2 #H >(aaa_inv_sort … H) -H // +| #I1 #G #L #V1 #B #_ #IH #A2 #H + elim (aaa_inv_zero … H) -H #I2 #K2 #V2 #H #HA2 destruct /2 width=1 by/ +| #I1 #G #L #B #i #_ #IH #A2 #H + elim (aaa_inv_lref … H) -H #I2 #K2 #H #HA2 destruct /2 width=1 by/ +| #p #G #L #V #T #B1 #A1 #_ #_ #_ #IH #A2 #H + elim (aaa_inv_abbr … H) -H /2 width=1 by/ +| #p #G #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H + elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1 by eq_f2/ +| #G #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_appl … H) -H #B2 #_ #HA2 + lapply (IHA1 … HA2) -L #H destruct // +| #G #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_cast … H) -H /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_drops.ma new file mode 100644 index 000000000..1cc311ddf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_drops.ma @@ -0,0 +1,123 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops_drops.ma". +include "static_2/s_computation/fqup_weight.ma". +include "static_2/s_computation/fqup_drops.ma". +include "static_2/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Advanced properties ******************************************************) + +(* Basic_2A1: was: aaa_lref *) +lemma aaa_lref_drops: ∀I,G,K,V,B,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ⁝ B → ⦃G, L⦄ ⊢ #i ⁝ B. +#I #G #K #V #B #i elim i -i +[ #L #H lapply (drops_fwd_isid … H ?) -H // + #H destruct /2 width=1 by aaa_zero/ +| #i #IH #L (lifts_inv_sort1 … HX) -HX // +| #i1 #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX + elim (aaa_inv_lref_drops … H) -H #J #K1 #V1 #HLK1 #HA + elim (lifts_inv_lref1 … HX) -HX #i2 #Hf #H destruct + lapply (drops_trans … HL21 … HLK1 ??) -HL21 [1,2: // ] #H + elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK2 #HY + lapply (drops_tls_at … Hf … HY) -HY #HY -Hf + elim (drops_inv_skip2 … HY) -HY #Z #K2 #HK21 #HZ #H destruct + elim (liftsb_inv_pair_sn … HZ) -HZ #V2 #HV12 #H destruct + /4 width=12 by aaa_lref_drops, fqup_lref, drops_inv_gen/ +| #l #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX -b -f -IH + elim (aaa_inv_gref … H) +| #p * #V1 #T1 #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX + [ elim (aaa_inv_abbr … H) -H #B #HB #HA + elim (lifts_inv_bind1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct + /5 width=9 by aaa_abbr, drops_skip, ext2_pair/ + | elim (aaa_inv_abst … H) -H #B #A0 #HB #HA #H0 + elim (lifts_inv_bind1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct + /5 width=8 by aaa_abst, drops_skip, ext2_pair/ + ] +| * #V1 #T1 #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX + [ elim (aaa_inv_appl … H) -H #B #HB #HA + elim (lifts_inv_flat1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct + /3 width=10 by aaa_appl/ + | elim (aaa_inv_cast … H) -H #H1A #H2A + elim (lifts_inv_flat1 … HX) -HX #V2 #T2 #HV12 #HT12 #H destruct + /3 width=8 by aaa_cast/ + ] +] +qed-. + +(* Inversion lemmas with generic slicing for local environments *************) + +(* Basic_2A1: includes: aaa_inv_lift *) +lemma aaa_inv_lifts: ∀G,L2,T2,A. ⦃G, L2⦄ ⊢ T2 ⁝ A → ∀b,f,L1. ⬇*[b, f] L2 ≘ L1 → + ∀T1. ⬆*[f] T1 ≘ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A. +@(fqup_wf_ind_eq (Ⓣ)) #G0 #L0 #T0 #IH #G #L2 * * +[ #s #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX -b -IH + lapply (aaa_inv_sort … H) -H #H destruct + >(lifts_inv_sort2 … HX) -HX // +| #i2 #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX + elim (aaa_inv_lref_drops … H) -H #J #K2 #V2 #HLK2 #HA + elim (lifts_inv_lref2 … HX) -HX #i1 #Hf #H destruct + lapply (drops_split_div … HL21 (𝐔❴i1❵) ???) -HL21 [4: * |*: // ] #Y #HLK1 #HY + lapply (drops_conf … HLK2 … HY ??) -HY [1,2: /2 width=6 by after_uni_dx/ ] #HY + lapply (drops_tls_at … Hf … HY) -HY #HY -Hf + elim (drops_inv_skip1 … HY) -HY #Z #K1 #HK21 #HZ #H destruct + elim (liftsb_inv_pair_dx … HZ) -HZ #V1 #HV12 #H destruct + /4 width=12 by aaa_lref_drops, fqup_lref, drops_inv_F/ +| #l #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX -IH -b -f + elim (aaa_inv_gref … H) +| #p * #V2 #T2 #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX + [ elim (aaa_inv_abbr … H) -H #B #HB #HA + elim (lifts_inv_bind2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct + /5 width=9 by aaa_abbr, drops_skip, ext2_pair/ + | elim (aaa_inv_abst … H) -H #B #A0 #HB #HA #H0 + elim (lifts_inv_bind2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct + /5 width=8 by aaa_abst, drops_skip, ext2_pair/ + ] +| * #V2 #T2 #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX + [ elim (aaa_inv_appl … H) -H #B #HB #HA + elim (lifts_inv_flat2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct + /3 width=10 by aaa_appl/ + | elim (aaa_inv_cast … H) -H #H1A #H2A + elim (lifts_inv_flat2 … HX) -HX #V1 #T1 #HV12 #HT12 #H destruct + /3 width=8 by aaa_cast/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_fdeq.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_fdeq.ma new file mode 100644 index 000000000..4572fda32 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_fdeq.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/fdeq.ma". +include "static_2/static/aaa_rdeq.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties with degree-based equivalence on referred entries *************) + +lemma aaa_fdeq_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → + ∀A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → ⦃G2, L2⦄ ⊢ T2 ⁝ A. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/2 width=7 by aaa_tdeq_conf_rdeq/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_fqus.ma new file mode 100644 index 000000000..f02455f9f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_fqus.ma @@ -0,0 +1,63 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_computation/fqus_fqup.ma". +include "static_2/static/aaa_drops.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on supclosure *************************************************) + +lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #A #H elim (aaa_inv_zero … H) -H + #J #K #V #H #HA destruct /2 width=2 by ex_intro/ +| * [ #p ] * #G #L #V #T #X #H + [ elim (aaa_inv_abbr … H) + | elim (aaa_inv_abst … H) + | elim (aaa_inv_appl … H) + | elim (aaa_inv_cast … H) + ] -H /2 width=2 by ex_intro/ +| #p * #G #L #V #T #X #H + [ elim (aaa_inv_abbr … H) + | elim (aaa_inv_abst … H) + ] -H /2 width=2 by ex_intro/ +| #p #I #G #L #V #T #H destruct +| * #G #L #V #T #X #H + [ elim (aaa_inv_appl … H) + | elim (aaa_inv_cast … H) + ] -H /2 width=2 by ex_intro/ +| /5 width=8 by aaa_inv_lifts, drops_refl, drops_drop, ex_intro/ +] +qed-. + +lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=6 by aaa_fqu_conf/ +* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ +qed-. + +lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[2: #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A ] +/2 width=6 by aaa_fqu_conf/ +qed-. + +lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim(fqus_inv_fqup … H) -H /2 width=6 by aaa_fqup_conf/ +* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_rdeq.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_rdeq.ma new file mode 100644 index 000000000..23760c8bd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_rdeq.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rdeq.ma". +include "static_2/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties with degree-based equivalence on referred entries *************) + +lemma aaa_tdeq_conf_rdeq: ∀h,o,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → ∀T2. T1 ≛[h, o] T2 → + ∀L2. L1 ≛[h, o, T1] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#h #o #G #L1 #T1 #A #H elim H -G -L1 -T1 -A +[ #G #L1 #s1 #X #H1 elim (tdeq_inv_sort1 … H1) -H1 // +| #I #G #L1 #V1 #B #_ #IH #X #H1 >(tdeq_inv_lref1 … H1) -H1 + #Y #H2 elim (rdeq_inv_zero_pair_sn … H2) -H2 + #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by aaa_zero/ +| #I #G #L1 #A #i #_ #IH #X #H1 >(tdeq_inv_lref1 … H1) -H1 + #Y #H2 elim (rdeq_inv_lref_bind_sn … H2) -H2 + #J #L2 #HL12 #H destruct /3 width=1 by aaa_lref/ +| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_bind … H2) -H2 destruct + /5 width=2 by aaa_abbr, rdeq_bind_repl_dx, ext2_pair/ +| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_bind … H2) -H2 destruct + /5 width=2 by aaa_abst, rdeq_bind_repl_dx, ext2_pair/ +| #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_flat … H2) -H2 destruct + /3 width=3 by aaa_appl/ +| #G #L1 #V1 #T1 #A #_ #_ #IHV #IHT #X #H1 elim (tdeq_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (rdeq_inv_flat … H2) -H2 destruct + /3 width=1 by aaa_cast/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/fdeq.ma b/matita/matita/contribs/lambdadelta/static_2/static/fdeq.ma new file mode 100644 index 000000000..25427895c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/fdeq.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/stareqsn_8.ma". +include "static_2/syntax/genv.ma". +include "static_2/static/rdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) + +inductive fdeq (h) (o) (G) (L1) (T1): relation3 genv lenv term ≝ +| fdeq_intro_sn: ∀L2,T2. L1 ≛[h, o, T1] L2 → T1 ≛[h, o] T2 → + fdeq h o G L1 T1 G L2 T2 +. + +interpretation + "degree-based equivalence on referred entries (closure)" + 'StarEqSn h o G1 L1 T1 G2 L2 T2 = (fdeq h o G1 L1 T1 G2 L2 T2). + +(* Basic_properties *********************************************************) + +lemma fdeq_intro_dx (h) (o) (G): ∀L1,L2,T2. L1 ≛[h, o, T2] L2 → + ∀T1. T1 ≛[h, o] T2 → ⦃G, L1, T1⦄ ≛[h, o] ⦃G, L2, T2⦄. +/3 width=3 by fdeq_intro_sn, tdeq_rdeq_div/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma fdeq_inv_gen_sn: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L1 ≛[h, o, T1] L2 & T1 ≛[h, o] T2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=1 by and3_intro/ +qed-. + +lemma fdeq_inv_gen_dx: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L1 ≛[h, o, T2] L2 & T1 ≛[h, o] T2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/3 width=3 by tdeq_rdeq_conf, and3_intro/ +qed-. + +(* Basic_2A1: removed theorems 6: + fleq_refl fleq_sym fleq_inv_gen + fleq_trans fleq_canc_sn fleq_canc_dx +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fdeq.ma b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fdeq.ma new file mode 100644 index 000000000..729185985 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fdeq.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rdeq_rdeq.ma". +include "static_2/static/fdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) + +(* Advanced properties ******************************************************) + +lemma fdeq_sym: ∀h,o. tri_symmetric … (fdeq h o). +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1 +/3 width=1 by fdeq_intro_dx, rdeq_sym, tdeq_sym/ +qed-. + +(* Main properties **********************************************************) + +theorem fdeq_trans: ∀h,o. tri_transitive … (fdeq h o). +#h #o #G1 #G #L1 #L #T1 #T * -G -L -T +#L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2 +/4 width=5 by fdeq_intro_sn, rdeq_trans, tdeq_rdeq_div, tdeq_trans/ +qed-. + +theorem fdeq_canc_sn: ∀h,o,G,G1,G2,L,L1,L2,T,T1,T2. + ⦃G, L, T⦄ ≛[h, o] ⦃G1, L1, T1⦄→ ⦃G, L, T⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄. +/3 width=5 by fdeq_trans, fdeq_sym/ qed-. + +theorem fdeq_canc_dx: ∀h,o,G1,G2,G,L1,L2,L,T1,T2,T. + ⦃G1, L1, T1⦄ ≛[h, o] ⦃G, L, T⦄ → ⦃G2, L2, T2⦄ ≛[h, o] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄. +/3 width=5 by fdeq_trans, fdeq_sym/ qed-. + +(* Main inversion lemmas with degree-based equivalence on terms *************) + +theorem fdeq_tdneq_repl_dx: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → + ∀U1,U2. ⦃G1, L1, U1⦄ ≛[h, o] ⦃G2, L2, U2⦄ → + (T2 ≛[h, o] U2 → ⊥) → (T1 ≛[h, o] U1 → ⊥). +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1 +elim (fdeq_inv_gen_sn … HT) -HT #_ #_ #HT +elim (fdeq_inv_gen_sn … HU) -HU #_ #_ #HU +/3 width=5 by tdeq_repl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqup.ma new file mode 100644 index 000000000..6a4f49e57 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqup.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rdeq_fqup.ma". +include "static_2/static/fdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) + +(* Properties with degree-based equivalence for terms ***********************) + +lemma tdeq_fdeq: ∀h,o,T1,T2. T1 ≛[h, o] T2 → + ∀G,L. ⦃G, L, T1⦄ ≛[h, o] ⦃G, L, T2⦄. +/2 width=1 by fdeq_intro_sn/ qed. + +(* Advanced properties ******************************************************) + +lemma fdeq_refl: ∀h,o. tri_reflexive … (fdeq h o). +/2 width=1 by fdeq_intro_sn/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqus.ma new file mode 100644 index 000000000..4274cd40f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqus.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rdeq_fqus.ma". +include "static_2/static/fdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) + +(* Properties with star-iterated structural successor for closures **********) + +lemma fdeq_fqus_trans: ∀h,o,b,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → + ∃∃G,L0,T0. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L0, T0⦄ & ⦃G, L0, T0⦄ ≛[h, o] ⦃G2, L2, T2⦄. +#h #o #b #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2 +elim(fdeq_inv_gen_dx … H1) -H1 #HG #HL1 #HT1 destruct +elim (rdeq_fqus_trans … H2 … HL1) -L #L #T0 #H2 #HT02 #HL2 +elim (tdeq_fqus_trans … H2 … HT1) -T #L0 #T #H2 #HT0 #HL0 +lapply (tdeq_rdeq_conf … HT02 … HL0) -HL0 #HL0 +/4 width=7 by fdeq_intro_dx, rdeq_trans, tdeq_trans, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/fdeq_req.ma b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_req.ma new file mode 100644 index 000000000..0c0d9c3bc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/fdeq_req.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rdeq_req.ma". +include "static_2/static/fdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************) + +(* Properties with syntactic equivalence on referred entries ****************) + +lemma req_rdeq_trans: ∀h,o,L1,L,T1. L1 ≡[T1] L → + ∀G1,G2,L2,T2. ⦃G1, L, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄. +#h #o #L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H +elim (fdeq_inv_gen_sn … H) -H #H #HL2 #T12 destruct +/3 width=3 by fdeq_intro_sn, req_rdeq_trans/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/frees.ma b/matita/matita/contribs/lambdadelta/static_2/static/frees.ma new file mode 100644 index 000000000..054003f83 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/frees.ma @@ -0,0 +1,226 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/rtmap_sor.ma". +include "static_2/notation/relations/freestar_3.ma". +include "static_2/syntax/lenv.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +inductive frees: relation3 lenv term rtmap ≝ +| frees_sort: ∀f,L,s. 𝐈⦃f⦄ → frees L (⋆s) f +| frees_atom: ∀f,i. 𝐈⦃f⦄ → frees (⋆) (#i) (⫯*[i]↑f) +| frees_pair: ∀f,I,L,V. frees L V f → + frees (L.ⓑ{I}V) (#0) (↑f) +| frees_unit: ∀f,I,L. 𝐈⦃f⦄ → frees (L.ⓤ{I}) (#0) (↑f) +| frees_lref: ∀f,I,L,i. frees L (#i) f → + frees (L.ⓘ{I}) (#↑i) (⫯f) +| frees_gref: ∀f,L,l. 𝐈⦃f⦄ → frees L (§l) f +| frees_bind: ∀f1,f2,f,p,I,L,V,T. frees L V f1 → frees (L.ⓑ{I}V) T f2 → + f1 ⋓ ⫱f2 ≘ f → frees L (ⓑ{p,I}V.T) f +| frees_flat: ∀f1,f2,f,I,L,V,T. frees L V f1 → frees L T f2 → + f1 ⋓ f2 ≘ f → frees L (ⓕ{I}V.T) f +. + +interpretation + "context-sensitive free variables (term)" + 'FreeStar L T f = (frees L T f). + +(* Basic inversion lemmas ***************************************************) + +fact frees_inv_sort_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = ⋆x → 𝐈⦃f⦄. +#L #X #f #H elim H -f -L -X // +[ #f #i #_ #x #H destruct +| #f #_ #L #V #_ #_ #x #H destruct +| #f #_ #L #_ #x #H destruct +| #f #_ #L #i #_ #_ #x #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct +] +qed-. + +lemma frees_inv_sort: ∀f,L,s. L ⊢ 𝐅*⦃⋆s⦄ ≘ f → 𝐈⦃f⦄. +/2 width=5 by frees_inv_sort_aux/ qed-. + +fact frees_inv_atom_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀i. L = ⋆ → X = #i → + ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g. +#f #L #X #H elim H -f -L -X +[ #f #L #s #_ #j #_ #H destruct +| #f #i #Hf #j #_ #H destruct /2 width=3 by ex2_intro/ +| #f #I #L #V #_ #_ #j #H destruct +| #f #I #L #_ #j #H destruct +| #f #I #L #i #_ #_ #j #H destruct +| #f #L #l #_ #j #_ #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #_ #_ #j #_ #H destruct +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #_ #_ #j #_ #H destruct +] +qed-. + +lemma frees_inv_atom: ∀f,i. ⋆ ⊢ 𝐅*⦃#i⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g. +/2 width=5 by frees_inv_atom_aux/ qed-. + +fact frees_inv_pair_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,V. L = K.ⓑ{I}V → X = #0 → + ∃∃g. K ⊢ 𝐅*⦃V⦄ ≘ g & f = ↑g. +#f #L #X * -f -L -X +[ #f #L #s #_ #Z #Y #X #_ #H destruct +| #f #i #_ #Z #Y #X #H destruct +| #f #I #L #V #Hf #Z #Y #X #H #_ destruct /2 width=3 by ex2_intro/ +| #f #I #L #_ #Z #Y #X #H destruct +| #f #I #L #i #_ #Z #Y #X #_ #H destruct +| #f #L #l #_ #Z #Y #X #_ #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #Z #Y #X #_ #H destruct +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #Z #Y #X #_ #H destruct +] +qed-. + +lemma frees_inv_pair: ∀f,I,K,V. K.ⓑ{I}V ⊢ 𝐅*⦃#0⦄ ≘ f → ∃∃g. K ⊢ 𝐅*⦃V⦄ ≘ g & f = ↑g. +/2 width=6 by frees_inv_pair_aux/ qed-. + +fact frees_inv_unit_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K. L = K.ⓤ{I} → X = #0 → + ∃∃g. 𝐈⦃g⦄ & f = ↑g. +#f #L #X * -f -L -X +[ #f #L #s #_ #Z #Y #_ #H destruct +| #f #i #_ #Z #Y #H destruct +| #f #I #L #V #_ #Z #Y #H destruct +| #f #I #L #Hf #Z #Y #H destruct /2 width=3 by ex2_intro/ +| #f #I #L #i #_ #Z #Y #_ #H destruct +| #f #L #l #_ #Z #Y #_ #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #Z #Y #_ #H destruct +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #Z #Y #_ #H destruct +] +qed-. + +lemma frees_inv_unit: ∀f,I,K. K.ⓤ{I} ⊢ 𝐅*⦃#0⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ↑g. +/2 width=7 by frees_inv_unit_aux/ qed-. + +fact frees_inv_lref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,j. L = K.ⓘ{I} → X = #(↑j) → + ∃∃g. K ⊢ 𝐅*⦃#j⦄ ≘ g & f = ⫯g. +#f #L #X * -f -L -X +[ #f #L #s #_ #Z #Y #j #_ #H destruct +| #f #i #_ #Z #Y #j #H destruct +| #f #I #L #V #_ #Z #Y #j #_ #H destruct +| #f #I #L #_ #Z #Y #j #_ #H destruct +| #f #I #L #i #Hf #Z #Y #j #H1 #H2 destruct /2 width=3 by ex2_intro/ +| #f #L #l #_ #Z #Y #j #_ #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #Z #Y #j #_ #H destruct +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #Z #Y #j #_ #H destruct +] +qed-. + +lemma frees_inv_lref: ∀f,I,K,i. K.ⓘ{I} ⊢ 𝐅*⦃#(↑i)⦄ ≘ f → + ∃∃g. K ⊢ 𝐅*⦃#i⦄ ≘ g & f = ⫯g. +/2 width=6 by frees_inv_lref_aux/ qed-. + +fact frees_inv_gref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = §x → 𝐈⦃f⦄. +#f #L #X #H elim H -f -L -X // +[ #f #i #_ #x #H destruct +| #f #_ #L #V #_ #_ #x #H destruct +| #f #_ #L #_ #x #H destruct +| #f #_ #L #i #_ #_ #x #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #_ #_ #x #H destruct +] +qed-. + +lemma frees_inv_gref: ∀f,L,l. L ⊢ 𝐅*⦃§l⦄ ≘ f → 𝐈⦃f⦄. +/2 width=5 by frees_inv_gref_aux/ qed-. + +fact frees_inv_bind_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀p,I,V,T. X = ⓑ{p,I}V.T → + ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f. +#f #L #X * -f -L -X +[ #f #L #s #_ #q #J #W #U #H destruct +| #f #i #_ #q #J #W #U #H destruct +| #f #I #L #V #_ #q #J #W #U #H destruct +| #f #I #L #_ #q #J #W #U #H destruct +| #f #I #L #i #_ #q #J #W #U #H destruct +| #f #L #l #_ #q #J #W #U #H destruct +| #f1 #f2 #f #p #I #L #V #T #HV #HT #Hf #q #J #W #U #H destruct /2 width=5 by ex3_2_intro/ +| #f1 #f2 #f #I #L #V #T #_ #_ #_ #q #J #W #U #H destruct +] +qed-. + +lemma frees_inv_bind: ∀f,p,I,L,V,T. L ⊢ 𝐅*⦃ⓑ{p,I}V.T⦄ ≘ f → + ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f. +/2 width=4 by frees_inv_bind_aux/ qed-. + +fact frees_inv_flat_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,V,T. X = ⓕ{I}V.T → + ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f. +#f #L #X * -f -L -X +[ #f #L #s #_ #J #W #U #H destruct +| #f #i #_ #J #W #U #H destruct +| #f #I #L #V #_ #J #W #U #H destruct +| #f #I #L #_ #J #W #U #H destruct +| #f #I #L #i #_ #J #W #U #H destruct +| #f #L #l #_ #J #W #U #H destruct +| #f1 #f2 #f #p #I #L #V #T #_ #_ #_ #J #W #U #H destruct +| #f1 #f2 #f #I #L #V #T #HV #HT #Hf #J #W #U #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma frees_inv_flat: ∀f,I,L,V,T. L ⊢ 𝐅*⦃ⓕ{I}V.T⦄ ≘ f → + ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f. +/2 width=4 by frees_inv_flat_aux/ qed-. + +(* Basic properties ********************************************************) + +lemma frees_eq_repl_back: ∀L,T. eq_repl_back … (λf. L ⊢ 𝐅*⦃T⦄ ≘ f). +#L #T #f1 #H elim H -f1 -L -T +[ /3 width=3 by frees_sort, isid_eq_repl_back/ +| #f1 #i #Hf1 #g2 #H + elim (eq_inv_pushs_sn … H) -H #g #Hg #H destruct + elim (eq_inv_nx … Hg) -Hg + /3 width=3 by frees_atom, isid_eq_repl_back/ +| #f1 #I #L #V #_ #IH #g2 #H + elim (eq_inv_nx … H) -H + /3 width=3 by frees_pair/ +| #f1 #I #L #Hf1 #g2 #H + elim (eq_inv_nx … H) -H + /3 width=3 by frees_unit, isid_eq_repl_back/ +| #f1 #I #L #i #_ #IH #g2 #H + elim (eq_inv_px … H) -H /3 width=3 by frees_lref/ +| /3 width=3 by frees_gref, isid_eq_repl_back/ +| /3 width=7 by frees_bind, sor_eq_repl_back3/ +| /3 width=7 by frees_flat, sor_eq_repl_back3/ +] +qed-. + +lemma frees_eq_repl_fwd: ∀L,T. eq_repl_fwd … (λf. L ⊢ 𝐅*⦃T⦄ ≘ f). +#L #T @eq_repl_sym /2 width=3 by frees_eq_repl_back/ +qed-. + +lemma frees_lref_push: ∀f,i. ⋆ ⊢ 𝐅*⦃#i⦄ ≘ f → ⋆ ⊢ 𝐅*⦃#↑i⦄ ≘ ⫯f. +#f #i #H +elim (frees_inv_atom … H) -H #g #Hg #H destruct +/2 width=1 by frees_atom/ +qed. + +(* Forward lemmas with test for finite colength *****************************) + +lemma frees_fwd_isfin: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → 𝐅⦃f⦄. +#f #L #T #H elim H -f -L -T +/4 width=5 by sor_isfin, isfin_isid, isfin_tl, isfin_pushs, isfin_push, isfin_next/ +qed-. + +(* Basic_2A1: removed theorems 30: + frees_eq frees_be frees_inv + frees_inv_sort frees_inv_gref frees_inv_lref frees_inv_lref_free + frees_inv_lref_skip frees_inv_lref_ge frees_inv_lref_lt + frees_inv_bind frees_inv_flat frees_inv_bind_O + frees_lref_eq frees_lref_be frees_weak + frees_bind_sn frees_bind_dx frees_flat_sn frees_flat_dx + frees_lift_ge frees_inv_lift_be frees_inv_lift_ge + lreq_frees_trans frees_lreq_conf + llor_atom llor_skip llor_total + llor_tail_frees llor_tail_cofrees +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/frees_append.ma b/matita/matita/contribs/lambdadelta/static_2/static/frees_append.ma new file mode 100644 index 000000000..ce8d34808 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/frees_append.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/append.ma". +include "static_2/static/frees.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +(* Properties with append for local environments ****************************) + +lemma frees_append_void: ∀f,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f → ⓧ.K ⊢ 𝐅*⦃T⦄ ≘ f. +#f #K #T #H elim H -f -K -T +[ /2 width=1 by frees_sort/ +| #f * /3 width=1 by frees_atom, frees_unit, frees_lref/ +| /2 width=1 by frees_pair/ +| /2 width=1 by frees_unit/ +| /2 width=1 by frees_lref/ +| /2 width=1 by frees_gref/ +| /3 width=5 by frees_bind/ +| /3 width=5 by frees_flat/ +] +qed. + +(* Inversion lemmas with append for local environments **********************) + +fact frees_inv_append_void_aux: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → + ∀K. L = ⓧ.K → K ⊢ 𝐅*⦃T⦄ ≘ f. +#f #L #T #H elim H -f -L -T +[ /2 width=1 by frees_sort/ +| #f #i #_ #K #H + elim (append_inv_atom3_sn … H) -H #H1 #H2 destruct +| #f #I #L #V #_ #IH #K #H + elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct + /3 width=1 by frees_pair/ +| #f #I #L #Hf #K #H + elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct + /2 width=1 by frees_atom, frees_unit/ +| #f #I #L #i #Hf #IH #K #H + elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct + /3 width=1 by frees_lref, frees_lref_push/ +| /2 width=1 by frees_gref/ +| /3 width=5 by frees_bind/ +| /3 width=5 by frees_flat/ +] +qed-. + +lemma frees_inv_append_void: ∀f,K,T. ⓧ.K ⊢ 𝐅*⦃T⦄ ≘ f → K ⊢ 𝐅*⦃T⦄ ≘ f. +/2 width=3 by frees_inv_append_void_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/frees_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/frees_drops.ma new file mode 100644 index 000000000..3c6466086 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/frees_drops.ma @@ -0,0 +1,245 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/nstream_coafter.ma". +include "static_2/relocation/drops_drops.ma". +include "static_2/static/frees_fqup.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +(* Advanced properties ******************************************************) + +lemma frees_atom_drops: ∀b,L,i. ⬇*[b, 𝐔❴i❵] L ≘ ⋆ → + ∀f. 𝐈⦃f⦄ → L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i]↑f. +#b #L elim L -L /2 width=1 by frees_atom/ +#L #I #IH * +[ #H lapply (drops_fwd_isid … H ?) -H // #H destruct +| /4 width=3 by frees_lref, drops_inv_drop1/ +] +qed. + +lemma frees_pair_drops: ∀f,K,V. K ⊢ 𝐅*⦃V⦄ ≘ f → + ∀i,I,L. ⬇*[i] L ≘ K.ⓑ{I}V → L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i] ↑f. +#f #K #V #Hf #i elim i -i +[ #I #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_pair/ +| #i #IH #I #L #H elim (drops_inv_succ … H) -H /3 width=2 by frees_lref/ +] +qed. + +lemma frees_unit_drops: ∀f. 𝐈⦃f⦄ → ∀I,K,i,L. ⬇*[i] L ≘ K.ⓤ{I} → + L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i] ↑f. +#f #Hf #I #K #i elim i -i +[ #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_unit/ +| #i #IH #Y #H elim (drops_inv_succ … H) -H + #J #L #HLK #H destruct /3 width=1 by frees_lref/ +] +qed. +(* +lemma frees_sort_pushs: ∀f,K,s. K ⊢ 𝐅*⦃⋆s⦄ ≘ f → + ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃⋆s⦄ ≘ ⫯*[i] f. +#f #K #s #Hf #i elim i -i +[ #L #H lapply (drops_fwd_isid … H ?) -H // +| #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_sort/ +] +qed. +*) +lemma frees_lref_pushs: ∀f,K,j. K ⊢ 𝐅*⦃#j⦄ ≘ f → + ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃#(i+j)⦄ ≘ ⫯*[i] f. +#f #K #j #Hf #i elim i -i +[ #L #H lapply (drops_fwd_isid … H ?) -H // +| #i #IH #L #H elim (drops_inv_succ … H) -H + #I #Y #HYK #H destruct /3 width=1 by frees_lref/ +] +qed. +(* +lemma frees_gref_pushs: ∀f,K,l. K ⊢ 𝐅*⦃§l⦄ ≘ f → + ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃§l⦄ ≘ ⫯*[i] f. +#f #K #l #Hf #i elim i -i +[ #L #H lapply (drops_fwd_isid … H ?) -H // +| #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_gref/ +] +qed. +*) +(* Advanced inversion lemmas ************************************************) + +lemma frees_inv_lref_drops: ∀L,i,f. L ⊢ 𝐅*⦃#i⦄ ≘ f → + ∨∨ ∃∃g. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ & 𝐈⦃g⦄ & f = ⫯*[i] ↑g + | ∃∃g,I,K,V. K ⊢ 𝐅*⦃V⦄ ≘ g & + ⬇*[i] L ≘ K.ⓑ{I}V & f = ⫯*[i] ↑g + | ∃∃g,I,K. ⬇*[i] L ≘ K.ⓤ{I} & 𝐈⦃g⦄ & f = ⫯*[i] ↑g. +#L elim L -L +[ #i #g | #L #I #IH * [ #g cases I -I [ #I | #I #V ] -IH | #i #g ] ] #H +[ elim (frees_inv_atom … H) -H #f #Hf #H destruct + /3 width=3 by or3_intro0, ex3_intro/ +| elim (frees_inv_unit … H) -H #f #Hf #H destruct + /4 width=3 by drops_refl, or3_intro2, ex3_3_intro/ +| elim (frees_inv_pair … H) -H #f #Hf #H destruct + /4 width=7 by drops_refl, or3_intro1, ex3_4_intro/ +| elim (frees_inv_lref … H) -H #f #Hf #H destruct + elim (IH … Hf) -IH -Hf * + [ /4 width=3 by drops_drop, or3_intro0, ex3_intro/ + | /4 width=7 by drops_drop, or3_intro1, ex3_4_intro/ + | /4 width=3 by drops_drop, or3_intro2, ex3_3_intro/ + ] +] +qed-. + +(* Properties with generic slicing for local environments *******************) + +lemma frees_lifts: ∀b,f1,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f1 → + ∀f,L. ⬇*[b, f] L ≘ K → ∀U. ⬆*[f] T ≘ U → + ∀f2. f ~⊚ f1 ≘ f2 → L ⊢ 𝐅*⦃U⦄ ≘ f2. +#b #f1 #K #T #H lapply (frees_fwd_isfin … H) elim H -f1 -K -T +[ #f1 #K #s #Hf1 #_ #f #L #HLK #U #H2 #f2 #H3 + lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hf2 + >(lifts_inv_sort1 … H2) -U /2 width=1 by frees_sort/ +| #f1 #i #Hf1 #_ #f #L #H1 #U #H2 #f2 #H3 + elim (lifts_inv_lref1 … H2) -H2 #j #Hij #H destruct + elim (coafter_fwd_xnx_pushs … Hij H3) -H3 #g2 #Hg2 #H2 destruct + lapply (coafter_isid_inv_dx … Hg2 … Hf1) -f1 #Hf2 + elim (drops_inv_atom2 … H1) -H1 #n #g #H1 #Hf + elim (after_at_fwd … Hij … Hf) -f #x #_ #Hj -g -i + lapply (at_inv_uni … Hj) -Hj #H destruct + /3 width=8 by frees_atom_drops, drops_trans/ +| #f1 #I #K #V #_ #IH #Hf1 #f #L #H1 #U #H2 #f2 #H3 + lapply (isfin_inv_next … Hf1 ??) -Hf1 [3: |*: // ] #Hf1 + lapply (lifts_inv_lref1 … H2) -H2 * #j #Hf #H destruct + elim (drops_split_trans_bind2 … H1) -H1 [ |*: // ] #Z #Y #HLY #HYK #H + elim (liftsb_inv_pair_sn … H) -H #W #HVW #H destruct + elim (coafter_fwd_xnx_pushs … Hf H3) -H3 #g2 #H3 #H2 destruct + lapply (IH … HYK … HVW … H3) -IH -H3 -HYK -HVW // + /2 width=5 by frees_pair_drops/ +| #f1 #I #K #Hf1 #_ #f #L #H1 #U #H2 #f2 #H3 + lapply (lifts_inv_lref1 … H2) -H2 * #j #Hf #H destruct + elim (coafter_fwd_xnx_pushs … Hf H3) -H3 #g2 #H3 #H2 destruct + lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hg2 + elim (drops_split_trans_bind2 … H1 … Hf) -H1 -Hf #Z #Y #HLY #_ #H + lapply (liftsb_inv_unit_sn … H) -H #H destruct + /2 width=3 by frees_unit_drops/ +| #f1 #I #K #i #_ #IH #Hf1 #f #L #H1 #U #H2 #f2 #H3 + lapply (isfin_inv_push … Hf1 ??) -Hf1 [3: |*: // ] #Hf1 + lapply (lifts_inv_lref1 … H2) -H2 * #x #Hf #H destruct + elim (at_inv_nxx … Hf) -Hf [ |*: // ] #j #Hf #H destruct + elim (drops_split_trans_bind2 … H1) -H1 [ |*: // ] #Z #Y #HLY #HYK #_ + elim (coafter_fwd_xpx_pushs … 0 … H3) [ |*: // ] #g2 #H3 #H2 destruct + lapply (drops_isuni_fwd_drop2 … HLY) -HLY // #HLY + lapply (IH … HYK … H3) -IH -H3 -HYK [4: |*: /2 width=2 by lifts_lref/ ] + >plus_S1 /2 width=3 by frees_lref_pushs/ (**) (* full auto fails *) +| #f1 #K #l #Hf1 #_ #f #L #HLK #U #H2 #f2 #H3 + lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hf2 + >(lifts_inv_gref1 … H2) -U /2 width=1 by frees_gref/ +| #f1V #f1T #f1 #p #I #K #V #T #_ #_ #H1f1 #IHV #IHT #H2f1 #f #L #H1 #Y #H2 #f2 #H3 + elim (sor_inv_isfin3 … H1f1) // #Hf1V #H + lapply (isfin_inv_tl … H) -H + elim (lifts_inv_bind1 … H2) -H2 #W #U #HVW #HTU #H destruct + elim (coafter_sor … H3 … H1f1) /2 width=5 by coafter_isfin2_fwd/ -H3 -H1f1 #f2V #f2T #Hf2V #H + elim (coafter_inv_tl1 … H) -H + /5 width=5 by frees_bind, drops_skip, ext2_pair/ +| #f1V #f1T #f1 #I #K #V #T #_ #_ #H1f1 #IHV #IHT #H2f1 #f #L #H1 #Y #H2 #f2 #H3 + elim (sor_inv_isfin3 … H1f1) // + elim (lifts_inv_flat1 … H2) -H2 #W #U #HVW #HTU #H destruct + elim (coafter_sor … H3 … H1f1) + /3 width=5 by coafter_isfin2_fwd, frees_flat/ +] +qed-. + +lemma frees_lifts_SO: ∀b,L,K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T,U. ⬆*[1] T ≘ U → + ∀f. K ⊢ 𝐅*⦃T⦄ ≘ f → L ⊢ 𝐅*⦃U⦄ ≘ ⫯f. +#b #L #K #HLK #T #U #HTU #f #Hf +@(frees_lifts b … Hf … HTU) // (**) (* auto fails *) +qed. + +(* Forward lemmas with generic slicing for local environments ***************) + +lemma frees_fwd_coafter: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 → + ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U → + ∀f1. K ⊢ 𝐅*⦃T⦄ ≘ f1 → f ~⊚ f1 ≘ f2. +/4 width=11 by frees_lifts, frees_mono, coafter_eq_repl_back0/ qed-. + +(* Inversion lemmas with generic slicing for local environments *************) + +lemma frees_inv_lifts_ex: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 → + ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U → + ∃∃f1. f ~⊚ f1 ≘ f2 & K ⊢ 𝐅*⦃T⦄ ≘ f1. +#b #f2 #L #U #Hf2 #f #K #HLK #T elim (frees_total K T) +/3 width=9 by frees_fwd_coafter, ex2_intro/ +qed-. + +lemma frees_inv_lifts_SO: ∀b,f,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f → + ∀K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T. ⬆*[1] T ≘ U → + K ⊢ 𝐅*⦃T⦄ ≘ ⫱f. +#b #f #L #U #H #K #HLK #T #HTU elim(frees_inv_lifts_ex … H … HLK … HTU) -b -L -U +#f1 #Hf #Hf1 elim (coafter_inv_nxx … Hf) -Hf +/3 width=5 by frees_eq_repl_back, coafter_isid_inv_sn/ +qed-. + +lemma frees_inv_lifts: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 → + ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U → + ∀f1. f ~⊚ f1 ≘ f2 → K ⊢ 𝐅*⦃T⦄ ≘ f1. +#b #f2 #L #U #H #f #K #HLK #T #HTU #f1 #Hf2 elim (frees_inv_lifts_ex … H … HLK … HTU) -b -L -U +/3 width=7 by frees_eq_repl_back, coafter_inj/ +qed-. + +(* Note: this is used by rex_conf and might be modified *) +lemma frees_inv_drops_next: ∀f1,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 → + ∀I2,L2,V2,n. ⬇*[n] L1 ≘ L2.ⓑ{I2}V2 → + ∀g1. ↑g1 = ⫱*[n] f1 → + ∃∃g2. L2 ⊢ 𝐅*⦃V2⦄ ≘ g2 & g2 ⊆ g1. +#f1 #L1 #T1 #H elim H -f1 -L1 -T1 +[ #f1 #L1 #s #Hf1 #I2 #L2 #V2 #n #_ #g1 #H1 -I2 -L1 -s + lapply (isid_tls n … Hf1) -Hf1

(injective_next … Hgf1) -g1 + /2 width=3 by ex2_intro/ + | -Hf1 #n #HL12 lapply (drops_inv_drop1 … HL12) -HL12 + #HL12 #g1 tls_xn #H2 elim (IHT1 … H2) -IHT1 -H2 + /3 width=6 by drops_drop, sor_inv_sle_dx_trans, ex2_intro/ + ] +| #fV1 #fT1 #f1 #I1 #L1 #V1 #T1 #_ #_ #Hf1 #IHV1 #IHT1 #I2 #L2 #V2 #n #HL12 #g1 #Hgf1 + lapply (sor_tls … Hf1 n) -Hf1 (lifts_inv_sort1 … H0) -H0 + lapply (acr_gcr … H1RP H2RP (⓪)) #HAtom + lapply (s4 … HAtom G L2 (Ⓔ)) /2 width=1 by/ +| #i #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct + elim (aaa_inv_lref_drops … HA) -HA #I #K1 #V1 #HLK1 #HKV1 + elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (drops_trans … HL01 … HLK1 ??) -HL01 [3: |*: // ] #H + elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK0 #HY + lapply (drops_tls_at … Hf … HY) -Hf -HY #HY + elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK01 #HZ #H destruct + elim (liftsb_inv_pair_sn … HZ) -HZ #V0 #HV10 #H destruct + elim (lifts_total V0 (𝐔❴↑j❵)) #V #HV0 + elim (lsubc_drops_trans_isuni … HL20 … HLK0) -HL20 -HLK0 // #Y #HLK2 #H + elim (lsubc_inv_bind2 … H) -H * + [ #K2 #HK20 #H destruct + lapply (drops_isuni_fwd_drop2 … HLK2) // #HLK2b + lapply (s5 … HA ? G ? ? (Ⓔ) … HV0 ?) -HA + /4 width=11 by acr_lifts, fqup_lref, drops_inv_gen/ + | #K2 #V2 #W2 #B #HKV2 #HK2V0 #HKV0B #_ #H1 #H2 destruct -IH -HLK1 + lapply (drops_isuni_fwd_drop2 … HLK2) // #HLK2b + lapply (aaa_lifts … HKV1 … HK01 … HV10) -HKV1 -HK01 -HV10 #HKV0A + lapply (aaa_mono … HKV0B … HKV0A) #H destruct -HKV0B -HKV0A + elim (lifts_total V2 (𝐔❴↑j❵)) #V3 #HV23 + lapply (s5 … HA … G … (Ⓔ) … (ⓝW2.V2) (ⓝV.V3) ????) + [3: |*: /2 width=9 by drops_inv_gen, lifts_flat/ ] -HLK2 + lapply (s7 … HA G L2 (Ⓔ)) -HA /3 width=7 by acr_lifts/ + ] +| #l #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct -IH + elim (aaa_inv_gref … HA) +| #V #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct + elim (aaa_inv_abbr … HA) -HA #B #HV #HT + elim (lifts_inv_bind1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (acr_gcr … H1RP H2RP B) #HB + lapply (s1 … HB) -HB #HB + lapply (s6 … HA G L2 (Ⓔ) (Ⓔ)) /5 width=10 by lsubc_bind, liftsv_nil, drops_skip, ext2_pair/ +| #W #T #HG #HL #HT #Z0 #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct + elim (aaa_inv_abst … HA) -HA #B #A #HW #HT #H destruct + elim (lifts_inv_bind1 … H0) -H0 #W0 #T0 #HW0 #HT0 #H destruct + @(acr_abst … H1RP H2RP) /2 width=10 by/ + #b3 #f3 #L3 #V3 #W3 #T3 #HL32 #HW03 #HT03 #H1B #H2B + elim (drops_lsubc_trans … H1RP … HL32 … HL20) -L2 #L2 #HL32 #HL20 + lapply (aaa_lifts … HW … (f3∘f) L2 … W3 ?) -HW + [4: |*: /2 width=8 by drops_trans, lifts_trans/ ] #HW3 + @(IH … ((⫯f3)∘⫯f) … (L2. ⓛW3)) -IH + /4 width=12 by lsubc_beta, drops_trans, drops_skip, lifts_trans, ext2_pair/ +| #V #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct + elim (aaa_inv_appl … HA) -HA #B #HV #HT + elim (lifts_inv_flat1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct + lapply (IH … HT … HL01 … HT0 … HL20) -HT -HT0 + /3 width=10 by drops_refl, lifts_refl/ +| #W #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct + elim (aaa_inv_cast … HA) -HA #HW #HT + elim (lifts_inv_flat1 … H0) -H0 #W0 #T0 #HW0 #HT0 #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (s7 … HA G L2 (Ⓔ)) /3 width=10 by/ +] +qed. + +(* Basic_1: was: sc3_arity *) +lemma acr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L, T⦄ ϵ[RP] 〚A〛. +/3 width=9 by drops_refl, lifts_refl, acr_aaa_csubc_lifts/ qed. + +lemma gcr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → RP G L T. +#RR #RS #RP #H1RP #H2RP #G #L #T #A #HT +lapply (acr_gcr … H1RP H2RP A) #HA +@(s1 … HA) /2 width=4 by acr_aaa/ +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/gcp_cr.ma b/matita/matita/contribs/lambdadelta/static_2/static/gcp_cr.ma new file mode 100644 index 000000000..5a5d9ee22 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/gcp_cr.ma @@ -0,0 +1,177 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/ineint_5.ma". +include "static_2/syntax/aarity.ma". +include "static_2/relocation/lifts_simple.ma". +include "static_2/relocation/lifts_lifts_vector.ma". +include "static_2/relocation/drops_drops.ma". +include "static_2/static/gcp.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +(* Note: this is Girard's CR1 *) +definition S1 ≝ λRP,C:candidate. + ∀G,L,T. C G L T → RP G L T. + +(* Note: this is Tait's iii, or Girard's CR4 *) +definition S2 ≝ λRR:relation4 genv lenv term term. λRS:relation term. λRP,C:candidate. + ∀G,L,Vs. all … (RP G L) Vs → + ∀T. 𝐒⦃T⦄ → NF … (RR G L) RS T → C G L (ⒶVs.T). + +(* Note: this generalizes Tait's ii *) +definition S3 ≝ λC:candidate. + ∀a,G,L,Vs,V,T,W. + C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T). + +definition S4 ≝ λRP,C:candidate. + ∀G,L,Vs. all … (RP G L) Vs → ∀s. C G L (ⒶVs.⋆s). + +definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i. + C G L (ⒶVs.V2) → ⬆*[↑i] V1 ≘ V2 → + ⬇*[i] L ≘ K.ⓑ{I}V1 → C G L (ⒶVs.#i). + +definition S6 ≝ λRP,C:candidate. + ∀G,L,V1b,V2b. ⬆*[1] V1b ≘ V2b → + ∀a,V,T. C G (L.ⓓV) (ⒶV2b.T) → RP G L V → C G L (ⒶV1b.ⓓ{a}V.T). + +definition S7 ≝ λC:candidate. + ∀G,L,Vs,T,W. C G L (ⒶVs.T) → C G L (ⒶVs.W) → C G L (ⒶVs.ⓝW.T). + +(* requirements for the generic reducibility candidate *) +record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate) : Prop ≝ +{ s1: S1 RP C; + s2: S2 RR RS RP C; + s3: S3 C; + s4: S4 RP C; + s5: S5 C; + s6: S6 RP C; + s7: S7 C +}. + +(* the functional construction for candidates *) +definition cfun: candidate → candidate → candidate ≝ + λC1,C2,G,K,T. ∀f,L,W,U. + ⬇*[Ⓕ, f] L ≘ K → ⬆*[f] T ≘ U → C1 G L W → C2 G L (ⓐW.U). + +(* the reducibility candidate associated to an atomic arity *) +rec definition acr (RP:candidate) (A:aarity) on A: candidate ≝ +match A with +[ AAtom ⇒ RP +| APair B A ⇒ cfun (acr RP B) (acr RP A) +]. + +interpretation + "reducibility candidate of an atomic arity (abstract)" + 'InEInt RP G L T A = (acr RP A G L T). + +(* Basic properties *********************************************************) + +(* Note: this requires Ⓕ-slicing in cfun since b is unknown in d_liftable_1 *) +(* Note: this requires multiple relocation *) +(* Basic 1: includes: sc3_lift *) +(* Basic 2A1: includes: gcr_lift *) +(* Basic 2A1: note: gcr_lift should be acr_lift *) +(* Basic_1: was: sc3_lift1 *) +(* Basic 2A1: was: gcr_lifts *) +(* Basic 2A1: note: gcr_lifts should be acr_lifts *) +lemma acr_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. d_liftable1 (acr RP A G). +#RR #RS #RP #H #A #G elim A -A +[ /2 width=7 by cp2/ +| #B #A #HB #HA #K #T #HKT #b #f #L #HLK #U #HTU #f0 #L0 #W #U0 #HL0 #HU0 #HW + lapply (drops_trans … HL0 … HLK ??) [3:|*: // ] -L #HL0K + lapply (lifts_trans … HTU … HU0 ??) [3:|*: // ] -U #HTU0 + /2 width=3 by/ (**) (* full auto fails *) +] +qed-. + +(* Basic_1: was: + sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast +*) +lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀A. gcr RR RS RP (acr RP A). +#RR #RS #RP #H1RP #H2RP #A elim A -A // +#B #A #IHB #IHA @mk_gcr +[ #G #L #T #H + elim (cp1 … H1RP G L) #s #HK + lapply (s2 … IHB G L (Ⓔ) … HK) // #HB + lapply (H (𝐈𝐝) L (⋆s) T ? ? ?) -H + /3 width=6 by s1, cp3, drops_refl, lifts_refl/ +| #G #L #Vs #HVs #T #H1T #H2T #f #L0 #V0 #X #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct + lapply (s1 … IHB … HB) #HV0 + @(s2 … IHA … (V0⨮V0s)) /3 width=13 by cp0, gcp2_all, lifts_simple_dx, conj/ +| #p #G #L #Vs #U #T #W #HA #f #L0 #V0 #X #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct + elim (lifts_inv_flat1 … H0) -H0 #U0 #X #HU0 #HX #H destruct + elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct + @(s3 … IHA … (V0⨮V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/ +| #G #L #Vs #HVs #s #f #L0 #V0 #X #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct + >(lifts_inv_sort1 … H0) -X0 + lapply (s1 … IHB … HB) #HV0 + @(s4 … IHA … (V0⨮V0s)) /3 width=7 by gcp2_all, conj/ +| #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #f #L0 #V0 #X #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct + elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct + lapply (drops_trans … HL0 … HLK ??) [3: |*: // ] -HLK #H + elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK0 #HY + lapply (drops_tls_at … Hf … HY) -HY #HY + elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK0 #HZ #H destruct + elim (liftsb_inv_pair_sn … HZ) -HZ #W1 #HVW1 #H destruct + elim (lifts_total W1 (𝐔❴↑j❵)) #W2 #HW12 + lapply (lifts_trans … HVW1 … HW12 ??) -HVW1 [3: |*: // ] #H + lapply (lifts_conf … HV12 … H f ?) -V1 [ /2 width=3 by after_uni_succ_sn/ ] #HVW2 + @(s5 … IHA … (V0⨮V0s) … HW12) /3 width=4 by drops_inv_gen, lifts_applv/ +| #G #L #V1s #V2s #HV12s #p #V #T #HA #HV #f #L0 #V10 #X #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V10s #X0 #HV10s #H0 #H destruct + elim (lifts_inv_bind1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct + elim (lifts_total V10 (𝐔❴1❵)) #V20 #HV120 + elim (liftsv_total (𝐔❴1❵) V10s) #V20s #HV120s + @(s6 … IHA … (V10⨮V10s) (V20⨮V20s)) /3 width=7 by cp2, liftsv_cons/ + @(HA … (⫯f)) /3 width=2 by drops_skip, ext2_pair/ + [ @lifts_applv // + lapply (liftsv_trans … HV10s … HV120s ??) -V10s [3: |*: // ] #H + elim (liftsv_split_trans … H (𝐔❴1❵) (⫯f)) /2 width=1 by after_uni_one_sn/ #V10s #HV10s #HV120s + >(liftsv_mono … HV12s … HV10s) -V1s // + | @(acr_lifts … H1RP … HB … HV120) /3 width=2 by drops_refl, drops_drop/ + ] +| #G #L #Vs #T #W #HA #HW #f #L0 #V0 #X #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct + elim (lifts_inv_flat1 … H0) -H0 #W0 #T0 #HW0 #HT0 #H destruct + @(s7 … IHA … (V0⨮V0s)) /3 width=5 by lifts_applv/ +] +qed. + +lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀p,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → ( + ∀b,f,L0,V0,W0,T0. ⬇*[b, f] L0 ≘ L → ⬆*[f] W ≘ W0 → ⬆*[⫯f] T ≘ T0 → + ⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛 + ) → + ⦃G, L, ⓛ{p}W.T⦄ ϵ[RP] 〚②B.A〛. +#RR #RS #RP #H1RP #H2RP #p #G #L #W #T #A #B #HW #HA #f #L0 #V0 #X #HL0 #H #HB +lapply (acr_gcr … H1RP H2RP A) #HCA +lapply (acr_gcr … H1RP H2RP B) #HCB +elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +lapply (acr_lifts … H1RP … HW … HL0 … HW0) -HW #HW0 +lapply (s3 … HCA … p G L0 (Ⓔ)) #H @H -H +lapply (s6 … HCA G L0 (Ⓔ) (Ⓔ) ?) // #H @H -H +[ @(HA … HL0) // +| lapply (s1 … HCB) -HCB #HCB + lapply (s7 … H2RP G L0 (Ⓔ)) /3 width=1 by/ +] +qed. + +(* Basic_1: removed theorems 2: sc3_arity_gen sc3_repl *) +(* Basic_1: removed local theorems 1: sc3_sn3_abst *) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsuba.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsuba.ma new file mode 100644 index 000000000..7277086ac --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsuba.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/lrsubeqa_3.ma". +include "static_2/static/aaa.ma". + +(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) + +inductive lsuba (G:genv): relation lenv ≝ +| lsuba_atom: lsuba G (⋆) (⋆) +| lsuba_bind: ∀I,L1,L2. lsuba G L1 L2 → lsuba G (L1.ⓘ{I}) (L2.ⓘ{I}) +| lsuba_beta: ∀L1,L2,W,V,A. ⦃G, L1⦄ ⊢ ⓝW.V ⁝ A → ⦃G, L2⦄ ⊢ W ⁝ A → + lsuba G L1 L2 → lsuba G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (atomic arity assignment)" + 'LRSubEqA G L1 L2 = (lsuba G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsuba_inv_atom1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 = ⋆ → L2 = ⋆. +#G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #_ #H destruct +| #L1 #L2 #W #V #A #_ #_ #_ #H destruct +] +qed-. + +lemma lsuba_inv_atom1: ∀G,L2. G ⊢ ⋆ ⫃⁝ L2 → L2 = ⋆. +/2 width=4 by lsuba_inv_atom1_aux/ qed-. + +fact lsuba_inv_bind1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K1. L1 = K1.ⓘ{I} → + (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓘ{I}) ∨ + ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃⁝ K2 & I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW. +#G #L1 #L2 * -L1 -L2 +[ #J #K1 #H destruct +| #I #L1 #L2 #HL12 #J #K1 #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K1 #H destruct /3 width=9 by ex5_4_intro, or_intror/ +] +qed-. + +lemma lsuba_inv_bind1: ∀I,G,K1,L2. G ⊢ K1.ⓘ{I} ⫃⁝ L2 → + (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓘ{I}) ∨ + ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & + I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW. +/2 width=3 by lsuba_inv_bind1_aux/ qed-. + +fact lsuba_inv_atom2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L2 = ⋆ → L1 = ⋆. +#G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #_ #H destruct +| #L1 #L2 #W #V #A #_ #_ #_ #H destruct +] +qed-. + +lemma lsubc_inv_atom2: ∀G,L1. G ⊢ L1 ⫃⁝ ⋆ → L1 = ⋆. +/2 width=4 by lsuba_inv_atom2_aux/ qed-. + +fact lsuba_inv_bind2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K2. L2 = K2.ⓘ{I} → + (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓘ{I}) ∨ + ∃∃K1,V,W, A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃⁝ K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V. +#G #L1 #L2 * -L1 -L2 +[ #J #K2 #H destruct +| #I #L1 #L2 #HL12 #J #K2 #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K2 #H destruct /3 width=9 by ex5_4_intro, or_intror/ +] +qed-. + +lemma lsuba_inv_bind2: ∀I,G,L1,K2. G ⊢ L1 ⫃⁝ K2.ⓘ{I} → + (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓘ{I}) ∨ + ∃∃K1,V,W,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & + I = BPair Abst W & L1 = K1.ⓓⓝW.V. +/2 width=3 by lsuba_inv_bind2_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma lsuba_refl: ∀G,L. G ⊢ L ⫃⁝ L. +#G #L elim L -L /2 width=1 by lsuba_atom, lsuba_bind/ +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsuba_aaa.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_aaa.ma new file mode 100644 index 000000000..d03aecd11 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_aaa.ma @@ -0,0 +1,54 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/aaa_aaa.ma". +include "static_2/static/lsuba.ma". + +(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) + +(* Properties with atomic arity assignment **********************************) + +lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G, L1⦄ ⊢ V ⁝ A → + ∀L2. G ⊢ L1 ⫃⁝ L2 → ⦃G, L2⦄ ⊢ V ⁝ A. +#G #L1 #V #A #H elim H -G -L1 -V -A +[ // +| #I #G #L1 #V #A #HA #IH #L2 #H + elim (lsuba_inv_bind1 … H) -H * /3 width=1 by aaa_zero/ + #L0 #W0 #V0 #A0 #HV0 #HW0 #HL10 #H1 #H2 destruct + lapply (aaa_mono … HV0 … HA) #H destruct -V0 -L1 /2 width=1 by aaa_zero/ +| #I #G #K1 #A #i #_ #IH #L2 #H + elim (lsuba_inv_bind1 … H) -H * /3 width=1 by aaa_lref/ +| /4 width=2 by lsuba_bind, aaa_abbr/ +| /4 width=1 by lsuba_bind, aaa_abst/ +| /3 width=3 by aaa_appl/ +| /3 width=1 by aaa_cast/ +] +qed-. + +lemma lsuba_aaa_trans: ∀G,L2,V,A. ⦃G, L2⦄ ⊢ V ⁝ A → + ∀L1. G ⊢ L1 ⫃⁝ L2 → ⦃G, L1⦄ ⊢ V ⁝ A. +#G #L2 #V #A #H elim H -G -L2 -V -A +[ // +| #I #G #L2 #V #A #HA #IH #L1 #H + elim (lsuba_inv_bind2 … H) -H * /3 width=1 by aaa_zero/ + #L0 #V0 #W0 #A0 #HV0 #HW0 #HL02 #H1 #H2 destruct + lapply (aaa_mono … HW0 … HA) #H destruct -L2 /2 width=1 by aaa_zero/ +| #I #G #K2 #A #i #_ #IH #L1 #H + elim (lsuba_inv_bind2 … H) -H * /3 width=1 by aaa_lref/ +| /4 width=2 by lsuba_bind, aaa_abbr/ +| /4 width=1 by lsuba_bind, aaa_abst/ +| /3 width=3 by aaa_appl/ +| /3 width=1 by aaa_cast/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsuba_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_drops.ma new file mode 100644 index 000000000..bfec752e7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_drops.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops.ma". +include "static_2/static/lsuba.ma". + +(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) + +(* Properties with generic slicing for local environments *******************) + +(* Note: the premise 𝐔⦃f⦄ cannot be removed *) +(* Basic_2A1: includes: lsuba_drop_O1_conf *) +lemma lsuba_drops_conf_isuni: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → + ∀b,f,K1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K1 → + ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇*[b, f] L2 ≘ K2. +#G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #HL12 #IH #b #f #K1 #Hf #H + elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct -IH + /3 width=3 by lsuba_bind, drops_refl, ex2_intro/ + | #g #Hg #HLK1 #H destruct -HL12 + elim (IH … Hg HLK1) -L1 -Hg /3 width=3 by drops_drop, ex2_intro/ + ] +| #L1 #L2 #W #V #A #HV #HW #HL12 #IH #b #f #K1 #Hf #H + elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct -IH + /3 width=3 by drops_refl, lsuba_beta, ex2_intro/ + | #g #Hg #HLK1 #H destruct -HL12 + elim (IH … Hg HLK1) -L1 -Hg /3 width=3 by drops_drop, ex2_intro/ + ] +] +qed-. + +(* Note: the premise 𝐔⦃f⦄ cannot be removed *) +(* Basic_2A1: includes: lsuba_drop_O1_trans *) +lemma lsuba_drops_trans_isuni: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → + ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2 → + ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇*[b, f] L1 ≘ K1. +#G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H + elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct -IH + /3 width=3 by lsuba_bind, drops_refl, ex2_intro/ + | #g #Hg #HLK2 #H destruct -HL12 + elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ + ] +| #L1 #L2 #W #V #A #HV #HW #HL12 #IH #b #f #K2 #Hf #H + elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct -IH + /3 width=3 by drops_refl, lsuba_beta, ex2_intro/ + | #g #Hg #HLK2 #H destruct -HL12 + elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsuba_lsuba.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_lsuba.ma new file mode 100644 index 000000000..fd353c365 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_lsuba.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsuba_aaa.ma". + +(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) + +(* Main properties **********************************************************) + +theorem lsuba_trans: ∀G. Transitive … (lsuba G). +#G #L1 #L #H elim H -L1 -L +[ #X #H >(lsuba_inv_atom1 … H) -H // +| #I #L1 #L #HL1 #IHL1 #Y #H + elim (lsuba_inv_bind1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=1 by lsuba_bind/ + | #W #V #A #HV #HW #HL2 #H1 #H2 destruct + /3 width=3 by lsuba_beta, lsuba_aaa_trans/ + ] +| #L1 #L #W #V #A #HV #HW #HL1 #IHL1 #Y #H + elim (lsuba_inv_bind1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=5 by lsuba_beta, lsuba_aaa_conf/ + | #W0 #V0 #A0 #_ #_ #_ #H destruct + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsuba_lsubr.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_lsubr.ma new file mode 100644 index 000000000..2be1bbe40 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsuba_lsubr.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsubr.ma". +include "static_2/static/lsuba.ma". + +(* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************) + +(* Forward lemmas with restricted refinement for local environments *********) + +lemma lsuba_fwd_lsubr: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 ⫃ L2. +#G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_bind, lsubr_beta/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubc.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubc.ma new file mode 100644 index 000000000..d7d1c565a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubc.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/lrsubeqc_4.ma". +include "static_2/static/aaa.ma". +include "static_2/static/gcp_cr.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +inductive lsubc (RP) (G): relation lenv ≝ +| lsubc_atom: lsubc RP G (⋆) (⋆) +| lsubc_bind: ∀I,L1,L2. lsubc RP G L1 L2 → lsubc RP G (L1.ⓘ{I}) (L2.ⓘ{I}) +| lsubc_beta: ∀L1,L2,V,W,A. ⦃G, L1, V⦄ ϵ[RP] 〚A〛 → ⦃G, L1, W⦄ ϵ[RP] 〚A〛 → ⦃G, L2⦄ ⊢ W ⁝ A → + lsubc RP G L1 L2 → lsubc RP G (L1. ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (generic reducibility)" + 'LRSubEqC RP G L1 L2 = (lsubc RP G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsubc_inv_atom1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 = ⋆ → L2 = ⋆. +#RP #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #_ #H destruct +| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: csubc_gen_sort_r *) +lemma lsubc_inv_atom1: ∀RP,G,L2. G ⊢ ⋆ ⫃[RP] L2 → L2 = ⋆. +/2 width=5 by lsubc_inv_atom1_aux/ qed-. + +fact lsubc_inv_bind1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K1. L1 = K1.ⓘ{I} → + (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓘ{I}) ∨ + ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L2 = K2. ⓛW & I = BPair Abbr (ⓝW.V). +#RP #G #L1 #L2 * -L1 -L2 +[ #I #K1 #H destruct +| #J #L1 #L2 #HL12 #I #K1 #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K1 #H destruct + /3 width=10 by ex6_4_intro, or_intror/ +] +qed-. + +(* Basic_1: was: csubc_gen_head_r *) +lemma lsubc_inv_bind1: ∀RP,I,G,K1,L2. G ⊢ K1.ⓘ{I} ⫃[RP] L2 → + (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓘ{I}) ∨ + ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L2 = K2.ⓛW & I = BPair Abbr (ⓝW.V). +/2 width=3 by lsubc_inv_bind1_aux/ qed-. + +fact lsubc_inv_atom2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L2 = ⋆ → L1 = ⋆. +#RP #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #_ #H destruct +| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: csubc_gen_sort_l *) +lemma lsubc_inv_atom2: ∀RP,G,L1. G ⊢ L1 ⫃[RP] ⋆ → L1 = ⋆. +/2 width=5 by lsubc_inv_atom2_aux/ qed-. + +fact lsubc_inv_bind2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K2. L2 = K2.ⓘ{I} → + (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1. ⓘ{I}) ∨ + ∃∃K1,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L1 = K1.ⓓⓝW.V & I = BPair Abst W. +#RP #G #L1 #L2 * -L1 -L2 +[ #I #K2 #H destruct +| #J #L1 #L2 #HL12 #I #K2 #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K2 #H destruct + /3 width=10 by ex6_4_intro, or_intror/ +] +qed-. + +(* Basic_1: was just: csubc_gen_head_l *) +lemma lsubc_inv_bind2: ∀RP,I,G,L1,K2. G ⊢ L1 ⫃[RP] K2.ⓘ{I} → + (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1.ⓘ{I}) ∨ + ∃∃K1,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L1 = K1.ⓓⓝW.V & I = BPair Abst W. +/2 width=3 by lsubc_inv_bind2_aux/ qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was just: csubc_refl *) +lemma lsubc_refl: ∀RP,G,L. G ⊢ L ⫃[RP] L. +#RP #G #L elim L -L /2 width=1 by lsubc_bind/ +qed. + +(* Basic_1: removed theorems 3: + csubc_clear_conf csubc_getl_conf csubc_csuba +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubc_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubc_drops.ma new file mode 100644 index 000000000..9fe4888bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubc_drops.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/aaa_drops.ma". +include "static_2/static/lsubc.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Properties with generic slicing ******************************************) + +(* Note: the premise 𝐔⦃f⦄ cannot be removed *) +(* Basic_1: includes: csubc_drop_conf_O *) +(* Basic_2A1: includes: lsubc_drop_O1_trans *) +lemma lsubc_drops_trans_isuni: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → + ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2 → + ∃∃K1. ⬇*[b, f] L1 ≘ K1 & G ⊢ K1 ⫃[RP] K2. +#RP #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H + elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct -IH + /3 width=3 by lsubc_bind, drops_refl, ex2_intro/ + | #g #Hg #HLK2 #H destruct -HL12 + elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ + ] +| #L1 #L2 #V #W #A #HV #H1W #H2W #HL12 #IH #b #f #K2 #Hf #H + elim (drops_inv_bind1_isuni … Hf H) -Hf -H * + [ #Hf #H destruct -IH + /3 width=8 by drops_refl, lsubc_beta, ex2_intro/ + | #g #Hg #HLK2 #H destruct -HL12 + elim (IH … Hg HLK2) -L2 -Hg /3 width=3 by drops_drop, ex2_intro/ + ] +] +qed-. + +(* Basic_1: was: csubc_drop1_conf_rev *) +(* Basic_1: includes: csubc_drop_conf_rev *) +(* Basic_2A1: includes: drop_lsubc_trans *) +lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → + ∀b,f,G,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → + ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[b, f] L2 ≘ K2. +#RR #RS #RP #HR #b #f #G #L1 #K1 #H elim H -f -L1 -K1 +[ #f #Hf #Y #H lapply (lsubc_inv_atom1 … H) -H + #H destruct /4 width=3 by lsubc_atom, drops_atom, ex2_intro/ +| #f #I #L1 #K1 #_ #IH #K2 #HK12 elim (IH … HK12) -K1 + /3 width=5 by lsubc_bind, drops_drop, ex2_intro/ +| #f #Z #I #L1 #K1 #HLK1 #HZ #IH #Y #H elim (lsubc_inv_bind1 … H) -H * + [ #K2 #HK12 #H destruct -HLK1 + elim (IH … HK12) -K1 /3 width=5 by lsubc_bind, drops_skip, ex2_intro/ + | #K2 #V2 #W2 #A #HV2 #H1W2 #H2W2 #HK12 #H1 #H2 destruct + elim (liftsb_inv_pair_sn … HZ) -HZ #V1 #HV21 #H destruct + elim (lifts_inv_flat1 … HV21) -HV21 #W3 #V3 #HW23 #HV3 #H destruct + elim (IH … HK12) -IH -HK12 #K #HL1K #HK2 + lapply (acr_lifts … HR … HV2 … HLK1 … HV3) -HV2 + lapply (acr_lifts … HR … H1W2 … HLK1 … HW23) -H1W2 + /4 width=10 by lsubc_beta, aaa_lifts, drops_skip, ext2_pair, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubc_lsuba.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubc_lsuba.ma new file mode 100644 index 000000000..3c6c0a1c9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubc_lsuba.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsuba.ma". +include "static_2/static/gcp_aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Properties with lenv refinement for atomic arity assignment **************) + +lemma lsuba_lsubc: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → G ⊢ L1 ⫃[RP] L2. +#RR #RS #RP #H1RP #H2RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubc_bind/ +#L1 #L2 #W #V #A #H elim (aaa_inv_cast … H) -H /3 width=4 by acr_aaa, lsubc_beta/ +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubc_lsubr.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubc_lsubr.ma new file mode 100644 index 000000000..b6a3a6f43 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubc_lsubr.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsubr.ma". +include "static_2/static/lsubc.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Forward lemmas with restricted refinement for local environments *********) + +lemma lsubc_fwd_lsubr: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 ⫃ L2. +#RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_bind, lsubr_beta/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubf.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubf.ma new file mode 100644 index 000000000..3c69f7f52 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubf.ma @@ -0,0 +1,358 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/lrsubeqf_4.ma". +include "ground_2/relocation/nstream_sor.ma". +include "static_2/static/frees.ma". + +(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) + +inductive lsubf: relation4 lenv rtmap lenv rtmap ≝ +| lsubf_atom: ∀f1,f2. f1 ≡ f2 → lsubf (⋆) f1 (⋆) f2 +| lsubf_push: ∀f1,f2,I1,I2,L1,L2. lsubf L1 (f1) L2 (f2) → + lsubf (L1.ⓘ{I1}) (⫯f1) (L2.ⓘ{I2}) (⫯f2) +| lsubf_bind: ∀f1,f2,I,L1,L2. lsubf L1 f1 L2 f2 → + lsubf (L1.ⓘ{I}) (↑f1) (L2.ⓘ{I}) (↑f2) +| lsubf_beta: ∀f,f0,f1,f2,L1,L2,W,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 → + lsubf L1 f0 L2 f2 → lsubf (L1.ⓓⓝW.V) (↑f1) (L2.ⓛW) (↑f2) +| lsubf_unit: ∀f,f0,f1,f2,I1,I2,L1,L2,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 → + lsubf L1 f0 L2 f2 → lsubf (L1.ⓑ{I1}V) (↑f1) (L2.ⓤ{I2}) (↑f2) +. + +interpretation + "local environment refinement (context-sensitive free variables)" + 'LRSubEqF L1 f1 L2 f2 = (lsubf L1 f1 L2 f2). + +(* Basic inversion lemmas ***************************************************) + +fact lsubf_inv_atom1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 = ⋆ → + f1 ≡ f2 ∧ L2 = ⋆. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ /2 width=1 by conj/ +| #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct +| #f1 #f2 #I #L1 #L2 #_ #H destruct +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #H destruct +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #H destruct +] +qed-. + +lemma lsubf_inv_atom1: ∀f1,f2,L2. ⦃⋆, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → f1 ≡ f2 ∧ L2 = ⋆. +/2 width=3 by lsubf_inv_atom1_aux/ qed-. + +fact lsubf_inv_push1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀g1,I1,K1. f1 = ⫯g1 → L1 = K1.ⓘ{I1} → + ∃∃g2,I2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ #f1 #f2 #_ #g1 #J1 #K1 #_ #H destruct +| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J1 #K1 #H1 #H2 destruct + <(injective_push … H1) -g1 /2 width=6 by ex3_3_intro/ +| #f1 #f2 #I #L1 #L2 #_ #g1 #J1 #K1 #H elim (discr_next_push … H) +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g1 #J1 #K1 #H elim (discr_next_push … H) +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g1 #J1 #K1 #H elim (discr_next_push … H) +] +qed-. + +lemma lsubf_inv_push1: ∀g1,f2,I1,K1,L2. ⦃K1.ⓘ{I1}, ⫯g1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∃∃g2,I2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}. +/2 width=6 by lsubf_inv_push1_aux/ qed-. + +fact lsubf_inv_pair1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀g1,I,K1,X. f1 = ↑g1 → L1 = K1.ⓑ{I}X → + ∨∨ ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X + | ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & + I = Abbr & X = ⓝW.V & L2 = K2.ⓛW + | ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & + L2 = K2.ⓤ{J}. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ #f1 #f2 #_ #g1 #J #K1 #X #_ #H destruct +| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #X #H elim (discr_push_next … H) +| #f1 #f2 #I #L1 #L2 #H12 #g1 #J #K1 #X #H1 #H2 destruct + <(injective_next … H1) -g1 /3 width=5 by or3_intro0, ex3_2_intro/ +| #f #f0 #f1 #f2 #L1 #L2 #W #V #Hf #Hf1 #H12 #g1 #J #K1 #X #H1 #H2 destruct + <(injective_next … H1) -g1 /3 width=12 by or3_intro1, ex7_6_intro/ +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #Hf #Hf1 #H12 #g1 #J #K1 #X #H1 #H2 destruct + <(injective_next … H1) -g1 /3 width=10 by or3_intro2, ex5_5_intro/ +] +qed-. + +lemma lsubf_inv_pair1: ∀g1,f2,I,K1,L2,X. ⦃K1.ⓑ{I}X, ↑g1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∨∨ ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X + | ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & + I = Abbr & X = ⓝW.V & L2 = K2.ⓛW + | ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & + L2 = K2.ⓤ{J}. +/2 width=5 by lsubf_inv_pair1_aux/ qed-. + +fact lsubf_inv_unit1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀g1,I,K1. f1 = ↑g1 → L1 = K1.ⓤ{I} → + ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ #f1 #f2 #_ #g1 #J #K1 #_ #H destruct +| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #H elim (discr_push_next … H) +| #f1 #f2 #I #L1 #L2 #H12 #g1 #J #K1 #H1 #H2 destruct + <(injective_next … H1) -g1 /2 width=5 by ex3_2_intro/ +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g1 #J #K1 #_ #H destruct +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g1 #J #K1 #_ #H destruct +] +qed-. + +lemma lsubf_inv_unit1: ∀g1,f2,I,K1,L2. ⦃K1.ⓤ{I}, ↑g1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}. +/2 width=5 by lsubf_inv_unit1_aux/ qed-. + +fact lsubf_inv_atom2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L2 = ⋆ → + f1 ≡ f2 ∧ L1 = ⋆. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ /2 width=1 by conj/ +| #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct +| #f1 #f2 #I #L1 #L2 #_ #H destruct +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #H destruct +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #H destruct +] +qed-. + +lemma lsubf_inv_atom2: ∀f1,f2,L1. ⦃L1, f1⦄ ⫃𝐅* ⦃⋆, f2⦄ → f1 ≡ f2 ∧ L1 = ⋆. +/2 width=3 by lsubf_inv_atom2_aux/ qed-. + +fact lsubf_inv_push2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀g2,I2,K2. f2 = ⫯g2 → L2 = K2.ⓘ{I2} → + ∃∃g1,I1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ #f1 #f2 #_ #g2 #J2 #K2 #_ #H destruct +| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J2 #K2 #H1 #H2 destruct + <(injective_push … H1) -g2 /2 width=6 by ex3_3_intro/ +| #f1 #f2 #I #L1 #L2 #_ #g2 #J2 #K2 #H elim (discr_next_push … H) +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g2 #J2 #K2 #H elim (discr_next_push … H) +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g2 #J2 #K2 #H elim (discr_next_push … H) +] +qed-. + +lemma lsubf_inv_push2: ∀f1,g2,I2,L1,K2. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, ⫯g2⦄ → + ∃∃g1,I1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}. +/2 width=6 by lsubf_inv_push2_aux/ qed-. + +fact lsubf_inv_pair2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀g2,I,K2,W. f2 = ↑g2 → L2 = K2.ⓑ{I}W → + ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W + | ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & + I = Abst & L1 = K1.ⓓⓝW.V. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ #f1 #f2 #_ #g2 #J #K2 #X #_ #H destruct +| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J #K2 #X #H elim (discr_push_next … H) +| #f1 #f2 #I #L1 #L2 #H12 #g2 #J #K2 #X #H1 #H2 destruct + <(injective_next … H1) -g2 /3 width=5 by ex3_2_intro, or_introl/ +| #f #f0 #f1 #f2 #L1 #L2 #W #V #Hf #Hf1 #H12 #g2 #J #K2 #X #H1 #H2 destruct + <(injective_next … H1) -g2 /3 width=10 by ex6_5_intro, or_intror/ +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #g2 #J #K2 #X #_ #H destruct +] +qed-. + +lemma lsubf_inv_pair2: ∀f1,g2,I,L1,K2,W. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓑ{I}W, ↑g2⦄ → + ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W + | ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & + I = Abst & L1 = K1.ⓓⓝW.V. +/2 width=5 by lsubf_inv_pair2_aux/ qed-. + +fact lsubf_inv_unit2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀g2,I,K2. f2 = ↑g2 → L2 = K2.ⓤ{I} → + ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I} + | ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & + L1 = K1.ⓑ{J}V. +#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2 +[ #f1 #f2 #_ #g2 #J #K2 #_ #H destruct +| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J #K2 #H elim (discr_push_next … H) +| #f1 #f2 #I #L1 #L2 #H12 #g2 #J #K2 #H1 #H2 destruct + <(injective_next … H1) -g2 /3 width=5 by ex3_2_intro, or_introl/ +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #g2 #J #K2 #_ #H destruct +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #Hf #Hf1 #H12 #g2 #J #K2 #H1 #H2 destruct + <(injective_next … H1) -g2 /3 width=11 by ex5_6_intro, or_intror/ +] +qed-. + +lemma lsubf_inv_unit2: ∀f1,g2,I,L1,K2. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓤ{I}, ↑g2⦄ → + ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I} + | ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & + K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & + L1 = K1.ⓑ{J}V. +/2 width=5 by lsubf_inv_unit2_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lsubf_inv_atom: ∀f1,f2. ⦃⋆, f1⦄ ⫃𝐅* ⦃⋆, f2⦄ → f1 ≡ f2. +#f1 #f2 #H elim (lsubf_inv_atom1 … H) -H // +qed-. + +lemma lsubf_inv_push_sn: ∀g1,f2,I1,I2,K1,K2. ⦃K1.ⓘ{I1}, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, f2⦄ → + ∃∃g2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2. +#g1 #f2 #I #K1 #K2 #X #H elim (lsubf_inv_push1 … H) -H +#g2 #I #Y #H0 #H2 #H destruct /2 width=3 by ex2_intro/ +qed-. + +lemma lsubf_inv_bind_sn: ∀g1,f2,I,K1,K2. ⦃K1.ⓘ{I}, ↑g1⦄ ⫃𝐅* ⦃K2.ⓘ{I}, f2⦄ → + ∃∃g2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2. +#g1 #f2 * #I [2: #X ] #K1 #K2 #H +[ elim (lsubf_inv_pair1 … H) -H * + [ #z2 #Y2 #H2 #H #H0 destruct /2 width=3 by ex2_intro/ + | #z #z0 #z2 #Y2 #W #V #_ #_ #_ #_ #H0 #_ #H destruct + | #z #z0 #z2 #Z2 #Y2 #_ #_ #_ #_ #H destruct + ] +| elim (lsubf_inv_unit1 … H) -H + #z2 #Y2 #H2 #H #H0 destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma lsubf_inv_beta_sn: ∀g1,f2,K1,K2,V,W. ⦃K1.ⓓⓝW.V, ↑g1⦄ ⫃𝐅* ⦃K2.ⓛW, f2⦄ → + ∃∃g,g0,g2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2. +#g1 #f2 #K1 #K2 #V #W #H elim (lsubf_inv_pair1 … H) -H * +[ #z2 #Y2 #_ #_ #H destruct +| #z #z0 #z2 #Y2 #X0 #X #H02 #Hz #Hg1 #H #_ #H0 #H1 destruct + /2 width=7 by ex4_3_intro/ +| #z #z0 #z2 #Z2 #Y2 #_ #_ #_ #_ #H destruct +] +qed-. + +lemma lsubf_inv_unit_sn: ∀g1,f2,I,J,K1,K2,V. ⦃K1.ⓑ{I}V, ↑g1⦄ ⫃𝐅* ⦃K2.ⓤ{J}, f2⦄ → + ∃∃g,g0,g2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2. +#g1 #f2 #I #J #K1 #K2 #V #H elim (lsubf_inv_pair1 … H) -H * +[ #z2 #Y2 #_ #_ #H destruct +| #z #z0 #z2 #Y2 #X0 #X #_ #_ #_ #_ #_ #_ #H destruct +| #z #z0 #z2 #Z2 #Y2 #H02 #Hz #Hg1 #H0 #H1 destruct + /2 width=7 by ex4_3_intro/ +] +qed-. + +lemma lsubf_inv_refl: ∀L,f1,f2. ⦃L,f1⦄ ⫃𝐅* ⦃L,f2⦄ → f1 ≡ f2. +#L elim L -L /2 width=1 by lsubf_inv_atom/ +#L #I #IH #f1 #f2 #H12 +elim (pn_split f1) * #g1 #H destruct +[ elim (lsubf_inv_push_sn … H12) | elim (lsubf_inv_bind_sn … H12) ] -H12 +#g2 #H12 #H destruct /3 width=5 by eq_next, eq_push/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubf_fwd_bind_tl: ∀f1,f2,I,L1,L2. + ⦃L1.ⓘ{I}, f1⦄ ⫃𝐅* ⦃L2.ⓘ{I}, f2⦄ → ⦃L1, ⫱f1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄. +#f1 #f2 #I #L1 #L2 #H +elim (pn_split f1) * #g1 #H0 destruct +[ elim (lsubf_inv_push_sn … H) | elim (lsubf_inv_bind_sn … H) ] -H +#g2 #H12 #H destruct // +qed-. + +lemma lsubf_fwd_isid_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → 𝐈⦃f2⦄ → 𝐈⦃f1⦄. +#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 +[ /2 width=3 by isid_eq_repl_fwd/ +| /4 width=3 by isid_inv_push, isid_push/ +| #f1 #f2 #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) -H // +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // +] +qed-. + +lemma lsubf_fwd_isid_sn: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → 𝐈⦃f1⦄ → 𝐈⦃f2⦄. +#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 +[ /2 width=3 by isid_eq_repl_back/ +| /4 width=3 by isid_inv_push, isid_push/ +| #f1 #f2 #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) -H // +| #f #f0 #f1 #f2 #L1 #L2 #W #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // +| #f #f0 #f1 #f2 #I1 #I2 #L1 #L2 #V #_ #_ #_ #_ #H elim (isid_inv_next … H) -H // +] +qed-. + +lemma lsubf_fwd_sle: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → f2 ⊆ f1. +#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 +/3 width=5 by sor_inv_sle_sn_trans, sle_next, sle_push, sle_refl_eq, eq_sym/ +qed-. + +(* Basic properties *********************************************************) + +axiom lsubf_eq_repl_back1: ∀f2,L1,L2. eq_repl_back … (λf1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). + +lemma lsubf_eq_repl_fwd1: ∀f2,L1,L2. eq_repl_fwd … (λf1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). +#f2 #L1 #L2 @eq_repl_sym /2 width=3 by lsubf_eq_repl_back1/ +qed-. + +axiom lsubf_eq_repl_back2: ∀f1,L1,L2. eq_repl_back … (λf2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). + +lemma lsubf_eq_repl_fwd2: ∀f1,L1,L2. eq_repl_fwd … (λf2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄). +#f1 #L1 #L2 @eq_repl_sym /2 width=3 by lsubf_eq_repl_back2/ +qed-. + +lemma lsubf_refl: bi_reflexive … lsubf. +#L elim L -L /2 width=1 by lsubf_atom, eq_refl/ +#L #I #IH #f elim (pn_split f) * #g #H destruct +/2 width=1 by lsubf_push, lsubf_bind/ +qed. + +lemma lsubf_refl_eq: ∀f1,f2,L. f1 ≡ f2 → ⦃L, f1⦄ ⫃𝐅* ⦃L, f2⦄. +/2 width=3 by lsubf_eq_repl_back2/ qed. + +lemma lsubf_bind_tl_dx: ∀g1,f2,I,L1,L2. ⦃L1, g1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ → + ∃∃f1. ⦃L1.ⓘ{I}, f1⦄ ⫃𝐅* ⦃L2.ⓘ{I}, f2⦄ & g1 = ⫱f1. +#g1 #f2 #I #L1 #L2 #H +elim (pn_split f2) * #g2 #H2 destruct +@ex2_intro [1,2,4,5: /2 width=2 by lsubf_push, lsubf_bind/ ] // (**) (* constructor needed *) +qed-. + +lemma lsubf_beta_tl_dx: ∀f,f0,g1,L1,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ g1 → + ∀f2,L2,W. ⦃L1, f0⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ → + ∃∃f1. ⦃L1.ⓓⓝW.V, f1⦄ ⫃𝐅* ⦃L2.ⓛW, f2⦄ & ⫱f1 ⊆ g1. +#f #f0 #g1 #L1 #V #Hf #Hg1 #f2 +elim (pn_split f2) * #x2 #H2 #L2 #W #HL12 destruct +[ /3 width=4 by lsubf_push, sor_inv_sle_sn, ex2_intro/ +| @(ex2_intro … (↑g1)) /2 width=5 by lsubf_beta/ (**) (* full auto fails *) +] +qed-. + +(* Note: this might be moved *) +lemma lsubf_inv_sor_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + ∀f2l,f2r. f2l⋓f2r ≘ f2 → + ∃∃f1l,f1r. ⦃L1, f1l⦄ ⫃𝐅* ⦃L2, f2l⦄ & ⦃L1, f1r⦄ ⫃𝐅* ⦃L2, f2r⦄ & f1l⋓f1r ≘ f1. +#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 +[ /3 width=7 by sor_eq_repl_fwd3, ex3_2_intro/ +| #g1 #g2 #I1 #I2 #L1 #L2 #_ #IH #f2l #f2r #H + elim (sor_inv_xxp … H) -H [|*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct + elim (IH … Hg2) -g2 /3 width=11 by lsubf_push, sor_pp, ex3_2_intro/ +| #g1 #g2 #I #L1 #L2 #_ #IH #f2l #f2r #H + elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct + elim (IH … Hg2) -g2 /3 width=11 by lsubf_push, lsubf_bind, sor_np, sor_pn, sor_nn, ex3_2_intro/ +| #g #g0 #g1 #g2 #L1 #L2 #W #V #Hg #Hg1 #_ #IH #f2l #f2r #H + elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct + elim (IH … Hg2) -g2 #g1l #g1r #Hl #Hr #Hg0 + [ lapply (sor_comm_23 … Hg0 Hg1 ?) -g0 [3: |*: // ] #Hg1 + /3 width=11 by lsubf_push, lsubf_beta, sor_np, ex3_2_intro/ + | lapply (sor_assoc_dx … Hg1 … Hg0 ??) -g0 [3: |*: // ] #Hg1 + /3 width=11 by lsubf_push, lsubf_beta, sor_pn, ex3_2_intro/ + | lapply (sor_distr_dx … Hg0 … Hg1) -g0 [5: |*: // ] #Hg1 + /3 width=11 by lsubf_beta, sor_nn, ex3_2_intro/ + ] +| #g #g0 #g1 #g2 #I1 #I2 #L1 #L2 #V #Hg #Hg1 #_ #IH #f2l #f2r #H + elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g2l #g2r #Hg2 #Hl #Hr destruct + elim (IH … Hg2) -g2 #g1l #g1r #Hl #Hr #Hg0 + [ lapply (sor_comm_23 … Hg0 Hg1 ?) -g0 [3: |*: // ] #Hg1 + /3 width=11 by lsubf_push, lsubf_unit, sor_np, ex3_2_intro/ + | lapply (sor_assoc_dx … Hg1 … Hg0 ??) -g0 [3: |*: // ] #Hg1 + /3 width=11 by lsubf_push, lsubf_unit, sor_pn, ex3_2_intro/ + | lapply (sor_distr_dx … Hg0 … Hg1) -g0 [5: |*: // ] #Hg1 + /3 width=11 by lsubf_unit, sor_nn, ex3_2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubf_frees.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubf_frees.ma new file mode 100644 index 000000000..7a39036b5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubf_frees.ma @@ -0,0 +1,51 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsubf.ma". + +(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) + +(* Properties with context-sensitive free variables *************************) + +lemma lsubf_frees_trans: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 → + ∀f1,L1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 ⊢ 𝐅*⦃T⦄ ≘ f1. +#f2 #L2 #T #H elim H -f2 -L2 -T +[ /3 width=5 by lsubf_fwd_isid_dx, frees_sort/ +| #f2 #i #Hf2 #g1 #Y1 #H + elim (lsubf_inv_atom2 … H) -H #Hg1 #H destruct + elim (eq_inv_pushs_dx … Hg1) -Hg1 #g #Hg #H destruct + elim (eq_inv_xn … Hg) -Hg + /3 width=3 by frees_atom, isid_eq_repl_fwd/ +| #f2 #I #K2 #W #_ #IH #g1 #Y1 #H elim (lsubf_inv_pair2 … H) -H * + [ #f1 #K1 #H12 #H1 #H2 destruct /3 width=1 by frees_pair/ + | #f #f0 #f1 #K1 #V #H12 #Hf #Hf1 #H1 #H2 #H3 destruct + /4 width=5 by frees_pair, frees_flat/ + ] +| #f2 #I #L2 #Hf2 #g1 #Y1 #H elim (lsubf_inv_unit2 … H) -H * + [ #f1 #L1 #H12 #H1 #H2 destruct + /3 width=5 by lsubf_fwd_isid_dx, frees_unit/ + | #f #f0 #f1 #J #L1 #V #H12 #Hf #Hf1 #H1 #H2 destruct + /5 width=9 by lsubf_fwd_isid_dx, frees_eq_repl_back, frees_pair, sor_isid_inv_sn/ + ] +| #f2 #I #L2 #i #_ #IH #g1 #L1 #H elim (lsubf_inv_push2 … H) -H + /3 width=1 by frees_lref/ +| /3 width=5 by lsubf_fwd_isid_dx, frees_gref/ +| #f2V #f2T #f2 #p #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #f1 #L1 #H12 + elim (lsubf_inv_sor_dx … H12 … Hf2) -f2 #f1V #g1T #HV #HT #Hf1 + elim (lsubf_bind_tl_dx … (BPair I V) … HT) -HT #f1T #HT #H destruct + /3 width=5 by frees_bind/ +| #f2V #f2T #f2 #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #f1 #L1 #H12 + elim (lsubf_inv_sor_dx … H12 … Hf2) -f2 /3 width=5 by frees_flat/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubf.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubf.ma new file mode 100644 index 000000000..79f33abda --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubf.ma @@ -0,0 +1,83 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/frees_frees.ma". +include "static_2/static/lsubf.ma". + +(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) + +(* Main properties **********************************************************) + +theorem lsubf_sor: ∀K,L,g1,f1. ⦃K, g1⦄ ⫃𝐅* ⦃L, f1⦄ → + ∀g2,f2. ⦃K, g2⦄ ⫃𝐅* ⦃L, f2⦄ → + ∀g. g1 ⋓ g2 ≘ g → ∀f. f1 ⋓ f2 ≘ f → ⦃K, g⦄ ⫃𝐅* ⦃L, f⦄. +#K elim K -K +[ #L #g1 #f1 #H1 #g2 #f2 #H2 #g #Hg #f #Hf + elim (lsubf_inv_atom1 … H1) -H1 #H1 #H destruct + lapply (lsubf_inv_atom … H2) -H2 #H2 + /5 width=4 by lsubf_atom, sor_mono, sor_eq_repl_back2, sor_eq_repl_back1/ +| #K #J #IH #L #g1 #f1 #H1 #g2 #f2 #H2 #g #Hg #f #Hf + elim (pn_split g1) * #y1 #H destruct + elim (pn_split g2) * #y2 #H destruct + [ elim (sor_inv_ppx … Hg) -Hg [|*: // ] #y #Hy #H destruct + elim (lsubf_inv_push1 … H1) -H1 #x1 #Z1 #Y1 #H1 #H #H0 destruct + elim (lsubf_inv_push_sn … H2) -H2 #x2 #H2 #H destruct + elim (sor_inv_ppx … Hf) -Hf [|*: // ] #x #Hx #H destruct + /3 width=8 by lsubf_push/ + | elim (sor_inv_pnx … Hg) -Hg [|*: // ] #y #Hy #H destruct + elim (lsubf_inv_push1 … H1) -H1 #x1 #Z1 #Y1 #H1 #H #H0 destruct + generalize in match H2; -H2 cases J -J #J [| #V ] #H2 + [ elim (lsubf_inv_unit1 … H2) -H2 #x2 #Y2 #H2 #H #H0 destruct + | elim (lsubf_inv_pair1 … H2) -H2 * + [ #x2 #Z2 #H2 #H #H0 destruct + | #y3 #y4 #x2 #Y2 #W #U #H2 #Hy3 #Hy2 #H #H0 #H3 #H4 destruct + | #y3 #y4 #x2 #Z2 #Y2 #H2 #Hy3 #Hy2 #H #H0 destruct + ] + ] + elim (sor_inv_pnx … Hf) -Hf [1,6,11,16:|*: // ] #x #Hx #H destruct + /3 width=12 by lsubf_unit, lsubf_beta, lsubf_bind, sor_assoc_sn/ + | elim (sor_inv_npx … Hg) -Hg [|*: // ] #y #Hy #H destruct + elim (lsubf_inv_push1 … H2) -H2 #x2 #Z2 #Y2 #H2 #H #H0 destruct + generalize in match H1; -H1 cases J -J #J [| #V ] #H1 + [ elim (lsubf_inv_unit1 … H1) -H1 #x1 #Y1 #H1 #H #H0 destruct + | elim (lsubf_inv_pair1 … H1) -H1 * + [ #x1 #Z1 #H1 #H #H0 destruct + | #y3 #y4 #x1 #Y1 #W #U #H1 #Hy3 #Hy1 #H #H0 #H3 #H4 destruct + | #y3 #y4 #x1 #Z1 #Y1 #H1 #Hy3 #Hy1 #H #H0 destruct + ] + ] + elim (sor_inv_npx … Hf) -Hf [1,6,11,16:|*: // ] #x #Hx #H destruct + /3 width=12 by lsubf_unit, lsubf_beta, lsubf_bind, sor_comm_23/ + | elim (sor_inv_nnx … Hg) -Hg [|*: // ] #y #Hy #H destruct + generalize in match H2; generalize in match H1; -H1 -H2 cases J -J #J [| #V ] #H1 #H2 + [ elim (lsubf_inv_unit1 … H1) -H1 #x1 #Y1 #H1 #H #H0 destruct + elim (lsubf_inv_bind_sn … H2) -H2 #x2 #H2 #H destruct + | elim (lsubf_inv_pair1 … H1) -H1 * + [ #x1 #Z1 #H1 #H #H0 destruct + elim (lsubf_inv_bind_sn … H2) -H2 #x2 #H2 #H destruct + | #y3 #y4 #x1 #Y1 #W #U #H1 #Hy3 #Hy1 #H #H0 #H3 #H4 destruct + elim (lsubf_inv_beta_sn … H2) -H2 #z3 #z4 #x2 #H2 #Hz3 #Hy2 #H destruct + lapply (frees_mono … Hz3 … Hy3) -Hz3 #H3 + lapply (sor_eq_repl_back2 … Hy2 … H3) -z3 #Hy2 + | #y3 #y4 #x1 #Z1 #Y1 #H1 #Hy3 #Hy1 #H #H0 destruct + elim (lsubf_inv_unit_sn … H2) -H2 #z3 #z4 #x2 #H2 #Hz3 #Hy2 #H destruct + lapply (frees_mono … Hz3 … Hy3) -Hz3 #H3 + lapply (sor_eq_repl_back2 … Hy2 … H3) -z3 #Hy2 + ] + ] + elim (sor_inv_nnx … Hf) -Hf [1,6,11,16:|*: // ] #x #Hx #H destruct + /3 width=12 by lsubf_unit, lsubf_beta, lsubf_bind, sor_coll_dx/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubr.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubr.ma new file mode 100644 index 000000000..a021ca5a4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubr.ma @@ -0,0 +1,85 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsubr.ma". +include "static_2/static/lsubf_lsubf.ma". + +(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************) + +(* Forward lemmas with restricted refinement for local environments *********) + +lemma lsubf_fwd_lsubr_isdiv: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → + 𝛀⦃f1⦄ → 𝛀⦃f2⦄ → L1 ⫃ L2. +#f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2 +/4 width=3 by lsubr_bind, isdiv_inv_next/ +[ #f1 #f2 #I1 #I2 #L1 #L2 #_ #_ #H + elim (isdiv_inv_push … H) // +| /5 width=5 by lsubf_fwd_sle, lsubr_beta, sle_inv_isdiv_sn, isdiv_inv_next/ +| /5 width=5 by lsubf_fwd_sle, lsubr_unit, sle_inv_isdiv_sn, isdiv_inv_next/ +] +qed-. + +(* Properties with restricted refinement for local environments *************) + +lemma lsubr_lsubf_isid: ∀L1,L2. L1 ⫃ L2 → + ∀f1,f2. 𝐈⦃f1⦄ → 𝐈⦃f2⦄ → ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄. +#L1 #L2 #H elim H -L1 -L2 +[ /3 width=1 by lsubf_atom, isid_inv_eq_repl/ +| #I #L1 #L2 | #L1 #L2 #V #W | #I1 #I2 #L1 #L2 #V +] +#_ #IH #f1 #f2 #Hf1 #Hf2 +elim (isid_inv_gen … Hf1) -Hf1 #g1 #Hg1 #H destruct +elim (isid_inv_gen … Hf2) -Hf2 #g2 #Hg2 #H destruct +/3 width=1 by lsubf_push/ +qed. + +lemma lsubr_lsubf: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 → ∀L1. L1 ⫃ L2 → + ∀f1. L1 ⊢ 𝐅*⦃T⦄ ≘ f1 → ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄. +#f2 #L2 #T #H elim H -f2 -L2 -T +[ #f2 #L2 #s #Hf2 #L1 #HL12 #f1 #Hf1 + lapply (frees_inv_sort … Hf1) -Hf1 /2 width=1 by lsubr_lsubf_isid/ +| #f2 #i #Hf2 #Y1 #HY1 + >(lsubr_inv_atom2 … HY1) -Y1 #g1 #Hg1 + elim (frees_inv_atom … Hg1) -Hg1 #f1 #Hf1 #H destruct + /5 width=5 by lsubf_atom, isid_inv_eq_repl, pushs_eq_repl, eq_next/ +| #f2 #Z #L2 #W #_ #IH #Y1 #HY1 #g1 #Hg1 elim (lsubr_inv_pair2 … HY1) -HY1 * + [ #L1 #HL12 #H destruct + elim (frees_inv_pair … Hg1) -Hg1 #f1 #Hf1 #H destruct + /3 width=1 by lsubf_bind/ + | #L1 #V #HL12 #H1 #H2 destruct + elim (frees_inv_pair … Hg1) -Hg1 #f1 #Hf1 #H destruct + elim (frees_inv_flat … Hf1) -Hf1 /3 width=5 by lsubf_beta/ + ] +| #f2 #I2 #L2 #Hf2 #Y1 #HY1 #g1 #Hg1 elim (lsubr_inv_unit2 … HY1) -HY1 * + [ #L1 #HL12 #H destruct + elim (frees_inv_unit … Hg1) -Hg1 #f1 #Hf1 #H destruct + /3 width=1 by lsubf_bind, lsubr_lsubf_isid/ + | #I #L1 #V #HL12 #H destruct + elim (frees_inv_pair … Hg1) -Hg1 #f1 #Hf1 #H destruct + /3 width=5 by lsubf_unit, sor_isid_sn, lsubr_lsubf_isid/ + ] +| #f2 #I2 #L2 #i #_ #IH #Y1 #HY1 #g1 #Hg1 + elim (lsubr_fwd_bind2 … HY1) -HY1 #I1 #L1 #HL12 #H destruct + elim (frees_inv_lref … Hg1) -Hg1 #f1 #Hf1 #H destruct + /3 width=1 by lsubf_push/ +| #f2 #L2 #l #Hf2 #L1 #HL12 #f1 #Hf1 + lapply (frees_inv_gref … Hf1) -Hf1 /2 width=1 by lsubr_lsubf_isid/ +| #f2V #f2T #f2 #p #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #L1 #HL12 #f1 #Hf1 + elim (frees_inv_bind … Hf1) -Hf1 #f1V #f1T #Hf1V #Hf1T #Hf1 + /5 width=8 by lsubf_sor, lsubf_fwd_bind_tl, lsubr_bind/ +| #f2V #f2T #f2 #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #L1 #HL12 #f1 #Hf1 + elim (frees_inv_flat … Hf1) -Hf1 #f1V #f1T #Hf1V #Hf1T #Hf1 + /3 width=8 by lsubf_sor/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubr.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubr.ma new file mode 100644 index 000000000..5ec8a33f1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubr.ma @@ -0,0 +1,176 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/lrsubeqc_2.ma". +include "static_2/syntax/lenv.ma". + +(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) + +(* Basic_2A1: just tpr_cpr and tprs_cprs require the extended lsubr_atom *) +(* Basic_2A1: includes: lsubr_pair *) +inductive lsubr: relation lenv ≝ +| lsubr_atom: lsubr (⋆) (⋆) +| lsubr_bind: ∀I,L1,L2. lsubr L1 L2 → lsubr (L1.ⓘ{I}) (L2.ⓘ{I}) +| lsubr_beta: ∀L1,L2,V,W. lsubr L1 L2 → lsubr (L1.ⓓⓝW.V) (L2.ⓛW) +| lsubr_unit: ∀I1,I2,L1,L2,V. lsubr L1 L2 → lsubr (L1.ⓑ{I1}V) (L2.ⓤ{I2}) +. + +interpretation + "restricted refinement (local environment)" + 'LRSubEqC L1 L2 = (lsubr L1 L2). + +(* Basic properties *********************************************************) + +lemma lsubr_refl: ∀L. L ⫃ L. +#L elim L -L /2 width=1 by lsubr_atom, lsubr_bind/ +qed. + +(* Basic inversion lemmas ***************************************************) + +fact lsubr_inv_atom1_aux: ∀L1,L2. L1 ⫃ L2 → L1 = ⋆ → L2 = ⋆. +#L1 #L2 * -L1 -L2 // +[ #I #L1 #L2 #_ #H destruct +| #L1 #L2 #V #W #_ #H destruct +| #I1 #I2 #L1 #L2 #V #_ #H destruct +] +qed-. + +lemma lsubr_inv_atom1: ∀L2. ⋆ ⫃ L2 → L2 = ⋆. +/2 width=3 by lsubr_inv_atom1_aux/ qed-. + +fact lsubr_inv_bind1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1. L1 = K1.ⓘ{I} → + ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I} + | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & + I = BPair Abbr (ⓝW.V) + | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} & + I = BPair J1 V. +#L1 #L2 * -L1 -L2 +[ #J #K1 #H destruct +| #I #L1 #L2 #HL12 #J #K1 #H destruct /3 width=3 by or3_intro0, ex2_intro/ +| #L1 #L2 #V #W #HL12 #J #K1 #H destruct /3 width=6 by or3_intro1, ex3_3_intro/ +| #I1 #I2 #L1 #L2 #V #HL12 #J #K1 #H destruct /3 width=4 by or3_intro2, ex3_4_intro/ +] +qed-. + +(* Basic_2A1: uses: lsubr_inv_pair1 *) +lemma lsubr_inv_bind1: ∀I,K1,L2. K1.ⓘ{I} ⫃ L2 → + ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I} + | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & + I = BPair Abbr (ⓝW.V) + | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} & + I = BPair J1 V. +/2 width=3 by lsubr_inv_bind1_aux/ qed-. + +fact lsubr_inv_atom2_aux: ∀L1,L2. L1 ⫃ L2 → L2 = ⋆ → L1 = ⋆. +#L1 #L2 * -L1 -L2 // +[ #I #L1 #L2 #_ #H destruct +| #L1 #L2 #V #W #_ #H destruct +| #I1 #I2 #L1 #L2 #V #_ #H destruct +] +qed-. + +lemma lsubr_inv_atom2: ∀L1. L1 ⫃ ⋆ → L1 = ⋆. +/2 width=3 by lsubr_inv_atom2_aux/ qed-. + +fact lsubr_inv_bind2_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K2. L2 = K2.ⓘ{I} → + ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I} + | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W + | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2. +#L1 #L2 * -L1 -L2 +[ #J #K2 #H destruct +| #I #L1 #L2 #HL12 #J #K2 #H destruct /3 width=3 by ex2_intro, or3_intro0/ +| #L1 #L2 #V1 #V2 #HL12 #J #K2 #H destruct /3 width=6 by ex3_3_intro, or3_intro1/ +| #I1 #I2 #L1 #L2 #V #HL12 #J #K2 #H destruct /3 width=5 by ex3_4_intro, or3_intro2/ +] +qed-. + +lemma lsubr_inv_bind2: ∀I,L1,K2. L1 ⫃ K2.ⓘ{I} → + ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I} + | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W + | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2. +/2 width=3 by lsubr_inv_bind2_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lsubr_inv_abst1: ∀K1,L2,W. K1.ⓛW ⫃ L2 → + ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW + | ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓤ{I2}. +#K1 #L2 #W #H elim (lsubr_inv_bind1 … H) -H * +/3 width=4 by ex2_2_intro, ex2_intro, or_introl, or_intror/ +#K2 #V2 #W2 #_ #_ #H destruct +qed-. + +lemma lsubr_inv_unit1: ∀I,K1,L2. K1.ⓤ{I} ⫃ L2 → + ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓤ{I}. +#I #K1 #L2 #H elim (lsubr_inv_bind1 … H) -H * +[ #K2 #HK12 #H destruct /2 width=3 by ex2_intro/ +| #K2 #V #W #_ #_ #H destruct +| #I1 #I2 #K2 #V #_ #_ #H destruct +] +qed-. + +lemma lsubr_inv_pair2: ∀I,L1,K2,W. L1 ⫃ K2.ⓑ{I}W → + ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓑ{I}W + | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = Abst. +#I #L1 #K2 #W #H elim (lsubr_inv_bind2 … H) -H * +[ /3 width=3 by ex2_intro, or_introl/ +| #K2 #X #V #HK12 #H1 #H2 destruct /3 width=4 by ex3_2_intro, or_intror/ +| #I1 #I1 #K2 #V #_ #_ #H destruct +] +qed-. + +lemma lsubr_inv_abbr2: ∀L1,K2,V. L1 ⫃ K2.ⓓV → + ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓV. +#L1 #K2 #V #H elim (lsubr_inv_pair2 … H) -H * +[ /2 width=3 by ex2_intro/ +| #K1 #X #_ #_ #H destruct +] +qed-. + +lemma lsubr_inv_abst2: ∀L1,K2,W. L1 ⫃ K2.ⓛW → + ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓛW + | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V. +#L1 #K2 #W #H elim (lsubr_inv_pair2 … H) -H * +/3 width=4 by ex2_2_intro, ex2_intro, or_introl, or_intror/ +qed-. + +lemma lsubr_inv_unit2: ∀I,L1,K2. L1 ⫃ K2.ⓤ{I} → + ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓤ{I} + | ∃∃J,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J}V. +#I #L1 #K2 #H elim (lsubr_inv_bind2 … H) -H * +[ /3 width=3 by ex2_intro, or_introl/ +| #K1 #W #V #_ #_ #H destruct +| #I1 #I2 #K1 #V #HK12 #H1 #H2 destruct /3 width=5 by ex2_3_intro, or_intror/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubr_fwd_bind1: ∀I1,K1,L2. K1.ⓘ{I1} ⫃ L2 → + ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓘ{I2}. +#I1 #K1 #L2 #H elim (lsubr_inv_bind1 … H) -H * +[ #K2 #HK12 #H destruct /3 width=4 by ex2_2_intro/ +| #K2 #W1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ +| #I1 #I2 #K2 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ +] +qed-. + +lemma lsubr_fwd_bind2: ∀I2,L1,K2. L1 ⫃ K2.ⓘ{I2} → + ∃∃I1,K1. K1 ⫃ K2 & L1 = K1.ⓘ{I1}. +#I2 #L1 #K2 #H elim (lsubr_inv_bind2 … H) -H * +[ #K1 #HK12 #H destruct /3 width=4 by ex2_2_intro/ +| #K1 #W1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ +| #I1 #I2 #K1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubr_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubr_drops.ma new file mode 100644 index 000000000..9257f34dc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubr_drops.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops.ma". +include "static_2/static/lsubr.ma". + +(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) + +(* Forward lemmas with generic slicing for local environments ***************) + +(* Basic_2A1: includes: lsubr_fwd_drop2_pair *) +lemma lsubr_fwd_drops2_bind: ∀L1,L2. L1 ⫃ L2 → + ∀b,f,I,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2.ⓘ{I} → + ∨∨ ∃∃K1. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓘ{I} + | ∃∃K1,W,V. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓓⓝW.V & I = BPair Abst W + | ∃∃J1,J2,K1,V. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓑ{J1}V & I = BUnit J2. +#L1 #L2 #H elim H -L1 -L2 +[ #b #f #I #K2 #_ #H + elim (drops_inv_atom1 … H) -H #H destruct +| #J #L1 #L2 | #L1 #L2 #V #W | #I1 #I2 #L1 #L2 #V1 +] +#HL12 #IH #b #f #I #K2 #Hf #H +elim (drops_inv_bind1_isuni … Hf H) -Hf -H * +[1,3,5: #Hf #H destruct -IH + /4 width=6 by drops_refl, or3_intro0, or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro, ex2_intro/ +|2,4,6: #g #Hg #HLK2 #H destruct -HL12 + elim (IH … Hg HLK2) -IH -Hg -HLK2 * + /4 width=6 by drops_drop, or3_intro0, or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro, ex2_intro/ +] +qed-. + +(* Basic_2A1: includes: lsubr_fwd_drop2_abbr *) +lemma lsubr_fwd_drops2_abbr: ∀L1,L2. L1 ⫃ L2 → + ∀b,f,K2,V. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2.ⓓV → + ∃∃K1. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓓV. +#L1 #L2 #HL12 #b #f #K2 #V #Hf #HLK2 +elim (lsubr_fwd_drops2_bind … HL12 … Hf HLK2) -L2 -Hf // * +[ #K1 #W #V #_ #_ #H destruct +| #I1 #I2 #K1 #V #_ #_ #H destruct +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubr_length.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubr_length.ma new file mode 100644 index 000000000..0e11e293d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubr_length.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lenv_length.ma". +include "static_2/static/lsubr.ma". + +(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) + +(* Forward lemmas with length for local environments ************************) + +lemma lsubr_fwd_length: ∀L1,L2. L1 ⫃ L2 → |L2| = |L1|. +#L1 #L2 #H elim H -L1 -L2 normalize // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/lsubr_lsubr.ma b/matita/matita/contribs/lambdadelta/static_2/static/lsubr_lsubr.ma new file mode 100644 index 000000000..3bf83b81e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/lsubr_lsubr.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/lsubr.ma". + +(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) + +(* Main properties **********************************************************) + +theorem lsubr_trans: Transitive … lsubr. +#L1 #L #H elim H -L1 -L // +[ #I #L1 #L #_ #IH #X #H elim (lsubr_inv_bind1 … H) -H * + [ #L2 #HL2 #H | #L2 #V #W #HL2 #H1 #H2 | #I1 #I2 #L2 #V #Hl2 #H1 #H2 ] + destruct /3 width=1 by lsubr_bind, lsubr_beta, lsubr_unit/ +| #L1 #L #V #W #_ #IH #X #H elim (lsubr_inv_abst1 … H) -H * + [ #L2 #HL2 #H | #I #L2 #HL2 #H ] + destruct /3 width=1 by lsubr_beta, lsubr_unit/ +| #I1 #I2 #L1 #L #V #_ #IH #X #H elim (lsubr_inv_unit1 … H) -H + /4 width=1 by lsubr_unit/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq.ma new file mode 100644 index 000000000..f2de0dfe6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq.ma @@ -0,0 +1,194 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/stareqsn_5.ma". +include "static_2/syntax/tdeq_ext.ma". +include "static_2/static/rex.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +definition rdeq (h) (o): relation3 term lenv lenv ≝ + rex (cdeq h o). + +interpretation + "degree-based equivalence on referred entries (local environment)" + 'StarEqSn h o T L1 L2 = (rdeq h o T L1 L2). + +interpretation + "degree-based ranged equivalence (local environment)" + 'StarEqSn h o f L1 L2 = (sex (cdeq_ext h o) cfull f L1 L2). + +(* Basic properties ***********************************************************) + +lemma frees_tdeq_conf_rdeq (h) (o): ∀f,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → ∀T2. T1 ≛[h, o] T2 → + ∀L2. L1 ≛[h, o, f] L2 → L2 ⊢ 𝐅*⦃T2⦄ ≘ f. +#h #o #f #L1 #T1 #H elim H -f -L1 -T1 +[ #f #L1 #s1 #Hf #X #H1 #L2 #_ + elim (tdeq_inv_sort1 … H1) -H1 #s2 #d #_ #_ #H destruct + /2 width=3 by frees_sort/ +| #f #i #Hf #X #H1 + >(tdeq_inv_lref1 … H1) -X #Y #H2 + >(sex_inv_atom1 … H2) -Y + /2 width=1 by frees_atom/ +| #f #I #L1 #V1 #_ #IH #X #H1 + >(tdeq_inv_lref1 … H1) -X #Y #H2 + elim (sex_inv_next1 … H2) -H2 #Z #L2 #HL12 #HZ #H destruct + elim (ext2_inv_pair_sn … HZ) -HZ #V2 #HV12 #H destruct + /3 width=1 by frees_pair/ +| #f #I #L1 #Hf #X #H1 + >(tdeq_inv_lref1 … H1) -X #Y #H2 + elim (sex_inv_next1 … H2) -H2 #Z #L2 #_ #HZ #H destruct + >(ext2_inv_unit_sn … HZ) -Z /2 width=1 by frees_unit/ +| #f #I #L1 #i #_ #IH #X #H1 + >(tdeq_inv_lref1 … H1) -X #Y #H2 + elim (sex_inv_push1 … H2) -H2 #J #L2 #HL12 #_ #H destruct + /3 width=1 by frees_lref/ +| #f #L1 #l #Hf #X #H1 #L2 #_ + >(tdeq_inv_gref1 … H1) -X /2 width=1 by frees_gref/ +| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1 + elim (tdeq_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct + /6 width=5 by frees_bind, sex_inv_tl, ext2_pair, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/ +| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1 + elim (tdeq_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct + /5 width=5 by frees_flat, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/ +] +qed-. + +lemma frees_tdeq_conf (h) (o): ∀f,L,T1. L ⊢ 𝐅*⦃T1⦄ ≘ f → + ∀T2. T1 ≛[h, o] T2 → L ⊢ 𝐅*⦃T2⦄ ≘ f. +/4 width=7 by frees_tdeq_conf_rdeq, sex_refl, ext2_refl/ qed-. + +lemma frees_rdeq_conf (h) (o): ∀f,L1,T. L1 ⊢ 𝐅*⦃T⦄ ≘ f → + ∀L2. L1 ≛[h, o, f] L2 → L2 ⊢ 𝐅*⦃T⦄ ≘ f. +/2 width=7 by frees_tdeq_conf_rdeq, tdeq_refl/ qed-. + +lemma tdeq_rex_conf (R) (h) (o): s_r_confluent1 … (cdeq h o) (rex R). +#R #h #o #L1 #T1 #T2 #HT12 #L2 * +/3 width=5 by frees_tdeq_conf, ex2_intro/ +qed-. + +lemma tdeq_rex_div (R) (h) (o): ∀T1,T2. T1 ≛[h, o] T2 → + ∀L1,L2. L1 ⪤[R, T2] L2 → L1 ⪤[R, T1] L2. +/3 width=5 by tdeq_rex_conf, tdeq_sym/ qed-. + +lemma tdeq_rdeq_conf (h) (o): s_r_confluent1 … (cdeq h o) (rdeq h o). +/2 width=5 by tdeq_rex_conf/ qed-. + +lemma tdeq_rdeq_div (h) (o): ∀T1,T2. T1 ≛[h, o] T2 → + ∀L1,L2. L1 ≛[h, o, T2] L2 → L1 ≛[h, o, T1] L2. +/2 width=5 by tdeq_rex_div/ qed-. + +lemma rdeq_atom (h) (o): ∀I. ⋆ ≛[h, o, ⓪{I}] ⋆. +/2 width=1 by rex_atom/ qed. + +lemma rdeq_sort (h) (o): ∀I1,I2,L1,L2,s. + L1 ≛[h, o, ⋆s] L2 → L1.ⓘ{I1} ≛[h, o, ⋆s] L2.ⓘ{I2}. +/2 width=1 by rex_sort/ qed. + +lemma rdeq_pair (h) (o): ∀I,L1,L2,V1,V2. L1 ≛[h, o, V1] L2 → V1 ≛[h, o] V2 → + L1.ⓑ{I}V1 ≛[h, o, #0] L2.ⓑ{I}V2. +/2 width=1 by rex_pair/ qed. +(* +lemma rdeq_unit (h) (o): ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cdeq_ext h o, cfull, f] L2 → + L1.ⓤ{I} ≛[h, o, #0] L2.ⓤ{I}. +/2 width=3 by rex_unit/ qed. +*) +lemma rdeq_lref (h) (o): ∀I1,I2,L1,L2,i. + L1 ≛[h, o, #i] L2 → L1.ⓘ{I1} ≛[h, o, #↑i] L2.ⓘ{I2}. +/2 width=1 by rex_lref/ qed. + +lemma rdeq_gref (h) (o): ∀I1,I2,L1,L2,l. + L1 ≛[h, o, §l] L2 → L1.ⓘ{I1} ≛[h, o, §l] L2.ⓘ{I2}. +/2 width=1 by rex_gref/ qed. + +lemma rdeq_bind_repl_dx (h) (o): ∀I,I1,L1,L2.∀T:term. + L1.ⓘ{I} ≛[h, o, T] L2.ⓘ{I1} → + ∀I2. I ≛[h, o] I2 → + L1.ⓘ{I} ≛[h, o, T] L2.ⓘ{I2}. +/2 width=2 by rex_bind_repl_dx/ qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma rdeq_inv_atom_sn (h) (o): ∀Y2. ∀T:term. ⋆ ≛[h, o, T] Y2 → Y2 = ⋆. +/2 width=3 by rex_inv_atom_sn/ qed-. + +lemma rdeq_inv_atom_dx (h) (o): ∀Y1. ∀T:term. Y1 ≛[h, o, T] ⋆ → Y1 = ⋆. +/2 width=3 by rex_inv_atom_dx/ qed-. +(* +lemma rdeq_inv_zero (h) (o): ∀Y1,Y2. Y1 ≛[h, o, #0] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I,L1,L2,V1,V2. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & + Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 + | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cdeq_ext h o, cfull, f] L2 & + Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. +#h #o #Y1 #Y2 #H elim (rex_inv_zero … H) -H * +/3 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex4_4_intro, conj/ +qed-. +*) +lemma rdeq_inv_lref (h) (o): ∀Y1,Y2,i. Y1 ≛[h, o, #↑i] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ≛[h, o, #i] L2 & + Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. +/2 width=1 by rex_inv_lref/ qed-. + +(* Basic_2A1: uses: lleq_inv_bind lleq_inv_bind_O *) +lemma rdeq_inv_bind (h) (o): ∀p,I,L1,L2,V,T. L1 ≛[h, o, ⓑ{p,I}V.T] L2 → + ∧∧ L1 ≛[h, o, V] L2 & L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V. +/2 width=2 by rex_inv_bind/ qed-. + +(* Basic_2A1: uses: lleq_inv_flat *) +lemma rdeq_inv_flat (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ⓕ{I}V.T] L2 → + ∧∧ L1 ≛[h, o, V] L2 & L1 ≛[h, o, T] L2. +/2 width=2 by rex_inv_flat/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma rdeq_inv_zero_pair_sn (h) (o): ∀I,Y2,L1,V1. L1.ⓑ{I}V1 ≛[h, o, #0] Y2 → + ∃∃L2,V2. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y2 = L2.ⓑ{I}V2. +/2 width=1 by rex_inv_zero_pair_sn/ qed-. + +lemma rdeq_inv_zero_pair_dx (h) (o): ∀I,Y1,L2,V2. Y1 ≛[h, o, #0] L2.ⓑ{I}V2 → + ∃∃L1,V1. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y1 = L1.ⓑ{I}V1. +/2 width=1 by rex_inv_zero_pair_dx/ qed-. + +lemma rdeq_inv_lref_bind_sn (h) (o): ∀I1,Y2,L1,i. L1.ⓘ{I1} ≛[h, o, #↑i] Y2 → + ∃∃I2,L2. L1 ≛[h, o, #i] L2 & Y2 = L2.ⓘ{I2}. +/2 width=2 by rex_inv_lref_bind_sn/ qed-. + +lemma rdeq_inv_lref_bind_dx (h) (o): ∀I2,Y1,L2,i. Y1 ≛[h, o, #↑i] L2.ⓘ{I2} → + ∃∃I1,L1. L1 ≛[h, o, #i] L2 & Y1 = L1.ⓘ{I1}. +/2 width=2 by rex_inv_lref_bind_dx/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma rdeq_fwd_zero_pair (h) (o): ∀I,K1,K2,V1,V2. + K1.ⓑ{I}V1 ≛[h, o, #0] K2.ⓑ{I}V2 → K1 ≛[h, o, V1] K2. +/2 width=3 by rex_fwd_zero_pair/ qed-. + +(* Basic_2A1: uses: lleq_fwd_bind_sn lleq_fwd_flat_sn *) +lemma rdeq_fwd_pair_sn (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ②{I}V.T] L2 → L1 ≛[h, o, V] L2. +/2 width=3 by rex_fwd_pair_sn/ qed-. + +(* Basic_2A1: uses: lleq_fwd_bind_dx lleq_fwd_bind_O_dx *) +lemma rdeq_fwd_bind_dx (h) (o): ∀p,I,L1,L2,V,T. + L1 ≛[h, o, ⓑ{p,I}V.T] L2 → L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V. +/2 width=2 by rex_fwd_bind_dx/ qed-. + +(* Basic_2A1: uses: lleq_fwd_flat_dx *) +lemma rdeq_fwd_flat_dx (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ⓕ{I}V.T] L2 → L1 ≛[h, o, T] L2. +/2 width=3 by rex_fwd_flat_dx/ qed-. + +lemma rdeq_fwd_dx (h) (o): ∀I2,L1,K2. ∀T:term. L1 ≛[h, o, T] K2.ⓘ{I2} → + ∃∃I1,K1. L1 = K1.ⓘ{I1}. +/2 width=5 by rex_fwd_dx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_drops.ma new file mode 100644 index 000000000..6b9537f61 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_drops.ma @@ -0,0 +1,47 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_tdeq.ma". +include "static_2/static/rex_drops.ma". +include "static_2/static/rdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +(* Properties with generic slicing for local environments *******************) + +lemma rdeq_lifts_sn: ∀h,o. f_dedropable_sn (cdeq h o). +/3 width=5 by rex_liftable_dedropable_sn, tdeq_lifts_sn/ qed-. + +(* Inversion lemmas with generic slicing for local environments *************) + +lemma rdeq_inv_lifts_sn: ∀h,o. f_dropable_sn (cdeq h o). +/2 width=5 by rex_dropable_sn/ qed-. + +(* Note: missing in basic_2A1 *) +lemma rdeq_inv_lifts_dx: ∀h,o. f_dropable_dx (cdeq h o). +/2 width=5 by rex_dropable_dx/ qed-. + +(* Basic_2A1: uses: lleq_inv_lift_le lleq_inv_lift_be lleq_inv_lift_ge *) +lemma rdeq_inv_lifts_bi: ∀h,o,L1,L2,U. L1 ≛[h, o, U] L2 → ∀b,f. 𝐔⦃f⦄ → + ∀K1,K2. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → + ∀T. ⬆*[f] T ≘ U → K1 ≛[h, o, T] K2. +/2 width=10 by rex_inv_lifts_bi/ qed-. + +lemma rdeq_inv_lref_pair_sn: ∀h,o,L1,L2,i. L1 ≛[h, o, #i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 → + ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ≛[h, o, V1] K2 & V1 ≛[h, o] V2. +/2 width=3 by rex_inv_lref_pair_sn/ qed-. + +lemma rdeq_inv_lref_pair_dx: ∀h,o,L1,L2,i. L1 ≛[h, o, #i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 → + ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ≛[h, o, V1] K2 & V1 ≛[h, o] V2. +/2 width=3 by rex_inv_lref_pair_dx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqup.ma new file mode 100644 index 000000000..e1a7afb3a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqup.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rex_fqup.ma". +include "static_2/static/rdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +(* Advanced properties ******************************************************) + +lemma rdeq_refl: ∀h,o,T. reflexive … (rdeq h o T). +/2 width=1 by rex_refl/ qed. + +lemma rdeq_pair_refl: ∀h,o,V1,V2. V1 ≛[h, o] V2 → + ∀I,L. ∀T:term. L.ⓑ{I}V1 ≛[h, o, T] L.ⓑ{I}V2. +/2 width=1 by rex_pair_refl/ qed. + +(* Advanced inversion lemmas ************************************************) + +lemma rdeq_inv_bind_void: ∀h,o,p,I,L1,L2,V,T. L1 ≛[h, o, ⓑ{p,I}V.T] L2 → + L1 ≛[h, o, V] L2 ∧ L1.ⓧ ≛[h, o, T] L2.ⓧ. +/2 width=3 by rex_inv_bind_void/ qed-. + +(* Advanced forward lemmas **************************************************) + +lemma rdeq_fwd_bind_dx_void: ∀h,o,p,I,L1,L2,V,T. + L1 ≛[h, o, ⓑ{p,I}V.T] L2 → L1.ⓧ ≛[h, o, T] L2.ⓧ. +/2 width=4 by rex_fwd_bind_dx_void/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqus.ma new file mode 100644 index 000000000..3ebf19118 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqus.ma @@ -0,0 +1,156 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/s_computation/fqus_fqup.ma". +include "static_2/static/rdeq_drops.ma". +include "static_2/static/rdeq_fqup.ma". +include "static_2/static/rdeq_rdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +(* Properties with extended structural successor for closures ***************) + +lemma fqu_tdeq_conf: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ → + ∀U2. U1 ≛[h, o] U2 → + ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & L2 ≛[h, o, T1] L & T1 ≛[h, o] T2. +#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1 +[ #I #G #L #W #X #H >(tdeq_inv_lref1 … H) -X + /2 width=5 by fqu_lref_O, ex3_2_intro/ +| #I #G #L #W1 #U1 #X #H + elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct + /2 width=5 by fqu_pair_sn, ex3_2_intro/ +| #p #I #G #L #W1 #U1 #X #H + elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct + /3 width=5 by rdeq_pair_refl, fqu_bind_dx, ex3_2_intro/ +| #p #I #G #L #W1 #U1 #Hb #X #H + elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct + /3 width=5 by fqu_clear, ex3_2_intro/ +| #I #G #L #W1 #U1 #X #H + elim (tdeq_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct + /2 width=5 by fqu_flat_dx, ex3_2_intro/ +| #I #G #L #T1 #U1 #HTU1 #U2 #HU12 + elim (tdeq_inv_lifts_sn … HU12 … HTU1) -U1 + /3 width=5 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma tdeq_fqu_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ → + ∀U2. U2 ≛[h, o] U1 → + ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. +#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21 +elim (fqu_tdeq_conf … o … H12 U2) -H12 +/3 width=5 by rdeq_sym, tdeq_sym, ex3_2_intro/ +qed-. + +(* Basic_2A1: uses: lleq_fqu_trans *) +lemma rdeq_fqu_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐[b] ⦃G2, K2, U⦄ → + ∀L1. L1 ≛[h, o, T] L2 → + ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. +#h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U +[ #I #G #L2 #V2 #L1 #H elim (rdeq_inv_zero_pair_dx … H) -H + #K1 #V1 #HV1 #HV12 #H destruct + /3 width=7 by tdeq_rdeq_conf, fqu_lref_O, ex3_2_intro/ +| * [ #p ] #I #G #L2 #V #T #L1 #H + [ elim (rdeq_inv_bind … H) + | elim (rdeq_inv_flat … H) + ] -H + /2 width=5 by fqu_pair_sn, ex3_2_intro/ +| #p #I #G #L2 #V #T #L1 #H elim (rdeq_inv_bind … H) -H + /2 width=5 by fqu_bind_dx, ex3_2_intro/ +| #p #I #G #L2 #V #T #Hb #L1 #H elim (rdeq_inv_bind_void … H) -H + /3 width=5 by fqu_clear, ex3_2_intro/ +| #I #G #L2 #V #T #L1 #H elim (rdeq_inv_flat … H) -H + /2 width=5 by fqu_flat_dx, ex3_2_intro/ +| #I #G #L2 #T #U #HTU #Y #HU + elim (rdeq_fwd_dx … HU) #L1 #V1 #H destruct + /5 width=14 by rdeq_inv_lifts_bi, fqu_drop, drops_refl, drops_drop, ex3_2_intro/ +] +qed-. + +(* Properties with optional structural successor for closures ***************) + +lemma tdeq_fquq_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, T1⦄ → + ∀U2. U2 ≛[h, o] U1 → + ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐⸮[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. +#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H +[ #H #U2 #HU21 elim (tdeq_fqu_trans … H … HU21) -U1 + /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_2A1: was just: lleq_fquq_trans *) +lemma rdeq_fquq_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐⸮[b] ⦃G2, K2, U⦄ → + ∀L1. L1 ≛[h, o, T] L2 → + ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐⸮[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. +#h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -H +[ #H #L1 #HL12 elim (rdeq_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Properties with plus-iterated structural successor for closures **********) + +(* Basic_2A1: was just: lleq_fqup_trans *) +lemma rdeq_fqup_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+[b] ⦃G2, K2, U⦄ → + ∀L1. L1 ≛[h, o, T] L2 → + ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐+[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. +#h #o #b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U +[ #G2 #K2 #U #HTU #L1 #HL12 elim (rdeq_fqu_trans … HTU … HL12) -L2 + /3 width=5 by fqu_fqup, ex3_2_intro/ +| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12 + elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0 + elim (rdeq_fqu_trans … HU2 … HK0) -K #K1 #U1 #HU1 #HU12 #HK12 + elim (tdeq_fqu_trans … HU1 … HU0) -U #K3 #U3 #HU03 #HU31 #HK31 + @(ex3_2_intro … K3 U3) (**) (* full auto too slow *) + /3 width=5 by rdeq_trans, tdeq_rdeq_conf, fqup_strap1, tdeq_trans/ +] +qed-. + +lemma tdeq_fqup_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, T1⦄ → + ∀U2. U2 ≛[h, o] U1 → + ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐+[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. +#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1 +[ #G1 #L1 #U1 #H #U2 #HU21 elim (tdeq_fqu_trans … H … HU21) -U1 + /3 width=5 by fqu_fqup, ex3_2_intro/ +| #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21 + elim (tdeq_fqu_trans … H … HU21) -U1 #L0 #T #H1 #HTU #HL0 + lapply (tdeq_rdeq_div … HTU … HL0) -HL0 #HL0 + elim (IH … HTU) -U #K2 #U1 #H2 #HUT1 #HKL2 + elim (rdeq_fqup_trans … H2 … HL0) -L #K #U #H2 #HU1 #HK2 + lapply (tdeq_rdeq_conf … HUT1 … HK2) -HK2 #HK2 + /3 width=7 by rdeq_trans, fqup_strap2, tdeq_trans, ex3_2_intro/ +] +qed-. + +(* Properties with star-iterated structural successor for closures **********) + +lemma tdeq_fqus_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, T1⦄ → + ∀U2. U2 ≛[h, o] U1 → + ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐*[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2. +#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H +[ #H elim (tdeq_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/ +| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_2A1: was just: lleq_fqus_trans *) +lemma rdeq_fqus_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐*[b] ⦃G2, K2, U⦄ → + ∀L1. L1 ≛[h, o, T] L2 → + ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐*[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2. +#h #o #b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H +[ #H elim (rdeq_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/ +| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq_length.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_length.ma new file mode 100644 index 000000000..e0f3bb236 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_length.ma @@ -0,0 +1,55 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lifts_tdeq.ma". +include "static_2/static/rex_length.ma". +include "static_2/static/rex_fsle.ma". +include "static_2/static/rdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +(* Advanved properties with free variables inclusion ************************) + +lemma rdeq_fsge_comp (h) (o): rex_fsge_compatible (cdeq h o). +#h #o #L1 #L2 #T * #f1 #Hf1 #HL12 +lapply (frees_rdeq_conf h o … Hf1 … HL12) +lapply (sex_fwd_length … HL12) +/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *) +qed-. + +(* Properties with length for local environments ****************************) + +(* Basic_2A1: uses: lleq_sort *) +lemma rdeq_sort_length (h) (o): ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[h, o, ⋆s] L2. +/2 width=1 by rex_sort_length/ qed. + +(* Basic_2A1: uses: lleq_gref *) +lemma rdeq_gref_length (h) (o): ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[h, o, §l] L2. +/2 width=1 by rex_gref_length/ qed. + +lemma rdeq_unit_length (h) (o): ∀L1,L2. |L1| = |L2| → + ∀I. L1.ⓤ{I} ≛[h, o, #0] L2.ⓤ{I}. +/2 width=1 by rex_unit_length/ qed. + +(* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *) +lemma rdeq_lifts_bi (h) (o): ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[h, o, T] K2 → + ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → + ∀U. ⬆*[f] T ≘ U → L1 ≛[h, o, U] L2. +/3 width=9 by rex_lifts_bi, tdeq_lifts_sn/ qed-. + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: lleq_fwd_length *) +lemma rdeq_fwd_length (h) (o): ∀L1,L2. ∀T:term. L1 ≛[h, o, T] L2 → |L1| = |L2|. +/2 width=3 by rex_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq_rdeq.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_rdeq.ma new file mode 100644 index 000000000..316438d66 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_rdeq.ma @@ -0,0 +1,100 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ext2_ext2.ma". +include "static_2/syntax/tdeq_tdeq.ma". +include "static_2/static/rdeq_length.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +(* Advanced properties ******************************************************) + +(* Basic_2A1: uses: lleq_sym *) +lemma rdeq_sym: ∀h,o,T. symmetric … (rdeq h o T). +/3 width=3 by rdeq_fsge_comp, rex_sym, tdeq_sym/ qed-. + +(* Basic_2A1: uses: lleq_dec *) +lemma rdeq_dec: ∀h,o,L1,L2. ∀T:term. Decidable (L1 ≛[h, o, T] L2). +/3 width=1 by rex_dec, tdeq_dec/ qed-. + +(* Main properties **********************************************************) + +(* Basic_2A1: uses: lleq_bind lleq_bind_O *) +theorem rdeq_bind: ∀h,o,p,I,L1,L2,V1,V2,T. + L1 ≛[h, o, V1] L2 → L1.ⓑ{I}V1 ≛[h, o, T] L2.ⓑ{I}V2 → + L1 ≛[h, o, ⓑ{p,I}V1.T] L2. +/2 width=2 by rex_bind/ qed. + +(* Basic_2A1: uses: lleq_flat *) +theorem rdeq_flat: ∀h,o,I,L1,L2,V,T. L1 ≛[h, o, V] L2 → L1 ≛[h, o, T] L2 → + L1 ≛[h, o, ⓕ{I}V.T] L2. +/2 width=1 by rex_flat/ qed. + +theorem rdeq_bind_void: ∀h,o,p,I,L1,L2,V,T. + L1 ≛[h, o, V] L2 → L1.ⓧ ≛[h, o, T] L2.ⓧ → + L1 ≛[h, o, ⓑ{p,I}V.T] L2. +/2 width=1 by rex_bind_void/ qed. + +(* Basic_2A1: uses: lleq_trans *) +theorem rdeq_trans: ∀h,o,T. Transitive … (rdeq h o T). +#h #o #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2 +lapply (frees_tdeq_conf_rdeq … Hf1 T … HL1) // #H0 +lapply (frees_mono … Hf2 … H0) -Hf2 -H0 +/5 width=7 by sex_trans, sex_eq_repl_back, tdeq_trans, ext2_trans, ex2_intro/ +qed-. + +(* Basic_2A1: uses: lleq_canc_sn *) +theorem rdeq_canc_sn: ∀h,o,T. left_cancellable … (rdeq h o T). +/3 width=3 by rdeq_trans, rdeq_sym/ qed-. + +(* Basic_2A1: uses: lleq_canc_dx *) +theorem rdeq_canc_dx: ∀h,o,T. right_cancellable … (rdeq h o T). +/3 width=3 by rdeq_trans, rdeq_sym/ qed-. + +theorem rdeq_repl: ∀h,o,L1,L2. ∀T:term. L1 ≛[h, o, T] L2 → + ∀K1. L1 ≛[h, o, T] K1 → ∀K2. L2 ≛[h, o, T] K2 → K1 ≛[h, o, T] K2. +/3 width=3 by rdeq_canc_sn, rdeq_trans/ qed-. + +(* Negated properties *******************************************************) + +(* Note: auto works with /4 width=8/ so rdeq_canc_sn is preferred **********) +(* Basic_2A1: uses: lleq_nlleq_trans *) +lemma rdeq_rdneq_trans: ∀h,o.∀T:term.∀L1,L. L1 ≛[h, o, T] L → + ∀L2. (L ≛[h, o, T] L2 → ⊥) → (L1 ≛[h, o, T] L2 → ⊥). +/3 width=3 by rdeq_canc_sn/ qed-. + +(* Basic_2A1: uses: nlleq_lleq_div *) +lemma rdneq_rdeq_div: ∀h,o.∀T:term.∀L2,L. L2 ≛[h, o, T] L → + ∀L1. (L1 ≛[h, o, T] L → ⊥) → (L1 ≛[h, o, T] L2 → ⊥). +/3 width=3 by rdeq_trans/ qed-. + +theorem rdneq_rdeq_canc_dx: ∀h,o,L1,L. ∀T:term. (L1 ≛[h, o, T] L → ⊥) → + ∀L2. L2 ≛[h, o, T] L → L1 ≛[h, o, T] L2 → ⊥. +/3 width=3 by rdeq_trans/ qed-. + +(* Negated inversion lemmas *************************************************) + +(* Basic_2A1: uses: nlleq_inv_bind nlleq_inv_bind_O *) +lemma rdneq_inv_bind: ∀h,o,p,I,L1,L2,V,T. (L1 ≛[h, o, ⓑ{p,I}V.T] L2 → ⊥) → + (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V → ⊥). +/3 width=2 by rnex_inv_bind, tdeq_dec/ qed-. + +(* Basic_2A1: uses: nlleq_inv_flat *) +lemma rdneq_inv_flat: ∀h,o,I,L1,L2,V,T. (L1 ≛[h, o, ⓕ{I}V.T] L2 → ⊥) → + (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1 ≛[h, o, T] L2 → ⊥). +/3 width=2 by rnex_inv_flat, tdeq_dec/ qed-. + +lemma rdneq_inv_bind_void: ∀h,o,p,I,L1,L2,V,T. (L1 ≛[h, o, ⓑ{p,I}V.T] L2 → ⊥) → + (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1.ⓧ ≛[h, o, T] L2.ⓧ → ⊥). +/3 width=3 by rnex_inv_bind_void, tdeq_dec/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rdeq_req.ma b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_req.ma new file mode 100644 index 000000000..ab3ebca98 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rdeq_req.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/req_fsle.ma". +include "static_2/static/rdeq.ma". + +(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******) + +(* Properties with syntactic equivalence on referred entries ****************) + +lemma req_rdeq: ∀h,o,L1,L2. ∀T:term. L1 ≡[T] L2 → L1 ≛[h, o, T] L2. +/2 width=3 by rex_co/ qed. + +lemma req_rdeq_trans: ∀h,o,L1,L. ∀T:term. L1 ≡[T] L → + ∀L2. L ≛[h, o, T] L2 → L1 ≛[h, o, T] L2. +/2 width=3 by req_rex_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req.ma b/matita/matita/contribs/lambdadelta/static_2/static/req.ma new file mode 100644 index 000000000..13965b92d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/req.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/ideqsn_3.ma". +include "static_2/static/rex.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Basic_2A1: was: lleq *) +definition req: relation3 term lenv lenv ≝ + rex ceq. + +interpretation + "syntactic equivalence on referred entries (local environment)" + 'IdEqSn T L1 L2 = (req T L1 L2). + +(* Note: "req_transitive R" is equivalent to "rex_transitive ceq R R" *) +(* Basic_2A1: uses: lleq_transitive *) +definition req_transitive: predicate (relation3 lenv term term) ≝ + λR. ∀L2,T1,T2. R L2 T1 T2 → ∀L1. L1 ≡[T1] L2 → R L1 T1 T2. + +(* Basic inversion lemmas ***************************************************) + +lemma req_inv_bind: ∀p,I,L1,L2,V,T. L1 ≡[ⓑ{p,I}V.T] L2 → + ∧∧ L1 ≡[V] L2 & L1.ⓑ{I}V ≡[T] L2.ⓑ{I}V. +/2 width=2 by rex_inv_bind/ qed-. + +lemma req_inv_flat: ∀I,L1,L2,V,T. L1 ≡[ⓕ{I}V.T] L2 → + ∧∧ L1 ≡[V] L2 & L1 ≡[T] L2. +/2 width=2 by rex_inv_flat/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma req_inv_zero_pair_sn: ∀I,L2,K1,V. K1.ⓑ{I}V ≡[#0] L2 → + ∃∃K2. K1 ≡[V] K2 & L2 = K2.ⓑ{I}V. +#I #L2 #K1 #V #H +elim (rex_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct +/2 width=3 by ex2_intro/ +qed-. + +lemma req_inv_zero_pair_dx: ∀I,L1,K2,V. L1 ≡[#0] K2.ⓑ{I}V → + ∃∃K1. K1 ≡[V] K2 & L1 = K1.ⓑ{I}V. +#I #L1 #K2 #V #H +elim (rex_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct +/2 width=3 by ex2_intro/ +qed-. + +lemma req_inv_lref_bind_sn: ∀I1,K1,L2,i. K1.ⓘ{I1} ≡[#↑i] L2 → + ∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ{I2}. +/2 width=2 by rex_inv_lref_bind_sn/ qed-. + +lemma req_inv_lref_bind_dx: ∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ{I2} → + ∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ{I1}. +/2 width=2 by rex_inv_lref_bind_dx/ qed-. + +(* Basic forward lemmas *****************************************************) + +(* Basic_2A1: was: llpx_sn_lrefl *) +(* Basic_2A1: this should have been lleq_fwd_llpx_sn *) +lemma req_fwd_rex: ∀R. c_reflexive … R → + ∀L1,L2,T. L1 ≡[T] L2 → L1 ⪤[R, T] L2. +#R #HR #L1 #L2 #T * #f #Hf #HL12 +/4 width=7 by sex_co, cext2_co, ex2_intro/ +qed-. + +(* Basic_properties *********************************************************) + +lemma frees_req_conf: ∀f,L1,T. L1 ⊢ 𝐅*⦃T⦄ ≘ f → + ∀L2. L1 ≡[T] L2 → L2 ⊢ 𝐅*⦃T⦄ ≘ f. +#f #L1 #T #H elim H -f -L1 -T +[ /2 width=3 by frees_sort/ +| #f #i #Hf #L2 #H2 + >(rex_inv_atom_sn … H2) -L2 + /2 width=1 by frees_atom/ +| #f #I #L1 #V1 #_ #IH #Y #H2 + elim (req_inv_zero_pair_sn … H2) -H2 #L2 #HL12 #H destruct + /3 width=1 by frees_pair/ +| #f #I #L1 #Hf #Y #H2 + elim (rex_inv_zero_unit_sn … H2) -H2 #g #L2 #_ #_ #H destruct + /2 width=1 by frees_unit/ +| #f #I #L1 #i #_ #IH #Y #H2 + elim (req_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct + /3 width=1 by frees_lref/ +| /2 width=1 by frees_gref/ +| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 + elim (req_inv_bind … H2) -H2 /3 width=5 by frees_bind/ +| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 + elim (req_inv_flat … H2) -H2 /3 width=5 by frees_flat/ +] +qed-. + +(* Basic_2A1: removed theorems 10: + lleq_ind lleq_fwd_lref + lleq_fwd_drop_sn lleq_fwd_drop_dx + lleq_skip lleq_lref lleq_free + lleq_Y lleq_ge_up lleq_ge + +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/static/req_fqup.ma new file mode 100644 index 000000000..4434b4d69 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/req_fqup.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rex_fqup.ma". +include "static_2/static/req.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Advanced properties ******************************************************) + +(* Basic_2A1: was: lleq_refl *) +lemma req_refl: ∀T. reflexive … (req T). +/2 width=1 by rex_refl/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_fsle.ma b/matita/matita/contribs/lambdadelta/static_2/static/req_fsle.ma new file mode 100644 index 000000000..d91c9905b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/req_fsle.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/rex_length.ma". +include "static_2/static/rex_fsle.ma". +include "static_2/static/req.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Properties with free variables inclusion for restricted closures *********) + +lemma req_fsle_comp: rex_fsle_compatible ceq. +#L1 #L2 #T #HL12 +elim (frees_total L1 T) +/4 width=8 by frees_req_conf, rex_fwd_length, lveq_length_eq, sle_refl, ex4_4_intro/ +qed. + +(* Forward lemmas with free variables inclusion for restricted closures *****) + +lemma req_rex_trans: ∀R. req_transitive R → + ∀L1,L,T. L1 ≡[T] L → ∀L2. L ⪤[R, T] L2 → L1 ⪤[R, T] L2. +/4 width=16 by req_fsle_comp, rex_trans_fsle, rex_trans_next/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex.ma new file mode 100644 index 000000000..515e24bef --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex.ma @@ -0,0 +1,320 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/relocation/rtmap_id.ma". +include "static_2/notation/relations/relation_4.ma". +include "static_2/syntax/cext2.ma". +include "static_2/relocation/sex.ma". +include "static_2/static/frees.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +definition rex (R) (T): relation lenv ≝ + λL1,L2. ∃∃f. L1 ⊢ 𝐅*⦃T⦄ ≘ f & L1 ⪤[cext2 R, cfull, f] L2. + +interpretation "generic extension on referred entries (local environment)" + 'Relation R T L1 L2 = (rex R T L1 L2). + +definition R_confluent2_rex: relation4 (relation3 lenv term term) + (relation3 lenv term term) … ≝ + λR1,R2,RP1,RP2. + ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 → + ∀L1. L0 ⪤[RP1, T0] L1 → ∀L2. L0 ⪤[RP2, T0] L2 → + ∃∃T. R2 L1 T1 T & R1 L2 T2 T. + +definition rex_confluent: relation … ≝ + λR1,R2. + ∀K1,K,V1. K1 ⪤[R1, V1] K → ∀V. R1 K1 V1 V → + ∀K2. K ⪤[R2, V] K2 → K ⪤[R2, V1] K2. + +definition rex_transitive: relation3 ? (relation3 ?? term) … ≝ + λR1,R2,R3. + ∀K1,K,V1. K1 ⪤[R1, V1] K → + ∀V. R1 K1 V1 V → ∀V2. R2 K V V2 → R3 K1 V1 V2. + +(* Basic inversion lemmas ***************************************************) + +lemma rex_inv_atom_sn (R): ∀Y2,T. ⋆ ⪤[R, T] Y2 → Y2 = ⋆. +#R #Y2 #T * /2 width=4 by sex_inv_atom1/ +qed-. + +lemma rex_inv_atom_dx (R): ∀Y1,T. Y1 ⪤[R, T] ⋆ → Y1 = ⋆. +#R #I #Y1 * /2 width=4 by sex_inv_atom2/ +qed-. + +lemma rex_inv_sort (R): ∀Y1,Y2,s. Y1 ⪤[R, ⋆s] Y2 → + ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ⪤[R, ⋆s] L2 & + Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. +#R * [ | #Y1 #I1 ] #Y2 #s * #f #H1 #H2 +[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/ +| lapply (frees_inv_sort … H1) -H1 #Hf + elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct + elim (sex_inv_push1 … H2) -H2 #I2 #L2 #H12 #_ #H destruct + /5 width=7 by frees_sort, ex3_4_intro, ex2_intro, or_intror/ +] +qed-. + +lemma rex_inv_zero (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 → + ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ + | ∃∃I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 & R L1 V1 V2 & + Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 + | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cext2 R, cfull, f] L2 & + Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. +#R * [ | #Y1 * #I1 [ | #X ] ] #Y2 * #f #H1 #H2 +[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or3_intro0, conj/ +| elim (frees_inv_unit … H1) -H1 #g #HX #H destruct + elim (sex_inv_next1 … H2) -H2 #I2 #L2 #HL12 #H #H2 destruct + >(ext2_inv_unit_sn … H) -H /3 width=8 by or3_intro2, ex4_4_intro/ +| elim (frees_inv_pair … H1) -H1 #g #Hg #H destruct + elim (sex_inv_next1 … H2) -H2 #Z2 #L2 #HL12 #H + elim (ext2_inv_pair_sn … H) -H + /4 width=9 by or3_intro1, ex4_5_intro, ex2_intro/ +] +qed-. + +lemma rex_inv_lref (R): ∀Y1,Y2,i. Y1 ⪤[R, #↑i] Y2 → + ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ⪤[R, #i] L2 & + Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. +#R * [ | #Y1 #I1 ] #Y2 #i * #f #H1 #H2 +[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/ +| elim (frees_inv_lref … H1) -H1 #g #Hg #H destruct + elim (sex_inv_push1 … H2) -H2 + /4 width=7 by ex3_4_intro, ex2_intro, or_intror/ +] +qed-. + +lemma rex_inv_gref (R): ∀Y1,Y2,l. Y1 ⪤[R, §l] Y2 → + ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ⪤[R, §l] L2 & + Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}. +#R * [ | #Y1 #I1 ] #Y2 #l * #f #H1 #H2 +[ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/ +| lapply (frees_inv_gref … H1) -H1 #Hf + elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct + elim (sex_inv_push1 … H2) -H2 #I2 #L2 #H12 #_ #H destruct + /5 width=7 by frees_gref, ex3_4_intro, ex2_intro, or_intror/ +] +qed-. + +(* Basic_2A1: uses: llpx_sn_inv_bind llpx_sn_inv_bind_O *) +lemma rex_inv_bind (R): ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R, ⓑ{p,I}V1.T] L2 → R L1 V1 V2 → + ∧∧ L1 ⪤[R, V1] L2 & L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2. +#R #p #I #L1 #L2 #V1 #V2 #T * #f #Hf #HL #HV elim (frees_inv_bind … Hf) -Hf +/6 width=6 by sle_sex_trans, sex_inv_tl, ext2_pair, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/ +qed-. + +(* Basic_2A1: uses: llpx_sn_inv_flat *) +lemma rex_inv_flat (R): ∀I,L1,L2,V,T. L1 ⪤[R, ⓕ{I}V.T] L2 → + ∧∧ L1 ⪤[R, V] L2 & L1 ⪤[R, T] L2. +#R #I #L1 #L2 #V #T * #f #Hf #HL elim (frees_inv_flat … Hf) -Hf +/5 width=6 by sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma rex_inv_sort_bind_sn (R): ∀I1,K1,L2,s. K1.ⓘ{I1} ⪤[R, ⋆s] L2 → + ∃∃I2,K2. K1 ⪤[R, ⋆s] K2 & L2 = K2.ⓘ{I2}. +#R #I1 #K1 #L2 #s #H elim (rex_inv_sort … H) -H * +[ #H destruct +| #Z1 #I2 #Y1 #K2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rex_inv_sort_bind_dx (R): ∀I2,K2,L1,s. L1 ⪤[R, ⋆s] K2.ⓘ{I2} → + ∃∃I1,K1. K1 ⪤[R, ⋆s] K2 & L1 = K1.ⓘ{I1}. +#R #I2 #K2 #L1 #s #H elim (rex_inv_sort … H) -H * +[ #_ #H destruct +| #I1 #Z2 #K1 #Y2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rex_inv_zero_pair_sn (R): ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R, #0] L2 → + ∃∃K2,V2. K1 ⪤[R, V1] K2 & R K1 V1 V2 & + L2 = K2.ⓑ{I}V2. +#R #I #L2 #K1 #V1 #H elim (rex_inv_zero … H) -H * +[ #H destruct +| #Z #Y1 #K2 #X1 #V2 #HK12 #HV12 #H1 #H2 destruct + /2 width=5 by ex3_2_intro/ +| #f #Z #Y1 #Y2 #_ #_ #H destruct +] +qed-. + +lemma rex_inv_zero_pair_dx (R): ∀I,L1,K2,V2. L1 ⪤[R, #0] K2.ⓑ{I}V2 → + ∃∃K1,V1. K1 ⪤[R, V1] K2 & R K1 V1 V2 & + L1 = K1.ⓑ{I}V1. +#R #I #L1 #K2 #V2 #H elim (rex_inv_zero … H) -H * +[ #_ #H destruct +| #Z #K1 #Y2 #V1 #X2 #HK12 #HV12 #H1 #H2 destruct + /2 width=5 by ex3_2_intro/ +| #f #Z #Y1 #Y2 #_ #_ #_ #H destruct +] +qed-. + +lemma rex_inv_zero_unit_sn (R): ∀I,K1,L2. K1.ⓤ{I} ⪤[R, #0] L2 → + ∃∃f,K2. 𝐈⦃f⦄ & K1 ⪤[cext2 R, cfull, f] K2 & + L2 = K2.ⓤ{I}. +#R #I #K1 #L2 #H elim (rex_inv_zero … H) -H * +[ #H destruct +| #Z #Y1 #Y2 #X1 #X2 #_ #_ #H destruct +| #f #Z #Y1 #K2 #Hf #HK12 #H1 #H2 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma rex_inv_zero_unit_dx (R): ∀I,L1,K2. L1 ⪤[R, #0] K2.ⓤ{I} → + ∃∃f,K1. 𝐈⦃f⦄ & K1 ⪤[cext2 R, cfull, f] K2 & + L1 = K1.ⓤ{I}. +#R #I #L1 #K2 #H elim (rex_inv_zero … H) -H * +[ #_ #H destruct +| #Z #Y1 #Y2 #X1 #X2 #_ #_ #_ #H destruct +| #f #Z #K1 #Y2 #Hf #HK12 #H1 #H2 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma rex_inv_lref_bind_sn (R): ∀I1,K1,L2,i. K1.ⓘ{I1} ⪤[R, #↑i] L2 → + ∃∃I2,K2. K1 ⪤[R, #i] K2 & L2 = K2.ⓘ{I2}. +#R #I1 #K1 #L2 #i #H elim (rex_inv_lref … H) -H * +[ #H destruct +| #Z1 #I2 #Y1 #K2 #Hi #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rex_inv_lref_bind_dx (R): ∀I2,K2,L1,i. L1 ⪤[R, #↑i] K2.ⓘ{I2} → + ∃∃I1,K1. K1 ⪤[R, #i] K2 & L1 = K1.ⓘ{I1}. +#R #I2 #K2 #L1 #i #H elim (rex_inv_lref … H) -H * +[ #_ #H destruct +| #I1 #Z2 #K1 #Y2 #Hi #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rex_inv_gref_bind_sn (R): ∀I1,K1,L2,l. K1.ⓘ{I1} ⪤[R, §l] L2 → + ∃∃I2,K2. K1 ⪤[R, §l] K2 & L2 = K2.ⓘ{I2}. +#R #I1 #K1 #L2 #l #H elim (rex_inv_gref … H) -H * +[ #H destruct +| #Z1 #I2 #Y1 #K2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +lemma rex_inv_gref_bind_dx (R): ∀I2,K2,L1,l. L1 ⪤[R, §l] K2.ⓘ{I2} → + ∃∃I1,K1. K1 ⪤[R, §l] K2 & L1 = K1.ⓘ{I1}. +#R #I2 #K2 #L1 #l #H elim (rex_inv_gref … H) -H * +[ #_ #H destruct +| #I1 #Z2 #K1 #Y2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma rex_fwd_zero_pair (R): ∀I,K1,K2,V1,V2. + K1.ⓑ{I}V1 ⪤[R, #0] K2.ⓑ{I}V2 → K1 ⪤[R, V1] K2. +#R #I #K1 #K2 #V1 #V2 #H +elim (rex_inv_zero_pair_sn … H) -H #Y #X #HK12 #_ #H destruct // +qed-. + +(* Basic_2A1: uses: llpx_sn_fwd_pair_sn llpx_sn_fwd_bind_sn llpx_sn_fwd_flat_sn *) +lemma rex_fwd_pair_sn (R): ∀I,L1,L2,V,T. L1 ⪤[R, ②{I}V.T] L2 → L1 ⪤[R, V] L2. +#R * [ #p ] #I #L1 #L2 #V #T * #f #Hf #HL +[ elim (frees_inv_bind … Hf) | elim (frees_inv_flat … Hf) ] -Hf +/4 width=6 by sle_sex_trans, sor_inv_sle_sn, ex2_intro/ +qed-. + +(* Basic_2A1: uses: llpx_sn_fwd_bind_dx llpx_sn_fwd_bind_O_dx *) +lemma rex_fwd_bind_dx (R): ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R, ⓑ{p,I}V1.T] L2 → + R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2. +#R #p #I #L1 #L2 #V1 #V2 #T #H #HV elim (rex_inv_bind … H HV) -H -HV // +qed-. + +(* Basic_2A1: uses: llpx_sn_fwd_flat_dx *) +lemma rex_fwd_flat_dx (R): ∀I,L1,L2,V,T. L1 ⪤[R, ⓕ{I}V.T] L2 → L1 ⪤[R, T] L2. +#R #I #L1 #L2 #V #T #H elim (rex_inv_flat … H) -H // +qed-. + +lemma rex_fwd_dx (R): ∀I2,L1,K2,T. L1 ⪤[R, T] K2.ⓘ{I2} → + ∃∃I1,K1. L1 = K1.ⓘ{I1}. +#R #I2 #L1 #K2 #T * #f elim (pn_split f) * #g #Hg #_ #Hf destruct +[ elim (sex_inv_push2 … Hf) | elim (sex_inv_next2 … Hf) ] -Hf #I1 #K1 #_ #_ #H destruct +/2 width=3 by ex1_2_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma rex_atom (R): ∀I. ⋆ ⪤[R, ⓪{I}] ⋆. +#R * /3 width=3 by frees_sort, frees_atom, frees_gref, sex_atom, ex2_intro/ +qed. + +lemma rex_sort (R): ∀I1,I2,L1,L2,s. + L1 ⪤[R, ⋆s] L2 → L1.ⓘ{I1} ⪤[R, ⋆s] L2.ⓘ{I2}. +#R #I1 #I2 #L1 #L2 #s * #f #Hf #H12 +lapply (frees_inv_sort … Hf) -Hf +/4 width=3 by frees_sort, sex_push, isid_push, ex2_intro/ +qed. + +lemma rex_pair (R): ∀I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 → + R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R, #0] L2.ⓑ{I}V2. +#R #I1 #I2 #L1 #L2 #V1 * +/4 width=3 by ext2_pair, frees_pair, sex_next, ex2_intro/ +qed. + +lemma rex_unit (R): ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R, cfull, f] L2 → + L1.ⓤ{I} ⪤[R, #0] L2.ⓤ{I}. +/4 width=3 by frees_unit, sex_next, ext2_unit, ex2_intro/ qed. + +lemma rex_lref (R): ∀I1,I2,L1,L2,i. + L1 ⪤[R, #i] L2 → L1.ⓘ{I1} ⪤[R, #↑i] L2.ⓘ{I2}. +#R #I1 #I2 #L1 #L2 #i * /3 width=3 by sex_push, frees_lref, ex2_intro/ +qed. + +lemma rex_gref (R): ∀I1,I2,L1,L2,l. + L1 ⪤[R, §l] L2 → L1.ⓘ{I1} ⪤[R, §l] L2.ⓘ{I2}. +#R #I1 #I2 #L1 #L2 #l * #f #Hf #H12 +lapply (frees_inv_gref … Hf) -Hf +/4 width=3 by frees_gref, sex_push, isid_push, ex2_intro/ +qed. + +lemma rex_bind_repl_dx (R): ∀I,I1,L1,L2,T. + L1.ⓘ{I} ⪤[R, T] L2.ⓘ{I1} → + ∀I2. cext2 R L1 I I2 → + L1.ⓘ{I} ⪤[R, T] L2.ⓘ{I2}. +#R #I #I1 #L1 #L2 #T * #f #Hf #HL12 #I2 #HR +/3 width=5 by sex_pair_repl, ex2_intro/ +qed-. + +(* Basic_2A1: uses: llpx_sn_co *) +lemma rex_co (R1) (R2): (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → + ∀L1,L2,T. L1 ⪤[R1, T] L2 → L1 ⪤[R2, T] L2. +#R1 #R2 #HR #L1 #L2 #T * /5 width=7 by sex_co, cext2_co, ex2_intro/ +qed-. + +lemma rex_isid (R1) (R2): ∀L1,L2,T1,T2. + (∀f. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → 𝐈⦃f⦄) → + (∀f. 𝐈⦃f⦄ → L1 ⊢ 𝐅*⦃T2⦄ ≘ f) → + L1 ⪤[R1, T1] L2 → L1 ⪤[R2, T2] L2. +#R1 #R2 #L1 #L2 #T1 #T2 #H1 #H2 * +/4 width=7 by sex_co_isid, ex2_intro/ +qed-. + +lemma rex_unit_sn (R1) (R2): + ∀I,K1,L2. K1.ⓤ{I} ⪤[R1, #0] L2 → K1.ⓤ{I} ⪤[R2, #0] L2. +#R1 #R2 #I #K1 #L2 #H +elim (rex_inv_zero_unit_sn … H) -H #f #K2 #Hf #HK12 #H destruct +/3 width=7 by rex_unit, sex_co_isid/ +qed-. + +(* Basic_2A1: removed theorems 9: + llpx_sn_skip llpx_sn_lref llpx_sn_free + llpx_sn_fwd_lref + llpx_sn_Y llpx_sn_ge_up llpx_sn_ge + llpx_sn_fwd_drop_sn llpx_sn_fwd_drop_dx +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex_drops.ma new file mode 100644 index 000000000..4e7315e11 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex_drops.ma @@ -0,0 +1,124 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/drops_cext2.ma". +include "static_2/relocation/drops_sex.ma". +include "static_2/static/frees_drops.ma". +include "static_2/static/rex.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +definition f_dedropable_sn: predicate (relation3 lenv term term) ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → + ∀K2,T. K1 ⪤[R, T] K2 → ∀U. ⬆*[f] T ≘ U → + ∃∃L2. L1 ⪤[R, U] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2. + +definition f_dropable_sn: predicate (relation3 lenv term term) ≝ + λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → + ∀L2,U. L1 ⪤[R, U] L2 → ∀T. ⬆*[f] T ≘ U → + ∃∃K2. K1 ⪤[R, T] K2 & ⬇*[b, f] L2 ≘ K2. + +definition f_dropable_dx: predicate (relation3 lenv term term) ≝ + λR. ∀L1,L2,U. L1 ⪤[R, U] L2 → + ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U → + ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[R, T] K2. + +definition f_transitive_next: relation3 … ≝ λR1,R2,R3. + ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → + ∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → + sex_transitive (cext2 R1) (cext2 R2) (cext2 R3) (cext2 R1) cfull g K I. + +(* Properties with generic slicing for local environments *******************) + +lemma rex_liftable_dedropable_sn: ∀R. (∀L. reflexive ? (R L)) → + d_liftable2_sn … lifts R → f_dedropable_sn R. +#R #H1R #H2R #b #f #L1 #K1 #HLK1 #K2 #T * #f1 #Hf1 #HK12 #U #HTU +elim (frees_total L1 U) #f2 #Hf2 +lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf +elim (sex_liftable_co_dedropable_sn … HLK1 … HK12 … Hf) -f1 -K1 +/3 width=6 by cext2_d_liftable2_sn, cfull_lift_sn, ext2_refl, ex3_intro, ex2_intro/ +qed-. + +lemma rex_trans_next: ∀R1,R2,R3. rex_transitive R1 R2 R3 → f_transitive_next R1 R2 R3. +#R1 #R2 #R3 #HR #f #L1 #T #Hf #g #I1 #K1 #n #HLK #Hgf #I #H +generalize in match HLK; -HLK elim H -I1 -I +[ #I #_ #L2 #_ #I2 #H + lapply (ext2_inv_unit_sn … H) -H #H destruct + /2 width=1 by ext2_unit/ +| #I #V1 #V #HV1 #HLK1 #L2 #HL12 #I2 #H + elim (ext2_inv_pair_sn … H) -H #V2 #HV2 #H destruct + elim (frees_inv_drops_next … Hf … HLK1 … Hgf) -f -HLK1 #f #Hf #Hfg + /5 width=5 by ext2_pair, sle_sex_trans, ex2_intro/ +] +qed. + +(* Inversion lemmas with generic slicing for local environments *************) + +(* Basic_2A1: uses: llpx_sn_inv_lift_le llpx_sn_inv_lift_be llpx_sn_inv_lift_ge *) +(* Basic_2A1: was: llpx_sn_drop_conf_O *) +lemma rex_dropable_sn: ∀R. f_dropable_sn R. +#R #b #f #L1 #K1 #HLK1 #H1f #L2 #U * #f2 #Hf2 #HL12 #T #HTU +elim (frees_total K1 T) #f1 #Hf1 +lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #H2f +elim (sex_co_dropable_sn … HLK1 … HL12 … H2f) -f2 -L1 +/3 width=3 by ex2_intro/ +qed-. + +(* Basic_2A1: was: llpx_sn_drop_trans_O *) +(* Note: the proof might be simplified *) +lemma rex_dropable_dx: ∀R. f_dropable_dx R. +#R #L1 #L2 #U * #f2 #Hf2 #HL12 #b #f #K2 #HLK2 #H1f #T #HTU +elim (drops_isuni_ex … H1f L1) #K1 #HLK1 +elim (frees_total K1 T) #f1 #Hf1 +lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -K1 #H2f +elim (sex_co_dropable_dx … HL12 … HLK2 … H2f) -L2 +/4 width=9 by frees_inv_lifts, ex2_intro/ +qed-. + +(* Basic_2A1: uses: llpx_sn_inv_lift_O *) +lemma rex_inv_lifts_bi: ∀R,L1,L2,U. L1 ⪤[R, U] L2 → ∀b,f. 𝐔⦃f⦄ → + ∀K1,K2. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → + ∀T. ⬆*[f] T ≘ U → K1 ⪤[R, T] K2. +#R #L1 #L2 #U #HL12 #b #f #Hf #K1 #K2 #HLK1 #HLK2 #T #HTU +elim (rex_dropable_sn … HLK1 … HL12 … HTU) -L1 -U // #Y #HK12 #HY +lapply (drops_mono … HY … HLK2) -b -f -L2 #H destruct // +qed-. + +lemma rex_inv_lref_pair_sn: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 → + ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R, V1] K2 & R K1 V1 V2. +#R #L1 #L2 #i #HL12 #I #K1 #V1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 // +#Y #HY #HLK2 elim (rex_inv_zero_pair_sn … HY) -HY +#K2 #V2 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma rex_inv_lref_pair_dx: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 → + ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R, V1] K2 & R K1 V1 V2. +#R #L1 #L2 #i #HL12 #I #K2 #V2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 // +#Y #HLK1 #HY elim (rex_inv_zero_pair_dx … HY) -HY +#K1 #V1 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma rex_inv_lref_unit_sn: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} → + ∃∃f,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} & K1 ⪤[cext2 R, cfull, f] K2 & 𝐈⦃f⦄. +#R #L1 #L2 #i #HL12 #I #K1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 // +#Y #HY #HLK2 elim (rex_inv_zero_unit_sn … HY) -HY +#f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma rex_inv_lref_unit_dx: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} → + ∃∃f,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} & K1 ⪤[cext2 R, cfull, f] K2 & 𝐈⦃f⦄. +#R #L1 #L2 #i #HL12 #I #K2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 // +#Y #HLK1 #HY elim (rex_inv_zero_unit_dx … HY) -HY +#f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex_fqup.ma new file mode 100644 index 000000000..c45914f34 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex_fqup.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/static/frees_fqup.ma". +include "static_2/static/rex.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +(* Advanced properties ******************************************************) + +(* Basic_2A1: uses: llpx_sn_refl *) +lemma rex_refl: ∀R. (∀L. reflexive … (R L)) → ∀L,T. L ⪤[R, T] L. +#R #HR #L #T elim (frees_total L T) +/4 width=3 by sex_refl, ext2_refl, ex2_intro/ +qed. + +lemma rex_pair_refl: ∀R. (∀L. reflexive … (R L)) → + ∀L,V1,V2. R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤[R, T] L.ⓑ{I}V2. +#R #HR #L #V1 #V2 #HV12 #I #T +elim (frees_total (L.ⓑ{I}V1) T) #f #Hf +elim (pn_split f) * #g #H destruct +/5 width=3 by sex_refl, sex_next, sex_push, ext2_refl, ext2_pair, ex2_intro/ +qed. + +(* Advanced inversion lemmas ************************************************) + +lemma rex_inv_bind_void: ∀R,p,I,L1,L2,V,T. L1 ⪤[R, ⓑ{p,I}V.T] L2 → + L1 ⪤[R, V] L2 ∧ L1.ⓧ ⪤[R, T] L2.ⓧ. +#R #p #I #L1 #L2 #V #T * #f #Hf #HL elim (frees_inv_bind_void … Hf) -Hf +/6 width=6 by sle_sex_trans, sex_inv_tl, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/ +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma rex_fwd_bind_dx_void: ∀R,p,I,L1,L2,V,T. L1 ⪤[R, ⓑ{p,I}V.T] L2 → + L1.ⓧ ⪤[R, T] L2.ⓧ. +#R #p #I #L1 #L2 #V #T #H elim (rex_inv_bind_void … H) -H // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex_fsle.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex_fsle.ma new file mode 100644 index 000000000..24f68014d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex_fsle.ma @@ -0,0 +1,176 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/sex_length.ma". +include "static_2/static/fsle_fsle.ma". +include "static_2/static/rex_drops.ma". +include "static_2/static/rex_rex.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +definition R_fsge_compatible: predicate (relation3 …) ≝ λRN. + ∀L,T1,T2. RN L T1 T2 → ⦃L, T2⦄ ⊆ ⦃L, T1⦄. + +definition rex_fsge_compatible: predicate (relation3 …) ≝ λRN. + ∀L1,L2,T. L1 ⪤[RN, T] L2 → ⦃L2, T⦄ ⊆ ⦃L1, T⦄. + +definition rex_fsle_compatible: predicate (relation3 …) ≝ λRN. + ∀L1,L2,T. L1 ⪤[RN, T] L2 → ⦃L1, T⦄ ⊆ ⦃L2, T⦄. + +(* Basic inversions with free variables inclusion for restricted closures ***) + +lemma frees_sex_conf: ∀R. rex_fsge_compatible R → + ∀L1,T,f1. L1 ⊢ 𝐅*⦃T⦄ ≘ f1 → + ∀L2. L1 ⪤[cext2 R, cfull, f1] L2 → + ∃∃f2. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 & f2 ⊆ f1. +#R #HR #L1 #T #f1 #Hf1 #L2 #H1L +lapply (HR L1 L2 T ?) /2 width=3 by ex2_intro/ #H2L +@(fsle_frees_trans_eq … H2L … Hf1) /3 width=4 by sex_fwd_length, sym_eq/ +qed-. + +(* Properties with free variables inclusion for restricted closures *********) + +(* Note: we just need lveq_inv_refl: ∀L,n1,n2. L ≋ⓧ*[n1, n2] L → ∧∧ 0 = n1 & 0 = n2 *) +lemma fsge_rex_trans: ∀R,L1,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L1, T2⦄ → + ∀L2. L1 ⪤[R, T2] L2 → L1 ⪤[R, T1] L2. +#R #L1 #T1 #T2 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #Hn #Hf #L2 #HL12 +elim (lveq_inj_length … Hn ?) // #H1 #H2 destruct +/4 width=5 by rex_inv_frees, sle_sex_trans, ex2_intro/ +qed-. + +lemma rex_sym: ∀R. rex_fsge_compatible R → + (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) → + ∀T. symmetric … (rex R T). +#R #H1R #H2R #T #L1 #L2 +* #f1 #Hf1 #HL12 +elim (frees_sex_conf … Hf1 … HL12) -Hf1 // +/5 width=5 by sle_sex_trans, sex_sym, cext2_sym, ex2_intro/ +qed-. + +lemma rex_pair_sn_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → + rex_fsge_compatible R1 → + ∀L1,L2,V. L1 ⪤[R1, V] L2 → ∀I,T. + ∃∃L. L1 ⪤[R1, ②{I}V.T] L & L ⪤[R2, V] L2. +#R1 #R2 #HR1 #HR2 #HR #L1 #L2 #V * #f #Hf #HL12 * [ #p ] #I #T +[ elim (frees_total L1 (ⓑ{p,I}V.T)) #g #Hg + elim (frees_inv_bind … Hg) #y1 #y2 #H #_ #Hy +| elim (frees_total L1 (ⓕ{I}V.T)) #g #Hg + elim (frees_inv_flat … Hg) #y1 #y2 #H #_ #Hy +] +lapply(frees_mono … H … Hf) -H #H1 +lapply (sor_eq_repl_back1 … Hy … H1) -y1 #Hy +lapply (sor_inv_sle_sn … Hy) -y2 #Hfg +elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #L #HL1 #HL2 +lapply (sle_sex_trans … HL1 … Hfg) // #H +elim (frees_sex_conf … Hf … H) -Hf -H +/4 width=7 by sle_sex_trans, ex2_intro/ +qed-. + +lemma rex_flat_dx_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → + rex_fsge_compatible R1 → + ∀L1,L2,T. L1 ⪤[R1, T] L2 → ∀I,V. + ∃∃L. L1 ⪤[R1, ⓕ{I}V.T] L & L ⪤[R2, T] L2. +#R1 #R2 #HR1 #HR2 #HR #L1 #L2 #T * #f #Hf #HL12 #I #V +elim (frees_total L1 (ⓕ{I}V.T)) #g #Hg +elim (frees_inv_flat … Hg) #y1 #y2 #_ #H #Hy +lapply(frees_mono … H … Hf) -H #H2 +lapply (sor_eq_repl_back2 … Hy … H2) -y2 #Hy +lapply (sor_inv_sle_dx … Hy) -y1 #Hfg +elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #L #HL1 #HL2 +lapply (sle_sex_trans … HL1 … Hfg) // #H +elim (frees_sex_conf … Hf … H) -Hf -H +/4 width=7 by sle_sex_trans, ex2_intro/ +qed-. + +lemma rex_bind_dx_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → + rex_fsge_compatible R1 → + ∀I,L1,L2,V1,T. L1.ⓑ{I}V1 ⪤[R1, T] L2 → ∀p. + ∃∃L,V. L1 ⪤[R1, ⓑ{p,I}V1.T] L & L.ⓑ{I}V ⪤[R2, T] L2 & R1 L1 V1 V. +#R1 #R2 #HR1 #HR2 #HR #I #L1 #L2 #V1 #T * #f #Hf #HL12 #p +elim (frees_total L1 (ⓑ{p,I}V1.T)) #g #Hg +elim (frees_inv_bind … Hg) #y1 #y2 #_ #H #Hy +lapply(frees_mono … H … Hf) -H #H2 +lapply (tl_eq_repl … H2) -H2 #H2 +lapply (sor_eq_repl_back2 … Hy … H2) -y2 #Hy +lapply (sor_inv_sle_dx … Hy) -y1 #Hfg +lapply (sle_inv_tl_sn … Hfg) -Hfg #Hfg +elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #Y #H #HL2 +lapply (sle_sex_trans … H … Hfg) // #H0 +elim (sex_inv_next1 … H) -H #Z #L #HL1 #H +elim (ext2_inv_pair_sn … H) -H #V #HV #H1 #H2 destruct +elim (frees_sex_conf … Hf … H0) -Hf -H0 +/4 width=7 by sle_sex_trans, ex3_2_intro, ex2_intro/ +qed-. + +lemma rex_bind_dx_split_void: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) → + rex_fsge_compatible R1 → + ∀L1,L2,T. L1.ⓧ ⪤[R1, T] L2 → ∀p,I,V. + ∃∃L. L1 ⪤[R1, ⓑ{p,I}V.T] L & L.ⓧ ⪤[R2, T] L2. +#R1 #R2 #HR1 #HR2 #HR #L1 #L2 #T * #f #Hf #HL12 #p #I #V +elim (frees_total L1 (ⓑ{p,I}V.T)) #g #Hg +elim (frees_inv_bind_void … Hg) #y1 #y2 #_ #H #Hy +lapply(frees_mono … H … Hf) -H #H2 +lapply (tl_eq_repl … H2) -H2 #H2 +lapply (sor_eq_repl_back2 … Hy … H2) -y2 #Hy +lapply (sor_inv_sle_dx … Hy) -y1 #Hfg +lapply (sle_inv_tl_sn … Hfg) -Hfg #Hfg +elim (sex_sle_split (cext2 R1) (cext2 R2) … HL12 … Hfg) -HL12 /2 width=1 by ext2_refl/ #Y #H #HL2 +lapply (sle_sex_trans … H … Hfg) // #H0 +elim (sex_inv_next1 … H) -H #Z #L #HL1 #H +elim (ext2_inv_unit_sn … H) -H #H destruct +elim (frees_sex_conf … Hf … H0) -Hf -H0 +/4 width=7 by sle_sex_trans, ex2_intro/ (* note: 2 ex2_intro *) +qed-. + +(* Main properties with free variables inclusion for restricted closures ****) + +theorem rex_conf: ∀R1,R2. + rex_fsge_compatible R1 → + rex_fsge_compatible R2 → + R_confluent2_rex R1 R2 R1 R2 → + ∀T. confluent2 … (rex R1 T) (rex R2 T). +#R1 #R2 #HR1 #HR2 #HR12 #T #L0 #L1 * #f1 #Hf1 #HL01 #L2 * #f #Hf #HL02 +lapply (frees_mono … Hf1 … Hf) -Hf1 #Hf12 +lapply (sex_eq_repl_back … HL01 … Hf12) -f1 #HL01 +elim (sex_conf … HL01 … HL02) /2 width=3 by ex2_intro/ [ | -HL01 -HL02 ] +[ #L #HL1 #HL2 + elim (frees_sex_conf … Hf … HL01) // -HR1 -HL01 #f1 #Hf1 #H1 + elim (frees_sex_conf … Hf … HL02) // -HR2 -HL02 #f2 #Hf2 #H2 + lapply (sle_sex_trans … HL1 … H1) // -HL1 -H1 #HL1 + lapply (sle_sex_trans … HL2 … H2) // -HL2 -H2 #HL2 + /3 width=5 by ex2_intro/ +| #g * #I0 [2: #V0 ] #K0 #n #HLK0 #Hgf #Z1 #H1 #Z2 #H2 #K1 #HK01 #K2 #HK02 + [ elim (ext2_inv_pair_sn … H1) -H1 #V1 #HV01 #H destruct + elim (ext2_inv_pair_sn … H2) -H2 #V2 #HV02 #H destruct + elim (frees_inv_drops_next … Hf … HLK0 … Hgf) -Hf -HLK0 -Hgf #g0 #Hg0 #H0 + lapply (sle_sex_trans … HK01 … H0) // -HK01 #HK01 + lapply (sle_sex_trans … HK02 … H0) // -HK02 #HK02 + elim (HR12 … HV01 … HV02 K1 … K2) /3 width=3 by ext2_pair, ex2_intro/ + | lapply (ext2_inv_unit_sn … H1) -H1 #H destruct + lapply (ext2_inv_unit_sn … H2) -H2 #H destruct + /3 width=3 by ext2_unit, ex2_intro/ + ] +] +qed-. + +theorem rex_trans_fsle: ∀R1,R2,R3. + rex_fsle_compatible R1 → f_transitive_next R1 R2 R3 → + ∀L1,L,T. L1 ⪤[R1, T] L → + ∀L2. L ⪤[R2, T] L2 → L1 ⪤[R3, T] L2. +#R1 #R2 #R3 #H1R #H2R #L1 #L #T #H +lapply (H1R … H) -H1R #H0 +cases H -H #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2 +lapply (fsle_inv_frees_eq … H0 … Hf1 … Hf2) -H0 -Hf2 +/4 width=14 by sex_trans_gen, sex_fwd_length, sle_sex_trans, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex_length.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex_length.ma new file mode 100644 index 000000000..e279e159d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex_length.ma @@ -0,0 +1,72 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/sex_length.ma". +include "static_2/static/rex_drops.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: uses: llpx_sn_fwd_length *) +lemma rex_fwd_length (R): ∀L1,L2,T. L1 ⪤[R, T] L2 → |L1| = |L2|. +#R #L1 #L2 #T * /2 width=4 by sex_fwd_length/ +qed-. + +(* Properties with length for local environments ****************************) + +(* Basic_2A1: uses: llpx_sn_sort *) +lemma rex_sort_length (R): ∀L1,L2. |L1| = |L2| → ∀s. L1 ⪤[R, ⋆s] L2. +#R #L1 elim L1 -L1 +[ #Y #H #s >(length_inv_zero_sn … H) -H // +| #K1 #I1 #IH #Y #H #s + elim (length_inv_succ_sn … H) -H #I2 #K2 #HK12 #H destruct + /3 width=1 by rex_sort/ +] +qed. + +(* Basic_2A1: uses: llpx_sn_gref *) +lemma rex_gref_length (R): ∀L1,L2. |L1| = |L2| → ∀l. L1 ⪤[R, §l] L2. +#R #L1 elim L1 -L1 +[ #Y #H #s >(length_inv_zero_sn … H) -H // +| #K1 #I1 #IH #Y #H #s + elim (length_inv_succ_sn … H) -H #I2 #K2 #HK12 #H destruct + /3 width=1 by rex_gref/ +] +qed. + +lemma rex_unit_length (R): ∀L1,L2. |L1| = |L2| → ∀I. L1.ⓤ{I} ⪤[R, #0] L2.ⓤ{I}. +/3 width=3 by rex_unit, sex_length_isid/ qed. + +(* Basic_2A1: uses: llpx_sn_lift_le llpx_sn_lift_ge *) +lemma rex_lifts_bi (R): d_liftable2_sn … lifts R → + ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ⪤[R, T] K2 → + ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → + ∀U. ⬆*[f] T ≘ U → L1 ⪤[R, U] L2. +#R #HR #L1 #L2 #HL12 #K1 #K2 #T * #f1 #Hf1 #HK12 #b #f #HLK1 #HLK2 #U #HTU +elim (frees_total L1 U) #f2 #Hf2 +lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf +/4 width=12 by sex_length_cfull, sex_liftable_co_dedropable_bi, cext2_d_liftable2_sn, cfull_lift_sn, ex2_intro/ +qed-. + +(* Inversion lemmas with length for local environment ***********************) + +lemma rex_inv_zero_length (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 & R L1 V1 V2 & + Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 + | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. +#R #Y1 #Y2 #H elim (rex_inv_zero … H) -H * +/4 width=9 by sex_fwd_length, ex4_5_intro, ex3_3_intro, or3_intro2, or3_intro1, or3_intro0, conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex_lex.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex_lex.ma new file mode 100644 index 000000000..ffaebbc2e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex_lex.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/lex.ma". +include "static_2/static/rex_fsle.ma". +include "static_2/static/req.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +(* Properties with generic extension of a context-sensitive relation ********) + +lemma rex_lex: ∀R,L1,L2. L1 ⪤[R] L2 → ∀T. L1 ⪤[R, T] L2. +#R #L1 #L2 * #f #Hf #HL12 #T +elim (frees_total L1 T) #g #Hg +/4 width=5 by sex_sdj, sdj_isid_sn, ex2_intro/ +qed. + +(* Inversion lemmas with generic extension of a context sensitive relation **) + +lemma rex_inv_lex_req: ∀R. c_reflexive … R → + rex_fsge_compatible R → + ∀L1,L2,T. L1 ⪤[R, T] L2 → + ∃∃L. L1 ⪤[R] L & L ≡[T] L2. +#R #H1R #H2R #L1 #L2 #T * #f1 #Hf1 #HL +elim (sex_sdj_split … ceq_ext … HL 𝐈𝐝 ?) -HL +[ #L0 #HL10 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ] -H1R +lapply (sex_sdj … HL10 f1 ?) /2 width=1 by sdj_isid_sn/ #H +elim (frees_sex_conf … Hf1 … H) // -H2R -H #f0 #Hf0 #Hf01 +/4 width=7 by sle_sex_trans, (* 2x *) ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/rex_rex.ma b/matita/matita/contribs/lambdadelta/static_2/static/rex_rex.ma new file mode 100644 index 000000000..08a4f192c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/rex_rex.ma @@ -0,0 +1,89 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/relocation/sex_sex.ma". +include "static_2/static/frees_fqup.ma". +include "static_2/static/rex.ma". + +(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****) + +(* Advanced inversion lemmas ************************************************) + +lemma rex_inv_frees: ∀R,L1,L2,T. L1 ⪤[R, T] L2 → + ∀f. L1 ⊢ 𝐅*⦃T⦄ ≘ f → L1 ⪤[cext2 R, cfull, f] L2. +#R #L1 #L2 #T * /3 width=6 by frees_mono, sex_eq_repl_back/ +qed-. + +(* Advanced properties ******************************************************) + +(* Basic_2A1: uses: llpx_sn_dec *) +lemma rex_dec: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → + ∀L1,L2,T. Decidable (L1 ⪤[R, T] L2). +#R #HR #L1 #L2 #T +elim (frees_total L1 T) #f #Hf +elim (sex_dec (cext2 R) cfull … L1 L2 f) +/4 width=3 by rex_inv_frees, cfull_dec, ext2_dec, ex2_intro, or_intror, or_introl/ +qed-. + +(* Main properties **********************************************************) + +(* Basic_2A1: uses: llpx_sn_bind llpx_sn_bind_O *) +theorem rex_bind: ∀R,p,I,L1,L2,V1,V2,T. + L1 ⪤[R, V1] L2 → L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2 → + L1 ⪤[R, ⓑ{p,I}V1.T] L2. +#R #p #I #L1 #L2 #V1 #V2 #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 +lapply (sex_fwd_bind … Hf2) -Hf2 #Hf2 elim (sor_isfin_ex f1 (⫱f2)) +/3 width=7 by frees_fwd_isfin, frees_bind, sex_join, isfin_tl, ex2_intro/ +qed. + +(* Basic_2A1: llpx_sn_flat *) +theorem rex_flat: ∀R,I,L1,L2,V,T. + L1 ⪤[R, V] L2 → L1 ⪤[R, T] L2 → + L1 ⪤[R, ⓕ{I}V.T] L2. +#R #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 elim (sor_isfin_ex f1 f2) +/3 width=7 by frees_fwd_isfin, frees_flat, sex_join, ex2_intro/ +qed. + +theorem rex_bind_void: ∀R,p,I,L1,L2,V,T. + L1 ⪤[R, V] L2 → L1.ⓧ ⪤[R, T] L2.ⓧ → + L1 ⪤[R, ⓑ{p,I}V.T] L2. +#R #p #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 +lapply (sex_fwd_bind … Hf2) -Hf2 #Hf2 elim (sor_isfin_ex f1 (⫱f2)) +/3 width=7 by frees_fwd_isfin, frees_bind_void, sex_join, isfin_tl, ex2_intro/ +qed. + +(* Negated inversion lemmas *************************************************) + +(* Basic_2A1: uses: nllpx_sn_inv_bind nllpx_sn_inv_bind_O *) +lemma rnex_inv_bind: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → + ∀p,I,L1,L2,V,T. (L1 ⪤[R, ⓑ{p,I}V.T] L2 → ⊥) → + (L1 ⪤[R, V] L2 → ⊥) ∨ (L1.ⓑ{I}V ⪤[R, T] L2.ⓑ{I}V → ⊥). +#R #HR #p #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V) +/4 width=2 by rex_bind, or_intror, or_introl/ +qed-. + +(* Basic_2A1: uses: nllpx_sn_inv_flat *) +lemma rnex_inv_flat: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → + ∀I,L1,L2,V,T. (L1 ⪤[R, ⓕ{I}V.T] L2 → ⊥) → + (L1 ⪤[R, V] L2 → ⊥) ∨ (L1 ⪤[R, T] L2 → ⊥). +#R #HR #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V) +/4 width=1 by rex_flat, or_intror, or_introl/ +qed-. + +lemma rnex_inv_bind_void: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) → + ∀p,I,L1,L2,V,T. (L1 ⪤[R, ⓑ{p,I}V.T] L2 → ⊥) → + (L1 ⪤[R, V] L2 → ⊥) ∨ (L1.ⓧ ⪤[R, T] L2.ⓧ → ⊥). +#R #HR #p #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V) +/4 width=2 by rex_bind_void, or_intror, or_introl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/aarity.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/aarity.ma new file mode 100644 index 000000000..89199fabb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/aarity.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES + * Initial invocation: - Patience on me to gain peace and perfection! - + *) + +include "ground_2/lib/relations.ma". +include "static_2/notation/functions/item0_0.ma". +include "static_2/notation/functions/snitem2_2.ma". + +(* ATOMIC ARITY *************************************************************) + +inductive aarity: Type[0] ≝ + | AAtom: aarity (* atomic aarity construction *) + | APair: aarity → aarity → aarity (* binary aarity construction *) +. + +interpretation "atomic arity construction (atomic)" + 'Item0 = AAtom. + +interpretation "atomic arity construction (binary)" + 'SnItem2 A1 A2 = (APair A1 A2). + +(* Basic inversion lemmas ***************************************************) + +fact destruct_apair_apair_aux: ∀A1,A2,B1,B2. ②B1.A1 = ②B2.A2 → B1 = B2 ∧ A1 = A2. +#A1 #A2 #B1 #B2 #H destruct /2 width=1 by conj/ +qed-. + +lemma discr_apair_xy_x: ∀A,B. ②B.A = B → ⊥. +#A #B elim B -B +[ #H destruct +| #Y #X #IHY #_ #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic_2A1: was: discr_tpair_xy_y *) +lemma discr_apair_xy_y: ∀B,A. ②B. A = A → ⊥. +#B #A elim A -A +[ #H destruct +| #Y #X #_ #IHX #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic properties *********************************************************) + +lemma eq_aarity_dec: ∀A1,A2:aarity. Decidable (A1 = A2). +#A1 elim A1 -A1 +[ #A2 elim A2 -A2 /2 width=1 by or_introl/ + #B2 #A2 #_ #_ @or_intror #H destruct +| #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2 + [ -IHB1 -IHA1 @or_intror #H destruct + | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1 + [ #H destruct elim (IHA1 A2) -IHA1 + [ #H destruct /2 width=1 by or_introl/ + | #HA12 @or_intror #H destruct /2 width=1 by/ + ] + | -IHA1 #HB12 @or_intror #H destruct /2 width=1 by/ + ] + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/append.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/append.ma new file mode 100644 index 000000000..ec9ac39da --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/append.ma @@ -0,0 +1,100 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/snitem_2.ma". +include "static_2/notation/functions/snbind1_2.ma". +include "static_2/notation/functions/snbind2_3.ma". +include "static_2/notation/functions/snvoid_1.ma". +include "static_2/notation/functions/snabbr_2.ma". +include "static_2/notation/functions/snabst_2.ma". +include "static_2/syntax/lenv.ma". + +(* APPEND FOR LOCAL ENVIRONMENTS ********************************************) + +rec definition append L K on K ≝ match K with +[ LAtom ⇒ L +| LBind K I ⇒ (append L K).ⓘ{I} +]. + +interpretation "append (local environment)" 'plus L1 L2 = (append L1 L2). + +interpretation "local environment tail binding construction (generic)" + 'SnItem I L = (append (LBind LAtom I) L). + +interpretation "local environment tail binding construction (unary)" + 'SnBind1 I L = (append (LBind LAtom (BUnit I)) L). + +interpretation "local environment tail binding construction (binary)" + 'SnBind2 I T L = (append (LBind LAtom (BPair I T)) L). + +interpretation "tail exclusion (local environment)" + 'SnVoid L = (append (LBind LAtom (BUnit Void)) L). + +interpretation "tail abbreviation (local environment)" + 'SnAbbr T L = (append (LBind LAtom (BPair Abbr T)) L). + +interpretation "tail abstraction (local environment)" + 'SnAbst L T = (append (LBind LAtom (BPair Abst T)) L). + +definition d_appendable_sn: predicate (lenv→relation term) ≝ λR. + ∀K,T1,T2. R K T1 T2 → ∀L. R (L+K) T1 T2. + +(* Basic properties *********************************************************) + +lemma append_atom: ∀L. (L + ⋆) = L. (**) (* () should be redundant *) +// qed. + +(* Basic_2A1: uses: append_pair *) +lemma append_bind: ∀I,L,K. L+(K.ⓘ{I}) = (L+K).ⓘ{I}. +// qed. + +lemma append_atom_sn: ∀L. ⋆ + L = L. +#L elim L -L // +#L #I >append_bind // +qed. + +lemma append_assoc: associative … append. +#L1 #L2 #L3 elim L3 -L3 // +qed. + +lemma append_shift: ∀L,K,I. L+(ⓘ{I}.K) = (L.ⓘ{I})+K. +#L #K #I append_bind #H destruct +qed-. + +lemma append_inv_bind3_sn: ∀I0,L,L0,K. L0.ⓘ{I0} = L + K → + ∨∨ ∧∧ L0.ⓘ{I0} = L & ⋆ = K + | ∃∃K0. K = K0.ⓘ{I0} & L0 = L + K0. +#I0 #L #L0 * /3 width=1 by or_introl, conj/ +#K #I >append_bind #H destruct /3 width=3 by ex2_intro, or_intror/ +qed-. + +lemma append_inj_sn: ∀K,L1,L2. L1+K = L2+K → L1 = L2. +#K elim K -K // +#K #I #IH #L1 #L2 >append_bind #H +elim (destruct_lbind_lbind_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +qed-. + +(* Basic_1: uses: chead_ctail *) +(* Basic_2A1: uses: lpair_ltail *) +lemma lenv_case_tail: ∀L. L = ⋆ ∨ ∃∃K,I. L = ⓘ{I}.K. +#L elim L -L /2 width=1 by or_introl/ +#L #I * [2: * ] /3 width=3 by ex1_2_intro, or_intror/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/append_length.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/append_length.ma new file mode 100644 index 000000000..1945bac9f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/append_length.ma @@ -0,0 +1,112 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lenv_length.ma". +include "static_2/syntax/append.ma". + +(* APPEND FOR LOCAL ENVIRONMENTS ********************************************) + +(* Properties with length for local environments ****************************) + +lemma append_length: ∀L1,L2. |L1 + L2| = |L1| + |L2|. +#L1 #L2 elim L2 -L2 // +#L2 #I >append_bind >length_bind >length_bind // +qed. + +lemma ltail_length: ∀I,L. |ⓘ{I}.L| = ↑|L|. +#I #L >append_length // +qed. + +(* Advanced inversion lemmas on length for local environments ***************) + +(* Basic_2A1: was: length_inv_pos_dx_ltail *) +lemma length_inv_succ_dx_ltail: ∀L,n. |L| = ↑n → + ∃∃I,K. |K| = n & L = ⓘ{I}.K. +#Y #n #H elim (length_inv_succ_dx … H) -H #I #L #Hn #HLK destruct +elim (lenv_case_tail … L) [2: * #K #J ] +#H destruct /2 width=4 by ex2_2_intro/ +qed-. + +(* Basic_2A1: was: length_inv_pos_sn_ltail *) +lemma length_inv_succ_sn_ltail: ∀L,n. ↑n = |L| → + ∃∃I,K. n = |K| & L = ⓘ{I}.K. +#Y #n #H elim (length_inv_succ_sn … H) -H #I #L #Hn #HLK destruct +elim (lenv_case_tail … L) [2: * #K #J ] +#H destruct /2 width=4 by ex2_2_intro/ +qed-. + +(* Inversion lemmas with length for local environments **********************) + +(* Basic_2A1: was: append_inj_sn *) +lemma append_inj_length_sn: ∀K1,K2,L1,L2. L1 + K1 = L2 + K2 → |K1| = |K2| → + L1 = L2 ∧ K1 = K2. +#K1 elim K1 -K1 +[ * /2 width=1 by conj/ + #K2 #I2 #L1 #L2 #_ >length_atom >length_bind + #H destruct +| #K1 #I1 #IH * + [ #L1 #L2 #_ >length_atom >length_bind + #H destruct + | #K2 #I2 #L1 #L2 #H1 >length_bind >length_bind #H2 + elim (destruct_lbind_lbind_aux … H1) -H1 #H1 #H3 destruct (**) (* destruct lemma needed *) + elim (IH … H1) -IH -H1 /3 width=4 by conj/ + ] +] +qed-. + +(* Note: lemma 750 *) +(* Basic_2A1: was: append_inj_dx *) +lemma append_inj_length_dx: ∀K1,K2,L1,L2. L1 + K1 = L2 + K2 → |L1| = |L2| → + L1 = L2 ∧ K1 = K2. +#K1 elim K1 -K1 +[ * /2 width=1 by conj/ + #K2 #I2 #L1 #L2 >append_atom >append_bind #H destruct + >length_bind >append_length >plus_n_Sm + #H elim (plus_xSy_x_false … H) +| #K1 #I1 #IH * + [ #L1 #L2 >append_bind >append_atom #H destruct + >length_bind >append_length >plus_n_Sm #H + lapply (discr_plus_x_xy … H) -H #H destruct + | #K2 #I2 #L1 #L2 >append_bind >append_bind #H1 #H2 + elim (destruct_lbind_lbind_aux … H1) -H1 #H1 #H3 destruct (**) (* destruct lemma needed *) + elim (IH … H1) -IH -H1 /2 width=1 by conj/ + ] +] +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma append_inj_dx: ∀L,K1,K2. L+K1 = L+K2 → K1 = K2. +#L #K1 #K2 #H elim (append_inj_length_dx … H) -H // +qed-. + +lemma append_inv_refl_dx: ∀L,K. L+K = L → K = ⋆. +#L #K #H elim (append_inj_dx … (⋆) … H) // +qed-. + +lemma append_inv_pair_dx: ∀I,L,K,V. L+K = L.ⓑ{I}V → K = ⋆.ⓑ{I}V. +#I #L #K #V #H elim (append_inj_dx … (⋆.ⓑ{I}V) … H) // +qed-. + +(* Basic eliminators ********************************************************) + +(* Basic_1: was: c_tail_ind *) +(* Basic_2A1: was: lenv_ind_alt *) +lemma lenv_ind_tail: ∀Q:predicate lenv. + Q (⋆) → (∀I,L. Q L → Q (ⓘ{I}.L)) → ∀L. Q L. +#Q #IH1 #IH2 #L @(f_ind … length … L) -L #x #IHx * // +#L #I -IH1 #H destruct +elim (lenv_case_tail … L) [2: * #K #J ] +#H destruct /3 width=1 by/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/bind.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/bind.ma new file mode 100644 index 000000000..e7c09081e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/bind.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term.ma". + +(* BINDERS FOR LOCAL ENVIRONMENTS ******************************************) + +inductive bind: Type[0] ≝ +| BUnit: bind1 → bind +| BPair: bind2 → term → bind +. + +(* Basic properties ********************************************************) + +lemma eq_bind_dec: ∀I1,I2:bind. Decidable (I1 = I2). +* #I1 [2: #V1 ] * #I2 [2,4: #V2 ] +[1: elim (eq_bind2_dec I1 I2) #HI + [ elim (eq_term_dec V1 V2) #HV ] +|4: elim (eq_bind1_dec I1 I2) #HI +] +/2 width=1 by or_introl/ +@or_intror #H destruct /2 width=1 by/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/bind_weight.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/bind_weight.ma new file mode 100644 index 000000000..c1f512f33 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/bind_weight.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_weight.ma". +include "static_2/syntax/bind.ma". + +(* WEIGHT OF A BINDER FOR LOCAL ENVIRONMENTS *******************************) + +rec definition bw I ≝ match I with +[ BUnit _ ⇒ 1 +| BPair _ V ⇒ ♯{V} +]. + +interpretation "weight (binder for local environments)" 'Weight I = (bw I). + +(* Basic properties *********************************************************) + +lemma bw_pos: ∀I. 1 ≤ ♯{I}. +* // +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext.ma new file mode 100644 index 000000000..63b3e2102 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/cext2.ma". + +(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************) + +definition ceq_ext: lenv → relation bind ≝ + cext2 ceq. + +(* Basic properties *********************************************************) + +lemma ceq_ext_refl (L): reflexive … (ceq_ext L). +/2 width=1 by ext2_refl/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma ceq_ext_inv_eq: ∀L,I1,I2. ceq_ext L I1 I2 → I1 = I2. +#L #I1 #I2 * -I1 -I2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext_ceq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext_ceq_ext.ma new file mode 100644 index 000000000..020230a93 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext_ceq_ext.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ceq_ext.ma". + +(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************) + +(* Main properties **********************************************************) + +theorem ceq_ext_trans: ∀L1,I1,I. ceq_ext L1 I1 I → + ∀L2,I2. ceq_ext L2 I I2 → ∀L3. ceq_ext L3 I1 I2. +#L1 #I1 #I * -I1 -I // +#I1 #V1 #V #HV1 #L2 #Z #H elim (ext2_inv_pair_sn … H) -H // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/cext2.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/cext2.ma new file mode 100644 index 000000000..8ccf4e9fc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/cext2.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ext2.ma". +include "static_2/syntax/lenv.ma". + +(* EXTENSION TO BINDERS OF A CONTEXT-SENSITIVE RELATION FOR TERMS ***********) + +definition cext2: (lenv → relation term) → lenv → relation bind ≝ + λR,L. ext2 (R L). + +(* Basic properties *********************************************************) + +lemma cext2_sym: ∀R. (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) → + ∀L1,L2,I1,I2. cext2 R L1 I1 I2 → cext2 R L2 I2 I1. +#R #HR #L1 #L2 #I1 #I2 * /3 width=2 by ext2_pair/ +qed-. + +lemma cext2_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → + ∀L,I1,I2. cext2 R1 L I1 I2 → cext2 R2 L I1 I2. +#R1 #R2 #HR #L #I1 #I2 * /3 width=2 by ext2_unit, ext2_pair/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/cl_restricted_weight.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/cl_restricted_weight.ma new file mode 100644 index 000000000..31c3f7adc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/cl_restricted_weight.ma @@ -0,0 +1,55 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/weight_2.ma". +include "static_2/syntax/lenv_weight.ma". + +(* WEIGHT OF A RESTRICTED CLOSURE *******************************************) + +definition rfw: lenv → term → ? ≝ λL,T. ♯{L} + ♯{T}. + +interpretation "weight (restricted closure)" 'Weight L T = (rfw L T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: flt_shift *) +lemma rfw_shift: ∀p,I,K,V,T. ♯{K.ⓑ{I}V, T} < ♯{K, ⓑ{p,I}V.T}. +normalize /2 width=1 by monotonic_le_plus_r/ +qed. + +lemma rfw_clear: ∀p,I1,I2,K,V,T. ♯{K.ⓤ{I1}, T} < ♯{K, ⓑ{p,I2}V.T}. +normalize /4 width=1 by monotonic_le_plus_r, le_S_S/ +qed. + +lemma rfw_tpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?%%); // +qed. + +lemma rfw_tpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?%%); // +qed. + +lemma rfw_lpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +lemma rfw_lpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +(* Basic_1: removed theorems 7: + flt_thead_sx flt_thead_dx flt_trans + flt_arith0 flt_arith1 flt_arith2 flt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/cl_weight.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/cl_weight.ma new file mode 100644 index 000000000..a51094adc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/cl_weight.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/weight_3.ma". +include "static_2/syntax/lenv_weight.ma". +include "static_2/syntax/genv.ma". + +(* WEIGHT OF A CLOSURE ******************************************************) + +(* activate genv *) +definition fw: genv → lenv → term → ? ≝ λG,L,T. ♯{L} + ♯{T}. + +interpretation "weight (closure)" 'Weight G L T = (fw G L T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: flt_shift *) +lemma fw_shift: ∀p,I,G,K,V,T. ♯{G, K.ⓑ{I}V, T} < ♯{G, K, ⓑ{p,I}V.T}. +normalize /2 width=1 by monotonic_le_plus_r/ +qed. + +lemma fw_clear: ∀p,I1,I2,G,K,V,T. ♯{G, K.ⓤ{I1}, T} < ♯{G, K, ⓑ{p,I2}V.T}. +normalize /4 width=1 by monotonic_le_plus_r, le_S_S/ +qed. + +lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?→?%%); // +qed. + +lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G, L, T} < ♯{G, L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?→?%%); // +qed. + +lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +(* Basic_1: removed theorems 7: + flt_thead_sx flt_thead_dx flt_trans + flt_arith0 flt_arith1 flt_arith2 flt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ext2.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/ext2.ma new file mode 100644 index 000000000..a31aef544 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/ext2.ma @@ -0,0 +1,102 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/bind.ma". + +(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************) + +inductive ext2 (R:relation term): relation bind ≝ +| ext2_unit: ∀I. ext2 R (BUnit I) (BUnit I) +| ext2_pair: ∀I,V1,V2. R V1 V2 → ext2 R (BPair I V1) (BPair I V2) +. + +(* Basic_inversion lemmas **************************************************) + +fact ext2_inv_unit_sn_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → + ∀I. Z1 = BUnit I → Z2 = BUnit I. +#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #_ ] +#J #H destruct // +qed-. + +lemma ext2_inv_unit_sn: ∀R,I,Z2. ext2 R (BUnit I) Z2 → Z2 = BUnit I. +/2 width=4 by ext2_inv_unit_sn_aux/ qed-. + +fact ext2_inv_pair_sn_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → + ∀I,V1. Z1 = BPair I V1 → + ∃∃V2. R V1 V2 & Z2 = BPair I V2. +#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #HV12 ] +#J #W1 #H destruct /2 width=3 by ex2_intro/ +qed-. + +lemma ext2_inv_pair_sn: ∀R,Z2,I,V1. ext2 R (BPair I V1) Z2 → + ∃∃V2. R V1 V2 & Z2 = BPair I V2. +/2 width=3 by ext2_inv_pair_sn_aux/ qed-. + +fact ext2_inv_unit_dx_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → + ∀I. Z2 = BUnit I → Z1 = BUnit I. +#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #_ ] +#J #H destruct // +qed-. + +lemma ext2_inv_unit_dx: ∀R,I,Z1. ext2 R Z1 (BUnit I) → Z1 = BUnit I. +/2 width=4 by ext2_inv_unit_dx_aux/ qed-. + +fact ext2_inv_pair_dx_aux: ∀R,Z1,Z2. ext2 R Z1 Z2 → + ∀I,V2. Z2 = BPair I V2 → + ∃∃V1. R V1 V2 & Z1 = BPair I V1. +#R #Z1 #Z2 * -Z1 -Z2 #I [2: #V1 #V2 #HV12 ] +#J #W2 #H destruct /2 width=3 by ex2_intro/ +qed-. + +lemma ext2_inv_pair_dx: ∀R,Z1,I,V2. ext2 R Z1 (BPair I V2) → + ∃∃V1. R V1 V2 & Z1 = BPair I V1. +/2 width=3 by ext2_inv_pair_dx_aux/ qed-. + +(* Advanced inversion lemmas ***********************************************) + +lemma ext2_inv_unit: ∀R,I1,I2. ext2 R (BUnit I1) (BUnit I2) → I1 = I2. +#R #I1 #I2 #H lapply (ext2_inv_unit_sn … H) -H +#H destruct // +qed-. + +lemma ext2_inv_pair: ∀R,I1,I2,V1,V2. ext2 R (BPair I1 V1) (BPair I2 V2) → + I1 = I2 ∧ R V1 V2. +#R #I1 #I2 #V1 #V2 #H elim (ext2_inv_pair_sn … H) -H +#V #HV #H destruct /2 width=1 by conj/ +qed-. + +(* Basic properties ********************************************************) + +lemma ext2_refl: ∀R. reflexive … R → reflexive … (ext2 R). +#R #HR * /2 width=1 by ext2_pair/ +qed. + +lemma ext2_sym: ∀R. symmetric … R → symmetric … (ext2 R). +#R #HR #T1 #T2 * /3 width=1 by ext2_unit, ext2_pair/ +qed-. + +lemma ext2_dec: ∀R. (∀T1,T2. Decidable (R T1 T2)) → + ∀I1,I2. Decidable (ext2 R I1 I2). +#R #HR * #I1 [2: #T1 ] * #I2 [2,4: #T2 ] +[ elim (eq_bind2_dec I1 I2) #HI12 destruct + [ elim (HR T1 T2) -HR #HT12 /3 width=1 by ext2_pair, or_introl/ ] + @or_intror #H elim (ext2_inv_pair … H) -H /2 width=1 by/ +| @or_intror #H lapply (ext2_inv_unit_sn … H) -H + #H destruct +| @or_intror #H lapply (ext2_inv_unit_dx … H) -H + #H destruct +| elim (eq_bind1_dec I1 I2) #HI12 destruct + /4 width=2 by ext2_inv_unit, ext2_unit, or_intror, or_introl/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ext2_ext2.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/ext2_ext2.ma new file mode 100644 index 000000000..ec71ed980 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/ext2_ext2.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/ext2.ma". + +(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************) + +(* Main properties **********************************************************) + +theorem ext2_trans: ∀R. Transitive … R → Transitive … (ext2 R). +#R #HR #I1 #I #H elim H -I1 -I +[ #I1 #J #H >(ext2_inv_unit_sn … H) -J /2 width=1 by ext2_unit/ +| #I1 #V1 #V #HV1 #J #H elim (ext2_inv_pair_sn … H) -H + #V2 #HV2 #H destruct /3 width=3 by ext2_pair/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ext2_tc.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/ext2_tc.ma new file mode 100644 index 000000000..d6df0a3de --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/ext2_tc.ma @@ -0,0 +1,57 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/star.ma". +include "static_2/syntax/ext2.ma". + +(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************) + +(* Properties with transitive closure ***************************************) + +lemma ext2_tc_pair: ∀R,I,V1,V2. TC … R V1 V2 → + TC … (ext2 R) (BPair I V1) (BPair I V2). +#R #I #V1 #V2 #H elim H -H -V2 +/3 width=3 by ext2_pair, step, inj/ +qed. + +lemma ext2_tc_inj: ∀R,I1,I2. ext2 R I1 I2 → ext2 (TC … R) I1 I2. +#R #I1 #I2 * -I1 -I2 +/3 width=1 by ext2_unit, ext2_pair, inj/ +qed. + +(* Main properties with transitive closure **********************************) + +theorem ext2_tc_step: ∀R,I1,I. ext2 (TC … R) I1 I → + ∀I2. ext2 R I I2 → ext2 (TC … R) I1 I2. +#R #I1 #I * -I1 -I +[ #I #Z #H >(ext2_inv_unit_sn … H) -Z /2 width=1 by ext2_unit/ +| #I #V1 #V #HV1 #Z #H + elim (ext2_inv_pair_sn … H) -H #V2 #HV2 #H destruct + /3 width=3 by ext2_pair, step/ +] +qed-. + +(* Advanced properties with transitive closure ******************************) + +lemma ext2_tc: ∀R,I1,I2. TC … (ext2 R) I1 I2 → ext2 (TC … R) I1 I2. +#R #I1 #I2 #H elim H -I2 +/2 width=3 by ext2_tc_step, ext2_tc_inj/ +qed. + +(* Advanced inversion lemmas with transitive closure ************************) + +lemma ext2_inv_tc: ∀R,I1,I2. ext2 (TC … R) I1 I2 → TC … (ext2 R) I1 I2. +#R #I1 #I2 * -I1 -I2 +/3 width=1 by ext2_tc_pair, ext2_unit, inj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma new file mode 100644 index 000000000..35365d802 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/star_0.ma". +include "static_2/notation/functions/dxbind2_3.ma". +include "static_2/notation/functions/dxabbr_2.ma". +include "static_2/notation/functions/dxabst_2.ma". +include "static_2/syntax/term.ma". + +(* GLOBAL ENVIRONMENTS ******************************************************) + +(* global environments *) +inductive genv: Type[0] ≝ +| GAtom: genv (* empty *) +| GPair: genv → bind2 → term → genv (* binary binding construction *) +. + +interpretation "sort (global environment)" + 'Star = (GAtom). + +interpretation "global environment binding construction (binary)" + 'DxBind2 G I T = (GPair G I T). + +interpretation "abbreviation (global environment)" + 'DxAbbr G T = (GPair G Abbr T). + +interpretation "abstraction (global environment)" + 'DxAbst G T = (GPair G Abst T). + +(* Basic properties *********************************************************) + +lemma eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2). +#G1 elim G1 -G1 [| #G1 #I1 #T1 #IHG1 ] * [2,4: #G2 #I2 #T2 ] +[3: /2 width=1 by or_introl/ +|2: elim (eq_bind2_dec I1 I2) #HI + [ elim (IHG1 G2) -IHG1 #HG + [ elim (eq_term_dec T1 T2) #HT /2 width=1 by or_introl/ ] + ] +] +@or_intror #H destruct /2 width=1 by/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/genv_length.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/genv_length.ma new file mode 100644 index 000000000..afd36af9c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/genv_length.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/genv.ma". + +(* LENGTH OF A GLOBAL ENVIRONMENT *******************************************) + +rec definition glength G on G ≝ match G with +[ GAtom ⇒ 0 +| GPair G _ _ ⇒ ↑(glength G) +]. + +interpretation "length (global environment)" + 'card G = (glength G). diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/genv_weight.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/genv_weight.ma new file mode 100644 index 000000000..9bf005fa0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/genv_weight.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_weight.ma". +include "static_2/syntax/genv.ma". + +(* WEIGHT OF A GLOBAL ENVIRONMENT *******************************************) + +rec definition gw G ≝ match G with +[ GAtom ⇒ 0 +| GPair G I T ⇒ gw G + ♯{T} +]. + +interpretation "weight (global environment)" 'Weight G = (gw G). + +(* Basic properties *********************************************************) + +lemma gw_pair: ∀I,G,T. ♯{G} < ♯{G.ⓑ{I}T}. +normalize /2 width=1 by monotonic_le_plus_r/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/item.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/item.ma new file mode 100644 index 000000000..ba8357260 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/item.ma @@ -0,0 +1,97 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/bool.ma". +include "ground_2/lib/arith.ma". + +(* ITEMS ********************************************************************) + +(* atomic items *) +inductive item0: Type[0] ≝ + | Sort: nat → item0 (* sort: starting at 0 *) + | LRef: nat → item0 (* reference by index: starting at 0 *) + | GRef: nat → item0 (* reference by position: starting at 0 *) +. + +(* unary binding items *) +inductive bind1: Type[0] ≝ + | Void: bind1 (* exclusion *) +. + +(* binary binding items *) +inductive bind2: Type[0] ≝ + | Abbr: bind2 (* abbreviation *) + | Abst: bind2 (* abstraction *) +. + +(* binary non-binding items *) +inductive flat2: Type[0] ≝ + | Appl: flat2 (* application *) + | Cast: flat2 (* explicit type annotation *) +. + +(* binary items *) +inductive item2: Type[0] ≝ + | Bind2: bool → bind2 → item2 (* polarized binding item *) + | Flat2: flat2 → item2 (* non-binding item *) +. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_sort_sort_aux: ∀s1,s2. Sort s1 = Sort s2 → s1 = s2. +#s1 #s2 #H destruct // +qed-. + +(* Basic properties *********************************************************) + +lemma eq_item0_dec: ∀I1,I2:item0. Decidable (I1 = I2). +* #i1 * #i2 [2,3,4,6,7,8: @or_intror #H destruct ] +[2: elim (eq_nat_dec i1 i2) |1,3: elim (eq_nat_dec i1 i2) ] /2 width=1 by or_introl/ +#Hni12 @or_intror #H destruct /2 width=1 by/ +qed-. + +lemma eq_bind1_dec: ∀I1,I2:bind1. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +qed-. + +(* Basic_1: was: bind_dec *) +lemma eq_bind2_dec: ∀I1,I2:bind2. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. + +(* Basic_1: was: flat_dec *) +lemma eq_flat2_dec: ∀I1,I2:flat2. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. + +(* Basic_1: was: kind_dec *) +lemma eq_item2_dec: ∀I1,I2:item2. Decidable (I1 = I2). +* [ #p1 ] #I1 * [1,3: #p2 ] #I2 +[2,3: @or_intror #H destruct +| elim (eq_bool_dec p1 p2) #Hp + [ elim (eq_bind2_dec I1 I2) /2 width=1 by or_introl/ #HI ] + @or_intror #H destruct /2 width=1 by/ +| elim (eq_flat2_dec I1 I2) /2 width=1 by or_introl/ #HI + @or_intror #H destruct /2 width=1 by/ +] +qed-. + +(* Basic_1: removed theorems 21: + s_S s_plus s_plus_sym s_minus minus_s_s s_le s_lt s_inj s_inc + s_arith0 s_arith1 + r_S r_plus r_plus_sym r_minus r_dis s_r r_arith0 r_arith1 + not_abbr_abst bind_dec_not +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/item_sd.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/item_sd.ma new file mode 100644 index 000000000..8a9ae7183 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/item_sd.ma @@ -0,0 +1,124 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/item_sh.ma". + +(* SORT DEGREE **************************************************************) + +(* sort degree specification *) +record sd (h:sh): Type[0] ≝ { + deg : relation nat; (* degree of the sort *) + deg_total: ∀s. ∃d. deg s d; (* functional relation axioms *) + deg_mono : ∀s,d1,d2. deg s d1 → deg s d2 → d1 = d2; + deg_next : ∀s,d. deg s d → deg (next h s) (↓d) (* compatibility condition *) +}. + +(* Notable specifications ***************************************************) + +definition deg_O: relation nat ≝ λs,d. d = 0. + +definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O …. +/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ defined. + +(* Basic_2A1: includes: deg_SO_pos *) +inductive deg_SO (h:sh) (s:nat) (s0:nat): predicate nat ≝ +| deg_SO_succ : ∀n. (next h)^n s0 = s → deg_SO h s s0 (↑n) +| deg_SO_zero: ((∃n. (next h)^n s0 = s) → ⊥) → deg_SO h s s0 0 +. + +fact deg_SO_inv_succ_aux: ∀h,s,s0,n0. deg_SO h s s0 n0 → ∀n. n0 = ↑n → + (next h)^n s0 = s. +#h #s #s0 #n0 * -n0 +[ #n #Hn #x #H destruct // +| #_ #x #H destruct +] +qed-. + +(* Basic_2A1: was: deg_SO_inv_pos *) +lemma deg_SO_inv_succ: ∀h,s,s0,n. deg_SO h s s0 (↑n) → (next h)^n s0 = s. +/2 width=3 by deg_SO_inv_succ_aux/ qed-. + +lemma deg_SO_refl: ∀h,s. deg_SO h s s 1. +#h #s @(deg_SO_succ … 0 ?) // +qed. + +lemma deg_SO_gt: ∀h,s1,s2. s1 < s2 → deg_SO h s1 s2 0. +#h #s1 #s2 #HK12 @deg_SO_zero * #n elim n -n normalize +[ #H destruct + elim (lt_refl_false … HK12) +| #n #_ #H + lapply (next_lt h ((next h)^n s2)) >H -H #H + lapply (transitive_lt … H HK12) -s1 #H1 + lapply (nexts_le h s2 n) #H2 + lapply (le_to_lt_to_lt … H2 H1) -h -n #H + elim (lt_refl_false … H) +] +qed. + +definition sd_SO: ∀h. nat → sd h ≝ λh,s. mk_sd h (deg_SO h s) …. +[ #s0 + lapply (nexts_dec h s0 s) * + [ * /3 width=2 by deg_SO_succ, ex_intro/ | /4 width=2 by deg_SO_zero, ex_intro/ ] +| #K0 #d1 #d2 * [ #n1 ] #H1 * [1,3: #n2 ] #H2 // + [ < H2 in H1; -H2 #H + lapply (nexts_inj … H) -H #H destruct // + | elim H1 /2 width=2 by ex_intro/ + | elim H2 /2 width=2 by ex_intro/ + ] +| #s0 #n * + [ #d #H destruct elim d -d normalize + /2 width=1 by deg_SO_gt, deg_SO_succ, next_lt/ + | #H1 @deg_SO_zero * #d #H2 destruct + @H1 -H1 @(ex_intro … (↑d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *) + ] +] +defined. + +rec definition sd_d (h:sh) (s:nat) (d:nat) on d : sd h ≝ + match d with + [ O ⇒ sd_O h + | S d ⇒ match d with + [ O ⇒ sd_SO h s + | _ ⇒ sd_d h (next h s) d + ] + ]. + +(* Basic inversion lemmas ***************************************************) + +lemma deg_inv_pred: ∀h,o,s,d. deg h o (next h s) (↑d) → deg h o s (↑↑d). +#h #o #s #d #H1 +elim (deg_total h o s) #n #H0 +lapply (deg_next … H0) #H2 +lapply (deg_mono … H1 H2) -H1 -H2 #H >H >S_pred /2 width=2 by ltn_to_ltO/ +qed-. + +lemma deg_inv_prec: ∀h,o,s,n,d. deg h o ((next h)^n s) (↑d) → deg h o s (↑(d+n)). +#h #o #s #n elim n -n normalize /3 width=1 by deg_inv_pred/ +qed-. + +(* Basic properties *********************************************************) + +lemma deg_iter: ∀h,o,s,d,n. deg h o s d → deg h o ((next h)^n s) (d-n). +#h #o #s #d #n elim n -n normalize /3 width=1 by deg_next/ +qed. + +lemma deg_next_SO: ∀h,o,s,d. deg h o s (↑d) → deg h o (next h s) d. +/2 width=1 by deg_next/ qed-. + +lemma sd_d_SS: ∀h,s,d. sd_d h s (↑↑d) = sd_d h (next h s) (↑d). +// qed. + +lemma sd_d_correct: ∀h,d,s. deg h (sd_d h s d) s d. +#h #d elim d -d // #d elim d -d /3 width=1 by deg_inv_pred/ +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/item_sh.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/item_sh.ma new file mode 100644 index 000000000..9e0b03f73 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/item_sh.ma @@ -0,0 +1,44 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/arith.ma". + +(* SORT HIERARCHY ***********************************************************) + +(* sort hierarchy specification *) +record sh: Type[0] ≝ { + next : nat → nat; (* next sort in the hierarchy *) + next_lt: ∀s. s < next s (* strict monotonicity condition *) +}. + +definition sh_N: sh ≝ mk_sh S …. +// defined. + +(* Basic properties *********************************************************) + +lemma nexts_le: ∀h,s,n. s ≤ (next h)^n s. +#h #s #n elim n -n // normalize #n #IH +lapply (next_lt h ((next h)^n s)) #H +lapply (le_to_lt_to_lt … IH H) -IH -H /2 width=2 by lt_to_le/ +qed. + +lemma nexts_lt: ∀h,s,n. s < (next h)^(↑n) s. +#h #s #n normalize +lapply (nexts_le h s n) #H +@(le_to_lt_to_lt … H) // +qed. + +axiom nexts_dec: ∀h,s1,s2. Decidable (∃n. (next h)^n s1 = s2). + +axiom nexts_inj: ∀h,s,n1,n2. (next h)^n1 s = (next h)^n2 s → n1 = n2. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma new file mode 100644 index 000000000..7e2b65da5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma @@ -0,0 +1,89 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/star_0.ma". +include "static_2/notation/functions/dxitem_2.ma". +include "static_2/notation/functions/dxbind1_2.ma". +include "static_2/notation/functions/dxbind2_3.ma". +include "static_2/notation/functions/dxvoid_1.ma". +include "static_2/notation/functions/dxabbr_2.ma". +include "static_2/notation/functions/dxabst_2.ma". +include "static_2/syntax/bind.ma". + +(* LOCAL ENVIRONMENTS *******************************************************) + +(* local environments *) +inductive lenv: Type[0] ≝ +| LAtom: lenv (* empty *) +| LBind: lenv → bind → lenv (* binding construction *) +. + +interpretation "sort (local environment)" + 'Star = LAtom. + +interpretation "local environment binding construction (generic)" + 'DxItem L I = (LBind L I). + +interpretation "local environment binding construction (unary)" + 'DxBind1 L I = (LBind L (BUnit I)). + +interpretation "local environment binding construction (binary)" + 'DxBind2 L I T = (LBind L (BPair I T)). + +interpretation "void (local environment)" + 'DxVoid L = (LBind L (BUnit Void)). + +interpretation "abbreviation (local environment)" + 'DxAbbr L T = (LBind L (BPair Abbr T)). + +interpretation "abstraction (local environment)" + 'DxAbst L T = (LBind L (BPair Abst T)). + +definition cfull: relation3 lenv bind bind ≝ λL,I1,I2. ⊤. + +definition ceq: relation3 lenv term term ≝ λL. eq …. + +(* Basic properties *********************************************************) + +lemma eq_lenv_dec: ∀L1,L2:lenv. Decidable (L1 = L2). +#L1 elim L1 -L1 [| #L1 #I1 #IHL1 ] * [2,4: #L2 #I2 ] +[3: /2 width=1 by or_introl/ +|2: elim (eq_bind_dec I1 I2) #HI + [ elim (IHL1 L2) -IHL1 #HL /2 width=1 by or_introl/ ] +] +@or_intror #H destruct /2 width=1 by/ +qed-. + +lemma cfull_dec: ∀L,T1,T2. Decidable (cfull L T1 T2). +/2 width=1 by or_introl/ qed-. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_lbind_lbind_aux: ∀I1,I2,L1,L2. L1.ⓘ{I1} = L2.ⓘ{I2} → + L1 = L2 ∧ I1 = I2. +#I1 #I2 #L1 #L2 #H destruct /2 width=1 by conj/ +qed-. + +(* Basic_2A1: uses: discr_lpair_x_xy *) +lemma discr_lbind_x_xy: ∀I,L. L = L.ⓘ{I} → ⊥. +#I #L elim L -L +[ #H destruct +| #L #J #IHL #H elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *) + #H1 #H2 destruct /2 width=1 by/ +] +qed-. + +(* Basic_2A1: uses: discr_lpair_xy_x *) +lemma discr_lbind_xy_x: ∀I,L. L.ⓘ{I} = L → ⊥. +/2 width=4 by discr_lbind_x_xy/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lenv_length.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv_length.ma new file mode 100644 index 000000000..52dfc3516 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv_length.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lenv.ma". + +(* LENGTH OF A LOCAL ENVIRONMENT ********************************************) + +rec definition length L ≝ match L with +[ LAtom ⇒ 0 +| LBind L _ ⇒ ↑(length L) +]. + +interpretation "length (local environment)" 'card L = (length L). + +(* Basic properties *********************************************************) + +lemma length_atom: |⋆| = 0. +// qed. + +(* Basic_2A1: uses: length_pair *) +lemma length_bind: ∀I,L. |L.ⓘ{I}| = ↑|L|. +// qed. + +(* Basic inversion lemmas ***************************************************) + +lemma length_inv_zero_dx: ∀L. |L| = 0 → L = ⋆. +* // #L #I >length_bind +#H destruct +qed-. + +lemma length_inv_zero_sn: ∀L. 0 = |L| → L = ⋆. +/2 width=1 by length_inv_zero_dx/ qed-. + +(* Basic_2A1: was: length_inv_pos_dx *) +lemma length_inv_succ_dx: ∀n,L. |L| = ↑n → + ∃∃I,K. |K| = n & L = K. ⓘ{I}. +#n * +[ >length_atom #H destruct +| #L #I >length_bind /3 width=4 by ex2_2_intro, injective_S/ +] +qed-. + +(* Basic_2A1: was: length_inv_pos_sn *) +lemma length_inv_succ_sn: ∀n,L. ↑n = |L| → + ∃∃I,K. n = |K| & L = K. ⓘ{I}. +#n #L #H lapply (sym_eq ??? H) -H +#H elim (length_inv_succ_dx … H) -H /2 width=4 by ex2_2_intro/ +qed-. + +(* Basic_2A1: removed theorems 1: length_inj *) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lenv_weight.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv_weight.ma new file mode 100644 index 000000000..01ff8b7ad --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv_weight.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/bind_weight.ma". +include "static_2/syntax/lenv.ma". + +(* WEIGHT OF A LOCAL ENVIRONMENT ********************************************) + +rec definition lw L ≝ match L with +[ LAtom ⇒ 0 +| LBind L I ⇒ lw L + ♯{I} +]. + +interpretation "weight (local environment)" 'Weight L = (lw L). + +(* Basic properties *********************************************************) + +(* Basic_2A1: uses: lw_pair *) +lemma lw_bind: ∀I,L. ♯{L} < ♯{L.ⓘ{I}}. +normalize /2 width=1 by monotonic_le_plus_r/ qed. + +(* Basic_1: removed theorems 4: clt_cong clt_head clt_thead clt_wf_ind *) +(* Basic_1: removed local theorems 1: clt_wf__q_ind *) +(* Basic_1: note: clt_thead should be renamed clt_ctail *) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lveq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lveq.ma new file mode 100644 index 000000000..855978783 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lveq.ma @@ -0,0 +1,176 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/voidstareq_4.ma". +include "static_2/syntax/lenv.ma". + +(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************) + +inductive lveq: bi_relation nat lenv ≝ +| lveq_atom : lveq 0 (⋆) 0 (⋆) +| lveq_bind : ∀I1,I2,K1,K2. lveq 0 K1 0 K2 → + lveq 0 (K1.ⓘ{I1}) 0 (K2.ⓘ{I2}) +| lveq_void_sn: ∀K1,K2,n1. lveq n1 K1 0 K2 → + lveq (↑n1) (K1.ⓧ) 0 K2 +| lveq_void_dx: ∀K1,K2,n2. lveq 0 K1 n2 K2 → + lveq 0 K1 (↑n2) (K2.ⓧ) +. + +interpretation "equivalence up to exclusion binders (local environment)" + 'VoidStarEq L1 n1 n2 L2 = (lveq n1 L1 n2 L2). + +(* Basic properties *********************************************************) + +lemma lveq_refl: ∀L. L ≋ⓧ*[0, 0] L. +#L elim L -L /2 width=1 by lveq_atom, lveq_bind/ +qed. + +lemma lveq_sym: bi_symmetric … lveq. +#n1 #n2 #L1 #L2 #H elim H -L1 -L2 -n1 -n2 +/2 width=1 by lveq_atom, lveq_bind, lveq_void_sn, lveq_void_dx/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lveq_inv_zero_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + 0 = n1 → 0 = n2 → + ∨∨ ∧∧ ⋆ = L1 & ⋆ = L2 + | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0, 0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2. +#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2 +[1: /3 width=1 by or_introl, conj/ +|2: /3 width=7 by ex3_4_intro, or_intror/ +|*: #K1 #K2 #n #_ #H1 #H2 destruct +] +qed-. + +lemma lveq_inv_zero: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 → + ∨∨ ∧∧ ⋆ = L1 & ⋆ = L2 + | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0, 0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2. +/2 width=5 by lveq_inv_zero_aux/ qed-. + +fact lveq_inv_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + ∀m1. ↑m1 = n1 → + ∃∃K1. K1 ≋ⓧ*[m1, 0] L2 & K1.ⓧ = L1 & 0 = n2. +#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2 +[1: #m #H destruct +|2: #I1 #I2 #K1 #K2 #_ #m #H destruct +|*: #K1 #K2 #n #HK #m #H destruct /2 width=3 by ex3_intro/ +] +qed-. + +lemma lveq_inv_succ_sn: ∀L1,K2,n1,n2. L1 ≋ⓧ*[↑n1, n2] K2 → + ∃∃K1. K1 ≋ⓧ*[n1, 0] K2 & K1.ⓧ = L1 & 0 = n2. +/2 width=3 by lveq_inv_succ_sn_aux/ qed-. + +lemma lveq_inv_succ_dx: ∀K1,L2,n1,n2. K1 ≋ⓧ*[n1, ↑n2] L2 → + ∃∃K2. K1 ≋ⓧ*[0, n2] K2 & K2.ⓧ = L2 & 0 = n1. +#K1 #L2 #n1 #n2 #H +lapply (lveq_sym … H) -H #H +elim (lveq_inv_succ_sn … H) -H /3 width=3 by lveq_sym, ex3_intro/ +qed-. + +fact lveq_inv_succ_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + ∀m1,m2. ↑m1 = n1 → ↑m2 = n2 → ⊥. +#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2 +[1: #m1 #m2 #H1 #H2 destruct +|2: #I1 #I2 #K1 #K2 #_ #m1 #m2 #H1 #H2 destruct +|*: #K1 #K2 #n #_ #m1 #m2 #H1 #H2 destruct +] +qed-. + +lemma lveq_inv_succ: ∀L1,L2,n1,n2. L1 ≋ⓧ*[↑n1, ↑n2] L2 → ⊥. +/2 width=9 by lveq_inv_succ_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lveq_inv_bind: ∀I1,I2,K1,K2. K1.ⓘ{I1} ≋ⓧ*[0, 0] K2.ⓘ{I2} → K1 ≋ⓧ*[0, 0] K2. +#I1 #I2 #K1 #K2 #H +elim (lveq_inv_zero … H) -H * [| #Z1 #Z2 #Y1 #Y2 #HY ] #H1 #H2 destruct // +qed-. + +lemma lveq_inv_atom_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1, n2] ⋆ → ∧∧ 0 = n1 & 0 = n2. +* [2: #n1 ] * [2,4: #n2 ] #H +[ elim (lveq_inv_succ … H) +| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct +| elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct +| /2 width=1 by conj/ +] +qed-. + +lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1, n2] ⋆ → + ∃∃m1. K1 ≋ⓧ*[m1, 0] ⋆ & BUnit Void = I1 & ↑m1 = n1 & 0 = n2. +#I1 #K1 * [2: #n1 ] * [2,4: #n2 ] #H +[ elim (lveq_inv_succ … H) +| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct +| elim (lveq_inv_succ_sn … H) -H #Y #HY #H1 #H2 destruct /2 width=3 by ex4_intro/ +| elim (lveq_inv_zero … H) -H * + [ #H1 #H2 destruct + | #Z1 #Z2 #Y1 #Y2 #_ #H1 #H2 destruct + ] +] +qed-. + +lemma lveq_inv_atom_bind: ∀I2,K2,n1,n2. ⋆ ≋ⓧ*[n1, n2] K2.ⓘ{I2} → + ∃∃m2. ⋆ ≋ⓧ*[0, m2] K2 & BUnit Void = I2 & 0 = n1 & ↑m2 = n2. +#I2 #K2 #n1 #n2 #H +lapply (lveq_sym … H) -H #H +elim (lveq_inv_bind_atom … H) -H +/3 width=3 by lveq_sym, ex4_intro/ +qed-. + +lemma lveq_inv_pair_pair: ∀I1,I2,K1,K2,V1,V2,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] K2.ⓑ{I2}V2 → + ∧∧ K1 ≋ⓧ*[0, 0] K2 & 0 = n1 & 0 = n2. +#I1 #I2 #K1 #K2 #V1 #V2 * [2: #n1 ] * [2,4: #n2 ] #H +[ elim (lveq_inv_succ … H) +| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct +| elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct +| elim (lveq_inv_zero … H) -H * + [ #H1 #H2 destruct + | #Z1 #Z2 #Y1 #Y2 #HY #H1 #H2 destruct /3 width=1 by and3_intro/ + ] +] +qed-. + +lemma lveq_inv_void_succ_sn: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[↑n1, n2] L2 → + ∧∧ L1 ≋ ⓧ*[n1, 0] L2 & 0 = n2. +#L1 #L2 #n1 #n2 #H +elim (lveq_inv_succ_sn … H) -H #Y #HY #H1 #H2 destruct /2 width=1 by conj/ +qed-. + +lemma lveq_inv_void_succ_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, ↑n2] L2.ⓧ → + ∧∧ L1 ≋ ⓧ*[0, n2] L2 & 0 = n1. +#L1 #L2 #n1 #n2 #H +lapply (lveq_sym … H) -H #H +elim (lveq_inv_void_succ_sn … H) -H +/3 width=1 by lveq_sym, conj/ +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma lveq_fwd_gen: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + ∨∨ 0 = n1 | 0 = n2. +#L1 #L2 * [2: #n1 ] * [2,4: #n2 ] #H +[ elim (lveq_inv_succ … H) ] +/2 width=1 by or_introl, or_intror/ +qed-. + +lemma lveq_fwd_pair_sn: ∀I1,K1,L2,V1,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2 → 0 = n1. +#I1 #K1 #L2 #V1 * [2: #n1 ] // * [2: #n2 ] #H +[ elim (lveq_inv_succ … H) +| elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct +] +qed-. + +lemma lveq_fwd_pair_dx: ∀I2,L1,K2,V2,n1,n2. L1 ≋ⓧ*[n1, n2] K2.ⓑ{I2}V2 → 0 = n2. +/3 width=6 by lveq_fwd_pair_sn, lveq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lveq_length.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lveq_length.ma new file mode 100644 index 000000000..104d2b8b9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lveq_length.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lenv_length.ma". +include "static_2/syntax/lveq.ma". + +(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************) + +(* Properties with length for local environments ****************************) + +lemma lveq_length_eq: ∀L1,L2. |L1| = |L2| → L1 ≋ⓧ*[0, 0] L2. +#L1 elim L1 -L1 +[ #Y2 #H >(length_inv_zero_sn … H) -Y2 /2 width=3 by lveq_atom, ex_intro/ +| #K1 #I1 #IH #Y2 #H + elim (length_inv_succ_sn … H) -H #I2 #K2 #HK #H destruct + /3 width=1 by lveq_bind/ +] +qed. + +(* Forward lemmas with length for local environments ************************) + +lemma lveq_fwd_length_le_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → n1 ≤ |L1|. +#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize +/2 width=1 by le_S_S/ +qed-. + +lemma lveq_fwd_length_le_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → n2 ≤ |L2|. +#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize +/2 width=1 by le_S_S/ +qed-. + +lemma lveq_fwd_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + ∧∧ |L1|-|L2| = n1 & |L2|-|L1| = n2. +#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 /2 width=1 by conj/ +#K1 #K2 #n #_ * #H1 #H2 >length_bind /3 width=1 by minus_Sn_m, conj/ +qed-. + +lemma lveq_length_fwd_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → |L1| ≤ |L2| → 0 = n1. +#L1 #L2 #n1 #n2 #H #HL +elim (lveq_fwd_length … H) -H +>(eq_minus_O … HL) // +qed-. + +lemma lveq_length_fwd_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| → 0 = n2. +#L1 #L2 #n1 #n2 #H #HL +elim (lveq_fwd_length … H) -H +>(eq_minus_O … HL) // +qed-. + +lemma lveq_inj_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + |L1| = |L2| → ∧∧ 0 = n1 & 0 = n2. +#L1 #L2 #n1 #n2 #H #HL +elim (lveq_fwd_length … H) -H +>HL -HL /2 width=1 by conj/ +qed-. + +lemma lveq_fwd_length_plus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + |L1| + n2 = |L2| + n1. +#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize +/2 width=2 by injective_plus_r/ +qed-. + +lemma lveq_fwd_length_eq: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 → |L1| = |L2|. +/3 width=2 by lveq_fwd_length_plus, injective_plus_l/ qed-. + +lemma lveq_fwd_length_minus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + |L1| - n1 = |L2| - n2. +/3 width=3 by lveq_fwd_length_plus, lveq_fwd_length_le_dx, lveq_fwd_length_le_sn, plus_to_minus_2/ qed-. + +lemma lveq_fwd_abst_bind_length_le: ∀I1,I2,L1,L2,V1,n1,n2. + L1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2.ⓘ{I2} → |L1| ≤ |L2|. +#I1 #I2 #L1 #L2 #V1 #n1 #n2 #HL +lapply (lveq_fwd_pair_sn … HL) #H destruct +elim (lveq_fwd_length … HL) -HL >length_bind >length_bind // +qed-. + +lemma lveq_fwd_bind_abst_length_le: ∀I1,I2,L1,L2,V2,n1,n2. + L1.ⓘ{I1} ≋ⓧ*[n1, n2] L2.ⓑ{I2}V2 → |L2| ≤ |L1|. +/3 width=6 by lveq_fwd_abst_bind_length_le, lveq_sym/ qed-. + +(* Inversion lemmas with length for local environments **********************) + +lemma lveq_inv_void_dx_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2.ⓧ → |L1| ≤ |L2| → + ∃∃m2. L1 ≋ ⓧ*[n1, m2] L2 & 0 = n1 & ↑m2 = n2. +#L1 #L2 #n1 #n2 #H #HL12 +lapply (lveq_fwd_length_plus … H) normalize >plus_n_Sm #H0 +lapply (plus2_inv_le_sn … H0 HL12) -H0 -HL12 #H0 +elim (le_inv_S1 … H0) -H0 #m2 #_ #H0 destruct +elim (lveq_inv_void_succ_dx … H) -H /2 width=3 by ex3_intro/ +qed-. + +lemma lveq_inv_void_sn_length: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| → + ∃∃m1. L1 ≋ ⓧ*[m1, n2] L2 & ↑m1 = n1 & 0 = n2. +#L1 #L2 #n1 #n2 #H #HL +lapply (lveq_sym … H) -H #H +elim (lveq_inv_void_dx_length … H HL) -H -HL +/3 width=4 by lveq_sym, ex3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lveq_lveq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lveq_lveq.ma new file mode 100644 index 000000000..8ac40a55f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lveq_lveq.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/lveq_length.ma". + +(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************) + +(* Main inversion lemmas ****************************************************) + +theorem lveq_inv_bind: ∀K1,K2. K1 ≋ⓧ*[0, 0] K2 → + ∀I1,I2,m1,m2. K1.ⓘ{I1} ≋ⓧ*[m1, m2] K2.ⓘ{I2} → + ∧∧ 0 = m1 & 0 = m2. +#K1 #K2 #HK #I1 #I2 #m1 #m2 #H +lapply (lveq_fwd_length_eq … HK) -HK #HK +elim (lveq_inj_length … H) -H normalize /3 width=1 by conj, eq_f/ +qed-. + +theorem lveq_inj: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → + ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 → + ∧∧ n1 = m1 & n2 = m2. +#L1 #L2 #n1 #n2 #Hn #m1 #m2 #Hm +elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct +elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct +/2 width=1 by conj/ +qed-. + +theorem lveq_inj_void_sn_ge: ∀K1,K2. |K2| ≤ |K1| → + ∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 → + ∀m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2 → + ∧∧ ↑n1 = m1 & 0 = m2 & 0 = n2. +#L1 #L2 #HL #n1 #n2 #Hn #m1 #m2 #Hm +elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct +elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct +>length_bind >eq_minus_S_pred >(eq_minus_O … HL) +/3 width=4 by plus_minus, and3_intro/ +qed-. + +theorem lveq_inj_void_dx_le: ∀K1,K2. |K1| ≤ |K2| → + ∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 → + ∀m1,m2. K1 ≋ⓧ*[m1, m2] K2.ⓧ → + ∧∧ ↑n2 = m2 & 0 = m1 & 0 = n1. +/3 width=5 by lveq_inj_void_sn_ge, lveq_sym/ qed-. (* auto: 2x lveq_sym *) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq.ma new file mode 100644 index 000000000..d008d5e86 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq.ma @@ -0,0 +1,187 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/stareq_4.ma". +include "static_2/syntax/item_sd.ma". +include "static_2/syntax/term.ma". + +(* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************) + +inductive tdeq (h) (o): relation term ≝ +| tdeq_sort: ∀s1,s2,d. deg h o s1 d → deg h o s2 d → tdeq h o (⋆s1) (⋆s2) +| tdeq_lref: ∀i. tdeq h o (#i) (#i) +| tdeq_gref: ∀l. tdeq h o (§l) (§l) +| tdeq_pair: ∀I,V1,V2,T1,T2. tdeq h o V1 V2 → tdeq h o T1 T2 → tdeq h o (②{I}V1.T1) (②{I}V2.T2) +. + +interpretation + "context-free degree-based equivalence (term)" + 'StarEq h o T1 T2 = (tdeq h o T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact tdeq_inv_sort1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀s1. X = ⋆s1 → + ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. +#h #o #X #Y * -X -Y +[ #s1 #s2 #d #Hs1 #Hs2 #s #H destruct /2 width=5 by ex3_2_intro/ +| #i #s #H destruct +| #l #s #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct +] +qed-. + +lemma tdeq_inv_sort1: ∀h,o,Y,s1. ⋆s1 ≛[h, o] Y → + ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. +/2 width=3 by tdeq_inv_sort1_aux/ qed-. + +fact tdeq_inv_lref1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀i. X = #i → Y = #i. +#h #o #X #Y * -X -Y // +[ #s1 #s2 #d #_ #_ #j #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #j #H destruct +] +qed-. + +lemma tdeq_inv_lref1: ∀h,o,Y,i. #i ≛[h, o] Y → Y = #i. +/2 width=5 by tdeq_inv_lref1_aux/ qed-. + +fact tdeq_inv_gref1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀l. X = §l → Y = §l. +#h #o #X #Y * -X -Y // +[ #s1 #s2 #d #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct +] +qed-. + +lemma tdeq_inv_gref1: ∀h,o,Y,l. §l ≛[h, o] Y → Y = §l. +/2 width=5 by tdeq_inv_gref1_aux/ qed-. + +fact tdeq_inv_pair1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀I,V1,T1. X = ②{I}V1.T1 → + ∃∃V2,T2. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & Y = ②{I}V2.T2. +#h #o #X #Y * -X -Y +[ #s1 #s2 #d #_ #_ #J #W1 #U1 #H destruct +| #i #J #W1 #U1 #H destruct +| #l #J #W1 #U1 #H destruct +| #I #V1 #V2 #T1 #T2 #HV #HT #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma tdeq_inv_pair1: ∀h,o,I,V1,T1,Y. ②{I}V1.T1 ≛[h, o] Y → + ∃∃V2,T2. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & Y = ②{I}V2.T2. +/2 width=3 by tdeq_inv_pair1_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma tdeq_inv_sort1_deg: ∀h,o,Y,s1. ⋆s1 ≛[h, o] Y → ∀d. deg h o s1 d → + ∃∃s2. deg h o s2 d & Y = ⋆s2. +#h #o #Y #s1 #H #d #Hs1 elim (tdeq_inv_sort1 … H) -H +#s2 #x #Hx <(deg_mono h o … Hx … Hs1) -s1 -d /2 width=3 by ex2_intro/ +qed-. + +lemma tdeq_inv_sort_deg: ∀h,o,s1,s2. ⋆s1 ≛[h, o] ⋆s2 → + ∀d1,d2. deg h o s1 d1 → deg h o s2 d2 → + d1 = d2. +#h #o #s1 #y #H #d1 #d2 #Hs1 #Hy +elim (tdeq_inv_sort1_deg … H … Hs1) -s1 #s2 #Hs2 #H destruct +<(deg_mono h o … Hy … Hs2) -s2 -d1 // +qed-. + +lemma tdeq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ≛[h, o] ②{I2}V2.T2 → + ∧∧ I1 = I2 & V1 ≛[h, o] V2 & T1 ≛[h, o] T2. +#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H elim (tdeq_inv_pair1 … H) -H +#V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma tdeq_inv_pair_xy_x: ∀h,o,I,V,T. ②{I}V.T ≛[h, o] V → ⊥. +#h #o #I #V elim V -V +[ #J #T #H elim (tdeq_inv_pair1 … H) -H #X #Y #_ #_ #H destruct +| #J #X #Y #IHX #_ #T #H elim (tdeq_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/ +] +qed-. + +lemma tdeq_inv_pair_xy_y: ∀h,o,I,T,V. ②{I}V.T ≛[h, o] T → ⊥. +#h #o #I #T elim T -T +[ #J #V #H elim (tdeq_inv_pair1 … H) -H #X #Y #_ #_ #H destruct +| #J #X #Y #_ #IHY #V #H elim (tdeq_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma tdeq_fwd_atom1: ∀h,o,I,Y. ⓪{I} ≛[h, o] Y → ∃J. Y = ⓪{J}. +#h #o * #x #Y #H [ elim (tdeq_inv_sort1 … H) -H ] +/3 width=4 by tdeq_inv_gref1, tdeq_inv_lref1, ex_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma tdeq_refl: ∀h,o. reflexive … (tdeq h o). +#h #o #T elim T -T /2 width=1 by tdeq_pair/ +* /2 width=1 by tdeq_lref, tdeq_gref/ +#s elim (deg_total h o s) /2 width=3 by tdeq_sort/ +qed. + +lemma tdeq_sym: ∀h,o. symmetric … (tdeq h o). +#h #o #T1 #T2 #H elim H -T1 -T2 +/2 width=3 by tdeq_sort, tdeq_lref, tdeq_gref, tdeq_pair/ +qed-. + +lemma tdeq_dec: ∀h,o,T1,T2. Decidable (T1 ≛[h, o] T2). +#h #o #T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] +[ elim (deg_total h o s1) #d1 #H1 + elim (deg_total h o s2) #d2 #H2 + elim (eq_nat_dec d1 d2) #Hd12 destruct /3 width=3 by tdeq_sort, or_introl/ + @or_intror #H + lapply (tdeq_inv_sort_deg … H … H1 H2) -H -H1 -H2 /2 width=1 by/ +|2,3,13: + @or_intror #H + elim (tdeq_inv_sort1 … H) -H #x1 #x2 #_ #_ #H destruct +|4,6,14: + @or_intror #H + lapply (tdeq_inv_lref1 … H) -H #H destruct +|5: + elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ + @or_intror #H + lapply (tdeq_inv_lref1 … H) -H #H destruct /2 width=1 by/ +|7,8,15: + @or_intror #H + lapply (tdeq_inv_gref1 … H) -H #H destruct +|9: + elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ + @or_intror #H + lapply (tdeq_inv_gref1 … H) -H #H destruct /2 width=1 by/ +|10,11,12: + @or_intror #H + elim (tdeq_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct +|16: + elim (eq_item2_dec I1 I2) #HI12 destruct + [ elim (IHV V2) -IHV #HV12 + elim (IHT T2) -IHT #HT12 + [ /3 width=1 by tdeq_pair, or_introl/ ] + ] + @or_intror #H + elim (tdeq_inv_pair … H) -H /2 width=1 by/ +] +qed-. + +(* Negated inversion lemmas *************************************************) + +lemma tdneq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. + (②{I1}V1.T1 ≛[h, o] ②{I2}V2.T2 → ⊥) → + ∨∨ I1 = I2 → ⊥ + | (V1 ≛[h, o] V2 → ⊥) + | (T1 ≛[h, o] T2 → ⊥). +#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H12 +elim (eq_item2_dec I1 I2) /3 width=1 by or3_intro0/ #H destruct +elim (tdeq_dec h o V1 V2) /3 width=1 by or3_intro1/ +elim (tdeq_dec h o T1 T2) /4 width=1 by tdeq_pair, or3_intro2/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_ext.ma new file mode 100644 index 000000000..f13292089 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_ext.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/stareq_5.ma". +include "static_2/syntax/cext2.ma". +include "static_2/syntax/tdeq.ma". + +(* EXTENDED DEGREE-BASED EQUIVALENCE ****************************************) + +definition tdeq_ext: ∀h. sd h → relation bind ≝ + λh,o. ext2 (tdeq h o). + +definition cdeq: ∀h. sd h → relation3 lenv term term ≝ + λh,o,L. tdeq h o. + +definition cdeq_ext: ∀h. sd h → relation3 lenv bind bind ≝ + λh,o. cext2 (cdeq h o). + +interpretation + "context-free degree-based equivalence (binder)" + 'StarEq h o I1 I2 = (tdeq_ext h o I1 I2). + +interpretation + "context-dependent degree-based equivalence (term)" + 'StarEq h o L T1 T2 = (cdeq h o L T1 T2). + +interpretation + "context-dependent degree-based equivalence (binder)" + 'StarEq h o L I1 I2 = (cdeq_ext h o L I1 I2). diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_tdeq.ma new file mode 100644 index 000000000..a8bbec3fd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_tdeq.ma @@ -0,0 +1,50 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/tdeq.ma". + +(* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************) + +(* Main properties **********************************************************) + +theorem tdeq_trans: ∀h,o. Transitive … (tdeq h o). +#h #o #T1 #T #H elim H -T1 -T +[ #s1 #s #d #Hs1 #Hs #X #H + elim (tdeq_inv_sort1_deg … H … Hs) -s /2 width=3 by tdeq_sort/ +| #i1 #i #H <(tdeq_inv_lref1 … H) -H // +| #l1 #l #H <(tdeq_inv_gref1 … H) -H // +| #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H + elim (tdeq_inv_pair1 … H) -H /3 width=1 by tdeq_pair/ +] +qed-. + +theorem tdeq_canc_sn: ∀h,o. left_cancellable … (tdeq h o). +/3 width=3 by tdeq_trans, tdeq_sym/ qed-. + +theorem tdeq_canc_dx: ∀h,o. right_cancellable … (tdeq h o). +/3 width=3 by tdeq_trans, tdeq_sym/ qed-. + +theorem tdeq_repl: ∀h,o,T1,T2. T1 ≛[h, o] T2 → + ∀U1. T1 ≛[h, o] U1 → ∀U2. T2 ≛[h, o] U2 → U1 ≛[h, o] U2. +/3 width=3 by tdeq_canc_sn, tdeq_trans/ qed-. + +(* Negated main properies ***************************************************) + +theorem tdeq_tdneq_trans: ∀h,o,T1,T. T1 ≛[h, o] T → ∀T2. (T ≛[h, o] T2 → ⊥) → + T1 ≛[h, o] T2 → ⊥. +/3 width=3 by tdeq_canc_sn/ qed-. + +theorem tdneq_tdeq_canc_dx: ∀h,o,T1,T. (T1 ≛[h, o] T → ⊥) → ∀T2. T2 ≛[h, o] T → + T1 ≛[h, o] T2 → ⊥. +/3 width=3 by tdeq_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/term.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/term.ma new file mode 100644 index 000000000..93cce0ffc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/term.ma @@ -0,0 +1,153 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/item0_1.ma". +include "static_2/notation/functions/snitem2_3.ma". +include "static_2/notation/functions/snbind2_4.ma". +include "static_2/notation/functions/snbind2pos_3.ma". +include "static_2/notation/functions/snbind2neg_3.ma". +include "static_2/notation/functions/snflat2_3.ma". +include "static_2/notation/functions/star_1.ma". +include "static_2/notation/functions/lref_1.ma". +include "static_2/notation/functions/gref_1.ma". +include "static_2/notation/functions/snabbr_3.ma". +include "static_2/notation/functions/snabbrpos_2.ma". +include "static_2/notation/functions/snabbrneg_2.ma". +include "static_2/notation/functions/snabst_3.ma". +include "static_2/notation/functions/snabstpos_2.ma". +include "static_2/notation/functions/snabstneg_2.ma". +include "static_2/notation/functions/snappl_2.ma". +include "static_2/notation/functions/sncast_2.ma". +include "static_2/syntax/item.ma". + +(* TERMS ********************************************************************) + +(* terms *) +inductive term: Type[0] ≝ + | TAtom: item0 → term (* atomic item construction *) + | TPair: item2 → term → term → term (* binary item construction *) +. + +interpretation "term construction (atomic)" + 'Item0 I = (TAtom I). + +interpretation "term construction (binary)" + 'SnItem2 I T1 T2 = (TPair I T1 T2). + +interpretation "term binding construction (binary)" + 'SnBind2 p I T1 T2 = (TPair (Bind2 p I) T1 T2). + +interpretation "term positive binding construction (binary)" + 'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2). + +interpretation "term negative binding construction (binary)" + 'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2). + +interpretation "term flat construction (binary)" + 'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2). + +interpretation "sort (term)" + 'Star s = (TAtom (Sort s)). + +interpretation "local reference (term)" + 'LRef i = (TAtom (LRef i)). + +interpretation "global reference (term)" + 'GRef l = (TAtom (GRef l)). + +interpretation "abbreviation (term)" + 'SnAbbr p T1 T2 = (TPair (Bind2 p Abbr) T1 T2). + +interpretation "positive abbreviation (term)" + 'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2). + +interpretation "negative abbreviation (term)" + 'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2). + +interpretation "abstraction (term)" + 'SnAbst p T1 T2 = (TPair (Bind2 p Abst) T1 T2). + +interpretation "positive abstraction (term)" + 'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2). + +interpretation "negative abstraction (term)" + 'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2). + +interpretation "application (term)" + 'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2). + +interpretation "native type annotation (term)" + 'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2). + +(* Basic properties *********************************************************) + +(* Basic_1: was: term_dec *) +lemma eq_term_dec: ∀T1,T2:term. Decidable (T1 = T2). +#T1 elim T1 -T1 #I1 [| #V1 #T1 #IHV1 #IHT1 ] * #I2 [2,4: #V2 #T2 ] +[1,4: @or_intror #H destruct +| elim (eq_item2_dec I1 I2) #HI + [ elim (IHV1 V2) -IHV1 #HV + [ elim (IHT1 T2) -IHT1 /2 width=1 by or_introl/ #HT ] + ] + @or_intror #H destruct /2 width=1 by/ +| elim (eq_item0_dec I1 I2) /2 width=1 by or_introl/ #HI + @or_intror #H destruct /2 width=1 by/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_tatom_tatom_aux: ∀I1,I2. ⓪{I1} = ⓪{I2} → I1 = I2. +#I1 #I2 #H destruct // +qed-. + +fact destruct_tpair_tpair_aux: ∀I1,I2,T1,T2,V1,V2. ②{I1}T1.V1 = ②{I2}T2.V2 → + ∧∧T1 = T2 & I1 = I2 & V1 = V2. +#I1 #I2 #T1 #T2 #V1 #V2 #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma discr_tpair_xy_x: ∀I,T,V. ②{I}V.T = V → ⊥. +#I #T #V elim V -V +[ #J #H destruct +| #J #W #U #IHW #_ #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic_1: was: thead_x_y_y *) +lemma discr_tpair_xy_y: ∀I,V,T. ②{I}V.T = T → ⊥. +#I #V #T elim T -T +[ #J #H destruct +| #J #W #U #_ #IHU #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2. + (②{I}V1.T1 = ②{I}V2.T2 → ⊥) → + (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)). +#I #V1 #T1 #V2 #T2 #H +elim (eq_term_dec V1 V2) /3 width=1 by or_introl/ #HV12 destruct +@or_intror @conj // #HT12 destruct /2 width=1 by/ +qed-. + +lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2. + (②{I} V1. T1 = ②{I}V2.T2 → ⊥) → + (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)). +#I #V1 #T1 #V2 #T2 #H +elim (eq_term_dec T1 T2) /3 width=1 by or_introl/ #HT12 destruct +@or_intror @conj // #HT12 destruct /2 width=1 by/ +qed-. + +(* Basic_1: removed theorems 3: + not_void_abst not_abbr_void not_abst_void +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/term_simple.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/term_simple.ma new file mode 100644 index 000000000..4bef6764d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/term_simple.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/simple_1.ma". +include "static_2/syntax/term.ma". + +(* SIMPLE (NEUTRAL) TERMS ***************************************************) + +inductive simple: predicate term ≝ + | simple_atom: ∀I. simple (⓪{I}) + | simple_flat: ∀I,V,T. simple (ⓕ{I}V.T) +. + +interpretation "simple (term)" 'Simple T = (simple T). + +(* Basic inversion lemmas ***************************************************) + +fact simple_inv_bind_aux: ∀T. 𝐒⦃T⦄ → ∀p,J,W,U. T = ⓑ{p,J}W.U → ⊥. +#T * -T +[ #I #p #J #W #U #H destruct +| #I #V #T #a #J #W #U #H destruct +] +qed-. + +lemma simple_inv_bind: ∀p,I,V,T. 𝐒⦃ⓑ{p,I} V. T⦄ → ⊥. +/2 width=7 by simple_inv_bind_aux/ qed-. + +lemma simple_inv_pair: ∀I,V,T. 𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J. +* /2 width=2 by ex_intro/ +#p #I #V #T #H elim (simple_inv_bind … H) +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/term_vector.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/term_vector.ma new file mode 100644 index 000000000..b5da507bc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/term_vector.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "ground_2/lib/list.ma". +include "static_2/notation/functions/snapplvector_2.ma". +include "static_2/syntax/term_simple.ma". + +(* TERMS ********************************************************************) + +rec definition applv Vs T on Vs ≝ + match Vs with + [ nil ⇒ T + | cons hd tl ⇒ ⓐhd. (applv tl T) + ]. + +interpretation "application to vector (term)" + 'SnApplVector Vs T = (applv Vs T). + +(* Basic properties *********************************************************) + +lemma applv_nil: ∀T. ⒶⒺ.T = T. +// qed. + +lemma applv_cons: ∀V,Vs,T. ⒶV⨮Vs.T = ⓐV.ⒶVs.T. +// qed. + +(* Properties with simple terms *********************************************) + +lemma applv_simple: ∀T,Vs. 𝐒⦃T⦄ → 𝐒⦃ⒶVs.T⦄. +#T * // +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/term_weight.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/term_weight.ma new file mode 100644 index 000000000..c8d4c974d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/term_weight.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/functions/weight_1.ma". +include "static_2/syntax/term.ma". + +(* WEIGHT OF A TERM *********************************************************) + +rec definition tw T ≝ match T with +[ TAtom _ ⇒ 1 +| TPair _ V T ⇒ ↑(tw V + tw T) +]. + +interpretation "weight (term)" 'Weight T = (tw T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: tweight_lt *) +lemma tw_pos: ∀T. 1 ≤ ♯{T}. +#T elim T -T // +qed. + +(* Basic_1: removed theorems 11: + wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O + weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq.ma new file mode 100644 index 000000000..37c4af70a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/theq.ma @@ -0,0 +1,177 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/notation/relations/topiso_4.ma". +include "static_2/syntax/item_sd.ma". +include "static_2/syntax/term.ma". + +(* HEAD EQUIVALENCE FOR TERMS ***********************************************) + +(* Basic_2A1: includes: tsts_atom tsts_pair *) +inductive theq (h) (o): relation term ≝ +| theq_sort: ∀s1,s2,d. deg h o s1 d → deg h o s2 d → theq h o (⋆s1) (⋆s2) +| theq_lref: ∀i. theq h o (#i) (#i) +| theq_gref: ∀l. theq h o (§l) (§l) +| theq_pair: ∀I,V1,V2,T1,T2. theq h o (②{I}V1.T1) (②{I}V2.T2) +. + +interpretation "head equivalence (term)" 'TopIso h o T1 T2 = (theq h o T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact theq_inv_sort1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀s1. X = ⋆s1 → + ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. +#h #o #X #Y * -X -Y +[ #s1 #s2 #d #Hs1 #Hs2 #s #H destruct /2 width=5 by ex3_2_intro/ +| #i #s #H destruct +| #l #s #H destruct +| #I #V1 #V2 #T1 #T2 #s #H destruct +] +qed-. + +(* Basic_1: was just: iso_gen_sort *) +lemma theq_inv_sort1: ∀h,o,Y,s1. ⋆s1 ⩳[h, o] Y → + ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2. +/2 width=3 by theq_inv_sort1_aux/ qed-. + +fact theq_inv_lref1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀i. X = #i → Y = #i. +#h #o #X #Y * -X -Y // +[ #s1 #s2 #d #_ #_ #j #H destruct +| #I #V1 #V2 #T1 #T2 #j #H destruct +] +qed-. + +(* Basic_1: was: iso_gen_lref *) +lemma theq_inv_lref1: ∀h,o,Y,i. #i ⩳[h, o] Y → Y = #i. +/2 width=5 by theq_inv_lref1_aux/ qed-. + +fact theq_inv_gref1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀l. X = §l → Y = §l. +#h #o #X #Y * -X -Y // +[ #s1 #s2 #d #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #k #H destruct +] +qed-. + +lemma theq_inv_gref1: ∀h,o,Y,l. §l ⩳[h, o] Y → Y = §l. +/2 width=5 by theq_inv_gref1_aux/ qed-. + +fact theq_inv_pair1_aux: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → + ∀J,W1,U1. T1 = ②{J}W1.U1 → + ∃∃W2,U2. T2 = ②{J}W2.U2. +#h #o #T1 #T2 * -T1 -T2 +[ #s1 #s2 #d #_ #_ #J #W1 #U1 #H destruct +| #i #J #W1 #U1 #H destruct +| #l #J #W1 #U1 #H destruct +| #I #V1 #V2 #T1 #T2 #J #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/ +] +qed-. + +(* Basic_1: was: iso_gen_head *) +(* Basic_2A1: was: tsts_inv_pair1 *) +lemma theq_inv_pair1: ∀h,o,J,W1,U1,T2. ②{J}W1.U1 ⩳[h, o] T2 → + ∃∃W2,U2. T2 = ②{J}W2. U2. +/2 width=7 by theq_inv_pair1_aux/ qed-. + +fact theq_inv_pair2_aux: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → + ∀J,W2,U2. T2 = ②{J}W2.U2 → + ∃∃W1,U1. T1 = ②{J}W1.U1. +#h #o #T1 #T2 * -T1 -T2 +[ #s1 #s2 #d #_ #_ #J #W2 #U2 #H destruct +| #i #J #W2 #U2 #H destruct +| #l #J #W2 #U2 #H destruct +| #I #V1 #V2 #T1 #T2 #J #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/ +] +qed-. + +(* Basic_2A1: was: tsts_inv_pair2 *) +lemma theq_inv_pair2: ∀h,o,J,T1,W2,U2. T1 ⩳[h, o] ②{J}W2.U2 → + ∃∃W1,U1. T1 = ②{J}W1.U1. +/2 width=7 by theq_inv_pair2_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma theq_inv_sort1_deg: ∀h,o,Y,s1. ⋆s1 ⩳[h, o] Y → ∀d. deg h o s1 d → + ∃∃s2. deg h o s2 d & Y = ⋆s2. +#h #o #Y #s1 #H #d #Hs1 elim (theq_inv_sort1 … H) -H +#s2 #x #Hx <(deg_mono h o … Hx … Hs1) -s1 -d /2 width=3 by ex2_intro/ +qed-. + +lemma theq_inv_sort_deg: ∀h,o,s1,s2. ⋆s1 ⩳[h, o] ⋆s2 → + ∀d1,d2. deg h o s1 d1 → deg h o s2 d2 → + d1 = d2. +#h #o #s1 #y #H #d1 #d2 #Hs1 #Hy +elim (theq_inv_sort1_deg … H … Hs1) -s1 #s2 #Hs2 #H destruct +<(deg_mono h o … Hy … Hs2) -s2 -d1 // +qed-. + +lemma theq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ⩳[h, o] ②{I2}V2.T2 → + I1 = I2. +#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H elim (theq_inv_pair1 … H) -H +#V0 #T0 #H destruct // +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: iso_refl *) +(* Basic_2A1: was: tsts_refl *) +lemma theq_refl: ∀h,o. reflexive … (theq h o). +#h #o * // +* /2 width=1 by theq_lref, theq_gref/ +#s elim (deg_total h o s) /2 width=3 by theq_sort/ +qed. + +(* Basic_2A1: was: tsts_sym *) +lemma theq_sym: ∀h,o. symmetric … (theq h o). +#h #o #T1 #T2 * -T1 -T2 /2 width=3 by theq_sort/ +qed-. + +(* Basic_2A1: was: tsts_dec *) +lemma theq_dec: ∀h,o,T1,T2. Decidable (T1 ⩳[h, o] T2). +#h #o * [ * #s1 | #I1 #V1 #T1 ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] +[ elim (deg_total h o s1) #d1 #H1 + elim (deg_total h o s2) #d2 #H2 + elim (eq_nat_dec d1 d2) #Hd12 destruct /3 width=3 by theq_sort, or_introl/ + @or_intror #H + lapply (theq_inv_sort_deg … H … H1 H2) -H -H1 -H2 /2 width=1 by/ +|2,3,13: + @or_intror #H + elim (theq_inv_sort1 … H) -H #x1 #x2 #_ #_ #H destruct +|4,6,14: + @or_intror #H + lapply (theq_inv_lref1 … H) -H #H destruct +|5: + elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ + @or_intror #H + lapply (theq_inv_lref1 … H) -H #H destruct /2 width=1 by/ +|7,8,15: + @or_intror #H + lapply (theq_inv_gref1 … H) -H #H destruct +|9: + elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ + @or_intror #H + lapply (theq_inv_gref1 … H) -H #H destruct /2 width=1 by/ +|10,11,12: + @or_intror #H + elim (theq_inv_pair1 … H) -H #X1 #X2 #H destruct +|16: + elim (eq_item2_dec I1 I2) #HI12 destruct + [ /3 width=1 by theq_pair, or_introl/ ] + @or_intror #H + lapply (theq_inv_pair … H) -H /2 width=1 by/ +] +qed-. + +(* Basic_2A1: removed theorems 2: + tsts_inv_atom1 tsts_inv_atom2 +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple.ma new file mode 100644 index 000000000..9ad5ed550 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_simple.ma". +include "static_2/syntax/theq.ma". + +(* HEAD EQUIVALENCE FOR TERMS ***********************************************) + +(* Properies with simple (neutral) terms ************************************) + +(* Basic_2A1: was: simple_tsts_repl_dx *) +lemma simple_theq_repl_dx: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. +#h #o #T1 #T2 * -T1 -T2 // +#I #V1 #V2 #T1 #T2 #H +elim (simple_inv_pair … H) -H #J #H destruct // +qed-. + +(* Basic_2A1: was: simple_tsts_repl_sn *) +lemma simple_theq_repl_sn: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. +/3 width=5 by simple_theq_repl_dx, theq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple_vector.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple_vector.ma new file mode 100644 index 000000000..f7212ee11 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple_vector.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/term_vector.ma". +include "static_2/syntax/theq_simple.ma". + +(* HEAD EQUIVALENCE FOR TERMS ***********************************************) + +(* Advanced inversion lemmas with simple (neutral) terms ********************) + +(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *) +(* Basic_2A1: was: tsts_inv_bind_applv_simple *) +lemma theq_inv_applv_bind_simple: ∀h,o,p,I,Vs,V2,T1,T2. ⒶVs.T1 ⩳[h, o] ⓑ{p,I}V2.T2 → + 𝐒⦃T1⦄ → ⊥. +#h #o #p #I #Vs #V2 #T1 #T2 #H elim (theq_inv_pair2 … H) -H +#V0 #T0 elim Vs -Vs normalize +[ #H destruct #H /2 width=5 by simple_inv_bind/ +| #V #Vs #_ #H destruct +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_tdeq.ma new file mode 100644 index 000000000..99447dba7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_tdeq.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/tdeq.ma". +include "static_2/syntax/theq.ma". + +(* HEAD EQUIVALENCE FOR TERMS ***********************************************) + +(* Properties with degree-based equivalence for terms ***********************) + +lemma tdeq_theq: ∀h,o,T1,T2. T1 ≛[h, o] T2 → T1 ⩳[h, o] T2. +#h #o #T1 #T2 * -T1 -T2 /2 width=3 by theq_sort, theq_pair/ +qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_theq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_theq.ma new file mode 100644 index 000000000..e9e586d00 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_theq.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "static_2/syntax/theq.ma". + +(* HEAD EQUIVALENCE FOR TERMS ***********************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: iso_trans *) +(* Basic_2A1: was: tsts_trans *) +theorem theq_trans: ∀h,o. Transitive … (theq h o). +#h #o #T1 #T * -T1 -T +[ #s1 #s #d #Hs1 #Hs #X #H + elim (theq_inv_sort1_deg … H … Hs) -s /2 width=3 by theq_sort/ +| #i1 #i #H <(theq_inv_lref1 … H) -H // +| #l1 #l #H <(theq_inv_gref1 … H) -H // +| #I #V1 #V #T1 #T #X #H + elim (theq_inv_pair1 … H) -H #V2 #T2 #H destruct // +] +qed-. + +(* Basic_2A1: was: tsts_canc_sn *) +theorem theq_canc_sn: ∀h,o. left_cancellable … (theq h o). +/3 width=3 by theq_trans, theq_sym/ qed-. + +(* Basic_2A1: was: tsts_canc_dx *) +theorem theq_canc_dx: ∀h,o. right_cancellable … (theq h o). +/3 width=3 by theq_trans, theq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/web/static_2.ldw.xml b/matita/matita/contribs/lambdadelta/static_2/web/static_2.ldw.xml new file mode 100644 index 000000000..5df6a4609 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/web/static_2.ldw.xml @@ -0,0 +1,32 @@ + + + + + + Contents of the Specification + This specification contains the syntactic components of λδ version 2 + that every forthcoming system of the λδ family will share. + + + Summary of the Specification + Here is a numerical account of the specification's contents + and its timeline. + + + + + The specification stands alone. + + + Logical Structure of the Specification + This table reports the specification's components and their planes. + +
+ +
+ diff --git a/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl b/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl new file mode 100644 index 000000000..740b3482e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl @@ -0,0 +1,167 @@ +name "static_2_src" + +table { + class "gray" + [ { "component" * } { + [ { "section" * } { + [ [ "plane" ] "files" * ] + } + ] + } + ] + class "water" + [ { "iterated static typing" * } { + [ { "iterated generic extension of a context-sensitive relation" * } { + [ [ "for lenvs on referred entries" ] "rexs" + "( ? ⪤*[?,?] ? )" "rexs_length" + "rexs_lex" + "rexs_drops" + "rexs_fqup" + "rexs_rexs" * ] + } + ] + } + ] + class "green" + [ { "static typing" * } { + [ { "generic reducibility" * } { + [ [ "restricted refinement for lenvs" ] "lsubc" + "( ? ⊢ ? ⫃[?] ? )" "lsubc_drops" + "lsubc_lsubr" + "lsubc_lsuba" * ] + [ [ "candidates" ] "gcp_cr" + "( ⦃?,?,?⦄ ϵ[?] 〚?〛 )" "gcp_aaa" * ] + [ [ "computation properties" ] "gcp" *] + } + ] + [ { "atomic arity assignment" * } { + [ [ "restricted refinement for lenvs" ] "lsuba" + "( ? ⊢ ? ⫃⁝ ? )" "lsuba_drops" + "lsuba_lsubr" + "lsuba_aaa" + "lsuba_lsuba" * ] + [ [ "for terms" ] "aaa" + "( ⦃?,?⦄ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_rdeq" + "aaa_fdeq" + "aaa_aaa" * ] + } + ] + [ { "degree-based equivalence" * } { + [ [ "for closures on referred entries" ] "fdeq" + "( ⦃?,?,?⦄ ≛[?,?] ⦃?,?,?⦄ )" "fdeq_fqup" + "fdeq_fqus" + "fdeq_req" + "fdeq_fdeq" * ] + [ [ "for lenvs on referred entries" ] "rdeq" + "( ? ≛[?,?,?] ? )" "rdeq_length" + "rdeq_drops" + "rdeq_fqup" + "rdeq_fqus" + "rdeq_req" + "rdeq_rdeq" * ] + } + ] + [ { "syntactic equivalence" * } { + [ [ "for lenvs on referred entries" ] "req" + "( ? ≡[?] ? )" "req_fqup" + "req_fsle" * ] + } + ] + [ { "generic extension of a context-sensitive relation" * } { + [ [ "for lenvs on referred entries" ] "rex" + "( ? ⪤[?,?] ? )" "rex_length" + "rex_lex" + "rex_drops" + "rex_fqup" + "rex_fsle" + "rex_rex" * ] + } + ] + [ { "context-sensitive free variables" * } { + [ [ "inclusion for restricted closures" ] "fsle" + "( ⦃?,?⦄ ⊆ ⦃?,?⦄ )" "fsle_length" + "fsle_drops" + "fsle_fqup" + "fsle_fsle" * ] + [ [ "restricted refinement for lenvs" ] "lsubf" + "( ⦃?,?⦄ ⫃𝐅* ⦃?,?⦄ )" "lsubf_lsubr" + "lsubf_frees" + "lsubf_lsubf" * ] + [ [ "for terms" ] "frees" + "( ? ⊢ 𝐅*⦃?⦄ ≘ ? )" "frees_append" + "frees_drops" + "frees_fqup" + "frees_frees" * ] + } + ] + [ { "local environments" * } { + [ [ "restricted refinement" ] "lsubr" + "( ? ⫃ ? )" "lsubr_length" + "lsubr_drops" + "lsubr_lsubr" * ] + } + ] + } + ] + class "grass" + [ { "s-computation" * } { + [ { "iterated structural successor" * } { + [ [ "for closures" ] "fqus" + "( ⦃?,?,?⦄ ⊐*[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐* ⦃?,?,?⦄ )" "fqus_weight" + "fqus_drops" + "fqus_fqup" + "fqus_fqus" * ] + [ [ "proper for closures" ] "fqup" + "( ⦃?,?,?⦄ ⊐+[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐+ ⦃?,?,?⦄ )" "fqup_weight" + "fqup_drops" + "fqup_fqup" * ] + } + ] + } + ] + class "yellow" + [ { "s-transition" * } { + [ { "structural successor" * } { + [ [ "for closures" ] "fquq" + "( ⦃?,?,?⦄ ⊐⸮[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐⸮ ⦃?,?,?⦄ )" "fquq_length" + "fquq_weight" * ] + [ [ "proper for closures" ] "fqu" + "( ⦃?,?,?⦄ ⊐[?] ⦃?,?,?⦄ )" + "( ⦃?,?,?⦄ ⊐ ⦃?,?,?⦄ )" "fqu_length" + "fqu_weight" + "fqu_tdeq" * ] + } + ] + } + ] + class "orange" + [ { "relocation" * } { + [ { "generic slicing" * } { + [ [ "for lenvs" ] "drops" + "( ⬇*[?,?] ? ≘ ? )" + "( ⬇*[?] ? ≘ ? )" "drops_ctc" + "drops_ltc" + "drops_weight" + "drops_length" + "drops_cext2" + "drops_sex" + "drops_lex" + "drops_seq" + "drops_drops" + "drops_vector" * ] + } + ] + [ { "generic relocation" * } { + [ [ "for binders" ] "lifts_bind" + "( ⬆*[?] ? ≘ ? )" "lifts_weight_bind" + "lifts_lifts_bind" * ] + [ [ "for term vectors" ] "lifts_vector" + "( ⬆*[?] ? ≘ ? )" "lifts_lifts_vector" * ] + [ [ "for terms" ] "lifts" + "( ⬆*[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_tdeq" + "lifts_lifts" * ] + } + ] + [ { "syntactic equivalence" * } { + [ [ "for lenvs on selected entries" ] "seq" + "( ? ≡[?] ? )" "seq_length" + "seq_seq" * ] + } + ] + [ { "generic entrywise extension" * } { + [ [ "for lenvs of one contex-sensitive relation" ] "lex" + "( ? ⪤[?] ? )" "lex_tc" + "lex_length" + "lex_lex" * ] + [ [ "for lenvs of two contex-sensitive relations" ] "sex" + "( ? ⪤[?,?,?] ? )" "sex_tc" + "sex_length" + "sex_sex" * ] + } + ] + } + ] + class "red" + [ { "syntax" * } { + [ { "equivalence up to exclusion binders" * } { + [ [ "for lenvs" ] "lveq" + "( ? ≋ⓧ*[?,?] ? )" "lveq_length" + "lveq_lveq" * ] + } + ] + [ { "append" * } { + [ [ "for lenvs" ] "append" + "( ? + ? )" "append_length" * ] + } + ] + [ { "head equivalence" * } { + [ [ "for terms" ] "theq" + "( ? ⩳[?,?] ? )" "theq_simple" + "theq_tdeq" + "theq_theq" + "theq_simple_vector" * ] + } + ] + [ { "degree-based equivalence" * } { + [ [ "" ] "tdeq_ext" + "( ? ≛[?,?] ? )" + "( ? ⊢ ? ≛[?,?] ? )" * ] + [ [ "" ] "tdeq" + "( ? ≛[?,?] ? )" "tdeq_tdeq" * ] + } + ] + [ { "closures" * } { + [ [ "" ] "cl_weight" + "( ♯{?,?,?} )" * ] + [ [ "" ] "cl_restricted_weight" + "( ♯{?,?} )" * ] + } + ] + [ { "global environments" * } { + [ [ "" ] "genv_length" + "( |?| )" * ] + [ [ "" ] "genv_weight" + "( ♯{?} )" * ] + [ [ "" ] "genv" * ] + } + ] + [ { "local environments" * } { + [ [ "" ] "ceq_ext" "ceq_ext_ceq_ext" * ] + [ [ "" ] "cext2" * ] + [ [ "" ] "lenv_length" + "( |?| )" * ] + [ [ "" ] "lenv_weight" + "( ♯{?} )" * ] + [ [ "" ] "lenv" * ] + } + ] + [ { "binders for local environments" * } { + [ [ "" ] "ext2" "ext2_tc" + "ext2_ext2" * ] + [ [ "" ] "bind" "bind_weight" * ] + } + ] + [ { "terms" * } { + [ [ "" ] "term_vector" + "( Ⓐ?.? )" * ] + [ [ "" ] "term_simple" + "( 𝐒⦃?⦄ )" * ] + [ [ "" ] "term_weight" + "( ♯{?} )" * ] + [ [ "" ] "term" * ] + } + ] + [ { "items" * } { + [ [ "" ] "item_sd" * ] + [ [ "" ] "item_sh" * ] + [ [ "" ] "item" * ] + } + ] + [ { "atomic arities" * } { + [ [ "" ] "aarity" * ] + } + ] + } + ] +} + +class "top" { * } + +class "capitalize italic" { 0 1 } + +class "italic" { 2 }