]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_tail.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / syntax / path_tail.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 "delayed_updating/syntax/path_labels.ma".
16 include "delayed_updating/notation/functions/downarrowright_2.ma".
17 include "ground/arith/nat_plus.ma".
18 include "ground/arith/nat_pred_succ.ma".
19
20 (* TAIL FOR PATH ************************************************************)
21
22 rec definition tail (m) (p) on p: path ≝
23 match m with
24 [ nzero  ⇒ 𝐞
25 | ninj o ⇒ 
26   match p with
27   [ list_empty     ⇒ 𝗟∗∗m
28   | list_lcons l q ⇒
29     match l with
30     [ label_d n ⇒ l◗(tail (m+n) q)
31     | label_m   ⇒ l◗(tail m q)
32     | label_L   ⇒ l◗(tail (↓o) q)
33     | label_A   ⇒ l◗(tail m q)
34     | label_S   ⇒ l◗(tail m q)
35     ]
36   ]
37 ].
38
39 interpretation
40   "tail (reversed path)"
41   'DownArrowRight n p = (tail n p).
42
43 (* basic constructions ****************************************************)
44
45 lemma tail_zero (p):
46       (𝐞) = ↳[𝟎]p.
47 * // qed.
48
49 lemma tail_empty (n):
50       (𝗟∗∗n) = ↳[n]𝐞.
51 * // qed.
52
53 lemma tail_d_sn (p) (n) (m:pnat):
54       (𝗱m◗↳[↑n+m]p) = ↳[↑n](𝗱m◗p).
55 // qed.
56
57 lemma tail_m_sn (p) (n):
58       (𝗺◗↳[↑n]p) = ↳[↑n](𝗺◗p).
59 // qed.
60
61 lemma tail_L_sn (p) (n):
62       (𝗟◗↳[n]p) = ↳[↑n](𝗟◗p).
63 #p #n
64 whd in ⊢ (???%); //
65 qed.
66
67 lemma tail_A_sn (p) (n):
68       (𝗔◗↳[↑n]p) = ↳[↑n](𝗔◗p).
69 // qed.
70
71 lemma tail_S_sn (p) (n):
72       (𝗦◗↳[↑n]p) = ↳[↑n](𝗦◗p).
73 // qed.