- (s)(P(s) → R(s))
I find the following way of securing self-reference easier to understand. Start with a language that has nestable quotation marks, which I'll represent with ‘...’, and some string manipulation tools. I'll use straight double quotation marks for meta-language quotation. Add to the language a new symbol "@" which is ungrammatical (i.e., no well-formed formula may contain it). For any sequence of symbols s, we define two new sequences of symbols N(s) and Q(s) by the following rules. If s contains no quoted expressions or contains imbalanced opening and closing quotation marks, N(s) and Q(s) are just "@". If s contains a quoted expression, Q(s) is the first quoted expression, without its outermost quotation marks (but with any nested quotations being included), and N(s) is the result of taking s and replacing that first quoted occurrence of Q(s), as well as its surrounding single quotation marks, with "@". Thus:
- Q("abc‘def‘ghi’’+jkl")="def‘ghi’"
- N("abc‘def‘ghi’’+jkl")="abc@+jkl".
- (s)(‘(s)(@=M(s) → R(s))’=M(s) → R(s)).
One can also adapt this to work with Goedel numbers and hence presumably for use in proving incompleteness.
[Removed a nasty typo.]