public static boolean relationArityOkP(Surrogate relationref, int arity) {
    { NamedDescription relation = Logic.getDescription(relationref);

      if (relation == null) {
        System.out.println("Reference to undefined relation " + relationref.symbolName);
        return (false);
      }
      if (!(relation.arity() == arity)) {
        {
          System.out.println("Error:  Relation " + relationref.symbolName + " has arity " + relation.arity());
          System.out.println("   when arity " + arity + " expected.");
        }
;
        return (false);
      }
      return (true);
    }
  }