]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/lib/lambda-delta/syntax/length.ma
- cpr is now defined and the cpr_flat propery is proved! (it did not
[helm.git] / matita / matita / lib / lambda-delta / syntax / length.ma
diff --git a/matita/matita/lib/lambda-delta/syntax/length.ma b/matita/matita/lib/lambda-delta/syntax/length.ma
new file mode 100644 (file)
index 0000000..91e1bd7
--- /dev/null
@@ -0,0 +1,22 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic
+    ||A||  Library of Mathematics, developed at the Computer Science
+    ||T||  Department of the University of Bologna, Italy.
+    ||I||
+    ||T||
+    ||A||  This file is distributed under the terms of the
+    \   /  GNU General Public License Version 2
+     \ /
+      V_______________________________________________________________ *)
+
+include "lambda-delta/syntax/lenv.ma".
+
+(* LENGTH *******************************************************************)
+
+(* the length of a local environment *)
+let rec length L ≝ match L with
+[ LSort       ⇒ 0
+| LPair L _ _ ⇒ length L + 1
+].
+
+interpretation "length (local environment)" 'card L = (length L).