Transforming Geospatial Ontologies by Homomorphisms Xiuzhan Guo1,* , Wei Huang1 , Min Luo1 and Priya Rangarajan1 1 Chief Data Office, Royal Bank of Canada, 181 Bay St., Toronto, ON M5J 2V1, Canada Abstract In this paper, we study the geospatial ontologies that we are interested in together as a geospatial ontology system, consisting of a set of the geospatial ontologies and a set of geospatial ontology operations, without any internal details of the geospatial ontologies and their operations being needed, algebraically. A homomorphism between two geospatial ontology systems is a function between two sets of geospatial ontologies in the systems, which preserves the geospatial ontology operations. We view clustering a set of the ontologies as partitioning the set or defining an equivalence relation on the set or forming a quotient set of the set or obtaining the surjective image of the set. Each geospatial ontology system homomorphism can be factored as a surjective clustering to a quotient space, followed by an embedding. Geospatial ontology merging systems, natural partial orders on the systems, and geospatial ontology merging closures in the systems are then transformed under geospatial ontology system homomorphisms that are given by quotients and embeddings. Keywords Equivalence relation, quotient, surjection, injection, clustering, embedding, geospatial ontology, geospatial ontology merging system, homomorphism, natural partial order, merging closure 1. Introduction An ontology was considered as an explicit specification of a conceptualization that provides the ways of thinking about a domain [14]. Ontologies are the silver bullet for many applications, such as, database integration, peer to peer systems, e-commerce, etc. [13]. A geospatial ontology is an ontology that implements a set of geospatial entities in a hierarchical structure [7, 10, 27, 28]. In the age of artificial intelligence, geospatial data, from multiple platforms with many different types, not only is big, heterogeneous, connected, but also keeps changing continuously, which results in tremendous potential for dynamic relationships. Geospatial data, ontologies, and models must be robust enough to the dynamic changes. After mathematical operations, e.g., +, −, ×, and ÷, being introduced, natural numbers can be used not only to count but also to solve real life problems. The set of natural numbers, along with the operations, forms an algebraic system that can be studied by its properties without any internal details of the numbers and operation. These operations establish the relations among natural numbers, which make more sense than isolated natural numbers. Geospatial ontologies are not isolated but connected by their relations. For example, an ontology of Ontario climate data entities can be viewed as a directed subgraph of Canada digital twin knowledge graph, the data management ontology of Canada digital twin data is a super ontology of Ontario farm data ontology, etc. Geospatial ontologies can be aligned, matched, mapped, merged, and transformed and so they are linked by these operations. Relations between the ontologies, given by the operations, may make more sense than the single isolated ontologies. In this paper, we shall assume that the geospatial ontologies that we are interested in, can be viewed as a set of entities and their relations that carry certain algebraic structures and make more Workshop on Geospatial Ontologies 2023: 9th Joint Ontology Workshops (JOWO 2023), co-located with FOIS 2023, 19-20 July, 2023, Sherbrooke, Québec, Canada * Corresponding author: xiuzhan@gmail.com © 2023 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org) 1 CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings sense. We shall collect the ontologies together as a set G, along with a set 𝑃 of their operations that give rise to their relations, called a geospatial ontology system (G, 𝑃 ). Recall that a directed graph, the mathematical concept to model entities and their pairwise relations, consists of a set of nodes (or vertices) and a set of edges (or arrows), given by an ordered pair of nodes. It has been shown that relations can be queried, updated, computed, analyzed, and visualized efficiently and provide the robustness to the models in a graph setting. A geospatial ontology, viewed as a set of geospatial ontologies and their relations, can be represented as a knowledge graph so that it, along with knowledge graph computing capabilities, provides an efficient setting to align, integrate, transform, update, query, compute, analyze, and visualize the geospatial ontologies. However, due to its complexity and size, the geospatial data is unlikely to be entirely modeled by one single ontology or knowledge graph. To tackle such a big dynamic data or ontology, we group or summarize it at multiple layers or dimensions. In Sets, grouping objects (elements) amounts to clustering or partitioning them, which turns out to be equivalent to an equivalence relation that produces a quotient set, a surjective function, and an injective function, where injection (sub object) and surjection (quotient object) are the dual concepts. Each function can factor through a quotient set, followed by an injection (embedding). In this paper, we shall introduce equivalence relation, quotient, embedding to geospatial ontology systems, study how geospatial ontologies are transformed under geospatial ontology system homomorphisms, each of which can be viewed as a quotient surjection, followed by an embedding. Ontologies and ontology operations, e.g., aligning and merging, are studied and implemented exten- sively in different settings, such as, categorical operations [1, 4, 8, 9, 17, 18, 23, 31], relation algebras [12], typed graph grammars [21]. In this paper, we shall group the geospatial ontologies and their operations without any internal details of the ontologies and the operations being needed in any specific setting but we shall utilize the generic algebraic properties they share, to study the geospatial ontologies algebraically. The paper proceeds as follows: First, in Section 2, we recall the basic notions and notations of a binary relation in Sets, such as, an equivalence relation, a partition, a quotient set, a projection, a kernel, an embedding, etc. In Section 3, we consider the geospatial ontologies that we are interested in, collectively as a set and cluster or partition them as a quotient set, which will also produce a surjective homomorphism. In Section 4, we model the set of geospatial ontologies and their operations as a geospatial ontology system. A homomorphism between geospatial ontology systems, a function between the systems preserving the operations, is factored through the quotient geospatial ontology system, followed by an embedding. In [15], Guo et al. introduced ontology merging systems, the natural partial order on the systems, and the merging closure of an ontology repository and studied the properties shared algebraically without any internal details. In Sections 5, 6, and 7, we transform the geospatial ontology merging systems, the natural partial order on the systems, and the merging closure of a geospatial ontology repository using geospatial ontology merging system homomorphisms that amount to quotients and embeddings, respectively. Finally, we complete the paper with our concluding remarks in Section 8. 2. Preliminaries In this section, we recall the basic notations, concepts, and results of binary relations, equivalence relations, partitions, and quotients on a nonempty set or a directed graph. Given a nonempty set 𝑆, a binary relation on 𝑆 is a subset 𝜌 ⊆ 𝑆×𝑆, where 𝑆×𝑆 = {(𝑠1 , 𝑠2 ) | 𝑠1 , 𝑠2 ∈ 2 𝑆} is the Cartesian product of 𝑆 and 𝑆. The inverse relation of 𝜌 is the relation def 𝜌−1 = {(𝑠2 , 𝑠1 ) | (𝑠1 , 𝑠2 ) ∈ 𝜌} ⊆ 𝑆 × 𝑆. If 𝜌 and 𝜎 are two binary relations on 𝑆, def 𝜌𝜎 = {(𝑠1 , 𝑠3 ) | (𝑠1 , 𝑠2 ) ∈ 𝜌, (𝑠2 , 𝑠3 ) ∈ 𝜎} ⊆ 𝑆 × 𝑆. A binary relation 𝜌 on 𝑆 is called reflexive if (𝑠, 𝑠) ∈ 𝜌 for all 𝑠 ∈ 𝑆, symmetric if 𝜌−1 = 𝜌, and transitive if 𝜌𝜌 = 𝜌. An equivalence relation on 𝑆 is a reflexive, symmetric, and transitive binary relation on 𝑆. Clearly, ∆𝑆 = {(𝑠, 𝑠) | 𝑠 ∈ 𝑆} and 𝑆 × 𝑆 are equivalence relations on 𝑆. For a binary relation 𝜑 on 𝑆, the transitive closure 𝜑𝑡 of 𝜑 is the smallest binary relation on 𝑆, which contains 𝜑 and is transitive. Since 𝑆 × 𝑆 is transitive and contains 𝜑, 𝜑𝑡 always exists and 𝜑𝑡 = ∪+∞ 𝑖=1 𝜑 , 𝑖 which can be computed efficiently when |𝑆| < +∞. A function 𝑓 : 𝑆 → 𝑇 is an injection or a monomorphism if for all set 𝑋 and functions 𝑔1 , 𝑔2 : 𝑋 → 𝑆, 𝑓 𝑔1 = 𝑓 𝑔2 implies 𝑔1 = 𝑔2 . The dual concept of an injection (a monomorphism) is a surjection (an epimorphism). Let 𝑓 : 𝑆 → 𝑇 be a function and let 𝜅𝑓 ⊆ 𝑆 × 𝑆 be such that (𝑠1 , 𝑠2 ) ∈ 𝜅𝑓 if and only if 𝑓 (𝑠1 ) = 𝑓 (𝑠2 ). Then 𝜅𝑓 is an equivalence relation on 𝑆, called the kernel of 𝑓 . If 𝜌 and 𝜎 are equivalence relations on 𝑆 and 𝑇 , respectively, then the image of 𝜌 under 𝑓 : def 𝑓 𝜌 = {(𝑓 (𝑠1 ), 𝑓 (𝑠2 )) | (𝑠1 , 𝑠2 ) ∈ 𝜌} and the inverse image of 𝜎 under 𝑓 : def 𝑓 −1 𝜎 = {(𝑠1 , 𝑠2 ) ∈ 𝑆 × 𝑆 | (𝑓 (𝑠1 ), 𝑓 (𝑠2 )) ∈ 𝜎} are equivalence relations on 𝑓 (𝑆) and 𝑆, respectively. Obviously, 𝜅𝑓 = 𝑓 −1 (∆𝑇 ). A partition of 𝑆 is a set 𝒫𝑆 of subsets 𝑆𝑖 ⊆ 𝑆 such that each 𝑆𝑖 ̸= ∅, 𝑆𝑖 ∩ 𝑆𝑗 = ∅ for all distinct 𝑆𝑖 , 𝑆𝑗 ∈ 𝒫𝑆 , and 𝑆 = ∪𝑆𝑖 ∈𝒫𝑆 𝑆𝑖 . Given an equivalence relation 𝜌 on 𝑆 and 𝑠 ∈ 𝑆, the subset [𝑠]𝜌 = {𝑎 | 𝑎 ∈ 𝑆, (𝑠, 𝑎) ∈ 𝜌} is called the equivalence class of 𝑠 with respect to 𝜌. Each equivalence relation 𝜌 on 𝑆 partitions 𝑆 into the set of all equivalence classes with respect to 𝜌, called the quotient set or quotient of 𝑆 with respect to 𝜌, denoted by 𝑆/𝜌. Conversely, each partition 𝒫𝑆 of 𝑆 gives rise to an equivalence relation 𝜌𝒫𝑆 , whose quotient set is 𝒫𝑆 , where (𝑠1 , 𝑠2 ) ∈ 𝜌𝒫𝑆 if and only if there is 𝑆𝑖 ∈ 𝒫𝑆 such that (𝑠1 , 𝑠2 ) ∈ 𝑆𝑖 × 𝑆𝑖 . There is a canonical projection 𝜋𝜌 : 𝑆 → 𝑆/𝜌, sending 𝑠 to its equivalence class [𝑠]𝜌 , which is surjective. Obviously, 𝑆/∆𝑆 = 𝑆 and 𝑆/(𝑆 × 𝑆) = {𝑆}. Equivalence relations, partitions, quotients, and surjective images are equivalent in Sets and so they are interpreting the same thing. Therefore, the results of the operations on equivalence relations (e.g., in [2]) can be mapped to clusters, partitions, quotients, and surjective images. Proposition 2.1. Given a nonempty set 𝑆, the set E𝑆 of all equivalence relations on 𝑆, the set P𝑆 of all partitions of 𝑆, the set Q𝑆 of all quotients of 𝑆, and the set I𝑆 of all surjective images of 𝑆 are isomorphic in Sets, namely, there exist the bijections between them. 3 All equivalence relations (partitions or quotients) on 𝑆 form a complete lattice. Proposition 2.2. Let 𝑆 be a nonempty set. 1. The set E𝑆 of all equivalence relations on 𝑆 forms a complete lattice with ∧𝑖∈𝐼 𝜌𝑖 = ∩𝑖∈𝐼 𝜌𝑖 , ∨𝑖∈𝐼 𝜌𝑖 = (∪𝑖∈𝐼 𝜌𝑖 )𝑡 , the greatest element 𝑆 × 𝑆, and the least element ∆𝑆 , where 𝜌𝑖 ∈ E𝑆 , 𝑖 ∈ 𝐼 and (𝑋)𝑡 is the transitive closure of the subset 𝑋 ⊆ 𝑆; 2. Given 𝜌, 𝜎 ∈ E𝑆 , if 𝜌 ⊆ 𝜎, then there is a unique surjective function (𝜌 ≤ 𝜎)* : 𝑆/𝜌 → 𝑆/𝜎, sending [𝑠]𝜌 to [𝑠]𝜎 , such that 𝑆 𝜋𝜌 𝜋𝜎 ↙ (𝜌≤𝜎)* ↘ 𝑆/𝜌 → 𝑆/𝜎 commutes. Each quotient set (object) 𝑆/𝜌 gives rise to a surjection 𝜋𝜌 : 𝑆 → 𝑆/𝜌 and conversely, each surjection 𝑓 : 𝑆 → 𝑇 generates a quotient set (object) 𝑆/𝜅𝑓 ( ∼ = 𝑓 (𝑆) = 𝑇 ). A quotient object can be characterized by a surjection while a sub object is characterized by an injection. Hence a quotient object and a sub object (an embedding) are the dual concepts as a surjection and an injection are dual in Sets. Each function 𝑓 : 𝑆 → 𝑇 factors through the quotient set 𝑆/𝜅𝑓 , followed by an injection 𝑓̃︀ : 𝑆/𝜅𝑓 → 𝑇 , sending [𝑠]𝜅𝑓 to 𝑓 (𝑠). Hence, combining with Proposition 2.2.2, one has: Proposition 2.3. Given a nonempty set 𝑆, 𝜌 ∈ E𝑆 , and a function 𝑓 : 𝑆 → 𝑇 , if 𝜌 ⊆ 𝜅𝑓 , then there are a unique injection 𝑓̃︀ : 𝑆/𝜅𝑓 → 𝑇 and a unique surjection (𝜌 ≤ 𝜅𝑓 )* : 𝑆/𝜌 → 𝑆/𝜅𝑓 such that 𝑓 𝑆 →𝑇 ↗ 𝜋𝜌 𝜋 𝜅𝑓 ↙ (𝜌≤𝜅𝑓 )* ↘ 𝑓̃︀ 𝑆/𝜌 → 𝑆/𝜅𝑓 commutes. Each function 𝑓 : 𝑆 → 𝑇 is lifted to 𝑓̃︀ : 𝑆/𝜌 → 𝑇 /𝜎 when 𝑓 𝜌 can be embedded to 𝜎. Proposition 2.4. Given a nonempty set 𝑆, a function 𝑓 : 𝑆 → 𝑇 , 𝜌 ∈ E𝑆 , and 𝜎 ∈ E𝑇 , if 𝑓 𝜌 ⊆ 𝜎, then there is a unique function 𝑓̃︀ : 𝑆/𝜌 → 𝑇 /𝜎, sending [𝑠]𝜌 to [𝑓 (𝑠)]𝜎 , such that 𝑓 𝑆 →𝑇 𝜋𝜌 𝜋𝜎 ↓ 𝑓̃︀ ↓ 𝑆/𝜌 → 𝑇 /𝜎 commutes. If 𝑓 is surjective and so is 𝑓̃︀. Since 𝑓 𝑓 −1 𝜎 ⊆ 𝜎, by Proposition 2.4 one has: Corollary 2.5. Let 𝑓 : 𝑆 → 𝑇 be a function, 𝜌 ∈ E𝑆 , and 𝜎 ∈ E𝑇 . Then there are a unique surjection 𝑓̃︀ : 𝑆/𝜌 → 𝑓 (𝑆)/𝑓 𝜌 and a unique function 𝑓 * : 𝑆/𝑓 −1 𝜎 → 𝑇 /𝜎 such that 𝑓 𝑆 → 𝑓 (𝑆) 𝜋𝜌 𝜋𝑓 (𝜌) ↓ 𝑓̃︀ ↓ 𝑆/𝜌 → 𝑓 (𝑆)/𝑓 𝜌 4 and 𝑓 𝑆 →𝑇 𝜋𝑓 −1 𝜎 𝜋𝜎 ↓ 𝑓* ↓ 𝑆/𝑓 −1 𝜎 → 𝑇 /𝜎 commute. Let 𝜌 be an equivalence relation and ∼ a binary relation on 𝑆. ∼ is compatible with 𝜌 (or ∼ is invariant under 𝜌) if and only if 𝑠1 ∼ 𝑠2 implies [𝑠1 ]𝜌 ∼𝜌 [𝑠2 ]𝜌 . That is, ∼𝜌 is a well-defined binary relation on 𝑆/𝜌, where ∼𝜌 is the relation on 𝑆/𝜌 by mapping ∼ from 𝑆 to 𝑆/𝜌: [𝑠1 ]𝜌 ∼𝜌 [𝑠2 ]𝜌 in 𝑆/𝜌 if and only if 𝑠1 ∼ 𝑠2 in 𝑆. Given a binary operation ∘ on 𝑆, ∘ is compatible with 𝜌 if and only if 𝜌 is a congruence equivalence relation on 𝑆 with respect to ∘, namely, [𝑠1 ]𝜌 ∘𝜌 [𝑠2 ]𝜌 = [𝑠1 ∘ 𝑠2 ]𝜌 is well defined. If ∘ is not compatible with 𝜌, then the congruence (compatible) closure 𝜌𝑐 of 𝜌 for ∘ is the smallest equivalence relation 𝜚 such that 𝜌 ⊆ 𝜚 and ∘ is compatible with 𝜚. 𝜌𝑐 exists and is unique since ∘ is always compatible with 𝑆 × 𝑆. Recall that a directed graph is an ordered pair 𝐺 = (𝑉𝐺 , 𝐸𝐺 ), where 𝑉𝐺 is a set of vertices (or nodes), and 𝐸𝐺 ⊆ {(𝑥, 𝑦) | (𝑥, 𝑦) ∈ 𝑉𝐺 × 𝑉𝐺 and 𝑥 ̸= 𝑦} is a set of edges (or arrows or arcs). A quotient graph 𝐺/𝑅 of 𝐺 is a directed graph whose vertices are blocks of a partition of the vertices 𝑉𝐺 , where there is an edge of 𝐺/𝑅 from block 𝐵 to block 𝐶 if there is an edge from some vertex in 𝐵 to some vertex in 𝐶 from 𝐸𝐺 . That is, if 𝑅 is the equivalence relation induced by the partition of 𝑉𝐺 , then the quotient graph 𝐺/𝑅 has vertex set 𝑉𝐺 /𝑅 and edge set {([𝑢]𝑅 , [𝑣]𝑅 ) | (𝑢, 𝑣) ∈ 𝐸𝐺 }. Proposition 2.6. 1. Given a directed graph 𝐺, the set of all equivalence relations of 𝐺𝑉 , the set of all partitions of 𝑉𝐺 , the set of all quotient graphs of 𝐺, and the set of all graph homomorphic images of 𝐺, are isomorphic. 2. Every directed graph homomorphism ℎ : 𝐺 → 𝐻 can be factored as ℎ = 𝑖𝜋, where 𝜋 : 𝐺 → 𝐺/𝜅ℎ is a surjective directed graph homomorphism and 𝑖 : 𝐺/𝜅ℎ → 𝐻 is an injective directed graph homomorphism: 𝐺 ℎ →𝐻 ↗ 𝜋 ↘ 𝑖 𝐺/𝜅ℎ 3. Geospatial Ontologies, Clustering, and Quotients In this section, we group geospatial ontologies together and discuss clustering and quotienting operations in geospatial ontology setting. Recall that a geospatial ontology is an ontology that has a set of geospatial entities in a hierarchical structure [7, 10, 27, 28]. Geospatial ontologies are not isolated but connected by their relations. Numbers are linked by their operations (e.g., +, −, ×, ÷) so that they are used to solve real life problems. Geospatial ontologies can be aligned, matched, mapped, merged, and transformed and they are linked by these operations. Relations between numbers (geospatial ontologies), given by operations, make more sense than single numbers (geospatial ontologies). Hence we study the ontologies we are interested in together as a set collectively, e.g., the geospatial data ontologies in [27], the sub set of the objects of the category Ont+ of the ontologies defined in [31], or the ontology structures considered in [4]. Here are some examples of sets of the connected geospatial ontologies. 5 Example 3.1. 1. In [27], Sun et al. defined GeoDataOnt = {(𝐸, 𝑅(𝐸𝑖 ,𝐸𝑗 ) ) | 𝐸𝑖 , 𝐸𝑗 ∈ 𝐸, 0 ≤ 𝑖, 𝑗 ≤ |𝐸|}, where 𝐸 is the set of geographic entities concerned and 𝑅 the set of relations between the entities from 𝐸. Clearly, GeoDataOnt can be represented as a directed graph with geospatial entities as nodes and their relations as edges. Since these geospatial ontologies (directed graphs) are connected and share certain geospatial properties, we collect them together as a set Gd. 2. Assume that there is a climate data repository, which collects the climate data from a number of data silos and covers a variety of climate domain application areas, e.g., location, weather condition, climate hazard, wildfire, air quality, events, etc., each of which is managed by a geospatial ontology. We group these geospatial ontologies as a set, denoted by Cd. Here is a directed subgraph, showing the relations between some objects in Cd, e.g., temperature ontology and location ontology, from both English and France systems at a time point. Quebec City Ville de Québec -34.06 -36.7 ∘ C 22/01/22:07:35 Jan 22, 2022 Entity resolution tools match Quebec City with Ville de Québec and merge their records together, with the existing relations (their neighborhoods in the knowledge graphs) being preserved, to obtain the standardized record with the maximal information. Generally, clustering aims to group a set of the objects in such a way that objects in the same cluster (group) are more similar to each other. There exist a number of the approaches to clustering. The interested reader may consult [30] for a comprehensive survey of clustering approaches. Geospatial ontology clustering can facilitate a better understanding and improve the reusability of the ontologies at the different summarization granularities [19, 25]. If a similarity approach is applied to the climate ontologies from Cd in Example 3.1.2 above, then the clusters are: {Quebec City, Ville de Québec}, {−36.7∘ 𝐶, −34.06}, {Jan 22, 2022, 22/01/22:07:35}. If a geospatial ontology 𝐺 is represented as a set of entities and their relations, which is a directed graph and 𝜌 is an equivalence relation on the set of entities, then we have the quotient geospatial ontology 𝐺/𝜌 by quotienting the directed graph and so the results of Proposition 2.6 can be mapped to the quotient geospatial ontology 𝐺/𝜌. For a set O of the ontologies, a clustering algorithm may produce a partition of O, which is equivalent to a quotient set or a surjective image of O. Hence, by Propositions 2.1 and 2.2, we have: Proposition 3.2. Given a nonempty set O of geospatial ontologies, the set EO of all equivalence relations of O, the set PO of all partitions of O, the set QO of all quotients of O, and the set IO of all surjective images of O are isomorphic and form a complete lattice. 6 Hence clustering a set O of the ontologies can be interpreted as partitioning O or defining an equivalence relation on O or forming a quotient of O or finding a surjective image of O. The results of clustering O at the different summarization granularities are linked by the complete lattice in Proposition 2.2. Using entity resolution tools to group Cd in Example 3.1.2 above, amounts to: • clustering Cd by their similarities, e.g., {-36.7 ∘ C, -34.06}, {Jan 22, 2022, 22/01/22:07:35}, • forming a quotient by identifying the similar objects from Cd in each cluster, e.g., Quebec City = Ville de Québec, and -36.7 ∘ C = -34.06 ∘ F, • taking the surjective image of Cd by mapping the similar ontologies in each cluster to the merged ontology, e.g., {Jan 22, 2022, 22/01/22:07:35} to Jan 22, 2022, 07:35 am, • defining the equivalence relation 𝜌 on Cd by the clusters, e.g., (Quebec City, Ville de Québec), (−36.7 ∘ C, −34.06 ∘ F) ∈ 𝜌. 4. Geospatial Ontology System Homomorphisms and Embeddings The word homomorphism, from Greek homoios morphe, means "similar for". In an algebra, e.g., groups, semigroups, rings, a homomorphism is a map that preserves the algebra operation(s). In [4] Cafezeiro and Haeusler defined an ontology homomorphism between ontology structures introduced in [20], as a pair of functions (𝑓, 𝑔), where 𝑓 is a function between the concepts and 𝑔 a function between relations, which preserve the ontology structures. Geospatial ontologies carry some structures and can be viewed as a set of entities and their relations, as assumed. Given two geospatial ontologies 𝑂1 and 𝑂2 , a geospatial ontology homomorphism 𝑓 : 𝑂1 → 𝑂2 is a function that preserves the ontology structures. For example, given a geospatial ontology 𝐺 and 𝜌 is an equivalence relation on the set of the entities in 𝐺, we have a canonical geospatial ontology homomorphism 𝜋 : 𝐺 → 𝐺/𝜌. In this section, we move to the second layer: geospatial ontology systems and homomorphisms between them. After collecting the geospatial ontologies into a set, we need to introduce their relations by a set of operations and form a greospatial ontology system. Definition 4.1. A geospatial ontology system (O, 𝑃 ) consists of a set O of geospatial ontologies and a (finite) set 𝑃 of geospatial ontology operations. A geospatial ontology system homomorphism ℎ : (O, 𝑃 ) → (P, 𝑄) is a function ℎ : O → P that preserves all operations in 𝑃 to 𝑄. Guo et al. [15] studied the ontologies and their operations (aligning and merging) together within the partial groupoid or semigroup using the properties the operations share without any ontology internal details being needed. They defined an ontology merging system as follows. Let O be the non-empty set of the ontologies concerned, ∼ a binary relation on O that models a generic ontology alignment relation, and ! a partial binary operation on O that models a merging operation defined on alignment pairs: For all 𝑂1 , 𝑂2 ∈ O, 𝑂1 ! 𝑂2 exists if 𝑂1 ∼ 𝑂2 and 𝑂1 ! 𝑂2 is undefined, denoted by 𝑂1 ! 𝑂2 = ↑, otherwise. (O, ∼, !) forms an ontology merging system [15]. Similarly, we define a geospatial merging system (G, ∼, !) to be a geospatial system (G, 𝑃 ) with 𝑃 = {∼, !}. Let (O, ∼, !) and (P, ≈, ≬) be two geospatial ontology merging systems. A geospatial ontology 7 merging system homomorphism 𝑓 : (O, ∼, !) → (P, ≈, ≬) is a function 𝑓 : O → P such that 𝑓 ×𝑓 𝑑! →𝑑 ≬ ! ≬ ↓ 𝑓 ↓ O →P commutes, where 𝑑! (𝑑≬ ) is the domain of ! (≬), specified by ∼ (≈). That is, for all 𝑂1 , 𝑂2 ∈ O if 𝑂1 ! 𝑂2 is defined then 𝑓 (𝑂1 ) ≬ 𝑓 (𝑂2 ) is defined and 𝑓 (𝑂1 ! 𝑂2 ) = 𝑓 (𝑂1 ) ≬ 𝑓 (𝑂2 ). In mathematics, an embedding in a mathematical structure (e.g., semigroup, group, ring) is a sub- mathematical structure (e.g., sub-semigroup, sub-group, sub-ring). An object 𝐸 is embedded in another object 𝑂 if there is an injective structure-preserving map 𝑒 : 𝐸 → 𝑂 and 𝑒 is an embedding of 𝑂. Embeddings and surjections that preserve the structures are dual. Ontology embeddings aim to map ontologies from a high dimension space to a much lower dimension space with certain ontology structures being preserved. Ontology embeddings were studied extensively, e.g., [5, 6, 16, 10]. Word embeddings and graph embeddings were employed in the approaches widely [5, 6, 16, 29]. A word feature vector or word embedding is a function that converts words into points in a vec- tor space. Word embeddings are usually injective functions (i.e. two words do not share the same word embedding), and highlight not-so-evident features of words. Hence, one usually says that word embeddings are an alternative representation of words [3, 26]. Word2vec is a popular model that generates vector expressions for words. Since it was proposed in 2013 [24], embedding technology has been extended from natural language processing to other fields, such as, graph embedding, ontology embedding [5, 6, 10, 11, 16], etc. However, geospatial ontology systems may carry many structures and can be very complex. These embeddings may fail to capture a lot of important properties, e.g., hierarchy, closedness, completeness, insights in a logic sentence etc. [10, 22]. The embeddings may not be injective. But in this case, the injective one can be obtained by factoring the original one through its quotient using the kernel. On the other hand, injective transformers, e.g., shaving one’s beard with a mirror, can change working or computing environments but cannot reduce the difficulty of the problem one tries to solve in general. 5. Transforming Geospatial Ontology Merging Systems Given a geospatial ontology merging system (O, ∼, !) and an equivalence relation 𝜌 on O, we have a quotient set O/𝜌. If both ∼ and ! are compatible with 𝜌, then we have (O/𝜌, ∼𝜌 , !𝜌 ), called a quotient ontology merging system, where ∼𝜌 is the equivalence relation on O/𝜌, given by [𝑠1 ]𝜌 ∼ [𝑠2 ]𝜌 if and only if 𝑠1 ∼ 𝑠2 , and [𝑠1 ]𝜌 !𝜌 [𝑠2 ]𝜌 = [𝑠1 ! 𝑠2 ]𝜌 . It is routine to verify that both ∼𝜌 and !𝜌 are well-defined. In this section, we study how geospatial ontology merging systems are transformed by quotienting. As in Propositions 2.3 and 2.4, and Corollary 2.5, we have the following Propositions 5.1, 5.2, and 5.3, and Corollary 5.4, on quotient ontology merging systems. Proposition 5.1. Given a geospatial ontology merging system (O, ∼, !) and 𝜌 ∈ EO , if ∼ and ! are compatible with both 𝜌, then (O/𝜌, ∼𝜌 , !𝜌 ) is a geospatial ontology system and 𝜋𝜌 : (O, ∼, !) → (O/𝜌, ∼𝜌 , !𝜌 ), sending 𝑂 to [𝑂]𝜌 , is a geospatial ontology merging system homomorphism. 8 Each geospatial ontology merging system homomorphism is factored through the quotient geospatial ontology merging system. Proposition 5.2. Let ℎ : (O, ∼, !) → (P, ≈, ≬) be a geospatial ontology merging system homomorphism and 𝜌 ∈ EO . If 𝜌 ⊆ 𝜅ℎ , then there are a unique injective homomorphism (embedding) ℎ : (O/𝜅ℎ , ∼𝜅ℎ , !𝜅ℎ )/ → (P, ≈, ≬) ̃︀ and an unique surjection (𝜌 ≤ 𝜅ℎ )* : O/𝜌 → O/𝜅ℎ such that (O, ∼, !) ℎ → (P, ≈, ≬) → 𝜋𝜌 𝜋 𝜅ℎ ← (𝜌≤𝜅ℎ )* → ℎ ̃︀ (O/𝜌, ∼𝜌 , !𝜌 ) → (O/𝜅ℎ , ∼𝜅 , !𝜅 ) ℎ ℎ commutes. Each geospatial ontology merging system homomorphism can be lifted to the quotient geospatial ontology merging systems. Proposition 5.3. Let ℎ : (O, ∼, !) → (P, ≈, ≬) be a geospatial ontology merging system homomor- phism, 𝜌 ∈ EO , and 𝜎 ∈ EP . If ℎ(𝜌) ⊆ 𝜎, then there is a unique geospatial ontology merging system homomorphism ℎ : (O/𝜌, ∼𝜌 , !𝜌 ) → (P/𝜎, ≈𝜎 , ≬𝜎 ), ̃︀ sending [𝑠]𝜌 to [ℎ(𝑠)]𝜎 , such that (O, ∼, !) ℎ → (P, ≈, ≬) 𝜋𝜌 𝜋𝜎 ↓ ↓ (O/𝜌, ∼𝜌 , !𝜌 ) ℎ → (P/𝜎, ≈𝜎 , ≬𝜎 ) ̃︀ commutes. If ℎ is a surjection and so is ̃︀ ℎ. There are also the image and inverse image cases of an equivalence relation on a geospatial ontology merging system. Corollary 5.4. Let ℎ : (O, ∼, !) → (P, ≈, ≬) be a geospatial ontology merging system homomorphism, 𝜌 ∈ EO , and 𝜎 ∈ EP . Then there are unique geospatial ontology merging system homomorphisms ℎ : (O/𝜌, ∼𝜌 , !𝜌 ) → (ℎ(O), ∼ℎ𝜌 , !ℎ𝜌 ) ̃︀ and ℎ* : (O/ℎ−1 𝜎, ∼ℎ−1 𝜎 , !ℎ−1 𝜎 ) → (P/𝜎, ≈𝜎 , ≬𝜎 ) such that (O, ∼, !) ℎ → (ℎ(O), ≈, ≬) 𝜋𝜌 𝜋ℎ𝜌 ↓ ↓ (O/𝜌, ∼𝜌 , !𝜌 ) ℎ → (ℎ(O)/ℎ𝜌, ≈ℎ𝜌 , ≬ℎ𝜌 ) ̃︀ 9 and (O, ∼, !) ℎ → (P, ≈, ≬) 𝜋ℎ−1 𝜎 𝜋𝜎 ↓ ↓ ℎ* → (P/𝜎, ≈𝜎 , ≬𝜎 ) (O/ℎ−1 𝜎, ∼ℎ−1 𝜎 , !ℎ−1 𝜎 ) commute. Hence geospatial ontology aligning and merging operations behave like binary relations in Sets. 6. Transforming Natural Partial Orders Given a geospatial ontology merging system (O, ∼, !), ! aims to obtain more information by combin- ing the aligned geospatial ontologies together. In [15], the natural ontology partial order 𝑂1 ≤! 𝑂2 was defined if merging 𝑂1 to 𝑂2 does not yield the more information than 𝑂2 . In this section, we introduce the natural partial order to a geospatial ontology merging system (O, ∼, !) and show that the natural partial order can be mapped to the quotient of (O, ∼, !). Definition 6.1. For all 𝑂1 , 𝑂2 ∈ O, 𝑂1 ≤! 𝑂2 if and only if 𝑂1 ∼ 𝑂2 , 𝑂2 ∼ 𝑂1 , and 𝑂1 ! 𝑂2 = 𝑂2 ! 𝑂1 = 𝑂2 . In [15], it was shown that (O, ≤! ) is a partially ordered set (poset), namely, ≤! is a reflexive, antisymmetric, and transitive binary relation on O, if (I) and (CA), defined in Proposition 6.2 below, are satisfied. Proposition 6.2. If geospatial ontology merging system (O, ∼, !) satisfies • for all 𝑂 ∈ O, 𝑂 ∼ 𝑂 and 𝑂 ! 𝑂 = 𝑂 (I) • for all 𝑂1 , 𝑂2 , 𝑂3 ∈ O such that 𝑂1 ! 𝑂2 and 𝑂2 ! 𝑂3 exist, (𝑂1 ! 𝑂2 ) ! 𝑂3 = 𝑂1 ! (𝑂2 ! 𝑂3 ) ̸= ↑, (CA) then ≤! is a partial order on O and so (O, ≤! ) is a poset. Proof. It is routine to verify by the same proof process of Proposition 3.2 [15]. □ The natural partial order ≤! is mapped to the quotient space shown in Proposition 6.3 below. Proposition 6.3. Let (O, ∼, !) be a geospatial ontology merging system and 𝜌 ∈ EO such that both ∼ and ! are compatible with 𝜌. If (O, ∼, !) satisfies (I) and (CA), so does (O/𝜌, ∼𝜌 , !𝜌 ) and (O/𝜌, ≤!𝜌 ) is a poset. Proof. By Proposition 5.1, (O/𝜌, ∼𝜌 , !𝜌 ) is a geospatial ontology merging system. Since 𝜋𝜌 : (O, ∼ , !) → (O/𝜌, ∼𝜌 , !𝜌 ) is a geospatial ontology merging system homomorphism and (I) and (CA) are preserved under geospatial ontology merging system homomorphisms, (O/𝜌, ∼𝜌 , !𝜌 ) satisfies (I) and (CA). Hence (O/𝜌, ≤!𝜌 ) is a poset. □ Since ≤! is natural, namely, it is defined by !, each geospatial ontology merging system homomor- phism gives rise to a poset homomorphism: 10 Proposition 6.4. Given a geospatial ontology merging system homomorphism ℎ : (O, ∼, !) → (P, ≈, ≬), 𝜌 ∈ EO , and 𝜎 ∈ EO , if ℎ(𝜌) ⊆ 𝜎, then there is a unique poset homomorphism ℎ : (O/𝜌, ≤!𝜌 ) → (P/𝜎, ≤≬𝜎 ), ̃︀ sending [𝑂]𝜌 to [ℎ(𝑂)]𝜎 , such that O ℎ →P 𝜋𝜌 𝜋𝜎 ↓ ↓ (O/𝜌, ≤!𝜌 ) ℎ → (P/𝜎, ≤ ) ̃︀ ≬𝜎 commutes. If ℎ is a surjection and so is ̃︀ ℎ. A partial order on a geospatial ontology merging system (O, ∼, !), where ∼ is reflexive and commu- tative, must be the natural partial order ≤! if merges give the least upper bounds and ∼ is compatible with !, shown in [15] (See Theorem 3.3 in [15] for the detail). 7. Transforming Geospatial Ontology Merging Closures A geospatial ontology repository or instance in a geospatial ontology merging system (O, ∼, !) is a finite set O ⊆ O. In [15], Guo et al. introduced the merging closure of O and showed that the merging closure of a repository is a finite poset if some reasonable conditions are satisfied (Theorem 4.3 [15]). In this section, we introduce geospatial ontology merging closure and show the interactions between the closure operator and quotienting. Definition 7.1. Given a geospatial repository O ⊆ O, the merging closure of O, denoted by O, ̂︀ is the smallest set P ⊆ O such that 1. O ⊆ P, 2. P is closed with respect to merging: for all 𝑂1 , 𝑂2 ∈ P such that 𝑂1 ∼ 𝑂2 , 𝑂1 ! 𝑂2 ∈ P. By the same process of Theorem 4.2 [15], O ̂︀ exists and is unique. Proposition 7.2. Given a geospatial repository O ⊆ O, the merging closure O ̂︀ exists and it is unique. The merging closure operation (̂︁) can be transformed to the quotient space and is commutative with the quotient operation /. Proposition 7.3. Given a geospatial ontology merging system (O, ∼, !) and an equivalence relation 𝜌, if ∼ and ! are compatible with 𝜌, then [O] ̂︂𝜌 = [O] ̂︀ 𝜌 . Proof. Since O ⊆ O, ̂︀ clearly [O]𝜌 ⊆ [O] ̂︀ 𝜌 . For all [𝑂1 ]𝜌 , [𝑂2 ]𝜌 ∈ [O], ̂︀ where 𝑂1 , 𝑂2 ∈ O, ̂︀ [𝑂1 ]𝜌 !𝜌 [𝑂2 ]𝜌 = [𝑂1 ! 𝑂2 ]𝜌 ∈ [O] ̂︀ 𝜌 . Hence [O] ̂︀ 𝜌 is closed with respect to !𝜌 . For each P ⊇ [O]𝜌 such that P is closed with respect to !𝜌 , ̂︀ 𝜌 ⊆ [̂︂ [O] ̂︀ 𝜌 ⊆ P O] ̂︀ = P. Then O ̂︀ 𝜌 as O ̂︀ = [𝑂] ̂︀ is the smallest set, containing [O]𝜌 and closed with respect to !𝜌 . □ Combining Proposition 7.3 with the finiteness result (Theorem 4.3) in [15], we have: 11 Corollary 7.4. Given a geospatial ontology merging system (O, ∼, !), 𝜌 ∈ EO , and a repository O ⊆ O if ∼ and ! are compatible with 𝜌 and each cluster (equivalence class) produced by 𝜌 is finite, then O ̂︀ is finite if and only if [O] ̂︂𝜌 is finite. 8. Conclusions Relations between geospatial ontologies make more sense than isolated geospatial ontologies. Geospatial ontology operations provide the relations between these ontologies. We studied the geospatial ontologies that we are interested in, together as a geospatial ontology system algebraically, which consists of a set G of the ontologies and a set 𝑃 of geospatial ontology operations, without any internal details of the ontologies and the operations being needed. A homomorphism between two geospatial ontology systems is a function between two sets of geospatial ontologies, which preserves the geospatial ontology operations. Clustering a set of the ontologies was interpreted as partitioning the set or defining an equivalence relation on the set or forming the quotient of the set or obtaining the surjective image of the set. Clustering (Quotienting) and embedding can be utilized at multiple layers, e.g., geospatial ontology layer and geospatial ontology system layer. The results at the different layers behave like a complete lattice. Each geospatial ontology system homomorphism was factored as a surjective clustering to a quotient space, followed by an embedding. Clustering and embedding are the dual concepts in general. Geospatial ontology (merging) systems, natural partial orders on the systems, and geospatial ontology merging closures in the systems were transformed by geospatial ontology system homomorphisms. References [1] C. Antunes, M. Abel, Ontologies in category theory: A search for meaningful morphisms, in: SEMINAR ON ONTOLOGY RESEARCH IN BRAZIL, PROCEEDINGS, São Paulo, 2018. [2] T. Britz, M. Mainetti, L. Pezzoli, Some operations on the family of equivalence relations, In: Algebraic Combinatorics and Computer Science: A Tribute to Gian-Carlo Rota. H. Crapo and D. Senato eds, Springer, 2001, 445-459. [3] Y. Bengio, R. Ducharme, P. Vincent, C. Jauvin, A neural probabilistic language model, Journal of machine learning research 3(2003) 1137-1155. [4] I. Cafezeiro, E. H. Haeusler, Semantic interoperability via category theory, ER ’07: Tutorials, posters, panels and industrial contributions at the 26th international conference on Conceptual modeling, vol. 83, November 2007, 197-202. [5] J. Chen, P. Hu, E. Jimenez-Ruiz, O. M. Holter, D. Antonyrajah, I. Horrocks, OWL2Vec* : Embedding of OWL ontologies, CoRR, 2020. [6] M. Chen, Y. Tian, X. Chen, Z. Xue, C. Zaniolo, On2vec: Embedding-based relation prediction for ontology population, In SDM, 2018. [7] C. Claramunt, Ontologies for geospatial information: progress and challenges ahead, Journal of Spatial Information Science 20(2020) 35-41. [8] M. Codescu, T. Mossakowski, O. Kutz, A categorical approach to ontology alignment, in: Pro- ceedings of the 9th International Workshop on Ontology Matching collocated with the 13th International Semantic Web Conference (ISWC 2014), Riva del Garda, Trentino, Italy, 2014. [9] M. Codescu, T. Mossakowski, O. Kutz, A categorical approach to networks of aligned ontologies, Journal on Data Semantics 6(4)(2017) 155-197. [10] F. Dassereto, L. Di Rocco, G. Guerrini, M. Bertolotto, Evaluating the effectiveness of embeddings in representing the structure of geospatial ontologies, In: International Conference on Geographic Information Science, Limassol, Cyprus, Springer, 2019, 41–57. 12 [11] F. Dassereto, L. D. Rocco, S. Shaw, G. Guerrini, M. Bertolotto, How to tune parameters in geograph- ical ontologies embedding, In: LocalRec’20: Proceedings of the 4th ACM SIGSPATIAL Workshop on Location Based Recommendations, Geosocial Networks, and Geoadvertising, November 3, 2020, Seattle, WA, USA, LocalRec ’20, ACM, 2020, 2:1-2:9. [12] J. Euzenat, Algebras of ontology alignment relations, In: Sheth A. et al. ed. International Semantic Web Conference - ISWC 2008, Lecture Notes in Computer Science, Vol. 5318, Berlin, Heidelberg: Springer, 2008, 387-402. [13] J. Euzenat, P. Shvaiko, Ontology matching, Springer, 2nd edition, 2013. [14] T. R. Gruber, A translation approach to portable ontology specifications, Knowledge Acquisition 5(2)(1993) 199-220. [15] X. Guo, A. Berrill, A. Kulkarni, K. Belezko, M. Luo, Merging ontologies algebraically, https: //arxiv.org/abs/2208.08715, 2023. [16] O. M. Holter, E. B. Myklebust, J. Chen, E. Jimenez-Ruiz, Embedding OWL ontologies with OWL2Vec* , In: International semantic web conference, 2019. [17] L. Hu, J. Wang, Geo-ontology integration based on category theory, in: International Conference On Computer Design and Applications, Qinhuangdao, 2010, V1-5-V1-8. [18] N. Kibret, W. Edmonson, S. Gebreyohannes, Category theoretic based formalization of the verifiable design process, in: IEEE International Systems Conference (SysCon), Orlando, FL, USA, 2019, 1-8. [19] R. Li, X. Hu, A clustering-based ontology summarization method with structural and semantic information integration, ICCIR ’21: Proceedings of the 2021 1st International Conference on Control and Intelligent Robotics, June 2021, 176-181. [20] A. Maedche, S. Staab, Ontology learning for the semantic web, IEEE Intelligent systems 16(2)(2001) 72-79. [21] M. Mahfoudh, L. Thiry, G. Forestier, M. Hassenforder, Algebraic graph transformations for merging ontologies, in: Model & Data Engineering, 4th International Conference, MEDI 2014, Larnaca, Cyprus, Sep. 2014, pp. 154-168. [22] A. Mani, Representing words in a geometric algebra, www.pacm.princeton.edu/sites/default/files/ pacm_arjunmani_0.pdf, 2023. [23] M. Mendonca, J. Aguilar, N. Perozo, Application of category theory, Ingénierie des systèmes d’information 23(2)(2018) 11-38. [24] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, J. Dean, Distributed representations of words and phrases and their compositionality, CoRR, abs/1310.4546, 2013. [25] S. Pouriyeh, M. Allahyari, Q. Liu, G. Cheng, Hamid Reza Arabnia, Ontology summarization: graph-based methods and beyond, International Journal of Semantic Computing 13(2)(2019) 259-283. [26] D. Sánchez-Charles, J. Carmona, V. Muntés-Mulero, M. Solé, Reducing event variability in logs by clustering of word embeddings, In: Teniente, E., Weidlich, M.(eds.) BPM 2017. LNBIP, vol. 308, Springer, Cham, 2018, 191-203. [27] K. Sun, Y. Zhu, P. Pan, Z. Hou, D. Wang, W. Li, J. Song, Geospatial data ontology: the semantic foundation of geospatial data integration and sharing, Big Earth Data 3(3)(2019) 269-296. [28] K. Sun, Y. Zhu, J. Song, Progress and challenges on entity alignment of geographic knowledge bases, International Journal of Geo-Information 8(2)(2019) 77. [29] Q. Wang, Z. Mao, B. Wang, L. Guo, Knowledge graph embedding: A survey of approaches and applications, IEEE TKDE 29(12)(2017) 2724-2743. [30] D. Xu, Y. Tian, A comprehensive survey of clustering algorithms, Ann. Data. Sci. 2(2015) 165-193. [31] A. Zimmermann, M. Krotzsch, J. Euzenat, P. Hitzler, Formalizing ontology alignment and its operations with category theory, in: FOIS’06’, Baltimore, 2006. 13