[sympy] Re: Shouldn't this be printed in a different way ?

2009-01-18 Thread Akshay Srinivasan
I've attached the patch to the issue's page - it's just a one-line change :) Akshay On Jan 18, 8:58 pm, "Ondrej Certik" wrote: > On Sun, Jan 18, 2009 at 3:04 AM, Akshay Srinivasan > > wrote: > > > Hi Ondrej, > > I think I've fixed it. As you said, it was something in the printing/ > > str.py.

[sympy] Re: set algebra using sympy ?

2009-01-18 Thread Reckoner
Thanks. I am computing something like Prob(A + B) = Prob(A) + Prob(B) - Prob(A*B) for a complicated discrete distribution where '+' means union and '*' means intersection. This is simple enough for a small number of sets, but there might be millions of sets and the above formula gets more compl

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hello Alan, Thanks for your answer. Apparently all I need from the exterior algebra can be done with '^'. If so, I can still use, as you suggest, a diferent metric in the setup. (I will probably use a euclidien metric) and then use the geometric product ('*') to compute the dual: "-I*a". I will

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hello Alan, Thanks for your answer. Apparently all I need from the exterior algebra can be done with '^'. If so, I can still use, as you suggest, a diferent metric in the setup. (I will probably use a euclidien metric) and then use the geometric product ('*') to compute the dual: "-I*a". I will

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hello Alan, Thanks for your answer. Apparently all I need from the exterior algebra can be done with '^'. If so, I can still use, as you suggest, a diferent metric in the setup. (I will probably use a euclidien metric) and then use the geometric product ('*') to compute the dual: "-I*a". I will

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hello Alan, Thanks for your answer. Apparently all I need from the exterior algebra can be done with '^'. If so, I can still use, as you suggest, a diferent metric in the setup. (I will probably use a euclidien metric) and then use the geometric product ('*') to compute the dual: "-I*a". I will

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hello Alan, Thanks for your answer. Apparently all I need from the exterior algebra can be done with '^'. If so, I can still use, as you suggest, a diferent metric in the setup. (I will probably use a euclidien metric) and then use the geometric product ('*') to compute the dual: "-I*a". I will

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread Alan Bromborsky
luis wrote: > Hi, > > Thanks, > > Non, I don't want a Minkowsky metric. I am simply doing exterior > algebra in R^4 (or R^n) and in such case I need a null metric > to have the wedge product in Lambda(R^n). > > As you can see in > http://en.wikipedia.org/wiki/Clifford_algebra#As_quantization_of_

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hi, Thanks, Non, I don't want a Minkowsky metric. I am simply doing exterior algebra in R^4 (or R^n) and in such case I need a null metric to have the wedge product in Lambda(R^n). As you can see in http://en.wikipedia.org/wiki/Clifford_algebra#As_quantization_of_exterior_algebra the exterio

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread Alan Bromborsky
luis wrote: > Hi, > > > Thanks. Since I want to do exterior algebra, I am using a null > metric. > Also, I am not in 3-dim and so I don't have a cross product. > > Let's suppose we have the following code: > > ### > #!/bin/env python > from sympy.galgebra.GAsympy import * > set

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread luis
Hi, Thanks. Since I want to do exterior algebra, I am using a null metric. Also, I am not in 3-dim and so I don't have a cross product. Let's suppose we have the following code: ### #!/bin/env python from sympy.galgebra.GAsympy import * set_main(sys.modules[__name__]) MV.s

[sympy] Re: Hodge-* in GAsympy

2009-01-18 Thread Alan Bromborsky
luis wrote: > Hi, > > Is there some way in 'galgebra.GAsympy' > to apply the Hodge-* operator? > > Thanks, > > Luis > > PS. I am using MV.setup(basis,metric) with a null metric. > > > > See http://en.wikipedia.org/wiki/Geometric_algebra. I think the Hodge dual of a vector, v, is just the geo

[sympy] Hodge-* in GAsympy

2009-01-18 Thread luis
Hi, Is there some way in 'galgebra.GAsympy' to apply the Hodge-* operator? Thanks, Luis PS. I am using MV.setup(basis,metric) with a null metric. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sympy" group. To

[sympy] Re: set algebra using sympy ?

2009-01-18 Thread Ondrej Certik
Hi Reckoner, On Sat, Jan 17, 2009 at 12:51 PM, Reckoner wrote: > > > I know python has a set() object, but I'm wondering if sympy has set > algebra built into it (e.g. union, intersection) for symbolic objects. > Note that I'm interested in manipulating the sets themselves and not > necessarily

[sympy] Re: Sending updates

2009-01-18 Thread Ondrej Certik
On Tue, Jan 13, 2009 at 12:41 PM, Ondrej Certik wrote: >>> If you did add everything, then you need to use "git rebase -i" and >>> rewrite the history to remove the unwanted things. I can do that for >>> you, if it's too dificult --- just push everything you have to github, >>> I'll have a look a

[sympy] Re: Shouldn't this be printed in a different way ?

2009-01-18 Thread Ondrej Certik
On Sun, Jan 18, 2009 at 3:04 AM, Akshay Srinivasan wrote: > > Hi Ondrej, > I think I've fixed it. As you said, it was something in the printing/ > str.py. Excellent, when you are ready, send us a patch please (either to sympy-patches, or attach it to the issues). > In doing that I came across t

[sympy] Re: Identifying additive terms in an expression

2009-01-18 Thread Ondrej Certik
On Sat, Jan 17, 2009 at 11:25 PM, Luke wrote: > > If I have a symbolic expression like: > expr = a*sin(x) + b*cos(y) - c*tan(z) > > I can get each individual additive term, sort of like: > In[1]: terms(expr) > Out[1]: [a*sin(x), b*cos(y), -c*tan(z)] In [2]: var("a b c") Out[2]: (a, b, c) In [3

[sympy] Re: Symbolic dot and cross products with implicit rotation matrices

2009-01-18 Thread Alan Bromborsky
Luke wrote: > I would like everything to be symbolic. If you have two reference > frames, say A and B, you can only take the dot product of a vector > expressed using the A coordinates with a vector expressed in the B > coordinates if you know the rotation matrix that relates the two > reference

[sympy] Re: Shouldn't this be printed in a different way ?

2009-01-18 Thread Akshay Srinivasan
Hi Ondrej, I think I've fixed it. As you said, it was something in the printing/ str.py. In doing that I came across this, >>(x/sin(x)).args() (x,sin(x)) >>(cos(x)/sin(x)).args() (1/sin(x),cos(x)) Shouldn't >>(cos(x)/sin(x)).args() give (cos(x),1/sin(x)) ?? Akshay (Neptune) On Jan 18, 12:06