X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fstatic_2%2Fsyntax%2Fgenv.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fstatic_2%2Fsyntax%2Fgenv.ma;h=35365d802ca8d3d12a9007de834905e5d16ac715;hb=ff612dc35167ec0c145864c9aa8ae5e1ebe20a48;hp=0000000000000000000000000000000000000000;hpb=222044da28742b24584549ba86b1805a87def070;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma new file mode 100644 index 000000000..35365d802 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/genv.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/notation/functions/star_0.ma". +include "static_2/notation/functions/dxbind2_3.ma". +include "static_2/notation/functions/dxabbr_2.ma". +include "static_2/notation/functions/dxabst_2.ma". +include "static_2/syntax/term.ma". + +(* GLOBAL ENVIRONMENTS ******************************************************) + +(* global environments *) +inductive genv: Type[0] ≝ +| GAtom: genv (* empty *) +| GPair: genv → bind2 → term → genv (* binary binding construction *) +. + +interpretation "sort (global environment)" + 'Star = (GAtom). + +interpretation "global environment binding construction (binary)" + 'DxBind2 G I T = (GPair G I T). + +interpretation "abbreviation (global environment)" + 'DxAbbr G T = (GPair G Abbr T). + +interpretation "abstraction (global environment)" + 'DxAbst G T = (GPair G Abst T). + +(* Basic properties *********************************************************) + +lemma eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2). +#G1 elim G1 -G1 [| #G1 #I1 #T1 #IHG1 ] * [2,4: #G2 #I2 #T2 ] +[3: /2 width=1 by or_introl/ +|2: elim (eq_bind2_dec I1 I2) #HI + [ elim (IHG1 G2) -IHG1 #HG + [ elim (eq_term_dec T1 T2) #HT /2 width=1 by or_introl/ ] + ] +] +@or_intror #H destruct /2 width=1 by/ +qed-.