Self-reference

Self-reference is a phenomenon in natural or formal languages consisting of a sentence or formula referring to itself directly, through some intermediate sentence or formula, or by means of some encoding. In philosophy, it also refers to the ability of a subject to speak of or refer to themself: to have the kind of thought expressed in English by "I".

Self-reference is possible when there are two logical levels, a level and a meta-level. It is most commonly used in mathematics, philosophy, computer programming, and linguistics. Self-referential statements can lead to paradoxes (but see antinomy for limits on the significance of these).

Usage
An example of a self-reference situation is the one of autopoiesis, as the logical organization produces itself the physical structure which create itself.

In metaphysics, self-reference is subjectivity, while "hetero-reference", as it is called (see Niklas Luhmann), is objectivity.

Self-reference also occurs in literature when an author refers to his work in the context of the work itself. Famous examples include Cervantes's Quixote, Denis Diderot's Jacques le fataliste et son maître, Italo Calvino's If on a winter's night a traveler, many stories by Nikolai Gogol, Lost in the Funhouse by John Barth, and Luigi Pirandello's Six Characters in Search of an Author. This is closely related to the concept of breaking the fourth wall or meta-reference (which often involve self-reference).

The surrealistic painter René Magritte is famous for his self-referential works. "The Treachery of Images," shown at right, includes words claiming, in French, it is not a pipe, the truth of which depend entirely on what the word "ceci" (in English, "this") is taken to refer to. Is it the pipe depicted&mdash;or is it the painting or even the sentence itself?

Self-reference is also employed in tautology and in licensed terminology. When a word defines itself (e.g., "Machine: any objects put together mechanically"), the result is a tautology. Such self-references can be quite complex, include full propositions rather than simple words, and produce arguments and terms that require license (accepting them as proof of themselves).

Self-reference in computer science is seen in the concept of recursion, where a program unit relies on instances of itself to perform a computation. The Lisp programming language is especially designed to exploit recursion. Object oriented languages use special keywords to refer to the current instance of an object:  in C++, Java, and PHP;   in Smalltalk and Objective C; and   in Visual Basic.

Examples
Many of the following examples appear in Douglas Hofstadter's Gödel, Escher, Bach: an Eternal Golden Braid or Metamagical Themas.

Mathematics

 * Tupper's self-referential formula

Sentences

 * This statement is short.
 * I am not the subject of this sentence.
 * "I" is the subject of this sentence.
 * Which question is also its own answer?
 * "Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation. (This is a version of the liar paradox, an example of indirect self-reference through a quine, which leads to a paradox.)
 * The statement that the word "false" should be interpreted as "not true" is false. (another version of the liar paradox)
 * Russell's paradox: The set of all sets which are not elements of themselves (which includes, and therefore does not, and therefore does include itself)
 * The Examples section of this article refers to itself.
 * This sentence exemplifies cacozelia (using rare/foreign words to appear learned).
 * Click here
 * Do not read this.
 * This page intentionally left blank.

The Fumblerules
Fumblerules state rules of good grammar and writing through sentences that violate those very rules. George L. Trigg and William Safire have made their own lists, but anyone knowledgable on grammar can do the same. See List of Fumblerules for a comprehensive (yet non-exhaustive) list.

Literature

 * "beware: do not read this poem" by Ishmael Reed - "the hunger of this poem is legendary, it has taken in many victims"
 * The Monster at the End of This Book references itself in the title, as well as throughout the story.
 * Steal This Book by Abbie Hoffman
 * The Cat Who Walks Through Walls by Robert A. Heinlein considers the universe (multiverse) as an author-manipulated object including the plot in the book itself.
 * Sophie's World by Jostein Gaarder, in which the titular character realizes she is the character of a book.
 * Neverending Story by Michael Ende uses self-reference of the book prominently, when a character (Atreyu) of a story within the story (also called 'Neverending Story') finds a book called the same, and it is the same book the reader is reading.

Other

 * Self-enumerating pangrams
 * A Wikipedia Article entitled Self Reference.
 * Article 52 of the Irish Constitution has prohibited publication of Article 52 in official texts since 1938 despite continuing to have the force of law