]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/tr_eq.ma
made executable again
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / tr_eq.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "ground/relocation/pr_nexts_eq.ma".
16 include "ground/relocation/tr_nexts.ma".
17
18 (* TOTAL RELOCATION MAPS ****************************************************)
19
20 (* Constructions with pr_eq and stream_eq ***********************************)
21
22 corec lemma eq_tr_inj_bi (f1) (f2): f1 ≗ f2 → 𝐭❨f1❩ ≐ 𝐭❨f2❩.
23 * -f1 -f2 #p1 #p2 #f1 #f2 * -p2 #H
24 cases p1 -p1
25 [ @pr_eq_push /2 width=5 by/
26 | #p @pr_eq_next [3:|*: //]
27   cases tr_inj_fold cases tr_inj_fold
28   /3 width=5 by stream_eq_cons/
29 ]
30 qed.
31
32 (* Inversions with pr_eq and stream_eq **************************************)
33
34 corec lemma eq_inv_tr_inj_bi (f1) (f2): 𝐭❨f1❩ ≐ 𝐭❨f2❩ → f1 ≗ f2.
35 cases f1 -f1 #p1 #f1 cases f2 -f2 #p2 #f2
36 cases tr_inj_unfold cases tr_inj_unfold #H
37 cases (pr_eq_inv_nexts_push_bi … H) -H #H1 #H2
38 @stream_eq_cons /2 width=1 by/
39 qed-.