Disjointunion partial algebras
Abstract
Disjoint union is a partial binary operation returning the union of two sets if they are disjoint and undefined otherwise. A disjointunion partial algebra of sets is a collection of sets closed under disjoint unions, whenever they are defined. We provide a recursive firstorder axiomatisation of the class of partial algebras isomorphic to a disjointunion partial algebra of sets but prove that no finite axiomatisation exists. We do the same for other signatures including one or both of disjoint union and subset complement, another partial binary operation we define.
Domaindisjoint union is a partial binary operation on partial functions, returning the union if the arguments have disjoint domains and undefined otherwise. For each signature including one or both of domaindisjoint union and subset complement and optionally including composition, we consider the class of partial algebras isomorphic to a collection of partial functions closed under the operations. Again the classes prove to be axiomatisable, but not finitely axiomatisable, in firstorder logic.
We define the notion of pairwise combinability. For each of the previously considered signatures, we examine the class isomorphic to a partial algebra of sets/partial functions under an isomorphism mapping arbitrary suprema of pairwise combinable sets to the corresponding disjoint unions. We prove that for each case the class is not closed under elementary equivalence.
However, when intersection is added to any of the signatures considered, the isomorphism class of the partial algebras of sets is finitely axiomatisable and in each case we give such an axiomatisation.
1–LABEL:LastPageDec. 07, 2016Jun. 22, 2017
1 Introduction
Sets and functions are perhaps the two most fundamental and important types of object in all mathematics. Consequently, investigations into the firstorder properties of collections of such objects have a long history. Boole, in 1847, was the first to focus attention directly on the algebraic properties of sets [2]. The outstanding result in this area is the BirkhoffStone representation theorem, completed in 1934, showing that boolean algebra provides a firstorder axiomatisation of the class of isomorphs of fields of sets [18].
For functions, the story starts around the same period, as we can view Cayley’s theorem of 1854 as proof that the group axioms are in fact an axiomatisation of the isomorphism class of collections of bijective functions, closed under composition and inverse [5]. Schein’s survey article of 1970 contains a summary of the many similar results about algebras of partial functions that were known by the time of its writing [17].
The past fifteen years have seen a revival of interest in algebras of partial functions, with results finding that such algebras are logically and computationally well behaved [10, 13, 11, 12, 9, 14]. In particular, algebras of partial functions with composition, intersection, domain and range have the finite representation property [15].
Separation logic is a formalism for reasoning about the state of dynamicallyallocated computer memory [16]. In the standard ‘stackandheap’ semantics, dynamic memory states are modelled by (finite) partial functions. Thus statements in separation logic are statements about partial functions.
The logical connective common to all flavours of separation logic is the separating conjunction . In the stackandheap semantics, the formulas are evaluated at a given heap (a partial function, ) and stack (a variable assignment, ). In this semantics if and only if there exist with disjoint domains, such that and and . So lying behind the semantics of the separating conjunction is a partial operation on partial functions we call the domaindisjoint union, which returns the union when its arguments have disjoint domains and is undefined otherwise. Another logical connective that is often employed in separation logic is the separating implication and again a partial operation on partial functions lies behind its semantics.
Separation logic has enjoyed and continues to enjoy great practical successes [1, 4]. However Brotherston and Kanovich have shown that, for propositional separation logic, the validity problem is undecidable for a variety of different semantics, including the stackandheap semantics [3]. The contrast between the aforementioned positive results concerning algebras of partial functions and the undecidability of a propositional logic whose semantics are based on partial algebras of partial functions, suggests a more detailed investigation into the computational and logical behaviour of collections of partial functions equipped with the partial operations arising from separation logic.
In this paper we examine, from a firstorder perspective, partial algebras of partial functions over separation logic signatures—signatures containing one or more of the partial operations underlying the semantics of separation logic. Specifically, we study, for each signature, the isomorphic closure of the class of partial algebras of partial functions. Because these partial operations have not previously been studied in a firstorder context we also include an investigation into partial algebras of sets over these signatures.
In Section 2 we give the definitions needed to precisely define these classes of partial algebras. In Section 3 we show that each of our classes is firstorder axiomatisable and in Section 4 we give a method to form recursive axiomatisations that are easily understandable as statements about certain twoplayer games.
In Section 5 we show that though our classes are axiomatisable, finite axiomatisations do not exist. In Section 6 we show that when ordinary intersection is added to the previously examined signatures, the classes of partial algebras become finitely axiomatisable. In Section 7 we examine decidability and complexity questions and then conclude with some open problems.
2 Disjointunion Partial Algebras
In this section we give the fundamental definitions that are needed in order to state the results contained in this paper. We first define the partial operations that we use.
Definition 2.1.
Given two sets and the disjoint union equals if , else it is undefined. The subset complement equals if , else it is undefined.
Observe that if and only if .
The next definition involves partial functions. We take the settheoretic view of a function as being a functional set of ordered pairs, rather than requiring a domain and codomain to be explicitly specified also. In this sense there is no notion of a function being ‘partial’. But using the word partial serves to indicate that when we have a set of such functions they are not required to share a common domain (of definition)—they are ‘partial functions’ on (any superset of) the union of these domains.
Definition 2.2.
Given two partial functions and the domaindisjoint union equals if the domains of and are disjoint, else it is undefined. The symbol denotes the total operation of composition.
Observe that if the domains of two partial functions are disjoint then their union is a partial function. So domaindisjoint union is a partial operation on partial functions. If and are partial functions with then is also a partial function. Hence subset complement gives another partial operation on partial functions.
The reason for our interest in these partial operations is their appearance in the semantics of separation logic, which we now detail precisely.
The separating conjunction is a binary logical connective present in all forms of separation logic. As mentioned in the introduction, in the stackandheap semantics the formulas are evaluated at a given heap (a partial function, ) and stack (variable assignment, ). In this semantics if and only if there exist such that and both and .
The constant emp also appears in all varieties of separation logic. The semantics is if and only if .
The separating implication is another binary logical connective common in separation logic. The semantics is if and only if for all such that we have implies .
Because we are working with partial operations, the classes of structures we will examine are classes of partial algebras.
Definition 2.3.
A partial algebra consists of a domain, , together with a sequence of partial operations on , each of some finite arity that should be clear from the context. Two partial algebras and are similar if for all the arities of and are equal. (So in particular and must have the same ordinal indexing their partial operations.)
We use the word ‘signature’ flexibly. Depending on context it either means a sequence of symbols, each with a prescribed arity and each designated to be a function symbol, a partial function symbol or a relation symbol. Or, it means a sequence of actual operations/partial operations/relations.
Definition 2.4.
Given two similar partial algebras and , a map is a partialalgebra homomorphism from to if for all and all the value is defined if and only if is defined, and in the case where they are defined we have
. If is surjective then we say is a partialalgebra homomorphic image of . A partialalgebra embedding is an injective partialalgebra homomorphism. An isomorphism is a bijective partialalgebra homomorphism.
We are careful never to drop the words ‘partialalgebra’ when referring to the notions defined in Definition 2.4, since a bald ‘homomorphism’ is an ambiguous usage when speaking of partial algebras—at least three differing definitions have been given in the literature. What we call a partialalgebra homomorphism, Grätzer calls a strong homomorphism [7, Chapter 2].
Given a partial algebra , when we write or say that is an element of , we mean that is an element of the domain of . While total algebras are by convention nonempty, we make the choice, for reasons of convenience, to allow partial algebras to be empty. When we want to refer to a signature consisting of a single symbol we will often abuse notation by using that symbol to denote the signature.
We write for the power set of a set .
Definition 2.5.
Let be a signature whose symbols are members of . A partial algebra of sets, , with domain , consists of a subset (for some base set ), closed under the partial operations in , wherever they are defined, and containing the empty set if is in the signature. The particular case of is called a disjointunion partial algebra of sets and the case is a disjointunion partial algebra of sets with zero.
Definition 2.6.
Let be a signature whose symbols are members of . A partial algebra of partial functions, consists of a set of partial functions closed under the partial and total operations in , wherever they are defined, and containing the empty set if is in the signature. The base of is the union of the domains and codomains of all the partial functions in .
Definition 2.7.
Let be a signature whose symbols are members of . A representation by sets of a partial algebra is an isomorphism from that partial algebra to a partial algebra of sets. The particular case of is called a disjointunion representation (by sets).
Definition 2.8.
Let be a signature whose symbols are members of . A representation by partial functions of a partial algebra is an isomorphism from that partial algebra to a partial algebra of partial functions.
For a partial algebra and an element , we write for the image of under a representation of . We will be consistent about the symbols we use for abstract (partial) operations—those in the partial algebras being represented—employing them according to the correspondence indicated below.
For each notion of representability we are interested in the associated representation class—the class of all partial algebras having such a representation. It is usually clear whether we are talking about a representation by sets or a representation by partial functions. For example if the signature contains we must be talking of sets and if it contains we must be talking of partial functions. However, as part (1) of the next proposition shows, for the partial operations we are considering, representability by sets and representability by partial functions are the same thing.
Proposition 2.9.

Let be a signature whose symbols are a subset of and let be the signature formed by replacing (if present) by in . A partial algebra is representable by sets if and only if it is representable by partial functions.

Let be a partial algebra. If the reduct of is representable and validates , then is representable.
Proof.
For part (1), let be one of the signatures in question and let be a partial algebra. Suppose is a representation of by sets over base . Then the map defined by is easily seen to be a representation of by partial functions.
Conversely, suppose is a representation of by partial functions over base . Let be a disjoint set of the same cardinality as and let be any bijection. Define by . Then it is easy to see that is another representation of by partial functions. By construction, has the property that any and have disjoint domains if and only if they are disjoint. Hence is also a representation of by sets.
For part (2), let be a representation of the reduct of over base set . Let be a disjoint set of the same cardinality as and let be any bijection. The map defined by is easily seen to be a representation of . ∎
Remark 2.10.
In each of the following cases let the signature be formed by the addition of to .

Let be a signature containing . A partial algebra is representable if and only its reduct to the signature without is representable and satisfies .

Let be a signature containing . A partial algebra is representable if and only its reduct to the signature without is representable and satisfies .

Let be a signature containing . A partial algebra is representable if and only its reduct to the signature without is representable and satisfies .
Hence axiomatisations of representation classes for signatures without would immediately yield axiomatisations for the case including also.
We now define a version of complete representability. For a partial algebra , define a relation over by letting if and only if either or there is such that is defined and . By definition, is reflexive. If is representable, then by elementary properties of sets, it is necessarily the case that if is defined then is also defined and equal to it, which is precisely what is required to see that is transitive. Antisymmetry of also follows by elementary properties of sets. Hence is a partial order.
Definition 2.11.
A subset of a partial algebra is pairwise combinable if for all the value is defined. A representation of is complete if for any pairwisecombinable subset of with a supremum (with respect to the order ) we have .
Proposition 2.12.
If is a finite partial algebra then every representation of is complete.
Proof.
Let be a representation of and let be pairwise combinable with supremum . As is pairwise combinable and is a representation, we have that is defined for all . Then by the definition of , the set is pairwise disjoint. As is finite, must be too, so , say. By induction, for each we have that is defined and . Hence . It is clear that for any the implication holds. Therefore must be a superset of each and must be a subset of for any upper bound of . But is clearly an upper bound for so we conclude that as required. ∎
Finally, a word about logic. In our metalanguage, that is, English, we can talk in terms of partial operations and partial algebras, which is what we have been doing so far. However, the traditional presentation of firstorder logic does not include partial function symbols. Hence, in order to examine the firstorder logic of our partial algebras we must view them formally as relational structures.
Let be a partial algebra. From the partial binary operation over we may define a ternary relation over by letting if and only if is defined and equal to . Since a partial operation is (at most) single valued, we have
(1) 
Conversely, given any ternary relation over satisfying (1), we may define a partial operation over by letting be defined if and only if there exists such that holds (unique, by (1)) and when this is the case we let . The definition of from and the definition of from are clearly inverses. Similarly, if is in the signature we can define a corresponding ternary relation in the same way.
To remain in the context of classical firstorder logic we adopt languages that feature neither nor but have ternary relation symbols and/or as appropriate (as well as equality). In the relational language , we may write as an abbreviation of the formula and write in place of . Similarly for and .
3 Axiomatisability
In this section we show there exists a firstorder theory that axiomatises the class of partial algebras with representations. Hence , viewed as a class of structures, is elementary. We do the same for the class of partial algebras with representations (as sets) and the class of partial algebras with representations.
Definition 3.1.
If are similar partial algebras and the inclusion map is a partialalgebra embedding then we say that is a partialsubalgebra of . Let be partial algebras, for , and let be an ultrafilter over . The ultraproduct is defined in the normal way, noting that, for example, (where for all ) is defined in the ultraproduct if and only if . Ultrapowers and ultraroots also have their normal definitions: an ultrapower is an ultraproduct of identical partial algebras and is an ultraroot of if is an ultrapower of .
It is clear that a partialsubalgebra of is always a substructure of , as relational structures, and also that any substructure of is a partial algebra, that is, satisfies (1). However, in order for a relational substructure of to be a partialsubalgebra it is necessary that it be closed under the partial operations, wherever they are defined in .
It is almost trivial that the class of representable partial algebras is closed under partialsubalgebras. This class is not however closed under substructures. Indeed it is easy to construct a partial algebra with a disjointunion representation but where an substructure of has no disjointunion representation. We give an example now.
Example 3.2.
The collection of sets forms a disjointunion partial algebra of sets and so is trivially a representable partial algebra, if we identify with .
The substructure with domain is not representable, because and all exist, so would have to be represented by pairwise disjoint sets. But then would have to exist, which is not the case.
We obtain the following corollary.
Corollary 3.3.
The isomorphic closure of the class of disjointunion partial algebras of sets is not axiomatisable by a universal firstorder theory.
Returning to our objective of proving that the classes and are elementary, this could be achieved by showing that they are closed under ultraproducts and ultraroots. However this is not entirely straightforward, since many of the relevant modeltheoretic results are known for total operations only. Instead, to apply these known results, we first describe a way to view an arbitrary partial algebra as a total algebra. Then, having established elementarity of the resulting class of total algebras we describe how to convert back to an axiomatisation of the partial algebras.
Definition 3.4.
Let be a partial algebra. The totalisation of is the algebra , where and for each the interpretation of in agrees with the interpretation in whenever the latter is defined, and in all other cases returns . The totalisation of a class of similar partial algebras is the class of total algebras.
Inversely to totalisation, suppose we have a total algebra where for each , if any element of the tuple is then . Then we may define a partial algebra where each is defined in if and only if in , in which case it has the same value as in . Clearly for any partial algebra we have and for any total algebra with a suitable we have .
In the following, we show that each of the classes and is closed under both ultraproducts and subalgebras and hence is universally axiomatisable in , and respectively. We then give a translation from the universal formulas defining to a set of formulas that defines . Similarly for the other two cases.
We will be using the notion of pseudoelementarity, and since there are various possible equivalent definitions of this, we state the one we wish to use. It can be found, for example, as [8, Definition 9.1].
Definition 3.5.
Given an unsorted firstorder language , a class of structures is pseudoelementary if there exist

a twosorted firstorder language , with sorts and , containing sorted copies of all symbols of ,

an theory ,
such that .
Lemma 3.6.
The class is universally axiomatisable in , the class is universally axiomatisable in and the class is universally axiomatisable in .
Proof.
We start with . By definition, is closed under isomorphism. We first show that is pseudoelementary, hence also closed under ultraproducts.
Consider a twosorted language, with an algebra sort and a base sort. The signature consists of a binary operation on the algebra sort, an algebrasorted constant and a binary predicate , written infix, of type . Consider the formulas
where are algebrasorted variables and is a basesorted variable.
These formulas merely state that the basesorted elements form the base of a representation of the non elements of algebra sort and that behaves as it should for an algebra in . Hence is the class of reducts of restrictions of models of the formulas to algebrasorted elements, that is, is pseudoelementary. Hence is closed under ultraproducts.
Since the only function symbol, , in our defining formulas is already in and there is no quantification of algebrasorted variables, is closed under substructures. A consequence of this is that is closed under ultraroots, by the simple observation that the diagonal map embeds any ultraroot into its ultrapower.
We now know that is closed under isomorphism, ultraproducts and ultraroots. This is a wellknown algebraic characterisation of elementarity (for example see [6, Theorem 6.1.16]). Then as is elementary and closed under substructures it is universally axiomatisable, by the ŁośTarski preservation theorem.
For and the same line of reasoning applies. Each is by definition closed under isomorphism. For we show pseudoelementarity and closure under substructures using the formulas
and for we do the same using the union of the formulas for and the formulas for . ∎
Proposition 3.7.
Let be a class of partial algebras of the signature , which we view as relational structures over the signature , where for each the arity of is one greater than that of . Suppose is universally axiomatisable in the language . Then is axiomatisable in the language .
Proof.
Let be a universal axiomatisation of in the language . Since it is the validity of all the formulas in that defines we may assume that each axiom in is quantifier free. We define a translation from to such that
(2) 
for any nonempty partial algebra of the signature and any quantifierfree formula .
Let be the finite set of variables occurring in and let be the set of subterms of . We may also write and to denote the set of all variables and subterms of the term . For any assignment and let denote the evaluation of under in . Let be any injective mapping from to our set of firstorder variables, mapping the term to the variable and satisfying for all . Let , so . A grounded subset satisfies
 \larger


for any
Informally, each grounded determines a partition of the subterms into ‘defined’ terms (when ) and ‘undefined’ terms (when ), in a way that is consistent with the structure of the terms.
For any subset define
where is a new variable. For any equation occurring in define
and then let be obtained from by replacing each equation by . Translate to the formula
We must prove (2). Suppose is not valid in , say is an assignment such that . Let satisfy for any provided (else is arbitrary—possible since is nonempty) and let . Then is grounded, and by formula induction we get for any subformula of . So and therefore is not valid in .
Conversely, suppose is not valid in , so there is a grounded subset and a variable assignment such that . As is nonempty we may extend to an assignment and we will have . Define by
Since and agrees with over we have
(3) 
We claim that
(4) 
for any subformula of . For the base case let be an equation . If then is and (4) holds, by (3). If but then is and so both sides of (4) are false. The case where but is similar. Finally, if then is and so both sides of (4) are true. Now (4) follows for all subformulas of , by a simple structural induction. Since we deduce that , so is not valid in . This completes the proof of (2).
If is nonempty, we have
So if the empty partial algebra is in then is an axiomatisation of . If the empty partial algebra is not in then is an axiomatisation of . ∎
Theorem 3.8.
Let be any one of the signatures , or