\big(  p_2,\nabla_{p_2}S\big),
\big(  \nabla_x S,x     \big)
\Big):(p_1,p_2,x)\in B_2\Big\}$$ where the partial derivatives are evaluated at $(p_1,p_2,x)\in B_2:= (\mathbb R^{*d})^2\times \mathbb R^d$.

The groupoid product associativity could be expressed by saying that, whenever the composition is allowed, we have $g = \bar g\bullet g_3$ and $g=g_1\bullet \tilde g$ where $\bar g =  g_1\bullet g_2 $ and $\tilde g = g_2\bullet g_3$.

Denoting $g=(p,x)$, $\bar g = (\bar p,\bar x)$ and $\tilde g =
(\tilde p,\tilde x)$ implies that $(g_1,g_2,\bar g)\in G^{(m)}$, $(g_2,g_3,\tilde g)\in G^{(m)}$, $(\bar g,g_3, g)\in G^{(m)}$ and $(g_1,\tilde g, g)\in G^{(m)}$. Now expressing $g_1,g_2,g_3,g,\bar g$ and $\tilde g$ each time in terms of the generating function $S$ and equating the different expressions found for the same element we get a system of six equations which can be summarized into the following more compact equation.

**Symplectic Groupoid Associativity equation (SGA equation):**

$$S(p_1,p_2,\bar x) + S(\bar p,p_3,x)-\bar x\bar p = S(p_2,p_3,\tilde x)+S(p_1,\tilde p,x)-\tilde x\tilde p,$$

where $$\bar x =\nabla_{p_1}S(\bar p ,p_2,x) ,\quad \bar p =\nabla_{x}S(p_1 ,p_2,\bar x),$$ $$\tilde x =\nabla_{p_2}S(p_1,\tilde p,x) ,\quad \tilde p =\nabla_{x}S(p_2 ,p_3,\tilde x) .$$

This equation encodes the associativity of the groupoid product into the generating function. It can also be seen from two other different points 