added proof for context invariance