I think that this summary is right, including the explicit conversion that relies on the index in gens(). David
On Sat, Apr 9, 2016 at 4:15 AM, Volker Braun <vbraun.n...@gmail.com> wrote: > Let me try to summarize the expected behavior: If there is a coercion of > the base rings, then there should be a coercion to the (laurent) polynomial > ring with additional variables. The variables in the different rings are > identified using their name (and not index in gens() or any other rule). > > sage: cm = get_coercion_model() > sage: R.<x> = QQ[] > sage: S.<x,t> = QQ[] > sage: cm.explain(R, S, operator.add) > Coercion on left operand via > Conversion map: > From: Univariate Polynomial Ring in x over Rational Field > To: Multivariate Polynomial Ring in x, t over Rational Field > Arithmetic performed after coercions. > Result lives in Multivariate Polynomial Ring in x, t over Rational Field > Multivariate Polynomial Ring in x, t over Rational Field > > No coercion if variable names are not strict subsets: > > sage: T.<x,y> = QQ[] > sage: cm.explain(T, S, operator.add) > Unknown result parent. > > But explicit conversion can still work, e.g. by falling back to the index > in gens(): > > sage: T(S.gen(0)) > x > sage: T(S.gen(1)) > y > > -- > 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 post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.