anchor.diff:  
       static member eval term subquery =
           match subquery with
  -        | Is -> true
  +        | Is ->
  +            true
  +        | Has label ->
  +            match term with
  +            | Labels labels -> labels.Contains label
  +            | _ -> false
           | Eq term2  ->
               Subquery.equalTo term term2
           | Gt term2 ->
               match (term, term2) with
  -            | (Z i, Z i2) -> i > i2
  -            | (R s, R s2) -> s > s2
  +            | (Z z, Z z2) -> z > z2
  +            | (R r, R r2) -> r > r2
  +            | (C c, C c2) -> c.CompareTo c2 > 0
               | (_, _) -> false
           | Ge term2 ->
               match (term, term2) with
  -            | (Z i, Z i2) -> i >= i2
  -            | (R s, R s2) -> s >= s2
  +            | (Z z, Z z2) -> z >= z2
  +            | (R r, R r2) -> r >= r2
  +            | (C c, C c2) -> c.CompareTo c2 >= 0
               | (_, _) -> false
           | Lt term2 ->
               match (term, term2) with
  -            | (Z i, Z i2) -> i < i2
  -            | (R s, R s2) -> s < s2
  +            | (Z z, Z z2) -> z < z2
  +            | (R r, R r2) -> r < r2
  +            | (C c, C c2) -> c.CompareTo c2 < 0
               | (_, _) -> false
           | Le term2 ->
               match (term, term2) with
  -            | (Z i, Z i2) -> i <= i2
  -            | (R s, R s2) -> s <= s2
  +            | (Z z, Z z2) -> z <= z2
  +            | (R r, R r2) -> r <= r2
  +            | (C c, C c2) -> c.CompareTo c2 <= 0
               | (_, _) -> false
           | Not subquery ->
               not (Subquery.eval term subquery)
  
positive.code: 
  type [<StructuralEquality; NoComparison>] Subquery =
      | Is
      | Eq of Term
      | Gt of Term
      | Ge of Term
  
negative.code: // TODO: 3D: cache empty sets and dicts.
  // TODO: 3D: remove any incidental allocation.
  // TODO: 3D: make sure to use proper collection comparer for string keys.
  // TODO: 3D: make sure to use TryAdd in the appropriate places.
  
  type [<StructuralEquality; NoComparison>] Term =
      | Z of int
      | R of single
      | C of IComparable
      | Obj of obj
      | Tag
      | Label of string
      | Labels of string HashSet
      | Entity of uint64
      | Terms of Term list
      static member equals (this : Term) (that : Term) = this.Equals that
  