1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground_2/notation/functions/norm_1.ma".
16 include "ground_2/lib/bool.ma".
17 include "ground_2/lib/list.ma".
19 (* RELOCATION TRACE *********************************************************)
21 definition trace: Type[0] ≝ list bool.
23 let rec colength (cs:trace) on cs ≝ match cs with
25 | cons b tl ⇒ match b with [ true ⇒ ⫯(colength tl) | false ⇒ colength tl ]
28 interpretation "colength (trace)"
29 'Norm cs = (colength cs).
31 (* basic properties *********************************************************)
33 lemma colength_empty: ∥◊∥ = 0.
36 lemma colength_true: ∀cs. ∥Ⓣ@cs∥ = ⫯∥cs∥.
39 lemma colength_false: ∀cs. ∥Ⓕ@cs∥ = ∥cs∥.
42 lemma colength_cons: ∀cs1,cs2. ∥cs1∥ = ∥cs2∥ →
43 ∀b. ∥b@cs1∥ = ∥b@cs2∥.
44 #cs1 #cs2 #H * /2 width=1 by/
47 lemma colength_le: ∀cs. ∥cs∥ ≤ |cs|.
49 * /2 width=1 by le_S_S, le_S/