It is possible to use a diagram in an expression?

For such simple cases, you could also build a symbol from simple commands to reproduce the diagram. There are packages with many arrow symbols, like MnSymbol.

Here's a construction of the symbol in your example. The code to import a single symbol from MnSymbol is based on Ulrike Fischer's answer here.

\documentclass{article}
\usepackage{mathtools}
\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
    <-6>  MnSymbolA5
   <6-7>  MnSymbolA6
   <7-8>  MnSymbolA7
   <8-9>  MnSymbolA8
   <9-10> MnSymbolA9
  <10-12> MnSymbolA10
  <12->   MnSymbolA12}{}
\DeclareSymbolFont{MnSyA}         {U}  {MnSymbolA}{m}{n}
\DeclareMathSymbol{\lcurvearrowdown}{\mathrel}{MnSyA}{187}
\DeclareMathSymbol{\rcurvearrowdown}{\mathrel}{MnSyA}{195}
\newcommand*{\arrowsdots}{%
    \rcurvearrowdown\mkern1mu%
    \mathclap{\raisebox{-.65\height}{\(\cdot\)}}%
    \mathclap{\raisebox{ .4\height}{\(\cdot\)}}%
    \mkern1mu\lcurvearrowdown%
}
\begin{document}
\( \mathrm{Set}^{\arrowsdots} \)
\end{document}


Something like this?

\documentclass{standalone}
\usepackage{tikz}
%Resize to relative size (em)
%Put the TikZ picture inside a box, just in case
\newcommand{\love}{\resizebox{0.5em}{!}{\hbox{\tikz\draw[fill=red] (0,0) rectangle (1,1);}}}

\begin{document}
$4^{\love}$

\begin{Large}
$4^{\love}$
\end{Large}

\begin{Huge}
$4^{\love}$
\end{Huge}
\end{document}

enter image description here

To actually answer the question, sort of an attempt. If you know TikZ enough, you can play with arrows and dot size.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows,positioning}
\newcommand{\nicepicture}{%
\begin{tikzpicture}
\node[circle, fill=black,inner sep=0pt,minimum size=.075em] (A) at (0,0){};
\node[circle, fill=black,inner sep=0pt,minimum size=.075em] (B) at (0,.3){};
\draw[->] (B.west) to [bend right=45] (A.west);
\draw[->] (B.east) to [bend left=45] (A.east);
\end{tikzpicture}
}
\newcommand{\myarrows}{\resizebox{!}{.5em}{\hbox{\nicepicture}}}

\begin{document}
$\text{Set}^{\myarrows}$

\begin{Large}
$\text{Set}^{\myarrows}$
\end{Large}

\begin{Huge}
$\text{Set}^{\myarrows}$
\end{Huge}
\end{document}

enter image description here


pst-fun is only for fun purposes.

\documentclass[border=3pt]{standalone}
\usepackage{pst-fun}
\def\pst{\raisebox{2pt}{\psscalebox{0.02}{\pspicture(-1,-2)(2,2)\psBill\endpspicture}}}
\begin{document}
$Set^{\pst}$
\end{document}

enter image description here

Tags:

Tikz Pgf