CodeSetDiff contracts / theory