Hi. Ondrej will probably have better answers to your questions when he replies, but here is my take. On Jul 29, 2009, at 9:57 PM, Marco wrote:
> > I was very impressed by the description of SymPy here: > > http://www.euroscipy.org/presentations/slides/index.html > > and especially slide 14 "Internals: Object oriented model". > > I have a couple of general questions about how Object-oriented SymPy > is. I'm a mathematician and would like to use or extend SymPy to do > abstract differential geometry. > > 1. Where/how can I see a diagram of the structure of the classes in > SymPy? You could just download the source and look at the directory structure of sympy/. You could also do >>> import sympy >>> dir(sympy) in a Python shell. All of the classes will start with uppercase letters (except for some functions like sin and cos). > 2. Is SymPy at all modeled after category theory, which organizes > mathematics in an essentially object-oriented way? I am not familiar with category theory, so I cannot answer for sure, but Python is an object oriented language, so SymPy is object oriented. However, the core is not organized in a highly abstract object oriented way. You also might take a look at the SymPyCore project, which is based on SymPy, which I think is closer to what you are talking about here. You should look into the code yourself to see if it is. Also, for core objects, like Add, Mul, and Pow, the most important thing is speed, so if a more abstract model would be slower, we probably wouldn't use it. I personally think it could be improved some, so don't think that the way it is now is the way it has to stay. For example, we are hoping to get a Cython core at some point. > 3. Is there a SymPy approach to, for example, vector spaces? I do > *not* mean matrix algebra or computations in components. I mean an > actual abstract vector space, where objects would be vectors and one > could take linear combinations of vectors. I'm asking this question > as an example of a more general question - whether SymPy has been used > to do "abstract" computations on mathematical objects such as vector > spaces, manifolds, etc. (as mathematicians often do) rather than > explicit ones in numbers or polynomials. I do not know the answer for vector spaces. You might look at the Geometric Algebra module, which implements a separate algebra from the rest of SymPy. We also have support for things like non-commutative Symbols, though it isn't the greatest, but you could for example represent a matrix as a non-commutative Symbol, with scalars as commutative symbols. I think SymPyCore again might have more on that front, but you will have to check it out for yourself (or wait until someone more knowledgeable replies). We would love to have you help develop SymPy. Are you already familiar with Python/Git? The best way to get involved is to just start submitting patches and having your work reviewed. I do not think differential geometry is supported yet, though I am not positive as I am not familiar with differential geometry. Aaron Meurer > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---