TrainVerify: Equivalence-Based Verification for Distributed LLM Training