]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_path_head.etc
partial update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / etc / head / lift_path_head.etc
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/substitution/lift_path.ma".
16 include "delayed_updating/syntax/path_head.ma".
17 include "ground/relocation/xap.ma".
18
19 (* LIFT FOR PATH ************************************************************)
20
21 (* Constructions with head for path *****************************************)
22
23 lemma lift_path_head_closed (f) (p) (q) (n):
24       q = ↳[n]q →
25       ↳[↑[p●q]f@❨n❩]↑[↑[p]f]q = ↑[↑[p]f]q.
26 #f #p #q elim q -q
27 [ #n #H0
28   <(eq_inv_path_empty_head … H0) -H0
29   <path_head_zero //
30 | #l #q #IH #n @(nat_ind_succ …n) -n [| #n #_ ]
31   [ <path_head_zero #H0 destruct
32   | cases l [ #k ]
33     [ <path_head_d_dx #H0
34       elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
35       <lift_rmap_d_dx <lift_path_d_dx
36       <tr_xap_succ_nap <path_head_d_dx
37       <(IH … H0) in ⊢ (???%); -IH -H0 <tr_xap_plus //
38     | <path_head_m_dx #H0
39       elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
40       <lift_rmap_m_dx <lift_path_m_dx
41       <tr_xap_succ_nap <path_head_m_dx
42       <(IH … H0) in ⊢ (???%); -IH -H0 //
43     | <path_head_L_dx #H0
44       elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
45       <lift_rmap_L_dx <lift_path_L_dx
46       <tr_xap_succ_nap <path_head_L_dx
47       <(IH … H0) in ⊢ (???%); -IH -H0 //
48     | <path_head_A_dx #H0
49       elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
50       <lift_rmap_A_dx <lift_path_A_dx
51       <tr_xap_succ_nap <path_head_A_dx
52       <(IH … H0) in ⊢ (???%); -IH -H0 //
53     | <path_head_S_dx #H0
54       elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
55       <lift_rmap_S_dx <lift_path_S_dx
56       <tr_xap_succ_nap <path_head_S_dx
57       <(IH … H0) in ⊢ (???%); -IH -H0 //
58     ]
59   ]
60 ]
61 qed.