X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fsyntax%2Fgenv.ma;h=085e35dac7d0e8b484c8f5a9bf0cc79ea792d973;hp=8483917c478dbc58e17735b6461727f65ec0b7fe;hb=3c8da07d7a5d7cf0432a83732a6d103f527afaef;hpb=2976c347e18717e691825ebdf73a5ce941c57d1b diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma index 8483917c4..085e35dac 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/syntax/genv.ma @@ -12,7 +12,6 @@ (* *) (**************************************************************************) -include "ground_2/lib/list2.ma". include "basic_2/notation/constructors/star_0.ma". include "basic_2/notation/constructors/dxbind2_3.ma". include "basic_2/notation/constructors/dxabbr_2.ma". @@ -22,20 +21,32 @@ include "basic_2/syntax/term.ma". (* GLOBAL ENVIRONMENTS ******************************************************) (* global environments *) -definition genv ≝ list2 bind2 term. +inductive genv: Type[0] ≝ +| GAtom: genv (* empty *) +| GBind: genv → bind2 → term → genv (* binding construction *) +. interpretation "sort (global environment)" - 'Star = (nil2 bind2 term). + 'Star = (GAtom). interpretation "global environment binding construction (binary)" - 'DxBind2 L I T = (cons2 bind2 term I T L). + 'DxBind2 G I T = (GBind G I T). interpretation "abbreviation (global environment)" - 'DxAbbr L T = (cons2 bind2 term Abbr T L). + 'DxAbbr G T = (GBind G Abbr T). interpretation "abstraction (global environment)" - 'DxAbst L T = (cons2 bind2 term Abst T L). + 'DxAbst G T = (GBind G Abst T). (* Basic properties *********************************************************) -axiom eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2). +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-.