DP On Trees: Tree Matching (Gold)

What is the proof of correctness (formal) for the greedy solution of Tree Matching in the DP On Trees section?

Say there is a leaf u whose only adjacent vertex is v.

Suppose there is a maximum matching that does not contain (u,v). Then this matching must contain (v,w) for some w\neq u adjacent to v. But then we can just remove (v,w) from the matching and add (u,v) (and the matching remains maximum). It follows that there exists a maximum matching containing (u,v).

Now remove v (and all edges adjacent to it in the tree) and repeat with a different leaf.