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 "delayed_updating/unwind/unwind1_rmap.ma".
16 include "delayed_updating/syntax/path_tail_depth.ma".
17 include "delayed_updating/syntax/path_height.ma".
19 (* BASIC UNWIND MAP FOR PATH ************************************************)
21 include "ground/relocation/tr_uni_pap.ma".
22 include "ground/relocation/tr_compose_pap.ma".
23 include "ground/relocation/tr_pap_pn.ma".
24 include "ground/notation/functions/applysucc_2.ma".
25 include "ground/arith/nat_plus_rplus.ma".
26 include "ground/arith/nat_pred_succ.ma".
28 definition tr_nap (f) (l:nat): nat ≝
32 "functional non-negative application (total relocation maps)"
33 'ApplySucc f l = (tr_nap f l).
35 lemma tr_nap_unfold (f) (l):
39 lemma tr_compose_nap (f2) (f1) (l):
40 f2@↑❨f1@↑❨l❩❩ = (f2∘f1)@↑❨l❩.
42 <tr_nap_unfold <tr_nap_unfold <tr_nap_unfold
43 <tr_compose_pap <npsucc_pred //
46 lemma tr_uni_nap (n) (m):
50 <tr_uni_pap <nrplus_npsucc_sn //
53 lemma tr_nap_push (f):
54 ∀l. ↑(f@↑❨l❩) = (⫯f)@↑❨↑l❩.
56 <tr_nap_unfold <tr_nap_unfold
57 <tr_pap_push <pnpred_psucc //
62 lemma unwind1_rmap_labels_L (n):
64 #n @(nat_ind_succ … n) -n //
66 <labels_succ <unwind1_rmap_L_sn //
69 lemma unwind1_rmap_tail (p) (n):
70 n + ♯(↳[n]p) = (▶↳[n]p)@↑❨n❩.
72 #l #p #IH #n @(nat_ind_succ … n) -n //
74 [ <unwind1_rmap_d_sn <tail_d_sn <height_d_sn
75 <nplus_assoc >IH -IH <tr_compose_nap //
76 | <unwind1_rmap_m_sn <tail_m_sn <height_m_sn //
77 | <unwind1_rmap_L_sn <tail_L_sn <height_L_sn
78 <tr_nap_push <npred_succ //
79 | <unwind1_rmap_A_sn <tail_A_sn <height_A_sn //
80 | <unwind1_rmap_S_sn <tail_S_sn <height_S_sn //