Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 621 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 621 Bytes

Type-safe verified red-black trees in Idris.

Check TypedContainers/RBTree.idr for the basic API. Your key type needs to implement LawfulOrd (see TypedContainers/LawfulOrd.idr).

NB: Space complexities and time complexities should be the same as standard Red-Black trees, however, it has not been proven.

Features:

  • Value type can depend on key

The algorithm is taken from Purely functional data structures by Chris Okasaki. The proofs were mostly left as an exercise to the reader. The only difference is that the root of the tree isn't always made red, since this isn't always required.

TODO:

  • Benchmark