#5792: [with patch, needs review] Dirichlet character bug
---------------------------+------------------------------------------------
Reporter: davidloeffler | Owner: craigcitro
Type: defect | Status: new
Priority: major | Milestone:
Component: modular forms | Keywords: dirichlet characters
---------------------------+------------------------------------------------
Comment(by craigcitro):
Well, I've tracked down the problem, but I'm not sure what the "right" fix
is. (There are several possibilities.)
Amusingly, it's not actually the trivial character that causes trouble
directly -- it's the other character here. (The exception gets raised
trying to raise `psi` above to a power.) Here's what's going on ... the
trivial character gets created in the group of characters of conductor 16
and whose only value can be 1:
{{{
sage: id = trivial_character(16)
sage: id.parent()
Group of Dirichlet characters of modulus 16 over Rational Field
sage: id.parent().zeta_order()
1
}}}
Then the nontrivial character of conductor 4 gets coerced in, which
actually works -- but that's the character that causes trouble:
{{{
sage: H = DirichletGroup(4,base_ring=QQ)
sage: psi = id.parent()(H.0)
sage: psi.values()
BOOM!
}}}
In some sense, this is silly: it should at least have `zeta_order` give 2,
since there are two roots of unity in `QQ`. However, the other issue is
that coercing `H.0` into `id.parent()` should never have worked -- its
order doesn't divide the `zeta_order` of `id.parent()`, so it should have
died there. Then step 1 is to make the call `id.parent()(H.0)` fail.
Of course, now that just makes the call to
`half_integral_weight_modform_basis` fail -- so we need to do something
there. We have (at least) two choices:
* change the `trivial_character` call to give `zeta_order=2`
* change `half_integral.py` so that it calls differently.
I think the first is probably the more pragmatic choice, though maybe less
"philosophically correct"?
I've attached a patch that does the former.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5792#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---