Started sketching out the correctness proof for type inference.