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/path_structure_inner.ma".
17 include "delayed_updating/syntax/preterm.ma".
18 include "delayed_updating/unwind1/unwind_structure.ma".
19 include "delayed_updating/unwind1/unwind_prototerm.ma".
21 (* UNWIND FOR PRETERM *******************************************************)
23 (* Constructions with subset_equivalence ************************************)
25 lemma unwind_grafted_sn (f) (t) (p): p ϵ 𝐈 →
26 ▼[▼[p]f](t⋔p) ⊆ (▼[f]t)⋔(⊗p).
27 #f #t #p #Hp #q * #r #Hr #H0 destruct
29 <unwind_append_inner_sn //
32 lemma unwind_grafted_dx (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
33 (▼[f]t)⋔(⊗p) ⊆ ▼[▼[p]f](t⋔p).
34 #f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
35 elim (unwind_inv_append_inner_sn … (sym_eq … H0)) -H0 //
36 #p0 #q0 #Hp0 #Hq0 #H0 destruct
37 <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
38 /2 width=1 by in_comp_unwind_bi/
41 lemma unwind_grafted (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
42 ▼[▼[p]f](t⋔p) ⇔ (▼[f]t)⋔(⊗p).
43 /3 width=1 by unwind_grafted_sn, conj, unwind_grafted_dx/ qed.
46 lemma unwind_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
47 (▼[f]t)⋔((⊗p)◖𝗦) ⊆ ▼[▼[p]f](t⋔(p◖𝗦)).
48 #f #t #p #Hp #Ht #q * #r #Hr
49 <list_append_rcons_sn #H0
50 elim (unwind_inv_append_proper_dx … (sym_eq … H0)) -H0 //
51 #p0 #q0 #Hp0 #Hq0 #H0 destruct
52 <(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
53 elim (unwind_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
54 #r1 #r2 #Hr1 #Hr2 #H0 destruct
55 lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
56 [ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
57 /2 width=1 by in_comp_unwind_bi/
60 lemma unwind_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
61 ▼[▼[p]f](t⋔(p◖𝗦)) ⇔ (▼[f]t)⋔((⊗p)◖𝗦).
64 [ >unwind_rmap_S_dx >structure_S_dx
66 | /2 width=1 by unwind_grafted_S_dx/