public static Cons allDefiningPropositions(Stella_Object outputargument, Surrogate relation, boolean specializeP) {
    { Object old$ReversepolarityP$000 = Logic.$REVERSEPOLARITYp$.get();

      try {
        Native.setBooleanSpecial(Logic.$REVERSEPOLARITYp$, false);
        { Cons result = Stella.NIL;
          Stella_Object outputargumentvalue = Logic.valueOf(outputargument);

          { Proposition prop = null;
            Iterator iter000 = Logic.allTrueDependentPropositions(outputargumentvalue, relation, specializeP);
            Cons collect000 = null;

            while (iter000.nextP()) {
              prop = ((Proposition)(iter000.value));
              if ((prop.kind == Logic.KWD_FUNCTION) &&
                  Stella_Object.eqlP(Logic.valueOf((prop.arguments.theArray)[(prop.arguments.length() - 1)]), outputargumentvalue)) {
                if (collect000 == null) {
                  {
                    collect000 = Cons.cons(prop, Stella.NIL);
                    if (result == Stella.NIL) {
                      result = collect000;
                    }
                    else {
                      Cons.addConsToEndOfConsList(result, collect000);
                    }
                  }
                }
                else {
                  {
                    collect000.rest = Cons.cons(prop, Stella.NIL);
                    collect000 = collect000.rest;
                  }
                }
              }
            }
          }
          return (result);
        }

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