Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rules