diff src/tree.agda @ 1:73127e0ab57c

(none)
author soto@cr.ie.u-ryukyu.ac.jp
date Tue, 08 Sep 2020 18:38:08 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tree.agda	Tue Sep 08 18:38:08 2020 +0900
@@ -0,0 +1,10 @@
+data nomal-tree (A : Set) : Set where
+  nleaf : (key : ℕ) → tree A
+  nnode : (key : ℕ) → (lnode : nomal-tree A) → (rnode : nomal-tree A) → nomal-tree A
+
+data meta-tree (A : Set) : (key : ℕ) → Set where
+  mleaf : (key : ℕ) → meta-tree A key
+  mnode : { l r : ℕ } → (key : ℕ) → (value : A)
+    → (lnode : meta-tree A l)  → (rnode : meta-tree A r)
+    → l ≤ key → key ≤ r → metatree A key
+