public static Proposition inheritFunctionProposition(Proposition self, KeyValueMap mapping, boolean createskolemP) {
    { Proposition copy = null;
      Cons inputargs = Stella.NIL;
      int nofinputargs = self.arguments.length() - 1;
      Stella_Object argmapsto = null;

      { Stella_Object arg = null;
        Vector vector000 = self.arguments;
        int index000 = 0;
        int length000 = vector000.length();
        int i = Stella.NULL_INTEGER;
        int iter000 = 1;
        Cons collect000 = null;

        for (;index000 < length000; index000 = index000 + 1, iter000 = iter000 + 1) {
          arg = (vector000.theArray)[index000];
          i = iter000;
          if (i <= nofinputargs) {
            argmapsto = Logic.mappedValueOf(arg, mapping, createskolemP);
            if (argmapsto == null) {
              return (null);
            }
            if (collect000 == null) {
              {
                collect000 = Cons.cons(Logic.inheritPropositionArgument(argmapsto, self, mapping), Stella.NIL);
                if (inputargs == Stella.NIL) {
                  inputargs = collect000;
                }
                else {
                  Cons.addConsToEndOfConsList(inputargs, collect000);
                }
              }
            }
            else {
              {
                collect000.rest = Cons.cons(Logic.inheritPropositionArgument(argmapsto, self, mapping), Stella.NIL);
                collect000 = collect000.rest;
              }
            }
          }
        }
      }
      copy = Logic.findOrCreateFunctionProposition(((Surrogate)(self.operator)), inputargs);
      return (copy);
    }
  }