I came to the conclusion that the best solution to implement Quantum Field Theory in SymPy is to use the *unify* module combined with the new *tensor*module.
Unfortunately the new *tensor* module has a complicated arg-tree structure. The main problems concerning the implementation of QFT (let's ignore General Relativity for now, which would make everything even more complicated) are: - Operators on tensors - Unification/rewrite rules on tensors Operators are the most urgent issue. The current arg-tree and internal structure of *TensMul* and *TensAdd* do not make it easy to add new objects containing tensor expressions. My current idea is to refactor both *TensMul*and *TensAdd*, and relocate all index and symmetry manipulation logic to either a *TIDS* object or to a new object (let's say *TensorContainer*). The *TensorContainer* option would be the best one, so that *TensMul* and possible future operators would all inherit that object. All index symmetry operations and indices contractions would be handled by *TensorContainer*, so that TensMul is no longer be the only such container. TensAdd is then a collection of TensorContainer. A derivative operator would then contain the derivative variable and a TensMul object, but I still have to make up my mind on how to exactly represent operators. What about not storing index symmetry information inside the arg-tree? I mean, it could work in a way similar to the new assumptions, with a global dictionary storing such info. I am currently proposing such an approach for components data in a PR. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/2d2aeb46-2305-492c-8f98-a7792cadfc91%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
