# Inverse semigroups and partial symmetries

I recently ran across the idea of inverse semi-groups in the context of partial symmetries, where the symmetry only acts on part of the system and not the entire system (e.g., in quasi-crystals).

My question is the following: in physics, we often consider field theories with internal global symmetries. For example, the usual $$U(1)$$ global symmetry acts as $$\psi \to e^{i \alpha} \psi$$ Now we can gauge this symmetry by promoting $$\alpha \to \alpha(t,\vec{x})$$, which is space-time dependent, and coupling the theory to a gauge potential $$A$$.

Suppose we're in three spatial dimensions (3+1D), and suppose that I instead want to consider an unusual symmetry transformation such that $$\psi \to e^{i \alpha f(x)} \psi$$ If space was discrete, such that we had matter degrees of freedom living on the vertices of a cubic lattice, this symmetry transformation means that the symmetry acts independently as a global symmetry on different $$x$$-planes of the lattice. In other words, all degrees of freedom on the same $$x = x_0$$ plane get multiplied by the same overall phase $$e^{i \alpha x_0}$$. Thus, on each layer, the symmetry acts as the usual global $$U(1)$$ symmetry; nonetheless, it is only acting on a sub-space of the entire system.

It seems to me there should be some mathematical structure here related to the ideas of groupoids or inverse semi-groups, but I lack the mathematical sophistication to see it. In particular, if I gauge this symmetry, I don't think the resulting theory will have the usual Lie-group structure. Any help/advice in this direction would be very much appreciated!

Some added context: I was looking at so-called "galileon" theories, for which a scalar field transforms as $$\theta \to \theta + b_\mu x^\mu$$ such that if $$\theta$$ corresponds to the phase-field of some charged matter field $$\psi = e^{i \theta}$$, then $$\psi$$ will transform as $$\psi \to e^{i \vec{b}.\vec{x}} \psi,$$ which in fact constitutes three independent transformations $$e^{i b_x x}, e^{i b_y y}, e^{i b_z z}$$ and so is an example of the kind of transformation being considered.

Clearly, there is a non-trivial interplay between spatial and internal symmetries going on here; looking around for what's known about such symmetries, I ran across Weinstein's paper: "Groupoids: Unifying Internal and External Symmetry" which I haven't been able to understand. So I was hoping that someone with more expertise could shed some light on these kinds of symmetries and the structure which arises when they are gauged.