Term traversal from LGprover to graph.py

Another small but crucial update