]> matita.cs.unibo.it Git - helm.git/blobdiff - components/ng_kernel/test.ma
branch for universe
[helm.git] / components / ng_kernel / test.ma
diff --git a/components/ng_kernel/test.ma b/components/ng_kernel/test.ma
new file mode 100644 (file)
index 0000000..ff01731
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "nat/plus.ma".
+
+(*
+let rec f n := 
+  match n with
+  [ O => O
+  | S m => let rec g x := 
+             match x with
+             [ O => f m
+             | S q => 
+                  let rec h y := 
+                    match y with 
+                    [ O => f m + g q
+                    | S w => h w]
+                  in
+                    h q] 
+           in 
+             g m].
+*)
+
+let rec f n := 
+  match n with
+  [ O => O
+  | S m => g m
+  ]
+and g m :=
+ match m with
+  [ O => O
+  | S n => f n
+  ].
\ No newline at end of file