#13766: No conversion from unit group to number field.
---------------------------------+------------------------------------------
Reporter: mderickx | Owner: davidloeffler
Type: defect | Status: positive_review
Priority: major | Milestone:
sage-duplicate/invalid/wontfix
Component: number fields | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Old description:
> Currently we have:
> {{{
> sage: L.<a>=CyclotomicField(7)
> sage: a in L.unit_group()
> False
> }}}
>
> This is because:
> {{{
> sage: a1=L.unit_group()(a)
> sage: L(a1)
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call
> last)
>
> /Users/maarten/Dropbox/Artikelen/MazurKamiennyDerickx/tex/<ipython
> console> in <module>()
>
> /Applications/sage/local/lib/python2.6/site-
> packages/sage/structure/parent.so in
> sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6820)()
>
> /Applications/sage/local/lib/python2.6/site-
> packages/sage/structure/coerce_maps.so in
> sage.structure.coerce_maps.DefaultConvertMap_unique._call_
> (sage/structure/coerce_maps.c:3254)()
>
> /Applications/sage/local/lib/python2.6/site-
> packages/sage/structure/coerce_maps.so in
> sage.structure.coerce_maps.DefaultConvertMap_unique._call_
> (sage/structure/coerce_maps.c:3157)()
>
> /Applications/sage/local/lib/python2.6/site-
> packages/sage/rings/number_field/number_field.pyc in
> _element_constructor_(self, x)
> 6974 return self._coerce_from_str(x)
> 6975 else:
> -> 6976 return self._coerce_non_number_field_element_in(x)
> 6977
> 6978 # TODO:
>
> /Applications/sage/local/lib/python2.6/site-
> packages/sage/rings/number_field/number_field.pyc in
> _coerce_non_number_field_element_in(self, x)
> 5064 except (TypeError, AttributeError), msg:
> 5065 pass
> -> 5066 raise TypeError, type(x)
> 5067
> 5068 def _coerce_from_str(self, x):
>
> TypeError: <class
> 'sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement'>
> }}}
New description:
*** already fixed by #13687, apply no patches ***
Currently we have:
{{{
sage: L.<a>=CyclotomicField(7)
sage: a in L.unit_group()
False
}}}
This is because:
{{{
sage: a1=L.unit_group()(a)
sage: L(a1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/Users/maarten/Dropbox/Artikelen/MazurKamiennyDerickx/tex/<ipython
console> in <module>()
/Applications/sage/local/lib/python2.6/site-
packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__
(sage/structure/parent.c:6820)()
/Applications/sage/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3254)()
/Applications/sage/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3157)()
/Applications/sage/local/lib/python2.6/site-
packages/sage/rings/number_field/number_field.pyc in
_element_constructor_(self, x)
6974 return self._coerce_from_str(x)
6975 else:
-> 6976 return self._coerce_non_number_field_element_in(x)
6977
6978 # TODO:
/Applications/sage/local/lib/python2.6/site-
packages/sage/rings/number_field/number_field.pyc in
_coerce_non_number_field_element_in(self, x)
5064 except (TypeError, AttributeError), msg:
5065 pass
-> 5066 raise TypeError, type(x)
5067
5068 def _coerce_from_str(self, x):
TypeError: <class
'sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement'>
}}}
*** already fixed by #13687, apply no patches ***
--
Comment (by mstreng):
(just making it a bit clearer/easier for Jeroen)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13766#comment:11>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.