Here is the formal structure of a stays ahead argument:
Claim: The greedy solution G is optimal. Proof by induction: Let OPT be any optimal solution. I will show that after step , G is at least as good as OPT.
Base case: After step (or ), G is at least as good as OPT. Inductive step: Assume after step , G is at least as good as OPT. Show after step , G is still at least as good. Conclusion: At the final step, G is at least as good as OPT. Since OPT is optimal, G is too.