From: Ferruccio Guidi Date: Mon, 4 Oct 2021 16:03:25 +0000 (+0200) Subject: update in ground X-Git-Tag: make_still_working~139 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=f8b4eb67c2437f7b5174d7dca46e102e0ac0d19d;ds=sidebyside update in ground + some renaming --- diff --git a/matita/matita/contribs/lambdadelta/bin/recomm/bGroundRelocation.mrc b/matita/matita/contribs/lambdadelta/bin/recomm/bGroundRelocation.mrc index c2f0b17d3..9570b5aa2 100644 --- a/matita/matita/contribs/lambdadelta/bin/recomm/bGroundRelocation.mrc +++ b/matita/matita/contribs/lambdadelta/bin/recomm/bGroundRelocation.mrc @@ -1,23 +1,23 @@ PcsAnd b "" true false -gr_eq -gr_tl, tl, tail -gr_pushs, pushs, iterated push -gr_nexts, nexts, iterated next -gr_tls, tls, iterated tail -gr_id, id -gr_uni, uni, uniform relocations -gr_basic, basic relocation -gr_pat, pat, at -gr_nat, nat -gr_isi, isi, isid, test for identity -gr_isu, isuni, test for uniform relocations -gr_fcla, fcla, finite colength assignment, finite colength -gr_isf, isf, isfin, test for finite colength -gr_ist, ist, istot -gr_isd, isdiv -gr_after, after -gr_coafter, coafter -gr_sle, sle, inclusion -gr_sdj, sdj -gr_sand, sand -gr_sor, sor +pr_eq +pr_tl, tl, tail +pr_pushs, pushs, iterated push +pr_nexts, nexts, iterated next +pr_tls, tls, iterated tail +pr_id, id +pr_uni, uni, uniform relocations +pr_basic, basic relocation +pr_pat, pat, at +pr_nat, nat +pr_isi, isi, isid, test for identity +pr_isu, isuni, test for uniform relocations +pr_fcla, fcla, finite colength assignment, finite colength +pr_isf, isf, isfin, test for finite colength +pr_ist, ist, istot +pr_isd, isdiv +pr_after, after +pr_coafter, coafter +pr_sle, sle, inclusion +pr_sdj, sdj +pr_sand, sand +pr_sor, sor diff --git a/matita/matita/contribs/lambdadelta/bin/recomm/dGroundRelocation.mrc b/matita/matita/contribs/lambdadelta/bin/recomm/dGroundRelocation.mrc index 1dcb63621..6961848d0 100644 --- a/matita/matita/contribs/lambdadelta/bin/recomm/dGroundRelocation.mrc +++ b/matita/matita/contribs/lambdadelta/bin/recomm/dGroundRelocation.mrc @@ -1,4 +1,4 @@ PccFor d "" true false FINITE RELOCATION MAPS FINITE RELOCATION MAPS WITH PAIRS -GENERIC RELOCATION MAPS +PARTIAL RELOCATION MAPS diff --git a/matita/matita/contribs/lambdadelta/bin/recomm/recommGcbGroundRelocation.ml b/matita/matita/contribs/lambdadelta/bin/recomm/recommGcbGroundRelocation.ml index 70e95bb4e..466386a8d 100644 --- a/matita/matita/contribs/lambdadelta/bin/recomm/recommGcbGroundRelocation.ml +++ b/matita/matita/contribs/lambdadelta/bin/recomm/recommGcbGroundRelocation.ml @@ -4,64 +4,64 @@ module R = RecommPcsAnd let step k st outs ins = if st <> T.OO then k st outs ins else match ins with - | "gr_sor" :: tl -> k T.OK ("gr_sor" :: outs) tl - | "sor" :: tl -> k T.OK ("gr_sor" :: outs) tl - | "gr_sand" :: tl -> k T.OK ("gr_sand" :: outs) tl - | "sand" :: tl -> k T.OK ("gr_sand" :: outs) tl - | "gr_sdj" :: tl -> k T.OK ("gr_sdj" :: outs) tl - | "sdj" :: tl -> k T.OK ("gr_sdj" :: outs) tl - | "gr_sle" :: tl -> k T.OK ("gr_sle" :: outs) tl - | "sle" :: tl -> k T.OK ("gr_sle" :: outs) tl - | "inclusion" :: tl -> k T.OK ("gr_sle" :: outs) tl - | "gr_coafter" :: tl -> k T.OK ("gr_coafter" :: outs) tl - | "coafter" :: tl -> k T.OK ("gr_coafter" :: outs) tl - | "gr_after" :: tl -> k T.OK ("gr_after" :: outs) tl - | "after" :: tl -> k T.OK ("gr_after" :: outs) tl - | "gr_isd" :: tl -> k T.OK ("gr_isd" :: outs) tl - | "isdiv" :: tl -> k T.OK ("gr_isd" :: outs) tl - | "gr_ist" :: tl -> k T.OK ("gr_ist" :: outs) tl - | "ist" :: tl -> k T.OK ("gr_ist" :: outs) tl - | "istot" :: tl -> k T.OK ("gr_ist" :: outs) tl - | "gr_isf" :: tl -> k T.OK ("gr_isf" :: outs) tl - | "isf" :: tl -> k T.OK ("gr_isf" :: outs) tl - | "isfin" :: tl -> k T.OK ("gr_isf" :: outs) tl - | "test" :: "for" :: "finite" :: "colength" :: tl -> k T.OK ("gr_isf" :: outs) tl - | "gr_fcla" :: tl -> k T.OK ("gr_fcla" :: outs) tl - | "fcla" :: tl -> k T.OK ("gr_fcla" :: outs) tl - | "finite" :: "colength" :: "assignment" :: tl -> k T.OK ("gr_fcla" :: outs) tl - | "finite" :: "colength" :: tl -> k T.OK ("gr_fcla" :: outs) tl - | "gr_isu" :: tl -> k T.OK ("gr_isu" :: outs) tl - | "isuni" :: tl -> k T.OK ("gr_isu" :: outs) tl - | "test" :: "for" :: "uniform" :: "relocations" :: tl -> k T.OK ("gr_isu" :: outs) tl - | "gr_isi" :: tl -> k T.OK ("gr_isi" :: outs) tl - | "isi" :: tl -> k T.OK ("gr_isi" :: outs) tl - | "isid" :: tl -> k T.OK ("gr_isi" :: outs) tl - | "test" :: "for" :: "identity" :: tl -> k T.OK ("gr_isi" :: outs) tl - | "gr_nat" :: tl -> k T.OK ("gr_nat" :: outs) tl - | "nat" :: tl -> k T.OK ("gr_nat" :: outs) tl - | "gr_pat" :: tl -> k T.OK ("gr_pat" :: outs) tl - | "pat" :: tl -> k T.OK ("gr_pat" :: outs) tl - | "at" :: tl -> k T.OK ("gr_pat" :: outs) tl - | "gr_basic" :: tl -> k T.OK ("gr_basic" :: outs) tl - | "basic" :: "relocation" :: tl -> k T.OK ("gr_basic" :: outs) tl - | "gr_uni" :: tl -> k T.OK ("gr_uni" :: outs) tl - | "uni" :: tl -> k T.OK ("gr_uni" :: outs) tl - | "uniform" :: "relocations" :: tl -> k T.OK ("gr_uni" :: outs) tl - | "gr_id" :: tl -> k T.OK ("gr_id" :: outs) tl - | "id" :: tl -> k T.OK ("gr_id" :: outs) tl - | "gr_tls" :: tl -> k T.OK ("gr_tls" :: outs) tl - | "tls" :: tl -> k T.OK ("gr_tls" :: outs) tl - | "iterated" :: "tail" :: tl -> k T.OK ("gr_tls" :: outs) tl - | "gr_nexts" :: tl -> k T.OK ("gr_nexts" :: outs) tl - | "nexts" :: tl -> k T.OK ("gr_nexts" :: outs) tl - | "iterated" :: "next" :: tl -> k T.OK ("gr_nexts" :: outs) tl - | "gr_pushs" :: tl -> k T.OK ("gr_pushs" :: outs) tl - | "pushs" :: tl -> k T.OK ("gr_pushs" :: outs) tl - | "iterated" :: "push" :: tl -> k T.OK ("gr_pushs" :: outs) tl - | "gr_tl" :: tl -> k T.OK ("gr_tl" :: outs) tl - | "tl" :: tl -> k T.OK ("gr_tl" :: outs) tl - | "tail" :: tl -> k T.OK ("gr_tl" :: outs) tl - | "gr_eq" :: tl -> k T.OK ("gr_eq" :: outs) tl + | "pr_sor" :: tl -> k T.OK ("pr_sor" :: outs) tl + | "sor" :: tl -> k T.OK ("pr_sor" :: outs) tl + | "pr_sand" :: tl -> k T.OK ("pr_sand" :: outs) tl + | "sand" :: tl -> k T.OK ("pr_sand" :: outs) tl + | "pr_sdj" :: tl -> k T.OK ("pr_sdj" :: outs) tl + | "sdj" :: tl -> k T.OK ("pr_sdj" :: outs) tl + | "pr_sle" :: tl -> k T.OK ("pr_sle" :: outs) tl + | "sle" :: tl -> k T.OK ("pr_sle" :: outs) tl + | "inclusion" :: tl -> k T.OK ("pr_sle" :: outs) tl + | "pr_coafter" :: tl -> k T.OK ("pr_coafter" :: outs) tl + | "coafter" :: tl -> k T.OK ("pr_coafter" :: outs) tl + | "pr_after" :: tl -> k T.OK ("pr_after" :: outs) tl + | "after" :: tl -> k T.OK ("pr_after" :: outs) tl + | "pr_isd" :: tl -> k T.OK ("pr_isd" :: outs) tl + | "isdiv" :: tl -> k T.OK ("pr_isd" :: outs) tl + | "pr_ist" :: tl -> k T.OK ("pr_ist" :: outs) tl + | "ist" :: tl -> k T.OK ("pr_ist" :: outs) tl + | "istot" :: tl -> k T.OK ("pr_ist" :: outs) tl + | "pr_isf" :: tl -> k T.OK ("pr_isf" :: outs) tl + | "isf" :: tl -> k T.OK ("pr_isf" :: outs) tl + | "isfin" :: tl -> k T.OK ("pr_isf" :: outs) tl + | "test" :: "for" :: "finite" :: "colength" :: tl -> k T.OK ("pr_isf" :: outs) tl + | "pr_fcla" :: tl -> k T.OK ("pr_fcla" :: outs) tl + | "fcla" :: tl -> k T.OK ("pr_fcla" :: outs) tl + | "finite" :: "colength" :: "assignment" :: tl -> k T.OK ("pr_fcla" :: outs) tl + | "finite" :: "colength" :: tl -> k T.OK ("pr_fcla" :: outs) tl + | "pr_isu" :: tl -> k T.OK ("pr_isu" :: outs) tl + | "isuni" :: tl -> k T.OK ("pr_isu" :: outs) tl + | "test" :: "for" :: "uniform" :: "relocations" :: tl -> k T.OK ("pr_isu" :: outs) tl + | "pr_isi" :: tl -> k T.OK ("pr_isi" :: outs) tl + | "isi" :: tl -> k T.OK ("pr_isi" :: outs) tl + | "isid" :: tl -> k T.OK ("pr_isi" :: outs) tl + | "test" :: "for" :: "identity" :: tl -> k T.OK ("pr_isi" :: outs) tl + | "pr_nat" :: tl -> k T.OK ("pr_nat" :: outs) tl + | "nat" :: tl -> k T.OK ("pr_nat" :: outs) tl + | "pr_pat" :: tl -> k T.OK ("pr_pat" :: outs) tl + | "pat" :: tl -> k T.OK ("pr_pat" :: outs) tl + | "at" :: tl -> k T.OK ("pr_pat" :: outs) tl + | "pr_basic" :: tl -> k T.OK ("pr_basic" :: outs) tl + | "basic" :: "relocation" :: tl -> k T.OK ("pr_basic" :: outs) tl + | "pr_uni" :: tl -> k T.OK ("pr_uni" :: outs) tl + | "uni" :: tl -> k T.OK ("pr_uni" :: outs) tl + | "uniform" :: "relocations" :: tl -> k T.OK ("pr_uni" :: outs) tl + | "pr_id" :: tl -> k T.OK ("pr_id" :: outs) tl + | "id" :: tl -> k T.OK ("pr_id" :: outs) tl + | "pr_tls" :: tl -> k T.OK ("pr_tls" :: outs) tl + | "tls" :: tl -> k T.OK ("pr_tls" :: outs) tl + | "iterated" :: "tail" :: tl -> k T.OK ("pr_tls" :: outs) tl + | "pr_nexts" :: tl -> k T.OK ("pr_nexts" :: outs) tl + | "nexts" :: tl -> k T.OK ("pr_nexts" :: outs) tl + | "iterated" :: "next" :: tl -> k T.OK ("pr_nexts" :: outs) tl + | "pr_pushs" :: tl -> k T.OK ("pr_pushs" :: outs) tl + | "pushs" :: tl -> k T.OK ("pr_pushs" :: outs) tl + | "iterated" :: "push" :: tl -> k T.OK ("pr_pushs" :: outs) tl + | "pr_tl" :: tl -> k T.OK ("pr_tl" :: outs) tl + | "tl" :: tl -> k T.OK ("pr_tl" :: outs) tl + | "tail" :: tl -> k T.OK ("pr_tl" :: outs) tl + | "pr_eq" :: tl -> k T.OK ("pr_eq" :: outs) tl | _ -> k T.OO outs ins let main = diff --git a/matita/matita/contribs/lambdadelta/bin/recomm/recommGcdGroundRelocation.ml b/matita/matita/contribs/lambdadelta/bin/recomm/recommGcdGroundRelocation.ml index 349cf6b36..a146ffc98 100644 --- a/matita/matita/contribs/lambdadelta/bin/recomm/recommGcdGroundRelocation.ml +++ b/matita/matita/contribs/lambdadelta/bin/recomm/recommGcdGroundRelocation.ml @@ -4,7 +4,7 @@ module R = RecommPccFor let step k st outs ins = if st <> T.OO then k st outs ins else match ins with - | "GENERIC" :: "RELOCATION" :: "MAPS" :: tl -> k T.OK ("MAPS" :: "RELOCATION" :: "GENERIC" :: outs) tl + | "PARTIAL" :: "RELOCATION" :: "MAPS" :: tl -> k T.OK ("MAPS" :: "RELOCATION" :: "PARTIAL" :: outs) tl | "FINITE" :: "RELOCATION" :: "MAPS" :: "WITH" :: "PAIRS" :: tl -> k T.OK ("PAIRS" :: "WITH" :: "MAPS" :: "RELOCATION" :: "FINITE" :: outs) tl | "FINITE" :: "RELOCATION" :: "MAPS" :: tl -> k T.OK ("MAPS" :: "RELOCATION" :: "FINITE" :: outs) tl | _ -> k T.OO outs ins diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_after.ma deleted file mode 100644 index a5afa31e6..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after.ma +++ /dev/null @@ -1,197 +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/notation/relations/rafter_3.ma". -include "ground/xoa/ex_3_2.ma". -include "ground/relocation/gr_tl.ma". - -(* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************) - -(*** after *) -coinductive gr_after: relation3 gr_map gr_map gr_map ≝ -(*** after_refl *) -| gr_after_refl (f1) (f2) (f) (g1) (g2) (g): - gr_after f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → gr_after g1 g2 g -(*** after_push *) -| gr_after_push (f1) (f2) (f) (g1) (g2) (g): - gr_after f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → gr_after g1 g2 g -(*** after_next *) -| gr_after_next (f1) (f2) (f) (g1) (g): - gr_after f1 f2 f → ↑f1 = g1 → ↑f = g → gr_after g1 f2 g -. - -interpretation - "relational composition (generic relocation maps)" - 'RAfter f1 f2 f = (gr_after f1 f2 f). - -(* Basic inversions *********************************************************) - -(*** after_inv_ppx *) -lemma gr_after_inv_push_bi: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → - ∃∃f. f1 ⊚ f2 ≘ f & ⫯f = g. -#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 -[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct - >(eq_inv_gr_push_bi … Hx1) >(eq_inv_gr_push_bi … Hx2) -x2 -x1 - /2 width=3 by ex2_intro/ -| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct - elim (eq_inv_gr_push_next … Hx2) -| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct - elim (eq_inv_gr_push_next … Hx1) -] -qed-. - -(*** after_inv_pnx *) -lemma gr_after_inv_push_next: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → - ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g. -#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 -[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct - elim (eq_inv_gr_next_push … Hx2) -| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct - >(eq_inv_gr_push_bi … Hx1) >(eq_inv_gr_next_bi … Hx2) -x2 -x1 - /2 width=3 by ex2_intro/ -| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct - elim (eq_inv_gr_push_next … Hx1) -] -qed-. - -(*** after_inv_nxx *) -lemma gr_after_inv_next_sn: - ∀g1,f2,g. g1 ⊚ f2 ≘ g → ∀f1. ↑f1 = g1 → - ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g. -#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1 -[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct - elim (eq_inv_gr_next_push … Hx1) -| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct - elim (eq_inv_gr_next_push … Hx1) -| #g #Hf #H1 #H #x1 #Hx1 destruct - >(eq_inv_gr_next_bi … Hx1) -x1 - /2 width=3 by ex2_intro/ -] -qed-. - -(* Advanced inversions ******************************************************) - -(*** after_inv_ppp *) -lemma gr_after_inv_push_bi_push: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⊚ f2 ≘ f. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (gr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 -#x #Hf #Hx destruct <(eq_inv_gr_push_bi … Hx) -f // -qed-. - -(*** after_inv_ppn *) -lemma gr_after_inv_push_bi_next: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (gr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 -#x #Hf #Hx destruct elim (eq_inv_gr_push_next … Hx) -qed-. - -(*** after_inv_pnn *) -lemma gr_after_inv_push_next_next: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⊚ f2 ≘ f. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (gr_after_inv_push_next … Hg … H1 H2) -g1 -g2 -#x #Hf #Hx destruct <(eq_inv_gr_next_bi … Hx) -f // -qed-. - -(*** after_inv_pnp *) -lemma gr_after_inv_push_next_push: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (gr_after_inv_push_next … Hg … H1 H2) -g1 -g2 -#x #Hf #Hx destruct elim (eq_inv_gr_next_push … Hx) -qed-. - -(*** after_inv_nxn *) -lemma gr_after_inv_next_sn_next: - ∀g1,f2,g. g1 ⊚ f2 ≘ g → - ∀f1,f. ↑f1 = g1 → ↑f = g → f1 ⊚ f2 ≘ f. -#g1 #f2 #g #Hg #f1 #f #H1 #H elim (gr_after_inv_next_sn … Hg … H1) -g1 -#x #Hf #Hx destruct <(eq_inv_gr_next_bi … Hx) -f // -qed-. - -(*** after_inv_nxp *) -lemma gr_after_inv_next_sn_push: - ∀g1,f2,g. g1 ⊚ f2 ≘ g → - ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥. -#g1 #f2 #g #Hg #f1 #f #H1 #H elim (gr_after_inv_next_sn … Hg … H1) -g1 -#x #Hf #Hx destruct elim (eq_inv_gr_next_push … Hx) -qed-. - -(*** after_inv_pxp *) -lemma gr_after_inv_push_sn_push: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → - ∀f1,f. ⫯f1 = g1 → ⫯f = g → - ∃∃f2. f1 ⊚ f2 ≘ f & ⫯f2 = g2. -#g1 #g2 elim (gr_map_split_tl g2) -#Hg2 #g #Hg #f1 #f #H1 #H -[ lapply (gr_after_inv_push_bi_push … Hg … H1 … H) -g1 -g - /2 width=3 by ex2_intro/ -| elim (gr_after_inv_push_next_push … Hg … H1 … H) -g1 -g -f1 -f // -] -qed-. - -(*** after_inv_pxn *) -lemma gr_after_inv_push_sn_next: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → - ∀f1,f. ⫯f1 = g1 → ↑f = g → - ∃∃f2. f1 ⊚ f2 ≘ f & ↑f2 = g2. -#g1 #g2 elim (gr_map_split_tl g2) -#Hg2 #g #Hg #f1 #f #H1 #H -[ elim (gr_after_inv_push_bi_next … Hg … H1 … H) -g1 -g -f1 -f // -| lapply (gr_after_inv_push_next_next … Hg … H1 … H) -g1 -g - /2 width=3 by ex2_intro/ -] -qed-. - -(*** after_inv_xxp *) -lemma gr_after_inv_push: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ⫯f = g → - ∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2. -#g1 elim (gr_map_split_tl g1) -#Hg1 #g2 #g #Hg #f #H -[ elim (gr_after_inv_push_sn_push … Hg … H) -g /2 width=5 by ex3_2_intro/ -| elim (gr_after_inv_next_sn_push … Hg … H) -g2 -g -f // -] -qed-. - -(*** after_inv_xxn *) -lemma gr_after_inv_next: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ↑f = g → - ∨∨ ∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2 - | ∃∃f1. f1 ⊚ g2 ≘ f & ↑f1 = g1. -#g1 elim (gr_map_split_tl g1) -#Hg1 #g2 #g #Hg #f #H -[ elim (gr_after_inv_push_sn_next … Hg … H) -g - /3 width=5 by or_introl, ex3_2_intro/ -| /4 width=5 by gr_after_inv_next_sn_next, or_intror, ex2_intro/ -] -qed-. - -(*** after_inv_pxx *) -lemma gr_after_inv_push_sn: - ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 → - ∨∨ ∃∃f2,f. f1 ⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g - | ∃∃f2,f. f1 ⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g. -#g1 #g2 elim (gr_map_split_tl g2) -#Hg2 #g #Hg #f1 #H -[ elim (gr_after_inv_push_bi … Hg … H) -g1 - /3 width=5 by or_introl, ex3_2_intro/ -| elim (gr_after_inv_push_next … Hg … H) -g1 - /3 width=5 by or_intror, ex3_2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_after.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_after.ma deleted file mode 100644 index ad71eeac2..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_after.ma +++ /dev/null @@ -1,90 +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/relocation/gr_after_eq.ma". - -(* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************) - -(* Main constructions *******************************************************) - -(*** after_trans1 *) -corec theorem gr_after_trans_sn: - ∀f0,f3,f4. f0 ⊚ f3 ≘ f4 → - ∀f1,f2. f1 ⊚ f2 ≘ f0 → - ∀f. f2 ⊚ f3 ≘ f → f1 ⊚ f ≘ f4. -#f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4 -[ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg - cases (gr_after_inv_push … Hg0 … H0) -g0 - #f1 #f2 #Hf0 #H1 #H2 - cases (gr_after_inv_push_bi … Hg … H2 H3) -g2 -g3 - #f #Hf #H /3 width=7 by gr_after_refl/ -| #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg - cases (gr_after_inv_push … Hg0 … H0) -g0 - #f1 #f2 #Hf0 #H1 #H2 - cases (gr_after_inv_push_next … Hg … H2 H3) -g2 -g3 - #f #Hf #H /3 width=7 by gr_after_push/ -| #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg - cases (gr_after_inv_next … Hg0 … H0) -g0 * - [ #f1 #f2 #Hf0 #H1 #H2 - cases (gr_after_inv_next_sn … Hg … H2) -g2 - #f #Hf #H /3 width=7 by gr_after_push/ - | #f1 #Hf0 #H1 /3 width=6 by gr_after_next/ - ] -] -qed-. - -(*** after_trans2 *) -corec theorem gr_after_trans_dx: - ∀f1,f0,f4. f1 ⊚ f0 ≘ f4 → - ∀f2, f3. f2 ⊚ f3 ≘ f0 → - ∀f. f1 ⊚ f2 ≘ f → f ⊚ f3 ≘ f4. -#f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4 -[ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg - cases (gr_after_inv_push … Hg0 … H0) -g0 - #f2 #f3 #Hf0 #H2 #H3 - cases (gr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 - #f #Hf #H /3 width=7 by gr_after_refl/ -| #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg - cases (gr_after_inv_next … Hg0 … H0) -g0 * - [ #f2 #f3 #Hf0 #H2 #H3 - cases (gr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 - #f #Hf #H /3 width=7 by gr_after_push/ - | #f2 #Hf0 #H2 - cases (gr_after_inv_push_next … Hg … H1 H2) -g1 -g2 - #f #Hf #H /3 width=6 by gr_after_next/ - ] -| #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg - cases (gr_after_inv_next_sn … Hg … H1) -g1 - #f #Hg #H /3 width=6 by gr_after_next/ -] -qed-. - -(* Main inversions **********************************************************) - -(*** after_mono *) -corec theorem gr_after_mono: - ∀f1,f2,x,y. f1 ⊚ f2 ≘ x → f1 ⊚ f2 ≘ y → x ≡ y. -#f1 #f2 #x #y * -f1 -f2 -x -#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy -[ cases (gr_after_inv_push_bi … Hy … H1 H2) -g1 -g2 /3 width=8 by gr_eq_push/ -| cases (gr_after_inv_push_next … Hy … H1 H2) -g1 -g2 /3 width=8 by gr_eq_next/ -| cases (gr_after_inv_next_sn … Hy … H1) -g1 /3 width=8 by gr_eq_next/ -] -qed-. - -(*** after_mono_eq *) -lemma gr_after_mono_eq: - ∀f1,f2,f. f1 ⊚ f2 ≘ f → ∀g1,g2,g. g1 ⊚ g2 ≘ g → - f1 ≡ g1 → f2 ≡ g2 → f ≡ g. -/4 width=4 by gr_after_mono, gr_after_eq_repl_back_dx, gr_after_eq_repl_back_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_after_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_after_ist.ma deleted file mode 100644 index ecca35eb7..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_after_ist.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 "ground/arith/nat_pred_succ.ma". -include "ground/relocation/gr_pat_tls.ma". -include "ground/relocation/gr_ist_tls.ma". -include "ground/relocation/gr_after_pat_tls.ma". - -(* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************) - -(*** H_after_inj *) -definition H_gr_after_inj: predicate gr_map ≝ - λf1. 𝐓❪f1❫ → - ∀f,f21,f22. f1 ⊚ f21 ≘ f → f1 ⊚ f22 ≘ f → f21 ≡ f22. - -(* Main destructions with gr_ist ********************************************) - -(*** after_inj_O_aux *) -corec fact gr_after_inj_unit_aux: - ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_after_inj f1. -#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f -cases (gr_pat_inv_unit_bi … H1f1) -H1f1 [|*: // ] #g1 #H1 -lapply (gr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1 -cases (H2g1 (𝟏)) #p #Hp -cases (gr_after_inv_push_sn … H1f … H1) -H1f * #g21 #g #H1g #H21 #H -[ cases (gr_after_inv_push_sn_push … H2f … H1 H) -f1 -f #g22 #H2g #H22 - @(gr_eq_push … H21 H22) -f21 -f22 -| cases (gr_after_inv_push_sn_next … H2f … H1 H) -f1 -f #g22 #H2g #H22 - @(gr_eq_next … H21 H22) -f21 -f22 -] -@(gr_after_inj_unit_aux (⫰*[↓p]g1) … (⫰*[↓p]g)) -gr_after_inj_unit_aux -/2 width=1 by gr_after_tls_sn_tls, gr_ist_tls, gr_pat_unit_succ_tls/ -qed-. - -(*** after_inj_aux *) -fact gr_after_inj_aux: - (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_after_inj f1) → - ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_gr_after_inj f1. -#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 -#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f -elim (gr_pat_inv_unit_succ … H1f1) -H1f1 [|*: // ] #g1 #H1g1 #H1 -elim (gr_after_inv_next_sn … H1f … H1) -H1f #g #H1g #H -lapply (gr_after_inv_next_sn_next … H2f … H1 H) -f #H2g -/3 width=6 by gr_ist_inv_next/ -qed-. - -(*** after_inj *) -theorem gr_after_inj: - ∀f1. H_gr_after_inj f1. -#f1 #H cases (H (𝟏)) -/3 width=7 by gr_after_inj_aux, gr_after_inj_unit_aux/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_basic.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_basic.ma deleted file mode 100644 index 00c0672c8..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_after_basic.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 "ground/arith/nat_le_pred.ma". -include "ground/relocation/gr_basic.ma". -include "ground/relocation/gr_after_uni.ma". - -(* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************) - -(* Constructions with gr_basic **********************************************) - -(*** after_basic_rc *) -lemma after_basic_rc (d2) (d1): - d1 ≤ d2 → ∀h2,h1.d2 ≤ h1+d1 → 𝐛❨d2,h2❩ ⊚ 𝐛❨d1,h1❩ ≘ 𝐛❨d1,h1+h2❩. -#d2 #d1 @(nat_ind_2_succ … d2 d1) -d2 -d1 -[ #d1 #H #h2 #h1 #_ - <(nle_inv_zero_dx … H) -d1 // -| #d2 #IH #_ #h2 #h1 Hh1 -Hh1 nsucc_inj - elim (gr_pat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ] - [ #g2 #j1 #Hg2 #H1 #H2 destruct >nsucc_inj in Hf; #Hf - elim (gr_after_inv_push_next … Hf) -Hf [ |*: // ] #g #Hg #H destruct - nsucc_inj #Hf - elim (gr_after_inv_next_sn … Hf) -Hf [2,3: // ] #g #Hg #H destruct - elim (gr_pat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ] - [ #g2 #j1 #Hg2 #H1 #H2 destruct gr_pushs_succ // -qed. - -(*** at_basic_zero_succ *) -lemma gr_basic_zero_succ (h): ↑𝐛❨𝟎,h❩ = 𝐛❨𝟎,↑h❩. -#h >gr_nexts_succ // -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter.ma deleted file mode 100644 index 2ec6991cf..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter.ma +++ /dev/null @@ -1,238 +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/notation/relations/rcoafter_3.ma". -include "ground/xoa/ex_3_2.ma". -include "ground/relocation/gr_tl.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(*** coafter *) -coinductive gr_coafter: relation3 gr_map gr_map gr_map ≝ -(*** coafter_refl *) -| gr_coafter_refl (f1) (f2) (f) (g1) (g2) (g): - gr_coafter f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → gr_coafter g1 g2 g -(*** coafter_push *) -| gr_coafter_push (f1) (f2) (f) (g1) (g2) (g): - gr_coafter f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → gr_coafter g1 g2 g -(*** coafter_next *) -| gr_coafter_next (f1) (f2) (f) (g1) (g): - gr_coafter f1 f2 f → ↑f1 = g1 → ⫯f = g → gr_coafter g1 f2 g -. - -interpretation - "relational co-composition (generic relocation maps)" - 'RCoAfter f1 f2 f = (gr_coafter f1 f2 f). - -(* Basic inversions *********************************************************) - -(*** coafter_inv_ppx *) -lemma gr_coafter_inv_push_bi: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → - ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g. -#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 -[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct - >(eq_inv_gr_push_bi … Hx1) >(eq_inv_gr_push_bi … Hx2) -x2 -x1 - /2 width=3 by ex2_intro/ -| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct - elim (eq_inv_gr_push_next … Hx2) -| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct - elim (eq_inv_gr_push_next … Hx1) -] -qed-. - -(*** coafter_inv_pnx *) -lemma gr_coafter_inv_push_next: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → - ∃∃f. f1 ~⊚ f2 ≘ f & ↑f = g. -#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 -[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct - elim (eq_inv_gr_next_push … Hx2) -| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct - >(eq_inv_gr_push_bi … Hx1) >(eq_inv_gr_next_bi … Hx2) -x2 -x1 - /2 width=3 by ex2_intro/ -| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct - elim (eq_inv_gr_push_next … Hx1) -] -qed-. - -(*** coafter_inv_nxx *) -lemma gr_coafter_inv_next_sn: - ∀g1,f2,g. g1 ~⊚ f2 ≘ g → ∀f1. ↑f1 = g1 → - ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g. -#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1 -[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct - elim (eq_inv_gr_next_push … Hx1) -| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct - elim (eq_inv_gr_next_push … Hx1) -| #g #Hf #H1 #H #x1 #Hx1 destruct - >(eq_inv_gr_next_bi … Hx1) -x1 - /2 width=3 by ex2_intro/ -] -qed-. - -(* Advanced inversions ******************************************************) - -(*** coafter_inv_ppp *) -lemma gr_coafter_inv_push_bi_push: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ~⊚ f2 ≘ f. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H -elim (gr_coafter_inv_push_bi … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct -<(eq_inv_gr_push_bi … Hx) -f // -qed-. - -(*** coafter_inv_ppn *) -lemma gr_coafter_inv_push_bi_next: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H -elim (gr_coafter_inv_push_bi … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct -elim (eq_inv_gr_push_next … Hx) -qed-. - -(*** coafter_inv_pnn *) -lemma gr_coafter_inv_push_next_next: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ~⊚ f2 ≘ f. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H -elim (gr_coafter_inv_push_next … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct -<(eq_inv_gr_next_bi … Hx) -f // -qed-. - -(*** coafter_inv_pnp *) -lemma gr_coafter_inv_push_next_push: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥. -#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H -elim (gr_coafter_inv_push_next … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct -elim (eq_inv_gr_next_push … Hx) -qed-. - -(*** coafter_inv_nxp *) -lemma gr_coafter_inv_next_sn_push: - ∀g1,f2,g. g1 ~⊚ f2 ≘ g → - ∀f1,f. ↑f1 = g1 → ⫯f = g → f1 ~⊚ f2 ≘ f. -#g1 #f2 #g #Hg #f1 #f #H1 #H -elim (gr_coafter_inv_next_sn … Hg … H1) -g1 #x #Hf #Hx destruct -<(eq_inv_gr_push_bi … Hx) -f // -qed-. - -(*** coafter_inv_nxn *) -lemma gr_coafter_inv_next_sn_next: - ∀g1,f2,g. g1 ~⊚ f2 ≘ g → - ∀f1,f. ↑f1 = g1 → ↑f = g → ⊥. -#g1 #f2 #g #Hg #f1 #f #H1 #H -elim (gr_coafter_inv_next_sn … Hg … H1) -g1 #x #Hf #Hx destruct -elim (eq_inv_gr_push_next … Hx) -qed-. - -(*** coafter_inv_pxp *) -lemma gr_coafter_inv_push_sn_push: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f1,f. ⫯f1 = g1 → ⫯f = g → - ∃∃f2. f1 ~⊚ f2 ≘ f & ⫯f2 = g2. -#g1 #g2 #g #Hg #f1 #f #H1 #H -elim (gr_map_split_tl g2) #H2 -[ lapply (gr_coafter_inv_push_bi_push … Hg … H1 H2 H) -g1 -g - /2 width=3 by ex2_intro/ -| elim (gr_coafter_inv_push_next_push … Hg … H1 H2 H) -] -qed-. - -(*** coafter_inv_pxn *) -lemma gr_coafter_inv_push_sn_next: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f1,f. ⫯f1 = g1 → ↑f = g → - ∃∃f2. f1 ~⊚ f2 ≘ f & ↑f2 = g2. -#g1 #g2 #g #Hg #f1 #f #H1 #H -elim (gr_map_split_tl g2) #H2 -[ elim (gr_coafter_inv_push_bi_next … Hg … H1 H2 H) -| lapply (gr_coafter_inv_push_next_next … Hg … H1 … H) -g1 -g - /2 width=3 by ex2_intro/ -] -qed-. - -(*** coafter_inv_xxn *) -lemma gr_coafter_inv_next: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ↑f = g → - ∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2. -#g1 #g2 #g #Hg #f #H -elim (gr_map_split_tl g1) #H1 -[ elim (gr_coafter_inv_push_sn_next … Hg … H1 H) -g - /2 width=5 by ex3_2_intro/ -| elim (gr_coafter_inv_next_sn_next … Hg … H1 H) -] -qed-. - -(*** coafter_inv_xnn *) -lemma gr_coafter_inv_next_dx_next: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - ∀f2,f. ↑f2 = g2 → ↑f = g → - ∃∃f1. f1 ~⊚ f2 ≘ f & ⫯f1 = g1. -#g1 #g2 #g #Hg #f2 #f #H2 destruct #H -elim (gr_coafter_inv_next … Hg … H) -g #z1 #z2 #Hf #H1 #H2 destruct -/2 width=3 by ex2_intro/ -qed-. - -(*** coafter_inv_xxp *) -lemma gr_coafter_inv_push: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ⫯f = g → - ∨∨ ∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2 - | ∃∃f1. f1 ~⊚ g2 ≘ f & ↑f1 = g1. -#g1 #g2 #g #Hg #f #H -elim (gr_map_split_tl g1) #H1 -[ elim (gr_coafter_inv_push_sn_push … Hg … H1 H) -g - /3 width=5 by or_introl, ex3_2_intro/ -| /4 width=5 by gr_coafter_inv_next_sn_push, or_intror, ex2_intro/ -] -qed-. - -(*** coafter_inv_pxx *) -lemma gr_coafter_inv_push_sn: - ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 → - ∨∨ ∃∃f2,f. f1 ~⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g - | ∃∃f2,f. f1 ~⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g. -#g1 #g2 #g #Hg #f1 #H1 -elim (gr_map_split_tl g2) #H2 -[ elim (gr_coafter_inv_push_bi … Hg … H1 H2) -g1 - /3 width=5 by or_introl, ex3_2_intro/ -| elim (gr_coafter_inv_push_next … Hg … H1 H2) -g1 - /3 width=5 by or_intror, ex3_2_intro/ -] -qed-. - -(* Inversions with gr_tl ****************************************************) - -(*** coafter_inv_tl1 *) -lemma gr_coafter_inv_tl_dx: - ∀g2,g1,g. g2 ~⊚ ⫰g1 ≘ g → - ∃∃f. ⫯g2 ~⊚ g1 ≘ f & ⫰f = g. -#g2 #g1 #g -elim (gr_map_split_tl g1) #H1 #H2 -[ /3 width=7 by gr_coafter_refl, ex2_intro/ -| @(ex2_intro … (↑g)) /2 width=7 by gr_coafter_push/ (* * full auto fails *) -] -qed-. - -(*** coafter_inv_tl0 *) -lemma gr_coafter_inv_tl: - ∀g2,g1,g. g2 ~⊚ g1 ≘ ⫰g → - ∃∃f1. ⫯g2 ~⊚ f1 ≘ g & ⫰f1 = g1. -#g2 #g1 #g -elim (gr_map_split_tl g) #H1 #H2 -[ /3 width=7 by gr_coafter_refl, ex2_intro/ -| @(ex2_intro … (↑g1)) /2 width=7 by gr_coafter_push/ (* * full auto fails *) -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_coafter.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_coafter.ma deleted file mode 100644 index 6fd545fc5..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_coafter.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 "ground/relocation/gr_coafter_eq.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Main inversions **********************************************************) - -(*** coafter_mono *) -corec theorem gr_coafter_mono: - ∀f1,f2,x,y. f1 ~⊚ f2 ≘ x → f1 ~⊚ f2 ≘ y → x ≡ y. -#f1 #f2 #x #y * -f1 -f2 -x -#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy -[ cases (gr_coafter_inv_push_bi … Hy … H1 H2) -g1 -g2 /3 width=8 by gr_eq_push/ -| cases (gr_coafter_inv_push_next … Hy … H1 H2) -g1 -g2 /3 width=8 by gr_eq_next/ -| cases (gr_coafter_inv_next_sn … Hy … H1) -g1 /3 width=8 by gr_eq_push/ -] -qed-. - -(*** coafter_mono_eq *) -lemma gr_coafter_mono_eq: - ∀f1,f2,f. f1 ~⊚ f2 ≘ f → ∀g1,g2,g. g1 ~⊚ g2 ≘ g → - f1 ≡ g1 → f2 ≡ g2 → f ≡ g. -/4 width=4 by gr_coafter_mono, gr_coafter_eq_repl_back_dx, gr_coafter_eq_repl_back_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_coafter_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_coafter_ist.ma deleted file mode 100644 index 9d79801dc..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_coafter_ist.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 "ground/relocation/gr_pat_tls.ma". -include "ground/relocation/gr_ist_tls.ma". -include "ground/relocation/gr_coafter_nat_tls.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(*** H_coafter_inj *) -definition H_gr_coafter_inj: predicate gr_map ≝ - λf1. 𝐓❪f1❫ → - ∀f,f21,f22. f1 ~⊚ f21 ≘ f → f1 ~⊚ f22 ≘ f → f21 ≡ f22. - -(* Main destructions with gr_ist ********************************************) - -(*** coafter_inj_O_aux *) -corec fact gr_coafter_inj_unit_aux: - ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_inj f1. -#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f -cases (gr_pat_inv_unit_bi … H1f1) -H1f1 [ |*: // ] #g1 #H1 -lapply (gr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1 -cases (H2g1 (𝟏)) #n #Hn -cases (gr_coafter_inv_push_sn … H1f … H1) -H1f * #g21 #g #H1g #H21 #H -[ cases (gr_coafter_inv_push_sn_push … H2f … H1 H) -f1 -f #g22 #H2g #H22 - @(gr_eq_push … H21 H22) -f21 -f22 -| cases (gr_coafter_inv_push_sn_next … H2f … H1 H) -f1 -f #g22 #H2g #H22 - @(gr_eq_next … H21 H22) -f21 -f22 -] -@(gr_coafter_inj_unit_aux (⫰*[↓n]g1) … (⫰*[↓n]g)) -gr_coafter_inj_unit_aux -/2 width=1 by gr_coafter_tls_bi_tls, gr_ist_tls, gr_pat_unit_succ_tls/ -qed-. - -(*** coafter_inj_aux *) -fact gr_coafter_inj_aux: - (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_inj f1) → - ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_gr_coafter_inj f1. -#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 -#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f -elim (gr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1 -elim (gr_coafter_inv_next_sn … H1f … H1) -H1f #g #H1g #H -lapply (gr_coafter_inv_next_sn_push … H2f … H1 H) -f #H2g -/3 width=6 by gr_ist_inv_next/ -qed-. - -(*** coafter_inj *) -theorem gr_coafter_inj: - ∀f1. H_gr_coafter_inj f1. -#f1 #H cases (H (𝟏)) /3 width=7 by gr_coafter_inj_aux, gr_coafter_inj_unit_aux/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_eq.ma deleted file mode 100644 index 3d0b3c440..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_eq.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 "ground/relocation/gr_tl_eq.ma". -include "ground/relocation/gr_coafter.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_eq *************************************************) - -(*** coafter_eq_repl_back2 *) -corec lemma gr_coafter_eq_repl_back_sn: - ∀f1,f. gr_eq_repl_back (λf2. f2 ~⊚ f1 ≘ f). -#f1 #f #f2 * -f2 -f1 -f -#f21 #f1 #f #g21 [1,2: #g1 ] #g #Hf #H21 [1,2: #H1 ] #H #g22 #H0 -[ cases (gr_eq_inv_push_sn … H0 … H21) -g21 /3 width=7 by gr_coafter_refl/ -| cases (gr_eq_inv_push_sn … H0 … H21) -g21 /3 width=7 by gr_coafter_push/ -| cases (gr_eq_inv_next_sn … H0 … H21) -g21 /3 width=5 by gr_coafter_next/ -] -qed-. - -(*** coafter_eq_repl_fwd2 *) -lemma gr_coafter_eq_repl_fwd_sn: - ∀f1,f. gr_eq_repl_fwd (λf2. f2 ~⊚ f1 ≘ f). -#f1 #f @gr_eq_repl_sym /2 width=3 by gr_coafter_eq_repl_back_sn/ -qed-. - -(*** coafter_eq_repl_back1 *) -corec lemma gr_coafter_eq_repl_back_dx: - ∀f2,f. gr_eq_repl_back (λf1. f2 ~⊚ f1 ≘ f). -#f2 #f #f1 * -f2 -f1 -f -#f2 #f11 #f #g2 [1,2: #g11 ] #g #Hf #H2 [1,2: #H11 ] #H #g2 #H0 -[ cases (gr_eq_inv_push_sn … H0 … H11) -g11 /3 width=7 by gr_coafter_refl/ -| cases (gr_eq_inv_next_sn … H0 … H11) -g11 /3 width=7 by gr_coafter_push/ -| @(gr_coafter_next … H2 H) /2 width=5 by/ -] -qed-. - -(*** coafter_eq_repl_fwd1 *) -lemma gr_coafter_eq_repl_fwd_dx: - ∀f2,f. gr_eq_repl_fwd (λf1. f2 ~⊚ f1 ≘ f). -#f2 #f @gr_eq_repl_sym /2 width=3 by gr_coafter_eq_repl_back_dx/ -qed-. - -(*** coafter_eq_repl_back0 *) -corec lemma gr_coafter_eq_repl_back: - ∀f1,f2. gr_eq_repl_back (λf. f2 ~⊚ f1 ≘ f). -#f2 #f1 #f * -f2 -f1 -f -#f2 #f1 #f01 #g2 [1,2: #g1 ] #g01 #Hf01 #H2 [1,2: #H1 ] #H01 #g02 #H0 -[ cases (gr_eq_inv_push_sn … H0 … H01) -g01 /3 width=7 by gr_coafter_refl/ -| cases (gr_eq_inv_next_sn … H0 … H01) -g01 /3 width=7 by gr_coafter_push/ -| cases (gr_eq_inv_push_sn … H0 … H01) -g01 /3 width=5 by gr_coafter_next/ -] -qed-. - -(*** coafter_eq_repl_fwd0 *) -lemma gr_coafter_eq_repl_fwd: - ∀f2,f1. gr_eq_repl_fwd (λf. f2 ~⊚ f1 ≘ f). -#f2 #f1 @gr_eq_repl_sym /2 width=3 by gr_coafter_eq_repl_back/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_isi.ma deleted file mode 100644 index 0464b905c..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_isi.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 "ground/relocation/gr_isi_id.ma". -include "ground/relocation/gr_coafter_coafter.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_isi ************************************************) - -(*** coafter_isid_sn *) -corec lemma gr_coafter_isi_sn: - ∀f1. 𝐈❪f1❫ → ∀f2. f1 ~⊚ f2 ≘ f2. -#f1 * -f1 #f1 #g1 #Hf1 #H1 #f2 -cases (gr_map_split_tl f2) #H2 -/3 width=7 by gr_coafter_push, gr_coafter_refl/ -qed. - -(*** coafter_isid_dx *) -corec lemma gr_coafter_isi_dx: - ∀f2,f. 𝐈❪f2❫ → 𝐈❪f❫ → ∀f1. f1 ~⊚ f2 ≘ f. -#f2 #f * -f2 #f2 #g2 #Hf2 #H2 * -f #f #g #Hf #H #f1 -cases (gr_map_split_tl f1) #H1 -[ /3 width=7 by gr_coafter_refl/ -| @(gr_coafter_next … H1 … H) /3 width=3 by gr_isi_push/ -] -qed. - -(* Inversions with gr_isi ***************************************************) - -(*** coafter_isid_inv_sn *) -lemma gr_coafter_isi_inv_sn: - ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f. -/3 width=6 by gr_coafter_isi_sn, gr_coafter_mono/ qed-. - -(*** coafter_isid_inv_dx *) -lemma gr_coafter_isi_inv_dx: - ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f2❫ → 𝐈❪f❫. -/4 width=4 by gr_eq_id_isi, gr_coafter_isi_dx, gr_coafter_mono/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_ist_isf.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_ist_isf.ma deleted file mode 100644 index 20d861a48..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_ist_isf.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 "ground/relocation/gr_pat_tls.ma". -include "ground/relocation/gr_isf_tls.ma". -include "ground/relocation/gr_ist_tls.ma". -include "ground/relocation/gr_coafter_nat_tls.ma". -include "ground/relocation/gr_coafter_isi.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(*** H_coafter_isfin2_fwd *) -definition H_gr_coafter_des_ist_isf: predicate gr_map ≝ - λf1. ∀f2. 𝐅❪f2❫ → 𝐓❪f1❫ → ∀f. f1 ~⊚ f2 ≘ f → 𝐅❪f❫. - -(* Destructions with gr_ist and gr_isf **************************************) - -(*** coafter_isfin2_fwd_O_aux *) -fact gr_coafter_des_ist_isf_unit_aux: - ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_des_ist_isf f1. -#f1 #Hf1 #f2 #H -generalize in match Hf1; generalize in match f1; -f1 -@(gr_isf_ind … H) -f2 -[ /3 width=4 by gr_coafter_isi_inv_dx, gr_isf_isi/ ] -#f2 #_ #IH #f1 #H #Hf1 #f #Hf -elim (gr_pat_inv_unit_bi … H) -H [ |*: // ] #g1 #H1 -lapply (gr_ist_inv_push … Hf1 … H1) -Hf1 #Hg1 -elim (Hg1 (𝟏)) #n #Hn -[ elim (gr_coafter_inv_push_bi … Hf) | elim (gr_coafter_inv_push_next … Hf) -] -Hf [1,6: |*: // ] #g #Hg #H0 destruct -/5 width=6 by gr_isf_next, gr_isf_push, gr_isf_inv_tls, gr_ist_tls, gr_pat_unit_succ_tls, gr_coafter_tls_sn_tls/ -qed-. - -(*** coafter_isfin2_fwd_aux *) -fact gr_coafter_des_ist_isf_aux: - (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_des_ist_isf f1) → - ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_gr_coafter_des_ist_isf f1. -#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 -#i2 #IH #f1 #H1f1 #f2 #Hf2 #H2f1 #f #Hf -elim (gr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1 -elim (gr_coafter_inv_next_sn … Hf … H1) -Hf #g #Hg #H0 -lapply (IH … Hg1 … Hg) -i2 -Hg -/2 width=4 by gr_ist_inv_next, gr_isf_push/ (* * full auto fails *) -qed-. - -(*** coafter_isfin2_fwd *) -lemma gr_coafter_des_ist_isf: ∀f1. H_gr_coafter_des_ist_isf f1. -#f1 #f2 #Hf2 #Hf1 cases (Hf1 (𝟏)) -/3 width=7 by gr_coafter_des_ist_isf_aux, gr_coafter_des_ist_isf_unit_aux/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_ist_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_ist_isi.ma deleted file mode 100644 index a73cfa216..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_ist_isi.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 "ground/relocation/gr_pat_tls.ma". -include "ground/relocation/gr_isi_tls.ma". -include "ground/relocation/gr_ist_tls.ma". -include "ground/relocation/gr_coafter_nat_tls.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(*** H_coafter_fwd_isid2 *) -definition H_gr_coafter_des_ist_sn_isi: predicate gr_map ≝ - λf1. ∀f2,f. f1 ~⊚ f2 ≘ f → 𝐓❪f1❫ → 𝐈❪f❫ → 𝐈❪f2❫. - -(* Destructions with gr_ist and gr_isi **************************************) - -(*** coafter_fwd_isid2_O_aux *) -corec fact gr_coafter_des_ist_sn_isi_unit_aux: - ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_des_ist_sn_isi f1. -#f1 #H1f1 #f2 #f #H #H2f1 #Hf -cases (gr_pat_inv_unit_bi … H1f1) -H1f1 [ |*: // ] #g1 #H1 -lapply (gr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1 -cases (H2g1 (𝟏)) #n #Hn -cases (gr_coafter_inv_push_sn … H … H1) -H * #g2 #g #H #H2 #H0 -[ lapply (gr_isi_inv_push … Hf … H0) -Hf #Hg - @(gr_isi_push … H2) -H2 - /3 width=7 by gr_coafter_tls_sn_tls, gr_pat_unit_succ_tls, gr_ist_tls, gr_isi_tls/ -| cases (gr_isi_inv_next … Hf … H0) -] -qed-. - -(*** coafter_fwd_isid2_aux *) -fact gr_coafter_des_ist_sn_isi_aux: - (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_des_ist_sn_isi f1) → - ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_gr_coafter_des_ist_sn_isi f1. -#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 -#i2 #IH #f1 #H1f1 #f2 #f #H #H2f1 #Hf -elim (gr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1 -elim (gr_coafter_inv_next_sn … H … H1) -H #g #Hg #H0 -@(IH … Hg1 … Hg) /2 width=3 by gr_ist_inv_next, gr_isi_inv_push/ (* * full auto fails *) -qed-. - -(*** coafter_fwd_isid2 *) -lemma gr_coafter_des_ist_sn_isi: - ∀f1. H_gr_coafter_des_ist_sn_isi f1. -#f1 #f2 #f #Hf #H cases (H (𝟏)) -/3 width=7 by gr_coafter_des_ist_sn_isi_aux, gr_coafter_des_ist_sn_isi_unit_aux/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_isu.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_isu.ma deleted file mode 100644 index 8c94f6a70..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_isu.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 "ground/relocation/gr_isi_pushs.ma". -include "ground/relocation/gr_isu_uni.ma". -include "ground/relocation/gr_coafter_uni_pushs.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_isu and gr_isi *************************************) - -(*** coafter_isuni_isid *) -lemma gr_coafter_isu_isi: - ∀f2. 𝐈❪f2❫ → ∀f1. 𝐔❪f1❫ → f1 ~⊚ f2 ≘ f2. -#f #Hf #g #H -elim (gr_isu_inv_uni … H) -H #n #H -/5 width=4 by gr_isi_pushs, gr_isi_inv_eq_repl, gr_coafter_eq_repl_back, gr_coafter_eq_repl_back_sn/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_nat_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_nat_tls.ma deleted file mode 100644 index 0402e2929..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_nat_tls.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 "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_nat.ma". -include "ground/relocation/gr_coafter.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_nat and gr_tls *************************************) - -(*** coafter_tls *) -lemma gr_coafter_tls_bi_tls (n2) (n1): - ∀f1,f2,f. @↑❪n1, f1❫ ≘ n2 → - f1 ~⊚ f2 ≘ f → ⫰*[n2]f1 ~⊚ ⫰*[n1]f2 ≘ ⫰*[n2]f. -#n2 @(nat_ind_succ … n2) -n2 [ #n1 | #n2 #IH * [| #n1 ] ] #f1 #f2 #f #Hf1 #Hf -[ elim (gr_nat_inv_zero_dx … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1 destruct // -| elim (gr_nat_inv_zero_succ … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1 - elim (gr_coafter_inv_next_sn … Hf … H1) -Hf #g #Hg #H0 destruct - lapply (IH … Hg1 Hg) -IH -Hg1 -Hg // -| elim (gr_nat_inv_succ_dx … Hf1) -Hf1 [1,3: * |*: // ] #g1 [ #n1 ] #Hg1 [ #H ] #H1 - [ elim (gr_coafter_inv_push_sn … Hf … H1) -Hf * #g2 #g #Hg #H2 #H0 destruct - lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H // - | elim (gr_coafter_inv_next_sn … Hf … H1) -Hf #g #Hg #H0 destruct - lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H // - ] -] -qed. - -(*** coafter_tls_O *) -lemma gr_coafter_tls_sn_tls: - ∀n,f1,f2,f. @↑❪𝟎, f1❫ ≘ n → - f1 ~⊚ f2 ≘ f → ⫰*[n]f1 ~⊚ f2 ≘ ⫰*[n]f. -/2 width=1 by gr_coafter_tls_bi_tls/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_nat_tls_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_nat_tls_pushs.ma deleted file mode 100644 index d42709290..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_nat_tls_pushs.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/relocation/gr_pushs.ma". -include "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_nat.ma". -include "ground/relocation/gr_coafter.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Destructions with gr_nat and gr_tls and gr_pushs *************************) - -(*** coafter_fwd_pushs *) -lemma gr_coafter_des_pushs_dx (n) (m): - ∀g2,f1,g. g2 ~⊚ ⫯*[m]f1 ≘ g → @↑❪m, g2❫ ≘ n → - ∃∃f. ⫰*[n]g2 ~⊚ f1 ≘ f & ⫯*[n] f = g. -#n @(nat_ind_succ … n) -n -[ #m #g2 #f1 #g #Hg #H - elim (gr_nat_inv_zero_dx … H) -H [|*: // ] #f2 #H1 #H2 destruct - /2 width=3 by ex2_intro/ -| #n #IH * [| #m ] #g2 #f1 #g #Hg #H - [ elim (gr_nat_inv_zero_succ … H) -H [|*: // ] #f2 #Hmn #H destruct - elim (gr_coafter_inv_next_sn … Hg) -Hg [|*: // ] #f #Hf #H destruct - elim (IH … Hf Hmn) -IH -Hf -Hmn /2 width=3 by ex2_intro/ - | elim (gr_nat_inv_succ_bi … H) -H [1,4: * |*: // ] #f2 #Hmn #H destruct - [ elim (gr_coafter_inv_push_bi … Hg) -Hg [|*: // ] #f #Hf #H destruct - elim (IH … Hf Hmn) -IH -Hf -Hmn /2 width=3 by ex2_intro/ - | elim (gr_coafter_inv_next_sn … Hg) -Hg [|*: // ] #f #Hf #H destruct - elim (IH … Hf Hmn) -IH -Hf -Hmn /2 width=3 by ex2_intro/ - ] - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_pat_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_pat_tls.ma deleted file mode 100644 index 529b4caa5..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_coafter_pat_tls.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 "ground/relocation/gr_pat_tls.ma". -include "ground/relocation/gr_coafter_nat_tls.ma". - -(* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_pat and gr_tls *************************************) - -(* Note: this does not require ↑ first and second j *) -(*** coafter_tls_succ *) -lemma gr_coafter_tls_tl_tls: - ∀g2,g1,g. g2 ~⊚ g1 ≘ g → - ∀j. @❪𝟏, g2❫ ≘ j → ⫰*[j]g2 ~⊚ ⫰g1 ≘ ⫰*[j]g. -#g2 #g1 #g #Hg #j #Hg2 -lapply (gr_nat_pred_bi … Hg2) -Hg2 #Hg2 -lapply (gr_coafter_tls_bi_tls … Hg2 … Hg) -Hg #Hg -lapply (gr_pat_unit_succ_tls … Hg2) -Hg2 #H -elim (gr_pat_inv_unit_bi … H) -H [ |*: // ] #f2 #H2 -elim (gr_coafter_inv_push_sn … Hg … H2) -Hg * #f1 #f #Hf #H1 #H0 ->(npsucc_pred j) (eq_inv_gr_push_bi … H) -f // -| #g #m #_ #f #H elim (eq_inv_gr_push_next … H) -] -qed-. - -(*** fcla_inv_nx *) -lemma gr_fcla_inv_next (g) (m): 𝐂❪g❫ ≘ m → ∀f. ↑f = g → ∃∃n. 𝐂❪f❫ ≘ n & ↑n = m. -#g #m * -g -m -[ #g #Hg #f #H destruct - elim (gr_isi_inv_next … Hg) -Hg // -| #g #m #_ #f #H elim (eq_inv_gr_next_push … H) -| #g #m #Hg #f #H >(eq_inv_gr_next_bi … H) -f - /2 width=3 by ex2_intro/ -] -qed-. - -(* Advanced inversions ******************************************************) - -(*** cla_inv_nn *) -lemma gr_cla_inv_next_succ (g) (m): 𝐂❪g❫ ≘ m → ∀f,n. ↑f = g → ↑n = m → 𝐂❪f❫ ≘ n. -#g #m #H #f #n #H1 #H2 elim (gr_fcla_inv_next … H … H1) -g -#x #Hf #H destruct <(eq_inv_nsucc_bi … H) -n // -qed-. - -(*** cla_inv_np *) -lemma gr_cla_inv_next_zero (g) (m): 𝐂❪g❫ ≘ m → ∀f. ↑f = g → 𝟎 = m → ⊥. -#g #m #H #f #H1 elim (gr_fcla_inv_next … H … H1) -g -#x #_ #H1 #H2 destruct /2 width=2 by eq_inv_zero_nsucc/ -qed-. - -(*** fcla_inv_xp *) -lemma gr_fcla_inv_zero (g) (m): 𝐂❪g❫ ≘ m → 𝟎 = m → 𝐈❪g❫. -#g #m #H elim H -g -m /3 width=3 by gr_isi_push/ -#g #m #_ #_ #H destruct elim (eq_inv_zero_nsucc … H) -qed-. - -(*** fcla_inv_isid *) -lemma gr_fcla_inv_isi (g) (m): 𝐂❪g❫ ≘ m → 𝐈❪g❫ → 𝟎 = m. -#f #n #H elim H -f -n /3 width=3 by gr_isi_inv_push/ -#f #n #_ #_ #H elim (gr_isi_inv_next … H) -H // -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_eq.ma deleted file mode 100644 index 3e8a9c9dd..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_eq.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 "ground/relocation/gr_isi_eq.ma". -include "ground/relocation/gr_fcla.ma". - -(* FINITE COLENGTH ASSIGNMENT FOR GENERIC RELOCATION MAPS *******************) - -(* Constructions with gr_eq *************************************************) - -(*** fcla_eq_repl_back *) -lemma gr_fcla_eq_repl_back (n): - gr_eq_repl_back … (λf. 𝐂❪f❫ ≘ n). -#n #f1 #H elim H -f1 -n /3 width=3 by gr_fcla_isi, gr_isi_eq_repl_back/ -#f1 #n #_ #IH #g2 #H [ elim (gr_eq_inv_push_sn … H) | elim (gr_eq_inv_next_sn … H) ] -H -/3 width=3 by gr_fcla_push, gr_fcla_next/ -qed-. - -(*** fcla_eq_repl_fwd *) -lemma fcla_eq_repl_fwd (n): - gr_eq_repl_fwd … (λf. 𝐂❪f❫ ≘ n). -#n @gr_eq_repl_sym /2 width=3 by gr_fcla_eq_repl_back/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_fcla.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_fcla.ma deleted file mode 100644 index 34c640e3e..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_fcla.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 "ground/relocation/gr_fcla.ma". - -(* FINITE COLENGTH ASSIGNMENT FOR GENERIC RELOCATION MAPS *******************) - -(* Main destructions ********************************************************) - -(*** fcla_mono *) -theorem gr_fcla_mono (f): - ∀n1. 𝐂❪f❫ ≘ n1 → ∀n2. 𝐂❪f❫ ≘ n2 → n1 = n2. -#f #n #H elim H -f -n -[ /2 width=3 by gr_fcla_inv_isi/ -| /3 width=3 by gr_fcla_inv_push/ -| #f #n1 #_ #IH #n2 #H elim (gr_fcla_inv_next … H) -H [2,3 : // ] - #g #Hf #H destruct >IH // -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_uni.ma deleted file mode 100644 index 8bd26d8ed..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_fcla_uni.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 "ground/relocation/gr_isi_uni.ma". -include "ground/relocation/gr_fcla.ma". - -(* FINITE COLENGTH ASSIGNMENT FOR GENERIC RELOCATION MAPS *******************) - -(* Constructions with gr_uni ************************************************) - -(*** fcla_uni *) -lemma gr_fcla_uni (n): 𝐂❪𝐮❨n❩❫ ≘ n. -#n @(nat_ind_succ … n) -n -/2 width=1 by gr_fcla_isi, gr_fcla_next/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_id.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_id.ma deleted file mode 100644 index e292db157..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_id.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 "ground/notation/functions/element_i_0.ma". -include "ground/relocation/gr_map.ma". - -(* IDENTITY ELEMENT FOR GENERIC RELOCATION MAPS *****************************) - -(*** id *) -corec definition gr_id: gr_map ≝ ⫯gr_id. - -interpretation - "identity element (generic relocation streams)" - 'ElementI = (gr_id). - -(* Basic constructions (specific) *******************************************) - -(*** id_rew *) -lemma gr_id_unfold: ⫯𝐢 = 𝐢. -<(stream_unfold … (𝐢)) in ⊢ (???%); // -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_id_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_id_eq.ma deleted file mode 100644 index f79aa988c..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_id_eq.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 "ground/relocation/gr_tl_eq.ma". -include "ground/relocation/gr_id.ma". - -(* IDENTITY ELEMENT FOR GENERIC RELOCATION MAPS *****************************) - -(* Constructions with gr_eq *************************************************) - -corec lemma gr_id_eq (f): ⫯f ≡ f → 𝐢 ≡ f. -cases gr_id_unfold #Hf -cases (gr_eq_inv_push_sn … Hf) [|*: // ] #_ #H -cases H in Hf; -H #Hf -@gr_eq_push [3:|*: // ] -/3 width=5 by gr_eq_inv_push_bi/ -qed. - -(* Inversions with gr_eq ****************************************************) - -(* Note: this has the same proof of the previous *) -corec lemma gr_id_inv_eq (f): 𝐢 ≡ f → ⫯f ≡ f. -cases gr_id_unfold #Hf -cases (gr_eq_inv_push_sn … Hf) [|*: // ] #_ #H -cases H in Hf; -H #Hf -@gr_eq_push [3:|*: // ] -/3 width=5 by gr_eq_inv_push_bi/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd.ma deleted file mode 100644 index 7ebdf864a..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd.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 "ground/notation/relations/predicate_omega_1.ma". -include "ground/relocation/gr_map.ma". - -(* DIVERGENCE CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(*** isdiv *) -coinductive gr_isd: predicate gr_map ≝ -(*** isdiv_next *) -| gr_isd_next (f) (g): - gr_isd f → ↑f = g → gr_isd g -. - -interpretation - "divergence condition (generic relocation maps)" - 'PredicateOmega f = (gr_isd f). - -(* Basic inversions *********************************************************) - -(*** isdiv_inv_gen *) -lemma gr_isd_inv_gen (g): 𝛀❪g❫ → ∃∃f. 𝛀❪f❫ & ↑f = g. -#g * -g -#f #g #Hf * /2 width=3 by ex2_intro/ -qed-. - -(* Advanced inversions ******************************************************) - -(*** isdiv_inv_next *) -lemma gr_isd_inv_next (g): 𝛀❪g❫ → ∀f. ↑f = g → 𝛀❪f❫. -#g #H elim (gr_isd_inv_gen … H) -H -#f #Hf * -g #g #H >(eq_inv_gr_next_bi … H) -H // -qed-. - -(*** isdiv_inv_push *) -lemma gr_isd_inv_push (g): 𝛀❪g❫ → ∀f. ⫯f = g → ⊥. -#g #H elim (gr_isd_inv_gen … H) -H -#f #Hf * -g #g #H elim (eq_inv_gr_push_next … H) -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_eq.ma deleted file mode 100644 index 37b1e3542..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_eq.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/relocation/gr_tl_eq_eq.ma". -include "ground/relocation/gr_isd.ma". - -(* DIVERGENCE CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_eq *************************************************) - -(*** isdiv_eq_repl_back *) -corec lemma gr_isd_eq_repl_back: - gr_eq_repl_back … gr_isd. -#f1 #H cases (gr_isd_inv_gen … H) -H -#g1 #Hg1 #H1 #f2 #Hf cases (gr_eq_inv_next_sn … Hf … H1) -f1 -/3 width=3 by gr_isd_next/ -qed-. - -(*** isdiv_eq_repl_fwd *) -lemma gr_isd_eq_repl_fwd: - gr_eq_repl_fwd … gr_isd. -/3 width=3 by gr_isd_eq_repl_back, gr_eq_repl_sym/ qed-. - -(* Main inversions with gr_eq ***********************************************) - -(*** isdiv_inv_eq_repl *) -corec theorem gr_isd_inv_eq_repl (g1) (g2): 𝛀❪g1❫ → 𝛀❪g2❫ → g1 ≡ g2. -#H1 #H2 -cases (gr_isd_inv_gen … H1) -H1 -cases (gr_isd_inv_gen … H2) -H2 -/3 width=5 by gr_eq_next/ -qed-. - -(* Alternative definition with gr_eq ****************************************) - -(*** eq_next_isdiv *) -corec lemma gr_eq_next_isd (f): ↑f ≡ f → 𝛀❪f❫. -#H cases (gr_eq_inv_next_sn … H) -H -/4 width=3 by gr_isd_next, gr_eq_trans/ -qed. - -(*** eq_next_inv_isdiv *) -corec lemma gr_eq_next_inv_isd (g): 𝛀❪g❫ → ↑g ≡ g. -* -g #f #g #Hf * -/3 width=5 by gr_eq_next/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_nexts.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_nexts.ma deleted file mode 100644 index 99a7cf37d..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_nexts.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 "ground/relocation/gr_nexts.ma". -include "ground/relocation/gr_isd.ma". - -(* DIVERGENCE CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_nexts **********************************************) - -(*** isdiv_nexts *) -lemma gr_isd_nexts (n) (f): 𝛀❪f❫ → 𝛀❪↑*[n]f❫. -#n @(nat_ind_succ … n) -n /3 width=3 by gr_isd_next/ -qed. - -(* Inversions with gr_nexts *************************************************) - -(*** isdiv_inv_nexts *) -lemma gr_isd_inv_nexts (n) (g): 𝛀❪↑*[n]g❫ → 𝛀❪g❫. -#n @(nat_ind_succ … n) -n /3 width=3 by gr_isd_inv_next/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_tl.ma deleted file mode 100644 index 43e865131..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_tl.ma +++ /dev/null @@ -1,28 +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/relocation/gr_tl.ma". -include "ground/relocation/gr_isd.ma". - -(* DIVERGENCE CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_tl *************************************************) - -(*** isdiv_tl *) -lemma gr_isd_tl (f): 𝛀❪f❫ → 𝛀❪⫰f❫. -#f cases (gr_map_split_tl f) * #H -[ elim (gr_isd_inv_push … H) -H // -| /2 width=3 by gr_isd_inv_next/ -] -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_tls.ma deleted file mode 100644 index dc5b123cc..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isd_tls.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 "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_isd_tl.ma". - -(* DIVERGENCE CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_tls ************************************************) - -(*** isdiv_tls *) -lemma gr_isd_tls (n) (g): 𝛀❪g❫ → 𝛀❪⫰*[n]g❫. -#n @(nat_ind_succ … n) -n /3 width=1 by gr_isd_tl/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf.ma deleted file mode 100644 index 23292e2f1..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf.ma +++ /dev/null @@ -1,67 +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/notation/relations/predicate_f_1.ma". -include "ground/relocation/gr_fcla.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(*** isfin *) -definition gr_isf: predicate gr_map ≝ - λf. ∃n. 𝐂❪f❫ ≘ n. - -interpretation - "finite colength condition (generic relocation maps)" - 'PredicateF f = (gr_isf f). - -(* Basic eliminations *******************************************************) - -(*** isfin_ind *) -lemma gr_isf_ind (Q:predicate …): - (∀f. 𝐈❪f❫ → Q f) → - (∀f. 𝐅❪f❫ → Q f → Q (⫯f)) → - (∀f. 𝐅❪f❫ → Q f → Q (↑f)) → - ∀f. 𝐅❪f❫ → Q f. -#Q #IH1 #IH2 #IH3 #f #H elim H -H -#n #H elim H -f -n /3 width=2 by ex_intro/ -qed-. - -(* Basic inversions *********************************************************) - -(*** isfin_inv_push *) -lemma gr_isf_inv_push (g): 𝐅❪g❫ → ∀f. ⫯f = g → 𝐅❪f❫. -#g * /3 width=4 by gr_fcla_inv_push, ex_intro/ -qed-. - -(*** isfin_inv_next *) -lemma gr_isf_inv_next (g): 𝐅❪g❫ → ∀f. ↑f = g → 𝐅❪f❫. -#g * #n #H #f #H0 elim (gr_fcla_inv_next … H … H0) -g -/2 width=2 by ex_intro/ -qed-. - -(* Basic constructions ******************************************************) - -(*** isfin_isid *) -lemma gr_isf_isi (f): 𝐈❪f❫ → 𝐅❪f❫. -/3 width=2 by gr_fcla_isi, ex_intro/ qed. - -(*** isfin_push *) -lemma gr_isf_push (f): 𝐅❪f❫ → 𝐅❪⫯f❫. -#f * /3 width=2 by gr_fcla_push, ex_intro/ -qed. - -(*** isfin_next *) -lemma gr_isf_next (f): 𝐅❪f❫ → 𝐅❪↑f❫. -#f * /3 width=2 by gr_fcla_next, ex_intro/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_eq.ma deleted file mode 100644 index 7b70b7828..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_eq.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 "ground/relocation/gr_fcla_eq.ma". -include "ground/relocation/gr_isf.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_eq *************************************************) - -(*** isfin_eq_repl_back *) -lemma gr_isf_eq_repl_back: - gr_eq_repl_back … gr_isf. -#f1 * /3 width=4 by gr_fcla_eq_repl_back, ex_intro/ -qed-. - -(*** isfin_eq_repl_fwd *) -lemma gr_isf_eq_repl_fwd: gr_eq_repl_fwd … gr_isf. -/3 width=3 by gr_isf_eq_repl_back, gr_eq_repl_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_isu.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_isu.ma deleted file mode 100644 index ab1c16f11..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_isu.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 "ground/relocation/gr_isu.ma". -include "ground/relocation/gr_isf.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_isu ************************************************) - -(*** isuni_fwd_isfin *) -lemma gr_isf_isu (f): 𝐔❪f❫ → 𝐅❪f❫. -#f #H elim H -f -/3 width=1 by gr_isf_next, gr_isf_isi/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_pushs.ma deleted file mode 100644 index 4e8e1d2b1..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_pushs.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 "ground/relocation/gr_pushs.ma". -include "ground/relocation/gr_isf.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_pushs **********************************************) - -(*** isfin_pushs *) -lemma gr_isf_pushs (n) (f): 𝐅❪f❫ → 𝐅❪⫯*[n]f❫. -#n @(nat_ind_succ … n) -n /3 width=3 by gr_isf_push/ -qed. - -(* Inversions with gr_pushs *************************************************) - -(*** isfin_inv_pushs *) -lemma gr_isf_inv_pushs (n) (g): 𝐅❪⫯*[n]g❫ → 𝐅❪g❫. -#n @(nat_ind_succ … n) -n /3 width=3 by gr_isf_inv_push/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_tl.ma deleted file mode 100644 index 5268136d7..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_tl.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 "ground/relocation/gr_tl.ma". -include "ground/relocation/gr_isf.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_tl *************************************************) - -(*** isfin_tl *) -lemma gr_isf_tl (f): 𝐅❪f❫ → 𝐅❪⫰f❫. -#f elim (gr_map_split_tl f) * #Hf -/3 width=3 by gr_isf_inv_push, gr_isf_inv_next/ -qed. - -(* Inversions with gr_tl ****************************************************) - -(*** isfin_inv_tl *) -lemma gr_isf_inv_tl (g): 𝐅❪⫰g❫ → 𝐅❪g❫. -#f elim (gr_map_split_tl f) * #Hf -/2 width=1 by gr_isf_next, gr_isf_push/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_tls.ma deleted file mode 100644 index 3815a74a3..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_tls.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 "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_isf_tl.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_tls ************************************************) - -lemma gr_isf_tls (n) (f): 𝐅❪f❫ → 𝐅❪⫰*[n]f❫. -#n @(nat_ind_succ … n) -n /3 width=1 by gr_isf_tl/ -qed. - -(* Inversions with gr_tls ***************************************************) - -(*** isfin_inv_tls *) -lemma gr_isf_inv_tls (n) (g): 𝐅❪⫰*[n]g❫ → 𝐅❪g❫. -#n @(nat_ind_succ … n) -n /3 width=1 by gr_isf_inv_tl/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_uni.ma deleted file mode 100644 index 816500b63..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isf_uni.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 "ground/relocation/gr_fcla_uni.ma". -include "ground/relocation/gr_isf.ma". - -(* FINITE COLENGTH CONDITION FOR GENERIC RELOCATION MAPS ********************) - -(* Constructions with gr_uni ************************************************) - -(*** isfin_uni *) -lemma gr_isf_uni (n): 𝐅❪𝐮❨n❩❫. -/3 width=2 by ex_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi.ma deleted file mode 100644 index e9a41cfab..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi.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 "ground/notation/relations/predicate_i_1.ma". -include "ground/relocation/gr_map.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(*** isid *) -coinductive gr_isi: predicate gr_map ≝ -(*** isid_push *) -| gr_isi_push (f) (g): - gr_isi f → ⫯f = g → gr_isi g -. - -interpretation - "identity condition (generic relocation maps)" - 'PredicateI f = (gr_isi f). - -(* Basic inversions *********************************************************) - -(*** isid_inv_gen *) -lemma gr_isi_inv_gen (g): 𝐈❪g❫ → ∃∃f. 𝐈❪f❫ & ⫯f = g. -#g * -g -#f #g #Hf /2 width=3 by ex2_intro/ -qed-. - -(* Advanced inversions ******************************************************) - -(*** isid_inv_push *) -lemma gr_isi_inv_push (g): 𝐈❪g❫ → ∀f. ⫯f = g → 𝐈❪f❫. -#g #H -elim (gr_isi_inv_gen … H) -H #f #Hf -* -g #g #H ->(eq_inv_gr_push_bi … H) -H // -qed-. - -(*** isid_inv_next *) -lemma gr_isi_inv_next (g): 𝐈❪g❫ → ∀f. ↑f = g → ⊥. -#g #H -elim (gr_isi_inv_gen … H) -H #f #Hf -* -g #g #H elim (eq_inv_gr_next_push … H) -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_eq.ma deleted file mode 100644 index 7a1967d00..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_eq.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 "ground/relocation/gr_tl_eq_eq.ma". -include "ground/relocation/gr_isi.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_eq *************************************************) - -(*** isid_eq_repl_back *) -corec lemma gr_isi_eq_repl_back: - gr_eq_repl_back … gr_isi. -#f1 #H -cases (gr_isi_inv_gen … H) -H #g1 #Hg1 #H1 #f2 #Hf -cases (gr_eq_inv_push_sn … Hf … H1) -f1 -/3 width=3 by gr_isi_push/ -qed-. - -(*** isid_eq_repl_fwd *) -lemma gr_isi_eq_repl_fwd: - gr_eq_repl_fwd … gr_isi. -/3 width=3 by gr_isi_eq_repl_back, gr_eq_repl_sym/ qed-. - -(* Main inversions with gr_eq ***********************************************) - -(*** isid_inv_eq_repl *) -corec theorem gr_isi_inv_eq_repl (g1) (g2): 𝐈❪g1❫ → 𝐈❪g2❫ → g1 ≡ g2. -#H1 #H2 -cases (gr_isi_inv_gen … H1) -H1 -cases (gr_isi_inv_gen … H2) -H2 -/3 width=5 by gr_eq_push/ -qed-. - -(* Alternative definition with gr_eq ****************************************) - -(*** eq_push_isid *) -corec lemma gr_eq_push_isi (f): ⫯f ≡ f → 𝐈❪f❫. -#H cases (gr_eq_inv_push_sn … H) -H -/4 width=3 by gr_isi_push, gr_eq_trans/ -qed. - -(*** eq_push_inv_isid *) -corec lemma gr_isi_inv_eq_push (g): 𝐈❪g❫ → ⫯g ≡ g. -* -g #f #g #Hf * -/3 width=5 by gr_eq_push/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_id.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_id.ma deleted file mode 100644 index c496762e4..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_id.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 "ground/relocation/gr_id.ma". -include "ground/relocation/gr_isi_eq.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_id *************************************************) - -(*** id_isid *) -lemma gr_isi_id: 𝐈❪𝐢❫. -/2 width=1 by gr_eq_push_isi/ qed. - -(* Alternative definition with gr_id and gr_eq ******************************) - -(*** eq_id_isid *) -lemma gr_eq_id_isi (f): 𝐢 ≡ f → 𝐈❪f❫. -/2 width=3 by gr_isi_eq_repl_back/ qed. - -(*** eq_id_inv_isid *) -lemma gr_isi_inv_eq_id (f): 𝐈❪f❫ → 𝐢 ≡ f. -/2 width=1 by gr_isi_inv_eq_repl/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_pat.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_pat.ma deleted file mode 100644 index a8c35fe0a..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_pat.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 "ground/relocation/gr_isi_id.ma". -include "ground/relocation/gr_pat_pat_id.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Advanced constructions with gr_isi ***************************************) - -(*** isid_at *) -lemma gr_isi_pat (f): (∀i. @❪i,f❫ ≘ i) → 𝐈❪f❫. -/3 width=1 by gr_eq_id_isi, gr_pat_inv_id/ -qed. - -(* Inversions with gr_pat ***************************************************) - -(*** isid_inv_at *) -lemma gr_isi_inv_pat (f) (i): 𝐈❪f❫ → @❪i,f❫ ≘ i. -/3 width=3 by gr_isi_inv_eq_id, gr_pat_id, gr_pat_eq_repl_back/ -qed-. - -(* Destructions with gr_pat *************************************************) - -(*** isid_inv_at_mono *) -lemma gr_isi_pat_des (f) (i1) (i2): 𝐈❪f❫ → @❪i1,f❫ ≘ i2 → i1 = i2. -/4 width=3 by gr_isi_inv_eq_id, gr_pat_id_des, gr_pat_eq_repl_fwd/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_pushs.ma deleted file mode 100644 index e9b3cf054..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_pushs.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 "ground/relocation/gr_pushs.ma". -include "ground/relocation/gr_isi.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_pushs **********************************************) - -(*** isid_pushs *) -lemma gr_isi_pushs (n) (f): 𝐈❪f❫ → 𝐈❪⫯*[n]f❫. -#n @(nat_ind_succ … n) -n /3 width=3 by gr_isi_push/ -qed. - -(* Inversions with gr_pushs *************************************************) - -(*** isid_inv_pushs *) -lemma gr_isi_inv_pushs (n) (g): 𝐈❪⫯*[n]g❫ → 𝐈❪g❫. -#n @(nat_ind_succ … n) -n /3 width=3 by gr_isi_inv_push/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_tl.ma deleted file mode 100644 index 0246557f3..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_tl.ma +++ /dev/null @@ -1,28 +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/relocation/gr_tl.ma". -include "ground/relocation/gr_isi.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_tl *************************************************) - -(*** isid_tl *) -lemma gr_isi_tl (f): 𝐈❪f❫ → 𝐈❪⫰f❫. -#f cases (gr_map_split_tl f) * #H -[ /2 width=3 by gr_isi_inv_push/ -| elim (gr_isi_inv_next … H) -H // -] -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_tls.ma deleted file mode 100644 index 05881cbb5..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_tls.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 "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_isi_tl.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_tls ************************************************) - -(*** isid_tls *) -lemma gr_isi_tls (n) (f): 𝐈❪f❫ → 𝐈❪⫰*[n]f❫. -#n @(nat_ind_succ … n) -n /3 width=1 by gr_isi_tl/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_uni.ma deleted file mode 100644 index 2763d9a40..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isi_uni.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 "ground/relocation/gr_uni.ma". -include "ground/relocation/gr_isi_id.ma". - -(* IDENTITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_isi ************************************************) - -(*** uni_inv_isid uni_isi *) -lemma gr_uni_isi (f): 𝐮❨𝟎❩ ≡ f → 𝐈❪f❫. -/2 width=1 by gr_eq_id_isi/ qed. - -(* Inversions with gr_isi ***************************************************) - -(*** uni_isid isi_inv_uni *) -lemma gr_isi_inv_uni (f): 𝐈❪f❫ → 𝐮❨𝟎❩ ≡ f. -/2 width=1 by gr_isi_inv_eq_id/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist.ma deleted file mode 100644 index d7f511a56..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist.ma +++ /dev/null @@ -1,48 +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/notation/relations/predicate_t_1.ma". -include "ground/relocation/gr_pat.ma". - -(* TOTALITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(*** istot *) -definition gr_ist: predicate gr_map ≝ - λf. ∀i. ∃j. @❪i,f❫ ≘ j. - -interpretation - "totality condition (generic relocation maps)" - 'PredicateT f = (gr_ist f). - -(* Basic inversions *********************************************************) - -(*** istot_inv_push *) -lemma gr_ist_inv_push (g): 𝐓❪g❫ → ∀f. ⫯f = g → 𝐓❪f❫. -#g #Hg #f #H #i elim (Hg (↑i)) -Hg -#j #Hg elim (gr_pat_inv_succ_push … Hg … H) -Hg -H /2 width=3 by ex_intro/ -qed-. - -(*** istot_inv_next *) -lemma gr_ist_inv_next (g): 𝐓❪g❫ → ∀f. ↑f = g → 𝐓❪f❫. -#g #Hg #f #H #i elim (Hg i) -Hg -#j #Hg elim (gr_pat_inv_next … Hg … H) -Hg -H /2 width=2 by ex_intro/ -qed-. - -(* Constructions with gr_tl *************************************************) - -(*** istot_tl *) -lemma gr_ist_tl (f): 𝐓❪f❫ → 𝐓❪⫰f❫. -#f cases (gr_map_split_tl f) * -/2 width=3 by gr_ist_inv_next, gr_ist_inv_push/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_isi.ma deleted file mode 100644 index 90e8f4852..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_isi.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 "ground/relocation/gr_isi_pat.ma". -include "ground/relocation/gr_ist.ma". - -(* TOTALITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Advanced constructions with gr_isi ***************************************) - -(*** isid_at_total *) -lemma gr_isi_pat_total: ∀f. 𝐓❪f❫ → (∀i1,i2. @❪i1,f❫ ≘ i2 → i1 = i2) → 𝐈❪f❫. -#f #H1f #H2f @gr_isi_pat -#i lapply (H1f i) -H1f * -#j #Hf >(H2f … Hf) in ⊢ (???%); -H2f // -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_ist.ma deleted file mode 100644 index cfa6aaa91..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_ist.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 "ground/relocation/gr_eq.ma". -include "ground/relocation/gr_pat_lt.ma". -include "ground/relocation/gr_pat_pat.ma". -include "ground/relocation/gr_ist.ma". - -(* TOTALITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Advanced constructions with gr_pat ***************************************) - -(*** at_dec *) -lemma gr_pat_dec (f) (i1) (i2): 𝐓❪f❫ → Decidable (@❪i1,f❫ ≘ i2). -#f #i1 #i2 #Hf lapply (Hf i1) -Hf * -#j2 #Hf elim (eq_pnat_dec i2 j2) -[ #H destruct /2 width=1 by or_introl/ -| /4 width=6 by gr_pat_mono, or_intror/ -] -qed-. - -(*** is_at_dec *) -lemma is_gr_pat_dec (f) (i2): 𝐓❪f❫ → Decidable (∃i1. @❪i1,f❫ ≘ i2). -#f #i2 #Hf -lapply (dec_plt (λi1.@❪i1,f❫ ≘ i2) … (↑i2)) [| * ] -[ /2 width=1 by gr_pat_dec/ -| * /3 width=2 by ex_intro, or_introl/ -| #H @or_intror * #i1 #Hi12 - /5 width=3 by gr_pat_increasing, plt_succ_dx, ex2_intro/ -] -qed-. - -(* Main destructions with gr_pat ********************************************) - -(*** at_ext *) -corec theorem gr_eq_ext_pat (f1) (f2): 𝐓❪f1❫ → 𝐓❪f2❫ → - (∀i,i1,i2. @❪i,f1❫ ≘ i1 → @❪i,f2❫ ≘ i2 → i1 = i2) → - f1 ≡ f2. -cases (gr_map_split_tl f1) #H1 -cases (gr_map_split_tl f2) #H2 -#Hf1 #Hf2 #Hi -[ @(gr_eq_push … H1 H2) @gr_eq_ext_pat -gr_eq_ext_pat - [3:|*: /2 width=3 by gr_ist_inv_push/ ] -Hf1 -Hf2 #i #i1 #i2 #Hg1 #Hg2 - lapply (Hi (↑i) (↑i1) (↑i2) ??) /2 width=7 by gr_pat_push/ -| cases (Hf2 (𝟏)) -Hf1 -Hf2 -gr_eq_ext_pat - #j2 #Hf2 cases (gr_pat_increasing_strict … Hf2 … H2) -H2 - lapply (Hi (𝟏) (𝟏) j2 … Hf2) /2 width=2 by gr_pat_refl/ -Hi -Hf2 -H1 - #H2 #H cases (plt_ge_false … H) -H // -| cases (Hf1 (𝟏)) -Hf1 -Hf2 -gr_eq_ext_pat - #j1 #Hf1 cases (gr_pat_increasing_strict … Hf1 … H1) -H1 - lapply (Hi (𝟏) j1 (𝟏) Hf1 ?) /2 width=2 by gr_pat_refl/ -Hi -Hf1 -H2 - #H1 #H cases (plt_ge_false … H) -H // -| @(gr_eq_next … H1 H2) @gr_eq_ext_pat -gr_eq_ext_pat - [3:|*: /2 width=3 by gr_ist_inv_next/ ] -Hf1 -Hf2 #i #i1 #i2 #Hg1 #Hg2 - lapply (Hi i (↑i1) (↑i2) ??) /2 width=5 by gr_pat_next/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_tls.ma deleted file mode 100644 index e6da8edd3..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_ist_tls.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 "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_ist.ma". - -(* TOTALITY CONDITION FOR GENERIC RELOCATION MAPS ***************************) - -(* Constructions with gr_tls ************************************************) - -(*** istot_tls *) -lemma gr_ist_tls (n) (f): 𝐓❪f❫ → 𝐓❪⫰*[n]f❫. -#n @(nat_ind_succ … n) -n // -#n #IH #f #Hf (eq_inv_gr_next_bi … Hx) -x // -] -qed-. - -(* Basic destructions *******************************************************) - -(*** isuni_fwd_push *) -lemma gr_isu_fwd_push (g): 𝐔❪g❫ → ∀f. ⫯f = g → 𝐔❪f❫. -/3 width=3 by gr_isu_inv_push, gr_isu_isi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isu_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isu_tl.ma deleted file mode 100644 index 8a7b07df1..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isu_tl.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 "ground/relocation/gr_tl.ma". -include "ground/relocation/gr_isu.ma". - -(* UNIFORMITY CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_tl *************************************************) - -lemma gr_isu_tl (f): 𝐔❪f❫ → 𝐔❪⫰f❫. -#f cases (gr_map_split_tl f) * #H -[ /3 width=3 by gr_isu_inv_push, gr_isu_isi/ -| /2 width=3 by gr_isu_inv_next/ -] -qed. - -(* Advanced inversions ******************************************************) - -(*** isuni_split *) -lemma gr_isu_split (g): 𝐔❪g❫ → ∨∨ (∃∃f. 𝐈❪f❫ & ⫯f = g) | (∃∃f.𝐔❪f❫ & ↑f = g). -#g elim (gr_map_split_tl g) * #H -/4 width=3 by gr_isu_inv_next, gr_isu_inv_push, or_introl, or_intror, ex2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isu_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_isu_uni.ma deleted file mode 100644 index e3fc67281..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_isu_uni.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 "ground/relocation/gr_isi_uni.ma". -include "ground/relocation/gr_isu.ma". - -(* UNIFORMITY CONDITION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_uni ************************************************) - -(*** isuni_uni *) -lemma gr_isu_uni (n): 𝐔❪𝐮❨n❩❫. -#n @(nat_ind_succ … n) -n -/3 width=3 by gr_isu_isi, gr_isu_next/ -qed. - -(*** uni_inv_isuni *) -lemma gr_isu_eq_repl_back: - gr_eq_repl_back … gr_isu. -#f1 #H elim H -f1 -[ /3 width=3 by gr_isu_isi, gr_isi_eq_repl_back/ -| #f1 #_ #g1 * #IH #f2 #H -g1 - elim (gr_eq_inv_next_sn … H) -H - /3 width=3 by gr_isu_next/ -] -qed-. - -lemma gr_isu_eq_repl_fwd: - gr_eq_repl_fwd … gr_isu. -/3 width=3 by gr_isu_eq_repl_back, gr_eq_repl_sym/ qed-. - -(* Inversions with gr_uni ***************************************************) - -(*** uni_isuni *) -lemma gr_isu_inv_uni (f): 𝐔❪f❫ → ∃n. 𝐮❨n❩ ≡ f. -#f #H elim H -f -[ /3 width=2 by gr_isi_inv_uni, ex_intro/ -| #f #_ #g #H * /3 width=6 by gr_eq_next, ex_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_map.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_map.ma deleted file mode 100644 index 53d052062..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_map.ma +++ /dev/null @@ -1,69 +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/notation/functions/upspoon_1.ma". -include "ground/notation/functions/uparrow_1.ma". -include "ground/lib/stream.ma". -include "ground/lib/bool.ma". - -(* GENERIC RELOCATION MAPS **************************************************) - -(*** rtmap *) -definition gr_map: Type[0] ≝ stream bool. - -(*** push *) -definition gr_push (f): gr_map ≝ Ⓕ⨮f. - -interpretation - "push (generic relocation maps)" - 'UpSpoon f = (gr_push f). - -(*** next *) -definition gr_next (f): gr_map ≝ Ⓣ⨮f. - -interpretation - "next (generic relocation maps)" - 'UpArrow f = (gr_next f). - -(* Basic constructions (specific) *******************************************) - -(*** push_rew *) -lemma gr_push_unfold (f): Ⓕ⨮f = ⫯f. -// qed. - -(*** next_rew *) -lemma gr_next_unfold (f): Ⓣ⨮f = ↑f. -// qed. - -(* Basic inversions *********************************************************) - -(*** injective_push *) -lemma eq_inv_gr_push_bi: injective ? ? gr_push. -#f1 #f2 (npsucc_pred i1) in ⊢ (%→?); >(npsucc_pred i2) in ⊢ (%→?); -// -qed. - -(* Basic inversions *********************************************************) - -(*** gr_nat_inv_ppx *) -lemma gr_nat_inv_zero_push (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g. 𝟎 = l1 → ⫯g = f → 𝟎 = l2. -#f #l1 #l2 #H #g #H1 #H2 destruct -lapply (gr_pat_inv_unit_push … H ???) -H -/2 width=2 by eq_inv_npsucc_bi/ -qed-. - -(*** gr_nat_inv_npx *) -lemma gr_nat_inv_succ_push (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g,k1. ↑k1 = l1 → ⫯g = f → - ∃∃k2. @↑❪k1,g❫ ≘ k2 & ↑k2 = l2. -#f #l1 #l2 #H #g #k1 #H1 #H2 destruct -elim (gr_pat_inv_succ_push … H) -H [|*: // ] #k2 #Hg ->(npsucc_pred (↑l2)) #H -@(ex2_intro … (↓k2)) // -qed-. - -(*** gr_nat_inv_xnx *) -lemma gr_nat_inv_next (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g. ↑g = f → - ∃∃k2. @↑❪l1,g❫ ≘ k2 & ↑k2 = l2. -#f #l1 #l2 #H #g #H1 destruct -elim (gr_pat_inv_next … H) -H [|*: // ] #k2 ->(npsucc_pred (k2)) in ⊢ (%→?→?); #Hg #H -@(ex2_intro … (↓k2)) // -qed-. - -(* Advanced inversions ******************************************************) - -(*** gr_nat_inv_ppn *) -lemma gr_nat_inv_zero_push_succ (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g,k2. 𝟎 = l1 → ⫯g = f → ↑k2 = l2 → ⊥. -#f #l1 #l2 #Hf #g #k2 #H1 #H <(gr_nat_inv_zero_push … Hf … H1 H) -f -g -l1 -l2 -/2 width=3 by eq_inv_nsucc_zero/ -qed-. - -(*** gr_nat_inv_npp *) -lemma gr_nat_inv_succ_push_zero (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g,k1. ↑k1 = l1 → ⫯g = f → 𝟎 = l2 → ⊥. -#f #l1 #l2 #Hf #g #k1 #H1 #H elim (gr_nat_inv_succ_push … Hf … H1 H) -f -l1 -#x2 #Hg * -l2 /2 width=3 by eq_inv_zero_nsucc/ -qed-. - -(*** gr_nat_inv_npn *) -lemma gr_nat_inv_succ_push_succ (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g,k1,k2. ↑k1 = l1 → ⫯g = f → ↑k2 = l2 → @↑❪k1,g❫ ≘ k2. -#f #l1 #l2 #Hf #g #k1 #k2 #H1 #H elim (gr_nat_inv_succ_push … Hf … H1 H) -f -l1 -#x2 #Hg * -l2 #H >(eq_inv_nsucc_bi … H) -k2 // -qed-. - -(*** gr_nat_inv_xnp *) -lemma gr_nat_inv_next_zero (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g. ↑g = f → 𝟎 = l2 → ⊥. -#f #l1 #l2 #Hf #g #H elim (gr_nat_inv_next … Hf … H) -f -#x2 #Hg * -l2 /2 width=3 by eq_inv_zero_nsucc/ -qed-. - -(*** gr_nat_inv_xnn *) -lemma gr_nat_inv_next_succ (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g,k2. ↑g = f → ↑k2 = l2 → @↑❪l1,g❫ ≘ k2. -#f #l1 #l2 #Hf #g #k2 #H elim (gr_nat_inv_next … Hf … H) -f -#x2 #Hg * -l2 #H >(eq_inv_nsucc_bi … H) -k2 // -qed-. - -(*** gr_nat_inv_pxp *) -lemma gr_nat_inv_zero_bi (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → 𝟎 = l1 → 𝟎 = l2 → ∃g. ⫯g = f. -#f elim (gr_map_split_tl … f) /2 width=2 by ex_intro/ -#H #l1 #l2 #Hf #H1 #H2 cases (gr_nat_inv_next_zero … Hf … H H2) -qed-. - -(*** gr_nat_inv_pxn *) -lemma gr_nat_inv_zero_succ (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀k2. 𝟎 = l1 → ↑k2 = l2 → - ∃∃g. @↑❪l1,g❫ ≘ k2 & ↑g = f. -#f elim (gr_map_split_tl … f) -#H #l1 #l2 #Hf #k2 #H1 #H2 -[ elim (gr_nat_inv_zero_push_succ … Hf … H1 H H2) -| /3 width=5 by gr_nat_inv_next_succ, ex2_intro/ -] -qed-. - -(*** gr_nat_inv_nxp *) -lemma gr_nat_inv_succ_zero (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀k1. ↑k1 = l1 → 𝟎 = l2 → ⊥. -#f elim (gr_map_split_tl f) -#H #l1 #l2 #Hf #k1 #H1 #H2 -[ elim (gr_nat_inv_succ_push_zero … Hf … H1 H H2) -| elim (gr_nat_inv_next_zero … Hf … H H2) -] -qed-. - -(*** gr_nat_inv_nxn *) -lemma gr_nat_inv_succ_bi (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀k1,k2. ↑k1 = l1 → ↑k2 = l2 → - ∨∨ ∃∃g. @↑❪k1,g❫ ≘ k2 & ⫯g = f - | ∃∃g. @↑❪l1,g❫ ≘ k2 & ↑g = f. -#f elim (gr_map_split_tl f) * -/4 width=7 by gr_nat_inv_next_succ, gr_nat_inv_succ_push_succ, ex2_intro, or_intror, or_introl/ -qed-. - -(* Note: the following inversion lemmas must be checked *) -(*** gr_nat_inv_xpx *) -lemma gr_nat_inv_push (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g. ⫯g = f → - ∨∨ ∧∧ 𝟎 = l1 & 𝟎 = l2 - | ∃∃k1,k2. @↑❪k1,g❫ ≘ k2 & ↑k1 = l1 & ↑k2 = l2. -#f * [2: #l1 ] #l2 #Hf #g #H -[ elim (gr_nat_inv_succ_push … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/ -| >(gr_nat_inv_zero_push … Hf … H) -f /3 width=1 by conj, or_introl/ -] -qed-. - -(*** gr_nat_inv_xpp *) -lemma gr_nat_inv_push_zero (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g. ⫯g = f → 𝟎 = l2 → 𝟎 = l1. -#f #l1 #l2 #Hf #g #H elim (gr_nat_inv_push … Hf … H) -f * // -#k1 #k2 #_ #_ * -l2 #H elim (eq_inv_zero_nsucc … H) -qed-. - -(*** gr_nat_inv_xpn *) -lemma gr_nat_inv_push_succ (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → ∀g,k2. ⫯g = f → ↑k2 = l2 → - ∃∃k1. @↑❪k1,g❫ ≘ k2 & ↑k1 = l1. -#f #l1 #l2 #Hf #g #k2 #H elim (gr_nat_inv_push … Hf … H) -f * -[ #_ * -l2 #H elim (eq_inv_nsucc_zero … H) -| #x1 #x2 #Hg #H1 * -l2 #H - lapply (eq_inv_nsucc_bi … H) -H #H destruct - /2 width=3 by ex2_intro/ -] -qed-. - -(*** gr_nat_inv_xxp *) -lemma gr_nat_inv_zero_dx (f) (l1) (l2): - @↑❪l1,f❫ ≘ l2 → 𝟎 = l2 → ∃∃g. 𝟎 = l1 & ⫯g = f. -#f elim (gr_map_split_tl f) -#H #l1 #l2 #Hf #H2 -[ /3 width=6 by gr_nat_inv_push_zero, ex2_intro/ -| elim (gr_nat_inv_next_zero … Hf … H H2) -] -qed-. - -(*** gr_nat_inv_xxn *) -lemma gr_nat_inv_succ_dx (f) (l1) (l2): @↑❪l1,f❫ ≘ l2 → ∀k2. ↑k2 = l2 → - ∨∨ ∃∃g,k1. @↑❪k1,g❫ ≘ k2 & ↑k1 = l1 & ⫯g = f - | ∃∃g. @↑❪l1,g❫ ≘ k2 & ↑g = f. -#f elim (gr_map_split_tl f) -#H #l1 #l2 #Hf #k2 #H2 -[ elim (gr_nat_inv_push_succ … Hf … H H2) -l2 /3 width=5 by or_introl, ex3_2_intro/ -| lapply (gr_nat_inv_next_succ … Hf … H H2) -l2 /3 width=3 by or_intror, ex2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_basic.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_basic.ma deleted file mode 100644 index a9c9cae2a..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_basic.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 "ground/relocation/gr_basic.ma". -include "ground/relocation/gr_nat_uni.ma". - -(* NON-NEGATIVE APPLICATION FOR GENERIC RELOCATION MAPS *********************) - -(* Constructions with gr_basic **********************************************) - -lemma gr_nat_basic_lt (m) (n) (l): - l < m → @↑❪l, 𝐛❨m,n❩❫ ≘ l. -#m @(nat_ind_succ … m) -m -[ #n #i #H elim (nlt_inv_zero_dx … H) -| #m #IH #n #l @(nat_ind_succ … l) -l - [ #_ /2 width=2 by refl, gr_pat_refl/ - | #l #_ #H - lapply (nlt_inv_succ_bi … H) -H #Hlm - /3 width=7 by refl, gr_pat_push/ - ] -] -qed. - -lemma gr_nat_basic_ge (m) (n) (l): - m ≤ l → @↑❪l, 𝐛❨m,n❩❫ ≘ l+n. -#m @(nat_ind_succ … m) -m // -#m #IH #n #l #H -elim (nle_inv_succ_sn … H) -H #Hml #H >H -H -/3 width=7 by gr_nat_push/ -qed. - -(* Inversions with gr_basic *************************************************) - -lemma gr_nat_basic_inv_lt (m) (n) (l) (k): - l < m → @↑❪l, 𝐛❨m,n❩❫ ≘ k → l = k. -/3 width=4 by gr_nat_basic_lt, gr_nat_mono/ qed-. - -lemma gr_nat_basic_inv_ge (m) (n) (l) (k): - m ≤ l → @↑❪l, 𝐛❨m,n❩❫ ≘ k → l+n = k. -/3 width=4 by gr_nat_basic_ge, gr_nat_mono/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_nat.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_nat.ma deleted file mode 100644 index a70e01ce4..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_nat.ma +++ /dev/null @@ -1,73 +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/arith/nat_lt_pred.ma". -include "ground/relocation/gr_nat.ma". - -(* NON-NEGATIVE APPLICATION FOR GENERIC RELOCATION MAPS *****************************) - -(* Main destructions ********************************************************) - -theorem gr_nat_monotonic (k2) (l2) (f): - @↑❪l2,f❫ ≘ k2 → ∀k1,l1. @↑❪l1,f❫ ≘ k1 → l1 < l2 → k1 < k2. -#k2 @(nat_ind_succ … k2) -k2 -[ #l2 #f #H2f elim (gr_nat_inv_zero_dx … H2f) -H2f // - #g #H21 #_ #k1 #l1 #_ #Hi destruct - elim (nlt_inv_zero_dx … Hi) -| #k2 #IH #l2 #f #H2f #k1 @(nat_ind_succ … k1) -k1 // - #k1 #_ #l1 #H1f #Hl elim (nlt_inv_gen … Hl) - #_ #Hl2 elim (gr_nat_inv_succ_bi … H2f (↓l2)) -H2f [1,3: * |*: // ] - #g #H2g #H - [ elim (gr_nat_inv_push_succ … H1f … H) -f - /4 width=8 by nlt_inv_succ_bi, nlt_succ_bi/ - | /4 width=8 by gr_nat_inv_next_succ, nlt_succ_bi/ - ] -] -qed-. - -theorem gr_nat_inv_monotonic (k1) (l1) (f): - @↑❪l1,f❫ ≘ k1 → ∀k2,l2. @↑❪l2,f❫ ≘ k2 → k1 < k2 → l1 < l2. -#k1 @(nat_ind_succ … k1) -k1 -[ #l1 #f #H1f elim (gr_nat_inv_zero_dx … H1f) -H1f // - #g * -l1 #H #k2 #l2 #H2f #Hk - lapply (nlt_des_gen … Hk) -Hk #H22 - elim (gr_nat_inv_push_succ … H2f … (↓k2) H) -f // -| #k1 #IH #l1 @(nat_ind_succ … l1) -l1 - [ #f #H1f elim (gr_nat_inv_zero_succ … H1f) -H1f [ |*: // ] - #g #H1g #H #k2 #l2 #H2f #Hj elim (nlt_inv_succ_sn … Hj) -Hj - /3 width=7 by gr_nat_inv_next_succ/ - | #l1 #_ #f #H1f #k2 #l2 #H2f #Hj elim (nlt_inv_succ_sn … Hj) -Hj - #Hj #H22 elim (gr_nat_inv_succ_bi … H1f) -H1f [1,4: * |*: // ] - #g #Hg #H - [ elim (gr_nat_inv_push_succ … H2f … (↓k2) H) -f - /3 width=7 by nlt_succ_bi/ - | /3 width=7 by gr_nat_inv_next_succ/ - ] - ] -] -qed-. - -theorem gr_nat_mono (f) (l) (l1) (l2): - @↑❪l,f❫ ≘ l1 → @↑❪l,f❫ ≘ l2 → l2 = l1. -#f #l #l1 #l2 #H1 #H2 elim (nat_split_lt_eq_gt l2 l1) // -#Hi elim (nlt_ge_false l l) -/2 width=6 by gr_nat_inv_monotonic/ -qed-. - -theorem gr_nat_inj (f) (l1) (l2) (l): - @↑❪l1,f❫ ≘ l → @↑❪l2,f❫ ≘ l → l1 = l2. -#f #l1 #l2 #l #H1 #H2 elim (nat_split_lt_eq_gt l2 l1) // -#Hi elim (nlt_ge_false l l) -/2 width=6 by gr_nat_monotonic/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_uni.ma deleted file mode 100644 index 0812fab2e..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_uni.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 "ground/arith/nat_plus_rplus.ma". -include "ground/relocation/gr_pat_uni.ma". -include "ground/relocation/gr_nat_nat.ma". - -(* NON-NEGATIVE APPLICATION FOR GENERIC RELOCATION MAPS *********************) - -(* Constructions with gr_uni ************************************************) - -lemma gr_nat_uni (n) (l): - @↑❪l,𝐮❨n❩❫ ≘ l+n. -/2 width=1 by gr_nat_pred_bi/ -qed. - -(* Inversions with gr_uni ***************************************************) - -lemma gr_nat_inv_uni (n) (l) (k): - @↑❪l,𝐮❨n❩❫ ≘ k → k = l+n. -/2 width=4 by gr_nat_mono/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nexts.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_nexts.ma deleted file mode 100644 index 88065e56d..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nexts.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 "ground/notation/functions/uparrowstar_2.ma". -include "ground/arith/nat_succ_iter.ma". -include "ground/relocation/gr_map.ma". - -(* ITERATED NEXT FOR GENERIC RELOCATION MAPS ********************************) - -(*** nexts *) -definition gr_nexts (f:gr_map) (n:nat) ≝ - (gr_next^n) f. - -interpretation - "iterated next (generic relocation maps)" - 'UpArrowStar n f = (gr_nexts f n). - -(* Basic constructions ******************************************************) - -(*** nexts_O *) -lemma gr_nexts_zero: - ∀f. f = ↑*[𝟎] f. -// qed. - -(*** nexts_swap *) -lemma gr_nexts_next (n): - ∀f. ↑↑*[n] f = ↑*[n] ↑f. -#f #n @(niter_appl … gr_next) -qed. - -(*** nexts_S *) -lemma gr_nexts_succ (n): - ∀f. ↑↑*[n] f = ↑*[↑n] f. -#f #n @(niter_succ … gr_next) -qed. - -(*** nexts_xn *) -lemma gr_nexts_swap (n): - ∀f. ↑*[n] ↑f = ↑*[↑n] f. -// qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nexts_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_nexts_eq.ma deleted file mode 100644 index addd6c42c..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_nexts_eq.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 "ground/relocation/gr_eq.ma". -include "ground/relocation/gr_nexts.ma". - -(* ITERATED NEXT FOR GENERIC RELOCATION MAPS ********************************) - -(* Constructions with gr_eq *************************************************) - -(*** nexts_eq_repl *) -lemma gr_nexts_eq_repl (n): - gr_eq_repl (λf1,f2. ↑*[n] f1 ≡ ↑*[n] f2). -#n @(nat_ind_succ … n) -n -/3 width=5 by gr_eq_next/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat.ma deleted file mode 100644 index 5cd1c947d..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat.ma +++ /dev/null @@ -1,202 +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/notation/relations/rat_3.ma". -include "ground/xoa/ex_3_2.ma". -include "ground/arith/pnat.ma". -include "ground/relocation/gr_tl.ma". - -(* POSITIVE APPLICATION FOR GENERIC RELOCATION MAPS *************************) - -(*** at *) -coinductive gr_pat: relation3 gr_map pnat pnat ≝ -(*** at_refl *) -| gr_pat_refl (f) (g) (j1) (j2): - ⫯f = g → 𝟏 = j1 → 𝟏 = j2 → gr_pat g j1 j2 -(*** at_push *) -| gr_pat_push (f) (i1) (i2): - gr_pat f i1 i2 → ∀g,j1,j2. ⫯f = g → ↑i1 = j1 → ↑i2 = j2 → gr_pat g j1 j2 -(*** at_next *) -| gr_pat_next (f) (i1) (i2): - gr_pat f i1 i2 → ∀g,j2. ↑f = g → ↑i2 = j2 → gr_pat g i1 j2 -. - -interpretation - "relational positive application (generic relocation maps)" - 'RAt i1 f i2 = (gr_pat f i1 i2). - -(*** H_at_div *) -definition H_gr_pat_div: relation4 gr_map gr_map gr_map gr_map ≝ - λf2,g2,f1,g1. - ∀jf,jg,j. @❪jf,f2❫ ≘ j → @❪jg,g2❫ ≘ j → - ∃∃j0. @❪j0,f1❫ ≘ jf & @❪j0,g1❫ ≘ jg. - -(* Basic inversions *********************************************************) - -(*** at_inv_ppx *) -lemma gr_pat_inv_unit_push (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g. 𝟏 = i1 → ⫯g = f → 𝟏 = i2. -#f #i1 #i2 * -f -i1 -i2 // -[ #f #i1 #i2 #_ #g #j1 #j2 #_ * #_ #x #H destruct -| #f #i1 #i2 #_ #g #j2 * #_ #x #_ #H elim (eq_inv_gr_push_next … H) -] -qed-. - -(*** at_inv_npx *) -lemma gr_pat_inv_succ_push (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f → - ∃∃j2. @❪j1,g❫ ≘ j2 & ↑j2 = i2. -#f #i1 #i2 * -f -i1 -i2 -[ #f #g #j1 #j2 #_ * #_ #x #x1 #H destruct -| #f #i1 #i2 #Hi #g #j1 #j2 * * * #x #x1 #H #Hf >(eq_inv_gr_push_bi … Hf) -g destruct /2 width=3 by ex2_intro/ -| #f #i1 #i2 #_ #g #j2 * #_ #x #x1 #_ #H elim (eq_inv_gr_push_next … H) -] -qed-. - -(*** at_inv_xnx *) -lemma gr_pat_inv_next (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g. ↑g = f → - ∃∃j2. @❪i1,g❫ ≘ j2 & ↑j2 = i2. -#f #i1 #i2 * -f -i1 -i2 -[ #f #g #j1 #j2 * #_ #_ #x #H elim (eq_inv_gr_next_push … H) -| #f #i1 #i2 #_ #g #j1 #j2 * #_ #_ #x #H elim (eq_inv_gr_next_push … H) -| #f #i1 #i2 #Hi #g #j2 * * #x #H >(eq_inv_gr_next_bi … H) -g /2 width=3 by ex2_intro/ -] -qed-. - -(* Advanced inversions ******************************************************) - -(*** at_inv_ppn *) -lemma gr_pat_inv_unit_push_succ (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g,j2. 𝟏 = i1 → ⫯g = f → ↑j2 = i2 → ⊥. -#f #i1 #i2 #Hf #g #j2 #H1 #H <(gr_pat_inv_unit_push … Hf … H1 H) -f -g -i1 -i2 -#H destruct -qed-. - -(*** at_inv_npp *) -lemma gr_pat_inv_succ_push_unit (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f → 𝟏 = i2 → ⊥. -#f #i1 #i2 #Hf #g #j1 #H1 #H elim (gr_pat_inv_succ_push … Hf … H1 H) -f -i1 -#x2 #Hg * -i2 #H destruct -qed-. - -(*** at_inv_npn *) -lemma gr_pat_inv_succ_push_succ (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g,j1,j2. ↑j1 = i1 → ⫯g = f → ↑j2 = i2 → @❪j1,g❫ ≘ j2. -#f #i1 #i2 #Hf #g #j1 #j2 #H1 #H elim (gr_pat_inv_succ_push … Hf … H1 H) -f -i1 -#x2 #Hg * -i2 #H destruct // -qed-. - -(*** at_inv_xnp *) -lemma gr_pat_inv_next_unit (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g. ↑g = f → 𝟏 = i2 → ⊥. -#f #i1 #i2 #Hf #g #H elim (gr_pat_inv_next … Hf … H) -f -#x2 #Hg * -i2 #H destruct -qed-. - -(*** at_inv_xnn *) -lemma gr_pat_inv_next_succ (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g,j2. ↑g = f → ↑j2 = i2 → @❪i1,g❫ ≘ j2. -#f #i1 #i2 #Hf #g #j2 #H elim (gr_pat_inv_next … Hf … H) -f -#x2 #Hg * -i2 #H destruct // -qed-. - -(*** at_inv_pxp *) -lemma gr_pat_inv_unit_bi (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → 𝟏 = i1 → 𝟏 = i2 → ∃g. ⫯g = f. -#f elim (gr_map_split_tl … f) /2 width=2 by ex_intro/ -#H #i1 #i2 #Hf #H1 #H2 cases (gr_pat_inv_next_unit … Hf … H H2) -qed-. - -(*** at_inv_pxn *) -lemma gr_pat_inv_unit_succ (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀j2. 𝟏 = i1 → ↑j2 = i2 → - ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f. -#f elim (gr_map_split_tl … f) -#H #i1 #i2 #Hf #j2 #H1 #H2 -[ elim (gr_pat_inv_unit_push_succ … Hf … H1 H H2) -| /3 width=5 by gr_pat_inv_next_succ, ex2_intro/ -] -qed-. - -(*** at_inv_nxp *) -lemma gr_pat_inv_succ_unit (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀j1. ↑j1 = i1 → 𝟏 = i2 → ⊥. -#f elim (gr_map_split_tl f) -#H #i1 #i2 #Hf #j1 #H1 #H2 -[ elim (gr_pat_inv_succ_push_unit … Hf … H1 H H2) -| elim (gr_pat_inv_next_unit … Hf … H H2) -] -qed-. - -(*** at_inv_nxn *) -lemma gr_pat_inv_succ_bi (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀j1,j2. ↑j1 = i1 → ↑j2 = i2 → - ∨∨ ∃∃g. @❪j1,g❫ ≘ j2 & ⫯g = f - | ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f. -#f elim (gr_map_split_tl f) * -/4 width=7 by gr_pat_inv_next_succ, gr_pat_inv_succ_push_succ, ex2_intro, or_intror, or_introl/ -qed-. - -(* Note: the following inversion lemmas must be checked *) -(*** at_inv_xpx *) -lemma gr_pat_inv_push (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g. ⫯g = f → - ∨∨ ∧∧ 𝟏 = i1 & 𝟏 = i2 - | ∃∃j1,j2. @❪j1,g❫ ≘ j2 & ↑j1 = i1 & ↑j2 = i2. -#f * [2: #i1 ] #i2 #Hf #g #H -[ elim (gr_pat_inv_succ_push … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/ -| >(gr_pat_inv_unit_push … Hf … H) -f /3 width=1 by conj, or_introl/ -] -qed-. - -(*** at_inv_xpp *) -lemma gr_pat_inv_push_unit (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g. ⫯g = f → 𝟏 = i2 → 𝟏 = i1. -#f #i1 #i2 #Hf #g #H elim (gr_pat_inv_push … Hf … H) -f * // -#j1 #j2 #_ #_ * -i2 #H destruct -qed-. - -(*** at_inv_xpn *) -lemma gr_pat_inv_push_succ (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀g,j2. ⫯g = f → ↑j2 = i2 → - ∃∃j1. @❪j1,g❫ ≘ j2 & ↑j1 = i1. -#f #i1 #i2 #Hf #g #j2 #H elim (gr_pat_inv_push … Hf … H) -f * -[ #_ * -i2 #H destruct -| #x1 #x2 #Hg #H1 * -i2 #H destruct /2 width=3 by ex2_intro/ -] -qed-. - -(*** at_inv_xxp *) -lemma gr_pat_inv_unit_dx (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → 𝟏 = i2 → - ∃∃g. 𝟏 = i1 & ⫯g = f. -#f elim (gr_map_split_tl f) -#H #i1 #i2 #Hf #H2 -[ /3 width=6 by gr_pat_inv_push_unit, ex2_intro/ -| elim (gr_pat_inv_next_unit … Hf … H H2) -] -qed-. - -(*** at_inv_xxn *) -lemma gr_pat_inv_succ_dx (f) (i1) (i2): - @❪i1,f❫ ≘ i2 → ∀j2. ↑j2 = i2 → - ∨∨ ∃∃g,j1. @❪j1,g❫ ≘ j2 & ↑j1 = i1 & ⫯g = f - | ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f. -#f elim (gr_map_split_tl f) -#H #i1 #i2 #Hf #j2 #H2 -[ elim (gr_pat_inv_push_succ … Hf … H H2) -i2 /3 width=5 by or_introl, ex3_2_intro/ -| lapply (gr_pat_inv_next_succ … Hf … H H2) -i2 /3 width=3 by or_intror, ex2_intro/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat_basic.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat_basic.ma deleted file mode 100644 index 3960be7bd..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat_basic.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 "ground/relocation/gr_nat_basic.ma". - -(* POSITIVE APPLICATION FOR GENERIC RELOCATION MAPS *************************) - -(* Constructions with gr_basic **********************************************) - -(*** at_basic_lt *) -lemma gr_pat_basic_lt (m) (n) (i): - ninj i ≤ m → @❪i, 𝐛❨m,n❩❫ ≘ i. -#m #n #i >(npsucc_pred i) #Hmi -/2 width=1 by gr_nat_basic_lt/ -qed. - -(*** at_basic_ge *) -lemma gr_pat_basic_ge (m) (n) (i): - m < ninj i → @❪i, 𝐛❨m,n❩❫ ≘ i+n. -#m #n #i >(npsucc_pred i) #Hmi (eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(*** sand_inv_npx *) -lemma gr_sand_inv_next_push: - ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → - ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(*** sand_inv_pnx *) -lemma gr_sand_inv_push_next: - ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → - ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(*** sand_inv_nnx *) -lemma gr_sand_inv_next_bi: - ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → - ∃∃f. f1 ⋒ f2 ≘ f & ↑f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sand_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sand_eq.ma deleted file mode 100644 index 86c2a71dc..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sand_eq.ma +++ /dev/null @@ -1,65 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "ground/relocation/gr_tl_eq.ma". -include "ground/relocation/gr_sand.ma". - -(* RELATIONAL INTERSECTION FOR GENERIC RELOCATION MAPS **********************) - -(* Constructions with gr_eq *************************************************) - -(*** sand_eq_repl_back1 *) -corec lemma gr_sand_eq_repl_back_sn: - ∀f2,f. gr_eq_repl_back … (λf1. f1 ⋒ f2 ≘ f). -#f2 #f #f1 * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx -try cases (gr_eq_inv_push_sn … Hx … H1) try cases (gr_eq_inv_next_sn … Hx … H1) -g1 -/3 width=7 by gr_sand_push_bi, gr_sand_next_push, gr_sand_push_next, gr_sand_next_bi/ -qed-. - -(*** sand_eq_repl_fwd1 *) -lemma gr_sand_eq_repl_fwd_sn: - ∀f2,f. gr_eq_repl_fwd … (λf1. f1 ⋒ f2 ≘ f). -#f2 #f @gr_eq_repl_sym /2 width=3 by gr_sand_eq_repl_back_sn/ -qed-. - -(*** sand_eq_repl_back2 *) -corec lemma gr_sand_eq_repl_back_dx: - ∀f1,f. gr_eq_repl_back … (λf2. f1 ⋒ f2 ≘ f). -#f1 #f #f2 * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx -try cases (gr_eq_inv_push_sn … Hx … H2) try cases (gr_eq_inv_next_sn … Hx … H2) -g2 -/3 width=7 by gr_sand_push_bi, gr_sand_next_push, gr_sand_push_next, gr_sand_next_bi/ -qed-. - -(*** sand_eq_repl_fwd2 *) -lemma sand_eq_repl_fwd_dx: - ∀f1,f. gr_eq_repl_fwd … (λf2. f1 ⋒ f2 ≘ f). -#f1 #f @gr_eq_repl_sym /2 width=3 by gr_sand_eq_repl_back_dx/ -qed-. - -(*** sand_eq_repl_back3 *) -corec lemma gr_sand_eq_repl_back: - ∀f1,f2. gr_eq_repl_back … (λf. f1 ⋒ f2 ≘ f). -#f1 #f2 #f * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx -try cases (gr_eq_inv_push_sn … Hx … H0) try cases (gr_eq_inv_next_sn … Hx … H0) -g -/3 width=7 by gr_sand_push_bi, gr_sand_next_push, gr_sand_push_next, gr_sand_next_bi/ -qed-. - -(*** sand_eq_repl_fwd3 *) -lemma gr_sand_eq_repl_fwd: - ∀f1,f2. gr_eq_repl_fwd … (λf. f1 ⋒ f2 ≘ f). -#f1 #f2 @gr_eq_repl_sym /2 width=3 by gr_sand_eq_repl_back/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj.ma deleted file mode 100644 index f8b101d22..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj.ma +++ /dev/null @@ -1,144 +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/notation/relations/parallel_2.ma". -include "ground/relocation/gr_tl.ma". - -(* DISJOINTNESS FOR GENERIC RELOCATION MAPS *********************************) - -(*** sdj *) -coinductive gr_sdj: relation gr_map ≝ -(*** sdj_pp *) -| gr_sdj_push_bi (f1) (f2) (g1) (g2): - gr_sdj f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → gr_sdj g1 g2 -(*** sdj_np *) -| gr_sdj_next_push (f1) (f2) (g1) (g2): - gr_sdj f1 f2 → ↑f1 = g1 → ⫯f2 = g2 → gr_sdj g1 g2 -(*** sdj_pn *) -| gr_sdj_push_next (f1) (f2) (g1) (g2): - gr_sdj f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → gr_sdj g1 g2 -. - -interpretation - "disjointness (generic relocation maps)" - 'Parallel f1 f2 = (gr_sdj f1 f2). - -(* Basic constructions ******************************************************) - -(*** sdj_sym *) -corec lemma gr_sdj_sym: - symmetric … gr_sdj. -#f1 #f2 * -f1 -f2 -#f1 #f2 #g1 #g2 #Hf #H1 #H2 -[ @(gr_sdj_push_bi … H2 H1) -| @(gr_sdj_push_next … H2 H1) -| @(gr_sdj_next_push … H2 H1) -] -g2 -g1 -/2 width=1 by/ -qed-. - -(* Basic inversions *********************************************************) - -(*** sdj_inv_pp *) -lemma gr_sdj_inv_push_bi: - ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ∥ f2. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct -[ lapply (eq_inv_gr_push_bi … Hx1) -Hx1 - lapply (eq_inv_gr_push_bi … Hx2) -Hx2 // -| elim (eq_inv_gr_push_next … Hx1) -| elim (eq_inv_gr_push_next … Hx2) -] -qed-. - -(*** sdj_inv_np *) -lemma gr_sdj_inv_next_push: - ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → f1 ∥ f2. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct -[ elim (eq_inv_gr_next_push … Hx1) -| lapply (eq_inv_gr_next_bi … Hx1) -Hx1 - lapply (eq_inv_gr_push_bi … Hx2) -Hx2 // -| elim (eq_inv_gr_push_next … Hx2) -] -qed-. - -(*** sdj_inv_pn *) -lemma gr_sdj_inv_push_next: - ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ∥ f2. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct -[ elim (eq_inv_gr_next_push … Hx2) -| elim (eq_inv_gr_push_next … Hx1) -| lapply (eq_inv_gr_push_bi … Hx1) -Hx1 - lapply (eq_inv_gr_next_bi … Hx2) -Hx2 // -] -qed-. - -(*** sdj_inv_nn *) -lemma gr_sdj_inv_next_bi: - ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → ⊥. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct -[ elim (eq_inv_gr_next_push … Hx1) -| elim (eq_inv_gr_next_push … Hx2) -| elim (eq_inv_gr_next_push … Hx1) -] -qed-. - -(* Advanced inversions ******************************************************) - -(*** sdj_inv_nx *) -lemma gr_sdj_inv_next_sn: - ∀g1,g2. g1 ∥ g2 → ∀f1. ↑f1 = g1 → - ∃∃f2. f1 ∥ f2 & ⫯f2 = g2. -#g1 #g2 elim (gr_map_split_tl g2) #H2 #H #f1 #H1 -[ lapply (gr_sdj_inv_next_push … H … H1 H2) -H /2 width=3 by ex2_intro/ -| elim (gr_sdj_inv_next_bi … H … H1 H2) -] -qed-. - -(*** sdj_inv_xn *) -lemma gr_sdj_inv_next_dx: - ∀g1,g2. g1 ∥ g2 → ∀f2. ↑f2 = g2 → - ∃∃f1. f1 ∥ f2 & ⫯f1 = g1. -#g1 #g2 elim (gr_map_split_tl g1) #H1 #H #f2 #H2 -[ lapply (gr_sdj_inv_push_next … H … H1 H2) -H /2 width=3 by ex2_intro/ -| elim (gr_sdj_inv_next_bi … H … H1 H2) -] -qed-. - -(*** sdj_inv_xp *) -lemma gr_sdj_inv_push_dx: - ∀g1,g2. g1 ∥ g2 → ∀f2. ⫯f2 = g2 → - ∨∨ ∃∃f1. f1 ∥ f2 & ⫯f1 = g1 - | ∃∃f1. f1 ∥ f2 & ↑f1 = g1. -#g1 #g2 elim (gr_map_split_tl g1) #H1 #H #f2 #H2 -[ lapply (gr_sdj_inv_push_bi … H … H1 H2) -| lapply (gr_sdj_inv_next_push … H … H1 H2) -] -H -H2 -/3 width=3 by ex2_intro, or_introl, or_intror/ -qed-. - -(*** sdj_inv_px *) -lemma gr_sdj_inv_push_sn: - ∀g1,g2. g1 ∥ g2 → ∀f1. ⫯f1 = g1 → - ∨∨ ∃∃f2. f1 ∥ f2 & ⫯f2 = g2 - | ∃∃f2. f1 ∥ f2 & ↑f2 = g2. -#g1 #g2 elim (gr_map_split_tl g2) #H2 #H #f1 #H1 -[ lapply (gr_sdj_inv_push_bi … H … H1 H2) -| lapply (gr_sdj_inv_push_next … H … H1 H2) -] -H -H1 -/3 width=3 by ex2_intro, or_introl, or_intror/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj_eq.ma deleted file mode 100644 index f4b82a59b..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj_eq.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 "ground/relocation/gr_tl_eq.ma". -include "ground/relocation/gr_sdj.ma". - -(* DISJOINTNESS FOR GENERIC RELOCATION MAPS *********************************) - -(* Constructions with gr_eq *************************************************) - -(*** sdj_eq_repl_back1 *) -corec lemma gr_sdj_eq_repl_back_sn: - ∀f2. gr_eq_repl_back … (λf1. f1 ∥ f2). -#f2 #f1 * -f2 -f1 -#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 -[ cases (gr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by gr_sdj_push_bi/ -| cases (gr_eq_inv_next_sn … H0 … H1) -g1 /3 width=5 by gr_sdj_next_push/ -| cases (gr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by gr_sdj_push_next/ -] -qed-. - -(*** sdj_eq_repl_fwd1 *) -lemma gr_sdj_eq_repl_fwd_sn: - ∀f2. gr_eq_repl_fwd … (λf1. f1 ∥ f2). -#f2 @gr_eq_repl_sym /2 width=3 by gr_sdj_eq_repl_back_sn/ -qed-. - -(*** sdj_eq_repl_back2 *) -corec lemma gr_sdj_eq_repl_back_dx: - ∀f1. gr_eq_repl_back … (λf2. f1 ∥ f2). -#f1 #f2 * -f1 -f2 -#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 -[ cases (gr_eq_inv_push_sn … H0 … H2) -g2 /3 width=5 by gr_sdj_push_bi/ -| cases (gr_eq_inv_push_sn … H0 … H2) -g2 /3 width=5 by gr_sdj_next_push/ -| cases (gr_eq_inv_next_sn … H0 … H2) -g2 /3 width=5 by gr_sdj_push_next/ -] -qed-. - -(*** sdj_eq_repl_fwd2 *) -lemma gr_sdj_eq_repl_fwd_dx: - ∀f1. gr_eq_repl_fwd … (λf2. f1 ∥ f2). -#f1 @gr_eq_repl_sym /2 width=3 by gr_sdj_eq_repl_back_dx/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj_isi.ma deleted file mode 100644 index fac14a47a..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sdj_isi.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 "ground/relocation/gr_isi.ma". -include "ground/relocation/gr_sdj.ma". - -(* DISJOINTNESS FOR GENERIC RELOCATION MAPS *********************************) - -(* Constructions with gr_isi ************************************************) - -(*** sdj_isid_dx *) -corec lemma gr_sdj_isi_dx: - ∀f2. 𝐈❪f2❫ → ∀f1. f1 ∥ f2. -#f2 * -f2 -#f2 #g2 #Hf2 #H2 #f1 cases (gr_map_split_tl f1) * -/3 width=5 by gr_sdj_next_push, gr_sdj_push_bi/ -qed. - -(*** sdj_isid_sn *) -corec lemma gr_sdj_isi_sn: - ∀f1. 𝐈❪f1❫ → ∀f2. f1 ∥ f2. -#f1 * -f1 -#f1 #g1 #Hf1 #H1 #f2 cases (gr_map_split_tl f2) * -/3 width=5 by gr_sdj_push_next, gr_sdj_push_bi/ -qed. - -(* Inversions with gr_isi ***************************************************) - -(*** sdj_inv_refl *) -corec lemma gr_sdj_inv_refl: - ∀f. f ∥ f → 𝐈❪f❫. -#f cases (gr_map_split_tl f) #Hf #H -[ lapply (gr_sdj_inv_push_bi … H … Hf Hf) -H /3 width=3 by gr_isi_push/ -| elim (gr_sdj_inv_next_bi … H … Hf Hf) -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle.ma deleted file mode 100644 index 74c15789f..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle.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/relocation/gr_tl.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(*** sle *) -coinductive gr_sle: relation gr_map ≝ -(*** sle_push *) -| gr_sle_push (f1) (f2) (g1) (g2): - gr_sle f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → gr_sle g1 g2 -(*** sle_next *) -| gr_sle_next (f1) (f2) (g1) (g2): - gr_sle f1 f2 → ↑f1 = g1 → ↑f2 = g2 → gr_sle g1 g2 -(*** sle_weak *) -| gr_sle_weak (f1) (f2) (g1) (g2): - gr_sle f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → gr_sle g1 g2 -. - -interpretation - "inclusion (generic relocation maps)" - 'subseteq f1 f2 = (gr_sle f1 f2). - -(* Basic constructions ******************************************************) - -(*** sle_refl *) -corec lemma gr_sle_refl: - reflexive … gr_sle. -#f cases (gr_map_split_tl f) #H -[ @(gr_sle_push … H H) | @(gr_sle_next … H H) ] -H // -qed. - -(* Basic inversions *********************************************************) - -(*** sle_inv_xp *) -lemma gr_sle_inv_push_dx: - ∀g1,g2. g1 ⊆ g2 → ∀f2. ⫯f2 = g2 → - ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x2 #Hx2 destruct -[ lapply (eq_inv_gr_push_bi … Hx2) -Hx2 /2 width=3 by ex2_intro/ ] -elim (eq_inv_gr_push_next … Hx2) -qed-. - -(*** sle_inv_nx *) -lemma gr_sle_inv_next_sn: - ∀g1,g2. g1 ⊆ g2 → ∀f1. ↑f1 = g1 → - ∃∃f2. f1 ⊆ f2 & ↑f2 = g2. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #Hx1 destruct -[2: lapply (eq_inv_gr_next_bi … Hx1) -Hx1 /2 width=3 by ex2_intro/ ] -elim (eq_inv_gr_next_push … Hx1) -qed-. - -(*** sle_inv_pn *) -lemma gr_sle_inv_push_next: - ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ⊆ f2. -#g1 #g2 * -g1 -g2 -#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct -[ elim (eq_inv_gr_next_push … Hx2) -| elim (eq_inv_gr_push_next … Hx1) -| lapply (eq_inv_gr_push_bi … Hx1) -Hx1 - lapply (eq_inv_gr_next_bi … Hx2) -Hx2 // -] -qed-. - -(* Advanced inversions ******************************************************) - -(*** sle_inv_pp *) -lemma gr_sle_inv_push_bi: - ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ⊆ f2. -#g1 #g2 #H #f1 #f2 #H1 #H2 -elim (gr_sle_inv_push_dx … H … H2) -g2 #x1 #H #Hx1 destruct -lapply (eq_inv_gr_push_bi … Hx1) -Hx1 // -qed-. - -(*** sle_inv_nn *) -lemma gr_sle_inv_next_bi: - ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → f1 ⊆ f2. -#g1 #g2 #H #f1 #f2 #H1 #H2 -elim (gr_sle_inv_next_sn … H … H1) -g1 #x2 #H #Hx2 destruct -lapply (eq_inv_gr_next_bi … Hx2) -Hx2 // -qed-. - -(*** sle_inv_px *) -lemma gr_sle_inv_push_sn: - ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 → - ∨∨ ∃∃f2. f1 ⊆ f2 & ⫯f2 = g2 - | ∃∃f2. f1 ⊆ f2 & ↑f2 = g2. -#g1 #g2 -elim (gr_map_split_tl g2) #H2 #H #f1 #H1 -[ lapply (gr_sle_inv_push_bi … H … H1 H2) -| lapply (gr_sle_inv_push_next … H … H1 H2) -] -H -H1 -/3 width=3 by ex2_intro, or_introl, or_intror/ -qed-. - -(*** sle_inv_xn *) -lemma gr_sle_inv_next_dx: - ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 → - ∨∨ ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1 - | ∃∃f1. f1 ⊆ f2 & ↑f1 = g1. -#g1 #g2 -elim (gr_map_split_tl g1) #H1 #H #f2 #H2 -[ lapply (gr_sle_inv_push_next … H … H1 H2) -| lapply (gr_sle_inv_next_bi … H … H1 H2) -] -H -H2 -/3 width=3 by ex2_intro, or_introl, or_intror/ -qed-. - -(* Constructions with gr_tl *************************************************) - -(*** sle_px_tl *) -lemma gr_sle_push_sn_tl: - ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 → f1 ⊆ ⫰g2. -#g1 #g2 #H #f1 #H1 -elim (gr_sle_inv_push_sn … H … H1) -H -H1 * // -qed. - -(*** sle_xn_tl *) -lemma gr_sle_next_dx_tl: - ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 → ⫰g1 ⊆ f2. -#g1 #g2 #H #f2 #H2 -elim (gr_sle_inv_next_dx … H … H2) -H -H2 * // -qed. - -(*** sle_tl *) -lemma gr_sle_tl: - ∀f1,f2. f1 ⊆ f2 → ⫰f1 ⊆ ⫰f2. -#f1 elim (gr_map_split_tl f1) #H1 #f2 #H -[ lapply (gr_sle_push_sn_tl … H … H1) -H // -| elim (gr_sle_inv_next_sn … H … H1) -H // -] -qed. - -(* Inversions with gr_tl ****************************************************) - -(*** sle_inv_tl_sn *) -lemma gr_sle_inv_tl_sn: - ∀f1,f2. ⫰f1 ⊆ f2 → f1 ⊆ ↑f2. -#f1 elim (gr_map_split_tl f1) #H #f2 #Hf12 -/2 width=5 by gr_sle_next, gr_sle_weak/ -qed-. - -(*** sle_inv_tl_dx *) -lemma gr_sle_inv_tl_dx: - ∀f1,f2. f1 ⊆ ⫰f2 → ⫯f1 ⊆ f2. -#f1 #f2 elim (gr_map_split_tl f2) #H #Hf12 -/2 width=5 by gr_sle_push, gr_sle_weak/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_eq.ma deleted file mode 100644 index caa6ae5d5..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_eq.ma +++ /dev/null @@ -1,60 +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/relocation/gr_sle.ma". -(* * this should go first *) -include "ground/relocation/gr_tl_eq.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(* Constructions with gr_eq *************************************************) - -(*** sle_eq_repl_back1 *) -corec lemma gr_sle_eq_repl_back_sn: - ∀f2:gr_map. gr_eq_repl_back … (λf1:gr_map. f1 ⊆ f2). -#f2 #f1 * -f2 -f1 -#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 -[ cases (gr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by gr_sle_push/ -| cases (gr_eq_inv_next_sn … H0 … H1) -g1 /3 width=5 by gr_sle_next/ -| cases (gr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by gr_sle_weak/ -] -qed-. - -(*** sle_eq_repl_fwd1 *) -lemma gr_sle_eq_repl_fwd_sn: - ∀f2. gr_eq_repl_fwd … (λf1. f1 ⊆ f2). -#f2 @gr_eq_repl_sym /2 width=3 by gr_sle_eq_repl_back_sn/ -qed-. - -(*** sle_eq_repl_back2 *) -corec lemma gr_sle_eq_repl_back_dx: - ∀f1. gr_eq_repl_back … (λf2. f1 ⊆ f2). -#f1 #f2 * -f1 -f2 -#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 -[ cases (gr_eq_inv_push_sn … H0 … H2) -g2 /3 width=5 by gr_sle_push/ -| cases (gr_eq_inv_next_sn … H0 … H2) -g2 /3 width=5 by gr_sle_next/ -| cases (gr_eq_inv_next_sn … H0 … H2) -g2 /3 width=5 by gr_sle_weak/ -] -qed-. - -(*** sle_eq_repl_fwd2 *) -lemma gr_sle_eq_repl_fwd_dx: - ∀f1. gr_eq_repl_fwd … (λf2. f1 ⊆ f2). -#f1 @gr_eq_repl_sym /2 width=3 by gr_sle_eq_repl_back_dx/ -qed-. - -(*** sle_refl_eq *) -lemma gr_sle_refl_eq: - ∀f1,f2. f1 ≡ f2 → f1 ⊆ f2. -/2 width=3 by gr_sle_eq_repl_back_dx/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_isd.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_isd.ma deleted file mode 100644 index 5174bab31..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_isd.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 "ground/relocation/gr_isd.ma". -include "ground/relocation/gr_sle.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(* Constructions with gr_isd ************************************************) - -(*** sle_isdiv_dx *) -corec lemma gr_sle_isd_dx: - ∀f2. 𝛀❪f2❫ → ∀f1. f1 ⊆ f2. -#f2 * -f2 -#f2 #g2 #Hf2 #H2 #f1 cases (gr_map_split_tl f1) * -/3 width=5 by gr_sle_weak, gr_sle_next/ -qed. - -(* Inversions with gr_isd ***************************************************) - -(*** sle_inv_isdiv_sn *) -corec lemma gr_sle_inv_isd_sn: - ∀f1,f2. f1 ⊆ f2 → 𝛀❪f1❫ → 𝛀❪f2❫. -#f1 #f2 * -f1 -f2 -#f1 #f2 #g1 #g2 #Hf * * #H -[1,3: elim (gr_isd_inv_push … H) // ] -lapply (gr_isd_inv_next … H ??) -H -/3 width=3 by gr_isd_next/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_isi.ma deleted file mode 100644 index 96b277ba2..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_isi.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 "ground/relocation/gr_isi.ma". -include "ground/relocation/gr_sle.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(* Constructions with gr_isi ************************************************) - -(*** sle_isid_sn *) -corec lemma gr_sle_isi_sn: - ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⊆ f2. -#f1 * -f1 -#f1 #g1 #Hf1 #H1 #f2 cases (gr_map_split_tl f2) * -/3 width=5 by gr_sle_weak, gr_sle_push/ -qed. - -(* Inversions with gr_isi ***************************************************) - -(*** sle_inv_isid_dx *) -corec lemma gr_sle_inv_isi_dx: - ∀f1,f2. f1 ⊆ f2 → 𝐈❪f2❫ → 𝐈❪f1❫. -#f1 #f2 * -f1 -f2 -#f1 #f2 #g1 #g2 #Hf * * #H -[2,3: elim (gr_isi_inv_next … H) // ] -lapply (gr_isi_inv_push … H ??) -H -/3 width=3 by gr_isi_push/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_pushs.ma deleted file mode 100644 index 41d2bb7ba..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_pushs.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 "ground/relocation/gr_pushs.ma". -include "ground/relocation/gr_sle.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(* Constructions with gr_pushs **********************************************) - -(*** sle_pushs *) -lemma gr_sle_pushs: - ∀f1,f2. f1 ⊆ f2 → ∀n. ⫯*[n] f1 ⊆ ⫯*[n] f2. -#f1 #f2 #Hf12 #n @(nat_ind_succ … n) -n -/2 width=5 by gr_sle_push/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_sle.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_sle.ma deleted file mode 100644 index f7c34e1e7..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_sle.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 "ground/relocation/gr_sle.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(* Main constructions *******************************************************) - -(*** sle_trans *) -corec theorem gr_sle_trans: - Transitive … gr_sle. -#f1 #f * -f1 -f -#f1 #f #g1 #g #Hf #H1 #H #g2 #H0 -[ cases (gr_sle_inv_push_sn … H0 … H) * -|*: cases (gr_sle_inv_next_sn … H0 … H) -] -g -/3 width=5 by gr_sle_push, gr_sle_next, gr_sle_weak/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_tls.ma deleted file mode 100644 index ea319ccda..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sle_tls.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 "ground/relocation/gr_tls.ma". -include "ground/relocation/gr_sle.ma". - -(* INCLUSION FOR GENERIC RELOCATION MAPS ************************************) - -(* Constructions with gr_tls ************************************************) - -(*** sle_tls *) -lemma gr_sle_tls: - ∀f1,f2. f1 ⊆ f2 → ∀n. ⫰*[n] f1 ⊆ ⫰*[n] f2. -#f1 #f2 #Hf12 #n @(nat_ind_succ … n) -n -/2 width=5 by gr_sle_tl/ -qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor.ma deleted file mode 100644 index 4f2e759e0..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor.ma +++ /dev/null @@ -1,340 +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/notation/relations/runion_3.ma". -include "ground/xoa/or_3.ma". -include "ground/xoa/ex_3_2.ma". -include "ground/relocation/gr_tl.ma". - -(* RELATIONAL UNION FOR GENERIC RELOCATION MAPS *****************************) - -(*** sor *) -coinductive gr_sor: relation3 gr_map gr_map gr_map ≝ -(*** sor_pp *) -| gr_sor_push_bi (f1) (f2) (f) (g1) (g2) (g): - gr_sor f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → gr_sor g1 g2 g -(*** sor_np *) -| gr_sor_next_push (f1) (f2) (f) (g1) (g2) (g): - gr_sor f1 f2 f → ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → gr_sor g1 g2 g -(*** sor_pn *) -| gr_sor_push_next (f1) (f2) (f) (g1) (g2) (g): - gr_sor f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → gr_sor g1 g2 g -(*** sor_nn *) -| gr_sor_next_bi (f1) (f2) (f) (g1) (g2) (g): - gr_sor f1 f2 f → ↑f1 = g1 → ↑f2 = g2 → ↑f = g → gr_sor g1 g2 g -. - -interpretation - "relational union (generic relocation maps)" - 'RUnion f1 f2 f = (gr_sor f1 f2 f). - -(* Basic constructions ******************************************************) - -(*** sor_idem *) -corec lemma gr_sor_idem: - ∀f. f ⋓ f ≘ f. -#f cases (gr_map_split_tl f) #H -[ @(gr_sor_push_bi … H H H) -| @(gr_sor_next_bi … H H H) -] -H // -qed. - -(*** sor_comm *) -corec lemma gr_sor_comm: - ∀f1,f2,f. f1 ⋓ f2 ≘ f → f2 ⋓ f1 ≘ f. -#f1 #f2 #f * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf * * * -g1 -g2 -g -[ @gr_sor_push_bi | @gr_sor_push_next | @gr_sor_next_push | @gr_sor_next_bi ] /2 width=7 by/ -qed-. - -(* Basic inversions *********************************************************) - -(*** sor_inv_ppx *) -lemma gr_sor_inv_push_bi: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → - ∃∃f. f1 ⋓ f2 ≘ f & ⫯f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(*** sor_inv_npx *) -lemma gr_sor_inv_next_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → - ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(*** sor_inv_pnx *) -lemma gr_sor_inv_push_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → - ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(*** sor_inv_nnx *) -lemma gr_sor_inv_next_bi: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → - ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g. -#g1 #g2 #g * -g1 -g2 -g -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct -try (>(eq_inv_gr_push_bi … Hx1) -x1) try (>(eq_inv_gr_next_bi … Hx1) -x1) -try elim (eq_inv_gr_push_next … Hx1) try elim (eq_inv_gr_next_push … Hx1) -try (>(eq_inv_gr_push_bi … Hx2) -x2) try (>(eq_inv_gr_next_bi … Hx2) -x2) -try elim (eq_inv_gr_push_next … Hx2) try elim (eq_inv_gr_next_push … Hx2) -/2 width=3 by ex2_intro/ -qed-. - -(* Advanced inversions ******************************************************) - -(*** sor_inv_ppn *) -lemma gr_sor_inv_push_bi_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥. -#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 -elim (gr_sor_inv_push_bi … H … H1 H2) -g1 -g2 #x #_ #H destruct -/2 width=3 by eq_inv_gr_push_next/ -qed-. - -(*** sor_inv_nxp *) -lemma gr_sor_inv_next_sn_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥. -#g1 #g2 #g #H #f1 #f #H1 #H0 -elim (gr_map_split_tl g2) #H2 -[ elim (gr_sor_inv_next_push … H … H1 H2) -| elim (gr_sor_inv_next_bi … H … H1 H2) -] -g1 #x #H -/2 width=3 by eq_inv_gr_next_push/ -qed-. - -(*** sor_inv_xnp *) -lemma gr_sor_inv_next_dx_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f2,f. ↑f2 = g2 → ⫯f = g → ⊥. -#g1 #g2 #g #H #f2 #f #H2 #H0 -elim (gr_map_split_tl g1) #H1 -[ elim (gr_sor_inv_push_next … H … H1 H2) -| elim (gr_sor_inv_next_bi … H … H1 H2) -] -g2 #x #H -/2 width=3 by eq_inv_gr_next_push/ -qed-. - -(*** sor_inv_ppp *) -lemma gr_sor_inv_push_bi_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⋓ f2 ≘ f. -#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 -elim (gr_sor_inv_push_bi … H … H1 H2) -g1 -g2 #x #Hx #H destruct -<(eq_inv_gr_push_bi … H) -f // -qed-. - -(*** sor_inv_npn *) -lemma gr_sor_inv_next_push_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f2,f. ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f. -#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 -elim (gr_sor_inv_next_push … H … H1 H2) -g1 -g2 #x #Hx #H destruct -<(eq_inv_gr_next_bi … H) -f // -qed-. - -(*** sor_inv_pnn *) -lemma gr_sor_inv_push_next_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f. -#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 -elim (gr_sor_inv_push_next … H … H1 H2) -g1 -g2 #x #Hx #H destruct -<(eq_inv_gr_next_bi … H) -f // -qed-. - -(*** sor_inv_nnn *) -lemma gr_sor_inv_next_bi_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f2,f. ↑f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f. -#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 -elim (gr_sor_inv_next_bi … H … H1 H2) -g1 -g2 #x #Hx #H destruct -<(eq_inv_gr_next_bi … H) -f // -qed-. - -(*** sor_inv_pxp *) -lemma gr_sor_inv_push_sn_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f. ⫯f1 = g1 → ⫯f = g → - ∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2. -#g1 #g2 #g #H #f1 #f #H1 #H0 -elim (gr_map_split_tl g2) #H2 -[ /3 width=7 by gr_sor_inv_push_bi_push, ex2_intro/ -| elim (gr_sor_inv_next_dx_push … H … H2 H0) -] -qed-. - -(*** sor_inv_xpp *) -lemma gr_sor_inv_push_dx_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f2,f. ⫯f2 = g2 → ⫯f = g → - ∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1. -#g1 #g2 #g #H #f2 #f #H2 #H0 -elim (gr_map_split_tl g1) #H1 -[ /3 width=7 by gr_sor_inv_push_bi_push, ex2_intro/ -| elim (gr_sor_inv_next_sn_push … H … H1 H0) -] -qed-. - -(*** sor_inv_pxn *) -lemma gr_sor_inv_push_sn_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f. ⫯f1 = g1 → ↑f = g → - ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2. -#g1 #g2 #g #H #f1 #f #H1 #H0 -elim (gr_map_split_tl g2) #H2 -[ elim (gr_sor_inv_push_bi_next … H … H1 H2 H0) -| /3 width=7 by gr_sor_inv_push_next_next, ex2_intro/ -] -qed-. - -(*** sor_inv_xpn *) -lemma gr_sor_inv_push_dx_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f2,f. ⫯f2 = g2 → ↑f = g → - ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1. -#g1 #g2 #g #H #f2 #f #H2 #H0 -elim (gr_map_split_tl g1) #H1 -[ elim (gr_sor_inv_push_bi_next … H … H1 H2 H0) -| /3 width=7 by gr_sor_inv_next_push_next, ex2_intro/ -] -qed-. - -(*** sor_inv_xxp *) -lemma gr_sor_inv_push: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ⫯f = g → - ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2. -#g1 #g2 #g #H #f #H0 -elim (gr_map_split_tl g1) #H1 -[ elim (gr_sor_inv_push_sn_push … H … H1 H0) -g /2 width=5 by ex3_2_intro/ -| elim (gr_sor_inv_next_sn_push … H … H1 H0) -] -qed-. - -(*** sor_inv_nxn *) -lemma gr_sor_inv_next_sn_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f1,f. ↑f1 = g1 → ↑f = g → - ∨∨ ∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2 - | ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2. -#g1 #g2 elim (gr_map_split_tl g2) -/4 width=7 by gr_sor_inv_next_push_next, gr_sor_inv_next_bi_next, ex2_intro, or_intror, or_introl/ -qed-. - -(*** sor_inv_xnn *) -lemma gr_sor_inv_next_dx_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → - ∀f2,f. ↑f2 = g2 → ↑f = g → - ∨∨ ∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1 - | ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1. -#g1 elim (gr_map_split_tl g1) -/4 width=7 by gr_sor_inv_push_next_next, gr_sor_inv_next_bi_next, ex2_intro, or_intror, or_introl/ -qed-. - -(*** sor_inv_xxn *) -lemma gr_sor_inv_next: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g → - ∨∨ ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫯f2 = g2 - | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2 - | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ↑f2 = g2. -#g1 #g2 #g #H #f #H0 -elim (gr_map_split_tl g1) #H1 -[ elim (gr_sor_inv_push_sn_next … H … H1 H0) -g - /3 width=5 by or3_intro1, ex3_2_intro/ -| elim (gr_sor_inv_next_sn_next … H … H1 H0) -g * - /3 width=5 by or3_intro0, or3_intro2, ex3_2_intro/ -] -qed-. - -(* Constructions with gr_tl *************************************************) - -(*** sor_tl *) -lemma gr_sor_tl: - ∀f1,f2,f. f1 ⋓ f2 ≘ f → ⫰f1 ⋓ ⫰f2 ≘ ⫰f. -#f1 cases (gr_map_split_tl f1) #H1 -#f2 cases (gr_map_split_tl f2) #H2 -#f #Hf -[ cases (gr_sor_inv_push_bi … Hf … H1 H2) -| cases (gr_sor_inv_push_next … Hf … H1 H2) -| cases (gr_sor_inv_next_push … Hf … H1 H2) -| cases (gr_sor_inv_next_bi … Hf … H1 H2) -] -Hf #g #Hg #H destruct // -qed. - -(*** sor_xxn_tl *) -lemma gr_sor_next_tl: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g → - (∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫰g2 = f2) ∨ - (∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫰g1 = f1 & ↑f2 = g2). -#g1 #g2 #g #H #f #H0 elim (gr_sor_inv_next … H … H0) -H -H0 * -/3 width=5 by ex3_2_intro, or_introl, or_intror/ -qed-. - -(*** sor_xnx_tl *) -lemma gr_sor_next_dx_tl: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f2. ↑f2 = g2 → - ∃∃f1,f. f1 ⋓ f2 ≘ f & ⫰g1 = f1 & ↑f = g. -#g1 elim (gr_map_split_tl g1) #H1 #g2 #g #H #f2 #H2 -[ elim (gr_sor_inv_push_next … H … H1 H2) -| elim (gr_sor_inv_next_bi … H … H1 H2) -] -g2 -/3 width=5 by ex3_2_intro/ -qed-. - -(*** sor_nxx_tl *) -lemma gr_sor_next_sn_tl: - ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1. ↑f1 = g1 → - ∃∃f2,f. f1 ⋓ f2 ≘ f & ⫰g2 = f2 & ↑f = g. -#g1 #g2 elim (gr_map_split_tl g2) #H2 #g #H #f1 #H1 -[ elim (gr_sor_inv_next_push … H … H1 H2) -| elim (gr_sor_inv_next_bi … H … H1 H2) -] -g1 -/3 width=5 by ex3_2_intro/ -qed-. - -(* Inversions with gr_tl ****************************************************) - -(*** sor_inv_tl_sn *) -lemma gr_sor_inv_tl_sn: - ∀f1,f2,f. ⫰f1 ⋓ f2 ≘ f → f1 ⋓ ↑f2 ≘ ↑f. -#f1 #f2 #f elim (gr_map_split_tl f1) -/2 width=7 by gr_sor_push_next, gr_sor_next_bi/ -qed-. - -(*** sor_inv_tl_dx *) -lemma gr_sor_inv_tl_dx: - ∀f1,f2,f. f1 ⋓ ⫰f2 ≘ f → ↑f1 ⋓ f2 ≘ ↑f. -#f1 #f2 #f elim (gr_map_split_tl f2) -/2 width=7 by gr_sor_next_push, gr_sor_next_bi/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_coafter_ist_isf.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_coafter_ist_isf.ma deleted file mode 100644 index 89b457fe1..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_coafter_ist_isf.ma +++ /dev/null @@ -1,76 +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/relocation/gr_isf.ma". -include "ground/relocation/gr_coafter_isi.ma". -include "ground/relocation/gr_coafter_ist_isi.ma". -include "ground/relocation/gr_sor_isi.ma". - -(* RELATIONAL UNION FOR GENERIC RELOCATION MAPS *****************************) - -(* Constructions with gr_coafter and gr_ist and gr_isf **********************) - -(*** coafter_sor *) -lemma gr_sor_coafter_dx_tans: - ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀f1a,f1b. f1a ⋓ f1b ≘ f1 → - ∃∃fa,fb. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & fa ⋓ fb ≘ f. -@gr_isf_ind -[ #f #Hf #f2 #Hf2 #f1 #Hf #f1a #f1b #Hf1 - lapply (gr_coafter_des_ist_sn_isi … Hf ??) -Hf // #H2f1 - elim (gr_sor_inv_isi … Hf1) -Hf1 // - /3 width=5 by gr_coafter_isi_dx, gr_sor_idem, ex3_2_intro/ -| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2 - elim (gr_coafter_inv_push … H1) -H1 [1,3: * |*: // ] - [ #g2 #g1 #Hf #Hgf2 #Hgf1 - elim (gr_sor_inv_push … H2) -H2 [ |*: // ] #ga #gb #Hg1 - lapply (gr_ist_inv_push … Hf2 … Hgf2) -Hf2 #Hg2 - elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2 - /3 width=11 by gr_coafter_refl, gr_sor_push_bi, ex3_2_intro/ - | #g2 #Hf #Hgf2 - lapply (gr_ist_inv_next … Hf2 … Hgf2) -Hf2 #Hg2 - elim (IH … Hf … H2) // -f1 -IH -Hg2 - /3 width=11 by gr_coafter_next, gr_sor_push_bi, ex3_2_intro/ - ] -| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2 - elim (gr_coafter_inv_next … H1) -H1 [ |*: // ] #g2 #g1 #Hf #Hgf2 #Hgf1 - lapply (gr_ist_inv_push … Hf2 … Hgf2) -Hf2 #Hg2 - elim (gr_sor_inv_next … H2) -H2 [1,3,4: * |*: // ] #ga #gb #Hg1 - elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2 - /3 width=11 by gr_coafter_refl, gr_coafter_push, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi, ex3_2_intro/ -] -qed-. - -(*** coafter_inv_sor *) -lemma gr_sor_coafter_div: - ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀fa,fb. fa ⋓ fb ≘ f → - ∃∃f1a,f1b. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & f1a ⋓ f1b ≘ f1. -@gr_isf_ind -[ #f #Hf #f2 #Hf2 #f1 #H1f #fa #fb #H2f - elim (gr_sor_inv_isi … H2f) -H2f // - lapply (gr_coafter_des_ist_sn_isi … H1f ??) -H1f // - /3 width=5 by ex3_2_intro, gr_coafter_isi_dx, gr_sor_isi_bi_isi/ -| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2 - elim (gr_sor_inv_push … H2) -H2 [ |*: // ] #ga #gb #H2f - elim (gr_coafter_inv_push … H1) -H1 [1,3: * |*: // ] #g2 [ #g1 ] #H1f #Hgf2 - [ lapply (gr_ist_inv_push … Hf2 … Hgf2) | lapply (gr_ist_inv_next … Hf2 … Hgf2) ] -Hf2 #Hg2 - elim (IH … Hg2 … H1f … H2f) -f -Hg2 - /3 width=11 by gr_sor_push_bi, ex3_2_intro, gr_coafter_refl, gr_coafter_next/ -| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2 - elim (gr_coafter_inv_next … H1) -H1 [ |*: // ] #g2 #g1 #H1f #Hgf2 - lapply (gr_ist_inv_push … Hf2 … Hgf2) -Hf2 #Hg2 - elim (gr_sor_inv_next … H2) -H2 [1,3,4: * |*: // ] #ga #gb #H2f - elim (IH … Hg2 … H1f … H2f) -f -Hg2 - /3 width=11 by gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi, ex3_2_intro, gr_coafter_refl, gr_coafter_push/ -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_eq.ma deleted file mode 100644 index 96bf535f8..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_eq.ma +++ /dev/null @@ -1,65 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "ground/relocation/gr_tl_eq.ma". -include "ground/relocation/gr_sor.ma". - -(* RELATIONAL UNION FOR GENERIC RELOCATION MAPS *****************************) - -(* Constructions with gr_eq *************************************************) - -(*** sor_eq_repl_back1 *) -corec lemma gr_sor_eq_repl_back_sn: - ∀f2,f. gr_eq_repl_back … (λf1. f1 ⋓ f2 ≘ f). -#f2 #f #f1 * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx -try cases (gr_eq_inv_push_sn … Hx … H1) try cases (gr_eq_inv_next_sn … Hx … H1) -g1 -/3 width=7 by gr_sor_push_bi, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi/ -qed-. - -(*** sor_eq_repl_fwd1 *) -lemma gr_sor_eq_repl_fwd_sn: - ∀f2,f. gr_eq_repl_fwd … (λf1. f1 ⋓ f2 ≘ f). -#f2 #f @gr_eq_repl_sym /2 width=3 by gr_sor_eq_repl_back_sn/ -qed-. - -(*** sor_eq_repl_back2 *) -corec lemma gr_sor_eq_repl_back_dx: - ∀f1,f. gr_eq_repl_back … (λf2. f1 ⋓ f2 ≘ f). -#f1 #f #f2 * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx -try cases (gr_eq_inv_push_sn … Hx … H2) try cases (gr_eq_inv_next_sn … Hx … H2) -g2 -/3 width=7 by gr_sor_push_bi, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi/ -qed-. - -(*** sor_eq_repl_fwd2 *) -lemma gr_sor_eq_repl_fwd_dx: - ∀f1,f. gr_eq_repl_fwd … (λf2. f1 ⋓ f2 ≘ f). -#f1 #f @gr_eq_repl_sym /2 width=3 by gr_sor_eq_repl_back_dx/ -qed-. - -(*** sor_eq_repl_back3 *) -corec lemma gr_sor_eq_repl_back: - ∀f1,f2. gr_eq_repl_back … (λf. f1 ⋓ f2 ≘ f). -#f1 #f2 #f * -f1 -f2 -f -#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx -try cases (gr_eq_inv_push_sn … Hx … H0) try cases (gr_eq_inv_next_sn … Hx … H0) -g -/3 width=7 by gr_sor_push_bi, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi/ -qed-. - -(*** sor_eq_repl_fwd3 *) -lemma gr_sor_eq_repl_fwd: - ∀f1,f2. gr_eq_repl_fwd … (λf. f1 ⋓ f2 ≘ f). -#f1 #f2 @gr_eq_repl_sym /2 width=3 by gr_sor_eq_repl_back/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_fcla.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_fcla.ma deleted file mode 100644 index 3540561b2..000000000 --- a/matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_fcla.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 "ground/xoa/ex_3_1.ma". -include "ground/xoa/ex_4_2.ma". -include "ground/arith/nat_plus.ma". -include "ground/arith/nat_le_max.ma". -include "ground/relocation/gr_fcla_eq.ma". -include "ground/relocation/gr_sor_isi.ma". - -(* RELATIONAL UNION FOR GENERIC RELOCATION MAPS *****************************) - -(* Constructions with gr_fcla ***********************************************) - -(*** sor_fcla_ex *) -lemma gr_sor_fcla_bi: - ∀f1,n1. 𝐂❪f1❫ ≘ n1 → ∀f2,n2. 𝐂❪f2❫ ≘ n2 → - ∃∃f,n. f1 ⋓ f2 ≘ f & 𝐂❪f❫ ≘ n & (n1 ∨ n2) ≤ n & n ≤ n1 + n2. -#f1 #n1 #Hf1 elim Hf1 -f1 -n1 /3 width=6 by gr_sor_isi_sn, ex4_2_intro/ -#f1 #n1 #Hf1 #IH #f2 #n2 * -f2 -n2 /3 width=6 by gr_fcla_push, gr_fcla_next, ex4_2_intro, gr_sor_isi_dx/ -#f2 #n2 #Hf2 elim (IH … Hf2) -IH -Hf2 -Hf1 [2,4: #f #n (eq_inv_pr_push_bi … Hx1) >(eq_inv_pr_push_bi … Hx2) -x2 -x1 + /2 width=3 by ex2_intro/ +| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct + elim (eq_inv_pr_push_next … Hx2) +| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct + elim (eq_inv_pr_push_next … Hx1) +] +qed-. + +(*** after_inv_pnx *) +lemma pr_after_inv_push_next: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → + ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g. +#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 +[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct + elim (eq_inv_pr_next_push … Hx2) +| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct + >(eq_inv_pr_push_bi … Hx1) >(eq_inv_pr_next_bi … Hx2) -x2 -x1 + /2 width=3 by ex2_intro/ +| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct + elim (eq_inv_pr_push_next … Hx1) +] +qed-. + +(*** after_inv_nxx *) +lemma pr_after_inv_next_sn: + ∀g1,f2,g. g1 ⊚ f2 ≘ g → ∀f1. ↑f1 = g1 → + ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g. +#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1 +[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct + elim (eq_inv_pr_next_push … Hx1) +| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct + elim (eq_inv_pr_next_push … Hx1) +| #g #Hf #H1 #H #x1 #Hx1 destruct + >(eq_inv_pr_next_bi … Hx1) -x1 + /2 width=3 by ex2_intro/ +] +qed-. + +(* Advanced inversions ******************************************************) + +(*** after_inv_ppp *) +lemma pr_after_inv_push_bi_push: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⊚ f2 ≘ f. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (pr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 +#x #Hf #Hx destruct <(eq_inv_pr_push_bi … Hx) -f // +qed-. + +(*** after_inv_ppn *) +lemma pr_after_inv_push_bi_next: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (pr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 +#x #Hf #Hx destruct elim (eq_inv_pr_push_next … Hx) +qed-. + +(*** after_inv_pnn *) +lemma pr_after_inv_push_next_next: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⊚ f2 ≘ f. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (pr_after_inv_push_next … Hg … H1 H2) -g1 -g2 +#x #Hf #Hx destruct <(eq_inv_pr_next_bi … Hx) -f // +qed-. + +(*** after_inv_pnp *) +lemma pr_after_inv_push_next_push: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (pr_after_inv_push_next … Hg … H1 H2) -g1 -g2 +#x #Hf #Hx destruct elim (eq_inv_pr_next_push … Hx) +qed-. + +(*** after_inv_nxn *) +lemma pr_after_inv_next_sn_next: + ∀g1,f2,g. g1 ⊚ f2 ≘ g → + ∀f1,f. ↑f1 = g1 → ↑f = g → f1 ⊚ f2 ≘ f. +#g1 #f2 #g #Hg #f1 #f #H1 #H elim (pr_after_inv_next_sn … Hg … H1) -g1 +#x #Hf #Hx destruct <(eq_inv_pr_next_bi … Hx) -f // +qed-. + +(*** after_inv_nxp *) +lemma pr_after_inv_next_sn_push: + ∀g1,f2,g. g1 ⊚ f2 ≘ g → + ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥. +#g1 #f2 #g #Hg #f1 #f #H1 #H elim (pr_after_inv_next_sn … Hg … H1) -g1 +#x #Hf #Hx destruct elim (eq_inv_pr_next_push … Hx) +qed-. + +(*** after_inv_pxp *) +lemma pr_after_inv_push_sn_push: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → + ∀f1,f. ⫯f1 = g1 → ⫯f = g → + ∃∃f2. f1 ⊚ f2 ≘ f & ⫯f2 = g2. +#g1 #g2 elim (pr_map_split_tl g2) +#Hg2 #g #Hg #f1 #f #H1 #H +[ lapply (pr_after_inv_push_bi_push … Hg … H1 … H) -g1 -g + /2 width=3 by ex2_intro/ +| elim (pr_after_inv_push_next_push … Hg … H1 … H) -g1 -g -f1 -f // +] +qed-. + +(*** after_inv_pxn *) +lemma pr_after_inv_push_sn_next: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → + ∀f1,f. ⫯f1 = g1 → ↑f = g → + ∃∃f2. f1 ⊚ f2 ≘ f & ↑f2 = g2. +#g1 #g2 elim (pr_map_split_tl g2) +#Hg2 #g #Hg #f1 #f #H1 #H +[ elim (pr_after_inv_push_bi_next … Hg … H1 … H) -g1 -g -f1 -f // +| lapply (pr_after_inv_push_next_next … Hg … H1 … H) -g1 -g + /2 width=3 by ex2_intro/ +] +qed-. + +(*** after_inv_xxp *) +lemma pr_after_inv_push: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ⫯f = g → + ∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2. +#g1 elim (pr_map_split_tl g1) +#Hg1 #g2 #g #Hg #f #H +[ elim (pr_after_inv_push_sn_push … Hg … H) -g /2 width=5 by ex3_2_intro/ +| elim (pr_after_inv_next_sn_push … Hg … H) -g2 -g -f // +] +qed-. + +(*** after_inv_xxn *) +lemma pr_after_inv_next: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ↑f = g → + ∨∨ ∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2 + | ∃∃f1. f1 ⊚ g2 ≘ f & ↑f1 = g1. +#g1 elim (pr_map_split_tl g1) +#Hg1 #g2 #g #Hg #f #H +[ elim (pr_after_inv_push_sn_next … Hg … H) -g + /3 width=5 by or_introl, ex3_2_intro/ +| /4 width=5 by pr_after_inv_next_sn_next, or_intror, ex2_intro/ +] +qed-. + +(*** after_inv_pxx *) +lemma pr_after_inv_push_sn: + ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 → + ∨∨ ∃∃f2,f. f1 ⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g + | ∃∃f2,f. f1 ⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g. +#g1 #g2 elim (pr_map_split_tl g2) +#Hg2 #g #Hg #f1 #H +[ elim (pr_after_inv_push_bi … Hg … H) -g1 + /3 width=5 by or_introl, ex3_2_intro/ +| elim (pr_after_inv_push_next … Hg … H) -g1 + /3 width=5 by or_intror, ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_after.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_after.ma new file mode 100644 index 000000000..c048ec402 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_after.ma @@ -0,0 +1,90 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_after_eq.ma". + +(* RELATIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************) + +(* Main constructions *******************************************************) + +(*** after_trans1 *) +corec theorem pr_after_trans_sn: + ∀f0,f3,f4. f0 ⊚ f3 ≘ f4 → + ∀f1,f2. f1 ⊚ f2 ≘ f0 → + ∀f. f2 ⊚ f3 ≘ f → f1 ⊚ f ≘ f4. +#f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4 +[ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg + cases (pr_after_inv_push … Hg0 … H0) -g0 + #f1 #f2 #Hf0 #H1 #H2 + cases (pr_after_inv_push_bi … Hg … H2 H3) -g2 -g3 + #f #Hf #H /3 width=7 by pr_after_refl/ +| #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg + cases (pr_after_inv_push … Hg0 … H0) -g0 + #f1 #f2 #Hf0 #H1 #H2 + cases (pr_after_inv_push_next … Hg … H2 H3) -g2 -g3 + #f #Hf #H /3 width=7 by pr_after_push/ +| #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg + cases (pr_after_inv_next … Hg0 … H0) -g0 * + [ #f1 #f2 #Hf0 #H1 #H2 + cases (pr_after_inv_next_sn … Hg … H2) -g2 + #f #Hf #H /3 width=7 by pr_after_push/ + | #f1 #Hf0 #H1 /3 width=6 by pr_after_next/ + ] +] +qed-. + +(*** after_trans2 *) +corec theorem pr_after_trans_dx: + ∀f1,f0,f4. f1 ⊚ f0 ≘ f4 → + ∀f2, f3. f2 ⊚ f3 ≘ f0 → + ∀f. f1 ⊚ f2 ≘ f → f ⊚ f3 ≘ f4. +#f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4 +[ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg + cases (pr_after_inv_push … Hg0 … H0) -g0 + #f2 #f3 #Hf0 #H2 #H3 + cases (pr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 + #f #Hf #H /3 width=7 by pr_after_refl/ +| #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg + cases (pr_after_inv_next … Hg0 … H0) -g0 * + [ #f2 #f3 #Hf0 #H2 #H3 + cases (pr_after_inv_push_bi … Hg … H1 H2) -g1 -g2 + #f #Hf #H /3 width=7 by pr_after_push/ + | #f2 #Hf0 #H2 + cases (pr_after_inv_push_next … Hg … H1 H2) -g1 -g2 + #f #Hf #H /3 width=6 by pr_after_next/ + ] +| #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg + cases (pr_after_inv_next_sn … Hg … H1) -g1 + #f #Hg #H /3 width=6 by pr_after_next/ +] +qed-. + +(* Main inversions **********************************************************) + +(*** after_mono *) +corec theorem pr_after_mono: + ∀f1,f2,x,y. f1 ⊚ f2 ≘ x → f1 ⊚ f2 ≘ y → x ≡ y. +#f1 #f2 #x #y * -f1 -f2 -x +#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy +[ cases (pr_after_inv_push_bi … Hy … H1 H2) -g1 -g2 /3 width=8 by pr_eq_push/ +| cases (pr_after_inv_push_next … Hy … H1 H2) -g1 -g2 /3 width=8 by pr_eq_next/ +| cases (pr_after_inv_next_sn … Hy … H1) -g1 /3 width=8 by pr_eq_next/ +] +qed-. + +(*** after_mono_eq *) +lemma pr_after_mono_eq: + ∀f1,f2,f. f1 ⊚ f2 ≘ f → ∀g1,g2,g. g1 ⊚ g2 ≘ g → + f1 ≡ g1 → f2 ≡ g2 → f ≡ g. +/4 width=4 by pr_after_mono, pr_after_eq_repl_back_dx, pr_after_eq_repl_back_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_after_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_after_ist.ma new file mode 100644 index 000000000..8a0152682 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_after_ist.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 "ground/arith/nat_pred_succ.ma". +include "ground/relocation/pr_pat_tls.ma". +include "ground/relocation/pr_ist_tls.ma". +include "ground/relocation/pr_after_pat_tls.ma". + +(* RELATIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************) + +(*** H_after_inj *) +definition H_pr_after_inj: predicate pr_map ≝ + λf1. 𝐓❪f1❫ → + ∀f,f21,f22. f1 ⊚ f21 ≘ f → f1 ⊚ f22 ≘ f → f21 ≡ f22. + +(* Main destructions with pr_ist ********************************************) + +(*** after_inj_O_aux *) +corec fact pr_after_inj_unit_aux: + ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_after_inj f1. +#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f +cases (pr_pat_inv_unit_bi … H1f1) -H1f1 [|*: // ] #g1 #H1 +lapply (pr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1 +cases (H2g1 (𝟏)) #p #Hp +cases (pr_after_inv_push_sn … H1f … H1) -H1f * #g21 #g #H1g #H21 #H +[ cases (pr_after_inv_push_sn_push … H2f … H1 H) -f1 -f #g22 #H2g #H22 + @(pr_eq_push … H21 H22) -f21 -f22 +| cases (pr_after_inv_push_sn_next … H2f … H1 H) -f1 -f #g22 #H2g #H22 + @(pr_eq_next … H21 H22) -f21 -f22 +] +@(pr_after_inj_unit_aux (⫰*[↓p]g1) … (⫰*[↓p]g)) -pr_after_inj_unit_aux +/2 width=1 by pr_after_tls_sn_tls, pr_ist_tls, pr_pat_unit_succ_tls/ +qed-. + +(*** after_inj_aux *) +fact pr_after_inj_aux: + (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_after_inj f1) → + ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_pr_after_inj f1. +#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 +#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f +elim (pr_pat_inv_unit_succ … H1f1) -H1f1 [|*: // ] #g1 #H1g1 #H1 +elim (pr_after_inv_next_sn … H1f … H1) -H1f #g #H1g #H +lapply (pr_after_inv_next_sn_next … H2f … H1 H) -f #H2g +/3 width=6 by pr_ist_inv_next/ +qed-. + +(*** after_inj *) +theorem pr_after_inj: + ∀f1. H_pr_after_inj f1. +#f1 #H cases (H (𝟏)) +/3 width=7 by pr_after_inj_aux, pr_after_inj_unit_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_basic.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_basic.ma new file mode 100644 index 000000000..b64889f4a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_after_basic.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 "ground/arith/nat_le_pred.ma". +include "ground/relocation/pr_basic.ma". +include "ground/relocation/pr_after_uni.ma". + +(* RELATIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************) + +(* Constructions with pr_basic **********************************************) + +(*** after_basic_rc *) +lemma after_basic_rc (d2) (d1): + d1 ≤ d2 → ∀h2,h1.d2 ≤ h1+d1 → 𝐛❨d2,h2❩ ⊚ 𝐛❨d1,h1❩ ≘ 𝐛❨d1,h1+h2❩. +#d2 #d1 @(nat_ind_2_succ … d2 d1) -d2 -d1 +[ #d1 #H #h2 #h1 #_ + <(nle_inv_zero_dx … H) -d1 // +| #d2 #IH #_ #h2 #h1 Hh1 -Hh1 nsucc_inj + elim (pr_pat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ] + [ #g2 #j1 #Hg2 #H1 #H2 destruct >nsucc_inj in Hf; #Hf + elim (pr_after_inv_push_next … Hf) -Hf [ |*: // ] #g #Hg #H destruct + nsucc_inj #Hf + elim (pr_after_inv_next_sn … Hf) -Hf [2,3: // ] #g #Hg #H destruct + elim (pr_pat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ] + [ #g2 #j1 #Hg2 #H1 #H2 destruct pr_pushs_succ // +qed. + +(*** at_basic_zero_succ *) +lemma pr_basic_zero_succ (h): ↑𝐛❨𝟎,h❩ = 𝐛❨𝟎,↑h❩. +#h >pr_nexts_succ // +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter.ma new file mode 100644 index 000000000..ec02fea5c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter.ma @@ -0,0 +1,238 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/relations/rcoafter_3.ma". +include "ground/xoa/ex_3_2.ma". +include "ground/relocation/pr_tl.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(*** coafter *) +coinductive pr_coafter: relation3 pr_map pr_map pr_map ≝ +(*** coafter_refl *) +| pr_coafter_refl (f1) (f2) (f) (g1) (g2) (g): + pr_coafter f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → pr_coafter g1 g2 g +(*** coafter_push *) +| pr_coafter_push (f1) (f2) (f) (g1) (g2) (g): + pr_coafter f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → pr_coafter g1 g2 g +(*** coafter_next *) +| pr_coafter_next (f1) (f2) (f) (g1) (g): + pr_coafter f1 f2 f → ↑f1 = g1 → ⫯f = g → pr_coafter g1 f2 g +. + +interpretation + "relational co-composition (partial relocation maps)" + 'RCoAfter f1 f2 f = (pr_coafter f1 f2 f). + +(* Basic inversions *********************************************************) + +(*** coafter_inv_ppx *) +lemma pr_coafter_inv_push_bi: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → + ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g. +#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 +[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct + >(eq_inv_pr_push_bi … Hx1) >(eq_inv_pr_push_bi … Hx2) -x2 -x1 + /2 width=3 by ex2_intro/ +| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct + elim (eq_inv_pr_push_next … Hx2) +| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct + elim (eq_inv_pr_push_next … Hx1) +] +qed-. + +(*** coafter_inv_pnx *) +lemma pr_coafter_inv_push_next: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → + ∃∃f. f1 ~⊚ f2 ≘ f & ↑f = g. +#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1 +[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct + elim (eq_inv_pr_next_push … Hx2) +| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct + >(eq_inv_pr_push_bi … Hx1) >(eq_inv_pr_next_bi … Hx2) -x2 -x1 + /2 width=3 by ex2_intro/ +| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct + elim (eq_inv_pr_push_next … Hx1) +] +qed-. + +(*** coafter_inv_nxx *) +lemma pr_coafter_inv_next_sn: + ∀g1,f2,g. g1 ~⊚ f2 ≘ g → ∀f1. ↑f1 = g1 → + ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g. +#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1 +[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct + elim (eq_inv_pr_next_push … Hx1) +| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct + elim (eq_inv_pr_next_push … Hx1) +| #g #Hf #H1 #H #x1 #Hx1 destruct + >(eq_inv_pr_next_bi … Hx1) -x1 + /2 width=3 by ex2_intro/ +] +qed-. + +(* Advanced inversions ******************************************************) + +(*** coafter_inv_ppp *) +lemma pr_coafter_inv_push_bi_push: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ~⊚ f2 ≘ f. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H +elim (pr_coafter_inv_push_bi … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct +<(eq_inv_pr_push_bi … Hx) -f // +qed-. + +(*** coafter_inv_ppn *) +lemma pr_coafter_inv_push_bi_next: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H +elim (pr_coafter_inv_push_bi … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct +elim (eq_inv_pr_push_next … Hx) +qed-. + +(*** coafter_inv_pnn *) +lemma pr_coafter_inv_push_next_next: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ~⊚ f2 ≘ f. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H +elim (pr_coafter_inv_push_next … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct +<(eq_inv_pr_next_bi … Hx) -f // +qed-. + +(*** coafter_inv_pnp *) +lemma pr_coafter_inv_push_next_push: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥. +#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H +elim (pr_coafter_inv_push_next … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct +elim (eq_inv_pr_next_push … Hx) +qed-. + +(*** coafter_inv_nxp *) +lemma pr_coafter_inv_next_sn_push: + ∀g1,f2,g. g1 ~⊚ f2 ≘ g → + ∀f1,f. ↑f1 = g1 → ⫯f = g → f1 ~⊚ f2 ≘ f. +#g1 #f2 #g #Hg #f1 #f #H1 #H +elim (pr_coafter_inv_next_sn … Hg … H1) -g1 #x #Hf #Hx destruct +<(eq_inv_pr_push_bi … Hx) -f // +qed-. + +(*** coafter_inv_nxn *) +lemma pr_coafter_inv_next_sn_next: + ∀g1,f2,g. g1 ~⊚ f2 ≘ g → + ∀f1,f. ↑f1 = g1 → ↑f = g → ⊥. +#g1 #f2 #g #Hg #f1 #f #H1 #H +elim (pr_coafter_inv_next_sn … Hg … H1) -g1 #x #Hf #Hx destruct +elim (eq_inv_pr_push_next … Hx) +qed-. + +(*** coafter_inv_pxp *) +lemma pr_coafter_inv_push_sn_push: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f1,f. ⫯f1 = g1 → ⫯f = g → + ∃∃f2. f1 ~⊚ f2 ≘ f & ⫯f2 = g2. +#g1 #g2 #g #Hg #f1 #f #H1 #H +elim (pr_map_split_tl g2) #H2 +[ lapply (pr_coafter_inv_push_bi_push … Hg … H1 H2 H) -g1 -g + /2 width=3 by ex2_intro/ +| elim (pr_coafter_inv_push_next_push … Hg … H1 H2 H) +] +qed-. + +(*** coafter_inv_pxn *) +lemma pr_coafter_inv_push_sn_next: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f1,f. ⫯f1 = g1 → ↑f = g → + ∃∃f2. f1 ~⊚ f2 ≘ f & ↑f2 = g2. +#g1 #g2 #g #Hg #f1 #f #H1 #H +elim (pr_map_split_tl g2) #H2 +[ elim (pr_coafter_inv_push_bi_next … Hg … H1 H2 H) +| lapply (pr_coafter_inv_push_next_next … Hg … H1 … H) -g1 -g + /2 width=3 by ex2_intro/ +] +qed-. + +(*** coafter_inv_xxn *) +lemma pr_coafter_inv_next: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ↑f = g → + ∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2. +#g1 #g2 #g #Hg #f #H +elim (pr_map_split_tl g1) #H1 +[ elim (pr_coafter_inv_push_sn_next … Hg … H1 H) -g + /2 width=5 by ex3_2_intro/ +| elim (pr_coafter_inv_next_sn_next … Hg … H1 H) +] +qed-. + +(*** coafter_inv_xnn *) +lemma pr_coafter_inv_next_dx_next: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + ∀f2,f. ↑f2 = g2 → ↑f = g → + ∃∃f1. f1 ~⊚ f2 ≘ f & ⫯f1 = g1. +#g1 #g2 #g #Hg #f2 #f #H2 destruct #H +elim (pr_coafter_inv_next … Hg … H) -g #z1 #z2 #Hf #H1 #H2 destruct +/2 width=3 by ex2_intro/ +qed-. + +(*** coafter_inv_xxp *) +lemma pr_coafter_inv_push: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ⫯f = g → + ∨∨ ∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2 + | ∃∃f1. f1 ~⊚ g2 ≘ f & ↑f1 = g1. +#g1 #g2 #g #Hg #f #H +elim (pr_map_split_tl g1) #H1 +[ elim (pr_coafter_inv_push_sn_push … Hg … H1 H) -g + /3 width=5 by or_introl, ex3_2_intro/ +| /4 width=5 by pr_coafter_inv_next_sn_push, or_intror, ex2_intro/ +] +qed-. + +(*** coafter_inv_pxx *) +lemma pr_coafter_inv_push_sn: + ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 → + ∨∨ ∃∃f2,f. f1 ~⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g + | ∃∃f2,f. f1 ~⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g. +#g1 #g2 #g #Hg #f1 #H1 +elim (pr_map_split_tl g2) #H2 +[ elim (pr_coafter_inv_push_bi … Hg … H1 H2) -g1 + /3 width=5 by or_introl, ex3_2_intro/ +| elim (pr_coafter_inv_push_next … Hg … H1 H2) -g1 + /3 width=5 by or_intror, ex3_2_intro/ +] +qed-. + +(* Inversions with pr_tl ****************************************************) + +(*** coafter_inv_tl1 *) +lemma pr_coafter_inv_tl_dx: + ∀g2,g1,g. g2 ~⊚ ⫰g1 ≘ g → + ∃∃f. ⫯g2 ~⊚ g1 ≘ f & ⫰f = g. +#g2 #g1 #g +elim (pr_map_split_tl g1) #H1 #H2 +[ /3 width=7 by pr_coafter_refl, ex2_intro/ +| @(ex2_intro … (↑g)) /2 width=7 by pr_coafter_push/ (* * full auto fails *) +] +qed-. + +(*** coafter_inv_tl0 *) +lemma pr_coafter_inv_tl: + ∀g2,g1,g. g2 ~⊚ g1 ≘ ⫰g → + ∃∃f1. ⫯g2 ~⊚ f1 ≘ g & ⫰f1 = g1. +#g2 #g1 #g +elim (pr_map_split_tl g) #H1 #H2 +[ /3 width=7 by pr_coafter_refl, ex2_intro/ +| @(ex2_intro … (↑g1)) /2 width=7 by pr_coafter_push/ (* * full auto fails *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter.ma new file mode 100644 index 000000000..8ac9736a7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter.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 "ground/relocation/pr_coafter_eq.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Main inversions **********************************************************) + +(*** coafter_mono *) +corec theorem pr_coafter_mono: + ∀f1,f2,x,y. f1 ~⊚ f2 ≘ x → f1 ~⊚ f2 ≘ y → x ≡ y. +#f1 #f2 #x #y * -f1 -f2 -x +#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy +[ cases (pr_coafter_inv_push_bi … Hy … H1 H2) -g1 -g2 /3 width=8 by pr_eq_push/ +| cases (pr_coafter_inv_push_next … Hy … H1 H2) -g1 -g2 /3 width=8 by pr_eq_next/ +| cases (pr_coafter_inv_next_sn … Hy … H1) -g1 /3 width=8 by pr_eq_push/ +] +qed-. + +(*** coafter_mono_eq *) +lemma pr_coafter_mono_eq: + ∀f1,f2,f. f1 ~⊚ f2 ≘ f → ∀g1,g2,g. g1 ~⊚ g2 ≘ g → + f1 ≡ g1 → f2 ≡ g2 → f ≡ g. +/4 width=4 by pr_coafter_mono, pr_coafter_eq_repl_back_dx, pr_coafter_eq_repl_back_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter_ist.ma new file mode 100644 index 000000000..13681ff13 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter_ist.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 "ground/relocation/pr_pat_tls.ma". +include "ground/relocation/pr_ist_tls.ma". +include "ground/relocation/pr_coafter_nat_tls.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(*** H_coafter_inj *) +definition H_pr_coafter_inj: predicate pr_map ≝ + λf1. 𝐓❪f1❫ → + ∀f,f21,f22. f1 ~⊚ f21 ≘ f → f1 ~⊚ f22 ≘ f → f21 ≡ f22. + +(* Main destructions with pr_ist ********************************************) + +(*** coafter_inj_O_aux *) +corec fact pr_coafter_inj_unit_aux: + ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_coafter_inj f1. +#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f +cases (pr_pat_inv_unit_bi … H1f1) -H1f1 [ |*: // ] #g1 #H1 +lapply (pr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1 +cases (H2g1 (𝟏)) #n #Hn +cases (pr_coafter_inv_push_sn … H1f … H1) -H1f * #g21 #g #H1g #H21 #H +[ cases (pr_coafter_inv_push_sn_push … H2f … H1 H) -f1 -f #g22 #H2g #H22 + @(pr_eq_push … H21 H22) -f21 -f22 +| cases (pr_coafter_inv_push_sn_next … H2f … H1 H) -f1 -f #g22 #H2g #H22 + @(pr_eq_next … H21 H22) -f21 -f22 +] +@(pr_coafter_inj_unit_aux (⫰*[↓n]g1) … (⫰*[↓n]g)) -pr_coafter_inj_unit_aux +/2 width=1 by pr_coafter_tls_bi_tls, pr_ist_tls, pr_pat_unit_succ_tls/ +qed-. + +(*** coafter_inj_aux *) +fact pr_coafter_inj_aux: + (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_coafter_inj f1) → + ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_pr_coafter_inj f1. +#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 +#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f +elim (pr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1 +elim (pr_coafter_inv_next_sn … H1f … H1) -H1f #g #H1g #H +lapply (pr_coafter_inv_next_sn_push … H2f … H1 H) -f #H2g +/3 width=6 by pr_ist_inv_next/ +qed-. + +(*** coafter_inj *) +theorem pr_coafter_inj: + ∀f1. H_pr_coafter_inj f1. +#f1 #H cases (H (𝟏)) /3 width=7 by pr_coafter_inj_aux, pr_coafter_inj_unit_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_eq.ma new file mode 100644 index 000000000..70edc94bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_eq.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 "ground/relocation/pr_tl_eq.ma". +include "ground/relocation/pr_coafter.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_eq *************************************************) + +(*** coafter_eq_repl_back2 *) +corec lemma pr_coafter_eq_repl_back_sn: + ∀f1,f. pr_eq_repl_back (λf2. f2 ~⊚ f1 ≘ f). +#f1 #f #f2 * -f2 -f1 -f +#f21 #f1 #f #g21 [1,2: #g1 ] #g #Hf #H21 [1,2: #H1 ] #H #g22 #H0 +[ cases (pr_eq_inv_push_sn … H0 … H21) -g21 /3 width=7 by pr_coafter_refl/ +| cases (pr_eq_inv_push_sn … H0 … H21) -g21 /3 width=7 by pr_coafter_push/ +| cases (pr_eq_inv_next_sn … H0 … H21) -g21 /3 width=5 by pr_coafter_next/ +] +qed-. + +(*** coafter_eq_repl_fwd2 *) +lemma pr_coafter_eq_repl_fwd_sn: + ∀f1,f. pr_eq_repl_fwd (λf2. f2 ~⊚ f1 ≘ f). +#f1 #f @pr_eq_repl_sym /2 width=3 by pr_coafter_eq_repl_back_sn/ +qed-. + +(*** coafter_eq_repl_back1 *) +corec lemma pr_coafter_eq_repl_back_dx: + ∀f2,f. pr_eq_repl_back (λf1. f2 ~⊚ f1 ≘ f). +#f2 #f #f1 * -f2 -f1 -f +#f2 #f11 #f #g2 [1,2: #g11 ] #g #Hf #H2 [1,2: #H11 ] #H #g2 #H0 +[ cases (pr_eq_inv_push_sn … H0 … H11) -g11 /3 width=7 by pr_coafter_refl/ +| cases (pr_eq_inv_next_sn … H0 … H11) -g11 /3 width=7 by pr_coafter_push/ +| @(pr_coafter_next … H2 H) /2 width=5 by/ +] +qed-. + +(*** coafter_eq_repl_fwd1 *) +lemma pr_coafter_eq_repl_fwd_dx: + ∀f2,f. pr_eq_repl_fwd (λf1. f2 ~⊚ f1 ≘ f). +#f2 #f @pr_eq_repl_sym /2 width=3 by pr_coafter_eq_repl_back_dx/ +qed-. + +(*** coafter_eq_repl_back0 *) +corec lemma pr_coafter_eq_repl_back: + ∀f1,f2. pr_eq_repl_back (λf. f2 ~⊚ f1 ≘ f). +#f2 #f1 #f * -f2 -f1 -f +#f2 #f1 #f01 #g2 [1,2: #g1 ] #g01 #Hf01 #H2 [1,2: #H1 ] #H01 #g02 #H0 +[ cases (pr_eq_inv_push_sn … H0 … H01) -g01 /3 width=7 by pr_coafter_refl/ +| cases (pr_eq_inv_next_sn … H0 … H01) -g01 /3 width=7 by pr_coafter_push/ +| cases (pr_eq_inv_push_sn … H0 … H01) -g01 /3 width=5 by pr_coafter_next/ +] +qed-. + +(*** coafter_eq_repl_fwd0 *) +lemma pr_coafter_eq_repl_fwd: + ∀f2,f1. pr_eq_repl_fwd (λf. f2 ~⊚ f1 ≘ f). +#f2 #f1 @pr_eq_repl_sym /2 width=3 by pr_coafter_eq_repl_back/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_isi.ma new file mode 100644 index 000000000..c8e71eef9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_isi.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 "ground/relocation/pr_isi_id.ma". +include "ground/relocation/pr_coafter_coafter.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_isi ************************************************) + +(*** coafter_isid_sn *) +corec lemma pr_coafter_isi_sn: + ∀f1. 𝐈❪f1❫ → ∀f2. f1 ~⊚ f2 ≘ f2. +#f1 * -f1 #f1 #g1 #Hf1 #H1 #f2 +cases (pr_map_split_tl f2) #H2 +/3 width=7 by pr_coafter_push, pr_coafter_refl/ +qed. + +(*** coafter_isid_dx *) +corec lemma pr_coafter_isi_dx: + ∀f2,f. 𝐈❪f2❫ → 𝐈❪f❫ → ∀f1. f1 ~⊚ f2 ≘ f. +#f2 #f * -f2 #f2 #g2 #Hf2 #H2 * -f #f #g #Hf #H #f1 +cases (pr_map_split_tl f1) #H1 +[ /3 width=7 by pr_coafter_refl/ +| @(pr_coafter_next … H1 … H) /3 width=3 by pr_isi_push/ +] +qed. + +(* Inversions with pr_isi ***************************************************) + +(*** coafter_isid_inv_sn *) +lemma pr_coafter_isi_inv_sn: + ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f. +/3 width=6 by pr_coafter_isi_sn, pr_coafter_mono/ qed-. + +(*** coafter_isid_inv_dx *) +lemma pr_coafter_isi_inv_dx: + ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f2❫ → 𝐈❪f❫. +/4 width=4 by pr_eq_id_isi, pr_coafter_isi_dx, pr_coafter_mono/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_ist_isf.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_ist_isf.ma new file mode 100644 index 000000000..c3f818592 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_ist_isf.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 "ground/relocation/pr_pat_tls.ma". +include "ground/relocation/pr_isf_tls.ma". +include "ground/relocation/pr_ist_tls.ma". +include "ground/relocation/pr_coafter_nat_tls.ma". +include "ground/relocation/pr_coafter_isi.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(*** H_coafter_isfin2_fwd *) +definition H_pr_coafter_des_ist_isf: predicate pr_map ≝ + λf1. ∀f2. 𝐅❪f2❫ → 𝐓❪f1❫ → ∀f. f1 ~⊚ f2 ≘ f → 𝐅❪f❫. + +(* Destructions with pr_ist and pr_isf **************************************) + +(*** coafter_isfin2_fwd_O_aux *) +fact pr_coafter_des_ist_isf_unit_aux: + ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_coafter_des_ist_isf f1. +#f1 #Hf1 #f2 #H +generalize in match Hf1; generalize in match f1; -f1 +@(pr_isf_ind … H) -f2 +[ /3 width=4 by pr_coafter_isi_inv_dx, pr_isf_isi/ ] +#f2 #_ #IH #f1 #H #Hf1 #f #Hf +elim (pr_pat_inv_unit_bi … H) -H [ |*: // ] #g1 #H1 +lapply (pr_ist_inv_push … Hf1 … H1) -Hf1 #Hg1 +elim (Hg1 (𝟏)) #n #Hn +[ elim (pr_coafter_inv_push_bi … Hf) | elim (pr_coafter_inv_push_next … Hf) +] -Hf [1,6: |*: // ] #g #Hg #H0 destruct +/5 width=6 by pr_isf_next, pr_isf_push, pr_isf_inv_tls, pr_ist_tls, pr_pat_unit_succ_tls, pr_coafter_tls_sn_tls/ +qed-. + +(*** coafter_isfin2_fwd_aux *) +fact pr_coafter_des_ist_isf_aux: + (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_coafter_des_ist_isf f1) → + ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_pr_coafter_des_ist_isf f1. +#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 +#i2 #IH #f1 #H1f1 #f2 #Hf2 #H2f1 #f #Hf +elim (pr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1 +elim (pr_coafter_inv_next_sn … Hf … H1) -Hf #g #Hg #H0 +lapply (IH … Hg1 … Hg) -i2 -Hg +/2 width=4 by pr_ist_inv_next, pr_isf_push/ (* * full auto fails *) +qed-. + +(*** coafter_isfin2_fwd *) +lemma pr_coafter_des_ist_isf: ∀f1. H_pr_coafter_des_ist_isf f1. +#f1 #f2 #Hf2 #Hf1 cases (Hf1 (𝟏)) +/3 width=7 by pr_coafter_des_ist_isf_aux, pr_coafter_des_ist_isf_unit_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_ist_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_ist_isi.ma new file mode 100644 index 000000000..d3dc9e6e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_ist_isi.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 "ground/relocation/pr_pat_tls.ma". +include "ground/relocation/pr_isi_tls.ma". +include "ground/relocation/pr_ist_tls.ma". +include "ground/relocation/pr_coafter_nat_tls.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(*** H_coafter_fwd_isid2 *) +definition H_pr_coafter_des_ist_sn_isi: predicate pr_map ≝ + λf1. ∀f2,f. f1 ~⊚ f2 ≘ f → 𝐓❪f1❫ → 𝐈❪f❫ → 𝐈❪f2❫. + +(* Destructions with pr_ist and pr_isi **************************************) + +(*** coafter_fwd_isid2_O_aux *) +corec fact pr_coafter_des_ist_sn_isi_unit_aux: + ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_coafter_des_ist_sn_isi f1. +#f1 #H1f1 #f2 #f #H #H2f1 #Hf +cases (pr_pat_inv_unit_bi … H1f1) -H1f1 [ |*: // ] #g1 #H1 +lapply (pr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1 +cases (H2g1 (𝟏)) #n #Hn +cases (pr_coafter_inv_push_sn … H … H1) -H * #g2 #g #H #H2 #H0 +[ lapply (pr_isi_inv_push … Hf … H0) -Hf #Hg + @(pr_isi_push … H2) -H2 + /3 width=7 by pr_coafter_tls_sn_tls, pr_pat_unit_succ_tls, pr_ist_tls, pr_isi_tls/ +| cases (pr_isi_inv_next … Hf … H0) +] +qed-. + +(*** coafter_fwd_isid2_aux *) +fact pr_coafter_des_ist_sn_isi_aux: + (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_pr_coafter_des_ist_sn_isi f1) → + ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_pr_coafter_des_ist_sn_isi f1. +#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0 +#i2 #IH #f1 #H1f1 #f2 #f #H #H2f1 #Hf +elim (pr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1 +elim (pr_coafter_inv_next_sn … H … H1) -H #g #Hg #H0 +@(IH … Hg1 … Hg) /2 width=3 by pr_ist_inv_next, pr_isi_inv_push/ (* * full auto fails *) +qed-. + +(*** coafter_fwd_isid2 *) +lemma pr_coafter_des_ist_sn_isi: + ∀f1. H_pr_coafter_des_ist_sn_isi f1. +#f1 #f2 #f #Hf #H cases (H (𝟏)) +/3 width=7 by pr_coafter_des_ist_sn_isi_aux, pr_coafter_des_ist_sn_isi_unit_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_isu.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_isu.ma new file mode 100644 index 000000000..01d0d956e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_isu.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 "ground/relocation/pr_isi_pushs.ma". +include "ground/relocation/pr_isu_uni.ma". +include "ground/relocation/pr_coafter_uni_pushs.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_isu and pr_isi *************************************) + +(*** coafter_isuni_isid *) +lemma pr_coafter_isu_isi: + ∀f2. 𝐈❪f2❫ → ∀f1. 𝐔❪f1❫ → f1 ~⊚ f2 ≘ f2. +#f #Hf #g #H +elim (pr_isu_inv_uni … H) -H #n #H +/5 width=4 by pr_isi_pushs, pr_isi_inv_eq_repl, pr_coafter_eq_repl_back, pr_coafter_eq_repl_back_sn/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_nat_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_nat_tls.ma new file mode 100644 index 000000000..f3b7ba710 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_nat_tls.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 "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_nat.ma". +include "ground/relocation/pr_coafter.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_nat and pr_tls *************************************) + +(*** coafter_tls *) +lemma pr_coafter_tls_bi_tls (n2) (n1): + ∀f1,f2,f. @↑❪n1, f1❫ ≘ n2 → + f1 ~⊚ f2 ≘ f → ⫰*[n2]f1 ~⊚ ⫰*[n1]f2 ≘ ⫰*[n2]f. +#n2 @(nat_ind_succ … n2) -n2 [ #n1 | #n2 #IH * [| #n1 ] ] #f1 #f2 #f #Hf1 #Hf +[ elim (pr_nat_inv_zero_dx … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1 destruct // +| elim (pr_nat_inv_zero_succ … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1 + elim (pr_coafter_inv_next_sn … Hf … H1) -Hf #g #Hg #H0 destruct + lapply (IH … Hg1 Hg) -IH -Hg1 -Hg // +| elim (pr_nat_inv_succ_dx … Hf1) -Hf1 [1,3: * |*: // ] #g1 [ #n1 ] #Hg1 [ #H ] #H1 + [ elim (pr_coafter_inv_push_sn … Hf … H1) -Hf * #g2 #g #Hg #H2 #H0 destruct + lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H // + | elim (pr_coafter_inv_next_sn … Hf … H1) -Hf #g #Hg #H0 destruct + lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H // + ] +] +qed. + +(*** coafter_tls_O *) +lemma pr_coafter_tls_sn_tls: + ∀n,f1,f2,f. @↑❪𝟎, f1❫ ≘ n → + f1 ~⊚ f2 ≘ f → ⫰*[n]f1 ~⊚ f2 ≘ ⫰*[n]f. +/2 width=1 by pr_coafter_tls_bi_tls/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_nat_tls_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_nat_tls_pushs.ma new file mode 100644 index 000000000..9445dccd0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_nat_tls_pushs.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/relocation/pr_pushs.ma". +include "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_nat.ma". +include "ground/relocation/pr_coafter.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Destructions with pr_nat and pr_tls and pr_pushs *************************) + +(*** coafter_fwd_pushs *) +lemma pr_coafter_des_pushs_dx (n) (m): + ∀g2,f1,g. g2 ~⊚ ⫯*[m]f1 ≘ g → @↑❪m, g2❫ ≘ n → + ∃∃f. ⫰*[n]g2 ~⊚ f1 ≘ f & ⫯*[n] f = g. +#n @(nat_ind_succ … n) -n +[ #m #g2 #f1 #g #Hg #H + elim (pr_nat_inv_zero_dx … H) -H [|*: // ] #f2 #H1 #H2 destruct + /2 width=3 by ex2_intro/ +| #n #IH * [| #m ] #g2 #f1 #g #Hg #H + [ elim (pr_nat_inv_zero_succ … H) -H [|*: // ] #f2 #Hmn #H destruct + elim (pr_coafter_inv_next_sn … Hg) -Hg [|*: // ] #f #Hf #H destruct + elim (IH … Hf Hmn) -IH -Hf -Hmn /2 width=3 by ex2_intro/ + | elim (pr_nat_inv_succ_bi … H) -H [1,4: * |*: // ] #f2 #Hmn #H destruct + [ elim (pr_coafter_inv_push_bi … Hg) -Hg [|*: // ] #f #Hf #H destruct + elim (IH … Hf Hmn) -IH -Hf -Hmn /2 width=3 by ex2_intro/ + | elim (pr_coafter_inv_next_sn … Hg) -Hg [|*: // ] #f #Hf #H destruct + elim (IH … Hf Hmn) -IH -Hf -Hmn /2 width=3 by ex2_intro/ + ] + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_pat_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_pat_tls.ma new file mode 100644 index 000000000..d4a9865c5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_pat_tls.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 "ground/relocation/pr_pat_tls.ma". +include "ground/relocation/pr_coafter_nat_tls.ma". + +(* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_pat and pr_tls *************************************) + +(* Note: this does not require ↑ first and second j *) +(*** coafter_tls_succ *) +lemma pr_coafter_tls_tl_tls: + ∀g2,g1,g. g2 ~⊚ g1 ≘ g → + ∀j. @❪𝟏, g2❫ ≘ j → ⫰*[j]g2 ~⊚ ⫰g1 ≘ ⫰*[j]g. +#g2 #g1 #g #Hg #j #Hg2 +lapply (pr_nat_pred_bi … Hg2) -Hg2 #Hg2 +lapply (pr_coafter_tls_bi_tls … Hg2 … Hg) -Hg #Hg +lapply (pr_pat_unit_succ_tls … Hg2) -Hg2 #H +elim (pr_pat_inv_unit_bi … H) -H [ |*: // ] #f2 #H2 +elim (pr_coafter_inv_push_sn … Hg … H2) -Hg * #f1 #f #Hf #H1 #H0 +>(npsucc_pred j) (eq_inv_pr_push_bi … H) -f // +| #g #m #_ #f #H elim (eq_inv_pr_push_next … H) +] +qed-. + +(*** fcla_inv_nx *) +lemma pr_fcla_inv_next (g) (m): 𝐂❪g❫ ≘ m → ∀f. ↑f = g → ∃∃n. 𝐂❪f❫ ≘ n & ↑n = m. +#g #m * -g -m +[ #g #Hg #f #H destruct + elim (pr_isi_inv_next … Hg) -Hg // +| #g #m #_ #f #H elim (eq_inv_pr_next_push … H) +| #g #m #Hg #f #H >(eq_inv_pr_next_bi … H) -f + /2 width=3 by ex2_intro/ +] +qed-. + +(* Advanced inversions ******************************************************) + +(*** cla_inv_nn *) +lemma pr_cla_inv_next_succ (g) (m): 𝐂❪g❫ ≘ m → ∀f,n. ↑f = g → ↑n = m → 𝐂❪f❫ ≘ n. +#g #m #H #f #n #H1 #H2 elim (pr_fcla_inv_next … H … H1) -g +#x #Hf #H destruct <(eq_inv_nsucc_bi … H) -n // +qed-. + +(*** cla_inv_np *) +lemma pr_cla_inv_next_zero (g) (m): 𝐂❪g❫ ≘ m → ∀f. ↑f = g → 𝟎 = m → ⊥. +#g #m #H #f #H1 elim (pr_fcla_inv_next … H … H1) -g +#x #_ #H1 #H2 destruct /2 width=2 by eq_inv_zero_nsucc/ +qed-. + +(*** fcla_inv_xp *) +lemma pr_fcla_inv_zero (g) (m): 𝐂❪g❫ ≘ m → 𝟎 = m → 𝐈❪g❫. +#g #m #H elim H -g -m /3 width=3 by pr_isi_push/ +#g #m #_ #_ #H destruct elim (eq_inv_zero_nsucc … H) +qed-. + +(*** fcla_inv_isid *) +lemma pr_fcla_inv_isi (g) (m): 𝐂❪g❫ ≘ m → 𝐈❪g❫ → 𝟎 = m. +#f #n #H elim H -f -n /3 width=3 by pr_isi_inv_push/ +#f #n #_ #_ #H elim (pr_isi_inv_next … H) -H // +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_eq.ma new file mode 100644 index 000000000..0ad95fadd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_eq.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 "ground/relocation/pr_isi_eq.ma". +include "ground/relocation/pr_fcla.ma". + +(* FINITE COLENGTH ASSIGNMENT FOR PARTIAL RELOCATION MAPS *******************) + +(* Constructions with pr_eq *************************************************) + +(*** fcla_eq_repl_back *) +lemma pr_fcla_eq_repl_back (n): + pr_eq_repl_back … (λf. 𝐂❪f❫ ≘ n). +#n #f1 #H elim H -f1 -n /3 width=3 by pr_fcla_isi, pr_isi_eq_repl_back/ +#f1 #n #_ #IH #g2 #H [ elim (pr_eq_inv_push_sn … H) | elim (pr_eq_inv_next_sn … H) ] -H +/3 width=3 by pr_fcla_push, pr_fcla_next/ +qed-. + +(*** fcla_eq_repl_fwd *) +lemma fcla_eq_repl_fwd (n): + pr_eq_repl_fwd … (λf. 𝐂❪f❫ ≘ n). +#n @pr_eq_repl_sym /2 width=3 by pr_fcla_eq_repl_back/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_fcla.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_fcla.ma new file mode 100644 index 000000000..8aa59f952 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_fcla.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 "ground/relocation/pr_fcla.ma". + +(* FINITE COLENGTH ASSIGNMENT FOR PARTIAL RELOCATION MAPS *******************) + +(* Main destructions ********************************************************) + +(*** fcla_mono *) +theorem pr_fcla_mono (f): + ∀n1. 𝐂❪f❫ ≘ n1 → ∀n2. 𝐂❪f❫ ≘ n2 → n1 = n2. +#f #n #H elim H -f -n +[ /2 width=3 by pr_fcla_inv_isi/ +| /3 width=3 by pr_fcla_inv_push/ +| #f #n1 #_ #IH #n2 #H elim (pr_fcla_inv_next … H) -H [2,3 : // ] + #g #Hf #H destruct >IH // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_uni.ma new file mode 100644 index 000000000..60fbf8979 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_fcla_uni.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 "ground/relocation/pr_isi_uni.ma". +include "ground/relocation/pr_fcla.ma". + +(* FINITE COLENGTH ASSIGNMENT FOR PARTIAL RELOCATION MAPS *******************) + +(* Constructions with pr_uni ************************************************) + +(*** fcla_uni *) +lemma pr_fcla_uni (n): 𝐂❪𝐮❨n❩❫ ≘ n. +#n @(nat_ind_succ … n) -n +/2 width=1 by pr_fcla_isi, pr_fcla_next/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_id.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_id.ma new file mode 100644 index 000000000..3b2b5b28f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_id.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 "ground/notation/functions/element_i_0.ma". +include "ground/relocation/pr_map.ma". + +(* IDENTITY ELEMENT FOR PARTIAL RELOCATION MAPS *****************************) + +(*** id *) +corec definition pr_id: pr_map ≝ ⫯pr_id. + +interpretation + "identity element (partial relocation streams)" + 'ElementI = (pr_id). + +(* Basic constructions (specific) *******************************************) + +(*** id_rew *) +lemma pr_id_unfold: ⫯𝐢 = 𝐢. +<(stream_unfold … (𝐢)) in ⊢ (???%); // +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_id_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_id_eq.ma new file mode 100644 index 000000000..1e1fd6af5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_id_eq.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 "ground/relocation/pr_tl_eq.ma". +include "ground/relocation/pr_id.ma". + +(* IDENTITY ELEMENT FOR PARTIAL RELOCATION MAPS *****************************) + +(* Constructions with pr_eq *************************************************) + +corec lemma pr_id_eq (f): ⫯f ≡ f → 𝐢 ≡ f. +cases pr_id_unfold #Hf +cases (pr_eq_inv_push_sn … Hf) [|*: // ] #_ #H +cases H in Hf; -H #Hf +@pr_eq_push [3:|*: // ] +/3 width=5 by pr_eq_inv_push_bi/ +qed. + +(* Inversions with pr_eq ****************************************************) + +(* Note: this has the same proof of the previous *) +corec lemma pr_id_inv_eq (f): 𝐢 ≡ f → ⫯f ≡ f. +cases pr_id_unfold #Hf +cases (pr_eq_inv_push_sn … Hf) [|*: // ] #_ #H +cases H in Hf; -H #Hf +@pr_eq_push [3:|*: // ] +/3 width=5 by pr_eq_inv_push_bi/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd.ma new file mode 100644 index 000000000..cc959099f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd.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 "ground/notation/relations/predicate_omega_1.ma". +include "ground/relocation/pr_map.ma". + +(* DIVERGENCE CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(*** isdiv *) +coinductive pr_isd: predicate pr_map ≝ +(*** isdiv_next *) +| pr_isd_next (f) (g): + pr_isd f → ↑f = g → pr_isd g +. + +interpretation + "divergence condition (partial relocation maps)" + 'PredicateOmega f = (pr_isd f). + +(* Basic inversions *********************************************************) + +(*** isdiv_inv_gen *) +lemma pr_isd_inv_gen (g): 𝛀❪g❫ → ∃∃f. 𝛀❪f❫ & ↑f = g. +#g * -g +#f #g #Hf * /2 width=3 by ex2_intro/ +qed-. + +(* Advanced inversions ******************************************************) + +(*** isdiv_inv_next *) +lemma pr_isd_inv_next (g): 𝛀❪g❫ → ∀f. ↑f = g → 𝛀❪f❫. +#g #H elim (pr_isd_inv_gen … H) -H +#f #Hf * -g #g #H >(eq_inv_pr_next_bi … H) -H // +qed-. + +(*** isdiv_inv_push *) +lemma pr_isd_inv_push (g): 𝛀❪g❫ → ∀f. ⫯f = g → ⊥. +#g #H elim (pr_isd_inv_gen … H) -H +#f #Hf * -g #g #H elim (eq_inv_pr_push_next … H) +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_eq.ma new file mode 100644 index 000000000..49a304e1c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_eq.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/relocation/pr_tl_eq_eq.ma". +include "ground/relocation/pr_isd.ma". + +(* DIVERGENCE CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_eq *************************************************) + +(*** isdiv_eq_repl_back *) +corec lemma pr_isd_eq_repl_back: + pr_eq_repl_back … pr_isd. +#f1 #H cases (pr_isd_inv_gen … H) -H +#g1 #Hg1 #H1 #f2 #Hf cases (pr_eq_inv_next_sn … Hf … H1) -f1 +/3 width=3 by pr_isd_next/ +qed-. + +(*** isdiv_eq_repl_fwd *) +lemma pr_isd_eq_repl_fwd: + pr_eq_repl_fwd … pr_isd. +/3 width=3 by pr_isd_eq_repl_back, pr_eq_repl_sym/ qed-. + +(* Main inversions with pr_eq ***********************************************) + +(*** isdiv_inv_eq_repl *) +corec theorem pr_isd_inv_eq_repl (g1) (g2): 𝛀❪g1❫ → 𝛀❪g2❫ → g1 ≡ g2. +#H1 #H2 +cases (pr_isd_inv_gen … H1) -H1 +cases (pr_isd_inv_gen … H2) -H2 +/3 width=5 by pr_eq_next/ +qed-. + +(* Alternative definition with pr_eq ****************************************) + +(*** eq_next_isdiv *) +corec lemma pr_eq_next_isd (f): ↑f ≡ f → 𝛀❪f❫. +#H cases (pr_eq_inv_next_sn … H) -H +/4 width=3 by pr_isd_next, pr_eq_trans/ +qed. + +(*** eq_next_inv_isdiv *) +corec lemma pr_eq_next_inv_isd (g): 𝛀❪g❫ → ↑g ≡ g. +* -g #f #g #Hf * +/3 width=5 by pr_eq_next/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_nexts.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_nexts.ma new file mode 100644 index 000000000..c7dcd74ef --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_nexts.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 "ground/relocation/pr_nexts.ma". +include "ground/relocation/pr_isd.ma". + +(* DIVERGENCE CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_nexts **********************************************) + +(*** isdiv_nexts *) +lemma pr_isd_nexts (n) (f): 𝛀❪f❫ → 𝛀❪↑*[n]f❫. +#n @(nat_ind_succ … n) -n /3 width=3 by pr_isd_next/ +qed. + +(* Inversions with pr_nexts *************************************************) + +(*** isdiv_inv_nexts *) +lemma pr_isd_inv_nexts (n) (g): 𝛀❪↑*[n]g❫ → 𝛀❪g❫. +#n @(nat_ind_succ … n) -n /3 width=3 by pr_isd_inv_next/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_tl.ma new file mode 100644 index 000000000..50f83a41c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_tl.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_tl.ma". +include "ground/relocation/pr_isd.ma". + +(* DIVERGENCE CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_tl *************************************************) + +(*** isdiv_tl *) +lemma pr_isd_tl (f): 𝛀❪f❫ → 𝛀❪⫰f❫. +#f cases (pr_map_split_tl f) * #H +[ elim (pr_isd_inv_push … H) -H // +| /2 width=3 by pr_isd_inv_next/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_tls.ma new file mode 100644 index 000000000..4f3d80e1a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isd_tls.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 "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_isd_tl.ma". + +(* DIVERGENCE CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_tls ************************************************) + +(*** isdiv_tls *) +lemma pr_isd_tls (n) (g): 𝛀❪g❫ → 𝛀❪⫰*[n]g❫. +#n @(nat_ind_succ … n) -n /3 width=1 by pr_isd_tl/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf.ma new file mode 100644 index 000000000..3a68c00f5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/relations/predicate_f_1.ma". +include "ground/relocation/pr_fcla.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(*** isfin *) +definition pr_isf: predicate pr_map ≝ + λf. ∃n. 𝐂❪f❫ ≘ n. + +interpretation + "finite colength condition (partial relocation maps)" + 'PredicateF f = (pr_isf f). + +(* Basic eliminations *******************************************************) + +(*** isfin_ind *) +lemma pr_isf_ind (Q:predicate …): + (∀f. 𝐈❪f❫ → Q f) → + (∀f. 𝐅❪f❫ → Q f → Q (⫯f)) → + (∀f. 𝐅❪f❫ → Q f → Q (↑f)) → + ∀f. 𝐅❪f❫ → Q f. +#Q #IH1 #IH2 #IH3 #f #H elim H -H +#n #H elim H -f -n /3 width=2 by ex_intro/ +qed-. + +(* Basic inversions *********************************************************) + +(*** isfin_inv_push *) +lemma pr_isf_inv_push (g): 𝐅❪g❫ → ∀f. ⫯f = g → 𝐅❪f❫. +#g * /3 width=4 by pr_fcla_inv_push, ex_intro/ +qed-. + +(*** isfin_inv_next *) +lemma pr_isf_inv_next (g): 𝐅❪g❫ → ∀f. ↑f = g → 𝐅❪f❫. +#g * #n #H #f #H0 elim (pr_fcla_inv_next … H … H0) -g +/2 width=2 by ex_intro/ +qed-. + +(* Basic constructions ******************************************************) + +(*** isfin_isid *) +lemma pr_isf_isi (f): 𝐈❪f❫ → 𝐅❪f❫. +/3 width=2 by pr_fcla_isi, ex_intro/ qed. + +(*** isfin_push *) +lemma pr_isf_push (f): 𝐅❪f❫ → 𝐅❪⫯f❫. +#f * /3 width=2 by pr_fcla_push, ex_intro/ +qed. + +(*** isfin_next *) +lemma pr_isf_next (f): 𝐅❪f❫ → 𝐅❪↑f❫. +#f * /3 width=2 by pr_fcla_next, ex_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_eq.ma new file mode 100644 index 000000000..11a684632 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_eq.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 "ground/relocation/pr_fcla_eq.ma". +include "ground/relocation/pr_isf.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_eq *************************************************) + +(*** isfin_eq_repl_back *) +lemma pr_isf_eq_repl_back: + pr_eq_repl_back … pr_isf. +#f1 * /3 width=4 by pr_fcla_eq_repl_back, ex_intro/ +qed-. + +(*** isfin_eq_repl_fwd *) +lemma pr_isf_eq_repl_fwd: pr_eq_repl_fwd … pr_isf. +/3 width=3 by pr_isf_eq_repl_back, pr_eq_repl_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_isu.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_isu.ma new file mode 100644 index 000000000..e6a1b74a2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_isu.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 "ground/relocation/pr_isu.ma". +include "ground/relocation/pr_isf.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_isu ************************************************) + +(*** isuni_fwd_isfin *) +lemma pr_isf_isu (f): 𝐔❪f❫ → 𝐅❪f❫. +#f #H elim H -f +/3 width=1 by pr_isf_next, pr_isf_isi/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_pushs.ma new file mode 100644 index 000000000..e084ab7cb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_pushs.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 "ground/relocation/pr_pushs.ma". +include "ground/relocation/pr_isf.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_pushs **********************************************) + +(*** isfin_pushs *) +lemma pr_isf_pushs (n) (f): 𝐅❪f❫ → 𝐅❪⫯*[n]f❫. +#n @(nat_ind_succ … n) -n /3 width=3 by pr_isf_push/ +qed. + +(* Inversions with pr_pushs *************************************************) + +(*** isfin_inv_pushs *) +lemma pr_isf_inv_pushs (n) (g): 𝐅❪⫯*[n]g❫ → 𝐅❪g❫. +#n @(nat_ind_succ … n) -n /3 width=3 by pr_isf_inv_push/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_tl.ma new file mode 100644 index 000000000..3bb1a4e2b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_tl.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 "ground/relocation/pr_tl.ma". +include "ground/relocation/pr_isf.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_tl *************************************************) + +(*** isfin_tl *) +lemma pr_isf_tl (f): 𝐅❪f❫ → 𝐅❪⫰f❫. +#f elim (pr_map_split_tl f) * #Hf +/3 width=3 by pr_isf_inv_push, pr_isf_inv_next/ +qed. + +(* Inversions with pr_tl ****************************************************) + +(*** isfin_inv_tl *) +lemma pr_isf_inv_tl (g): 𝐅❪⫰g❫ → 𝐅❪g❫. +#f elim (pr_map_split_tl f) * #Hf +/2 width=1 by pr_isf_next, pr_isf_push/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_tls.ma new file mode 100644 index 000000000..4fe40515a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_tls.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 "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_isf_tl.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_tls ************************************************) + +lemma pr_isf_tls (n) (f): 𝐅❪f❫ → 𝐅❪⫰*[n]f❫. +#n @(nat_ind_succ … n) -n /3 width=1 by pr_isf_tl/ +qed. + +(* Inversions with pr_tls ***************************************************) + +(*** isfin_inv_tls *) +lemma pr_isf_inv_tls (n) (g): 𝐅❪⫰*[n]g❫ → 𝐅❪g❫. +#n @(nat_ind_succ … n) -n /3 width=1 by pr_isf_inv_tl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_uni.ma new file mode 100644 index 000000000..74132ecc1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isf_uni.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 "ground/relocation/pr_fcla_uni.ma". +include "ground/relocation/pr_isf.ma". + +(* FINITE COLENGTH CONDITION FOR PARTIAL RELOCATION MAPS ********************) + +(* Constructions with pr_uni ************************************************) + +(*** isfin_uni *) +lemma pr_isf_uni (n): 𝐅❪𝐮❨n❩❫. +/3 width=2 by ex_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi.ma new file mode 100644 index 000000000..ec89ac708 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi.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 "ground/notation/relations/predicate_i_1.ma". +include "ground/relocation/pr_map.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(*** isid *) +coinductive pr_isi: predicate pr_map ≝ +(*** isid_push *) +| pr_isi_push (f) (g): + pr_isi f → ⫯f = g → pr_isi g +. + +interpretation + "identity condition (partial relocation maps)" + 'PredicateI f = (pr_isi f). + +(* Basic inversions *********************************************************) + +(*** isid_inv_gen *) +lemma pr_isi_inv_gen (g): 𝐈❪g❫ → ∃∃f. 𝐈❪f❫ & ⫯f = g. +#g * -g +#f #g #Hf /2 width=3 by ex2_intro/ +qed-. + +(* Advanced inversions ******************************************************) + +(*** isid_inv_push *) +lemma pr_isi_inv_push (g): 𝐈❪g❫ → ∀f. ⫯f = g → 𝐈❪f❫. +#g #H +elim (pr_isi_inv_gen … H) -H #f #Hf +* -g #g #H +>(eq_inv_pr_push_bi … H) -H // +qed-. + +(*** isid_inv_next *) +lemma pr_isi_inv_next (g): 𝐈❪g❫ → ∀f. ↑f = g → ⊥. +#g #H +elim (pr_isi_inv_gen … H) -H #f #Hf +* -g #g #H elim (eq_inv_pr_next_push … H) +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_eq.ma new file mode 100644 index 000000000..b532153d7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_eq.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 "ground/relocation/pr_tl_eq_eq.ma". +include "ground/relocation/pr_isi.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_eq *************************************************) + +(*** isid_eq_repl_back *) +corec lemma pr_isi_eq_repl_back: + pr_eq_repl_back … pr_isi. +#f1 #H +cases (pr_isi_inv_gen … H) -H #g1 #Hg1 #H1 #f2 #Hf +cases (pr_eq_inv_push_sn … Hf … H1) -f1 +/3 width=3 by pr_isi_push/ +qed-. + +(*** isid_eq_repl_fwd *) +lemma pr_isi_eq_repl_fwd: + pr_eq_repl_fwd … pr_isi. +/3 width=3 by pr_isi_eq_repl_back, pr_eq_repl_sym/ qed-. + +(* Main inversions with pr_eq ***********************************************) + +(*** isid_inv_eq_repl *) +corec theorem pr_isi_inv_eq_repl (g1) (g2): 𝐈❪g1❫ → 𝐈❪g2❫ → g1 ≡ g2. +#H1 #H2 +cases (pr_isi_inv_gen … H1) -H1 +cases (pr_isi_inv_gen … H2) -H2 +/3 width=5 by pr_eq_push/ +qed-. + +(* Alternative definition with pr_eq ****************************************) + +(*** eq_push_isid *) +corec lemma pr_eq_push_isi (f): ⫯f ≡ f → 𝐈❪f❫. +#H cases (pr_eq_inv_push_sn … H) -H +/4 width=3 by pr_isi_push, pr_eq_trans/ +qed. + +(*** eq_push_inv_isid *) +corec lemma pr_isi_inv_eq_push (g): 𝐈❪g❫ → ⫯g ≡ g. +* -g #f #g #Hf * +/3 width=5 by pr_eq_push/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_id.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_id.ma new file mode 100644 index 000000000..8b672e874 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_id.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 "ground/relocation/pr_id.ma". +include "ground/relocation/pr_isi_eq.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_id *************************************************) + +(*** id_isid *) +lemma pr_isi_id: 𝐈❪𝐢❫. +/2 width=1 by pr_eq_push_isi/ qed. + +(* Alternative definition with pr_id and pr_eq ******************************) + +(*** eq_id_isid *) +lemma pr_eq_id_isi (f): 𝐢 ≡ f → 𝐈❪f❫. +/2 width=3 by pr_isi_eq_repl_back/ qed. + +(*** eq_id_inv_isid *) +lemma pr_isi_inv_eq_id (f): 𝐈❪f❫ → 𝐢 ≡ f. +/2 width=1 by pr_isi_inv_eq_repl/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_pat.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_pat.ma new file mode 100644 index 000000000..7ee376ea1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_pat.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 "ground/relocation/pr_isi_id.ma". +include "ground/relocation/pr_pat_pat_id.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Advanced constructions with pr_isi ***************************************) + +(*** isid_at *) +lemma pr_isi_pat (f): (∀i. @❪i,f❫ ≘ i) → 𝐈❪f❫. +/3 width=1 by pr_eq_id_isi, pr_pat_inv_id/ +qed. + +(* Inversions with pr_pat ***************************************************) + +(*** isid_inv_at *) +lemma pr_isi_inv_pat (f) (i): 𝐈❪f❫ → @❪i,f❫ ≘ i. +/3 width=3 by pr_isi_inv_eq_id, pr_pat_id, pr_pat_eq_repl_back/ +qed-. + +(* Destructions with pr_pat *************************************************) + +(*** isid_inv_at_mono *) +lemma pr_isi_pat_des (f) (i1) (i2): 𝐈❪f❫ → @❪i1,f❫ ≘ i2 → i1 = i2. +/4 width=3 by pr_isi_inv_eq_id, pr_pat_id_des, pr_pat_eq_repl_fwd/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_pushs.ma new file mode 100644 index 000000000..10b815fe5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_pushs.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 "ground/relocation/pr_pushs.ma". +include "ground/relocation/pr_isi.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_pushs **********************************************) + +(*** isid_pushs *) +lemma pr_isi_pushs (n) (f): 𝐈❪f❫ → 𝐈❪⫯*[n]f❫. +#n @(nat_ind_succ … n) -n /3 width=3 by pr_isi_push/ +qed. + +(* Inversions with pr_pushs *************************************************) + +(*** isid_inv_pushs *) +lemma pr_isi_inv_pushs (n) (g): 𝐈❪⫯*[n]g❫ → 𝐈❪g❫. +#n @(nat_ind_succ … n) -n /3 width=3 by pr_isi_inv_push/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_tl.ma new file mode 100644 index 000000000..466c1658d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_tl.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_tl.ma". +include "ground/relocation/pr_isi.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_tl *************************************************) + +(*** isid_tl *) +lemma pr_isi_tl (f): 𝐈❪f❫ → 𝐈❪⫰f❫. +#f cases (pr_map_split_tl f) * #H +[ /2 width=3 by pr_isi_inv_push/ +| elim (pr_isi_inv_next … H) -H // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_tls.ma new file mode 100644 index 000000000..9bc8fea4c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_tls.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 "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_isi_tl.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_tls ************************************************) + +(*** isid_tls *) +lemma pr_isi_tls (n) (f): 𝐈❪f❫ → 𝐈❪⫰*[n]f❫. +#n @(nat_ind_succ … n) -n /3 width=1 by pr_isi_tl/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_uni.ma new file mode 100644 index 000000000..122b8433e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isi_uni.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 "ground/relocation/pr_uni.ma". +include "ground/relocation/pr_isi_id.ma". + +(* IDENTITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_isi ************************************************) + +(*** uni_inv_isid uni_isi *) +lemma pr_uni_isi (f): 𝐮❨𝟎❩ ≡ f → 𝐈❪f❫. +/2 width=1 by pr_eq_id_isi/ qed. + +(* Inversions with pr_isi ***************************************************) + +(*** uni_isid isi_inv_uni *) +lemma pr_isi_inv_uni (f): 𝐈❪f❫ → 𝐮❨𝟎❩ ≡ f. +/2 width=1 by pr_isi_inv_eq_id/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist.ma new file mode 100644 index 000000000..c1ab3435e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist.ma @@ -0,0 +1,48 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/relations/predicate_t_1.ma". +include "ground/relocation/pr_pat.ma". + +(* TOTALITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(*** istot *) +definition pr_ist: predicate pr_map ≝ + λf. ∀i. ∃j. @❪i,f❫ ≘ j. + +interpretation + "totality condition (partial relocation maps)" + 'PredicateT f = (pr_ist f). + +(* Basic inversions *********************************************************) + +(*** istot_inv_push *) +lemma pr_ist_inv_push (g): 𝐓❪g❫ → ∀f. ⫯f = g → 𝐓❪f❫. +#g #Hg #f #H #i elim (Hg (↑i)) -Hg +#j #Hg elim (pr_pat_inv_succ_push … Hg … H) -Hg -H /2 width=3 by ex_intro/ +qed-. + +(*** istot_inv_next *) +lemma pr_ist_inv_next (g): 𝐓❪g❫ → ∀f. ↑f = g → 𝐓❪f❫. +#g #Hg #f #H #i elim (Hg i) -Hg +#j #Hg elim (pr_pat_inv_next … Hg … H) -Hg -H /2 width=2 by ex_intro/ +qed-. + +(* Constructions with pr_tl *************************************************) + +(*** istot_tl *) +lemma pr_ist_tl (f): 𝐓❪f❫ → 𝐓❪⫰f❫. +#f cases (pr_map_split_tl f) * +/2 width=3 by pr_ist_inv_next, pr_ist_inv_push/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_isi.ma new file mode 100644 index 000000000..ce24651da --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_isi.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 "ground/relocation/pr_isi_pat.ma". +include "ground/relocation/pr_ist.ma". + +(* TOTALITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Advanced constructions with pr_isi ***************************************) + +(*** isid_at_total *) +lemma pr_isi_pat_total: ∀f. 𝐓❪f❫ → (∀i1,i2. @❪i1,f❫ ≘ i2 → i1 = i2) → 𝐈❪f❫. +#f #H1f #H2f @pr_isi_pat +#i lapply (H1f i) -H1f * +#j #Hf >(H2f … Hf) in ⊢ (???%); -H2f // +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_ist.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_ist.ma new file mode 100644 index 000000000..1d76991d1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_ist.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 "ground/relocation/pr_eq.ma". +include "ground/relocation/pr_pat_lt.ma". +include "ground/relocation/pr_pat_pat.ma". +include "ground/relocation/pr_ist.ma". + +(* TOTALITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Advanced constructions with pr_pat ***************************************) + +(*** at_dec *) +lemma pr_pat_dec (f) (i1) (i2): 𝐓❪f❫ → Decidable (@❪i1,f❫ ≘ i2). +#f #i1 #i2 #Hf lapply (Hf i1) -Hf * +#j2 #Hf elim (eq_pnat_dec i2 j2) +[ #H destruct /2 width=1 by or_introl/ +| /4 width=6 by pr_pat_mono, or_intror/ +] +qed-. + +(*** is_at_dec *) +lemma is_pr_pat_dec (f) (i2): 𝐓❪f❫ → Decidable (∃i1. @❪i1,f❫ ≘ i2). +#f #i2 #Hf +lapply (dec_plt (λi1.@❪i1,f❫ ≘ i2) … (↑i2)) [| * ] +[ /2 width=1 by pr_pat_dec/ +| * /3 width=2 by ex_intro, or_introl/ +| #H @or_intror * #i1 #Hi12 + /5 width=3 by pr_pat_increasing, plt_succ_dx, ex2_intro/ +] +qed-. + +(* Main destructions with pr_pat ********************************************) + +(*** at_ext *) +corec theorem pr_eq_ext_pat (f1) (f2): 𝐓❪f1❫ → 𝐓❪f2❫ → + (∀i,i1,i2. @❪i,f1❫ ≘ i1 → @❪i,f2❫ ≘ i2 → i1 = i2) → + f1 ≡ f2. +cases (pr_map_split_tl f1) #H1 +cases (pr_map_split_tl f2) #H2 +#Hf1 #Hf2 #Hi +[ @(pr_eq_push … H1 H2) @pr_eq_ext_pat -pr_eq_ext_pat + [3:|*: /2 width=3 by pr_ist_inv_push/ ] -Hf1 -Hf2 #i #i1 #i2 #Hg1 #Hg2 + lapply (Hi (↑i) (↑i1) (↑i2) ??) /2 width=7 by pr_pat_push/ +| cases (Hf2 (𝟏)) -Hf1 -Hf2 -pr_eq_ext_pat + #j2 #Hf2 cases (pr_pat_increasing_strict … Hf2 … H2) -H2 + lapply (Hi (𝟏) (𝟏) j2 … Hf2) /2 width=2 by pr_pat_refl/ -Hi -Hf2 -H1 + #H2 #H cases (plt_ge_false … H) -H // +| cases (Hf1 (𝟏)) -Hf1 -Hf2 -pr_eq_ext_pat + #j1 #Hf1 cases (pr_pat_increasing_strict … Hf1 … H1) -H1 + lapply (Hi (𝟏) j1 (𝟏) Hf1 ?) /2 width=2 by pr_pat_refl/ -Hi -Hf1 -H2 + #H1 #H cases (plt_ge_false … H) -H // +| @(pr_eq_next … H1 H2) @pr_eq_ext_pat -pr_eq_ext_pat + [3:|*: /2 width=3 by pr_ist_inv_next/ ] -Hf1 -Hf2 #i #i1 #i2 #Hg1 #Hg2 + lapply (Hi i (↑i1) (↑i2) ??) /2 width=5 by pr_pat_next/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_tls.ma new file mode 100644 index 000000000..7a7556303 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_tls.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 "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_ist.ma". + +(* TOTALITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************) + +(* Constructions with pr_tls ************************************************) + +(*** istot_tls *) +lemma pr_ist_tls (n) (f): 𝐓❪f❫ → 𝐓❪⫰*[n]f❫. +#n @(nat_ind_succ … n) -n // +#n #IH #f #Hf (eq_inv_pr_next_bi … Hx) -x // +] +qed-. + +(* Basic destructions *******************************************************) + +(*** isuni_fwd_push *) +lemma pr_isu_fwd_push (g): 𝐔❪g❫ → ∀f. ⫯f = g → 𝐔❪f❫. +/3 width=3 by pr_isu_inv_push, pr_isu_isi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isu_tl.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isu_tl.ma new file mode 100644 index 000000000..80bff5a74 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isu_tl.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 "ground/relocation/pr_tl.ma". +include "ground/relocation/pr_isu.ma". + +(* UNIFORMITY CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_tl *************************************************) + +lemma pr_isu_tl (f): 𝐔❪f❫ → 𝐔❪⫰f❫. +#f cases (pr_map_split_tl f) * #H +[ /3 width=3 by pr_isu_inv_push, pr_isu_isi/ +| /2 width=3 by pr_isu_inv_next/ +] +qed. + +(* Advanced inversions ******************************************************) + +(*** isuni_split *) +lemma pr_isu_split (g): 𝐔❪g❫ → ∨∨ (∃∃f. 𝐈❪f❫ & ⫯f = g) | (∃∃f.𝐔❪f❫ & ↑f = g). +#g elim (pr_map_split_tl g) * #H +/4 width=3 by pr_isu_inv_next, pr_isu_inv_push, or_introl, or_intror, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_isu_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isu_uni.ma new file mode 100644 index 000000000..7ff9c2e57 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_isu_uni.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 "ground/relocation/pr_isi_uni.ma". +include "ground/relocation/pr_isu.ma". + +(* UNIFORMITY CONDITION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_uni ************************************************) + +(*** isuni_uni *) +lemma pr_isu_uni (n): 𝐔❪𝐮❨n❩❫. +#n @(nat_ind_succ … n) -n +/3 width=3 by pr_isu_isi, pr_isu_next/ +qed. + +(*** uni_inv_isuni *) +lemma pr_isu_eq_repl_back: + pr_eq_repl_back … pr_isu. +#f1 #H elim H -f1 +[ /3 width=3 by pr_isu_isi, pr_isi_eq_repl_back/ +| #f1 #_ #g1 * #IH #f2 #H -g1 + elim (pr_eq_inv_next_sn … H) -H + /3 width=3 by pr_isu_next/ +] +qed-. + +lemma pr_isu_eq_repl_fwd: + pr_eq_repl_fwd … pr_isu. +/3 width=3 by pr_isu_eq_repl_back, pr_eq_repl_sym/ qed-. + +(* Inversions with pr_uni ***************************************************) + +(*** uni_isuni *) +lemma pr_isu_inv_uni (f): 𝐔❪f❫ → ∃n. 𝐮❨n❩ ≡ f. +#f #H elim H -f +[ /3 width=2 by pr_isi_inv_uni, ex_intro/ +| #f #_ #g #H * /3 width=6 by pr_eq_next, ex_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_map.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_map.ma new file mode 100644 index 000000000..40589cc21 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_map.ma @@ -0,0 +1,69 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/functions/upspoon_1.ma". +include "ground/notation/functions/uparrow_1.ma". +include "ground/lib/stream.ma". +include "ground/lib/bool.ma". + +(* PARTIAL RELOCATION MAPS **************************************************) + +(*** rtmap *) +definition pr_map: Type[0] ≝ stream bool. + +(*** push *) +definition pr_push (f): pr_map ≝ Ⓕ⨮f. + +interpretation + "push (partial relocation maps)" + 'UpSpoon f = (pr_push f). + +(*** next *) +definition pr_next (f): pr_map ≝ Ⓣ⨮f. + +interpretation + "next (partial relocation maps)" + 'UpArrow f = (pr_next f). + +(* Basic constructions (specific) *******************************************) + +(*** push_rew *) +lemma pr_push_unfold (f): Ⓕ⨮f = ⫯f. +// qed. + +(*** next_rew *) +lemma pr_next_unfold (f): Ⓣ⨮f = ↑f. +// qed. + +(* Basic inversions *********************************************************) + +(*** injective_push *) +lemma eq_inv_pr_push_bi: injective ? ? pr_push. +#f1 #f2 (npsucc_pred i1) in ⊢ (%→?); >(npsucc_pred i2) in ⊢ (%→?); +// +qed. + +(* Basic inversions *********************************************************) + +(*** pr_nat_inv_ppx *) +lemma pr_nat_inv_zero_push (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g. 𝟎 = l1 → ⫯g = f → 𝟎 = l2. +#f #l1 #l2 #H #g #H1 #H2 destruct +lapply (pr_pat_inv_unit_push … H ???) -H +/2 width=2 by eq_inv_npsucc_bi/ +qed-. + +(*** pr_nat_inv_npx *) +lemma pr_nat_inv_succ_push (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g,k1. ↑k1 = l1 → ⫯g = f → + ∃∃k2. @↑❪k1,g❫ ≘ k2 & ↑k2 = l2. +#f #l1 #l2 #H #g #k1 #H1 #H2 destruct +elim (pr_pat_inv_succ_push … H) -H [|*: // ] #k2 #Hg +>(npsucc_pred (↑l2)) #H +@(ex2_intro … (↓k2)) // +qed-. + +(*** pr_nat_inv_xnx *) +lemma pr_nat_inv_next (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g. ↑g = f → + ∃∃k2. @↑❪l1,g❫ ≘ k2 & ↑k2 = l2. +#f #l1 #l2 #H #g #H1 destruct +elim (pr_pat_inv_next … H) -H [|*: // ] #k2 +>(npsucc_pred (k2)) in ⊢ (%→?→?); #Hg #H +@(ex2_intro … (↓k2)) // +qed-. + +(* Advanced inversions ******************************************************) + +(*** pr_nat_inv_ppn *) +lemma pr_nat_inv_zero_push_succ (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g,k2. 𝟎 = l1 → ⫯g = f → ↑k2 = l2 → ⊥. +#f #l1 #l2 #Hf #g #k2 #H1 #H <(pr_nat_inv_zero_push … Hf … H1 H) -f -g -l1 -l2 +/2 width=3 by eq_inv_nsucc_zero/ +qed-. + +(*** pr_nat_inv_npp *) +lemma pr_nat_inv_succ_push_zero (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g,k1. ↑k1 = l1 → ⫯g = f → 𝟎 = l2 → ⊥. +#f #l1 #l2 #Hf #g #k1 #H1 #H elim (pr_nat_inv_succ_push … Hf … H1 H) -f -l1 +#x2 #Hg * -l2 /2 width=3 by eq_inv_zero_nsucc/ +qed-. + +(*** pr_nat_inv_npn *) +lemma pr_nat_inv_succ_push_succ (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g,k1,k2. ↑k1 = l1 → ⫯g = f → ↑k2 = l2 → @↑❪k1,g❫ ≘ k2. +#f #l1 #l2 #Hf #g #k1 #k2 #H1 #H elim (pr_nat_inv_succ_push … Hf … H1 H) -f -l1 +#x2 #Hg * -l2 #H >(eq_inv_nsucc_bi … H) -k2 // +qed-. + +(*** pr_nat_inv_xnp *) +lemma pr_nat_inv_next_zero (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g. ↑g = f → 𝟎 = l2 → ⊥. +#f #l1 #l2 #Hf #g #H elim (pr_nat_inv_next … Hf … H) -f +#x2 #Hg * -l2 /2 width=3 by eq_inv_zero_nsucc/ +qed-. + +(*** pr_nat_inv_xnn *) +lemma pr_nat_inv_next_succ (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g,k2. ↑g = f → ↑k2 = l2 → @↑❪l1,g❫ ≘ k2. +#f #l1 #l2 #Hf #g #k2 #H elim (pr_nat_inv_next … Hf … H) -f +#x2 #Hg * -l2 #H >(eq_inv_nsucc_bi … H) -k2 // +qed-. + +(*** pr_nat_inv_pxp *) +lemma pr_nat_inv_zero_bi (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → 𝟎 = l1 → 𝟎 = l2 → ∃g. ⫯g = f. +#f elim (pr_map_split_tl … f) /2 width=2 by ex_intro/ +#H #l1 #l2 #Hf #H1 #H2 cases (pr_nat_inv_next_zero … Hf … H H2) +qed-. + +(*** pr_nat_inv_pxn *) +lemma pr_nat_inv_zero_succ (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀k2. 𝟎 = l1 → ↑k2 = l2 → + ∃∃g. @↑❪l1,g❫ ≘ k2 & ↑g = f. +#f elim (pr_map_split_tl … f) +#H #l1 #l2 #Hf #k2 #H1 #H2 +[ elim (pr_nat_inv_zero_push_succ … Hf … H1 H H2) +| /3 width=5 by pr_nat_inv_next_succ, ex2_intro/ +] +qed-. + +(*** pr_nat_inv_nxp *) +lemma pr_nat_inv_succ_zero (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀k1. ↑k1 = l1 → 𝟎 = l2 → ⊥. +#f elim (pr_map_split_tl f) +#H #l1 #l2 #Hf #k1 #H1 #H2 +[ elim (pr_nat_inv_succ_push_zero … Hf … H1 H H2) +| elim (pr_nat_inv_next_zero … Hf … H H2) +] +qed-. + +(*** pr_nat_inv_nxn *) +lemma pr_nat_inv_succ_bi (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀k1,k2. ↑k1 = l1 → ↑k2 = l2 → + ∨∨ ∃∃g. @↑❪k1,g❫ ≘ k2 & ⫯g = f + | ∃∃g. @↑❪l1,g❫ ≘ k2 & ↑g = f. +#f elim (pr_map_split_tl f) * +/4 width=7 by pr_nat_inv_next_succ, pr_nat_inv_succ_push_succ, ex2_intro, or_intror, or_introl/ +qed-. + +(* Note: the following inversion lemmas must be checked *) +(*** pr_nat_inv_xpx *) +lemma pr_nat_inv_push (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g. ⫯g = f → + ∨∨ ∧∧ 𝟎 = l1 & 𝟎 = l2 + | ∃∃k1,k2. @↑❪k1,g❫ ≘ k2 & ↑k1 = l1 & ↑k2 = l2. +#f * [2: #l1 ] #l2 #Hf #g #H +[ elim (pr_nat_inv_succ_push … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/ +| >(pr_nat_inv_zero_push … Hf … H) -f /3 width=1 by conj, or_introl/ +] +qed-. + +(*** pr_nat_inv_xpp *) +lemma pr_nat_inv_push_zero (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g. ⫯g = f → 𝟎 = l2 → 𝟎 = l1. +#f #l1 #l2 #Hf #g #H elim (pr_nat_inv_push … Hf … H) -f * // +#k1 #k2 #_ #_ * -l2 #H elim (eq_inv_zero_nsucc … H) +qed-. + +(*** pr_nat_inv_xpn *) +lemma pr_nat_inv_push_succ (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → ∀g,k2. ⫯g = f → ↑k2 = l2 → + ∃∃k1. @↑❪k1,g❫ ≘ k2 & ↑k1 = l1. +#f #l1 #l2 #Hf #g #k2 #H elim (pr_nat_inv_push … Hf … H) -f * +[ #_ * -l2 #H elim (eq_inv_nsucc_zero … H) +| #x1 #x2 #Hg #H1 * -l2 #H + lapply (eq_inv_nsucc_bi … H) -H #H destruct + /2 width=3 by ex2_intro/ +] +qed-. + +(*** pr_nat_inv_xxp *) +lemma pr_nat_inv_zero_dx (f) (l1) (l2): + @↑❪l1,f❫ ≘ l2 → 𝟎 = l2 → ∃∃g. 𝟎 = l1 & ⫯g = f. +#f elim (pr_map_split_tl f) +#H #l1 #l2 #Hf #H2 +[ /3 width=6 by pr_nat_inv_push_zero, ex2_intro/ +| elim (pr_nat_inv_next_zero … Hf … H H2) +] +qed-. + +(*** pr_nat_inv_xxn *) +lemma pr_nat_inv_succ_dx (f) (l1) (l2): @↑❪l1,f❫ ≘ l2 → ∀k2. ↑k2 = l2 → + ∨∨ ∃∃g,k1. @↑❪k1,g❫ ≘ k2 & ↑k1 = l1 & ⫯g = f + | ∃∃g. @↑❪l1,g❫ ≘ k2 & ↑g = f. +#f elim (pr_map_split_tl f) +#H #l1 #l2 #Hf #k2 #H2 +[ elim (pr_nat_inv_push_succ … Hf … H H2) -l2 /3 width=5 by or_introl, ex3_2_intro/ +| lapply (pr_nat_inv_next_succ … Hf … H H2) -l2 /3 width=3 by or_intror, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_basic.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_basic.ma new file mode 100644 index 000000000..8c406f174 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_basic.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 "ground/relocation/pr_basic.ma". +include "ground/relocation/pr_nat_uni.ma". + +(* NON-NEGATIVE APPLICATION FOR PARTIAL RELOCATION MAPS *********************) + +(* Constructions with pr_basic **********************************************) + +lemma pr_nat_basic_lt (m) (n) (l): + l < m → @↑❪l, 𝐛❨m,n❩❫ ≘ l. +#m @(nat_ind_succ … m) -m +[ #n #i #H elim (nlt_inv_zero_dx … H) +| #m #IH #n #l @(nat_ind_succ … l) -l + [ #_ /2 width=2 by refl, pr_pat_refl/ + | #l #_ #H + lapply (nlt_inv_succ_bi … H) -H #Hlm + /3 width=7 by refl, pr_pat_push/ + ] +] +qed. + +lemma pr_nat_basic_ge (m) (n) (l): + m ≤ l → @↑❪l, 𝐛❨m,n❩❫ ≘ l+n. +#m @(nat_ind_succ … m) -m // +#m #IH #n #l #H +elim (nle_inv_succ_sn … H) -H #Hml #H >H -H +/3 width=7 by pr_nat_push/ +qed. + +(* Inversions with pr_basic *************************************************) + +lemma pr_nat_basic_inv_lt (m) (n) (l) (k): + l < m → @↑❪l, 𝐛❨m,n❩❫ ≘ k → l = k. +/3 width=4 by pr_nat_basic_lt, pr_nat_mono/ qed-. + +lemma pr_nat_basic_inv_ge (m) (n) (l) (k): + m ≤ l → @↑❪l, 𝐛❨m,n❩❫ ≘ k → l+n = k. +/3 width=4 by pr_nat_basic_ge, pr_nat_mono/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_nat.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_nat.ma new file mode 100644 index 000000000..5f4067080 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_nat.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/arith/nat_lt_pred.ma". +include "ground/relocation/pr_nat.ma". + +(* NON-NEGATIVE APPLICATION FOR PARTIAL RELOCATION MAPS *****************************) + +(* Main destructions ********************************************************) + +theorem pr_nat_monotonic (k2) (l2) (f): + @↑❪l2,f❫ ≘ k2 → ∀k1,l1. @↑❪l1,f❫ ≘ k1 → l1 < l2 → k1 < k2. +#k2 @(nat_ind_succ … k2) -k2 +[ #l2 #f #H2f elim (pr_nat_inv_zero_dx … H2f) -H2f // + #g #H21 #_ #k1 #l1 #_ #Hi destruct + elim (nlt_inv_zero_dx … Hi) +| #k2 #IH #l2 #f #H2f #k1 @(nat_ind_succ … k1) -k1 // + #k1 #_ #l1 #H1f #Hl elim (nlt_inv_gen … Hl) + #_ #Hl2 elim (pr_nat_inv_succ_bi … H2f (↓l2)) -H2f [1,3: * |*: // ] + #g #H2g #H + [ elim (pr_nat_inv_push_succ … H1f … H) -f + /4 width=8 by nlt_inv_succ_bi, nlt_succ_bi/ + | /4 width=8 by pr_nat_inv_next_succ, nlt_succ_bi/ + ] +] +qed-. + +theorem pr_nat_inv_monotonic (k1) (l1) (f): + @↑❪l1,f❫ ≘ k1 → ∀k2,l2. @↑❪l2,f❫ ≘ k2 → k1 < k2 → l1 < l2. +#k1 @(nat_ind_succ … k1) -k1 +[ #l1 #f #H1f elim (pr_nat_inv_zero_dx … H1f) -H1f // + #g * -l1 #H #k2 #l2 #H2f #Hk + lapply (nlt_des_gen … Hk) -Hk #H22 + elim (pr_nat_inv_push_succ … H2f … (↓k2) H) -f // +| #k1 #IH #l1 @(nat_ind_succ … l1) -l1 + [ #f #H1f elim (pr_nat_inv_zero_succ … H1f) -H1f [ |*: // ] + #g #H1g #H #k2 #l2 #H2f #Hj elim (nlt_inv_succ_sn … Hj) -Hj + /3 width=7 by pr_nat_inv_next_succ/ + | #l1 #_ #f #H1f #k2 #l2 #H2f #Hj elim (nlt_inv_succ_sn … Hj) -Hj + #Hj #H22 elim (pr_nat_inv_succ_bi … H1f) -H1f [1,4: * |*: // ] + #g #Hg #H + [ elim (pr_nat_inv_push_succ … H2f … (↓k2) H) -f + /3 width=7 by nlt_succ_bi/ + | /3 width=7 by pr_nat_inv_next_succ/ + ] + ] +] +qed-. + +theorem pr_nat_mono (f) (l) (l1) (l2): + @↑❪l,f❫ ≘ l1 → @↑❪l,f❫ ≘ l2 → l2 = l1. +#f #l #l1 #l2 #H1 #H2 elim (nat_split_lt_eq_gt l2 l1) // +#Hi elim (nlt_ge_false l l) +/2 width=6 by pr_nat_inv_monotonic/ +qed-. + +theorem pr_nat_inj (f) (l1) (l2) (l): + @↑❪l1,f❫ ≘ l → @↑❪l2,f❫ ≘ l → l1 = l2. +#f #l1 #l2 #l #H1 #H2 elim (nat_split_lt_eq_gt l2 l1) // +#Hi elim (nlt_ge_false l l) +/2 width=6 by pr_nat_monotonic/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_uni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_uni.ma new file mode 100644 index 000000000..8831312c6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nat_uni.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 "ground/arith/nat_plus_rplus.ma". +include "ground/relocation/pr_pat_uni.ma". +include "ground/relocation/pr_nat_nat.ma". + +(* NON-NEGATIVE APPLICATION FOR PARTIAL RELOCATION MAPS *********************) + +(* Constructions with pr_uni ************************************************) + +lemma pr_nat_uni (n) (l): + @↑❪l,𝐮❨n❩❫ ≘ l+n. +/2 width=1 by pr_nat_pred_bi/ +qed. + +(* Inversions with pr_uni ***************************************************) + +lemma pr_nat_inv_uni (n) (l) (k): + @↑❪l,𝐮❨n❩❫ ≘ k → k = l+n. +/2 width=4 by pr_nat_mono/ qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts.ma new file mode 100644 index 000000000..1588422aa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts.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 "ground/notation/functions/uparrowstar_2.ma". +include "ground/arith/nat_succ_iter.ma". +include "ground/relocation/pr_map.ma". + +(* ITERATED NEXT FOR PARTIAL RELOCATION MAPS ********************************) + +(*** nexts *) +definition pr_nexts (f:pr_map) (n:nat) ≝ + (pr_next^n) f. + +interpretation + "iterated next (partial relocation maps)" + 'UpArrowStar n f = (pr_nexts f n). + +(* Basic constructions ******************************************************) + +(*** nexts_O *) +lemma pr_nexts_zero: + ∀f. f = ↑*[𝟎] f. +// qed. + +(*** nexts_swap *) +lemma pr_nexts_next (n): + ∀f. ↑↑*[n] f = ↑*[n] ↑f. +#f #n @(niter_appl … pr_next) +qed. + +(*** nexts_S *) +lemma pr_nexts_succ (n): + ∀f. ↑↑*[n] f = ↑*[↑n] f. +#f #n @(niter_succ … pr_next) +qed. + +(*** nexts_xn *) +lemma pr_nexts_swap (n): + ∀f. ↑*[n] ↑f = ↑*[↑n] f. +// qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts_eq.ma new file mode 100644 index 000000000..ca6a8d5ac --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts_eq.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 "ground/relocation/pr_eq.ma". +include "ground/relocation/pr_nexts.ma". + +(* ITERATED NEXT FOR PARTIAL RELOCATION MAPS ********************************) + +(* Constructions with pr_eq *************************************************) + +(*** nexts_eq_repl *) +lemma pr_nexts_eq_repl (n): + pr_eq_repl (λf1,f2. ↑*[n] f1 ≡ ↑*[n] f2). +#n @(nat_ind_succ … n) -n +/3 width=5 by pr_eq_next/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_pat.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_pat.ma new file mode 100644 index 000000000..263da6c13 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_pat.ma @@ -0,0 +1,202 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/relations/rat_3.ma". +include "ground/xoa/ex_3_2.ma". +include "ground/arith/pnat.ma". +include "ground/relocation/pr_tl.ma". + +(* POSITIVE APPLICATION FOR PARTIAL RELOCATION MAPS *************************) + +(*** at *) +coinductive pr_pat: relation3 pr_map pnat pnat ≝ +(*** at_refl *) +| pr_pat_refl (f) (g) (j1) (j2): + ⫯f = g → 𝟏 = j1 → 𝟏 = j2 → pr_pat g j1 j2 +(*** at_push *) +| pr_pat_push (f) (i1) (i2): + pr_pat f i1 i2 → ∀g,j1,j2. ⫯f = g → ↑i1 = j1 → ↑i2 = j2 → pr_pat g j1 j2 +(*** at_next *) +| pr_pat_next (f) (i1) (i2): + pr_pat f i1 i2 → ∀g,j2. ↑f = g → ↑i2 = j2 → pr_pat g i1 j2 +. + +interpretation + "relational positive application (partial relocation maps)" + 'RAt i1 f i2 = (pr_pat f i1 i2). + +(*** H_at_div *) +definition H_pr_pat_div: relation4 pr_map pr_map pr_map pr_map ≝ + λf2,g2,f1,g1. + ∀jf,jg,j. @❪jf,f2❫ ≘ j → @❪jg,g2❫ ≘ j → + ∃∃j0. @❪j0,f1❫ ≘ jf & @❪j0,g1❫ ≘ jg. + +(* Basic inversions *********************************************************) + +(*** at_inv_ppx *) +lemma pr_pat_inv_unit_push (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g. 𝟏 = i1 → ⫯g = f → 𝟏 = i2. +#f #i1 #i2 * -f -i1 -i2 // +[ #f #i1 #i2 #_ #g #j1 #j2 #_ * #_ #x #H destruct +| #f #i1 #i2 #_ #g #j2 * #_ #x #_ #H elim (eq_inv_pr_push_next … H) +] +qed-. + +(*** at_inv_npx *) +lemma pr_pat_inv_succ_push (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f → + ∃∃j2. @❪j1,g❫ ≘ j2 & ↑j2 = i2. +#f #i1 #i2 * -f -i1 -i2 +[ #f #g #j1 #j2 #_ * #_ #x #x1 #H destruct +| #f #i1 #i2 #Hi #g #j1 #j2 * * * #x #x1 #H #Hf >(eq_inv_pr_push_bi … Hf) -g destruct /2 width=3 by ex2_intro/ +| #f #i1 #i2 #_ #g #j2 * #_ #x #x1 #_ #H elim (eq_inv_pr_push_next … H) +] +qed-. + +(*** at_inv_xnx *) +lemma pr_pat_inv_next (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g. ↑g = f → + ∃∃j2. @❪i1,g❫ ≘ j2 & ↑j2 = i2. +#f #i1 #i2 * -f -i1 -i2 +[ #f #g #j1 #j2 * #_ #_ #x #H elim (eq_inv_pr_next_push … H) +| #f #i1 #i2 #_ #g #j1 #j2 * #_ #_ #x #H elim (eq_inv_pr_next_push … H) +| #f #i1 #i2 #Hi #g #j2 * * #x #H >(eq_inv_pr_next_bi … H) -g /2 width=3 by ex2_intro/ +] +qed-. + +(* Advanced inversions ******************************************************) + +(*** at_inv_ppn *) +lemma pr_pat_inv_unit_push_succ (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g,j2. 𝟏 = i1 → ⫯g = f → ↑j2 = i2 → ⊥. +#f #i1 #i2 #Hf #g #j2 #H1 #H <(pr_pat_inv_unit_push … Hf … H1 H) -f -g -i1 -i2 +#H destruct +qed-. + +(*** at_inv_npp *) +lemma pr_pat_inv_succ_push_unit (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f → 𝟏 = i2 → ⊥. +#f #i1 #i2 #Hf #g #j1 #H1 #H elim (pr_pat_inv_succ_push … Hf … H1 H) -f -i1 +#x2 #Hg * -i2 #H destruct +qed-. + +(*** at_inv_npn *) +lemma pr_pat_inv_succ_push_succ (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g,j1,j2. ↑j1 = i1 → ⫯g = f → ↑j2 = i2 → @❪j1,g❫ ≘ j2. +#f #i1 #i2 #Hf #g #j1 #j2 #H1 #H elim (pr_pat_inv_succ_push … Hf … H1 H) -f -i1 +#x2 #Hg * -i2 #H destruct // +qed-. + +(*** at_inv_xnp *) +lemma pr_pat_inv_next_unit (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g. ↑g = f → 𝟏 = i2 → ⊥. +#f #i1 #i2 #Hf #g #H elim (pr_pat_inv_next … Hf … H) -f +#x2 #Hg * -i2 #H destruct +qed-. + +(*** at_inv_xnn *) +lemma pr_pat_inv_next_succ (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g,j2. ↑g = f → ↑j2 = i2 → @❪i1,g❫ ≘ j2. +#f #i1 #i2 #Hf #g #j2 #H elim (pr_pat_inv_next … Hf … H) -f +#x2 #Hg * -i2 #H destruct // +qed-. + +(*** at_inv_pxp *) +lemma pr_pat_inv_unit_bi (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → 𝟏 = i1 → 𝟏 = i2 → ∃g. ⫯g = f. +#f elim (pr_map_split_tl … f) /2 width=2 by ex_intro/ +#H #i1 #i2 #Hf #H1 #H2 cases (pr_pat_inv_next_unit … Hf … H H2) +qed-. + +(*** at_inv_pxn *) +lemma pr_pat_inv_unit_succ (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀j2. 𝟏 = i1 → ↑j2 = i2 → + ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f. +#f elim (pr_map_split_tl … f) +#H #i1 #i2 #Hf #j2 #H1 #H2 +[ elim (pr_pat_inv_unit_push_succ … Hf … H1 H H2) +| /3 width=5 by pr_pat_inv_next_succ, ex2_intro/ +] +qed-. + +(*** at_inv_nxp *) +lemma pr_pat_inv_succ_unit (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀j1. ↑j1 = i1 → 𝟏 = i2 → ⊥. +#f elim (pr_map_split_tl f) +#H #i1 #i2 #Hf #j1 #H1 #H2 +[ elim (pr_pat_inv_succ_push_unit … Hf … H1 H H2) +| elim (pr_pat_inv_next_unit … Hf … H H2) +] +qed-. + +(*** at_inv_nxn *) +lemma pr_pat_inv_succ_bi (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀j1,j2. ↑j1 = i1 → ↑j2 = i2 → + ∨∨ ∃∃g. @❪j1,g❫ ≘ j2 & ⫯g = f + | ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f. +#f elim (pr_map_split_tl f) * +/4 width=7 by pr_pat_inv_next_succ, pr_pat_inv_succ_push_succ, ex2_intro, or_intror, or_introl/ +qed-. + +(* Note: the following inversion lemmas must be checked *) +(*** at_inv_xpx *) +lemma pr_pat_inv_push (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g. ⫯g = f → + ∨∨ ∧∧ 𝟏 = i1 & 𝟏 = i2 + | ∃∃j1,j2. @❪j1,g❫ ≘ j2 & ↑j1 = i1 & ↑j2 = i2. +#f * [2: #i1 ] #i2 #Hf #g #H +[ elim (pr_pat_inv_succ_push … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/ +| >(pr_pat_inv_unit_push … Hf … H) -f /3 width=1 by conj, or_introl/ +] +qed-. + +(*** at_inv_xpp *) +lemma pr_pat_inv_push_unit (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g. ⫯g = f → 𝟏 = i2 → 𝟏 = i1. +#f #i1 #i2 #Hf #g #H elim (pr_pat_inv_push … Hf … H) -f * // +#j1 #j2 #_ #_ * -i2 #H destruct +qed-. + +(*** at_inv_xpn *) +lemma pr_pat_inv_push_succ (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀g,j2. ⫯g = f → ↑j2 = i2 → + ∃∃j1. @❪j1,g❫ ≘ j2 & ↑j1 = i1. +#f #i1 #i2 #Hf #g #j2 #H elim (pr_pat_inv_push … Hf … H) -f * +[ #_ * -i2 #H destruct +| #x1 #x2 #Hg #H1 * -i2 #H destruct /2 width=3 by ex2_intro/ +] +qed-. + +(*** at_inv_xxp *) +lemma pr_pat_inv_unit_dx (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → 𝟏 = i2 → + ∃∃g. 𝟏 = i1 & ⫯g = f. +#f elim (pr_map_split_tl f) +#H #i1 #i2 #Hf #H2 +[ /3 width=6 by pr_pat_inv_push_unit, ex2_intro/ +| elim (pr_pat_inv_next_unit … Hf … H H2) +] +qed-. + +(*** at_inv_xxn *) +lemma pr_pat_inv_succ_dx (f) (i1) (i2): + @❪i1,f❫ ≘ i2 → ∀j2. ↑j2 = i2 → + ∨∨ ∃∃g,j1. @❪j1,g❫ ≘ j2 & ↑j1 = i1 & ⫯g = f + | ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f. +#f elim (pr_map_split_tl f) +#H #i1 #i2 #Hf #j2 #H2 +[ elim (pr_pat_inv_push_succ … Hf … H H2) -i2 /3 width=5 by or_introl, ex3_2_intro/ +| lapply (pr_pat_inv_next_succ … Hf … H H2) -i2 /3 width=3 by or_intror, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_pat_basic.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_pat_basic.ma new file mode 100644 index 000000000..679754300 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_pat_basic.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 "ground/relocation/pr_nat_basic.ma". + +(* POSITIVE APPLICATION FOR PARTIAL RELOCATION MAPS *************************) + +(* Constructions with pr_basic **********************************************) + +(*** at_basic_lt *) +lemma pr_pat_basic_lt (m) (n) (i): + ninj i ≤ m → @❪i, 𝐛❨m,n❩❫ ≘ i. +#m #n #i >(npsucc_pred i) #Hmi +/2 width=1 by pr_nat_basic_lt/ +qed. + +(*** at_basic_ge *) +lemma pr_pat_basic_ge (m) (n) (i): + m < ninj i → @❪i, 𝐛❨m,n❩❫ ≘ i+n. +#m #n #i >(npsucc_pred i) #Hmi (eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(*** sand_inv_npx *) +lemma pr_sand_inv_next_push: + ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → + ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(*** sand_inv_pnx *) +lemma pr_sand_inv_push_next: + ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → + ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(*** sand_inv_nnx *) +lemma pr_sand_inv_next_bi: + ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → + ∃∃f. f1 ⋒ f2 ≘ f & ↑f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sand_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sand_eq.ma new file mode 100644 index 000000000..9210685e7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sand_eq.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_tl_eq.ma". +include "ground/relocation/pr_sand.ma". + +(* RELATIONAL INTERSECTION FOR PARTIAL RELOCATION MAPS **********************) + +(* Constructions with pr_eq *************************************************) + +(*** sand_eq_repl_back1 *) +corec lemma pr_sand_eq_repl_back_sn: + ∀f2,f. pr_eq_repl_back … (λf1. f1 ⋒ f2 ≘ f). +#f2 #f #f1 * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx +try cases (pr_eq_inv_push_sn … Hx … H1) try cases (pr_eq_inv_next_sn … Hx … H1) -g1 +/3 width=7 by pr_sand_push_bi, pr_sand_next_push, pr_sand_push_next, pr_sand_next_bi/ +qed-. + +(*** sand_eq_repl_fwd1 *) +lemma pr_sand_eq_repl_fwd_sn: + ∀f2,f. pr_eq_repl_fwd … (λf1. f1 ⋒ f2 ≘ f). +#f2 #f @pr_eq_repl_sym /2 width=3 by pr_sand_eq_repl_back_sn/ +qed-. + +(*** sand_eq_repl_back2 *) +corec lemma pr_sand_eq_repl_back_dx: + ∀f1,f. pr_eq_repl_back … (λf2. f1 ⋒ f2 ≘ f). +#f1 #f #f2 * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx +try cases (pr_eq_inv_push_sn … Hx … H2) try cases (pr_eq_inv_next_sn … Hx … H2) -g2 +/3 width=7 by pr_sand_push_bi, pr_sand_next_push, pr_sand_push_next, pr_sand_next_bi/ +qed-. + +(*** sand_eq_repl_fwd2 *) +lemma sand_eq_repl_fwd_dx: + ∀f1,f. pr_eq_repl_fwd … (λf2. f1 ⋒ f2 ≘ f). +#f1 #f @pr_eq_repl_sym /2 width=3 by pr_sand_eq_repl_back_dx/ +qed-. + +(*** sand_eq_repl_back3 *) +corec lemma pr_sand_eq_repl_back: + ∀f1,f2. pr_eq_repl_back … (λf. f1 ⋒ f2 ≘ f). +#f1 #f2 #f * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx +try cases (pr_eq_inv_push_sn … Hx … H0) try cases (pr_eq_inv_next_sn … Hx … H0) -g +/3 width=7 by pr_sand_push_bi, pr_sand_next_push, pr_sand_push_next, pr_sand_next_bi/ +qed-. + +(*** sand_eq_repl_fwd3 *) +lemma pr_sand_eq_repl_fwd: + ∀f1,f2. pr_eq_repl_fwd … (λf. f1 ⋒ f2 ≘ f). +#f1 #f2 @pr_eq_repl_sym /2 width=3 by pr_sand_eq_repl_back/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj.ma new file mode 100644 index 000000000..e4196852e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj.ma @@ -0,0 +1,144 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/relations/parallel_2.ma". +include "ground/relocation/pr_tl.ma". + +(* DISJOINTNESS FOR PARTIAL RELOCATION MAPS *********************************) + +(*** sdj *) +coinductive pr_sdj: relation pr_map ≝ +(*** sdj_pp *) +| pr_sdj_push_bi (f1) (f2) (g1) (g2): + pr_sdj f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → pr_sdj g1 g2 +(*** sdj_np *) +| pr_sdj_next_push (f1) (f2) (g1) (g2): + pr_sdj f1 f2 → ↑f1 = g1 → ⫯f2 = g2 → pr_sdj g1 g2 +(*** sdj_pn *) +| pr_sdj_push_next (f1) (f2) (g1) (g2): + pr_sdj f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → pr_sdj g1 g2 +. + +interpretation + "disjointness (partial relocation maps)" + 'Parallel f1 f2 = (pr_sdj f1 f2). + +(* Basic constructions ******************************************************) + +(*** sdj_sym *) +corec lemma pr_sdj_sym: + symmetric … pr_sdj. +#f1 #f2 * -f1 -f2 +#f1 #f2 #g1 #g2 #Hf #H1 #H2 +[ @(pr_sdj_push_bi … H2 H1) +| @(pr_sdj_push_next … H2 H1) +| @(pr_sdj_next_push … H2 H1) +] -g2 -g1 +/2 width=1 by/ +qed-. + +(* Basic inversions *********************************************************) + +(*** sdj_inv_pp *) +lemma pr_sdj_inv_push_bi: + ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ∥ f2. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct +[ lapply (eq_inv_pr_push_bi … Hx1) -Hx1 + lapply (eq_inv_pr_push_bi … Hx2) -Hx2 // +| elim (eq_inv_pr_push_next … Hx1) +| elim (eq_inv_pr_push_next … Hx2) +] +qed-. + +(*** sdj_inv_np *) +lemma pr_sdj_inv_next_push: + ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → f1 ∥ f2. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct +[ elim (eq_inv_pr_next_push … Hx1) +| lapply (eq_inv_pr_next_bi … Hx1) -Hx1 + lapply (eq_inv_pr_push_bi … Hx2) -Hx2 // +| elim (eq_inv_pr_push_next … Hx2) +] +qed-. + +(*** sdj_inv_pn *) +lemma pr_sdj_inv_push_next: + ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ∥ f2. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct +[ elim (eq_inv_pr_next_push … Hx2) +| elim (eq_inv_pr_push_next … Hx1) +| lapply (eq_inv_pr_push_bi … Hx1) -Hx1 + lapply (eq_inv_pr_next_bi … Hx2) -Hx2 // +] +qed-. + +(*** sdj_inv_nn *) +lemma pr_sdj_inv_next_bi: + ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → ⊥. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct +[ elim (eq_inv_pr_next_push … Hx1) +| elim (eq_inv_pr_next_push … Hx2) +| elim (eq_inv_pr_next_push … Hx1) +] +qed-. + +(* Advanced inversions ******************************************************) + +(*** sdj_inv_nx *) +lemma pr_sdj_inv_next_sn: + ∀g1,g2. g1 ∥ g2 → ∀f1. ↑f1 = g1 → + ∃∃f2. f1 ∥ f2 & ⫯f2 = g2. +#g1 #g2 elim (pr_map_split_tl g2) #H2 #H #f1 #H1 +[ lapply (pr_sdj_inv_next_push … H … H1 H2) -H /2 width=3 by ex2_intro/ +| elim (pr_sdj_inv_next_bi … H … H1 H2) +] +qed-. + +(*** sdj_inv_xn *) +lemma pr_sdj_inv_next_dx: + ∀g1,g2. g1 ∥ g2 → ∀f2. ↑f2 = g2 → + ∃∃f1. f1 ∥ f2 & ⫯f1 = g1. +#g1 #g2 elim (pr_map_split_tl g1) #H1 #H #f2 #H2 +[ lapply (pr_sdj_inv_push_next … H … H1 H2) -H /2 width=3 by ex2_intro/ +| elim (pr_sdj_inv_next_bi … H … H1 H2) +] +qed-. + +(*** sdj_inv_xp *) +lemma pr_sdj_inv_push_dx: + ∀g1,g2. g1 ∥ g2 → ∀f2. ⫯f2 = g2 → + ∨∨ ∃∃f1. f1 ∥ f2 & ⫯f1 = g1 + | ∃∃f1. f1 ∥ f2 & ↑f1 = g1. +#g1 #g2 elim (pr_map_split_tl g1) #H1 #H #f2 #H2 +[ lapply (pr_sdj_inv_push_bi … H … H1 H2) +| lapply (pr_sdj_inv_next_push … H … H1 H2) +] -H -H2 +/3 width=3 by ex2_intro, or_introl, or_intror/ +qed-. + +(*** sdj_inv_px *) +lemma pr_sdj_inv_push_sn: + ∀g1,g2. g1 ∥ g2 → ∀f1. ⫯f1 = g1 → + ∨∨ ∃∃f2. f1 ∥ f2 & ⫯f2 = g2 + | ∃∃f2. f1 ∥ f2 & ↑f2 = g2. +#g1 #g2 elim (pr_map_split_tl g2) #H2 #H #f1 #H1 +[ lapply (pr_sdj_inv_push_bi … H … H1 H2) +| lapply (pr_sdj_inv_push_next … H … H1 H2) +] -H -H1 +/3 width=3 by ex2_intro, or_introl, or_intror/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj_eq.ma new file mode 100644 index 000000000..18bdc8f43 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj_eq.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 "ground/relocation/pr_tl_eq.ma". +include "ground/relocation/pr_sdj.ma". + +(* DISJOINTNESS FOR PARTIAL RELOCATION MAPS *********************************) + +(* Constructions with pr_eq *************************************************) + +(*** sdj_eq_repl_back1 *) +corec lemma pr_sdj_eq_repl_back_sn: + ∀f2. pr_eq_repl_back … (λf1. f1 ∥ f2). +#f2 #f1 * -f2 -f1 +#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 +[ cases (pr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by pr_sdj_push_bi/ +| cases (pr_eq_inv_next_sn … H0 … H1) -g1 /3 width=5 by pr_sdj_next_push/ +| cases (pr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by pr_sdj_push_next/ +] +qed-. + +(*** sdj_eq_repl_fwd1 *) +lemma pr_sdj_eq_repl_fwd_sn: + ∀f2. pr_eq_repl_fwd … (λf1. f1 ∥ f2). +#f2 @pr_eq_repl_sym /2 width=3 by pr_sdj_eq_repl_back_sn/ +qed-. + +(*** sdj_eq_repl_back2 *) +corec lemma pr_sdj_eq_repl_back_dx: + ∀f1. pr_eq_repl_back … (λf2. f1 ∥ f2). +#f1 #f2 * -f1 -f2 +#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 +[ cases (pr_eq_inv_push_sn … H0 … H2) -g2 /3 width=5 by pr_sdj_push_bi/ +| cases (pr_eq_inv_push_sn … H0 … H2) -g2 /3 width=5 by pr_sdj_next_push/ +| cases (pr_eq_inv_next_sn … H0 … H2) -g2 /3 width=5 by pr_sdj_push_next/ +] +qed-. + +(*** sdj_eq_repl_fwd2 *) +lemma pr_sdj_eq_repl_fwd_dx: + ∀f1. pr_eq_repl_fwd … (λf2. f1 ∥ f2). +#f1 @pr_eq_repl_sym /2 width=3 by pr_sdj_eq_repl_back_dx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj_isi.ma new file mode 100644 index 000000000..f8a942409 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sdj_isi.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 "ground/relocation/pr_isi.ma". +include "ground/relocation/pr_sdj.ma". + +(* DISJOINTNESS FOR PARTIAL RELOCATION MAPS *********************************) + +(* Constructions with pr_isi ************************************************) + +(*** sdj_isid_dx *) +corec lemma pr_sdj_isi_dx: + ∀f2. 𝐈❪f2❫ → ∀f1. f1 ∥ f2. +#f2 * -f2 +#f2 #g2 #Hf2 #H2 #f1 cases (pr_map_split_tl f1) * +/3 width=5 by pr_sdj_next_push, pr_sdj_push_bi/ +qed. + +(*** sdj_isid_sn *) +corec lemma pr_sdj_isi_sn: + ∀f1. 𝐈❪f1❫ → ∀f2. f1 ∥ f2. +#f1 * -f1 +#f1 #g1 #Hf1 #H1 #f2 cases (pr_map_split_tl f2) * +/3 width=5 by pr_sdj_push_next, pr_sdj_push_bi/ +qed. + +(* Inversions with pr_isi ***************************************************) + +(*** sdj_inv_refl *) +corec lemma pr_sdj_inv_refl: + ∀f. f ∥ f → 𝐈❪f❫. +#f cases (pr_map_split_tl f) #Hf #H +[ lapply (pr_sdj_inv_push_bi … H … Hf Hf) -H /3 width=3 by pr_isi_push/ +| elim (pr_sdj_inv_next_bi … H … Hf Hf) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle.ma new file mode 100644 index 000000000..df022a13e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle.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/relocation/pr_tl.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(*** sle *) +coinductive pr_sle: relation pr_map ≝ +(*** sle_push *) +| pr_sle_push (f1) (f2) (g1) (g2): + pr_sle f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → pr_sle g1 g2 +(*** sle_next *) +| pr_sle_next (f1) (f2) (g1) (g2): + pr_sle f1 f2 → ↑f1 = g1 → ↑f2 = g2 → pr_sle g1 g2 +(*** sle_weak *) +| pr_sle_weak (f1) (f2) (g1) (g2): + pr_sle f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → pr_sle g1 g2 +. + +interpretation + "inclusion (partial relocation maps)" + 'subseteq f1 f2 = (pr_sle f1 f2). + +(* Basic constructions ******************************************************) + +(*** sle_refl *) +corec lemma pr_sle_refl: + reflexive … pr_sle. +#f cases (pr_map_split_tl f) #H +[ @(pr_sle_push … H H) | @(pr_sle_next … H H) ] -H // +qed. + +(* Basic inversions *********************************************************) + +(*** sle_inv_xp *) +lemma pr_sle_inv_push_dx: + ∀g1,g2. g1 ⊆ g2 → ∀f2. ⫯f2 = g2 → + ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x2 #Hx2 destruct +[ lapply (eq_inv_pr_push_bi … Hx2) -Hx2 /2 width=3 by ex2_intro/ ] +elim (eq_inv_pr_push_next … Hx2) +qed-. + +(*** sle_inv_nx *) +lemma pr_sle_inv_next_sn: + ∀g1,g2. g1 ⊆ g2 → ∀f1. ↑f1 = g1 → + ∃∃f2. f1 ⊆ f2 & ↑f2 = g2. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #Hx1 destruct +[2: lapply (eq_inv_pr_next_bi … Hx1) -Hx1 /2 width=3 by ex2_intro/ ] +elim (eq_inv_pr_next_push … Hx1) +qed-. + +(*** sle_inv_pn *) +lemma pr_sle_inv_push_next: + ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ⊆ f2. +#g1 #g2 * -g1 -g2 +#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct +[ elim (eq_inv_pr_next_push … Hx2) +| elim (eq_inv_pr_push_next … Hx1) +| lapply (eq_inv_pr_push_bi … Hx1) -Hx1 + lapply (eq_inv_pr_next_bi … Hx2) -Hx2 // +] +qed-. + +(* Advanced inversions ******************************************************) + +(*** sle_inv_pp *) +lemma pr_sle_inv_push_bi: + ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ⊆ f2. +#g1 #g2 #H #f1 #f2 #H1 #H2 +elim (pr_sle_inv_push_dx … H … H2) -g2 #x1 #H #Hx1 destruct +lapply (eq_inv_pr_push_bi … Hx1) -Hx1 // +qed-. + +(*** sle_inv_nn *) +lemma pr_sle_inv_next_bi: + ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → f1 ⊆ f2. +#g1 #g2 #H #f1 #f2 #H1 #H2 +elim (pr_sle_inv_next_sn … H … H1) -g1 #x2 #H #Hx2 destruct +lapply (eq_inv_pr_next_bi … Hx2) -Hx2 // +qed-. + +(*** sle_inv_px *) +lemma pr_sle_inv_push_sn: + ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 → + ∨∨ ∃∃f2. f1 ⊆ f2 & ⫯f2 = g2 + | ∃∃f2. f1 ⊆ f2 & ↑f2 = g2. +#g1 #g2 +elim (pr_map_split_tl g2) #H2 #H #f1 #H1 +[ lapply (pr_sle_inv_push_bi … H … H1 H2) +| lapply (pr_sle_inv_push_next … H … H1 H2) +] -H -H1 +/3 width=3 by ex2_intro, or_introl, or_intror/ +qed-. + +(*** sle_inv_xn *) +lemma pr_sle_inv_next_dx: + ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 → + ∨∨ ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1 + | ∃∃f1. f1 ⊆ f2 & ↑f1 = g1. +#g1 #g2 +elim (pr_map_split_tl g1) #H1 #H #f2 #H2 +[ lapply (pr_sle_inv_push_next … H … H1 H2) +| lapply (pr_sle_inv_next_bi … H … H1 H2) +] -H -H2 +/3 width=3 by ex2_intro, or_introl, or_intror/ +qed-. + +(* Constructions with pr_tl *************************************************) + +(*** sle_px_tl *) +lemma pr_sle_push_sn_tl: + ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 → f1 ⊆ ⫰g2. +#g1 #g2 #H #f1 #H1 +elim (pr_sle_inv_push_sn … H … H1) -H -H1 * // +qed. + +(*** sle_xn_tl *) +lemma pr_sle_next_dx_tl: + ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 → ⫰g1 ⊆ f2. +#g1 #g2 #H #f2 #H2 +elim (pr_sle_inv_next_dx … H … H2) -H -H2 * // +qed. + +(*** sle_tl *) +lemma pr_sle_tl: + ∀f1,f2. f1 ⊆ f2 → ⫰f1 ⊆ ⫰f2. +#f1 elim (pr_map_split_tl f1) #H1 #f2 #H +[ lapply (pr_sle_push_sn_tl … H … H1) -H // +| elim (pr_sle_inv_next_sn … H … H1) -H // +] +qed. + +(* Inversions with pr_tl ****************************************************) + +(*** sle_inv_tl_sn *) +lemma pr_sle_inv_tl_sn: + ∀f1,f2. ⫰f1 ⊆ f2 → f1 ⊆ ↑f2. +#f1 elim (pr_map_split_tl f1) #H #f2 #Hf12 +/2 width=5 by pr_sle_next, pr_sle_weak/ +qed-. + +(*** sle_inv_tl_dx *) +lemma pr_sle_inv_tl_dx: + ∀f1,f2. f1 ⊆ ⫰f2 → ⫯f1 ⊆ f2. +#f1 #f2 elim (pr_map_split_tl f2) #H #Hf12 +/2 width=5 by pr_sle_push, pr_sle_weak/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_eq.ma new file mode 100644 index 000000000..383ad127f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_eq.ma @@ -0,0 +1,60 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_sle.ma". +(* * this should go first *) +include "ground/relocation/pr_tl_eq.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(* Constructions with pr_eq *************************************************) + +(*** sle_eq_repl_back1 *) +corec lemma pr_sle_eq_repl_back_sn: + ∀f2:pr_map. pr_eq_repl_back … (λf1:pr_map. f1 ⊆ f2). +#f2 #f1 * -f2 -f1 +#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 +[ cases (pr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by pr_sle_push/ +| cases (pr_eq_inv_next_sn … H0 … H1) -g1 /3 width=5 by pr_sle_next/ +| cases (pr_eq_inv_push_sn … H0 … H1) -g1 /3 width=5 by pr_sle_weak/ +] +qed-. + +(*** sle_eq_repl_fwd1 *) +lemma pr_sle_eq_repl_fwd_sn: + ∀f2. pr_eq_repl_fwd … (λf1. f1 ⊆ f2). +#f2 @pr_eq_repl_sym /2 width=3 by pr_sle_eq_repl_back_sn/ +qed-. + +(*** sle_eq_repl_back2 *) +corec lemma pr_sle_eq_repl_back_dx: + ∀f1. pr_eq_repl_back … (λf2. f1 ⊆ f2). +#f1 #f2 * -f1 -f2 +#f1 #f2 #g1 #g2 #Hf #H1 #H2 #g #H0 +[ cases (pr_eq_inv_push_sn … H0 … H2) -g2 /3 width=5 by pr_sle_push/ +| cases (pr_eq_inv_next_sn … H0 … H2) -g2 /3 width=5 by pr_sle_next/ +| cases (pr_eq_inv_next_sn … H0 … H2) -g2 /3 width=5 by pr_sle_weak/ +] +qed-. + +(*** sle_eq_repl_fwd2 *) +lemma pr_sle_eq_repl_fwd_dx: + ∀f1. pr_eq_repl_fwd … (λf2. f1 ⊆ f2). +#f1 @pr_eq_repl_sym /2 width=3 by pr_sle_eq_repl_back_dx/ +qed-. + +(*** sle_refl_eq *) +lemma pr_sle_refl_eq: + ∀f1,f2. f1 ≡ f2 → f1 ⊆ f2. +/2 width=3 by pr_sle_eq_repl_back_dx/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_isd.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_isd.ma new file mode 100644 index 000000000..1f92d0cf9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_isd.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 "ground/relocation/pr_isd.ma". +include "ground/relocation/pr_sle.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(* Constructions with pr_isd ************************************************) + +(*** sle_isdiv_dx *) +corec lemma pr_sle_isd_dx: + ∀f2. 𝛀❪f2❫ → ∀f1. f1 ⊆ f2. +#f2 * -f2 +#f2 #g2 #Hf2 #H2 #f1 cases (pr_map_split_tl f1) * +/3 width=5 by pr_sle_weak, pr_sle_next/ +qed. + +(* Inversions with pr_isd ***************************************************) + +(*** sle_inv_isdiv_sn *) +corec lemma pr_sle_inv_isd_sn: + ∀f1,f2. f1 ⊆ f2 → 𝛀❪f1❫ → 𝛀❪f2❫. +#f1 #f2 * -f1 -f2 +#f1 #f2 #g1 #g2 #Hf * * #H +[1,3: elim (pr_isd_inv_push … H) // ] +lapply (pr_isd_inv_next … H ??) -H +/3 width=3 by pr_isd_next/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_isi.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_isi.ma new file mode 100644 index 000000000..ffe97e69f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_isi.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 "ground/relocation/pr_isi.ma". +include "ground/relocation/pr_sle.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(* Constructions with pr_isi ************************************************) + +(*** sle_isid_sn *) +corec lemma pr_sle_isi_sn: + ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⊆ f2. +#f1 * -f1 +#f1 #g1 #Hf1 #H1 #f2 cases (pr_map_split_tl f2) * +/3 width=5 by pr_sle_weak, pr_sle_push/ +qed. + +(* Inversions with pr_isi ***************************************************) + +(*** sle_inv_isid_dx *) +corec lemma pr_sle_inv_isi_dx: + ∀f1,f2. f1 ⊆ f2 → 𝐈❪f2❫ → 𝐈❪f1❫. +#f1 #f2 * -f1 -f2 +#f1 #f2 #g1 #g2 #Hf * * #H +[2,3: elim (pr_isi_inv_next … H) // ] +lapply (pr_isi_inv_push … H ??) -H +/3 width=3 by pr_isi_push/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_pushs.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_pushs.ma new file mode 100644 index 000000000..f07999742 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_pushs.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 "ground/relocation/pr_pushs.ma". +include "ground/relocation/pr_sle.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(* Constructions with pr_pushs **********************************************) + +(*** sle_pushs *) +lemma pr_sle_pushs: + ∀f1,f2. f1 ⊆ f2 → ∀n. ⫯*[n] f1 ⊆ ⫯*[n] f2. +#f1 #f2 #Hf12 #n @(nat_ind_succ … n) -n +/2 width=5 by pr_sle_push/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_sle.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_sle.ma new file mode 100644 index 000000000..b7a70962c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_sle.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 "ground/relocation/pr_sle.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(* Main constructions *******************************************************) + +(*** sle_trans *) +corec theorem pr_sle_trans: + Transitive … pr_sle. +#f1 #f * -f1 -f +#f1 #f #g1 #g #Hf #H1 #H #g2 #H0 +[ cases (pr_sle_inv_push_sn … H0 … H) * +|*: cases (pr_sle_inv_next_sn … H0 … H) +] -g +/3 width=5 by pr_sle_push, pr_sle_next, pr_sle_weak/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_tls.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_tls.ma new file mode 100644 index 000000000..3b4b42e46 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sle_tls.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 "ground/relocation/pr_tls.ma". +include "ground/relocation/pr_sle.ma". + +(* INCLUSION FOR PARTIAL RELOCATION MAPS ************************************) + +(* Constructions with pr_tls ************************************************) + +(*** sle_tls *) +lemma pr_sle_tls: + ∀f1,f2. f1 ⊆ f2 → ∀n. ⫰*[n] f1 ⊆ ⫰*[n] f2. +#f1 #f2 #Hf12 #n @(nat_ind_succ … n) -n +/2 width=5 by pr_sle_tl/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor.ma new file mode 100644 index 000000000..0d9f2a8ea --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor.ma @@ -0,0 +1,340 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/notation/relations/runion_3.ma". +include "ground/xoa/or_3.ma". +include "ground/xoa/ex_3_2.ma". +include "ground/relocation/pr_tl.ma". + +(* RELATIONAL UNION FOR PARTIAL RELOCATION MAPS *****************************) + +(*** sor *) +coinductive pr_sor: relation3 pr_map pr_map pr_map ≝ +(*** sor_pp *) +| pr_sor_push_bi (f1) (f2) (f) (g1) (g2) (g): + pr_sor f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → pr_sor g1 g2 g +(*** sor_np *) +| pr_sor_next_push (f1) (f2) (f) (g1) (g2) (g): + pr_sor f1 f2 f → ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → pr_sor g1 g2 g +(*** sor_pn *) +| pr_sor_push_next (f1) (f2) (f) (g1) (g2) (g): + pr_sor f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → pr_sor g1 g2 g +(*** sor_nn *) +| pr_sor_next_bi (f1) (f2) (f) (g1) (g2) (g): + pr_sor f1 f2 f → ↑f1 = g1 → ↑f2 = g2 → ↑f = g → pr_sor g1 g2 g +. + +interpretation + "relational union (partial relocation maps)" + 'RUnion f1 f2 f = (pr_sor f1 f2 f). + +(* Basic constructions ******************************************************) + +(*** sor_idem *) +corec lemma pr_sor_idem: + ∀f. f ⋓ f ≘ f. +#f cases (pr_map_split_tl f) #H +[ @(pr_sor_push_bi … H H H) +| @(pr_sor_next_bi … H H H) +] -H // +qed. + +(*** sor_comm *) +corec lemma pr_sor_comm: + ∀f1,f2,f. f1 ⋓ f2 ≘ f → f2 ⋓ f1 ≘ f. +#f1 #f2 #f * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf * * * -g1 -g2 -g +[ @pr_sor_push_bi | @pr_sor_push_next | @pr_sor_next_push | @pr_sor_next_bi ] /2 width=7 by/ +qed-. + +(* Basic inversions *********************************************************) + +(*** sor_inv_ppx *) +lemma pr_sor_inv_push_bi: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → + ∃∃f. f1 ⋓ f2 ≘ f & ⫯f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(*** sor_inv_npx *) +lemma pr_sor_inv_next_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → + ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(*** sor_inv_pnx *) +lemma pr_sor_inv_push_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → + ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(*** sor_inv_nnx *) +lemma pr_sor_inv_next_bi: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → + ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g. +#g1 #g2 #g * -g1 -g2 -g +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct +try (>(eq_inv_pr_push_bi … Hx1) -x1) try (>(eq_inv_pr_next_bi … Hx1) -x1) +try elim (eq_inv_pr_push_next … Hx1) try elim (eq_inv_pr_next_push … Hx1) +try (>(eq_inv_pr_push_bi … Hx2) -x2) try (>(eq_inv_pr_next_bi … Hx2) -x2) +try elim (eq_inv_pr_push_next … Hx2) try elim (eq_inv_pr_next_push … Hx2) +/2 width=3 by ex2_intro/ +qed-. + +(* Advanced inversions ******************************************************) + +(*** sor_inv_ppn *) +lemma pr_sor_inv_push_bi_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥. +#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 +elim (pr_sor_inv_push_bi … H … H1 H2) -g1 -g2 #x #_ #H destruct +/2 width=3 by eq_inv_pr_push_next/ +qed-. + +(*** sor_inv_nxp *) +lemma pr_sor_inv_next_sn_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥. +#g1 #g2 #g #H #f1 #f #H1 #H0 +elim (pr_map_split_tl g2) #H2 +[ elim (pr_sor_inv_next_push … H … H1 H2) +| elim (pr_sor_inv_next_bi … H … H1 H2) +] -g1 #x #H +/2 width=3 by eq_inv_pr_next_push/ +qed-. + +(*** sor_inv_xnp *) +lemma pr_sor_inv_next_dx_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f2,f. ↑f2 = g2 → ⫯f = g → ⊥. +#g1 #g2 #g #H #f2 #f #H2 #H0 +elim (pr_map_split_tl g1) #H1 +[ elim (pr_sor_inv_push_next … H … H1 H2) +| elim (pr_sor_inv_next_bi … H … H1 H2) +] -g2 #x #H +/2 width=3 by eq_inv_pr_next_push/ +qed-. + +(*** sor_inv_ppp *) +lemma pr_sor_inv_push_bi_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⋓ f2 ≘ f. +#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 +elim (pr_sor_inv_push_bi … H … H1 H2) -g1 -g2 #x #Hx #H destruct +<(eq_inv_pr_push_bi … H) -f // +qed-. + +(*** sor_inv_npn *) +lemma pr_sor_inv_next_push_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f2,f. ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f. +#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 +elim (pr_sor_inv_next_push … H … H1 H2) -g1 -g2 #x #Hx #H destruct +<(eq_inv_pr_next_bi … H) -f // +qed-. + +(*** sor_inv_pnn *) +lemma pr_sor_inv_push_next_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f. +#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 +elim (pr_sor_inv_push_next … H … H1 H2) -g1 -g2 #x #Hx #H destruct +<(eq_inv_pr_next_bi … H) -f // +qed-. + +(*** sor_inv_nnn *) +lemma pr_sor_inv_next_bi_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f2,f. ↑f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f. +#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0 +elim (pr_sor_inv_next_bi … H … H1 H2) -g1 -g2 #x #Hx #H destruct +<(eq_inv_pr_next_bi … H) -f // +qed-. + +(*** sor_inv_pxp *) +lemma pr_sor_inv_push_sn_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f. ⫯f1 = g1 → ⫯f = g → + ∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2. +#g1 #g2 #g #H #f1 #f #H1 #H0 +elim (pr_map_split_tl g2) #H2 +[ /3 width=7 by pr_sor_inv_push_bi_push, ex2_intro/ +| elim (pr_sor_inv_next_dx_push … H … H2 H0) +] +qed-. + +(*** sor_inv_xpp *) +lemma pr_sor_inv_push_dx_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f2,f. ⫯f2 = g2 → ⫯f = g → + ∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1. +#g1 #g2 #g #H #f2 #f #H2 #H0 +elim (pr_map_split_tl g1) #H1 +[ /3 width=7 by pr_sor_inv_push_bi_push, ex2_intro/ +| elim (pr_sor_inv_next_sn_push … H … H1 H0) +] +qed-. + +(*** sor_inv_pxn *) +lemma pr_sor_inv_push_sn_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f. ⫯f1 = g1 → ↑f = g → + ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2. +#g1 #g2 #g #H #f1 #f #H1 #H0 +elim (pr_map_split_tl g2) #H2 +[ elim (pr_sor_inv_push_bi_next … H … H1 H2 H0) +| /3 width=7 by pr_sor_inv_push_next_next, ex2_intro/ +] +qed-. + +(*** sor_inv_xpn *) +lemma pr_sor_inv_push_dx_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f2,f. ⫯f2 = g2 → ↑f = g → + ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1. +#g1 #g2 #g #H #f2 #f #H2 #H0 +elim (pr_map_split_tl g1) #H1 +[ elim (pr_sor_inv_push_bi_next … H … H1 H2 H0) +| /3 width=7 by pr_sor_inv_next_push_next, ex2_intro/ +] +qed-. + +(*** sor_inv_xxp *) +lemma pr_sor_inv_push: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ⫯f = g → + ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2. +#g1 #g2 #g #H #f #H0 +elim (pr_map_split_tl g1) #H1 +[ elim (pr_sor_inv_push_sn_push … H … H1 H0) -g /2 width=5 by ex3_2_intro/ +| elim (pr_sor_inv_next_sn_push … H … H1 H0) +] +qed-. + +(*** sor_inv_nxn *) +lemma pr_sor_inv_next_sn_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f1,f. ↑f1 = g1 → ↑f = g → + ∨∨ ∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2 + | ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2. +#g1 #g2 elim (pr_map_split_tl g2) +/4 width=7 by pr_sor_inv_next_push_next, pr_sor_inv_next_bi_next, ex2_intro, or_intror, or_introl/ +qed-. + +(*** sor_inv_xnn *) +lemma pr_sor_inv_next_dx_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → + ∀f2,f. ↑f2 = g2 → ↑f = g → + ∨∨ ∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1 + | ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1. +#g1 elim (pr_map_split_tl g1) +/4 width=7 by pr_sor_inv_push_next_next, pr_sor_inv_next_bi_next, ex2_intro, or_intror, or_introl/ +qed-. + +(*** sor_inv_xxn *) +lemma pr_sor_inv_next: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g → + ∨∨ ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫯f2 = g2 + | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2 + | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ↑f2 = g2. +#g1 #g2 #g #H #f #H0 +elim (pr_map_split_tl g1) #H1 +[ elim (pr_sor_inv_push_sn_next … H … H1 H0) -g + /3 width=5 by or3_intro1, ex3_2_intro/ +| elim (pr_sor_inv_next_sn_next … H … H1 H0) -g * + /3 width=5 by or3_intro0, or3_intro2, ex3_2_intro/ +] +qed-. + +(* Constructions with pr_tl *************************************************) + +(*** sor_tl *) +lemma pr_sor_tl: + ∀f1,f2,f. f1 ⋓ f2 ≘ f → ⫰f1 ⋓ ⫰f2 ≘ ⫰f. +#f1 cases (pr_map_split_tl f1) #H1 +#f2 cases (pr_map_split_tl f2) #H2 +#f #Hf +[ cases (pr_sor_inv_push_bi … Hf … H1 H2) +| cases (pr_sor_inv_push_next … Hf … H1 H2) +| cases (pr_sor_inv_next_push … Hf … H1 H2) +| cases (pr_sor_inv_next_bi … Hf … H1 H2) +] -Hf #g #Hg #H destruct // +qed. + +(*** sor_xxn_tl *) +lemma pr_sor_next_tl: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g → + (∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫰g2 = f2) ∨ + (∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫰g1 = f1 & ↑f2 = g2). +#g1 #g2 #g #H #f #H0 elim (pr_sor_inv_next … H … H0) -H -H0 * +/3 width=5 by ex3_2_intro, or_introl, or_intror/ +qed-. + +(*** sor_xnx_tl *) +lemma pr_sor_next_dx_tl: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f2. ↑f2 = g2 → + ∃∃f1,f. f1 ⋓ f2 ≘ f & ⫰g1 = f1 & ↑f = g. +#g1 elim (pr_map_split_tl g1) #H1 #g2 #g #H #f2 #H2 +[ elim (pr_sor_inv_push_next … H … H1 H2) +| elim (pr_sor_inv_next_bi … H … H1 H2) +] -g2 +/3 width=5 by ex3_2_intro/ +qed-. + +(*** sor_nxx_tl *) +lemma pr_sor_next_sn_tl: + ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1. ↑f1 = g1 → + ∃∃f2,f. f1 ⋓ f2 ≘ f & ⫰g2 = f2 & ↑f = g. +#g1 #g2 elim (pr_map_split_tl g2) #H2 #g #H #f1 #H1 +[ elim (pr_sor_inv_next_push … H … H1 H2) +| elim (pr_sor_inv_next_bi … H … H1 H2) +] -g1 +/3 width=5 by ex3_2_intro/ +qed-. + +(* Inversions with pr_tl ****************************************************) + +(*** sor_inv_tl_sn *) +lemma pr_sor_inv_tl_sn: + ∀f1,f2,f. ⫰f1 ⋓ f2 ≘ f → f1 ⋓ ↑f2 ≘ ↑f. +#f1 #f2 #f elim (pr_map_split_tl f1) +/2 width=7 by pr_sor_push_next, pr_sor_next_bi/ +qed-. + +(*** sor_inv_tl_dx *) +lemma pr_sor_inv_tl_dx: + ∀f1,f2,f. f1 ⋓ ⫰f2 ≘ f → ↑f1 ⋓ f2 ≘ ↑f. +#f1 #f2 #f elim (pr_map_split_tl f2) +/2 width=7 by pr_sor_next_push, pr_sor_next_bi/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_coafter_ist_isf.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_coafter_ist_isf.ma new file mode 100644 index 000000000..f7124644f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_coafter_ist_isf.ma @@ -0,0 +1,76 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_isf.ma". +include "ground/relocation/pr_coafter_isi.ma". +include "ground/relocation/pr_coafter_ist_isi.ma". +include "ground/relocation/pr_sor_isi.ma". + +(* RELATIONAL UNION FOR PARTIAL RELOCATION MAPS *****************************) + +(* Constructions with pr_coafter and pr_ist and pr_isf **********************) + +(*** coafter_sor *) +lemma pr_sor_coafter_dx_tans: + ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀f1a,f1b. f1a ⋓ f1b ≘ f1 → + ∃∃fa,fb. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & fa ⋓ fb ≘ f. +@pr_isf_ind +[ #f #Hf #f2 #Hf2 #f1 #Hf #f1a #f1b #Hf1 + lapply (pr_coafter_des_ist_sn_isi … Hf ??) -Hf // #H2f1 + elim (pr_sor_inv_isi … Hf1) -Hf1 // + /3 width=5 by pr_coafter_isi_dx, pr_sor_idem, ex3_2_intro/ +| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2 + elim (pr_coafter_inv_push … H1) -H1 [1,3: * |*: // ] + [ #g2 #g1 #Hf #Hgf2 #Hgf1 + elim (pr_sor_inv_push … H2) -H2 [ |*: // ] #ga #gb #Hg1 + lapply (pr_ist_inv_push … Hf2 … Hgf2) -Hf2 #Hg2 + elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2 + /3 width=11 by pr_coafter_refl, pr_sor_push_bi, ex3_2_intro/ + | #g2 #Hf #Hgf2 + lapply (pr_ist_inv_next … Hf2 … Hgf2) -Hf2 #Hg2 + elim (IH … Hf … H2) // -f1 -IH -Hg2 + /3 width=11 by pr_coafter_next, pr_sor_push_bi, ex3_2_intro/ + ] +| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2 + elim (pr_coafter_inv_next … H1) -H1 [ |*: // ] #g2 #g1 #Hf #Hgf2 #Hgf1 + lapply (pr_ist_inv_push … Hf2 … Hgf2) -Hf2 #Hg2 + elim (pr_sor_inv_next … H2) -H2 [1,3,4: * |*: // ] #ga #gb #Hg1 + elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2 + /3 width=11 by pr_coafter_refl, pr_coafter_push, pr_sor_next_push, pr_sor_push_next, pr_sor_next_bi, ex3_2_intro/ +] +qed-. + +(*** coafter_inv_sor *) +lemma pr_sor_coafter_div: + ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀fa,fb. fa ⋓ fb ≘ f → + ∃∃f1a,f1b. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & f1a ⋓ f1b ≘ f1. +@pr_isf_ind +[ #f #Hf #f2 #Hf2 #f1 #H1f #fa #fb #H2f + elim (pr_sor_inv_isi … H2f) -H2f // + lapply (pr_coafter_des_ist_sn_isi … H1f ??) -H1f // + /3 width=5 by ex3_2_intro, pr_coafter_isi_dx, pr_sor_isi_bi_isi/ +| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2 + elim (pr_sor_inv_push … H2) -H2 [ |*: // ] #ga #gb #H2f + elim (pr_coafter_inv_push … H1) -H1 [1,3: * |*: // ] #g2 [ #g1 ] #H1f #Hgf2 + [ lapply (pr_ist_inv_push … Hf2 … Hgf2) | lapply (pr_ist_inv_next … Hf2 … Hgf2) ] -Hf2 #Hg2 + elim (IH … Hg2 … H1f … H2f) -f -Hg2 + /3 width=11 by pr_sor_push_bi, ex3_2_intro, pr_coafter_refl, pr_coafter_next/ +| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2 + elim (pr_coafter_inv_next … H1) -H1 [ |*: // ] #g2 #g1 #H1f #Hgf2 + lapply (pr_ist_inv_push … Hf2 … Hgf2) -Hf2 #Hg2 + elim (pr_sor_inv_next … H2) -H2 [1,3,4: * |*: // ] #ga #gb #H2f + elim (IH … Hg2 … H1f … H2f) -f -Hg2 + /3 width=11 by pr_sor_next_push, pr_sor_push_next, pr_sor_next_bi, ex3_2_intro, pr_coafter_refl, pr_coafter_push/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_eq.ma new file mode 100644 index 000000000..fca04522c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_eq.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM 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/relocation/pr_tl_eq.ma". +include "ground/relocation/pr_sor.ma". + +(* RELATIONAL UNION FOR PARTIAL RELOCATION MAPS *****************************) + +(* Constructions with pr_eq *************************************************) + +(*** sor_eq_repl_back1 *) +corec lemma pr_sor_eq_repl_back_sn: + ∀f2,f. pr_eq_repl_back … (λf1. f1 ⋓ f2 ≘ f). +#f2 #f #f1 * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx +try cases (pr_eq_inv_push_sn … Hx … H1) try cases (pr_eq_inv_next_sn … Hx … H1) -g1 +/3 width=7 by pr_sor_push_bi, pr_sor_next_push, pr_sor_push_next, pr_sor_next_bi/ +qed-. + +(*** sor_eq_repl_fwd1 *) +lemma pr_sor_eq_repl_fwd_sn: + ∀f2,f. pr_eq_repl_fwd … (λf1. f1 ⋓ f2 ≘ f). +#f2 #f @pr_eq_repl_sym /2 width=3 by pr_sor_eq_repl_back_sn/ +qed-. + +(*** sor_eq_repl_back2 *) +corec lemma pr_sor_eq_repl_back_dx: + ∀f1,f. pr_eq_repl_back … (λf2. f1 ⋓ f2 ≘ f). +#f1 #f #f2 * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx +try cases (pr_eq_inv_push_sn … Hx … H2) try cases (pr_eq_inv_next_sn … Hx … H2) -g2 +/3 width=7 by pr_sor_push_bi, pr_sor_next_push, pr_sor_push_next, pr_sor_next_bi/ +qed-. + +(*** sor_eq_repl_fwd2 *) +lemma pr_sor_eq_repl_fwd_dx: + ∀f1,f. pr_eq_repl_fwd … (λf2. f1 ⋓ f2 ≘ f). +#f1 #f @pr_eq_repl_sym /2 width=3 by pr_sor_eq_repl_back_dx/ +qed-. + +(*** sor_eq_repl_back3 *) +corec lemma pr_sor_eq_repl_back: + ∀f1,f2. pr_eq_repl_back … (λf. f1 ⋓ f2 ≘ f). +#f1 #f2 #f * -f1 -f2 -f +#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx +try cases (pr_eq_inv_push_sn … Hx … H0) try cases (pr_eq_inv_next_sn … Hx … H0) -g +/3 width=7 by pr_sor_push_bi, pr_sor_next_push, pr_sor_push_next, pr_sor_next_bi/ +qed-. + +(*** sor_eq_repl_fwd3 *) +lemma pr_sor_eq_repl_fwd: + ∀f1,f2. pr_eq_repl_fwd … (λf. f1 ⋓ f2 ≘ f). +#f1 #f2 @pr_eq_repl_sym /2 width=3 by pr_sor_eq_repl_back/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_fcla.ma b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_fcla.ma new file mode 100644 index 000000000..a1275f2cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/pr_sor_fcla.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 "ground/xoa/ex_3_1.ma". +include "ground/xoa/ex_4_2.ma". +include "ground/arith/nat_plus.ma". +include "ground/arith/nat_le_max.ma". +include "ground/relocation/pr_fcla_eq.ma". +include "ground/relocation/pr_sor_isi.ma". + +(* RELATIONAL UNION FOR PARTIAL RELOCATION MAPS *****************************) + +(* Constructions with pr_fcla ***********************************************) + +(*** sor_fcla_ex *) +lemma pr_sor_fcla_bi: + ∀f1,n1. 𝐂❪f1❫ ≘ n1 → ∀f2,n2. 𝐂❪f2❫ ≘ n2 → + ∃∃f,n. f1 ⋓ f2 ≘ f & 𝐂❪f❫ ≘ n & (n1 ∨ n2) ≤ n & n ≤ n1 + n2. +#f1 #n1 #Hf1 elim Hf1 -f1 -n1 /3 width=6 by pr_sor_isi_sn, ex4_2_intro/ +#f1 #n1 #Hf1 #IH #f2 #n2 * -f2 -n2 /3 width=6 by pr_fcla_push, pr_fcla_next, ex4_2_intro, pr_sor_isi_dx/ +#f2 #n2 #Hf2 elim (IH … Hf2) -IH -Hf2 -Hf1 [2,4: #f #n