Theorem Prover as a Judge for Synthetic Data Generation