is the trivial generating function and $S\in C^\infty (B_2)[[h]] $ is a formal series $S = S_1 +h S_2 +\dots$. Inserting $S_h$ in the SGA equation we get a new version of this equation for $S$, $M^1(S) = M^2(S)$ where $M^i:C^\infty (B_2)[[h]]\rightarrow C^\infty (B_3)[[h]]$ are defined by

$$\begin{aligned}
M^1(S)(p_1,p_2,p_3,x;h)  & = & h S(p_{1},p_{2},\bar{x})+h S(\bar{p},p_{3},x) \\
                             &   &  \quad\quad- h^2 \nabla_xS(p_1,p_2,\bar{x})\nabla_{p_1}S(\bar{p},p_3,x)\end{aligned}$$

$$\begin{aligned}
 \bar{p} & = &p_1+p_2+h\nabla_x S(p_{1},p_{2},\bar{x}),\\
\quad \bar{x} & = &x+h\nabla_{p_1}S(\bar{p},p_{3},x) \end{aligned}$$

and $$\begin{aligned}
M^2(S)(p_1,p_2,p_3,x;h)  & = & h S(p_{2},p_{3},\tilde{x})-\tilde{p}\tilde{x} +h S(p_{1},\tilde{p},x)\\
                     &   &  \quad\quad- h^2 \nabla_xS(p_2,p_3,\tilde{x})\nabla_{p_2}S(p_1,\tilde{p},x)\end{aligned}$$ $$\begin{aligned}
\tilde{p} & = &p_2+p_3+h\nabla_x S(p_{2},p_{3},\tilde{x}),\\
\quad \tilde{x} & = &x+h\nabla_{p_2}S(p_{1},\tilde{p},x).\end{aligned}$$

The idea now is to expand $M^i(S)(h)$, $i=1,2$ into powers of $h$ and then to analyze the conditions imposed on $S$ by the equation at each order. For that purpose we are going to introduce some tools and methods that are heavily inspired from the tools used in numerical analysis to determine the order condition of a Runge–Kutta method. The main ingredients are trees which are used to represent the so called elementary differentials and elementary functions. As these ideas go back to Cayley, we call such trees Cayley trees, in order to distinguish them from Kontsevich trees which will also 