1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground/notation/functions/uparrowstar_2.ma".
16 include "ground/arith/nat_succ_iter.ma".
17 include "ground/relocation/rtmap_eq.ma".
19 (* RELOCATION MAP ***********************************************************)
21 definition nexts (f:rtmap) (n:nat) ≝ next^n f.
23 interpretation "nexts (rtmap)" 'UpArrowStar n f = (nexts f n).
25 (* Basic properties *********************************************************)
27 lemma nexts_O: ∀f. f = ↑*[𝟎] f.
30 lemma nexts_S: ∀f,n. ↑↑*[n] f = ↑*[↑n] f.
31 #f #n @(niter_succ … next)
34 lemma nexts_eq_repl: ∀n. eq_repl (λf1,f2. ↑*[n] f1 ≡ ↑*[n] f2).
35 #n @(nat_ind_succ … n) -n /3 width=5 by eq_next/
38 (* Advanced properties ******************************************************)
40 lemma nexts_swap: ∀f,n. ↑↑*[n] f = ↑*[n] ↑f.
41 #f #n @(niter_appl … next)
44 lemma nexts_xn: ∀n,f. ↑*[n] ↑f = ↑*[↑n] f.
47 (* Basic_inversion lemmas *****************************************************)
49 lemma eq_inv_nexts_sn: ∀n,f1,g2. ↑*[n] f1 ≡ g2 →
50 ∃∃f2. f1 ≡ f2 & ↑*[n] f2 = g2.
51 #n @(nat_ind_succ … n) -n /2 width=3 by ex2_intro/
52 #n #IH #f1 #g2 #H elim (eq_inv_nx … H) -H [|*: // ]
53 #f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
54 /2 width=3 by ex2_intro/
57 lemma eq_inv_nexts_dx: ∀n,f2,g1. g1 ≡ ↑*[n] f2 →
58 ∃∃f1. f1 ≡ f2 & ↑*[n] f1 = g1.
59 #n @(nat_ind_succ … n) -n /2 width=3 by ex2_intro/
60 #n #IH #f2 #g1 #H elim (eq_inv_xn … H) -H [|*: // ]
61 #f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
62 /2 width=3 by ex2_intro/