soundness proof for contract specialisation