X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground%2Frelocation%2Fgr_pat_eq.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground%2Frelocation%2Fgr_pat_eq.ma;h=ad51d7f856372379e5b7d269eac7edbc12d43920;hb=55c768d7e45babb300b5010463ba3196a68f1bbe;hp=0000000000000000000000000000000000000000;hpb=15212e44902f25536f6e2de4bec4cedcd9a9804d;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat_eq.ma b/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat_eq.ma new file mode 100644 index 000000000..ad51d7f85 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/gr_pat_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/gr_tl_eq.ma". +include "ground/relocation/gr_pat_lt.ma". + +(* POSITIVE APPLICATION FOR GENERIC RELOCATION MAPS ***********************************************************) + +(* Properties with gr_eq *) + +(*** at_eq_repl_back *) +corec lemma gr_pat_eq_repl_back (i1) (i2): + gr_eq_repl_back (λf. @❪i1,f❫ ≘ i2). +#f1 * -f1 -i1 -i2 +[ #f1 #g1 #j1 #j2 #H #H1 #H2 #f2 #H12 + cases (gr_eq_inv_push_sn … H12 … H) -g1 /2 width=2 by gr_pat_refl/ +| #f1 #i1 #i2 #Hf1 #g1 #j1 #j2 #H #H1 #H2 #f2 #H12 + cases (gr_eq_inv_push_sn … H12 … H) -g1 /3 width=7 by gr_pat_push/ +| #f1 #i1 #i2 #Hf1 #g1 #j2 #H #H2 #f2 #H12 + cases (gr_eq_inv_next_sn … H12 … H) -g1 /3 width=5 by gr_pat_next/ +] +qed-. + +(*** at_eq_repl_fwd *) +lemma gr_pat_eq_repl_fwd (i1) (i2): + gr_eq_repl_fwd (λf. @❪i1,f❫ ≘ i2). +#i1 #i2 @gr_eq_repl_sym /2 width=3 by gr_pat_eq_repl_back/ +qed-. + +lemma gr_pat_eq (f): ⫯f ≡ f → ∀i. @❪i,f❫ ≘ i. +#f #Hf #i elim i -i +[ /3 width=3 by gr_pat_eq_repl_back, gr_pat_refl/ +| /3 width=7 by gr_pat_eq_repl_back, gr_pat_push/ +] +qed. + +(* Inversions with gr_eq *) + +corec lemma gr_pat_inv_eq (f): + (∀i. @❪i,f❫ ≘ i) → ⫯f ≡ f. +#Hf +lapply (Hf (𝟏)) #H +lapply (gr_pat_des_id … H) -H #H +cases H in Hf; -H #Hf +@gr_eq_push [3:|*: // ] +/3 width=7 by gr_pat_inv_succ_push_succ/ +qed-.