]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/syntax/bind.ma
some improvements before setting up the exclusion binder
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / syntax / bind.ma
diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/bind.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/bind.ma
new file mode 100644 (file)
index 0000000..ca47440
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "basic_2/syntax/term.ma".
+
+(* BINDERS FOR LOCAL ENVIRONMENTS ******************************************)
+
+inductive bind: Type[0] ≝
+| BUnit: bind1 → bind
+| BPair: bind2 → term → bind
+.
+
+(* Basic properties ********************************************************)
+
+lemma eq_bind_dec: ∀I1,I2:bind. Decidable (I1 = I2).
+* #I1 [2: #V1 ] * #I2 [2,4: #V2 ]
+[ elim (eq_bind2_dec I1 I2) #HI
+  [ elim (eq_term_dec V1 V2) #HV /2 width=1 by or_introl/ ]
+  @or_intror #H destruct /2 width=1 by/
+| @or_intror #H destruct
+| @or_intror #H destruct
+| elim (eq_bind1_dec I1 I2) #HI /2 width=1 by or_introl/
+  @or_intror #H destruct /2 width=1 by/
+]
+qed-.