Soundness of commutative diagram proofs