annotate src/tree.agda.replaced @ 11:a8bc8c6b48bd default tip

fix
author soto@cr.ie.u-ryukyu.ac.jp
date Tue, 15 Sep 2020 07:06:29 +0900
parents 73127e0ab57c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 data nomal-tree (A : Set) : Set where
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 nleaf : (key : @$\mathbb{N}$@) @$\rightarrow$@ tree A
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3 nnode : (key : @$\mathbb{N}$@) @$\rightarrow$@ (lnode : nomal-tree A) @$\rightarrow$@ (rnode : nomal-tree A) @$\rightarrow$@ nomal-tree A
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 data meta-tree (A : Set) : (key : @$\mathbb{N}$@) @$\rightarrow$@ Set where
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 mleaf : (key : @$\mathbb{N}$@) @$\rightarrow$@ meta-tree A key
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 mnode : { l r : @$\mathbb{N}$@ } @$\rightarrow$@ (key : @$\mathbb{N}$@) @$\rightarrow$@ (value : A)
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8 @$\rightarrow$@ (lnode : meta-tree A l) @$\rightarrow$@ (rnode : meta-tree A r)
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 @$\rightarrow$@ l @$\leq$@ key @$\rightarrow$@ key @$\leq$@ r @$\rightarrow$@ metatree A key
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10