]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_preterm_eq.etc
partial commit in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / etc / unwind3 / unwind_preterm_eq.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 "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/unwind3/unwind_structure.ma".
19 include "delayed_updating/unwind3/unwind_prototerm.ma".
20
21 (* UNWIND FOR PRETERM *******************************************************)
22
23 (* Constructions with subset_equivalence ************************************)
24
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
28 @(ex2_intro … Hr) -Hr
29 <unwind_append_inner_sn //
30 qed-.
31
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/
39 qed-.
40
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.
44
45
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/
58 qed-.
59
60 lemma unwind_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
61       ▼[▼[p]f](t⋔(p◖𝗦)) ⇔ (▼[f]t)⋔((⊗p)◖𝗦).
62 #f #t #p #Hp #Ht
63 @conj
64 [ >unwind_rmap_S_dx >structure_S_dx
65   @unwind_grafted_sn //
66 | /2 width=1 by unwind_grafted_S_dx/
67 ]
68 qed.