Self-reference occurs in natural or formal languages when a sentence, idea or formula refers to itself. The reference may be expressed either 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 itself: to have the kind of thought expressed by the first person nominative singular pronoun, the word "I" in English.
Self-reference is studied and has applications in mathematics, philosophy, computer programming, and linguistics. Self-referential statements are sometimes paradoxical, and can also be considered recursive.
Self-reference occurs in literature and film when an author refers to his or her own work in the context of the work itself. Famous examples include Cervantes's Don Quixote, Shakespeare's A Midsummer Night's Dream, 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, Luigi Pirandello's Six Characters in Search of an Author and Federico Fellini's 8½. This is closely related to the concepts of breaking the fourth wall and meta-reference, which often involve self-reference.
The surrealist painter René Magritte is famous for his self-referential works. His painting The Treachery of Images, includes the words this is not a pipe, the truth of which depends entirely on whether the word "ceci" (in English, "this") refers to the pipe depicted—or to the painting or the word or sentence itself.
In computer science, self-reference occurs in reflection, where a program can read or modify its own instructions like any other data. Numerous programming languages support reflection to some extent with varying degrees of expressiveness. Additionally, self-reference is seen in recursion (related to the mathematical recurrence relation), where a code structure refers back to itself during computation.
A word that describes itself is called an autological word (or autonym). This generally applies to adjectives, for example sesquipedalian (i.e. "sesquipedalian" is a sesquipedalian word), but can also apply to other parts of speech, such as TLA, as a three-letter abbreviation for "three-letter abbreviation", and PHP which is a recursive acronym for "PHP: Hypertext Preprocessor".
A sentence which inventories its own letters and punctuation marks is called an autogram.
- There is a special case of meta-sentence in which the content of the sentence in the metalanguage and the content of the sentence in the object language are the same. Such a sentence is referring to itself. However some meta-sentences of this type can lead to paradoxes. "This is a sentence." can be considered to be a self-referential meta-sentence which is obviously true. However "This sentence is false" is a meta-sentence which leads to a self-referential paradox.
Fumblerules are a list of rules of good grammar and writing, demonstrated through sentences that violate those very rules, such as "Avoid cliches like the plague" and "Don't use no double negatives". The term was coined in a published list of such rules by William Safire.
- Gödel sentence
- Loop (graph theory)
- Tupper's self-referential formula
- Problematic definition of multiplication with self-referential 'added to itself' phrase (falsely) attributed to Euclid
In literature, film, and popular culture
- The subgenre of "recursive science fiction" is now so extensive that it has fostered a fan-maintained bibliography at the New England Science Fiction Association's website; some of it is about science fiction fandom, some about science fiction and its authors.
- Soto-Andrade, Jorge; Jaramillo, Sebastian; Gutierrez, Claudio; Letelier, Juan-Carlos. "Ouroboros avatars: A mathematical exploration of Self-reference and Metabolic Closure" (PDF). MIT Press. Retrieved 16 May 2015.
- Nöth, Winfried; Bishara, Nina (2007). Self-reference in the Media. Walter de Gruyter. p. 75. ISBN 978-3-11-019464-7.
- Malenfant, J.; Demers, F-N. "A Tutorial on Behavioral Reflection and its Implementation" (PDF). PARC. Retrieved 17 May 2015.
- Drucker, Thomas (4 January 2008). Perspectives on the History of Mathematical Logic. Springer Science & Business Media. p. 110. ISBN 978-0-8176-4768-1.
- PHP Manual: Preface, www.php.net
- Hofstadter, Douglas. Gödel, Escher, Bach: An Eternal Golden Braid. 20th anniversary ed., 1999, p. 152. ISBN 0-465-02656-7
- alt.usage.english.org's Humorous Rules for Writing
- Safire, William (1979-11-04). "On Language; The Fumblerules of Grammar". New York Times. p. SM4.
- "Recursive Science Fiction" New England Science Fiction Association website, last updated 3 August 2008
- Bartlett, Steven J. [James] (Ed.) (1992). Reflexivity: A Source-book in Self-reference. Amsterdam, North-Holland. (PDF). RePub, Erasmus University
- Hofstadter, D. R. (1980). Gödel, Escher, Bach: an Eternal Golden Braid. New York, Vintage Books.
- Smullyan, Raymond (1994), Diagonalization and Self-Reference, Oxford Science Publications, ISBN 0-19-853450-7
- Crabtree, Jonathan (2016), The Lost Logic of Elementary Mathematics and the Haberdasher who Kidnapped Kaizen, Proceedings of the Mathematical Association of Victoria (MAV) Annual Conference, 53, 98-106, ISBN 978-1-876949-60-0