Proof of merge for weighted heaps