Added structural term equality. Note that terms which are known to be proofs are not compared.