]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/lib/lambda/paths/decomposed_trace.ma
9c391c1a9afba303a4177b789c77013301ba32d5
[helm.git] / matita / matita / lib / lambda / paths / decomposed_trace.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "lambda/paths/trace.ma".
16
17 (* DECOMPOSED TRACE *********************************************************)
18
19 (* Policy: decomposed trace metavariables: P, Q *)
20 (* Note: this is a binary tree on traces *)
21 inductive dtrace: Type[0] ≝
22 | tree_nil : dtrace
23 | tree_cons: trace → dtrace → dtrace → dtrace
24 .
25
26 let rec size (P:dtrace) on P ≝ match P with
27 [ tree_nil          ⇒ 0
28 | tree_cons s Q1 Q2 ⇒ size Q2 + size Q1 + |s|
29 ].
30
31 interpretation "decomposed trace size" 'card P = (size P).