]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/syntax/term_constructors.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / syntax / term_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/syntax/term.ma".
16 include "delayed_updating/notation/functions/hash_1.ma".
17 include "delayed_updating/notation/functions/phi_2.ma".
18 include "delayed_updating/notation/functions/lamda_1.ma".
19 include "delayed_updating/notation/functions/at_2.ma".
20
21 (* CONSTRUCTORS FOR TERM ****************************************************)
22
23 definition term_node_0 (l): term ≝
24            λp. l;𝐞 = p.
25
26 definition term_node_1 (l): term → term ≝
27            λt,p. ∃∃q. q ϵ⬦ t & l;q = p.
28
29 definition term_node_2 (l1) (l2): term → term → term ≝
30            λt1,t2,p.
31            ∨∨ ∃∃q. q ϵ⬦ t1 & l1;q = p
32             | ∃∃q. q ϵ⬦ t2 & l2;q = p.
33
34 interpretation
35   "outer variable reference by depth (term)"
36   'Hash n = (term_node_0 (label_node_d n)).
37
38 interpretation
39   "inner variable reference by depth (term)"
40   'Phi n t = (term_node_1 (label_node_d n) t).
41
42 interpretation
43   "name-free functional abstraction (term)"
44   'Lamda t = (term_node_1 label_edge_l t).
45
46 interpretation
47   "application (term)"
48   'At u t = (term_node_2 label_edge_s label_edge_a u t).
49
50 (* Basic Inversions *********************************************************)
51
52 lemma term_in_ini_inv_lcons_oref:
53       ∀p,l,n. l;p ϵ▵ #n →
54       ∧∧ 𝗱❨n❩ = l & 𝐞 = p.
55 #p #l #n * #q
56 <list_append_lcons_sn #H destruct -H
57 elim (eq_inv_list_empty_append … e0) -e0 #H1 #_
58 /2 width=1 by conj/
59 qed-.
60
61 lemma term_in_ini_inv_lcons_iref:
62       ∀t,p,l,n. l;p ϵ▵ 𝛗n.t →
63       ∧∧ 𝗱❨n❩ = l & p ϵ▵ t.
64 #t #p #l #n * #q
65 <list_append_lcons_sn * #r #Hr #H1 destruct
66 /3 width=2 by ex_intro, conj/
67 qed-.