#8281: coercion problem breaks hecke_operator_on_basis over finite fields
-----------------------------+----------------------------------------------
   Reporter:  AlexGhitza     |       Owner:  craigcitro
       Type:  defect         |      Status:  new       
   Priority:  major          |   Milestone:  sage-4.3.3
  Component:  modular forms  |    Keywords:            
     Author:                 |    Upstream:  N/A       
   Reviewer:                 |      Merged:            
Work_issues:                 |  
-----------------------------+----------------------------------------------
 This happens in 4.3.3.alpha0:

 {{{
 sage: bas_mod5 = [f.change_ring(GF(5)) for f in victor_miller_basis(12,
 20)]
 sage: hecke_operator_on_basis(bas_mod5, 2, 12)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/ghitza/shared/articles/eigensystems/code/<ipython console> in
 <module>()

 /home/ghitza/sage-devel/local/lib/python2.6/site-
 packages/sage/modular/modform/hecke_operator_on_qexp.pyc in
 hecke_operator_on_basis(B, n, k, eps, already_echelonized)
     186     V = A.span_of_basis([g.padded_list(prec) for g in B],
     187                         already_echelonized = already_echelonized)
 --> 188     return _hecke_operator_on_basis(B, V, n, k, eps)
     189
     190

 /home/ghitza/sage-devel/local/lib/python2.6/site-
 packages/sage/modular/modform/hecke_operator_on_qexp.pyc in
 _hecke_operator_on_basis(B, V, n, k, eps)
     119     prec = V.degree()
     120     TB = [hecke_operator_on_qexp(f, n, k, eps, prec, check=False,
 _return_list=True)
 --> 121                 for f in B]
     122     TB = [V.coordinate_vector(w) for w in TB]
     123     return matrix(V.base_ring(), len(B), len(B), TB, sparse=False)

 /home/ghitza/sage-devel/local/lib/python2.6/site-
 packages/sage/modular/modform/hecke_operator_on_qexp.pyc in
 hecke_operator_on_qexp(f, n, k, eps, prec, check, _return_list)
      87     for m in range(prec):
      88         am = sum([eps(d) * d**l * f[m*n//(d*d)] for \
 ---> 89                   d in divisors(gcd(n, m)) if (m*n) % (d*d) == 0])
      90         v.append(am)
      91     if _return_list:

 /home/ghitza/sage-devel/local/lib/python2.6/site-
 packages/sage/structure/element.so in
 sage.structure.element.RingElement.__mul__
 (sage/structure/element.c:11336)()

 /home/ghitza/sage-devel/local/lib/python2.6/site-
 packages/sage/structure/coerce.so in
 sage.structure.coerce.CoercionModel_cache_maps.bin_op
 (sage/structure/coerce.c:6990)()

 TypeError: unsupported operand parent(s) for '*': 'Cyclotomic Field of
 order 1 and degree 1' and 'Finite Field of size 5'
 }}}

 I'm putting this in modular forms, but the underlying issue is likely a
 more general coercion problem.

 I'm ccing Craig because I seem to remember that he fixed something like
 this before :).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8281>
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