id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
10850 composition and comparison of number-field homomorphisms fwclarke davidloeffler "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)
sage: type(f*f)
}}}
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. = NumberField([x^2 - 2, x^2 - 3])
sage: g = End(L)[1]
sage: type(g*g)
}}}
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.
----
Apply [attachment:trac_10850.patch] to the Sage library.
" defect closed major sage-4.7.2 number fields fixed SimonKing sage-4.7.2.alpha3 Francis Clarke David Loeffler N/A