Re: [sage-devel] coercion vs conversion between polynomial rings

2012-06-27 Thread David Roe
This is a bug in the __call__ method of multivariate polynomial rings, which doesn't respect user-defined coercions. The offending lines are 805-813 in sage/rings/polynomial/multi_polynomial_libsingular.pyx: if isinstance(element, MPolynomial_libsingular) and element.parent() is not self

[sage-devel] coercion vs conversion between polynomial rings

2012-06-27 Thread luisfe
I think that the following behavior is wrong. sage: K=QQ['t,s'] sage: L=QQ['t0,t1,s0,s1'] sage: L.inject_variables() Defining t0, t1, s0, s1 sage: Hom(K,L)([t0+t1,s0]).register_as_coercion() sage: L.coerce_map_from(K) Ring morphism: From: Multivariate Polynomial Ring in t, s over Rational F