Hi Nathann, On 2015-09-18, Nathann Cohen <nathann.co...@gmail.com> wrote: >>> sage: K1 = GF(8,'x') >>> sage: K2 = GF(8,'y') >>> sage: K1(1) == K2(1) >>> False >> >> Not a bug, because cross-parent comparison would only make sense if >> there is some kind of a canonical map of one parent (and not just of a >> single element!) into the other or of both parents into a third one. > > What I think is unreliable is that "deep down" you decide that two finite > fields are equal (or not) based on a string comparison. > > If two functions create independently two GF(8,'x') then you decide that > they mean the same, and if two functions create a GF(8,'y') and GF(8,'x') > then you decide that they mean something different.
What do you mean by "mean"? Certainly the two fields are isomorphic. But that's not the point here. So, let me explain what I mean by "mean". The question is how we can find a system C ("canonical" resp. "coercion") of homomorphisms between parents in Sage that contains identity morphisms and is closed under composition and such that for each pair of parents there is at most one homomorphism in C having the given pair of parents as domain and codomain. If there is an isomorphism in C between parents P1 and P2 then there is a canonical way to identify elements of P1 with elements of P2. But if there is not, then Sage developers found it difficult to admit that elements of P1 have *anything* to do with elements of P2. Thus, if there is no canonical morphism between the parents P1, P2, then their elements should always evaluate unequal --- because they live in separate worlds. The automorphism group of GF(p^n) for n>1 is non-trivial. Thus, it is not straight forward to single out a "canonical" isomorphism between two non-identic copies of GF(p^n). In that sense, they do not mean the same. So, that's what *I* mean by "mean". If we build a system C of canonical morphisms (aka "coercions") and there is no isomorphism in C with domain GF(8,'y') and codomain GF(8,'x') then GF(8,'y') and GF(8,'x') mean something different. Otherwise, they do *not* mean "the same", but at least one can make them "the same" in a canonical way. > If would feel better if two GF(8,'x') were always different, or if all > GF(8,<whatever>) were equal. There are good reasons to say that if you construct GF(8,'x') twice then the results are not only the same but *identical*. Even better reasons are imply that GF(8,'x') and GF(8,'y') can not be identical. One can of course try the following rule for constructing C: If the minimal polynomial used in the construction of GF(8,'x') is obtained from the minimal polynomial used in the construction of GF(8,'y') by substitution y->x, then the map extends to an isomorphism that shall belong to C. If the minimal polynomials are not mapped in that way, then *no* isomorphism between the two fields should belong to C. I simply don't know if such a rule gives rise to an inconsistency in the "global picture" (i.e., in the system of *all* coercions in Sage). But the rule does seem reasonable to me. Best regards, Simon -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.