]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / genv.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 "static_2/notation/functions/star_0.ma".
16 include "static_2/notation/functions/dxbind2_3.ma".
17 include "static_2/notation/functions/dxabbr_2.ma".
18 include "static_2/notation/functions/dxabst_2.ma".
19 include "static_2/syntax/term.ma".
20
21 (* GLOBAL ENVIRONMENTS ******************************************************)
22
23 (* global environments *)
24 inductive genv: Type[0] ≝
25 | GAtom: genv                       (* empty *)
26 | GPair: genv → bind2 → term → genv (* binary binding construction *)
27 .
28
29 interpretation "sort (global environment)"
30    'Star = (GAtom).
31
32 interpretation "global environment binding construction (binary)"
33    'DxBind2 G I T = (GPair G I T).
34
35 interpretation "abbreviation (global environment)"
36    'DxAbbr G T = (GPair G Abbr T).
37
38 interpretation "abstraction (global environment)"
39    'DxAbst G T = (GPair G Abst T).
40
41 (* Basic properties *********************************************************)
42
43 lemma eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2).
44 #G1 elim G1 -G1 [| #G1 #I1 #T1 #IHG1 ] * [2,4: #G2 #I2 #T2 ]
45 [3: /2 width=1 by or_introl/
46 |2: elim (eq_bind2_dec I1 I2) #HI
47     [ elim (IHG1 G2) -IHG1 #HG
48       [ elim (eq_term_dec T1 T2) #HT /2 width=1 by or_introl/ ]
49     ]
50 ]
51 @or_intror #H destruct /2 width=1 by/
52 qed-.