]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_prototerm_constructors.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / unwind / unwind2_prototerm_constructors.ma
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 "delayed_updating/unwind/unwind2_prototerm_eq.ma".
16 include "delayed_updating/unwind/unwind2_path_append.ma".
17 include "delayed_updating/syntax/prototerm_constructors.ma".
18
19 (* TAILED UNWIND FOR PROTOTERM **********************************************)
20
21 (* Constructions with constructors for prototerm ****************************)
22
23 lemma unwind2_term_oref_pap (f) (k):
24       (⧣(f@⧣❨k❩)) ⇔ ▼[f]⧣k.
25 #f #k @conj #p *
26 [ /2 width=1 by in_comp_unwind2_path_term/
27 | #q * #H0 destruct //
28 ]
29 qed.
30
31 lemma unwind2_term_iref (f) (t) (k:pnat):
32       ▼[f∘𝐮❨k❩]t ⇔ ▼[f](𝛕k.t).
33 #f #t #k @conj
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/
39 ]
40 qed.
41
42 lemma unwind2_term_abst (f) (t):
43       (𝛌.▼[⫯f]t) ⇔ ▼[f]𝛌.t.
44 #f #t @conj #p #Hp
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/
50 ]
51 qed.
52
53 lemma unwind2_term_appl (f) (v) (t):
54       @▼[f]v.▼[f]t ⇔ ▼[f]@v.t.
55 #f #v #t @conj #p #Hp
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/
61 ]
62 qed.