The code for residue field is currently not correct. In converting a number field element, it expresses it in terms of a power basis for the number field and then casts the coefficients to Z/pZ. But the coefficients can have denominators divisible by p in general. That's probably what's causing your problem.
William and I have been talking about rewriting it so that residue field computes a p-maximal order and then does things appropriately, but it hasn't gotten done yet. David On Nov 15, 2007 8:57 PM, mabshoff < [EMAIL PROTECTED]> wrote: > > > > On Nov 16, 1:30 am, Iftikhar Burhanuddin <[EMAIL PROTECTED]> wrote: > > Hi folks, > > Hello Ifti, > > > > > I run into some coercion trouble when I reduce a fourier coefficient > > of a cusp form modulo a prime ideal. (See below.) > > > > Any idea how I can avoid this? > > > > No clue for now, but that looks like a bug to me. Please file a bug > report. > > Cheers, > > Michael > > > Regards, > > Ifti > > === > > > > sage: M = ModularSymbols(77, 2) > > > > sage: s = M.cuspidal_subspace().new_subspace() > > > > sage: N = s.decomposition() > > > > sage: f = N[3].q_eigenform() > > > > sage: R = f.base_ring() > > > > sage: K = R.number_field() > > > > sage: O = K.ring_of_integers() > > > > sage: I = O.ideal(7) > > > > sage: F = O.residue_field(I) > > > > sage: F(f[2]) > > > --------------------------------------------------------------------------- > > <type 'exceptions.TypeError'> Traceback (most recent call > > last) > > > > /home/burhanud/tau_nov14_07/<ipython console> in <module>() > > > > /home/burhanud/tau_nov14_07/residue_field.pyx in > > sage.rings.residue_field.ResidueFiniteField_givaro.__call__() > > > > /home/burhanud/tau_nov14_07/finite_field_givaro.pyx in > > sage.rings.finite_field_givaro.FiniteField_givaro.__call__() > > > > <type 'exceptions.TypeError'>: unable to coerce > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---