Let's hypothesize a function $f(x)$ that checks the validity of some value $x$ in a set of number $X$. At the beginning each number is valid, so $f(x)=1$ for all $x$.
Then we define a higher-order function $g$, that takes a number $x_i$ and works on $f$, so that $g(x_i, f) = f'$ and $f'(x) = 0$ for $x = x_i$ and $f'(x) = 1$ for every other $x$.
Reapplying it on $f'$: $g(x_j, f') = f''(x)$ that returns $0$ for both $x_i$ and $x_j$ but $1$ for every other number of the set.
Is there any set of $f,g,\{x\}$ that satisfies these properties?
$$(g(x_i, _))(x) = [x_i\ne x] = \begin{cases}0, &x=x_i\ 1, &\text{otherwise}\end{cases}$$
where the $[\ldots]$ is the Iverson bracket.
– peterwhy Feb 07 '24 at 23:25