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/unwind_k/unwind2_rmap.ma".
16 include "delayed_updating/syntax/path_structure.ma".
17 include "delayed_updating/notation/functions/black_downtriangle_2.ma".
19 (* TAILED UNWIND FOR PATH ***************************************************)
21 definition unwind2_path (f) (p): path ≝
26 [ label_d k ⇒ (⊗q)◖𝗱(▶[f]q@⧣❨k❩)
35 "tailed unwind (path)"
36 'BlackDownTriangle f p = (unwind2_path f p).
38 (* Basic constructions ******************************************************)
40 lemma unwind2_path_empty (f):
44 lemma unwind2_path_d_dx (f) (p) (k) :
45 (⊗p)◖𝗱((▶[f]p)@⧣❨k❩) = ▼[f](p◖𝗱k).
48 lemma unwind2_path_m_dx (f) (p):
52 lemma unwind2_path_L_dx (f) (p):
56 lemma unwind2_path_A_dx (f) (p):
60 lemma unwind2_path_S_dx (f) (p):
64 (* Constructions with structure *********************************************)
66 lemma structure_unwind2_path (f) (p):
68 #f * // * [ #k ] #p //
71 lemma unwind2_path_structure (f) (p):
73 #f #p elim p -p // * [ #k ] #p #IH //
74 [ <structure_L_dx <unwind2_path_L_dx //
75 | <structure_A_dx <unwind2_path_A_dx //
76 | <structure_S_dx <unwind2_path_S_dx //
80 lemma unwind2_path_root (f) (p):
81 ∃∃r. 𝐞 = ⊗r & ⊗p●r = ▼[f]p.
83 /2 width=3 by ex2_intro/
84 <unwind2_path_d_dx <structure_d_dx
85 /2 width=3 by ex2_intro/
88 (* Destructions with structure **********************************************)
90 lemma unwind2_path_des_structure (f) (q) (p):
94 (* Basic inversions *********************************************************)
96 lemma eq_inv_d_dx_unwind2_path (f) (q) (p) (h):
98 ∃∃r,k. q = ⊗r & h = ▶[f]r@⧣❨k❩ & r◖𝗱k = p.
99 #f #q * [| * [ #k ] #p ] #h
100 [ <unwind2_path_empty #H0 destruct
101 | <unwind2_path_d_dx #H0 destruct
102 /2 width=5 by ex3_2_intro/
103 | <unwind2_path_m_dx #H0
104 elim (eq_inv_d_dx_structure … H0)
105 | <unwind2_path_L_dx #H0 destruct
106 | <unwind2_path_A_dx #H0 destruct
107 | <unwind2_path_S_dx #H0 destruct
111 lemma eq_inv_m_dx_unwind2_path (f) (q) (p):
113 #f #q * [| * [ #k ] #p ]
114 [ <unwind2_path_empty #H0 destruct
115 | <unwind2_path_d_dx #H0 destruct
116 | <unwind2_path_m_dx #H0
117 elim (eq_inv_m_dx_structure … H0)
118 | <unwind2_path_L_dx #H0 destruct
119 | <unwind2_path_A_dx #H0 destruct
120 | <unwind2_path_S_dx #H0 destruct
124 lemma eq_inv_L_dx_unwind2_path (f) (q) (p):
126 ∃∃r1,r2. q = ⊗r1 & ∀g. 𝐞 = ▼[g]r2 & r1●𝗟◗r2 = p.
127 #f #q * [| * [ #k ] #p ]
128 [ <unwind2_path_empty #H0 destruct
129 | <unwind2_path_d_dx #H0 destruct
130 | <unwind2_path_m_dx #H0
131 elim (eq_inv_L_dx_structure … H0) -H0 #r1 #r2 #H1 #H2 #H3 destruct
132 /2 width=5 by ex3_2_intro/
133 | <unwind2_path_L_dx #H0 destruct
134 /2 width=5 by ex3_2_intro/
135 | <unwind2_path_A_dx #H0 destruct
136 | <unwind2_path_S_dx #H0 destruct
140 lemma eq_inv_A_dx_unwind2_path (f) (q) (p):
142 ∃∃r1,r2. q = ⊗r1 & ∀g. 𝐞 = ▼[g]r2 & r1●𝗔◗r2 = p.
143 #f #q * [| * [ #k ] #p ]
144 [ <unwind2_path_empty #H0 destruct
145 | <unwind2_path_d_dx #H0 destruct
146 | <unwind2_path_m_dx #H0
147 elim (eq_inv_A_dx_structure … H0) -H0 #r1 #r2 #H1 #H2 #H3 destruct
148 /2 width=5 by ex3_2_intro/
149 | <unwind2_path_L_dx #H0 destruct
150 | <unwind2_path_A_dx #H0 destruct
151 /2 width=5 by ex3_2_intro/
152 | <unwind2_path_S_dx #H0 destruct
156 lemma eq_inv_S_dx_unwind2_path (f) (q) (p):
158 ∃∃r1,r2. q = ⊗r1 & ∀g. 𝐞 = ▼[g]r2 & r1●𝗦◗r2 = p.
159 #f #q * [| * [ #k ] #p ]
160 [ <unwind2_path_empty #H0 destruct
161 | <unwind2_path_d_dx #H0 destruct
162 | <unwind2_path_m_dx #H0
163 elim (eq_inv_S_dx_structure … H0) -H0 #r1 #r2 #H1 #H2 #H3 destruct
164 /2 width=5 by ex3_2_intro/
165 | <unwind2_path_L_dx #H0 destruct
166 | <unwind2_path_A_dx #H0 destruct
167 | <unwind2_path_S_dx #H0 destruct
168 /2 width=5 by ex3_2_intro/