#15348: "R.<a> =" syntactic sugar incorrect for EquationOrder and ZZ.extension
-------------------------------------+-------------------------------------
Reporter: emassop | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-7.0
Component: number fields | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/15348 | dac0a4cdb957393b282619213dc231f55cf55cc4
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by emassop):
I don't really like unconditionally preferring `ring_generators()` in such
a general place as `_first_n_gens()` is. Perhaps this should be something
like `defining_generators()` instead of `ring_generators()`. This would be
set when defining something by generators, and always refer to the
generators from the definition. That said, s/ring/defining/ can be done
later, so out of pragmatism I'm not against the current approach.
However, the current approach with `ring_generators()` doesn't always work
as expected, which could be considered be a separate bug (namely lack of
prepopulating ring_generators if defining something by ring generators).
For instance
{{{
K.<i> = NumberField(x^2+1)
O = K.order(-i+1)
gens = O.ring_generators()
if gens == [-i+1]:
print "O.<a> = K.order(-i+1) would work as expected"
else:
print "O.<a> = K.order(-i+1) would make a equal to %r, not as -i+1 as
expected." % gens[0]
}}}
prints
{{{
O.<a> = K.order(-i+1) would make a equal to i, not as -i+1 as expected.
}}}
on https://sagecell.sagemath.org/.
What do you think? Which `?_gens` should generally be used and should
populating `?_gens` with the defining generators be separate bugs?
--
Ticket URL: <http://trac.sagemath.org/ticket/15348#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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.