]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma
update in static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / teq_ext.ma
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma
new file mode 100644 (file)
index 0000000..c91f93e
--- /dev/null
@@ -0,0 +1,53 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relations/ideq_3.ma".
+include "static_2/syntax/teqg_ext.ma".
+include "static_2/syntax/teq.ma".
+
+(* SYNTACTIC EQUIVALENCE ****************************************************)
+
+definition ceq: relation3 lenv term term ≝
+           ceqg (eq …).
+
+definition ceq_ext: lenv → relation bind ≝
+           ceqg_ext (eq …).
+
+interpretation
+  "context-dependent syntactic equivalence (term)"
+  'IdEq L T1 T2 = (ceq L T1 T2).
+
+interpretation
+  "context-dependent syntactic equivalence (binder)"
+  'IdEq L I1 I2 = (ceq_ext L I1 I2).
+
+(* Basic properties *********************************************************)
+
+lemma ceq_ext_refl (L):
+     reflexive … (ceq_ext L).
+/2 width=1 by ext2_refl/ qed.
+
+lemma ceq_ext_sym (L):
+      symmetric … (ceq_ext L).
+#L @ext2_sym (**) (* full auto does not work *)
+/2 width=1 by teq_sym/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ceq_ext_inv_eq (L):
+      ∀I1,I2. L ⊢ I1 ≡ I2 → I1 = I2.
+#L #I1 #I2 * -I1 -I2
+/3 width=4 by teq_inv_eq, eq_f3/
+qed-.