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 "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".
21 (* GLOBAL ENVIRONMENTS ******************************************************)
23 (* global environments *)
24 inductive genv: Type[0] ≝
25 | GAtom: genv (* empty *)
26 | GPair: genv → bind2 → term → genv (* binary binding construction *)
29 interpretation "sort (global environment)"
32 interpretation "global environment binding construction (binary)"
33 'DxBind2 G I T = (GPair G I T).
35 interpretation "abbreviation (global environment)"
36 'DxAbbr G T = (GPair G Abbr T).
38 interpretation "abstraction (global environment)"
39 'DxAbst G T = (GPair G Abst T).
41 (* Basic properties *********************************************************)
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/ ]
51 @or_intror #H destruct /2 width=1 by/