#10850: composition and comparison of number-field homomorphisms
------------------------------+---------------------------------------------
Reporter: fwclarke | Owner: davidloeffler
Type: defect | Status: new
Priority: major | Milestone:
Component: number fields | Keywords:
Author: Francis Clarke | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
As of 4.6.2.rc0, when homomorphisms of number fields are composed the
result has type `RingHomomorphism_im_gens` rather than
`NumberFieldHomomorphism_im_gens`:
{{{
sage: K = QuadraticField(2)
sage: e, f = End(K)
sage: type(f)
<class 'sage.rings.number_field.morphism.NumberFieldHomomorphism_im_gens'>
sage: type(f*f)
<type 'sage.rings.morphism.RingHomomorphism_im_gens'>
}}}
Consequently, comparison fails to work correctly:
{{{
sage: f*f == e
False
sage: f*f
Ring endomorphism of Number Field in a with defining polynomial x^2 - 2
Defn: a |--> a
sage: e
Ring endomorphism of Number Field in a with defining polynomial x^2 - 2
Defn: a |--> a
}}}
Moreover, for relative number fields composition yields a formal composite
map:
{{{
sage: L.<a, b> = NumberField([x^2 - 2, x^2 - 3])
sage: g = End(L)[1]
sage: type(g*g)
<type 'sage.categories.map.FormalCompositeMap'>
}}}
and this means that powers beyond cubes produce an error:
{{{
sage: g^4
Traceback (most recent call last)
...
AttributeError: 'sage.categories.map.FormalCompositeMap' object has no
attribute '_rational_'
}}}
Comparison for homomorphisms out of relative number fields needs fixing
too, because they are not standard im_gens homomorphisms.
The patch deals with these issues.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10850>
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.