Self reference

A 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 organisation 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, Douglas Adams's Hitchhiker's Guide to the Galaxy, and Luigi Pirandello's Six Characters in Search of an Author. This is closely related to the concept of breaking the fourth wall. The surrealistic painter René Magritte is famous for his self-referential works.

Another example of a self-referential scene is from Paul Robinson's book "The Gatekeeper: The Gate Contracts," which contains a story primarily about two people, George Green, and his associate, Lynn, who are both college students, and are currently working for a famous professor. George walks into a library, and the somewhat humorous scene where the book actually ridicules itself is as follows:
 * I went to the library to get another couple of books to replace the ones I had finished. I've always had a long history of reading books, and I've always done a lot of reading even if I don't do written work very well.  I looked around for some books.
 * I saw one on the new books carousel / Lazy Susan that shocked me. The Gatekeeper: The Gate Contracts, by Paul Robinson.  I wasn't sure, that is a common name, could it actually be my friend who was a workaholic cretin and ended up sleeping in his car after being fired, many years earlier?  I read part of the description:  What is the meaning of life?  Read and find out through the adventures of a pair of college students who search for the answer, with the help of a famous professor. Yeah, right, as if someone really knows the answer.  It couldn't be the same guy I knew.  The Paul Robinson I knew couldn't have been that bright or he would have known enough to at least brush his teeth and shower every day.
 * I saw the picture of him on the back cover: I couldn't believe it!  I recognized him, it was my friend from California, a few years older.  Paul hadn't changed a bit; he was still lots bigger than me; as fat as Quarles, if not more.  Probably sat around all day hunched over a word processor, so crushed from what happened and finding places wouldn't hire him because of his odor, so he was unable to go out and get a real job where he had to work for a living, like he had before.  I knew him; the claims were too much; he couldn't possibly know anything worth reading.  I put the book back on the shelf, unopened.
 * I felt so sorry for him to degrade himself like that, telling lies to try and sell a book in which he couldn't possibly have anything worthwhile to say.

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 like  in Java, PHP, or C++ or   in Visual Basic.

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?
 * This sentence contains thirty-eight letters.
 * This sentence fragment no verb.
 * This sentence has, and therefore contains, two verbs.
 * "Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation. (This, the original quine, is a version of the liar paradox, an example of indirect self-reference leading to a 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).
 * Every rule has exceptions.
 * All generalizations are false.
 * 74.6% of statistics are completely made up.
 * The following statement is true. The preceding statement is false.
 * This statement doesn't contain the letter 'y'.
 * Is this a question?
 * There are two errors in this this statement.
 * Thit sentence is not self-referential because 'thit' is not a word. ~ Douglas Hofstadter
 * If the meanings of "true" and "false" were switched, then this sentence wouldn't be false.
 * Click here
 * You are here.
 * "If it weren't for the last minute, nothing would get done."
 * If you smirk/smile while/after reading this sentence, you're more likely to agree that this is a smirk/smile-generating sentence (and hopefully also laughter).

Songs

 * "Hallelujah" by Leonard Cohen - "It goes like this: the fourth, the fifth, the minor fall, the major lift" (accompanied in time by the described chord progression)
 * "Radio Song" by Jet - "This won't be played on your radio tonight"
 * "Tribute" by Tenacious D - "This is not the greatest song in the world, no, this is just a tribute"
 * "Yellow" by Coldplay - "I wrote a song for you, and all the things you do, and it was called 'Yellow'"
 * "Your Song" by Elton John - "And you can tell everybody this is your song"

Poetry

 * "beware: do not read this poem" by Ishmael Reed - "the hunger of this poem is legendary, it has taken in many victims"

Other
Self-enumerating pangrams