Global Symmetries, Local Symmetries and Groupoids

: Local symmetries are primarily deﬁned in the case of spacetime, but several authors have deﬁned them outside this context, sometimes with the help of groupoids. We show that, in many cases, local symmetries can be deﬁned as global symmetries. We also show that groups can be used, rather than groupoids, to handle local symmetries. Examples are given for graphs and networks, color symmetry and tilings. The deﬁnition of local symmetry in physics is also discussed.


Introduction
This paper has two main purposes. The first one is to show that, in many cases, local symmetries can be viewed as global symmetries. Examples are given in graph theory and in the case of color symmetry and tilings (Sections 2 and 3). The second purpose is to show that, on the basis of specific examples from the literature, groups rather than groupoids are relevant when dealing with local symmetries. Examples are given for networks, and in the case of color symmetry and tilings (Section 3). However, the concept of local symmetry seems to originate in the physics literature, and the examples cited above are outside the field of phyics. Indeed, there are situations where global symmetries are irrelevant: this is the case of general relativity, presented in Section 4. We first consider some terminological aspects of local symmetry.
In physics, symmetries can be global or local. The importance of local symmetry in physics was outlined, and global symmetries were considered to be unnatural [1]. According to [2], if symmetry is accompanied with coordinate transformations of spacetime, it is called spacetime symmetry; otherwise, it is internal symmetry.
A global symmetry is one that holds at all points of the spacetime, whereas a local symmetry is one with a different symmetry transformation at different points of the spacetime, that is, a local symmetry transformation is parametrised by the spacetime coordinates [2][3][4]. While it seems that there is a consensus in the physics community about the concept of local symmetry, the situation regarding the relationship between local symmetry and gauge symmetry is unclear. In the next paragraph, we provide an overview of several statements about these relations, which we found in the physics literature.
Local internal symmetry is called gauge invariance [2]. A gauge group is a Lie group whose parameters are spacetime-dependent [5]. Theories with local symmetries may also be called gauge theories [6], and some authors consider that a local symmetry is a gauge symmetry [7,8]. It has been considered that a gauge symmetry reduces to the identity on the observables and that gauge symmetries can be either local or global [9,10]. In this sense, gauge symmetry appears to be a physical rather than a mathematical concept. In fact, the symmetry terminology is not consensual in the physics literature (for an example, see [11,12]).
The historical origin of the term gauge is attributed to Weyl (1918) [13][14][15][16][17]. In the mathematical context of symmetry, we prefer the term gauge invariance to the term gauge symmetry. One reason for this choice comes from the often-cited example of the gauge theory of Maxwell's electrodynamics, where the vector potential is determined up to the addition of the derivative of a scalar function [18]. This defines an equivalence class of solutions, rather than a symmetry. Only local and global symmetries are considered in this paper, not gauge invariances.
Handling local symmetries via groupoids is considered by some authors to be a general approach [30][31][32]. Our purpose is not to deny the pertinence of local symmetry or that of groupoids. We aim to illustrate, on the basis of several important examples, that, in the case of groupoids, local symmetries can also be viewed as global symmetries and groupoids are not needed to define them. These examples target topics in different areas of science. All share a concept of local symmetry, while this concept has received different definitions, depending on the authors.

Mathematical Framework
Symmetry is considered as a mathematical model of real physical situations. Therefore, we retain the unified definition of symmetry given in [33], which works for geometric figures (with or without coloring, as encountered in arts), and for functions, probability distributions, graphs, matrices, strings, etc. We recall this below. Definition 1 ([33]). An object is a function with its input argument in a metric space.
The space of the returned values varies depending on the considered application. Definition 2 ([33]). An object is symmetric when it is invariant under an isometry that is not the identity.
Definition 1 is the key to handling symmmetry in general, while Definition 2 is the classical one, provided that the object is defined. Definitions 1 and 2, taken together, allow for identification of which mathematical entities can be qualified as symmetric or not. They give rise to a mathematical definition of chirality based on groups [34] (no need for the orientation concept).
Definitions 1 and 2 are based on the assumption of the existence of a metric, but none of the axioms defining a true metric were necessary to define isometries [33]. Therefore, these definitions were retained in the case of the Minkowski spacetime [35], and, more generally, in geometric algebra [36], for which intervals are preserved rather than distances.

Symmetry from Graph Automorphisms
Below, we show how the definitions given in Section 2.1 work in the case of graphs. Through the abuse of notation, we do not use double parentheses to denote the values taken by functions of several variables, although, in set theory, a function is expected to have only one argument. For example, f ((x, y)) is denoted f (x, y), with the unique argument of f being (x, y).
We consider two non-empty sets S and S and we define E = S × S . A binary relation G from S to S is isomorphic to an indicator function φ G with its input argument z = (x , x ) ∈ E, x ∈ S and x ∈ S , satisfying to φ G (z) = 1 when x is the image of x through G, and to φ G (z) = 0 when x is not the image of x through G.
We assume that S = S ; we define S = S = S and we assume that S is finite and has n elements. The graph of the function φ G is a directed graph, in the sense of graph theory: the elements of S are the nodes (or vertices), and the elements z of E = S 2 such that φ G (z) = 1 are the edges.
We assume that the graph is unlabeled in the sense of vertex labeling (the unlabeled graph can be viewed as the isomorphism class of the n! labeled graphs).
The n by n adjacency matrix A G , also called the connectivity matrix, has the general element A G (i, j) = φ G (x i , x j ), 1 ≤ i ≤ n, 1 ≤ j ≤ n, which is the indicator function of an edge from the node x i to the node x j . The adjacency matrix is defined up to an arbitrary simultaneous permutation of its lines and columns. When a diagonal element A G (i, i) is null, there is no loop on the node x i .
Warning: the case of graph symmetries should not be confused with the one where φ G ia a symmetric function, in the sense that the adjacency matrix is symmetric). This latter kind of symmetry can be recognized in the sense of Definitions 1 and 2, but the object is defined differently from the ones considered in this section [33]. This graph is isomorphic to an undirected graph, for which, in graph theory, an existing edge between two nodes is usually considered to be unique and is not directed.

Case of Non-Colored Nodes and Non-Colored Edges
We denote by B the space of the values returned by φ G . Here, denotes the indicator function. This metric, called the discrete metric [37,38], returns a distance that is equal to 1 for all distinct edges z i and z j of E, and returns a null distance if and only if z i = z j .
The edges z i = (x i , x i ) and z j = (x j , x j ) are distinct if either the starting nodes x i and x j are distinct, or the ending nodes x i and x j are distinct. The distance between two edges z i and z j may also be written as indicated in Equation (1) or, equivalently, in Equation (2).
In other words, the metric δ G in Equation (1) or in Equation (2) returns a null distance between two edges z i = (x i , x i ) and z j = (x j , x j ) if and only if the two following conditions are satisfied: (a) The edges z i and z j have the same starting node: The edges z i and z j have the same ending node: If one of these two conditions is not satisfied, the returned distance is 1.
There are (n 2 )! possible bijections of E onto E because E has n 2 elements, but only n! of them are isometries for δ G . The matrix representation of these latter operate the simultaneous permutations of the lines and columns of the adjacency matrix A G . The automorphism group of the graph of φ G is isomorphic to a subgroup of the group of these n! permutations.
When the symmetry group of φ G for δ G contains at least two elements, the function φ G from E to B is a symmetric object for δ G in the sense of Definitions 1 and 2.

Case of Non-Colored Nodes and Colored Edges
When the edges of the graph are valued, we say that each edge receives a color. The function φ G returns the color of the edges. The space B of the colors of the edges varies, but a special value in B must be returned by φ G for nonexistant edges. The metric δ G is the one of Equations (1) and (2).
When all edges of a colored graph have the same color, this graph is isomorphic to a graph without colored edges, with the set B = {0; 1}, and with φ G as the indicator function of the existence of the edges.
When the symmetry group of φ G for δ G contains at least two elements, the function φ G from E to B is a symmetric object for δ G in the sense of Definitions 1 and 2.

Case of Colored Nodes and Colored Edges
While the edges of the graph can be valued, the nodes of the graph can also be valued. The values of the nodes, also called colors, can be of any type, but should not be confused with the colors of the edges.
This means that the set of nodes S is a cartesian product N S × C S , where N S has n elements and C S is the set of the colors taken by the elements of N S .
Thus, a node x of S is a couple: its first member is an element of N S and its second member is an element of C S . We define the function ξ N S from S to N S which returns the first member of this couple, and we define the function ξ C S from S to C S , which returns its second member (its color).
The metric δ G is still the one of Equations (1) and (2). When the symmetry group of φ G for δ G contains at least two elements, the function φ G from E to B is a symmetric object for δ G in the sense of Definitions 1 and 2.
A graph for which it does not exist two distinct nodes with the same color is isomorphic to a vertex labeled graph. It is a sufficient condition to have the symmetry group of φ G reduced to one element (the identity), and φ G is not symmetric for δ G .

Partial Graph; Subgraph; Creation and Deletion of Edges and Nodes
We consider the graph G of a binary relation G defined by a function φ G from E to B, with colored nodes and colored edges, as in Section 2.2.3. By convention, we denote by 0 the special element of B corresponding to an inexisting edge, while this value 0 is not necessarily numerical (see Section 2.2.2).

Definition 3.
Let E * be a subset of E, with k = card(E * ). A partial graph G * of G is a graph defined by a function φ * G from E to B, so that, for all z ∈ E * , φ * G (z) = 0 and φ G (z) = 0, and for all y ∈ E \ E * , φ * G (y) = φ G (y). We say that k edges are deleted from the graph G. When k = 0, no edge is deleted, E * = ∅, φ * G = φ G , and G * = G.
In the case of an undirected graph G u , an edge deletion between two nodes x i and x j means that both the edges from x i to x j and from x j to x i are deleted in the directed graph G isomorphic to G u .
The deletion of nodes in a graph G is also possible. This assumes that a special color in C S is attributed to deleted nodes (see Section 2.2.3). By convention, we denote 0 C S the special element of C S corresponding to a deleted node. Definition 4. Let S * be subset of S, with m = card(S * ), 0 ≤ m < n. A subgraph G * * of G is a graph defined by a function φ * * G from E to B, so that, for all x ∈ S * such that ξ C S (x) = 0 C S , all edges from x and all edges to x are deleted from G. We say that m nodes are deleted from the graph G. When m = 0, no node is deleted, and G * * = G.

Definition 5.
A partial subgraph of a graph G is a partial graph of a subgraph of G.
Some authors define the deletion of a node x without deletion of the edges from x and to x. In this case, which mainly occurs in undirected graphs, such edges are called pending edges [39]. We do not provide the related definitions in our framework, because local symmetries do not seem to have been considered by authors in this context.
Operations on graphs can be performed on a computer. In our framework, creating or deleting an edge in a graph is just a change of its color. Similarly, creating a node is a change in its color from 0 C S to another value, and deleting a node means that its incident edges are deleted and then its color is set to 0 C S . Other operations on graphs can be performed by successive calls to the basic operations above.
It is recalled that a color is not necessarily a single value, such as an integer or a real; it can be implemented through a sophisticated data structure. Then, all operations on graphs can be performed on computers using any programming language, whether it is object-oriented or not. For specific applications, when the set of rules defining a class of permitted operations is too large, this set of rules can be generated by a computer, too. How to do this generation is out of the scope of this paper.

Remark 1.
We consider a graph G, with colored nodes and colored edges, defined by an object φ G on the space of edges E, and an induced partial subgraph G † defined by an object φ † G on E. The symmetries of φ † G and those of φ G are all in the isometry group of the space E. The n! members of this isometry group apply to the whole space E. Neither the symmetries of φ G nor the symmetries of φ † G depend on which element of E they apply. Thus, these symmetries can be considered global symmetries rather than local symmetries, discarding the fact that E is not the spacetime, in which the concepts of local and global symmetries usually makes sense.

Application to Molecular Graphs
In chemistry, it is customary to consider molecular graphs. A molecular graph is a simple, undirected graph, which is not necessarily connected. Its nodes correspond to the atoms and its edges correspond to the bonds. There are colors on the nodes and there are colors and the edges. The color of a node is the atom type in the periodic table of Mendeleev, and the color of an edge is the type of chemical bond.
For example, the molecular graph of the water molecule H-O-H has three nodes and two undirected edges, the color of the nodes are H for hydrogen and O for oxygen, and the color of the two edges are both a simple chemical bond (other kind of bonds exist, such as double, triple, aromatic, etc.).
According to [23], there are local symmetries, called subsymmetries by the authors, which are related to the automorphisms of specific hierarchies of subgraphs of a molecular graph. Following Remark 1, these local symmetries can also be called global symmetries.

Application to Other Undirected Graphs
According to [20], an endomorphism ψ of a connected undirected graph G is a local symmetry, if there is a partial subgraph G * * ψ separating G into two components G 1 and G 2 (not necessarily connected) such that ψ is the identity on G 2 ∪ G * * ψ , and ψ(G 1 ) is isomorphic to a subgraph of G 2 .
In our graph symmetries framework, this local symmetry can also be called a global symmetry (see Remark 1).

Groupoids and Networks
Groupoids were used to handle local symmetries in networks [21,22] (see [40] for generalities about groupoids). In this context, a network is a directed graph with colored nodes and colored edges (see Section 2.2.3). An edge represents an interaction from a node to an other node. Some examples of the dynamical character of the network, given in [21], are: a choice of move (games), a transition probability (Markov chains), discrete states in time and space (cellular automata), or continuous states (coupled ODEs).
As stated in [21], the architecture of the network is not considered to evolve over time, while the local nature of groupoid symmetries implies changes, such as the addition or removal of a node or an edge, and these changes occur along the time. Thus, the global architecture of the network is said to be preserved, which makes sense for quotient networks [41]. According to [21], the difference between group symmetries and groupoid symmetries is that the former are transformations of the network preserving its global architecture, whereas the latter relate local regions of the network to other regions.
The transformations of the network along the time and the rules defining the classes of permitted transformations can be programmed from graph operations, as shown in Section 2.2.4. It follows that local symmetries in networks can be handled with groups, and called global symmetries (see Section 2.2.3).

An Example of a Planar Tiling Found in the Literature
The need for groupoids in the context of local symmetry was outlined in [42]. The motivation for this need was based on the example of a tiling X of R 2 by rectangles, where four rectangles meet at each corner point, with the origin being in the set of these corner points. Comparing groups to groupoids, the authors emitted the criticisms below about groups.
1. The same symmetry group Γ applies both to X and to its grid of corner points, while the grid differs from X. 2. The group Γ contains no information about the local structure of the tiled plane, which exists when the tiles are colored with a design. 3. If, as for bathroom floors, the tiling is restricted to a finite rectangular domain of the plane ∆ = [0; 2m] × [0; n], the symmetry group is shrinked, that is, the subgroup of Γ leaving X ∩ ∆ invariant contains just 4 elements, even though a repetitive pattern on the bathroom floor is visible.
We address the following remarks to these three respective criticisms: 1. The two objects have the same symmetries. There is no reason why this fact should induce a preference for groupoids rather than groups. 2. The non-colored tiling and the colored tiling define distinct objects, which can be considered separately. Therefore, there is no reason to prefer groupoids to groups. 3. The symmetry group of X ∩ ∆ is a subgroup of the symmetry group of X. There is no reason why this fact should induce a preference for groupoids rather than groups.
In Section 3.2.2, we show how to handle the above tiling without groupoids.

Our Approach of Tiling
To illustrate our approach, we consider the example of a colored tiling of the Euclidean plane E 2 , where the base pattern is located in a rectangle of vertices x 0 = (0, 0), x 1 = (2, 0), x 2 = (2, 1) and x 3 = (0, 1). This tiling is similar to the one shown in Section 3.2.1.
The closed domain defined by this rectangle, including the sides and vertices, is the set R T of all convex linear combinations of x 0 , x 1 , x 2 and x 3 . The set of the sides (vertices included) of all the rectangles of the tiling is denoted T S , and the set of all the vertices of the tiling is denoted T V .  Figure 1). The color white is attributed to T S \ T V , and the color black is attributed to T V . The usual Euclidean metric is retained. The colored tiling is defined by a function φ from E 2 to B = {0; 1} 5 . As mentioned after Definition 1, the space of the values returned by φ can be decided by the user. Therefore, this choice of B is an example; there are other possible ones. The value of φ at a point x of E 2 has five components, which are the values of the respective indicator functions of each color at x. It follows that, at any point x, four of these five values are equal to 0 and one is equal to 1.
The grid of the corner points alone can be defined by an object φ V where a common color, say, white, is attributed to all points of E 2 \ T V , while the color black is attributed to the points of T V .
Considering the non-colored tiling means that a common color is attributed to the points of E 2 \ T S . This tiling is defined by an object φ S .
An object φ BS defining a restriction of the tiling to a bounded subset of E 2 can be handled with the help of the indicator function at appropriate places in the expression of φ BS .
Each of the objects φ, φ V , φ S and φ BS has its own symmetries.
An alternate choice for the object defining the fully colored tiling could have been a function φ C from E 2 to {1, 2, 3, 4, 5}, or to {red, green, blue, white, black}, which returns the color at the point x. Many objects can be defined for a given tiling. Suitable choices depend on the targeted applications.
Permutation of colors and, more generally, operations on colors, can be performed through adequate transformations of objects. If needed, a graph structure can be attributed to the base pattern. In our example, the graph contains three nodes (their colors are, respectively, red, green and blue), and two edges, indicating their neighboring relationships. This could be useful for computer applications (see the end of Section 2.2.4), including applications to dynamical systems (see the example in Section 3.1).

Color Symmetry
Color symmetry is encountered in the arts and crystallography [24][25][26][27][28][29]. In a recent paper [19], groupoids were used to exchange or move a number of colors without leaving any fixed color. While the groupoid approach is relevant for color symmetry, these color changes can also be achieved without groupoids, through suitable object choices, as exemplified in Section 3.2.2.
In this situation, it suffices to apply suitable transformations to the object, such as changing a color (see example in Section 3.2.2). Suppressing a color in a pattern is just a change of color, since, in our approach, a non-colored pattern is just a pattern painted with a dummy color. Similarly, reintroducing a color in a pattern is also a change of color. Therefore, exchanges or moves of a number of colors without leaving fixed any color can be readily performed without the help of groupoids. In the case of bounded subsets of the Euclidean space, a probabilistic variant of our approach to color symmetry was used to define a measure of deviation from direct symmetry [43], and to define a measure of deviation from achirality [43,44]. This was applied to molecular solids [45] and probability distributions [46,47].

Local Symmetries in Physics
As mentioned in Section 2.1, Definition 1 extends to the case where the metric is not a true one. Thus, Definition 1 is relevant in the case of a field: this latter receives a value at each point of the spacetime [35,36]. This value may be a scalar, a vector, a tensor, or else.
In special relativity, the observers (coordinate systems) move at constant relative velocity with respect to each other, and the symmetries are global [6]. The spacetime is viewed as a four-dimensional real vector space, equipped with a diagonal metric of signature (1, 3, 0), called the Minkowski metric [17]. The Poincaré group is the full symmetry group of special relativity [17].
In Einstein's general relativity, symmetries are local whenever acceleration or gravitation are present [6], and the spacetime is viewed as a smooth, four-dimensional, pseudo-Riemannian manifold M. Its diffeomorphism group is the symmetry group of general relativity [48][49][50][51]. The metric is determined by Einstein's equations [51,52]. This metric depends on the spacetime coordinates (for example, see the Schwarzschild metric [52]), whence the name of local symmetry. The empty space of the special relativity is a solution of Einstein's equations [53,54], and, in the neighborhood of a point of M, the metric can be diagonalized to give the Minkowski metric of special relativity, with signature (3, 1, 0) [55,56] (the difference between the signatures (3, 1, 0) and (1, 3, 0) of the metric is meaningless in relativity).
As for a Riemannian manifold, to each point p ∈ M is associated a tangent space T p M [57]. Here, this tangent space T p M is a four-dimensional vector space. Then we define the set TM = {(p, v) : p ∈ M, v ∈ T p M. The function π from TM to M returns the base point p of M, that is, π(p, v) = p, where (p, v) ∈ TM (the function π projects an element of TM onto its base point p). The triple (TM, π, M) is the tangent bundle of M, and TM is the total space of the tangent bundle of M [57].
In Sections 2 and 3, we were able to identify groups of global isometries. In the case of the pseudo-Riemannian manifold M considered in relativity, no global isometry is generally known for M, because the metric of general relativity varies with the base point of M. It was pointed out that the invariance under arbitrary curvilinear coordinate transformations is about physical laws rather than about an object [14,15]. Therefore, looking for potential classes of metrics constant on M or on TM is irrelevant in the context of general relativity, and the physicists were right when they introduced the concept of local symmetries in this context. Some examples of local transformations were proposed in the literature to explain local symmetry in physics, such as the points of a sphere rotating independently of one another by different angles [9], or a long circular cylinder sliced into very thin disks, where every ring rotates through a different angle [14,15]. These examples are useful for providing an idea of what is local symmetry, but they do not involve any metric.

Concluding Remarks
Several concepts of local symmetry appeared in the literature, but they were restricted to specific situations, and can hardly be generalized to a unified mathematical definition of local symmetry.
Generally, one part of an object may have more or less symmetries that its parent object. Examples are a partial subgraph induced by a graph, a molecule within its crystal lattice, or a base motif of a tiling. These examples have in common that the symmetry group of the object and the symmetry group of the part of the object are both subgroups of the group of the space isometries.
We have shown that, in the examples presented in this work, local symmetries can be called global symmetries in the framework of our unified definition of symmetry.
We have also shown, through several examples, that the use of groupoids to handle local symmetries was unnecessary. This does not mean that handling local symmetries with groupoids is never pertinent.