In Logic and Structure, Van Dalen writes,
Theorem 1.1.6 (Defintion by Recursion) Let mappings $H_\square:A^2\rightarrow A$ and $H_\neg:A\rightarrow A$ be given and let $H_{at}$ be a mapping from the set of atoms into $A$, then there exists exactly one mapping $F:PROP\rightarrow A$ such that $F(\phi)=H_{at}(\phi)$ for $\phi$ atomic and $$F((\phi\square\psi))=H_\square(F(\phi),F(\psi))\text{ and }F((\neg\phi))=H_\neg(F(\phi)).$$
One example is the rank function. Let $H_\square:=(n,m)\mapsto\sup(n,m)+1$ be a mapping of $\mathbb{N}^2$ into $\mathbb{N}$, and let $\sigma$ (the successor function) be $H_\neg$. Define $H_{at}(\phi):=0$ for all atomic $\phi$. Then $r:PROP\rightarrow\mathbb{N}$ such that $r(\phi)=0$ for atomic $\phi$, $r(\neg\phi)=H_\neg(r(\phi))=r(\phi)+1$ and $$r((\phi\square\psi))=H_\square(r(\phi),r(\psi))=\sup(r(\phi),r(\psi))+1.$$
Another example is the set of sub formulas $Sub(-)$ of a formula. Here Van Dalen says
Definition 1.1.7 The set of sub formulas $Sub(\phi)$ is given be
- $Sub(\phi)=\{\phi\}$ for atomic $\phi$
- $Sub(\phi_1\square\phi_2)=Sub(\phi_1)\cup Sub(\phi_2)\cup\{\phi_1\square\phi_2\}$
- $Sub(\neg\phi)=Sub(\phi)\cup\{\neg\phi\}$
It seems that $H_{at}$ is the function $\phi\mapsto\{\phi\}$ in this case. What are the function $H_\square$ and $H_\neg$ in this example?