public static boolean equivalentEnumerationsP(Collection self, Collection other) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_SET)) {
        { Set self000 = ((Set)(self));

          { boolean testValue001 = false;

            testValue001 = self000.length() == other.length();
            if (testValue001) {
              { boolean alwaysP000 = true;

                { Stella_Object m = null;
                  ListIterator iter000 = ((ListIterator)(self000.allocateIterator()));

                  loop000 : while (iter000.nextP()) {
                    m = iter000.value;
                    if (!other.memberP(m)) {
                      alwaysP000 = false;
                      break loop000;
                    }
                  }
                }
                testValue001 = alwaysP000;
              }
            }
            { boolean value000 = testValue001;

              return (value000);
            }
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_LIST)) {
        { List self000 = ((List)(self));

          { boolean testValue002 = false;

            testValue002 = self000.length() == other.length();
            if (testValue002) {
              { boolean alwaysP001 = true;

                { Stella_Object m = null;
                  Cons iter001 = self000.theConsList;

                  loop001 : for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
                    m = iter001.value;
                    if (!other.memberP(m)) {
                      alwaysP001 = false;
                      break loop001;
                    }
                  }
                }
                testValue002 = alwaysP001;
              }
            }
            { boolean value001 = testValue002;

              return (value001);
            }
          }
        }
      }
      else {
        return (false);
      }
    }
  }