public static boolean functionWithDefinedValueP(Proposition proposition) {
    if (!(proposition.kind == Logic.KWD_FUNCTION)) {
      return (false);
    }
    { Stella_Object lastargument = proposition.arguments.last();
      boolean resultP = Logic.testPropertyP(Logic.getDescription(((Surrogate)(proposition.operator))), Logic.SGT_PL_KERNEL_KB_TOTAL) ||
          Logic.extensionalIndividualP(Logic.valueOf(lastargument));

      if (resultP &&
          (!Logic.worldStateP(((Context)(Stella.$CONTEXT$.get()))))) {
        Proposition.assignTruthValue(proposition, Stella.TRUE_WRAPPER);
        if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(lastargument), Logic.SGT_LOGIC_SKOLEM)) {
          { Skolem lastargument000 = ((Skolem)(lastargument));

            if ((lastargument000.skolemType != null) &&
                (!(lastargument000.skolemType == Logic.SGT_STELLA_THING))) {
              { Object old$Evaluationmode$000 = Logic.$EVALUATIONMODE$.get();
                Object old$InvisibleassertionP$000 = Logic.$INVISIBLEASSERTIONp$.get();

                try {
                  Native.setSpecial(Logic.$EVALUATIONMODE$, Logic.KWD_EXTENSIONAL_ASSERTION);
                  Native.setBooleanSpecial(Logic.$INVISIBLEASSERTIONp$, true);
                  Logic.assertIsaProposition(lastargument000, lastargument000.skolemType);

                } finally {
                  Logic.$INVISIBLEASSERTIONp$.set(old$InvisibleassertionP$000);
                  Logic.$EVALUATIONMODE$.set(old$Evaluationmode$000);
                }
              }
            }
          }
        }
        else {
        }
      }
      return (resultP);
    }
  }