4

Consider the expression $g(f(x)).$ Its easy to draw this in a tree diagram; the bottom node is $x$, above that is $f$, and above that is $g$.

Now consider the $(D(f))(x),$ for instance imagine that $D$ denotes differentiation. If you try to draw this as a tree, you'll get "brackets" in your tree. (Try it!)

To avoid these brackets, the best way is probably to introduce an "evaluation function" $\mathrm{eval}(*,*)$ such that $\mathrm{eval}(f,x) = f(x)$ so long as this expression is defined. Then we have $$(D(f))(x) = \mathrm{eval}(D(f),x)$$

and we can draw this as a tree just fine. Problem solved!

However, to formalize this in ZFC, we'd have to restrict the definition of $\mathrm{eval}$ to functions $f$ that are 'internal' to the theory. In particular, theorems like $$\mathrm{eval}(\mathrm{eval},(f,x)) = f(x)$$

aren't even grammatically coherent. This seems moderately wasteful of what appears to be a perfectly legitimate (though trivial) theorem. Probably, there are similar - but less trivial - theorems provable in a self-referential language that allows these kinds of things.

So, my question is, is there a simple formalism in which self-referential definitions like the above can be made safely? It would have to be just restrictive enough to block Russell-like paradoxes, but not so restrictive so as to block our ability to define self-referential functions like $\mathrm{eval}, \mathrm{identity}, \mathrm{domain}, \mathrm{range}, \mathrm{kernel}$ etc.


Discussion. What we'd really like is to be able to assert that $$\mathrm{eval}(f,x) = f(x)$$

for all functions $f,$ including functions like $\mathrm{eval}, \mathrm{identity}, \mathrm{domain}, \mathrm{range}, \mathrm{kernel}$ etc.

However, just allowing definition-by-cases leads to Russell-like paradoxes. For instance, lets assume that there exists a non-function, call it $3$ for concreteness (we'll have to assume that $3$ is not a Church numeral for this argument to work!). Now define a function $g$ by cases as follows.

$$f(f)=f \rightarrow g(f) = 3$$ $$f(f)\neq f \rightarrow g(f) = f.$$

Try to evaluate $g(g)$ and you'll get a contradiction.


In the comments, Qiaochu suggested the use of the lambda calculus and/or a fixed point combinator to define such functions. I'm a bit unsure as to what this would look like and/or how to proceed. For example, suppose we have a first-order theory $T$, like ZFC, how would we extend this with a function like $\mathrm{eval}$? Since first-order logic has no support for this sort of thing, I can't really conceive of how this might be done.

goblin GONE
  • 67,744
  • Look up the antifoundation axiom. It removes the foundation axiom and replaces it with something that actually demands such self-referential objects exist. – Zach L. Aug 23 '13 at 04:23
  • $\text{eval}$ clearly exists in the sense that I can write down a computer program instantiating it for other computer programs. In particular it should be true that $\text{eval}(\text{eval}, (f, x)) = f(x)$ in this setting. Then the problem with the function $g$ you define is that attempting to evaluate $g(g)$ causes an infinite loop. Nevertheless, $g$ also exists in the sense that you can write down a computer program instantiating it. – Qiaochu Yuan Aug 23 '13 at 04:41
  • 1
    Anyway, in general it seems like the "right" way to define a self-referential object is to appeal to a fixed point theorem of some kind. The use of fixed point combinators in the simply typed lambda calculus is one manifestation of this. – Qiaochu Yuan Aug 23 '13 at 04:42
  • @QiaochuYuan, how do fixed point combinators and the lambda calculus connect to first order theories? Like if I have a first-order theory like ZFC and a function $\mathcal{P}$ that returns powersets, how do I define the $\mathrm{eval}$ function in such a way that $\mathrm{eval}(\mathcal{P},x) = \mathcal{P}(x),$ etc.? – goblin GONE Sep 20 '13 at 05:54
  • @QiaochuYuan, I mean, do I have to code $\mathcal{P}$ syntactically or something? I'm just completely unsure how to proceed. – goblin GONE Sep 20 '13 at 05:55
  • I didn't mean that's the method you'd use, I mean it's analogous to the method you'd use. Similar fixed-point arguments let you construct, for example, Godel sentences. – Qiaochu Yuan Sep 20 '13 at 18:28

1 Answers1

2

If don't know about your $eval$ function, but $Dom$ (domain) might be formally defined as:

$\forall f,x,y (f:x\to y \implies Dom(f)=x)$

$Dom$ is an operator, but not a function in the usual sense of a mapping from the elements of one set to the elements of another. So, $Dom(Dom)$ doesn't make any sense. It has nothing to do with self-reference.