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_prototerm_eq.ma".
16 include "delayed_updating/unwind_k/unwind2_path_append.ma".
17 include "delayed_updating/syntax/prototerm_constructors.ma".
19 (* TAILED UNWIND FOR PROTOTERM **********************************************)
21 (* Constructions with constructors for prototerm ****************************)
23 lemma unwind2_term_oref_pap (f) (k):
26 [ /2 width=1 by in_comp_unwind2_path_term/
27 | #q * #H0 destruct //
31 lemma unwind2_term_iref (f) (t) (k:pnat):
32 ▼[f∘𝐮❨k❩]t ⇔ ▼[f](𝛕k.t).
34 #p * #q #Hq #H0 destruct
35 [ @(ex2_intro … (𝗱k◗𝗺◗q))
36 /2 width=1 by in_comp_iref_hd/
37 | elim (in_comp_inv_iref … Hq) -Hq #p #Hp #Ht destruct
38 /2 width=1 by in_comp_unwind2_path_term/
42 lemma unwind2_term_abst (f) (t):
45 [ elim (in_comp_inv_abst … Hp) -Hp #q #H1 * #r #Hr #H2 destruct
46 /3 width=1 by in_comp_unwind2_path_term, in_comp_abst_hd/
47 | elim Hp -Hp #q #Hq #H0 destruct
48 elim (in_comp_inv_abst … Hq) -Hq #r #H0 #Hr destruct
49 /3 width=1 by in_comp_unwind2_path_term, in_comp_abst_hd/
53 lemma unwind2_term_appl (f) (v) (t):
54 @▼[f]v.▼[f]t ⇔ ▼[f]@v.t.
56 [ elim (in_comp_inv_appl … Hp) -Hp * #q #H1 * #r #Hr #H2 destruct
57 /3 width=1 by in_comp_unwind2_path_term, in_comp_appl_sd, in_comp_appl_hd/
58 | elim Hp -Hp #q #Hq #H0 destruct
59 elim (in_comp_inv_appl … Hq) -Hq * #r #H0 #Hr destruct
60 /3 width=1 by in_comp_unwind2_path_term, in_comp_appl_sd, in_comp_appl_hd/