]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambda/paths/decomposed_trace.ma
refactoring ...
[helm.git] / matita / matita / contribs / lambda / paths / decomposed_trace.ma
diff --git a/matita/matita/contribs/lambda/paths/decomposed_trace.ma b/matita/matita/contribs/lambda/paths/decomposed_trace.ma
new file mode 100644 (file)
index 0000000..2241fab
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "paths/trace.ma".
+
+(* DECOMPOSED TRACE *********************************************************)
+
+(* Policy: decomposed trace metavariables: P, Q *)
+(* Note: this is a binary tree on traces *)
+inductive dtrace: Type[0] ≝
+| tree_nil : dtrace
+| tree_cons: trace → dtrace → dtrace → dtrace
+.
+
+let rec size (P:dtrace) on P ≝ match P with
+[ tree_nil          ⇒ 0
+| tree_cons s Q1 Q2 ⇒ size Q2 + size Q1 + |s|
+].
+
+interpretation "decomposed trace size" 'card P = (size P).