public static void bindLogicObjectToSurrogate(Symbol name, Stella_Object renamed_Object) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject object000 = ((LogicObject)(renamed_Object));

        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PROPOSITION)) {
        { Proposition object000 = ((Proposition)(renamed_Object));

        }
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("INTERNAL ERROR: Can't yet define logic objects of type `" + renamed_Object.primaryType() + "'");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
    { Surrogate namesurrogate = Logic.internLogicObjectSurrogate(name);
      Surrogate objectsurrogate = Logic.objectSurrogate(renamed_Object);
      Stella_Object oldobject = namesurrogate.surrogateValue;
      Keyword definitiontype = null;

      if ((oldobject != null) &&
          oldobject.deletedP()) {
        oldobject = null;
        namesurrogate.surrogateValue = null;
      }
      if (((Boolean)(Stella.$WARNIFREDEFINEp$.get())).booleanValue() &&
          ((objectsurrogate != null) &&
           (!(objectsurrogate == namesurrogate)))) {
        {
          System.out.println("The `" + Logic.nameObjectMetaclass(renamed_Object) + "' now named `" + name + "' used to be named `" + Symbol.internSymbolInModule(objectsurrogate.symbolName, ((Module)(objectsurrogate.homeContext)), false) + "'.");
          System.out.println("    Unlinking it from its old name.");
        }
;
        objectsurrogate.surrogateValue = null;
      }
      Logic.objectSurrogateSetter(renamed_Object, namesurrogate);
      definitiontype = Logic.logicObjectDefinitionType(name, oldobject, renamed_Object);
      namesurrogate.surrogateValue = renamed_Object;
      if ((oldobject != null) &&
          (!Stella_Object.eqlP(oldobject, renamed_Object))) {
        Logic.objectSurrogateSetter(oldobject, null);
      }
      if (definitiontype == Logic.KWD_DEFINITION) {
      }
      else if (definitiontype == Logic.KWD_PROPER_DEFINITION) {
        Logic.transferPropositionsAndBacklinks(oldobject, renamed_Object);
        { Surrogate testValue001 = Stella_Object.safePrimaryType(oldobject);

          if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
            { LogicObject oldobject000 = ((LogicObject)(oldobject));

              oldobject000.deletedPSetter(true);
            }
          }
          else if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_PROPOSITION)) {
            { Proposition oldobject000 = ((Proposition)(oldobject));

              oldobject000.deletedPSetter(true);
            }
          }
          else {
            { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

              stream001.nativeStream.print("`" + testValue001 + "' is not a valid case option");
              throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
            }
          }
        }
      }
      else if (definitiontype == Logic.KWD_REDEFINITION) {
        Logic.redefineLogicObject(name, oldobject, renamed_Object);
      }
      else {
        { OutputStringStream stream002 = OutputStringStream.newOutputStringStream();

          stream002.nativeStream.print("`" + definitiontype + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream002.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }