On Sat, 28 Oct 2006 19:36:13 -0700, David Harvey <[EMAIL PROTECTED]> wrote: > On Oct 28, 2006, at 11:09 PM, David Joyner wrote: > >> I have questions about coercion rules for finite fields. >> >> 1. Let F1 and F2 be two finite fields of order q, >> x1 in F1, x2 in F2. Do the planned on coercion >> rules imply that x1+x2 is defined? > > It depends on the implementation of F1 and F2. If they were both > defined as part of some consistent system of finite fields, then > presumably yes. For example one might hope that if F1 = GF(8) and F2 > = GF(8) then there is a canonical map between them. > > But they might be defined in other ways, e.g. one might be a quotient > of a ring of integers in a number field by an ideal, in which case > there is no sensible way to add them. > >> I assume so, since there >> probably is a coercion map F1 -> F2 (and F2->F1). >> The problem is that x1+x2 != x2+x1 > > Wait a sec. That's not necessarily true. Even though x1+x2 is in F1 > and x2+x1 is in F2, it is still possible for x1+x2 == x2+x1. The > equality test will perform a coercion (probably into the parent of > the guy on the left) and then test for equality there.
With the coercion rules we've layed out you will *definitely* always have x1+x2 == x2 + x1. However, the x1+x2 has parent x1.parent() and x2+x1 has parent x2.parent(). However, the two parents are canonically isomorphic. >> 2. Let F1 subset F2 be two finite fields of order q, >> x1 in F1, x2 in F2. Consider the sum x2+x1+x2. The sum >> x2+(x1+x2) makes sense but the sum (x2+x1)+x2 >> does not (assuming that there is no coercion F2->F1). > > I'm not sure what you mean by "F1 subset F2 be two finite fields of > order q". He probably just meant F1, F2. Given that, both sums will make sense (with the proposed model), and both will have parent x2.parent() and be equal to each other. >> 3. Does 0 coerce into any other finite field? In other words, does >> F2(0)+F1(0) make sense? > > Good question. I guess it wouldn't make any more or less sense than > any other elements of those fields. Yes, F2(0) + F1(0) would make sense and would be the 0 element of F2. William --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---