pygae / galgebra

Symbolic Geometric Algebra/Calculus package for SymPy :crystal_ball:
https://galgebra.rtfd.io/
BSD 3-Clause "New" or "Revised" License
233 stars 62 forks source link

Question: How can one extract the signature of a geometric algebra? #471

Closed Greg1950 closed 3 years ago

Greg1950 commented 3 years ago

I'm trying to write a function on galg, a GAlgebra model of $\mathbb{G}^{p,q}$, the computational details of which function will depend on the signature $(p,q)$ of galg.

Given galg, is there a simple way to extract its signature $(p,q)$ ?

Maybe something like galg.sig ? If so, I haven't been able to find it in the documentation.

If this is the wrong forum in which to pose questions about GAlgebra, can someone point me to an appropriate one?

eric-wieser commented 3 years ago

@abrombo says:

You need to calculate the eigenvalues of the metric tensor. If you can you count the signs of the value to get the signature. I don't know any other way of doing it but googling metric tensor signature might give you some suggestions. For simple special cases one of the members of the metric class is the function signature. Look in metric.py to see what it does.