The idea reminds me of FORM, popular in Particle physics community:
https://github.com/vermaseren/form
https://en.wikipedia.org/wiki/FORM_(symbolic_manipulation_sy...
https://github.com/vermaseren/form
https://en.wikipedia.org/wiki/FORM_(symbolic_manipulation_sy...
I even created a simple tool for squaring matrix elements based on FORM:
https://github.com/vindex10/form-square
Thank you for staying creative, for thinking big and expanding beyond HEP :)
Even by defining functions equally to 0.