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
implement multivariate truncated power series arithmetic #1956
Comments
comment:2
Hi Mike, hasn't something happened in that direction already or am I confused? Cheers, Michael |
Author: niles |
comment:3
I just attached a first version of multivariate power series. In order to pass all tests, one also needs the patches at #9457 and #9443. Without these, everything still works though. The implementation is based on an idea mentioned in this sage-devel thread: Although there are some limitations of this approach, I think there's a useful amount of functionality here and I'm happy with how this first version works. Having said that, here are some of the issues that are still unresolved. I'd be happy to hear recommendations about how to prioritize them, or others :)
|
comment:4
Uploaded a revised patch which now includes doctests for all* functions. And yes, I did find a fix a number of bugs while doing that. So thanks, whoever decided to require 100% doctest coverage :)
further note: I commented out the function |
comment:5
Hi, I took a quick look, here are some examples:
I know very little about multivariate power series, thus I'm clueless about whether your implementation strategy is (a) standard and/or (b) clever. Is it something that is usually done? |
comment:6
Replying to @malb: Thanks!
fixed now.
sorry, not sure what you mean by 80 here; I'm happy to add linebreaks though :)
I've added comparisons with polynomial arithmetic; do you think I need to also have the output printed?
I don't know much about this either, but it seems like a natural enough idea. After a quick look around google, here's one example: http://algo.inria.fr/seminars/sem00-01/lecerf.html I'll take a look for more complete references too. |
comment:7
Replying to @nilesjohnson:
Sorry, I meant around 80 characters, which is the standard UNIX terminal width.
I'd prefer that to be honest.
Have you compared the speed with, say, Magma? |
comment:8
Replying to @malb:
fixed now
arithmetic tests now printed, and confirmed with polynomial tests
Here are five simple comparisons, three with 2 variables and two with 4 variables, all over QQ. This sage patch performs substantially better in 3/4 cases, with magma performing substantially better in the other case. Using polynomial multiplication easily beats magma's restriction on the number of coefficients it will compute for a lazy power series (test 3). Processor: sage:
magma:
sage:
magma:
In the case where this package performs badly, it seems to be caused by the rational coefficients:
|
comment:9
Replying to @nilesjohnson:
oops; should be "This patch performs substantially better in 4/5 cases..." |
Changed keywords from none to multivariate power series |
comment:11
First of all: It would certainly be good to have multivariate power series in Sage. Also the performance seems to be pretty good. Thank you! I have some criticism, though.
I was reading part of the patch, and I see that your multivariate power series rings have a custom Moreover, the custom method seems to provide a non-standard behaviour: Usual in Sage is to have Another formulation of the rule is: If a.parent() is P and R has a coercion map from P then a is in R: Since there is a coercion map, R(a) is supposed to work, and But you have in your doctests
in a situation were apparently a coercion from
In your The same applies to doctests. So, instead of
you should do
and instead of
you should have
I think it should even be
because, if I understand correctly, there is a coercion from N to M -- see point 1. I am now running |
comment:12
With
These are quite many failures. So, this needs work. |
comment:13
PS: It would be nice if the double square bracket notation would work in the multivariate case:
|
Work Issues: Fix doctests; fix contains; add syntactical sugar |
comment:14
Thanks for taking a look at this; I'll address the other work issues soon, but for now I wanted to check the doctests. There aren't any tests flagged as
Do you get all tests passed without |
comment:15
Replying to @nilesjohnson:
Outch! Sorry, I missed that. I think I'll not be able to resume work before Monday, but then I'll try again with #9457 and #9433. Cheers, Simon |
Attachment: trac_1956_combined_5.patch.gz updated for new repr of completion functor |
comment:128
A new patch, updated according to the repr string of the completion functor. No other changes. |
This comment has been minimized.
This comment has been minimized.
comment:129
Patchbot: apply trac_1956_combined_5.patch |
comment:130
Please rebase properly to sage-4.7.rc2:
|
comment:131
Replying to @jdemeyer:
I've addressed this problem, but I see other issues with |
Attachment: trac_1956_combined_6.patch.gz |
comment:132
Ah; problems with Patchbot: apply trac_1956_combined_6.patch |
This comment has been minimized.
This comment has been minimized.
comment:133
Can we get this switched back to positive review? Sage 4.7.rc3 fixes the problems with |
comment:134
Replying to @nilesjohnson:
bump Any reviewers? |
comment:135
okay |
Merged: sage-4.7.1.alpha2 |
Multivariate truncated power series arithmetic has been requested a lot.
Apply:
This is a single patch combining all of the partial patches now attached to this ticket.
CC: @mwhansen @simon-king-jena @malb @unzvfu
Component: commutative algebra
Keywords: multivariate power series
Author: Niles Johnson
Reviewer: Martin Albrecht, Simon King
Merged: sage-4.7.1.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/1956
The text was updated successfully, but these errors were encountered: