Bug report:

I encountered some weird behavior in LaurentPolynomialRing, such as
the
nontransitivity of the '==' relation.
Also, factoring in the fraction field caused an error. See below.

Feature request:

I would like elements of the fraction field F of a Laurent polynomial
ring S
(say with base ring a field) to be able to tell if they are actually
in S.
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. Since elements of K know when they are in R, an element of L can
tell if it is in S
by mapping itself to K and checking whether its denominator is a
monomial.

More generally, if S is any integral domain with fraction field F,
I would like to have the option of equipping the pair (S,F) with
methods that can detect whether an element of F is in S,
and the ability to compute the quotient of elements of S and return an
element of S if the answer is indeed in S and not just F.

---------

Sage Version 5.0.beta7, Release Date: 2012-03-05
Current Mercurial branch is: combinat

sage: S = LaurentPolynomialRing(QQ,['x'])
sage: F = S.fraction_field()
sage: R = S.polynomial_ring()
sage: K = R.fraction_field()
sage: F == K
False

sage: R.gen(0) == S.gen(0)
True
sage: 1/R.gen(0) == 1/S.gen(0)
True
sage: 1/S.gen(0) == (S.gen(0))^(-1)
True
sage: 1/R.gen(0) == (S.gen(0))^(-1)
False

# What!??

sage: R.gen(0)^(-1) in S
False
sage: S.gen(0)^(-1) in S
True
sage: 1/S.gen(0) in S
False

sage: (1/R.gen(0)).factor()
x^(-1)

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

-- 
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