#12632: bug comparing trivial Dirichlet characters
------------------------------+---------------------------------------------
   Reporter:  bober           |          Owner:  was            
       Type:  defect          |         Status:  positive_review
   Priority:  major           |      Milestone:  sage-5.0       
  Component:  number fields   |       Keywords:                 
Work_issues:                  |       Upstream:  N/A            
   Reviewer:  Jonathan Bober  |         Author:  David Loeffler 
     Merged:                  |   Dependencies:                 
------------------------------+---------------------------------------------
Description changed by bober:

Old description:

> {{{
> sage: G1 = DirichletGroup(4)
> sage: G2 = DirichletGroup(1)
> sage: G2[0] == G1[0].primitive_character()
> [...]
> ZeroDivisionError: Inverse does not exist.
> }}}
>
> (The answer should be {{{True}}}.)
>
> What happens, I think, is that
> {{{G1[0].primitive_character().parent().base_ring()}}} is not the same as
> {{{G2.base_ring()}}} and something somewhere tries to do some coercion,
> and fails:
>
> {{{
> sage: G1[0].primitive_character().parent().base_ring()
> Cyclotomic Field of order 2 and degree 1
> sage: G2.base_ring()
> Cyclotomic Field of order 1 and degree 1
> }}}

New description:

 {{{
 sage: G1 = DirichletGroup(4)
 sage: G2 = DirichletGroup(1)
 sage: G2[0] == G1[0].primitive_character()
 [...]
 ZeroDivisionError: Inverse does not exist.
 }}}

 (The answer should be {{{True}}}.)

 What happens, I think, is that
 {{{G1[0].primitive_character().parent().base_ring()}}} is not the same as
 {{{G2.base_ring()}}} and something somewhere tries to do some coercion,
 and fails:

 {{{
 sage: G1[0].primitive_character().parent().base_ring()
 Cyclotomic Field of order 2 and degree 1
 sage: G2.base_ring()
 Cyclotomic Field of order 1 and degree 1
 }}}

 Apply:
  - attachment:trac_12632-cyclo_coerce_bug.patch

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12632#comment:4>
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.

Reply via email to