updated rule for equals(references-true) with new global invariant