Binary Search Trees in Lean 4 with proofs
leanprover.github.io
leanprover.github.io
The implementation is quite idiomatic Lean with constructs ranging from simple `def` and `inductive` to elaborate tactics macros.
The proofs of the theorems can be quite hard to follow if you are not familiar with Lean's proof system, but it is still worth glancing to get a feel for them.