]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda-delta/Basic-2/syntax/length.ma
- some refactoring
[helm.git] / matita / matita / contribs / lambda-delta / Basic-2 / syntax / length.ma
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic
3     ||A||  Library of Mathematics, developed at the Computer Science
4     ||T||  Department of the University of Bologna, Italy.
5     ||I||
6     ||T||
7     ||A||  This file is distributed under the terms of the
8     \   /  GNU General Public License Version 2
9      \ /
10       V_______________________________________________________________ *)
11
12 include "Basic-2/syntax/lenv.ma".
13
14 (* LENGTH *******************************************************************)
15
16 (* the length of a local environment *)
17 let rec length L ≝ match L with
18 [ LSort       ⇒ 0
19 | LPair L _ _ ⇒ length L + 1
20 ].
21
22 interpretation "length (local environment)" 'card L = (length L).