private static boolean equivEquals(Object elt1, Object elt2) {
	if (elt1 == elt2) return true;
	else if (elt1 == null || elt2 == null) return false;
	else if (elt1 instanceof EquivalentSet) {
	    if (elt2 instanceof EquivalentSet) {
		ArrayList<Object> al1 = ((EquivalentSet)elt1).contents;
		ArrayList<Object> al2 = ((EquivalentSet)elt2).contents;
		int size1 = al1.size();
		if (size1 != al2.size()) return false;
		else {
		    for (int i = 0; i < size1; ++i)
			if (!al2.contains(al1.get(i))) return false;
		    return true;
		}
	    } else return false;
	} else if (elt2 instanceof EquivalentSet) return false;
	else return elt1.equals(elt2);
    }