Are there any predefined functions for binary trees in Isabelle? For example to move to the left side of a binary tree?
Asked
Active
Viewed 131 times
1 Answers
1
Since Isabelle2014, there is a small theory for binary trees in ~~/src/HOL/Library/Tree
. If this type fits your purpose, you can use it and the functions defined on it. For example, there are selector functions left
and right
that return the left and right subtree of a tree.
If you have to define your own datatype, you can use the selector syntax of datatype_new
to define selectors as you see fit.

chris
- 4,988
- 20
- 36

Andreas Lochbihler
- 4,998
- 12
- 10