CS 641 Lecture -*- Outline -*- * inference rules for complete lattices (7.3) Now that we have sets, we can talk about meeting joins over arbitrary sets of elements. That is, we can talk about complete lattices. Q: are the Booleans a complete lattice? The predicates? Yes, and yes ** general meet and join ------------------------------------------ ASCII NOTATION ``<='' means the partial order (latex's \sqsubseteq) ``>='' means the reverse partial order (latex's \sqsupseteq) ``\bot'' means the least element ``\bot'' means greatest element ``==>'' means logical implication ``(\glb i \in I :: t.i)'' means meet (greatest lower bound) over the set { t.i | i \in I } ``(\lub i \in I :: t.i)'' means join (least upper bound) over the set { t.i | i \in I } ^ (\glb i \in I : b.i : t.i) = (\glb i \in { i \in I | b.i} :: t.i) ^ (\lub i \in I : b.i : t.i) = (\lub i \in { i \in I | b.i} :: t.i) ------------------------------------------ Can think of (\glb i \in I :: t.i) as (\glb i : i \in I : t.i) and (\glb i \in I : b.i : t.i) as (\glb i : i \in I /\ b.i : t.i) But the chosen notation is closer to the book... Q: What do these mean for the booleans? \glb is \forall, and \lub is \exists *** inference rules ------------------------------------------ INFERENCE RULES general \meet introduction: Phi, i \in I |- s <= t _________________________________ Phi |- s <= (\glb i \in I :: t) * i not free in s, Phi, or I general \meet elimination: _____________________________________ t' \in I |- (\glb i \in I :: t) <= t[i:= t'] * t' is free for i in t general \join introduction: _______________________________________ t' \in I |- t[i:= t'] <= (\lub i \in I :: t) * t' is free for i in t general \join elimination: Phi, i \in I |- t <= s _________________________________ Phi |- (\lub i \in I :: t) <= s * i not free in s, Phi, or I ------------------------------------------ Q: What do these mean? Q: Why the side conditions? Q: How can you get rid of the assumptions that t' \in I in the middle two rules? use the discharge rule Q: Is alpha conversion valid for these? Q: Can you formulate introduction and elimination rules for the bounded forms of the index meet and join? I think... general bounded \meet introduction: Phi, i \in I, b |- s <= t __________________________________ Phi |- s <= (\glb i \in I : b : t) * i not free in s, Phi, or I general \meet elimination: __________________________________________ t' \in I, b[i := t'] |- (\glb i \in I : b : t) <= t[i:= t'] * t' is free for i in t general \join introduction: __________________________________________ t' \in I, b[i := t'] |- t[i:= t'] <= (\lub i \in I : b : t) * t' is free for i in t general \join elimination: Phi, i \in I, b |- t <= s _________________________________ Phi |- (\lub i \in I : b: t) <= s * i not free in s, Phi, or I *** index range homomorphisms ------------------------------------------ INDEX RANGE HOMOMORPHISMS Motivation: (\glb i \in I :: a.i) == { notation } \glb { a.i | i \in I } == { definition of image } \glb (im.a.I) == { beta conversion } (\ I . \glb (im.a.I)).I So as for fixed a: S -> G, where and G is a complete lattice (\glb i \in I :: a.i) is the following function (of I): (\ I . \glb (im.a.I)) ------------------------------------------ ------------------------------------------ HOMOMORPHISM PROPERTIES Range monotonicity: I \subseteq J ==> (\glb i \in I :: a.i) >= (\glb i \in J :: a.i) I \subseteq J ==> (\lub i \in I :: a.i) <= (\lub i \in J :: a.i) Empty range: (\glb i \in {} :: a.i) == \top (\lub i \in {} :: a.i) == \bot Range split rules: (\glb i \in (I \union J) :: a.i) == (\glb i \in I :: a.i) \meet (\glb i \in J :: a.i) (\lub i \in (I \union J) :: a.i) == (\lub i \in I :: a.i) \join (\lub i \in J :: a.i) ------------------------------------------ Q: What do these mean for the booleans? interpret see the file ../truth-values/cohen-predicates.txt *** index function homomorphisms ------------------------------------------ INDEX FUNCTION HOMOMORPHISMS Suppose we fix the index set I. If a: S -> G, then (\ I . \glb (im.a.I)) : (S -> G) -> G Image monotonicity: a \sqsubseteq b ==> (\glb i \in I :: a.i) <= (\glb i \in I :: b.i) a \sqsubseteq b ==> (\lub i \in I :: a.i) <= (\lub i \in I :: b.i) Bottom and top homomorphic: i != {} ==> (\glb i \in I :: \bot.i) == \bot (\lub i \in I :: \bot.i) == \bot (\glb i \in I :: \top.i) == \top i != {} ==> (\lub i \in I :: \top.i) == \top Meet and join homomorphic: (\glb i \in I :: (a \meet b).i) == (\glb i \in I :: a.i) \meet (\glb i \in I :: b.i) (\lub i \in I :: (a \join b).i) == (\lub i \in I :: a.i) \join (\lub i \in I :: b.i) ------------------------------------------ Q: What is \bot in S -> G? What is \top in S -> G? Q: is indexed meet universally meet homomorphic? yes, because it's meet homomorphic on a complete lattice ** bounded quantification (7.4) ------------------------------------------ BOUNDED QUANTIFICATION NOTATION ^ (\forall i \in I :: t) = (\forall i : i \in I : t) ^ (\exists i \in I :: t) = (\exists i : i \in I : t) Thus, (\forall i \in I : b : t) == (\forall i :: i \in I /\ b ==> t) ------------------------------------------ ------------------------------------------ BOUNDED QUANTIFICATION AS INDEXED MEET AND JOIN (\forall i \in I :: t) == (/\ i \in I :: t) (\exists i \in I :: t) == (\/ i \in I :: t) So what are the rules for... Range monotonicity: I \subseteq J ==> ((\forall i \in I :: a.i) (\forall i \in J :: a.i)) I \subseteq J ==> ((\exists i \in I :: a.i) (\exists i \in J :: a.i)) Empty range: (\forall i \in {} :: a.i) == (\exists i \in {} :: a.i) == Range split rules: (\forall i \in (I \union J) :: a.i) == (\forall i \in I :: a.i) (\forall i \in J :: a.i) (\exists i \in (I \union J) :: a.i) == (\exists i \in I :: a.i) (\exists i \in J :: a.i) ------------------------------------------ ... fill these in, remembering that \top == T, \bot == F, <= == ==>, \meet == /\, \join == \/ The index function rules are exercise 7.4 *** general conjunction and disjunction for predicates ------------------------------------------ GENERAL CONJUNCTION AND DISJUNCTION FOR PREDICATES General conjunction: (\intersect i \in I :: p.i).s <==> (\forall i \in I :: p.i.s) General disjunction: (\union i \in I :: p.i).s <==> (\exists i \in I :: p.i.s) ------------------------------------------ Q: What inference rules would we have for these? the ones for general meets and joins, specialized to predicates