Theory DenotCongruenceFSet
section "Soundness wrt. contextual equivalence"
subsection "Denotational semantics is a congruence"
theory DenotCongruenceFSet
imports ChangeEnv DenotSoundFSet DenotCompleteFSet
begin
lemma e_lam_cong[cong]: "E e = E e' ⟹ E (ELam x e) = E (ELam x e')"
by (rule ext) simp
lemma e_app_cong[cong]: "⟦ E e1 = E e1'; E e2 = E e2' ⟧ ⟹ E (EApp e1 e2) = E (EApp e1' e2')"
by (rule ext) simp
lemma e_prim_cong[cong]: "⟦ E e1 = E e1'; E e2 = E e2' ⟧ ⟹ E(EPrim f e1 e2) = E(EPrim f e1' e2')"
by (rule ext) simp
lemma e_if_cong[cong]: "⟦ E e1 = E e1'; E e2 = E e2'; E e3 = E e3' ⟧
⟹ E (EIf e1 e2 e3) = E (EIf e1' e2' e3')"
by (rule ext) simp