x = defop(torch.Tensor)
w = defop(float)
print(repr(x() * w()))
print(repr(w() * x()))
_TensorTerm(_BaseOperation(<function _wrap_binop.<locals>._wrapped_op at 0x10658fd00>, name=mul, freshening=[]), (_TensorTerm(_BaseOperation(<function _.<locals>.func at 0x12a9dd7e0>, name=Tensor, freshening=[1515040756]), (), {}), _RealTerm(_BaseOperation(<function _.<locals>.func at 0x12a9dcf70>, name=float, freshening=[3341589068]), (), {})), {})
_RealTerm(_BaseOperation(<function _wrap_binop.<locals>._wrapped_op at 0x10658fd00>, name=mul, freshening=[]), (_RealTerm(_BaseOperation(<function _.<locals>.func at 0x12a9dcf70>, name=float, freshening=[3341589068]), (), {}), _TensorTerm(_BaseOperation(<function _.<locals>.func at 0x12a9dd7e0>, name=Tensor, freshening=[1515040756]), (), {})), {})
produces
but both should be
TensorTerms.