@yanghezhonghao I think this is because we maintain the variant that lo<=solution<=hi. Lo and hi always moves closer to the solution. Since we know our solution must be in the matrix, lo and hi must be in the matrix in the end. We want to prove lo is in the matrix in the end, but since in the end lo==solution, we can convert this problem to prove that solution is in the matrix. And it is indeed.
Kth Smallest Element in a Sorted Matrix