I think I've got it. In `free_module_element.pyx` the method `FreeModuleElement_generic_dense._lmul_` does the following:
cpdef _lmul_(self, Element right): """ EXAMPLES:: sage: v = vector([-1,0,3,pi]) # needs sage.symbolic sage: v._lmul_(2/3) # needs sage.symbolic (-2/3, 0, 2, 2/3*pi) sage: v * (2/3) # needs sage.symbolic (-2/3, 0, 2, 2/3*pi) """ if right._parent is self._parent._base: v = [(<RingElement>x)._mul_(right) for x in self._entries] else: v = [x * right for x in self._entries] return self._new_c(v) However, symmetric function do not inherit from `RingElement`, which implies that the wrong method is called. What can we do about that? Martin On Friday 10 May 2024 at 18:39:21 UTC+2 Martin R wrote: > Update: I'm afraid I misunderstood <built-in function mul> - this does > call __mul__, right? > > On Friday 10 May 2024 at 15:20:07 UTC+2 Martin R wrote: > >> I am trying to fix >> https://github.com/sagemath/sage/pull/37976#issuecomment-2104464722 >> >> Briefly: >> >> sage: h = SymmetricFunctions(QQ).h() >> sage: v = vector([h[3]+h[2,1]]) >> sage: v * (-111) >> ({[3]: 1, [2, 1]: 1}) >> >> One reason for this is possibly >> >> sage: a = coercion_model.get_action(v.parent(), ZZ, operator.mul, v, -111) >> sage: a >> Right scalar multiplication by Integer Ring on Ambient free module of >> rank 1 over the integral domain Symmetric Functions over Rational Field in >> the homogeneous basis >> sage: a.op >> <built-in function mul> >> >> Help is greatly appreciated, as always, >> >> Martin >> > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/70c0174c-3fbc-4f8b-9809-280d9c316f86n%40googlegroups.com.