An example of a valuation function Let $F$ be the set of all functions from $\mathbb{N}$ into $\mathbb{N}$. For $f,g\in F$ define
$\text{val}(f,g)=\begin{cases}\min\{n\in\Bbb N~:~f(n)\neq g(n)\}&\text{if}~f\neq g\\\infty&\text{if}~f=g\end{cases}$
where $\infty$ is a new symbol.
Question. For $n\in\mathbb{N}$ let $s_n\in F$ be the constant function that takes the value $n$ for all variables. For $n,m\in\mathbb{N}$ find $val(s_n,s_m)$.
My answer. Assume $s_n\neq s_m$. Note that $s_n(x)=n$ for all $x$ and $s_m(x)=m$ for all $x$. So, what I say about $\min\{n\in\Bbb N~:~f(n)\neq g(n)\}$? Can you help?
 A: We split in two cases, either $m = n$ or $m \neq n$.
If $m=n$, we find that $s_n(k) = s_m(k)$ for every natural number $k$, and thus we find that $\text{val}(s_n,s_m) = \infty. $
We now consider the case that $m \neq n$. Then, $s_m(k) \neq s_n(k)$ for every natural number $k$. Thus, val($s_n,s_m) = 0$ (or 1, depending on how you define the natural numbers). 
A: I feel like there is a poor choice of variable names in your question. Rather than $s_n$ and $s_m$ write $s_p(n)$ and $s_m(n)$. Then if $m=p$, $val(s_m,s_p) = \infty$ since $s_p(n) = s_m(n) = m$ for all $n$.
If, say, $m<p$, then $s_m(0) = m < s_p(0) = p$, so $val(s_m,s_p) = 0$.
A: Just conceptually, think of what the function $val(f,g)$ is trying to output: it outputs the smallest ('first') value of $n$ for which $f(n)$ and $g(n)$ are not the same. So, if $f$ and $g$ are both constant functions, but different, then of course they are different for any $n$, and hence $val(f,g)$ in that case will output the smallest value that $n$ can take on ... which is either $0$ or $1$, depending on how you define the natural numbers.
