public boolean treeContains(Object object) {
    if (object instanceof CycNart) {
      object = ((CycNart) object).toCycList();
    }
    if (this.contains(object)) {
      return true;
    }
    for (int i = 0; i < this.size(); i++) {
      Object element = this.get(i);
      if (element instanceof CycNart) {
        element = ((CycNart) element).toCycList();
      }
      if (element.equals(object)) {
        return true;
      }
      if ((element instanceof CycList) && (((CycList) element).treeContains(object))) {
        return true;
      }
    }
    return false;
  }