We prove this in a similar style to [1]}, using a
well-founded relation. We first consider the relation \(R =\lbrace (\langle \pi _1\ \lceil \!\!\rfloor \ \pi _1^{\prime }\rangle , \langle \pi _2\ \lceil \!\!\rfloor \ \pi _2^{\prime }\rangle ) \mid \langle \pi _2\ \lceil \!\!\rfloor \ \pi _2^{\prime }\rangle \rightarrow \langle \pi _1\ \lceil \!\!\rfloor \ \pi _1^{\prime }\rangle  \rbrace \) . We define the function \(\texttt {terms}(\pi )\) ,
which returns the number of terms in \(\pi \) , such that
\(\texttt {terms}(\epsilon ) = 0 \\\texttt {terms}(\texttt {p}!\ell (S)) = 1 \qquad \texttt {terms}(\texttt {p}?\ell (S)) = 1 \\\texttt {terms}(\pi _1.\pi _2) = \texttt {terms}(\pi _1) + \texttt {terms}(\pi _2)\) 
