default T simplify() {
    // iteratively simplify the expression until we reach a fixed point and start seeing
    // an expression that's already been seen before
    T simplified = self();
    Set<T> seen = new HashSet<>();
    seen.add(simplified);
    while (true) {
      simplified = simplified.simplifyOnce();
      if (seen.contains(simplified)) {
        return simplified;
      }
      if (seen.size() > 1000) {
        throw new IllegalStateException("Infinite loop while simplifying " + this);
      }
      seen.add(simplified);
    }
  }
Returns an equivalent, simplified copy of this expression but does not modify {@code this} by repeatedly running
{@link #simplifyOnce()}.
planetiler-core/src/main/java/com/onthegomap/planetiler/expression/Simplifiable.java