public static Proposition helpFastenDownPropositions(Proposition self, boolean dontcheckforduplicatesP) {
    { boolean dontcheckargsforduplicatesP = dontcheckforduplicatesP;

      { Keyword testValue000 = self.kind;

        if ((testValue000 == Logic.KWD_FORALL) ||
            (testValue000 == Logic.KWD_EXISTS)) {
          dontcheckargsforduplicatesP = true;
        }
        else {
          if (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTIVEp, Stella.FALSE_WRAPPER))).wrapperValue) {
            dontcheckargsforduplicatesP = true;
          }
        }
      }
      { Stella_Object arg = null;
        Vector vector000 = self.arguments;
        int index000 = 0;
        int length000 = vector000.length();
        int i = Stella.NULL_INTEGER;
        int iter000 = 0;

        for (;index000 < length000; index000 = index000 + 1, iter000 = iter000 + 1) {
          arg = (vector000.theArray)[index000];
          i = iter000;
          { Surrogate testValue001 = Stella_Object.safePrimaryType(arg);

            if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_PROPOSITION)) {
              { Proposition arg000 = ((Proposition)(arg));

                if (BooleanWrapper.coerceWrappedBooleanToBoolean(arg000.unfastenedP())) {
                  (self.arguments.theArray)[i] = (Proposition.helpFastenDownPropositions(arg000, dontcheckargsforduplicatesP));
                }
              }
            }
            else if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_SKOLEM)) {
              { Skolem arg000 = ((Skolem)(arg));

                { Proposition definingprop = arg000.definingProposition;

                  if ((definingprop != null) &&
                      (BooleanWrapper.coerceWrappedBooleanToBoolean(definingprop.unfastenedP()) &&
                       (!((List)(Logic.$VISITEDUNFASTENEDDEFININGPROPOSITIONS$.get())).memberP(definingprop)))) {
                    ((List)(Logic.$VISITEDUNFASTENEDDEFININGPROPOSITIONS$.get())).insert(definingprop);
                    Proposition.helpFastenDownPropositions(definingprop, dontcheckargsforduplicatesP);
                  }
                }
              }
            }
            else {
            }
          }
        }
      }
      return (Proposition.fastenDownOneProposition(self, dontcheckforduplicatesP));
    }
  }