#15996: Allow general base rings for WeierstrassForm
-------------------------------------+-------------------------------------
       Reporter:  jkeitel            |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  algebraic          |   Resolution:
  geometry                           |    Merged in:
       Keywords:  toric,             |    Reviewers:
  weierstrass                        |  Work issues:
        Authors:  Jan Keitel         |       Commit:
Report Upstream:  N/A                |  3c0999f8fe80473c74afb9b7500874cf21ece17b
         Branch:                     |     Stopgaps:
  u/jkeitel/weierstrass_general_rings|
   Dependencies:                     |
-------------------------------------+-------------------------------------
Description changed by jkeitel:

Old description:

> Currently, one method in {{{sage.rings.invariant_theory}}} and another
> one in {{{sage.schemes.toric.weierstrass}}} make use of
> {{{__floordiv__}}}. More precisely, if p and m are elements in a ring R
> with base ring B, then one needs
> {{{p // m}}},
> where {{{m}}} always has a unit coefficient. However, {{{__floordiv__}}}
> is only implemented if B is a field and therefore doing something like
> {{{
> sage: P.<a> = QQ[]
> sage: R.<x,y,z> = P[]
> sage: cubic = x^3 + a*y^3 + a^2*z^3
> sage: WeierstrassForm(cubic)
> }}}
> does not work because
> {{{
> sage: cubic // x^3
> }}}
> fails. However, since the coefficients of {{{m}}} are always in {{{QQ}}},
> we can work around that and I've written a short patch that does so.
>
> It might not be very pretty (if someone has a nicer idea, that would be
> great), but it works and actually speeds up long calculations.
>
> Best,
> Jan

New description:

 Currently, one method in {{{sage.rings.invariant_theory}}} and another one
 in {{{sage.schemes.toric.weierstrass}}} make use of {{{__floordiv__}}}.
 More precisely, if p and m are elements in a ring R with base ring B, then
 one needs
 {{{p // m}}},
 where {{{m}}} always has a unit coefficient. However, {{{__floordiv__}}}
 is only implemented if B is a field and therefore doing something like
 {{{
 sage: P.<a, b> = QQ[]
 sage: R.<x,y,z> = P[]
 sage: cubic = x^3 + a*y^3 + a^2*z^3
 sage: WeierstrassForm(cubic)
 }}}
 does not work because
 {{{
 sage: cubic // x^3
 }}}
 fails. However, since the coefficients of {{{m}}} are always in {{{QQ}}},
 we can work around that and I've written a short patch that does so.

 It might not be very pretty (if someone has a nicer idea, that would be
 great), but it works and actually speeds up long calculations.

 Best,
 Jan

--

--
Ticket URL: <http://trac.sagemath.org/ticket/15996#comment:5>
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.

Reply via email to