How to represent the "Triangle of Power" in LaTeX?

Working from Akiiino's answer I came up with this, which also works in display mode

 \documentclass[a4paper]{article}
 \usepackage{amsmath}

\newcommand{\dotriangle}[1]{%
  \raisebox{-.7ex}{$\vcenter{#1\kern.2ex\hbox{$\triangle$}\kern.2ex}$}%
}

\newcommand{\tripow}[3]{% Syntax: \tripow{#1}{#2}{#3} gives you #1 ^ {#2} = #3
   \mathop{% We want it to an operator
      \mathchoice% We want different functionality in text and display mode
         {% DISPLAY MODE
            \vphantom{\dotriangle\LARGE}% \vphantom off-set: places the bottom entries.
            \rule[-1.4ex]{0.1em}{0pt}% Syntax: [<vetical drop #1>]{<left margin>}{<Should be 0>}
            _{\scriptstyle #1}% style of #1 entry
            {\overset{\scriptstyle #2}% style of #2 entry
            {\dotriangle\LARGE}}% Size of the displayed operator - should match the \vphantom off-set.
            \rule[-1.4ex]{0em}{0pt}% Syntax: [<vetical drop #3>]{<Should be 0>}{<Should be 0>} 
            _{\scriptstyle #3}% style of #3 entry
            \rule[0ex]{0.1em}{0pt}% Syntax: [<Should be 0>]{<right margin>}{<Should be 0>}
          }%
        {% TEXT MODE
            \vphantom{\dotriangle\normalsize}%
            \rule[-1.05ex]{-0.7ex}{0pt}%
            _{#1}% 
            \overset{#2}% 
            {\dotriangle\normalsize}% size in text mode
            \rule[-1.05ex]{0pt}{0pt}%
            _{#3}%
            \rule[0ex]{-0.2em}{0pt}%
          }%
        {% SCRIPT MODE
            \vphantom{\dotriangle\normalsize}%
            \rule[-1.05ex]{-0.8ex}{0pt}%
            _{\scriptstyle #1}%
            {\overset{\scriptstyle #2}%
            {\dotriangle\normalsize}}% size in script mode
            \rule[-1.05ex]{0pt}{0pt}%
            _{\scriptstyle #3}%
            \rule[0ex]{-0.3em}{0pt}%
         }%
        {}% SCRIPTSCRIPT MODE
   }%
}

Compiling this code

\begin{document}
Here we see some fundamental relations:
\begin{align}
    \tripow{x}{a+b}{}&=\tripow{x}{a}{}\cdot\tripow{x}{b}{}
    \\
    \tripow{x}{}{ab}&=\tripow{x}{}{a}+\tripow{x}{}{b}
    \\
    \tripow{x}{1/y}{}&=\tripow{}{y}{x}
    \\
    \tripow{x}{\tripow{x}{}{z}}{}&=z
        \qquad\qquad\qquad\qquad
    \text{or}& \tripow{x}{\tripow{x}{}{z}}{z}
    \\
    \tripow{x}{}{\tripow{x}{y}{}}&=y
        \qquad\qquad\qquad\qquad
    \text{or}& \tripow{x}{y}{\tripow{x}{y}{}}
    \\
    \tripow{}{y}{\tripow{x}{y}{}}&=x
        \qquad\qquad\qquad\qquad
    \text{or}& \tripow{x}{y}{\tripow{x}{y}{}}
    \\
    \tripow{\tripow{}{y}{z}}{y}{}&=z
        \qquad\qquad\qquad\qquad
    \text{or}& \tripow{\tripow{}{y}{z}}{y}{z}
\end{align}
This is a line of text. This text says alot of interesting stuff and 
does not intersect.
Here is some more in-line text followed by $\tripow{x}{y}{z}$ which is
the same as saying $x^y=z$. The text on the this line does not 
intersect either.
\end{document}

gives you example


After some tinkering with the variants, I've come up with this:

\newcommand{\PowerTriangle}[3]{ \mathop{\vphantom{\triangle}}_{#1}\hspace{-0.17em}{\stackrel{#2}{\triangle}}_{#3}}

enter image description here

The subscripts are a bit lower than in the original post and it looks better in my opinion.


I've attempted to create a command which will typeset the "Triangle of Power" in a nice way. My best effort so far is the following:

\newcommand{\tripow}[3]{ _{#1}{\stackrel{#2}{\triangle}}_{#3}}
$\tripow{x}{y}{z}$

The only issue is that the right subscript appears a little low. But it does allow nesting fairly well.