Algebraic structures
There are so many mathematical structures arising from considering an n-ary relation on a set and defining proporties the relation needs to obey. So we consider an abstract set A and a n-ary relation on it.
(\textcolor{limegreen}{\mathcal{A}},\star) \quad \textcolor{limegreen}{\mathcal{A}} \ \ abstract \ set \qquad \star \ n-ary \ relation
More formally we define an n-tupel set as the n-times cartestian product of A on itself:
\textcolor{ForestGreen}{n} \in \textcolor{ForestGreen}{\mathbb{N}}_0 \hspace{2cm} \textcolor{limegreen}{\mathcal{A}}^0 := \emptyset \qquad \textcolor{limegreen}{\mathcal{A}}^1 := \textcolor{limegreen}{\mathcal{A}} \qquad \textcolor{limegreen}{\mathcal{A}}^2 := \textcolor{limegreen}{\mathcal{A}} \times \textcolor{limegreen}{\mathcal{A}} \qquad \textcolor{limegreen}{\mathcal{A}}^{\textcolor{ForestGreen}{n}} := \underset{\textcolor{ForestGreen}{n} \ times}{\underbrace{\textcolor{limegreen}{\mathcal{A}} \times \cdots \times \textcolor{limegreen}{\mathcal{A}}}}
A n-ary relation takes now the concrete form as a mapping from the n-tupel set to some other set Y.
\textcolor{ForestGreen}{n}-ary \ relation: \hspace{2cm} \star : \textcolor{limegreen}{\mathcal{A}}^{\textcolor{ForestGreen}{n}} \to Y
Most interesting are the structures with one or two binary relations.