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/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".
20 (* HEAD FOR PATH ************************************************************)
22 rec definition path_head (m) (p) on p: path ≝
30 [ label_d n ⇒ l◗(path_head (m+n) q)
31 | label_m ⇒ l◗(path_head m q)
32 | label_L ⇒ l◗(path_head (↓o) q)
33 | label_A ⇒ l◗(path_head m q)
34 | label_S ⇒ l◗(path_head m q)
40 "head (reversed path)"
41 'DownArrowRight n p = (path_head n p).
43 (* basic constructions ****************************************************)
45 lemma path_head_zero (p):
49 lemma path_head_empty (n):
53 lemma path_head_d_sn (p) (n) (m:pnat):
54 (𝗱m◗↳[↑n+m]p) = ↳[↑n](𝗱m◗p).
57 lemma path_head_m_sn (p) (n):
58 (𝗺◗↳[↑n]p) = ↳[↑n](𝗺◗p).
61 lemma path_head_L_sn (p) (n):
62 (𝗟◗↳[n]p) = ↳[↑n](𝗟◗p).
67 lemma path_head_A_sn (p) (n):
68 (𝗔◗↳[↑n]p) = ↳[↑n](𝗔◗p).
71 lemma path_head_S_sn (p) (n):
72 (𝗦◗↳[↑n]p) = ↳[↑n](𝗦◗p).