Added substitutability lemma.