On Jun 12, 2007, at 11:31 AM, Michel wrote: > Ideally I should be the element x in ZZ[x]/(x^2+1) (and not QQ[x]/ > (x^2+1)).
I agree, but currently we have much better support for number fields than orders or quotient rings. Hopefully that'll change (r.e. David Roe's SEP). > Likewise zeta[n] could be the element y in ZZ[y]/(y^n-1). Perhaps. Zeta is used for a lot of other things than the n-th roots of unity though, that would be my only concern. > > These rings should have automatic coercions to many other rings > (including > of course the symbolic ring). > > Michel > > > On Jun 12, 8:04 pm, Robert Bradshaw <[EMAIL PROTECTED]> > wrote: >> On Jun 12, 2007, at 8:21 AM, Nick Alexander wrote: >> >> >> >>> "William Stein" <[EMAIL PROTECTED]> writes: >> >>>> On 6/12/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote: >>>>> I think the default I should belong to the number field Q[I] (or >>>>> perhaps even the ring of integers) to start with (together with a >>>>> fixed embedding into C). It would be coerced into C, the symbolic >>>>> ring, etc. as needed. >> >>>> With the current coercion and number field model, I very strongly >>>> disagree -- the I should be symbolic. Anyway, >>>> you didn't give any argument for why you think "I" should be a >>>> number field >>>> element instead of a symbolic element. I would probably agree >>>> with you if you >>>> were to give a good argument for why you think that, and if number >>>> fields were >>>> much more sophisticated, and if the coercion model were suitably >>>> enhanced. >> >>> Making I different from any other symbol is confusing to me, >>> too. Are >>> we going to declare zeta2, ..., zetan to be the other roots of >>> unity? >>> And have the all special cased too? The symbolic functionality >>> is at >>> least symmetric. >> >> My reasoning is the same as for making sqrt(2), etc. belong to a >> number field rather than the symbolics. First is simply speed, >> especially over compound objects--e.g. a power series over the >> symbolic ring is really slow. I also think it's unnatural to have to >> manually simplify "constant" expressions like 1/(1+I). Symmetry is >> already broken, as I is already special >> >> sage: I^2 >> -1 >> >> Maple and Mathematica have this behavior: >> >> sage: maple("1/(1+I)") >> 1/2-1/2*I >> >> sage: mathematica("1/(1+I)") >> 1 I >> - - - >> 2 2 >> >> Doing this (in general), symbolically, would be difficult. Instead, >> the arithmetic operations will just keep "piling up." If one wants >> this behavior one could explicitly coerce into the symbolic field. >> Also, I think things should start out in as restricted a ring as >> possible, both to have coercion work and for specific functionality, >> e.g. one should be able to do >> >> sage: (1+I/3).charpoly('x') >> x^2 - 2*x + 10/9 >> >> I am assuming an enhanced coercion model and number fields with >> embeddings (hopefully in the near future). >> >> -Robert > > > --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---