CS 641 Lecture -*- Outline -*- * Partial homomorphisms want something like category of type frames. What would a homomorphism look like? (first ignore partiality) Def: Let A, B be frames, A = ({D^s}, {A^(s,t)}, A[[.]]) A = ({E^s}, {B^(s,t)}, B[[.]]) a types-indexed family of relations {Phi^s} is a *partial homomorphism* from A to B iff Phi^s: D^s -> E^s is a surjective partial function Phi^(s->t)(f) is the unique element of E^(s->t), if it exists, such that for all x in domain of definition of Phi^s(x) Phi^t(A^(s,t)(f,x)) = B^(s,t)(Phi^(s->t)(f), Phi^s(x)) lemma if {Phi^s} is a partial homomorphism from A to B and r is an H-environment for A, r' is an H-environment for B such that Phi^s(r(x)) = r'(x) for x:s in H, then Phi^s(A[[ H |> e:s]]r) = B[[ H |> e:s]]r' whenever H |- e:s. Pf: induction on structure of e. ** Partial homs preserve validity of equations Lemma: i.e., if {Phi^s}:A -> B and A,H |= e=e':s, then B,H|= e=e':s. Pf: let r' be an H-env for B. Choose r s.t. r' = Phi^s o r. possible because Phi^s is a surjection. ** The full type frame over an infinite set is a sound and complete model Lemma: If A = ({D^s}, {A^(s,t)}, A[[.]]) is a type frame and there is a surjection from a set X onto D^o, then there is a partial hom from the full type frame over X to A. Note: Phi^o: X -> D^o is total surjection. Pf: Define Phi^(s->t)(f) to be the unique element of D^{s->t}, if it exists, such that A^(s,t)(Phi^(s->t)(f), Phi^s(y)) = Phi^t(f(y)) for all y in domain of def of Phi^s. show this is a surjection. Lemma If X is infinite, then the full type frame over X is sound and complete Pf: sound since it's a type frame. completeness because the previous lemma gives a partial hom from the full type frame to the term model. ** Generalization: logical relations Def: Let A, B be frames, A = ({D^s}, {A^(s,t)}, A[[.]]) A = ({E^s}, {B^(s,t)}, B[[.]]) a types-indexed family of relations {R^s} is a *logical relation* between A and B if -R^s subset-of D^s x E^s f R^(s->t) g iff (x R^s y implies A^(s,t)(f,x) R^t B^(s,t)(g,y)) Why is this a generalization? What properties are preserved by logical relations?