Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equality in PowerSeriesRing can be unpredictable #14889

Open
darijgr opened this issue Jul 13, 2013 · 5 comments
Open

Equality in PowerSeriesRing can be unpredictable #14889

darijgr opened this issue Jul 13, 2013 · 5 comments

Comments

@darijgr
Copy link
Contributor

darijgr commented Jul 13, 2013

I know this is unavoidable, but I'd say it should be better documented...

Over a finite field:

sage: K.<u> = PowerSeriesRing(GF(5))
sage: u = K.gen()
sage: u ** 25
u^25
sage: u ** 25 == 0
False
sage: (1 + u) ** 25
1 + u^25
sage: (1 + u) ** 25 == 1
False
sage: (1 / (1 - u)) ** 25     
1 + O(u^20)
sage: (1 / (1 - u)) ** 25 == 1
True

I suspect the last True is due to 1 / (1 - u) being a dense series, which leads to Sage keeping precision at O(u^20) rather than moving to a higher exponent.

Component: algebra

Keywords: power series, halting problem, discreteness, equality

Issue created by migration from https://trac.sagemath.org/ticket/14889

@darijgr darijgr added this to the sage-6.1 milestone Jul 13, 2013
@darijgr

This comment has been minimized.

@darijgr

This comment has been minimized.

@darijgr

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Jul 13, 2013

comment:4

The power series ring tries to keep arbitrary precision if possible, and only switches to series expansion if necessary. So u^25 is kept as exact, even though it is zero to the default_prec=20.

For interactive use, I think this is what one would want. However, for non-interactive use an "always approximate" mode where u^25 is immediately zero would be nice. I have written lots of code where many lines end in +O(u^prec) to get the precision back down.

@vbraun

This comment has been minimized.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants