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/upspoonstar_2.ma".
16 include "ground/arith/nat_succ_iter.ma".
17 include "ground/relocation/rtmap_eq.ma".
19 (* RELOCATION MAP ***********************************************************)
21 definition pushs (f:rtmap) (n:nat) ≝ push^n f.
23 interpretation "pushs (rtmap)" 'UpSpoonStar n f = (pushs f n).
25 (* Basic properties *********************************************************)
27 lemma pushs_O: ∀f. f = ⫯*[𝟎] f.
30 lemma pushs_S: ∀f,n. ⫯⫯*[n] f = ⫯*[↑n] f.
31 #f #n @(niter_succ … push)
34 lemma pushs_eq_repl: ∀n. eq_repl (λf1,f2. ⫯*[n] f1 ≡ ⫯*[n] f2).
35 #n @(nat_ind_succ … n) -n /3 width=5 by eq_push/
38 (* Advanced properties ******************************************************)
40 lemma push_swap (n) (f): ⫯⫯*[n] f = ⫯*[n] ⫯f.
41 #n #f @(niter_appl … push)
44 lemma pushs_xn: ∀n,f. ⫯*[n] ⫯f = ⫯*[↑n] f.
47 (* Basic_inversion lemmas *****************************************************)
49 lemma eq_inv_pushs_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_px … 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_pushs_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_xp … H) -H [|*: // ]
61 #f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
62 /2 width=3 by ex2_intro/