* Institutions formalization of spec. languages Reference Goguen-Burstall84 (LNCS 164) ** vocabulary: category (Sign) of signatures and signature morphisms e.g., category of equational signatures objects: pairs (S,OPS) where S is set of sort names OPS is a family f operator names (indexed by signatures in S* x S) e.g., \Sigma=(S,OPS), where S = {Bool, Int} OPS_{(Bool,Bool),Bool} = {and, or, implies} morphisms: Phi: (S,OPS) -> (S',OPS') is a map f: S -> S' and g_{u,s}: OPS_{u,s} -> OPS_{f*(u),f(s)} a S* x S indexed family of maps i.e., preserves sorts of operations e.g., f(Bool) = Boolean g_{(Bool,Bool),Bool}(and) = "&" ** set of sentences over a signatures (functor Sen: Sign -> Set) a \Sigma-equation is a triple (X, t1, t2), where X is a S-indexed set (of variables) t1 and t2 are terms over X with the same sort e.g., Eqn: \Sigma -> set of $\Sigma-equations Eqn: signature morphisms -> maps on equations ** category of models of a signature (functor Mod: Sign -> Cat^{op}) a variety, set of models with same signature Alg(\Sigma) = category of \Sigma-algebras A = (|A|,OPS^A) where (\Sigma=(S,OPS)) |A| is carrier set = S-indexed family of sets (A_s) OPS^A is a S* x S indexed family of maps alpha: OPS_{u,s} -> A_u -> A_s if g in OPS_{u,s}, write g^A for alpha(g) homomorphisms (in the category Mod(\Sigma)): f: A->B, where both are \Sigma-algebras is S-indexed family of maps f_s:A_s -> B_s such that for all g: u -> s (g in OPS_{u,s}) where u = s1,s2,...,sn f_s(g^A(a1,...an)) = g^B(f_s1(a1),...,f_sn(an)) i.e., homomorphisms have a substitution property e.g., A_Bool = {true, false} and^A(b1,b2) = b1 & b2 functor Mod: object map: Mod(\Sigma) = Alg(\Sigma) arrow map: maps signature morphism Phi = (f,g): \Sigma -> \Sigma' to functor: Alg(Phi): Alg(\Sigma') -> Alg(\Sigma) objects: Alg(Phi)(A') = A where A = (|A|,OPS^A) A_s = A'_{Phi(s)} OPS^A = Phi;OPS^A' arrows: Alg(Phi)(h': A' -> B') = h where h_s = h'_{Phi(s)} e.g., Alg(Phi)(Boolean) = Bool Alg(Phi)(&^B) = and^A *** satisfaction relation |= between Mod(\Sigma) and Sen(\Sigma) for each \Sigma in Sign such that for each Phi: \Sigma -> \Sigma' in Sign for each m' in Mod(\Sigma'), for each e in Sen(\Sigma) m' |= Sen(Phi)(e) iff Alg(Phi)(m') |= e. e.g., suppose e' is obtained by translating e, by Phi e.g., e is true and true = true e' is true & true = true suppose Alg(Phi)(m) = m', so that m has sorts Bool, Int, ... m' |= e' iff m |= e ** theory = set of sentences closed under implication *** presentation = pair of signature and set of sentences *** satisfaction a model satisfies presentation if satisfies each sentence A models (\Sigma,E) iff for each e in E, A |= e, write A |= E *** closure notions E* is set of all A such that A |= E if M is a set of models, M* is set of all sentences satisfied by each m in M M* is the theory of M closure of set of sentences is E** E is closed iff E = E** *** a theory is a theory presentation that is closed (\Sigma,E) such that E is closed *** the theory presented by (\Sigma,E) is the closure of E