On Wed, Jan 20, 2016 at 6:20 PM, William Stein <[email protected]> wrote: > Nils -- many thanks for your post explaining the longterm perspective > and underlying reasons why things are the way they are. > > I mentioned this thread in my class today, which happened to be on > constructing finite fields in Sage: > > > https://cloud.sagemath.com/projects/b85dd1b3-3f5f-4c2d-b503-242612561b9e/files/lectures/2016-01-20/2016-01-20-part2-finite-fields.sagews > > Also -- pdf attached to this email.... > > The immediate surprises I hit when looking again at finite fields from > a high level after all this time (and we did a *lot* with finite > fields before there was a coercion model -- e.g., crazy Givaro > wrapping in Cython before there was Cython C++ support) is that the > following things don't exist: > > (1) GF(3^2,'a').embeddings(GF(3^6,'b')) # like we do have for number fields > > (2) GF(3^2,'a').gen() + GF(3^3,'b').gen()
The surrounding discussion about variables names provide a good reason why (2) shouldn't work. However (1) should exist (and would be about 3 lines of code to add). > > However, the new Fpbar stuff by Vincent looks awesome (especially if > we had embeddings)... > > (3) GF(f(x), names='a') # this doesn't work, but it should like for > number fields > > William > > On Wed, Jan 20, 2016 at 4:47 PM, Nils Bruin <[email protected]> wrote: >> On Wednesday, January 20, 2016 at 3:22:54 PM UTC-8, Dima Pasechnik wrote: >>> >>> >>> to me, two fields that are specified by the same irreducible polynomial >>> over the same prime subfield ought to be identical. >>> it'd be much better design, not wedding them to named generators at all. >>> >> That's not compatible with the coercion model in sage where >> >> Z['x'] coerces into QQ['x'] and QQ['u','x','v'], but not into QQ['y'] >> >> Names of generators are part of the identity of a structure in sage. With >> respect to polynomial rings this allows for various automatic behaviours >> that are out of reach for other computer algebra systems, so we are getting >> a benefit from it. It also has unfortunate and/or counterintuitive >> consequences in other cases; for you this may be one of them. It'll be way >> too invasive to change sage's concepts at this stage, so I think we'll have >> to live with it. Currently the generator name is important for finite >> fields: >> >> sage: GF(64,'x').0+GF(64,'y').0 >> TypeError: unsupported operand parent(s) for '+' >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/sage-devel. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > William (http://wstein.org) -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
