public static boolean generatorCollectionP(Stella_Object collection) {
    if (((Boolean)(Logic.$REVERSEPOLARITYp$.get())).booleanValue() &&
        (!Logic.closedTermP(collection))) {
      return (false);
    }
    { Surrogate testValue000 = Stella_Object.safePrimaryType(collection);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_DESCRIPTION)) {
        { Description collection000 = ((Description)(collection));

          return ((!Stella_Object.isaP(collection000, Logic.SGT_LOGIC_NAMED_DESCRIPTION)) ||
              NamedDescription.relationSupportsExtensionP(((NamedDescription)(collection000))));
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PATTERN_VARIABLE)) {
        { PatternVariable collection000 = ((PatternVariable)(collection));

          { Stella_Object boundtovalue = Logic.argumentBoundTo(collection000);

            if (boundtovalue != null) {
              return (Logic.generatorCollectionP(boundtovalue));
            }
            else if (collection000.definingProposition != null) {
              return (true);
            }
            else {
              return (false);
            }
          }
        }
      }
      else if (Surrogate.subtypeOfSurrogateP(testValue000)) {
        { Surrogate collection000 = ((Surrogate)(collection));

          return (NamedDescription.relationSupportsExtensionP(Logic.getDescription(collection000)));
        }
      }
      else {
        return (true);
      }
    }
  }