typing equivalence proof