How to define a block of all non-self-referencing blocks?

An OCaml block has the form

Header | field 0 | field 1 | …. | field n

where each field k can be a pointer to some other block. A block is non-self-referencing if none of its fields is a pointer to the block itself (that is, a pointer to its own field 0). Now I want to define a block (call it G) whose fields are pointers to all the non-self-referencing blocks in the program, should I make one field of G be a pointer to G itself? The problem is that if I make G self-referencing, then G shall not have a pointer to itself; but if G is not self-referencing, I should then let a field of G be a pointer to itself.

I’m glad that my work is being used in XXI century. Even if it is being used for jokes.


A correction: in order to successfully make a paradox, the goal shall be to define a block of all and only non-self-referencing blocks, instead of to define a block of just all non-self-referencing blocks. In the latter case, a pointer to self can safely be added, which satisfies the all but is at odds with the only.

This joke coincides with @Bertrand.Russel ’s paradox on sets, but actually I made up it inspired by Gödel after reading his sketch of the proof of the incompleteness theorem, in section 1 of his paper On formally undecidable propositions of principia mathematica and related systems I. He assumes a enumerable set of unary predicates, on natural numbers and indexed by natural numbers, like Rn(m) where n is the index and m the argument natural number, and dedicated a set K as containing all and only those k such that Rk(k) is false. The paradox arises when he tried to find an Rj that is true for all and only members of K, and the problematic question is: should Rj(j) be true or false? The paradox goes:

Rj(j) false ↔ j ∈ K ↔ Rj(j) true

1 Like