From 04f2f61dbe017ee5a60fd30ae4b6ef355b6e8be4 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Mon, 20 Dec 2021 19:08:34 +0100 Subject: [PATCH] update in ground + composition for total relocation maps --- .../ground/relocation/tr_compose.ma | 58 +++++++++++++++++++ .../tr_compose_etc.ma} | 48 --------------- .../ground/relocation/tr_compose_pn.ma | 50 ++++++++++++++++ .../tr_pn_hdtl.ma} | 14 +++-- .../tr_pn_tls.ma} | 13 +++-- .../lambdadelta/ground/web/ground_src.tbl | 3 +- 6 files changed, 127 insertions(+), 59 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/ground/relocation/tr_compose.ma rename matita/matita/contribs/lambdadelta/ground/{etc/relocation/pstream_after.etc => relocation/tr_compose_etc.ma} (75%) create mode 100644 matita/matita/contribs/lambdadelta/ground/relocation/tr_compose_pn.ma rename matita/matita/contribs/lambdadelta/ground/{etc/relocation/pstream_tl.etc => relocation/tr_pn_hdtl.ma} (78%) rename matita/matita/contribs/lambdadelta/ground/{etc/relocation/pstream_tls.etc => relocation/tr_pn_tls.ma} (77%) diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/tr_compose.ma b/matita/matita/contribs/lambdadelta/ground/relocation/tr_compose.ma new file mode 100644 index 000000000..645b3b07b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/tr_compose.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/lib/stream_tls.ma". +include "ground/relocation/tr_pap.ma". + +(* COMPOSITION FOR PARTIAL RELOCATION MAPS **********************************) + +corec definition tr_compose: tr_map → tr_map → tr_map. +#f2 * #p1 #f1 +@(stream_cons … (f2@❨p1❩)) +@(tr_compose ? f1) -tr_compose -f1 +@(⇂*[p1]f2) +defined. + +interpretation + "composition (total relocation maps)" + 'compose f2 f1 = (tr_compose f2 f1). + +(* Basic constructions ******************************************************) + +(*** compose_rew *) +lemma tr_compose_unfold (f2) (f1): + ∀p1. f2@❨p1❩⨮(⇂*[p1]f2)∘f1 = f2∘(p1⨮f1). +#f2 #f1 #p1 <(stream_unfold … (f2∘(p1⨮f1))) // +qed. + +(* Basic inversions *********************************************************) + +(*** compose_inv_rew *) +lemma tr_compose_inv_unfold (f2) (f1): + ∀f,p1,p. f2∘(p1⨮f1) = p⨮f → + ∧∧ f2@❨p1❩ = p & (⇂*[p1]f2)∘f1 = f. +#f2 #f1 #f #p1 #p +nsucc_inj nsucc_inj (npsucc_pred p) (npsucc_pred p)