anchor.diff:          //assert (CharDiet.intervalsDisjoint charSet1.Tree)
           //assert (CharDiet.intervalsDisjoint charSet2.Tree)
   
  -        // OPTIMIZATION : If the result is the same as either input set's tree,
  -        // return that set instead of creating a new one.
  -        let result = CharDiet.union charSet1.Tree charSet2.Tree
  -        //assert (CharDiet.dietInvariant result)
  -        //assert (CharDiet.intervalsDisjoint result)
  -        if charSet1.Tree === result then charSet1
  -        elif charSet2.Tree === result then charSet2
  -        else CharSet (result)
  +        // If the input sets have the same underlying tree, we can return immediately.
  +        if charSet1.Tree === charSet2.Tree then charSet1
  +        else
  +            // OPTIMIZATION : If the result is the same as either input set's tree,
  +            // return that set instead of creating a new one.
  +            let result = CharDiet.union charSet1.Tree charSet2.Tree
  +            //assert (CharDiet.dietInvariant result)
  +            //assert (CharDiet.intervalsDisjoint result)
  +            if charSet1.Tree === result then charSet1
  +            elif charSet2.Tree === result then charSet2
  +            else CharSet (result)
   
       //
       static member Exists (predicate, charSet : CharSet) : bool =
  
positive.code:         //assert (CharDiet.intervalsDisjoint charSet1.Tree)
          //assert (CharDiet.intervalsDisjoint charSet2.Tree)
  
          // OPTIMIZATION : If the result is the same as either input set's tree,
          // return that set instead of creating a new one.
          let result = CharDiet.intersect charSet1.Tree charSet2.Tree
          //assert (CharDiet.dietInvariant result)
          //assert (CharDiet.intervalsDisjoint result)
          if charSet1.Tree === result then charSet1
          elif charSet2.Tree === result then charSet2
          else CharSet (result)
  
      //
      static member Union (charSet1 : CharSet, charSet2 : CharSet) : CharSet =
  
negative.code:         //assert (CharDiet.intervalsDisjoint charSet1.Tree)
          //assert (CharDiet.intervalsDisjoint charSet2.Tree)
  
          // If the input sets have the same underlying tree, we can return immediately.
          if charSet1.Tree === charSet2.Tree then CharSet.Empty
          else
              // OPTIMIZATION : If the result is the same as either input set's tree,
              // return that set instead of creating a new one.
              let result = CharDiet.difference charSet1.Tree charSet2.Tree
              //assert (CharDiet.dietInvariant result)
              //assert (CharDiet.intervalsDisjoint result)
              if charSet1.Tree === result then charSet1
              elif charSet2.Tree === result then charSet2
              else CharSet (result)
  
      //
      static member Intersect (charSet1 : CharSet, charSet2 : CharSet) : CharSet =
  