

















Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Encuentra los documentos específicos para los exámenes de tu universidad
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
Asignatura: Lògica Matemàtica, Profesor: juan climent, Carrera: Matemàtiques, Universidad: UV
Tipo: Apuntes
1 / 25
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


















J. CLIMENT VIDAL AND J. SOLIVERES TUR
Abstract. The completeness theorem of equational logic of Birkhoff asserts the coincidence of the model-theoretic and proof-theoretic consequence rela- tions. Goguen and Meseguer, giving a sound and adequate system of infer- ence rules for many-sorted deduction, generalized the completeness theorem of Birkhoff to the completeness of many-sorted equational logic and provided simultaneously a full algebraization of many-sorted equational deduction. In this paper, after simplifying the presentation of Hall algebras and the inference rules given by Goguen-Meseguer, we give another proof of the completeness theorem by using the B´enabou algebras and, once defined the concepts of equational class and equational theory for a monad in a category and the con- cept of lim ←−-compatible congruence on a category, we prove that the lattice of Π-compatible congruences on the category of polynomials for a monad in a category of sorted sets is identical to the lattice of equational theories for the same monad. In this way we obtain a completeness theorem for mon- ads in categories of sorted sets, hence independent of any explicit syntactical representation of the relevant concepts, that generalizes the completeness the- orem of Goguen-Meseguer and provides a full categorization of many-sorted equational deduction.
Date: May 26, 2005. 1991 Mathematics Subject Classification. Primary: 03C05, 08A68, 08B05, 18A32, 18C15, 18C20; Secondary: 06B23. Key words and phrases. Hall algebra, B´enabou algebras, many-sorted algebra, polynomial for a monad, equation for a monad, lim ←−-compatible congruence, Π-compatible congruence, completeness for monads. 1
2 JUAN CLIMENT AND JUAN SOLIVERES
point of view it is essential to conceive of the sets of finitary Σ-equations as subsets of the square of the Hall algebra PolH(Σ), i.e., to think of such sets as parts of the square of an algebraic construct and not of an unstructured object as in the first al- ternative. This point of view allows a full algebraization of many-sorted equational deduction. In the second section, after simplifying the presentation of Hall algebras and the inference rules given by Goguen-Meseguer, we define the concept of B´enabou algebra, in order to give another proof of the completeness theorem, and prove that the category of B´enabou theories, defined in [1], is isomorphic to the category of B´enabou algebras and also that the category of Hall algebras, used by Goguen- Meseguer in their proof, is equivalent to that of B´enabou algebras. We point out that in [3] the B´enabou algebras have also been used to define what we have called morphisms of Fujiwara from a many-sorted signature into another (such morphisms consists of two suitably related mappings: On the one hand, a mapping that relates the sets of sorts of the many-sorted signatures and assigns to each sort in the first, a derived sort in the second, i.e., a word on the set of sorts of the second, and, on the other hand, a mapping that assigns to each operation in the first, a family of many-sorted polynomials in the second, all in such a way that both transformations are compatible), as well as morphisms from a many- sorted specification into another, and we remark that the hypersubstitutions are a particular case of the above morphisms between many-sorted signatures. Now, if we consider that a monad (exactly, those that arise from an algebraic adjunction) is what remains invariant under change of algebraic presentation or, in other words, if we take into account the equivalence between monads and theo- ries, then it seems natural to intend to prove directly a completeness theorem for monads, hence independent of any explicit syntactical representation of the rele- vant concepts. But, as we will see, it happens that such a direct proof is not an automatic translation of the above mentioned proofs. In the third section, in order to obtain a direct completeness theorem for monads, not necessarily finitary, we define polynomials, equations and validity for monads. Once this is done we also obtain a contravariant Galois connection between the ordered class Sub(EM(T)), of subclasses of EM(T), the Eilenberg-Moore category for the monad T, and the ordered class Sub(Eq(T)), of subclasses of Eq(T), the equations for the monad T, from such a connection we obtain the semantical conse- quence operator, CnT, on Eq(T) composing ModT : Sub(Eq(T)) //Sub(EM(T)) and ThT : Sub(EM(T)) //Sub(Eq(T)). In the last section, in order to obtain the missing formal consequence operator on Eq(T) we define the concept of Π-compatible congruence on a category and take into account that Eq(T) is a subfamily of the square of the family of the hom-sets of the category Pol(T) of polynomials for T, the dual of the Kleisli category Kl(T) of the monad T, and from this the formal consequence operator arises as the operator CgΠ Pol(T), generated Π-compatible congruence, on Pol(T). Finally, the completeness theorem for monads in categories of sorted sets asserts the coincidence between both operators or, what amounts to the same, that the lattice of Π-compatible congruences on the category of polynomials for a monad in a category of sorted sets is identical to the lattice of equational theories for the monad. In this way the completeness theorem of many-sorted equational logic of Goguen- Meseguer and the classical completeness theorem of equational logic of Birkhoff, are instances of this completeness theorem and this last is, in addition, invariant under presentations. We believe that from the above we obtain a full categorization of many-sorted equational deduction.
4 JUAN CLIMENT AND JUAN SOLIVERES
We remark that the underlying reason for the definition we have made of the finitary Σ-polynomials, the realization of finitary Σ-polynomials and the validation relation, will become clear when these concepts be compared with the corresponding ones, in a later section, for a monad T in a category. From the concept of validation we obtain the following contravariant Galois connection.
Definition 4. Let Σ be an S-sorted signature.
(1) If K ⊆ Alg(Σ), then ThΣ(K), the finitary Σ-equational theory determined by K, has as elements the finitary Σ-equations (P, Q) : δs^ //FrΣ(↓w) such that K |=Σ w,s (P, Q), i.e., ThΣ(K) =
(P, Q) ∈ EqH(Σ)w,s | ∀ A ∈ K (A |=Σ w,s (P, Q))
(w,s)∈S?×S (2) If E ⊆ EqH(Σ), then ModΣ(E), the finitary Σ-equational class determined by E, has as elements the Σ-algebras A that validate each equation of E, i.e.,
ModΣ(E) =
A ∈ Alg(Σ)
∀(w, s) ∈ S?^ × S, ∀(P, Q) ∈ Ew,s, A |=Σ w,s (P, Q)
Proposition 1. Let Σ be an S-sorted signature, E, E′^ two families of finitary Σ-equations and K, K′^ two classes of Σ-algebras. Then the following holds:
(1) If E ⊆ E′, then ModΣ(E′) ⊆ ModΣ(E). (2) If K ⊆ K′, then ThΣ(K′) ⊆ ThΣ(K). (3) E ⊆ ThΣ(ModΣ(E)) and K ⊆ ModΣ(ThΣ(K)).
Therefore the pair of mappings ThΣ and ModΣ is a contravariant Galois connection.
The categories associated to the lattices of classes of Σ-algebras and families of finitary Σ-equations are related by the adjunction ModΣ a ThΣ, i.e., for every class K of Σ-algebras and every family E of finitary Σ-equations, we have that K ⊆ ModΣ(E) iff E ⊆ ThΣ(K), because of the contravariance.
Definition 5. We denote by CnΣ the closure operator ThΣ ◦ ModΣ on EqH(Σ) and we call the CnΣ-closed sets Σ-equational theories. If E is a family of fini- tary Σ-equations and (P, Q) a finitary Σ-equation of type (w, s), then we say that (P, Q) is a semantical consequence of E if ModΣ(E) ⊆ ModΣ(P, Q), i.e., if (P, Q) ∈ ThΣ(ModΣ(E))w,s.
Now we define the Hall algebras through a many-sorted equational presentation that differs from that in [5].
Definition 6. Let S be a set of sorts and V H^ the S?^ × S-sorted set of variables (V(w,s))(w,s)∈S?×S where, for every (w, s) ∈ S?^ × S, V(w,s) = { vw,sn | n ∈ N }. A
Hall algebra for S is a many-sorted (ΣH, EH)-algebra, where ΣH^ is (S?^ × S, ΣH) and ΣH^ is the S?^ × S-sorted signature, i.e., the (S?^ × S)?^ × (S?^ × S)-sorted set, defined as follows:
(1) For every w ∈ S?^ and i ∈ |w|, πwi : λ //(w, wi), where |w| is the length of the word w and λ the empty word in (S?^ × S)?. (2) For every u, w ∈ S?^ and s ∈ S, ξu,w,s : ((w, s), (u, w 0 ),... , (u, w|w|− 1 )) //(u, s).
while EH^ is the part of Eq(ΣH) = (FrΣH (↓w)^2 (u,s))(w,(u,s))∈(S?×S)?×(S?×S) defined as follows:
COMPLETENESS FOR MONADS 5
H1. Projection. For every u, w ∈ S?^ and i ∈ |w|, the equation
ξu,w,wi (πwi , vu,w 0 0 ,... , v u,w|w|− 1 |w|− 1 ) =^ v
u,wi i of type (((u, w 0 ),... , (u, w|w|− 1 )), (u, wi)). H2. Identity. For every u ∈ S?^ and j ∈ |u|, the equation ξu,u,uj (vu,u j j, πu 0 ,... , π |uu|− 1 ) = vu,u j j of type (((u, uj )), (u, uj )). H3. Associativity. For every u, v, w ∈ S?^ and s ∈ S, the equation ξu,v,s(ξv,w,s(vw,s 0 , vv,w 1 0 ,... , v v,w|w|− 1 |w| ), v
u,v 0 |w|+1,... , v
u,v|v|− 1 |w|+|v| ) = ξu,w,s(vw,s 0 ,ξu,v,w 0 (vv,w 1 0 , vu,v |w|^0 +1,... , v u,v|v|− 1 |w|+|v| ),... , ξu,v,w|w|− 1 (v v,w|w|− 1 |w| , v
u,v 0 |w|+1,... , v
u,v|v|− 1 |w|+|v| )) of type (((w, s), (v, w 0 ),... , (v, w|w|− 1 ), (u, v 0 ),... (u, v|v|− 1 )), (u, s)). Let us remark that from H3, for w = λ, we obtain the invariance of constant functions axiom in [5]:
Invariance of constant functions. For every u, v ∈ S?^ and s ∈ S, we have the equation ξu,v,s(ξv,λ,s(vλ,s 0 ), v 1 u,v 0 ,... , v u,v|v|− 1 |v| ) =^ ξu,λ,s(v
λ,s 0 ) of type (((λ, s), (u, v 0 ),... , (u, v|v|− 1 )), (u, s)). We call the formal constants πiw projections, and the formal many-sorted oper- ations ξu,w,s substitution operators. Moreover, we denote by Alg(H) the category of Hall algebras for S and homomorphisms between Hall algebras.
For every S-sorted set A, Op(A) = (HomSet(Aw, As))(w,s)∈S?×S , the S?^ × S- sorted set of many-sorted operation for A, where, for w ∈ S?, Aw =
i∈|w| Awi^ , is endowed with a structure of Hall algebra, if we realize the projections as the true projections and the substitution operators as the generalized composition of mappings. The closed sets of this many-sorted algebra are the clones of operations and were investigated originally, for operations on ordinary sets, by Philip Hall (see e.g., [4] or [7]).
Proposition 2. Let A be an S-sorted set and Op(A) the many-sorted ΣH-algebra with underlying many-sorted set Op(A) and many-sorted algebraic structure F de- fined as follows
(1) For every w ∈ S?^ and i ∈ |w|, Fπwi = prAw,i : Aw //Awi. (2) For every u, w ∈ S?^ and s ∈ S, Fξu,w,s is defined, for every f ∈ AA s wand g ∈ AA wu , as Fξu,w,s (f, g 0 ,... , g|w|− 1 ) = f ◦〈gi〉i∈|w|, where 〈gi〉i∈|w| is the unique mapping from Au to Aw such that, for every i ∈ |w|, prAw,i ◦ 〈gi〉i∈|w| = gi.
Then Op(A) is a Hall algebra.
We remark that, as a particular case of substitution, we also have Fξu,λ,s , that converts constants of type κaλ,s into constants of type κau,s, for a ∈ As and u ∈ S?. For every S-sorted signature Σ, PolH(Σ) = (FrΣ(↓w)s)(w,s)∈S?×S is also endowed with a structure of Hall algebra that formalizes the concept of substitution.
Proposition 3. Let Σ be an S-sorted signature and PolH(Σ) the many-sorted ΣH- algebra with underlying many-sorted set PolH(Σ) and many-sorted algebraic struc- ture F defined as follows
(1) For every w ∈ S?^ and i ∈ |w|, Fπwi is the image under η↓wwi of the variable vw i i, where η↓w^ = (ηs↓ w)s∈S is the canonical injection of ↓w into FrΣ(↓w).
COMPLETENESS FOR MONADS 7
(pw)]s. Then f̂ is a homomorphism of Hall algebras, because, on the one hand, for w ∈ S?^ and i ∈ |w| we have that
f̂(w,wi)((πwi )Pol(Σ)) = f̂(w,wi)(vsi ) = pwwi (vsi ) = (πwi )A
and, on the other hand, for P ∈ FrΣ(↓w)s and (Qi | i ∈ |w|) ∈ FrΣ(↓u)w we have that
f̂(u,s)(ξ u,w,sPol(Σ) (P, Q 0 ,... , Q|w|− 1 )) = (pu)]s(Q]s(P )) = ((pu)]^ ◦ Q)]s(P )
= P A
f,u ((pu)]w 0 (Q 0 ),... , (pu)]w|w|− 1 (Q|w|− 1 )) = ξu,w,sA ((pw)]s(P ), (pu)]w 0 (Q 0 ),... , (pu)]w|w|− 1 (Q|w|− 1 )) (by Lemma 1) = ξu,w,sA ( f̂(w,s)(P ), f̂(u,w 0 )(Q 0 ),... , f̂(u,w|w|− 1 )(Q|w|− 1 )).
Therefore the S?^ × S-sorted mapping f̂ is a homomorphism. Moreover, f̂ ◦ h = f , because, for every w ∈ S?, s ∈ S, and σ ∈ Σw,s, we have that
f̂(w,s)(hw,s(σ)) = (pw)]s(σ(vs 0 ,... , vs |w|− 1 )) = σAw^ (pww 0 (v 0 s),... , pww|w|− 1 (vs |w|− 1 )) = ξAw,w,s(f(w,s)(σ), (πw 0 )A,... , (πw |w|− 1 )A) = f(w,s)(σ) (H2)
It is obvious that f̂ is the unique homomorphism such that f̂ ◦ h = f. Henceforth PolH(Σ) is isomorphic to FrH(Σ). §
Now, for every many-sorted Σ-algebra A, we state the existence of a homomor- phism of Hall algebras PdA^ from PolH(Σ) into Op(A) = Op(A) such that ThΣ(A),
the finitary Σ-equational theory determined by A, is precisely Ker(PdA).
Proposition 5. Let A be a many-sorted Σ-algebra. Then the S?^ × S-sorted map- ping PdA^ from PolH(Σ) into Op(A) = Op(A) defined as PdA^ = (PdA (w,s))(w,s)∈S?×S
where, for every (w, s) ∈ S?^ ×S, PdA (w,s) is the s-th coordinate of PdAw = (PdAw,s)s∈S ,
the unique homomorphism from FrΣ(↓w) into Opw(A) = AAw^ such that PdAw ◦η↓w^ =
pAw , where pAw is the S-sorted mapping from ↓w into Opw(A) = AAw^ defined, for every s ∈ S and vsi ∈ (↓w)s, as pAw,s(vsi ) = prAw,i, is a homomorphism of Hall
algebras from PolH(Σ) into Op(A). Moreover, Ker(PdA) = ThΣ(A).
The last part of the Proposition just stated can be extended to classes of many- sorted Σ-algebras and, in particular, to the models of a family E of finitary Σ- equations. From this will follow that the operador CgPolH(Σ) is sound relative to the operador of semantical consequence CnΣ.
Proposition 6. Let K a class of many-sorted Σ-algebras. Then ThΣ(K) is a congruence on PolH(Σ).
Proof. Because ThΣ(K) is
A∈K Ker(Pd
A) ∈ Cgr(Pol H(Σ)).^ §
Corollary 1 (Soundness Theorem). Let Σ be an S-sorted signature. Then we have that CgPolH(Σ) ≤ CnΣ.
8 JUAN CLIMENT AND JUAN SOLIVERES
Proof. Let E be a part of EqH(Σ). By definition CnΣ(E) = ThΣ(ModΣ(E)), that is a congruence on PolH(Σ) and contains E, therefore CnΣ(E) contains CgPolH(Σ)(E). §
The congruence generated in PolH(Σ) by a family of finitary Σ-equations E can be characterized as follows.
Proposition 7. Let E be a part of EqH(Σ). Then CgPolH(Σ)(E) is the smallest
part E of EqH(Σ) that contains E and is such that, for every u, w ∈ S?^ and s ∈ S, satisfies the following conditions:
(1) Reflexivity. For every P ∈ PolH(Σ)w,s, (P, P ) ∈ Ew,s. (2) Symmetry. For every P , Q ∈ PolH(Σ)w,s, if (P, Q) ∈ Ew,s, then (Q, P ) ∈ Ew,s. (3) Transitivity. For every P , Q, R ∈ PolH(Σ)w,s, if (P, Q), (Q, R) ∈ Ew,s, then (P, R) ∈ Ew,s. (4) Substitutivity. For every (Mi | i ∈ |w|), (Ni | i ∈ |w|) ∈
i∈|w| PolH(Σ)u,wi such that, for every i ∈ |w|, (Mi, Ni) ∈ Eu,wi , and (P, Q) ∈ Ew,s,
(ξu,w,s(P, M 0 ,... , M|w|− 1 ), ξu,w,s(Q, N 0 ,... , N|w|− 1 )) ∈ Eu,s.
§
Let us remark that in the Proposition just stated, the substitutivity condition for w = λ demands that if (P, Q) ∈ Eλ,s then, for every u ∈ S?, (P, Q) ∈ Eu,s.
Proposition 8. Let E be a part of EqH(Σ) and σ ∈ Σw,s. If, for every i ∈ |w|, (Pi, Qi) ∈ Ew,wi , then (σ(P 0 ,... , P|w|− 1 ), σ(Q 0 ,... , Q|w|− 1 )) ∈ Ew,s.
Proof. By reflexivity (σ(v 0 ,... , v|w|− 1 ), σ(v 0 ,... , v|w|− 1 )) ∈ Ew,s hence, by substi- tutivity, (σ(P 0 ,... , P|w|− 1 ), σ(Q 0 ,... , Q|w|− 1 )) ∈ Ew,s §
Proposition 9. Let E be a part of EqH(Σ) and (w, s) ∈ S?^ × S. If (P, Q) ∈ Ew,s and f is an endomorphism of FrΣ(↓w), then (fs(P ), fs(Q)) ∈ Ew,s.
Proof. For every i ∈ |w|, the equation (fwi (vi), fwi (vi)) is in Ew,wi. By substitu- tivity, we have that
(ξw,w,s(P, fw 0 (v 0 ),... , fw|w|− 1 (v|w|− 1 )), ξw,w,s(Q, fw 0 (v 0 ),... , fw|w|− 1 (v|w|− 1 )))
is in Ew,s, hence (fs(P ), fs(Q)) ∈ Ew,s. §
Corollary 2. Let E be a part of EqH(Σ) and w ∈ S?. Then Ew = (Ew,s)s∈S is a fully invariant congruence on FrΣ(↓w).
We remark that the congruence Ew contains CgfiFrΣ(↓w)(Ew), the fully invariant
congruence generated by Ew = (Ew,s)s∈S and, in general, the containment is strict.
Proposition 10. Let E be a part of EqH(Σ) and w ∈ S?. Then FrΣ(↓w)/Ew is a model of E.
Proposition 11 (Adequacy Theorem). Let Σ be an S-sorted signature. Then we have that CnΣ ≤ CgPolH(Σ).
10 JUAN CLIMENT AND JUAN SOLIVERES
R4′^ Substitutivity. (P, Q) : (X, s) (P ′, Q′) : (Y, t) (P (x/P ′), Q(x/Q′)) : ((X − δt,x) ∪ Y, s) x ∈ Xt [δtt,x = {x}, δst,x = ∅, if s 6 = t]
Proof. We begin by proving that R4 implies R4′. If (P, Q) : (X, s) and (P ′, Q′) : (Y, t) are deducible and x ∈ Xt, then also are deducible, by reflexivity, the fini- tary Σ-equations in the family ((P (^) s,x′′, Q′′ s,x) : ((X − δt,x) ∪ Y, s))s∈S, x∈Xs , where P (^) t,x′′ = P ′, Q′′ t,x = Q′, and otherwise P (^) s,y′′ = Q′′ s,y = y. Then, by general- ized substitutivity, (P (x/P ′), Q(x/Q′)) : ((X − δt,x) ∪ Y, s) is deducible, because P (x/P ′) = (P (x/P (^) s,x′′)s∈S, x∈Xs and Q(x/Q′) = Q(x/P (^) s,x′′)s∈S, x∈Xs. Reciprocally, R4′^ implies R4, by reiterating the application of R4′^ card(
times. §
In some presentations of many-sorted equational logic, e.g., in [5], are introduced two additional inference rules that allow the adjunction and suppresion of variables, under some conditions. But as we will prove below both rules are derived rules, relative to the system of rules R1 to R4.
Definition 8 (Abstraction and concretion).
R5 Abstraction. (P, Q) : (X, s) (P, Q) : (X ∪ δt,x, s) x ∈ Vt − Xt
R6 Concretion. (P, Q) : (X, s) (P, Q) : (X − δt,x, s) x ∈ Xt, x 6 ∈ var(P, Q), FrΣ((∅)s∈S )t 6 = ∅.
Proposition 14. The abstraction and concretion rules are derived rules.
Proof. Abstraction is a derived rule. Let y ∈ Vs be such that y 6 ∈ Xs. Then, by reflexivity, the finitary Σ-equation (y, y) : (δs,y^ ∪ δt,x, s) is deducible. Hence, by substitutivity, the finitary Σ-equation
(y(y/P ), y(y/Q)) : (((δs,y^ ∪ δt,x) − δs,y^ ) ∪ X, s)
that is identical to (P, Q) : (X ∪ δt,x, s), is also deducible. As a particular case we have that if (P, Q) : ((∅)s∈S , s) is deducible, then (P, Q) : (δt,x, s) is also deducible. Concretion is a derived rule. Since FrΣ((∅)s∈S )t 6 = ∅ let us choose an R ∈ FrΣ((∅)s∈S )t. Then, by reflexivity, the finitary Σ-equation (R, R) : ((∅)s∈S , t) is deducible. Hence, by substitutivity, (P (x/R), Q(x/R)) : ((X − δt,x) ∪ (∅)s∈S , s) is also deducible and, because x 6 ∈ var(P, Q), (P, Q) : (X − δt,x, s) is deducible. §
Definition 9 (Replacement rule).
R7 Replacement. (P i, Qi) : (X, wi) (σ(P 0 ,... , P|w|− 1 ), σ(Q 0 ,... , Q|w|− 1 )) : (X, s) σ ∈ Σw,s
Proposition 15. The replacement rule is a derived rule.
Proof. By reflexivity, (σ(v 0 ,... , v|w|− 1 ), σ(v 0 ,... , v|w|− 1 )) : (↓w, s) is deducible. Now, by reiterating substitutivity |w|-times, we obtain the desired finitary Σ- equation. §
Everything we have made up to now can be extended to the case of locally finitary Σ-equations, i.e., pairs of mappings from δs^ to FrΣ(X), for some s ∈ S and X ∈ Sublf (V ) = { X ⊆ V | ∀s ∈ S (Xs is finite) }, we only have to change the structural operations of the Hall algebras to locally finitary operations. Moreover, the equational calculus has the same inference rules R1–R4, but generalized to
COMPLETENESS FOR MONADS 11
locally finite S-sorted sets of variables. However, the rule of substitution is not more equivalent to the generalized rule of substitution. Finally, the rules of abstraction and concretion for this case are the following.
Definition 10.
R5′^ Generalized abstraction. (P, Q) : (X, s) (P, Q) : (X ∪ Y, s) R6′^ Generalized concretion. (P, Q) : (X, s) (P, Q) : (X − Y, s) Y ∩ var(P, Q) = ∅, supp(Y ) ⊆ supp(FrΣ((∅)s∈S ))
Where, for an S-sorted set Z, supp(Z), the support of Z, is { s ∈ S | Zs 6 = ∅ }. The Completeness Theorem can also be proved alternatively by using instead of the Hall algebras the B´enabou algebras. This is interesting because, on the one hand, the category of B´enabou algebras is isomorphic to the category of B´enabou theories defined in [1] and, on the other hand, the B´enabou algebras even having an equational presentation radically different from that of the Hall algebras, are equiv- alent to them, i.e., the respective categories are equivalent. In order to accomplish such an alternative proof we begin by defining the B´enabou algebras.
Definition 11. Let S be a set of sorts and V B^ the S?^ × S?-sorted set of variables (V(u,w))(u,w)∈S?×S? where, for every (u, w) ∈ S?^ × S?, V(u,w) = { vu,wn | n ∈ N }. A
B´enabou algebra for S is a many-sorted (ΣB, EB)-algebra, where ΣB^ is (S?^ ×S?, ΣB) and ΣB^ is the (S?)^2 -sorted signature, i.e., the (S?^ × S?)?^ × (S?^ × S?)-sorted set, defined as follows:
(1) For every w ∈ S?^ and i ∈ |w|, πwi : λ //(w, (wi)). (2) For every u, w ∈ S?, 〈 〉u,w : ((u, (w 0 )),... , (u, (w|w|− 1 ))) //(u, w). (3) For every u, x, w ∈ S?, ◦u,x,w : ((u, x), (x, w)) //(u, w).
while EB^ is the part of Eq(ΣB) = (FrΣB (↓w)^2 (u,x))(w,(u,x))∈(S?×S?)?×(S?×S?) defined as follows:
B1. For every u, w ∈ S?^ and i ∈ |w|, the equation
πiw ◦u,w,(wi) 〈v 0 u, (w^0 ),... , v u,(w|w|− 1 ) |w|− 1 〉u,w^ =^ v
u,(wi) i of type (((u, (w 0 )),... , (u, (w|w|− 1 ))), (u, (wi))). B2. For every u and w ∈ S?, the equation v 0 u,w ◦u,u,w 〈πu 0 ,... , π |uu|− 1 〉u,u = vu,w 0 of type (((u, w)), (u, w)). B3. For every u and w ∈ S?, the equation 〈π 0 w ◦u,w,w 0 vu,w 0 ,... , πw |w|− 1 ◦u,w,w|w|− 1 vu,w 0 〉u,w = v 0 u,w of type (((u, w)), (u, w)). B4. For every w ∈ S?, the equation 〈πw 0 〉w,(w 0 ) = π 0 w of type (((w, (w 0 ))), (w, (w 0 ))).
COMPLETENESS FOR MONADS 13
The composition is associative by B5. Now we prove that, for every w ∈ S?, (w, ((πwi )L)i∈|w|) is a product in L of the family ((wi)i∈|w|). If (Pi : x //wi)i∈|w| is a family of morphisms, then we have that
(πwi )L^ ◦ 〈Pi | i ∈ |w|〉 = Pi (by B1)
Moreover, if Q : x //w is such that (πwi )L^ ◦ Q = Pi, then
Q = 〈(πwi )L^ ◦ Q | i ∈ |w|〉 (by B3) = 〈Pi | i ∈ |w|〉
§
Proposition 18. Let L = (L, p) be a B´enabou theory for S. Then the family
(Lw,u)(w,u)∈(S?) 2 = (L(w, u))(w,u)∈(S?) 2
together with, for every w ∈ S?^ and i ∈ |w|, πiw = pwi , for every u, w ∈ S?, 〈〉u,w the mapping on
i∈|w| L(u, wi)^ to^ L(u, w)^ obtained by the universal property of the product for w, and, for every u, x, w ∈ S?, ◦u,w,x the composition in L, is a B´enabou algebra L.
Proposition 19. The categories Alg(BS ) and BTh(S) are isomorphic.
Proof. Let T be the functor on Alg(BS ) to BTh(S) that to a B´enabou algebra L assigns the B´enabou theory (L, πL), and to a morphism of B´enabou algebras f : L //K assigns the morphism of B´enabou theories T (f ) that to P : w //u associates fw,u(P ) : w //u. Let A be the functor on BTh(S) to Alg(BS ) that to a B´enabou theory L = (L, p) assigns the B´enabou algebra corresponding to L and to a morphism of B´enabou theories F : L //L′^ assigns the morphism of B´enabou algebras, that for u, w ∈ S?, is the bi-restriction of F to L(u, w) and L′(u, w). The functors T and A are mutually inverses, therefore the categories Alg(BS ) and BTh(S) are isomorphic. §
Now we state the equivalence between the categories of Hall and B´enabou alge- bras.
Proposition 20. The categories Alg(H) and Alg(B) are equivalent.
Proof. Let B : Alg(H) //Alg(B) be the functor that to a Hall algebra A as- signs the B´enabou algebra B(A) that has as underlying S?^ × S?-sorted set B(A) = ((Aw)u)(w,u)∈(S?) 2 , where Aw = (Aw,s)s∈S and (Aw)u =
i∈|u| Aw,ui^ , and as alge- braic structure that defined as
(πiw )B(A)^ = ((πwi )A), 〈(a 0 ),... , (a|w|− 1 )〉B( u,wA )= (ξAu,w,w 0 (πw 0 , a 0 ,... , a|w|− 1 ),... ξAu,w,w|w|− 1 (πw |w|− 1 , a 0 ,... , a|w|− 1 )), ◦B( u,x,wA)(a, b) = (ξAu,x,w 0 (b 0 , a 0 ,... , a|x|− 1 ),... ξAu,x,w|w|− 1 (b 0 , a 0 ,... , a|x|− 1 ));
and to an homomorphism f : A //B of Hall algebras assigns the homomorphism B(f ) = ((fw)u)(w,u)∈(S?) 2 , defined for (a 0 ,... , a|u|− 1 ) in (Aw)u as
(a 0 ,... , a|u|− 1 ) 7 −→ (fw,u 0 (a 0 ),... , fw,u|u− 1 | (a|u|− 1 ))).
14 JUAN CLIMENT AND JUAN SOLIVERES
Reciprocally, let H : Alg(B) //Alg(H) be the functor that to a B´enabou al- gebra A assigns the Hall algebra H(A) that has H(A) = (Aw,(s))(w,s)∈S?×S as underlying S?^ × S-sorted set, and as algebraic structure that defined as
(πiw )H(A)^ = (πiw )A, ξH( u,w,sA)(a 0 , a 1 ,... , a|w|) = a 0 ◦u,w,s 〈a 1 ,... , a|w|〉u,w;
and to an homomorphism f : A //B of B´enabou algebras assigns the bi-restriction of f to B(A) and B(B). Next, for a B´enabou algebra A, we prove that A and B H(A) are isomorphic. Let f : A //B H(A) be the S?^ × S?-sorted mapping defined, for (u, w) ∈ S?^ × S? and a ∈ Au,w, as
a 7 → ((π 0 w )A^ ◦ a,... , (πw |w|− 1 )A^ ◦ a).
The definition is sound because, for a ∈ Au,w, we have that (πwi )A^ ◦ a ∈ H(A)u,wi , hence ((πw 0 )A^ ◦ a,... , (π |ww|− 1 )A^ ◦ a) ∈ B H(A)u,w. Thus defined it is easy to prove that f is a homomorphism. Reciprocally, let g : B H(A) //A be the S?^ × S?-sorted mapping defined, for (u, w) ∈ S?^ × S?^ and b ∈ B H(A), as
b 7 → 〈b 0 ,... , b|w|− 1 〉A
The definition is sound because, for b = (b 0 ,... , b|w|− 1 ) ∈ B H(A), we have that bi ∈ H(A)u,wi , hence bi ∈ Au,(wi), therefore 〈b 0 ,... , b|w|− 1 〉A^ ∈ Au,w. Thus defined it is easy to prove that g is a homomorphism. Now we prove that the homomorphisms f and g are such that g ◦ f = idA and f ◦g = idB H(A). On the one hand, if a ∈ Au,w, then 〈(π 0 w )A^ ◦a,... , (πw |w|− 1 )A^ ◦a〉 = a by B3, hence g ◦ f = idA. On the other hand, if b ∈ B H(A), fu,w ◦ gu,w(b) is the mapping
b 7 →〈b 0 ,... , b|w|− 1 〉Au,w 7 →((π 0 w )B H(A)^ ◦ 〈b 0 ,... , b|w|− 1 〉Au,w,... , (π |ww|− 1 )B H(A)^ ◦ 〈b 0 ,... , b|w|− 1 〉Au,w) = ((πw 0 )A^ ◦ 〈b 0 ,... , b|w|− 1 〉Au,w,... , (πw |w|− 1 )A^ ◦ 〈b 0 ,... , b|w|− 1 〉Au,w) = 〈b 0 ,... , b|w|− 1 〉Au,w
where the last step is justified by the axiom B1, hence f ◦ g = idB H(A). Finally, for a Hall algebra A we have that A and H B(A) are identical, because a ∈ Aw,s iff a ∈ B(A)w,(s) iff a ∈ H B(A)w,s. §
Proposition 21. Let
1 ×GS :^ Set
S?×S (^) //SetS?×S? be the functor determined by
the mapping 1 × GS from S?^ × S into S?^ × S?^ that to a pair (w, s) assigns (w, (s)). Then for the diagram
SetS
?×S (^) Alg(H)
SetS
?×S? Alg(B)
o o^ GH
FrH
a^ ∆ 1 ×GS
1 ×GS ≤ ≤
o o^ GB^ ≤^ ≤
FrB
we have that FrB ◦
1 ×GS^ ∼= B^ ◦^ FrH and^ ∆^1 ×GS ◦^ GB^ = GH^ ◦^ H
16 JUAN CLIMENT AND JUAN SOLIVERES
Eu,w. If (P, Q) ∈ Eu,w, then, for every i ∈ |w|, (Pi, Qi) ∈ Eu,(wi), hence (Pi, Qi) ∈ H(E)u,wi and (P, Q) ∈ B(H(E))u,w. §
Corollary 5 (Completeness Theorem). Let Σ be an S-sorted signature. Then the algebraic lattice Cgr(PolB(Σ)) is isomorphic to the algebraic lattice of fixed points of CnΣ.
Definition 13. Let T = (T, η, μ) be a monad in a category C and X, Y objects in C.
(1) A T-polynomial of type (X, Y ) is a morphism P : Y //T (X) in C. We identify the T-polynomials with the morphisms in Kl(T)op, the dual of the Kleisli category of T, hence P : X //Y in Kl(T)op^ is P : Y //X in Kl(T) or, what amounts to the same, P : Y //T (X) in C. (2) A T-equation of type (X, Y ) is a pair (P, Q) of T-polynomials of type (X, Y ). We identify the T-equations with the parallel pairs of morphisms in Kl(T)op. We agree that Pol(T) denotes the category Kl(T)op^ and call it the category of T-polynomials. On the other hand, Eq(T) is (HomPol(T)(X, Y )^2 )(X,Y )∈C 2 , the C^2 -sorted set of T-equations. Moreover, we call the C^2 -sorted subsets of Eq(T), that are the relations on the category Pol(T), families of T-equations. To avoid misunderstandings we denote by ¶ the composition in Kl(T) and Pol(T), preserving the standard notation for the composition in the category C. Therefore, if Q : Z //T (Y ) and P : Y //T (X) are morphism in Kl(T), then P ¶ Q = μX ◦ T (P ) ◦ Q.
Now we define for a monad in a category, on the one hand, the realization of the polynomials relative to the monad in the algebras for the monad and, on the other, the concept of validation of an equation for the monad in an algebra for the monad.
Definition 14. Let T be a monad in C and (A, α) a T-algebra. Then every T- polynomial P : X //Y induces a mapping P (A,α)^ : HomC(X, A) //HomC(Y, A), the realization of P in (A, α), that to a morphism f : X //A assigns the morphism α ◦ T (f ) ◦ P : Y //A.
From now on, we agree that to say that a diagram of the form
a
f (^) // b
g (^) //
h
/^ c^
k (^) //
commutes, means that k ◦ g ◦ f = k ◦ h ◦ f. We extend this convention to similar diagrams.
Definition 15. Let (A, α) be a T-algebra and (P, Q) a T-equation of type (X, Y ). We say that (P, Q) is valid in (A, α), denoted by (A, α) |=T X,Y (P, Q), if for every
COMPLETENESS FOR MONADS 17
f : X //A, α ◦ T(α) ◦ P = α ◦ T(α) ◦ Q, i.e., if the following diagram commutes
T (f ) (^) // T (A) α (^) //
or, equivalently, if P (A,α)^ = Q(A,α). If K ⊆ EM(T), where EM(T) is the Eilenberg- Moore category of T, then we agree that K |=T X,Y (P, Q) means that, for every
(A, α) ∈ K, (A, α) |=T X,Y (P, Q).
As for general algebra, from the concept of validation we also obtain a contravari- ant Galois connection.
Definition 16. Let T be a monad in C.
(1) If K ⊆ EM(T), then the T-equational theory determined by K, ThT(K), is ThT(K) =
(P, Q) ∈ Eq(T)X,Y | ∀(A, α) ∈ K ((A, α) |=T X,Y (P, Q))
(X,Y )∈C^2 (2) If E ⊆ Eq(T), then the T-equational class determined by E, ModT(E), has as elements the T-algebras (A, α) that validate each equation of E, i.e.,
ModT(E) =
(A, α) ∈ EM(T)
(A, α) |=T X,Y (P, Q)
Proposition 25. Let T be a monad in C, E, E′^ two families of T-equations and K, K′^ two classes of T-algebras. Then the following holds:
(1) If E ⊆ E′, then ModT(E′) ⊆ ModT(E). (2) If K ⊆ K′, then ThT(K′) ⊆ ThT(K). (3) E ⊆ ThT(ModT(E)) and K ⊆ ModT(ThT(K)).
Therefore the pair of mappings ThT and ModT is a contravariant Galois connection.
The categories associated to the lattices of classes of T-algebras and families of T-equations are related by the adjunction ModT a ThT, i.e., for every class K of T-algebras and every family E of T-equations, we have that K ⊆ ModT(E) iff E ⊆ ThT(K), because of the contravariance.
Definition 17. Let T be a monad in C. We denote by CnT the closure operator ThT ◦ ModT on Eq(T) and we call the CnT-closed sets T-equational theories. If E is a family of T-equations and (P, Q) a T-equation of type (X, Y ), then we say that (P, Q) is a semantical consequence of E if ModT(E) ⊆ ModT(P, Q), i.e., if (P, Q) ∈ ThT(ModT(E))X,Y.
Definition 18. Let S be a set of sorts, T a monad in SetS^ , (A, α) a T-algebra and Φ an equivalence on A. We say that Φ is a congruence on (A, α) if there is a ξ : T (Φ) //Φ such that
COMPLETENESS FOR MONADS 19
unique morphisms such that, for every i ∈ I, πi ◦ 〈β〉 = βi and πi ◦ 〈γ〉 = γi, are E-congruents, i.e., (〈β〉 , 〈γ〉) ∈ EY,lim ←−(D)
β
γ
〈γ〉 ≠ ≠
〈β〉 ∑ ∑ lim ←−(D) π
We say that E is a Π(D)-compatible congruence on C if E is a lim ←−(D)- compatible congruence on C when I is discrete. (3) We say that E is a lim ←−-compatible congruence if, for every D : I //C, E is a lim ←− (D)-compatible congruence on C. If, for every discrete diagram D, E is a Π(D)-compatible congruence, then we say that E is a Π-compatible congruence on C.
We remark that the concepts in the above Definition can be dualized. Moreover, the behaviour relative to the morphisms of the lim ←−-compatible congruences is like that of the algebraical congruences relative to the homomorphisms, as stated in the following Proposition.
Proposition 28. Let C be a category, D, D′^ : I //C two diagrams of type I in C, E a lim ←−(D) and lim ←−(D′)-compatible congruence on C and σ, τ : D +^3 D′^ two natu- ral transformations from D to D′. Then, for every projective limits (lim ←−(D), π) of D
and (lim ←−(D′), π′) of D′, the unique morphisms 〈σ ◦ π〉 , 〈τ ◦ π〉 : lim ←−(D) //lim ←−(D′) such that, for every i ∈ I, π i′ ◦ 〈σ ◦ π〉 = σi ◦ πi and π′ i ◦ 〈τ ◦ π〉 = τi ◦ πi, are E- congruents.
Corollary 6. Let C be a category, (Ai)i∈I , (Bi)i∈I two families of objects in C, E a Π-compatible congruence on C, and (fi)i∈I , (gi)i∈I two families of morphisms from (Ai)i∈I to (Bi)i∈I. If, for every i ∈ I, fi and gi are E-congruent, then
i∈I fi and
i∈I gi^ are^ E-congruent.
Proposition 29. Let C be a category with products. Then the ordered set of Π- compatible congruences on C, Cgr
∏ (C) = (Cgr
∏ (C), ⊆), is a complete lattice.
Definition 20. Let C be a category with products. We denote by Cg
∏ C the closure operator on the set of relations on C that to a relation E on C assigns the smallest Π-compatible congruence on C that contains E.
Now we prove that the Kleisli category of a monad T in a category C has coproducts if C has coproducts. From this follows that, for every set of sorts S and monad T in SetS^ , the category Pol(T) has products, because it is the dual of Kl(T), therefore on the category Pol(T) we have the corresponding closure operator Cg
∏ Pol(T) that we will use to prove the Completeness Theorem for monads in categories of sorted sets.
Proposition 30. Let T be a monad in C. If C has coproducts, then Kl(T) has coproducts.
Proof. Let (Xi)i∈I be a family of objects in Kl(T). Then
i∈I Xi, together with the family of morphisms (η∐ i∈I Xi ◦ ini)i∈I , is a coproduct in Kl(T) of (Xi)i∈I.
20 JUAN CLIMENT AND JUAN SOLIVERES
Let (fi : Xi //Y )i∈I be a family of morphisms in Kl(T). Then we have, in C, the commutative diagram
Xi
ini (^) //
fi $ $
i∈I Xi
η∐ i∈I Xi (^) //
[fi]i∈I ≤ ≤
i∈I Xi)
T ([fi]i∈I ) ≤ ≤ T (Y ) (^) μ T (T (Y )) Y
o o
and [fi]i∈I :
i∈I Xi^ //Y^ in^ Kl(T) satisfies the universal property.^ §
Corollary 7. Let T be a monad in C. If C has coproducts, then Pol(T) has products. Therefore, for every set of sorts S and every monad T in SetS^ , Pol(T) has products.
Next we prove that the Π-compatible congruences on the category of polynomials for a monad in a category of sorted sets, are determined by the pairs of morphisms in the congruence with codomains deltas of Kronecker. Moreover, from now on, for a monad T = (T, η, μ) in SetS^ we denote by ηX^ and μX^ the values of η and μ, respectively, in the S-sorted set X.
Proposition 31. Let T be a monad in SetS^ and E a Π-compatible congruence on Pol(T). Then (P, Q) ∈ EX,Y iff, for every s ∈ S and (y) : δs^ //Y in SetS^ , we have that (P ◦ (y), Q ◦ (y)) ∈ EX,δs^.
Proof. Before we proceed to the proof, we remark that, for every (y) : δs^ //Y , ηY^ ◦ (y) is a morphism in Pol(T) from Y to δs. Moreover, if R : X //Y is another morphism in Pol(T), then (ηY^ ◦ (y)) ¶ R = R ◦ (y). If (P, Q) ∈ EX,Y , then, for every s ∈ S and (y) : δs^ //Y , because E is a congruence, we have that (P ◦ (y), Q ◦ (y)) ∈ EX,δs^. Reciprocally, if, for every s ∈ S and (y) : δs^ //Y , (P ◦ (y), Q ◦ (y)) ∈ EX,δs^ , then, because (Y, (ηY^ ◦ (y))s∈S,y∈Ys ) is a product in Pol(T) of (δs)s∈S,y∈Ys and E is Π-compatible, it follows that the pair (〈P ◦ (y)〉s∈S,y∈Ys , 〈Q ◦ (y)〉s∈S,y∈Ys ) ∈ EX,Y. But, by the universal property of the product, (〈P ◦(y)〉s∈S,y∈Ys , 〈Q◦(y)〉s∈S,y∈Ys ) = (P, Q), hence (P, Q) ∈ EX,Y. §
Next we prove the Soundness Theorem, i.e., that for every subclass K of the Eilenberg-Moore category for the monad T, the T-equational theory ThT(K) is a Π-compatible congruence on Pol(T).
Theorem 1 (Soundness Theorem). Let S be a set and T a monad in SetS^. Then every T-equational theory is a Π-compatible congruence on Pol(T).
Proof. Let ThT(K) be a T-equational theory for some K ⊆ EM(T). Then, for every X, Y ∈ SetS^ , ThT(K)X,Y is an equivalence on HomPol(T)(X, Y ). Now we prove that the equivalence ThT(K) is compatible with the composition in Pol(T). Let (P, Q) ∈ ThT(K)X,Y be and R : Y //Z a morphism in Pol(T). Then, for every T-algebra (A, α) and morphism f : X //A, the following diagram
in SetS^ commutes:
T (f ) / / T (A) α^ //A
μX
T (T (f ))
μA
T (α)
α