logic and spec for #71 (failing: bug in trees) [ci skip]
tree fix for #71
require set