Lemma: Let $M$ be a matching and $P$ an $M$-augmenting path. Then, $M'= M \Delta P$ is a matching (with cardinality +1).
I have a proof in my notes but I thought to try proving it myself. My attempt is below, please let me know if it is correct.
Observe that if $e \in M$ then $e \in P$ hence $M \subset P$ ; Then $M\cap P=M$. Hence, $M'= M \Delta P = (M \cup P)- (M\cap P)= (M \cup P)-M= P-M$.
Now it suffices to show that $P-M$ is a matching.
We know that edges of $P$ alternate in and out of M hence, considering only edges in $P$ they cannot share any end vertex and thus $P-M$ is a matching.
Notes:
- I don't care about the cardinality part, the proof was easy enough.
- I am working with the following definitions from my notes:
A matching in a graph G is a subset of its edges so that no two edges are incident with the same vertex.
A path in G is M-alternating if its edges are alternately in and out of M. A path is M-augmenting if is M-alternating and both the first and last vertex are exposed - Right distributivity of set difference used above, in here: https://proofwiki.org/wiki/Set_Difference_is_Right_Distributive_over_Union
If I understand your proof correctly, then it is wrong. And I think it has to do with your understanding of augmenting paths.
In general, an $M$-augmenting path does not contain all edges in $M$. It's simply not given by the definition. Just because $P$ contains some edges from $M$, that doesn't mean it contains all edges from $M$. So the first line in your proof is wrong. (Either that, or you only addressed a special case.)
Also, the cardinality-part of the lemma is really essential. People care about augmenting paths as they let us find a larger matching from the given one.