# Where has this structure been observed?

$$\newcommand{\M}{\mathcal{M}}$$Let $$M$$ be a monoid. Consider the following structure:

$$R_X,R_Y:\mathbb{Z}^2 \to M$$ satisfying the following "compatiblity-relation":

$$R_X (x, y) \cdot R_Y (x + 1, y) = R_Y (x, y) \cdot R_X (x, y + 1).$$

Here we think of $$R_X,R_Y$$ as "advancing" along the $$x,y$$ directions respectively on the grid $$\mathbb{Z}^2$$.

The geometric idea is the following:

Start at the point $$(x,y)$$. The LHS corresponds to moving one unit to the right along the $$x$$-axis, and then moving one unit upward along the $$y$$-axis. In the RHS we first advance along the $$y$$-direction, then the $$x$$-direction.

In particular, this implies that the natural extension of more than two products is path-independent.

Question: In what contexts has this structure been observed?

I am familiar with the concept of WZ pairs, which is a special case. Are there other contexts?

For simplicity I chose to work here with $$\mathbb{Z}^2$$, but there is a natural extension of this structure to $$\mathbb{Z}^d$$, where we have $$d$$ families $$R_i:\mathbb{Z}^d \to M$$, which "commute pairwise" in this sense.

Motivation: We reached this notion in the context of studying polynomial continued fractions.

In our case $$M=M_2(\mathbb{Z})$$ is the space of $$2 \times 2$$ integer matrices, and $$R_X (x, y),R_Y (x, y)$$ both depend polynomially on $$(x,y)$$. (see page 11 here).

• It looks like a kind of path independence, as you observe yourself. Not sure if there's more to it than that.
– R.P.
Sep 5 at 11:16
• One way to approach this would be to consider the free monoid with presentation given by generators indexed by two copies of $\mathbf{Z}^2$ and relators given by these relations. This is the "universal" solution to this problem.
– YCor
Sep 5 at 22:54

This is an infinite commutative diagram on $$M$$ (viewed as a category with a single object $$\bullet$$).
$$\require{AMScd}$$ $$\begin{CD} \vdots @. \vdots @. \vdots\\ @VVR_y(0,2)V @VVR_y(1,2)V @VVR_y(2,2)V\\ \bullet @
If $$M$$ is a group, this is also a (discrete) flat connection on the trivial $$M$$-bundle over the lattice $${\bf Z}^2$$, or the (discrete) derivative of a gauge function from $${\bf Z}^2$$ to $$M$$.
• In other words it is a functor from the product of linear orders $\mathbb Z\times\mathbb Z$ (viewed as a category) to a single-object category. Sep 12 at 2:18