public static boolean testCollectionofMemberOfP(Stella_Object member, Surrogate type) {
    { Object old$ReversepolarityP$000 = Logic.$REVERSEPOLARITYp$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setBooleanSpecial(Logic.$REVERSEPOLARITYp$, false);
        Native.setSpecial(Stella.$CONTEXT$, Logic.getPropertyTestContext());
        { Proposition p = null;
          Iterator iter000 = Logic.allTrueDependentPropositions(member, Logic.SGT_PL_KERNEL_KB_COLLECTIONOF, true);

          while (iter000.nextP()) {
            p = ((Proposition)(iter000.value));
            if ((!p.deletedP()) &&
                ((((Boolean)(Logic.$REVERSEPOLARITYp$.get())).booleanValue() ? Proposition.falseP(p) : (Proposition.trueP(p) ||
                Proposition.functionWithDefinedValueP(p))))) {
              { Stella_Object collection = p.arguments.last();

                if ((!Stella_Object.eqlP(member, collection)) &&
                    LogicObject.collectionImpliesCollectionP(((LogicObject)(collection)), Logic.surrogateToDescription(type))) {
                  return (true);
                }
              }
            }
          }
        }
        return (false);

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Logic.$REVERSEPOLARITYp$.set(old$ReversepolarityP$000);
      }
    }
  }