Definition:Substitution (Formal Systems)/Well-Formed Part

Definition
Let $\mathcal F$ be a formal language with alphabet $\mathcal A$.

Let $\mathbf B$ be a well-formed formula of $\mathcal F$.

Let $\mathbf A$ be a well-formed part of $\mathbf B$.

Let $\mathbf A'$ be another well-formed formula.

Then the substitution of $\mathbf A'$ for $\mathbf A$ in $\mathbf B$ is the collation resulting from $\mathbf B$ by replacing all occurrences of $\mathbf A$ in $\mathbf B$ by $\mathbf A'$.

It is denoted as $\mathbf B \left({\mathbf A' \mathbin{//} \mathbf A}\right)$.

Note that it is not immediate that $\mathbf B \left({\mathbf A' \mathbin{//} \mathbf A}\right)$ is a well-formed formula of $\mathcal F$.

This is either accepted as an axiom or proven as a theorem about the formal language $\mathcal F$.