Recursion

Recursion was the concept that ideas and concepts, as Nyssa put it, "fold back on themselves". Trying to come to grips with the concept, Tegan surmised that "if we had an index file we could look it up in the index file under 'index file'".

Later, the Fifth Doctor called this exchange with Mergrave a "perfect example of recursion":
 * Doctor: How do I know you're telling the truth?
 * Mergrave: Because, sir, I maintain that I am. And I am a man of my word.

The Doctor later realised that Castrovalva itself was — as a mathematical construct of — inherently recursive. The Master intended to trap the Doctor there as the recursion folded in on itself and the reality collapsed. (TV: Castrovalva)

Recursão