Prove correctness of graph compiler