Graph Representations for Higher-Order Logic and Theorem Proving