COP 5021 Lecture -*- Outline -*- * Galois Connections (4.3) ** motivation ------------------------------------------ GALOIS CONNECTIONS (4.3) Motivation: Collecting semantics: - obviously correct, - view as a lattice, L but it's - costly, and/or - nonterminating So do analysis in another lattice, M Relationship: abstraction function a: L -> M concretization function g: M -> L ------------------------------------------ *** definition ------------------------------------------ DEFINITION Def: Let L and M be complete lattices. Then (L, a, g, M) is a Galois connection iff a: L -> M and g: M -> L are monotone and g o a >= id_L (4.8) a o g <= id_M (4.9) ------------------------------------------ draw picture like Figure 4.6 4.8 says g(a(l)) >= l, for all l in L 4.9 says a(g(m)) <= m, for all m in M Example 4.19, (Powerset(Z), a, g, Interval) where g(int) = {z in Z | inf(int) <= z and z <= sup(int)} a(Z) = _|_, if Z is empty a(Z) = [inf'(Z),sup'(Z)], otherwise where inf' and sup' are from example 4.10 e.g., a({0,1,3}) = [0,3] Check this satisfies the definition. *** adjunctions ------------------------------------------ ADJUNCTIONS Def: Let L and M be complete lattices. Then (L, a, g, M) is an adjunction iff a: L -> M and g: M -> L are total and for all l in L and m in M: a(l) <= m iff l <= g(m). Prop 4.20. (L, a, g, M) is a Galois connection iff it is an adjunction. ------------------------------------------ *** galois connections defined by extraction functions ------------------------------------------ GALOIS CONNECTIONS DEFINED BY EXTRACTION FUNCTIONS Fact: Suppose b: V -> L is a representation function. Then (Powerset(V), a, g, L) is a Galois connection between Powerset(V) and L, where for all V' <= V and l \in L: a(V') = \join {b(v) | v \in V'} g(l) = {v \in V | b(v) <= l} def: Suppose L = (Powerset(D), <=) and eta: V -> D. We define b_{eta}: V -> Powerset(D) by b_{eta}(v) = {eta(v)} Fact: (Powerset(V),a_{eta},g_{eta},Powerset(D)) is a Galois connection, where a_{eta}(V') = {eta(v) | v \in V'} g_{eta}(D') = {v | eta(v) \in D'} ------------------------------------------ The last is illustrated by: a eta P(V) -----> P(D) ^ <---- ^^ | g / | | eta/ | | / | {.}| / | {.} | / b | | / eta| | / | V ------> D eta ** properties (4.3.1) ------------------------------------------ PROPERTIES Lemma 4.22: If (L, a, g, M) is a Galois connection, then: (i) a uniquely determines g by g(m) = |_| { l | a(l) <= m } and g uniquely determines a by _ a(l) = | | { m | l <= g(m) } (ii) a is completely additive and g is completely multiplicative Lemma 4.23: If a: L -> M is completely additive, then there exists g: M -> L such that (L, a, g, M) is a Galois connection Fact 4.24: If (L, a, g, M) is a Galois connection then a o g o a = a and g o a o g = g ------------------------------------------ def: a: L -> M is completely additive iff for all Y <= L: f(\join Y) = \join {ff(l') | l' \in Y}, whenever \join Y exists Q: Does a correctness relation from V to L extend to M? yes ** Galois Insertions (4.3.2) ------------------------------------------ GALOIS INSERTIONS (4.3.2) In a Galois connection (L, a, g, M) the set M may contain "junk" elements. def: Let L and M be complete lattices. Then (L, a, g, M) is a Galois insertion iff it is a Galois connection and a o g = id_M ------------------------------------------ Q: So what happens if we first concretize then abstract? nothing Q: In a Galois insertion (L, a, g, M), is a surjective? injective? surjective, not necessarily injective Q: In a Galois insertion (L, a, g, M), is g surjective? injective? injective, and also an order-similarity (lemma 4.27)