public static Keyword maximumOfNumbersSpecialist(ControlFrame frame, Keyword lastmove) {
    { Proposition proposition = frame.proposition;
      Stella_Object listarg = (proposition.arguments.theArray)[0];
      Stella_Object listskolem = Logic.argumentBoundTo(listarg);
      Stella_Object maxarg = (proposition.arguments.theArray)[1];
      Stella_Object maxvalue = Logic.argumentBoundTo(maxarg);
      NumberWrapper maximum = null;
      boolean missingnumbersP = false;

      lastmove = lastmove;
      if ((listskolem != null) &&
          (!Logic.logicalCollectionP(listskolem))) {
        {
          System.out.println();
          System.out.println("Non list appears in second argument to 'MAXIMUM-OF-NUMBERS'");
          System.out.println();
        }
;
        return (Logic.KWD_TERMINAL_FAILURE);
      }
      { List listvalue = Logic.assertedCollectionMembers(listskolem, true);

        if (listvalue.emptyP()) {
          return (Logic.KWD_TERMINAL_FAILURE);
        }
        { Stella_Object v = null;
          Cons iter000 = listvalue.theConsList;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
            v = iter000.value;
            if (Stella_Object.isaP(v, Logic.SGT_STELLA_NUMBER_WRAPPER)) {
              if ((maximum == null) ||
                  PlKernelKb.arithmeticGreaterTest(((NumberWrapper)(v)), maximum)) {
                maximum = ((NumberWrapper)(v));
              }
            }
            else {
              missingnumbersP = true;
            }
          }
        }
        if (maximum == null) {
          return (Logic.KWD_TERMINAL_FAILURE);
        }
        if (missingnumbersP) {
          if ((maxvalue != null) &&
              (Stella_Object.isaP(maxvalue, Logic.SGT_STELLA_NUMBER_WRAPPER) &&
               PlKernelKb.arithmeticLessTest(((NumberWrapper)(maxvalue)), maximum))) {
            {
              ControlFrame.setFrameTruthValue(frame, Logic.FALSE_TRUTH_VALUE);
              return (Logic.KWD_TERMINAL_FAILURE);
            }
          }
          else {
            {
              ControlFrame.setFrameTruthValue(frame, Logic.UNKNOWN_TRUTH_VALUE);
              return (Logic.KWD_FAILURE);
            }
          }
        }
        return (Logic.selectTestResult(Logic.bindArgumentToValueP(maxarg, maximum, true), true, frame));
      }
    }
  }