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/lib/subset_equivalence.ma".
16 include "delayed_updating/syntax/preterm.ma".
17 include "delayed_updating/substitution/lift_structure.ma".
18 include "delayed_updating/substitution/lift_prototerm.ma".
22 #p @(list_ind_rcons … p) -p
34 (* LIFT FOR PRETERM *********************************************************)
36 (* Constructions with subset_equivalence ************************************)
38 lemma lift_grafted_sn (f) (t) (p): p ϵ 𝐈 →
39 ↑[↑[p]f](t⋔p) ⊆ (↑[f]t)⋔(⊗p).
40 #f #t #p #Hp #q * #r #Hr #H0 destruct
42 <lift_append_inner_sn //
45 lemma lift_grafted_dx (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
46 (↑[f]t)⋔(⊗p) ⊆ ↑[↑[p]f](t⋔p).
47 #f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
48 elim (lift_inv_append_inner_sn … (sym_eq … H0)) -H0 //
49 #p0 #q0 #Hp0 #Hq0 #H0 destruct
50 <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
51 /2 width=1 by in_comp_lift_bi/
54 lemma lift_grafted (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
55 ↑[↑[p]f](t⋔p) ⇔ (↑[f]t)⋔(⊗p).
56 /3 width=1 by lift_grafted_sn, conj, lift_grafted_dx/ qed.
59 lemma lift_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
60 (↑[f]t)⋔((⊗p)◖𝗦) ⊆ ↑[↑[p]f](t⋔(p◖𝗦)).
61 #f #t #p #Hp #Ht #q * #r #Hr
62 <list_append_rcons_sn #H0
63 elim (lift_inv_append_proper_dx … (sym_eq … H0)) -H0 //
64 #p0 #q0 #Hp0 #Hq0 #H0 destruct
65 <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
66 elim (lift_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
67 #r1 #r2 #Hr1 #Hr2 #H0 destruct
68 lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
69 [ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
70 /2 width=1 by in_comp_lift_bi/
73 lemma lift_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
74 ↑[↑[p]f](t⋔(p◖𝗦)) ⇔ (↑[f]t)⋔((⊗p)◖𝗦).
77 [ >lift_rmap_S_dx >structure_S_dx
79 | /2 width=1 by lift_grafted_S_dx/