On Apr 19, 2010, at 4:36 PM, Ronan Lamy wrote:
> Some comments:
>
> * Why did you make PrimeField an old-style class? Unless you have a very
> good reason, it should be new-style (i.e. declare it with "class
> PrimeField(object):...")
> * I don't like that str(PrimeField(5)) is {0, 1, 2, 3, 4}. For me, this
> is the set of the 5 smallest natural integers, which is not at all the
> same thing as F_5.
What would you have it print? Note that it uses integers as arguments to the
methods. My main worry here is that this can be large when p is large.
> * I don't see what's abstract about prime fields: they're concrete
> objects and easily constructed. So, I think the module should be not be
> named "abstractalgebra" but "algebra" (or something else that doesn't
> contain "abstract").
I think this is fine. See http://en.wikipedia.org/wiki/Abstract_algebra.
Abstract algebra is abstract because they represent abstract objects defined
algebraically, instead of in terms of some concrete thing. A prime field is
defined simply as the field with p elements (you can show that this is unique
up to isomorphism). This can represent the first p - 1 natural numbers modulo
p, but it could also represent any set of p elements with operations * and +
that form a field. For example, {True, False} with the operations and for *
and xor for + form a field, which is nothing but the prime field with 2
elements (remember that there can be only 1 of them, algebraically speaking).
Anyway, Abstract Algebra is the name mathematicians give to the subject area
that studies these things, mainly groups, rings, and fields, so if anything,
it's a convention.
Aaron Meurer
>
> Cheers,
> Ronan
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.