#8800: Doctest coverage of categories - numerous coercion fixes
--------------------------+-------------------------------------------------
Reporter: SimonKing | Owner: Simon King
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.6.2
Component: categories | Keywords: categories doctests
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------+-------------------------------------------------
Comment(by SimonKing):
Hi Luis,
First of all, thank you for looking at the patch and finding so many
typos.
Replying to [comment:68 lftabera]:
> I have a question about functor AlgebraicExtensionFunctor and ZZ.
According to the documentation:
>
> When applying a number field constructor to the ring of integers, the
maximal order in the number field is returned::
>
> Why is this chosen instead of ZZ[x]/polynomial?
That is how currently extensions of `ZZ` behave:
{{{
sage: ZZ.extension(x^2+3*x+1,names=['y'])
Order in Number Field in y with defining polynomial x^2 + 3*x + 1
}}}
So, it wasn't my idea; the construction functor is merely mimicking what
the `extension` method of `ZZ` was doing anyway.
> Actually, the code does not follow the documentation except for
CyclotomicField:
>
> {{{
> sage: N = NumberField(x^2 - 5, 'a')
> sage: F, R = N.construction()
> sage: F(ZZ).gens()
> [1, a]
> sage: F(ZZ).is_maximal()
> False
> sage: N.maximal_order().gens()
> [1/2*a + 1/2, a]
> }}}
Again, this is what `ZZ.extension` currently does:
{{{
sage: ZZ.extension(x^2 - 5, 'a').is_maximal()
False
}}}
But I don't understand why that contradicts the documentation? Is it since
I wrote "Note that the construction functor of a number field returns the
order of that field"? ''The'' order?
Perhaps I should better write "Note that the construction functor of a
number field applied to the integers returns an order of that field,
similar to the behaviour of `ZZ.extension`"?
> I add a patch that contains some small improvements (in my opinion). A
couple of small tests and some style. Plase consider merging some of these
changes.
I agree with all changes that you suggest in your "some_ideas" patch - so,
once you're done, please promote it to a referee patch!
Best regards,
Simon
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8800#comment:69>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.