Thanks, Simon, for the explanation of coercions.

> > I encountered some weird behavior in LaurentPolynomialRing, such as
> > the nontransitivity of the '==' relation.
>
> Note that it is virtually impossible to have a transitive ==-relation
> that at the same time provides certain mathematical features that are
> wanted by most people.

However if all coercion maps involved are injective then
can't I expect == to be preserved?

> > Also, factoring in the fraction field caused an error.
>
> It is implemented by factoring numerator and denominator, see below;
> the problem is in factoring Laurent series.

It fails in factoring the unit element of S.
That is pretty strange to me.

> > If R is the polynomial ring underlying S
> > then there should be a canonical isomorphism installed between F and
> > the fraction field K
> > of R.
>
> There *is* a coercion from K to F, but of course not in the opposite
> direction:

Yeah, this unimpeachable coercion comes from the
universal mapping property of fraction fields.

>   sage: S.<x> = LaurentPolynomialRing(QQ)
>   sage: F = S.fraction_field()
>   sage: F
>   Fraction Field of Univariate Laurent Polynomial Ring in x over
> Rational Field
>   sage: R = S.polynomial_ring()
>   sage: K = R.fraction_field()
>   sage: F.has_coerce_map_from(K)
>   True

> Note that there is a coercion from S to F

which is injective

> and also Sage can not find the pushout:
>   sage: pushout(S, FractionField(R))
>   Traceback (most recent call last):
>   ...
>   CoercionException: ...

Since the coercion from S to FractionField(R)
is injective, the pushout must necessarily be
FractionField(R).

On the other hand, FractionField(R)
does not know about membership in the
subring S.

> > sage: (1/S.gen(0)).factor()
> > Traceback (most recent call last)
> > ...
> > AttributeError: 'sage.rings.integer.Integer' object has no attribute
> > 'dict'

s = 1/S.gen(0)
sn = s.numerator()
sn.factor()
<boom>

> The last line will show you the source code, and you will see that it
> is attempted to factor numerator and denominator. As it turns out, the
> problem lies in the factorisation of Laurent series.

The problem occurs when the Laurent polynomial ring unit element
is factored!

--Mark

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to