I would like to write equations where the left and right hand side are obtained from tikzpictures.
I have the following for now, but is there a simpler way to do so ?

\tikzset{
link/.style = { white, double = black, line width = 1.8pt,
double distance = 0.8pt },
channel/.style = { white, double = black, line width = 0.8pt,
double distance = 0.6pt },
nat/.style = {fill=white,draw,circle,minimum size=0.5cm,inner sep=1pt},
}
\begin{tikzpicture}
\node at (-2,0) {$\begin{tikzpicture}[scale=0.5, transform shape]
\coordinate (v1) at (0,4) {};
\coordinate(v2) at (0,0) {};
\coordinate (v3) at (-3,4) {};
\coordinate (v4) at (-3,0) {};
\coordinate (v5) at (3,4) {};
\coordinate (v6) at (3,0) {};
\fill[fill=blue!20]
(v4.center) -- (v3.center) -- (v1.center) -- (v2.center) -- cycle;
\fill[fill=yellow!10]
(v1.center) -- (v5.center) -- (v6.center) -- (v2.center);
\draw (v1) edge (v2);
\draw (v1) node[above,scale=2] {$y$};
\draw (v2) node[below,scale=2] {$y$};
\draw (-1.5,0) node[below,scale=2]{$m$};
\coordinate (mor) at (0,3) {};
\coordinate (nat) at (0,1.5) {};
\draw (0,1.5) .. controls (-1,1.5) and (-1.5,1) .. (-1.5,0);
\node[nat,scale=2] at (nat) {$a$};
\node[nat,scale=2] at (mor) {$f$};
\end{tikzpicture}$};
\node at (3,0) {$\begin{tikzpicture}[scale=0.5, transform shape]
\coordinate (v1) at (0,4) {};
\coordinate (v2) at (0,0) {};
\coordinate (v3) at (-3,4) {};
\coordinate (v4) at (-3,0) {};
\coordinate (v5) at (3,4) {};
\coordinate (v6) at (3,0) {};
\fill[fill=blue!20]
(v4.center) -- (v3.center) -- (v1.center) -- (v2.center) -- cycle;
\fill[fill=yellow!10]
(v1.center) -- (v5.center) -- (v6.center) -- (v2.center);
\draw (v1) edge (v2);
\draw (v1) node[above,scale=2] {$y$};
\draw (v2) node[below,scale=2] {$x$};
\draw (-1.5,0) node[below,scale=2]{$n$};
\coordinate (mor) at (0,1.5) {};
\coordinate (nat) at (0,3) {};
\draw (nat) .. controls ++(-1,0) and (-1.5,1) .. (-1.5,0);
\node[nat,scale=2] at (nat) {$b$};
\node[nat,scale=2] at (mor) {$f$};
\end{tikzpicture}$};
\draw (0,0) node{$=$};
\end{tikzpicture}



picwithargsI learnt from your answer here. Please check it out ! (I ping you here because I don't know if it works in answers body...) – marsupilam Jun 18 '17 at 22:32