equals

open operator override fun equals(other: Any?): Boolean

We consider two state objects equal if they 1) belong to the same Tree, 2) have the same global key and hook index, and 3) have the same value (according to its own .equals check)