]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/pr_nexts_eq.ma
made executable again
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / pr_nexts_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_tl_eq.ma".
16 include "ground/relocation/pr_nexts.ma".
17
18 (* ITERATED NEXT FOR PARTIAL RELOCATION MAPS ********************************)
19
20 (* Constructions with pr_eq *************************************************)
21
22 (*** nexts_eq_repl *)
23 lemma pr_nexts_eq_repl (n):
24       pr_eq_repl (λf1,f2. ↑*[n] f1 ≐ ↑*[n] f2).
25 #n @(nat_ind_succ … n) -n
26 /3 width=5 by pr_eq_next/
27 qed.
28
29 (* Inversions with pr_eq ****************************************************)
30
31 lemma pr_eq_inv_nexts_push_bi (f1) (f2) (n1) (n2):
32       ↑*[n1] ⫯f1 ≐ ↑*[n2] ⫯f2 →
33       ∧∧ n1 = n2 & f1 ≐ f2.
34 #f1 #f2
35 #n1 @(nat_ind_succ … n1) -n1 [| #n1 #IH ]
36 #n2 @(nat_ind_succ … n2) -n2 [2,4: #n2 #_ ]
37 [ <pr_nexts_zero <pr_nexts_succ #H
38   elim (pr_eq_inv_push_next … H) -H //
39 | <pr_nexts_succ <pr_nexts_succ #H
40   lapply (pr_eq_inv_next_bi … H ????) -H [5:|*: // ] #H
41   elim (IH … H) -IH -H /2 width=1 by conj/
42 | <pr_nexts_zero <pr_nexts_zero #H
43   lapply (pr_eq_inv_push_bi … H ????) -H [5:|*: // ] #H
44   /2 width=1 by conj/
45 | <pr_nexts_succ <pr_nexts_zero #H
46   elim (pr_eq_inv_next_push … H) -H //
47 ]
48 qed-.