public static void prettyPrintNamedRule(Surrogate rulename, OutputStream stream) {
    { Symbol operator = Logic.SYM_LOGIC_DEFRULE;
      Proposition proposition = ((Proposition)(rulename.surrogateValue));

      { Object old$Printmode$000 = Logic.$PRINTMODE$.get();
        Object old$Printlogicalformstream$000 = Logic.$PRINTLOGICALFORMSTREAM$.get();
        Object old$Indentcounter$000 = Logic.$INDENTCOUNTER$.get();

        try {
          Native.setSpecial(Logic.$PRINTMODE$, Logic.KWD_ORIGINAL);
          Native.setSpecial(Logic.$PRINTLOGICALFORMSTREAM$, stream);
          Native.setIntSpecial(Logic.$INDENTCOUNTER$, 2);
          stream.nativeStream.println("(" + operator + " " + Symbol.internSymbolInModule(rulename.symbolName, ((Module)(rulename.homeContext)), true));
          Logic.printIndent(stream, Stella.NULL_INTEGER);
          Logic.prettyPrintLogicalForm(proposition, stream);
          { Proposition prop = null;
            Cons iter000 = Logic.originatedPropositions(proposition).theConsList;

            loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              prop = ((Proposition)(iter000.value));
              { Keyword testValue000 = prop.kind;

                if ((testValue000 == Logic.KWD_PREDICATE) ||
                    (testValue000 == Logic.KWD_FUNCTION)) {
                  if ((prop.arguments.length() == 2) &&
                      ((prop.arguments.theArray)[0] == proposition)) {
                    {
                      stream.nativeStream.println();
                      stream.nativeStream.print("  " + prop.operator.keywordify() + " ");
                    }
;
                    Logic.prettyPrintLogicalForm((prop.arguments.theArray)[1], stream);
                    continue loop000;
                  }
                }
                else {
                }
              }
              {
                stream.nativeStream.println();
                stream.nativeStream.print("  :AXIOMS ");
              }
;
              Logic.prettyPrintLogicalForm(prop, stream);
            }
          }
          stream.nativeStream.println(")");

        } finally {
          Logic.$INDENTCOUNTER$.set(old$Indentcounter$000);
          Logic.$PRINTLOGICALFORMSTREAM$.set(old$Printlogicalformstream$000);
          Logic.$PRINTMODE$.set(old$Printmode$000);
        }
      }
    }
  }