Definition of relation symbols
According to this wikipedia page https://en.wikipedia.org/wiki/Extension_by_definitions, an extension by definition is the following. Let $T$ be a first order theory and $\varphi(x_1,...,x_n)$ be a formula of $T$. We form a new first order theory $T'$ by adding a new $n$-ary relation symbol $R$ the logical axioms featuring $R$ and the axiom $$\forall x_1...\forall x_n( R(x_1,...x_n) \iff \varphi(x_1,...,x_n)).$$
Definition of function symbols
Let $T$ be a first order theory and $\phi(x_1,...,x_n)$ a formula of $T$ such that $y,x_1,...,x_n$ are distinct and include the variables free in $\phi(x_1,...,x_n)$. Assume that we can prove $$\forall x_1...\forall x_n \exists!y(\phi(y,x_1,...,x_n)$$ in $T$. Then we can form a new theory $T'$ from $T$ by adding a new $n$-ary function symbol $f$, the logical axioms of $f$ as well as the axiom $$\forall x_1...\forall x_n (\phi(f(x_1,...,x_n),x_1,...,x_n)).$$
As far as I understand it, the we have the following examples:
$(1)$ Consider two sets $X,Y$ as well as a function $f:X \to Y$. Then we know that for all $x \in X$ there exists exactly one $y \in Y$ such that $(x,y) \in f$. Hence we can introduce a new symbol $f(x)$ denoting this object $y$.
$(2)$ Consider two sets $A,B$. Then there exists exactly one set $X$ that satisfies $\forall x(x \in X \iff x \in A \wedge x \in B)$. We introduce a new symbol $A \cap B$ to denote this set.
Questions
$(i)$ Is the following also an example of definitional extension? Consider a function $F:X \times X \to X$ such that $X$ is a set whose elements are functions from $Y \to Z$, where $Y$ and $Z$ are sets such that the following is satisfied: For all $y \in Y$ and all $f,g \in X$ satisfying $f(y)=g(y)=z$ we have that $F(f,h)(y)=F(g,h)(y)$ and we thus define this object to be $F_z(h).$
$(ii)$ What exactly is the difference between relation and function symbols? What is an example for a "new" relation symbol?
$(iii)$ What does "the logical axioms of $f$" mean, as it is mentioned in the definition of function symbols?
$(iv)$ Why do the $y,x_1,...,x_n$ need to be distinct? What is even meant by distinct? Does this mean that they refer to distinct objects and if so, what would go wrong if they refer to the same object?