Added proof for Prim's algorithm.