#16585: improved PolynomialSequence
-------------------------------------+-------------------------------------
Reporter: malb | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: commutative | Resolution:
algebra | Merged in:
Keywords: sd59 | Reviewers: Jakob Kroeker
Authors: Martin Albrecht | Work issues:
Report Upstream: N/A | Commit:
Branch: | 620322d9c80b1b30e71ce89d09e5ee42e079163d
u/malb/t16585_mpolynomial_sequence | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by malb):
* status: needs_work => needs_review
Comment:
> you change the default option 'choose_degree=False' Changing default
options
> is dangerous since it may break existing code. Please give reasons why
this
> change is still ok
It changes the behaviour of a random sampler so the output is not
deterministic anyway. Also, ``choose_degree=True``does not return what I’d
expect from a random sampler: something uniform if possible. Mod p the new
default lives up to this expectation if we consider uniform to mean:
uniform of a given degree.
> "make sure we use the polynomial ring as ring not the monoid", in file
> ./src/sage/rings/polynomial/multi_polynomial_sequence.py
>
> I think there is a failing example, if the input below is legal:
{{{
sage: R.<x,y,z> = PolynomialRing(QQ)
sage: I = Ideal(5000*x*R,y*x+5) #error
# Ring is Monoid of ideals of Multivariate Polynomial Ring in x, y, z over
Rational Field =>error:
# R must be a commutative ring
}}}
I don’t think this is connected. I’m getting the same error with sage
6.4.1. Also, The business of monoid vs ring only occurs when PolyBoRi
implements the ring.
> a second failing example (different error):
{{{
sage: R.<x,y,z> = PolynomialRing(QQ)
sage: I = Ideal(5000*x*K+y*x,y*x+5)
# TypeError: not a constant polynomial
}}}
See above.
> Why is c set to zero? At least this should be documented. Is it not
possible
> to have a different characteristic in case of an NotImplementedError??
Do you
> have an example which hits this issue?
I added a comment:
# We assume that our ring has characteristic zero if it does not implement
a
# characteristic(). For example, generic quotient rings do not have a
characteristic()
# method implemented. It is okay to set c = 0 here because we're only
using the
# characteristic to pick a more specialized implementation for c = 2.
> in src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx ,
line
> 114, ff.sage_ideal_to_singular_ideal Is there a corresponding test for a
> conversion from "or a list of generators"? If not, could you add one?
I added a test.
> in file 'src/sage/rings/polynomial/polynomial_singular_interface.py
renaming
> singular_default to singular; why? At other places there are
singular_default
> usages. Is there a difference?
There is no need to rename singular to singular_default so I dropped it.
It makes no difference either way.
> It seems that reduce examples show no examples for explicitly reducing
leading
> coefficient, Could you add an example or a test which hits
> "ret.append(f.lc()**(-1)*f)"?
I added one.
> Sequence has no 'reduced' function Is that ok? Example:
I think this is fine as Sequence is not only for polynomials but for
anything. However, reduced() only seems to make sense for polynomials.
> (fix Magma interface broken when moving decorators around): Could you
explain
> what may get wrong and add an example?
Unfortunately, I forgot. I could investigate if you insist.
--
Ticket URL: <http://trac.sagemath.org/ticket/16585#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.