sig weight:change -> int test:D.state -> D.left -> D.right -> (D.eq, D.diff) result update:change -> D.state -> D.state * D.left array end -> S