public static Cons generateFunctionProposition(Proposition self) {
    { Cons result = Proposition.generateFunctionAsTerm(self);
      Stella_Object lastarg = self.arguments.last();
      Stella_Object lastargvalue = Logic.innermostOf(lastarg);

      if ((lastargvalue != null) &&
          (!Stella_Object.eqlP(lastargvalue, lastarg))) {
        lastarg = Logic.generateTerm(lastargvalue);
      }
      else {
        lastarg = Logic.generateTerm(lastarg);
      }
      if (((Boolean)(Logic.$PRINTFUNCTIONSASRELATIONSp$.get())).booleanValue()) {
        return (result.concatenate(Cons.cons(lastarg, Stella.NIL), Stella.NIL));
      }
      else {
        return (Cons.list$(Cons.cons(Logic.SYM_STELLA_e, Cons.cons(result, Cons.cons(Cons.cons(lastarg, Stella.NIL), Stella.NIL)))));
      }
    }
  }