Suppose there is a surjection f : S → P(S). Consider the set X={x∈S|x∉f(x)} . Since f is a surjection, X = f(y) for some y in S. Does y lie in X? If y∈X , then y∈f(y) , so by definition of X, y∉X . If y∉X , then y∉f(y), so y must belong to X. Contradiction.
Ex 2.
Since there is a function f:T→T without fixed points, T must have at least two elements. Hence, there is a surjection s:T→{0,1} , which induces a surjection TS→2S (a function g:S→T goes to s∘g ). So, if there were a surjection S→TS , there would also be a surjection S→2S , which cannot be by previous exercise.
Ex 4.
Suppose f:S→Comp(S,{T,F}) is a computable surjective function. Consider the function g:S→{T,S}defined by g(s)=¬f(s)(s). The function g is computable, therefore there should exist an s∗∈S: f(s∗)=g .
Then f(s∗)(s∗)=g(s∗)=¬f(s∗)(s∗) . Contradiction.
Ex 5.
Suppose halt(x,y) is a computable function. Consider the function f:S→{T,F}: f(s)=¬s(s) if halt(s,s); T if ¬halt(s,s)
Suppose s′ is a Turing code of f. Since f halts everywhere, halt(s’, s’) = T. But then s′(s′)=f(s′)=¬s′(s′) . Contradiction.
Ex 6.
Suppose that f:X→Cont(X,S) is a continuous surjection. Consider the function g∈Cont(X,S)g(x)=−f(x,x) (here—f(x, x) is a point diametrically opposed to f(x, x)). f is surjective, hence g = f(y), but then g(y) = f(y,y) = - f(y,y). Contradiction.
Self-referential definitions can be constructed with the diagonal lemma. Given that the point of the exercise is to show something similar, you’re right that this solution is probably a bit suspect.
I might be wrong, but I believe this is not correct. The diagonal lemma lets you construct a sentence that is logically equivalent to something including its own godel numeral. This is different from having its own godel numeral be part of the syntactic definition.
In particular, the former isn’t recursive. It defines one sentence and then, once that sentence is defined, proves something about a second sentence which includes the godel numeral of the first. But what seed attempted (unless I misunderstood it) was to use the godel numeral ┌ψ┐ in the syntactic definition for ψ, which doesn’t make sense because ┌ψ┐ is not defined until ψ is.
Ex 1.
Suppose there is a surjection f : S → P(S). Consider the set X={x∈S|x∉f(x)} . Since f is a surjection, X = f(y) for some y in S. Does y lie in X? If y∈X , then y∈f(y) , so by definition of X, y∉X . If y∉X , then y∉f(y), so y must belong to X. Contradiction.
Ex 2.
Since there is a function f:T→T without fixed points, T must have at least two elements. Hence, there is a surjection s:T→{0,1} , which induces a surjection TS→2S (a function g:S→T goes to s∘g ). So, if there were a surjection S→TS , there would also be a surjection S→2S , which cannot be by previous exercise.
Ex 4.
Suppose f:S→Comp(S,{T,F}) is a computable surjective function. Consider the function g:S→{T,S}defined by g(s)=¬f(s)(s). The function g is computable, therefore there should exist an s∗∈S: f(s∗)=g .
Then f(s∗)(s∗)=g(s∗)=¬f(s∗)(s∗) . Contradiction.
Ex 5.
Suppose halt(x,y) is a computable function. Consider the function f:S→{T,F}: f(s)=¬s(s) if halt(s,s); T if ¬halt(s,s)
Suppose s′ is a Turing code of f. Since f halts everywhere, halt(s’, s’) = T. But then s′(s′)=f(s′)=¬s′(s′) . Contradiction.
Ex 6.
Suppose that f:X→Cont(X,S) is a continuous surjection. Consider the function g∈Cont(X,S) g(x)=−f(x,x) (here—f(x, x) is a point diametrically opposed to f(x, x)). f is surjective, hence g = f(y), but then g(y) = f(y,y) = - f(y,y). Contradiction.
Ex 7. A quine in python3:
code = “”“code = {}{}{}{}{}{}{}
print(code.format(‘”’,‘”’,‘”’,code,‘”’,‘”’,‘”’))”””
print(code.format(‘”’,‘”’,‘”’,code,‘”’,‘”’,‘”’))
Ex 8. In python:
import inspect
def f(string):
return string[::-1]
def applytoself(f):
source = inspect.getsource(f)
return f(source)
applytoself(f)
‘\n]1-::[gnirts nruter \n:)gnirts(f fed’
Ex 9.
The formula for ψ is ∀x((x=┌ψ┐)→ϕ(x))
Ex 11.
Suppose ϕ is the formula Bew(x)→ψ . By the diagonal lemma, there exists a formula A such that ⊢A↔(Bew(A)→ψ) .
Therefore, ⊢Bew(A→(Bew(A)→ψ))
By property c, ⊢Bew(A)→Bew(Bew(A)→ψ)
Again by property c, ⊢Bew(Bew(A)→ψ)→(Bew(Bew(A))→Bew(ψ))
Combining previous two implications, ⊢Bew(A)→(Bew(Bew(A))→Bew(ψ))
Since ⊢Bew(A)→Bew(Bew(A)) , we have
⊢Bew(A)→Bew(ψ)
Combining this with ⊢Bew(ψ)→ψ , we get
⊢Bew(A)→ψ
From this we get ⊢A , therefore, ⊢Bew(A) and ⊢ψ . QED.
Don’t know if this is still relevant, but on Ex9
you definitely can’t define ψ this way. Your definition includes the godel numeral for ψ, which makes the definition depend on itself.
Self-referential definitions can be constructed with the diagonal lemma. Given that the point of the exercise is to show something similar, you’re right that this solution is probably a bit suspect.
I might be wrong, but I believe this is not correct. The diagonal lemma lets you construct a sentence that is logically equivalent to something including its own godel numeral. This is different from having its own godel numeral be part of the syntactic definition.
In particular, the former isn’t recursive. It defines one sentence and then, once that sentence is defined, proves something about a second sentence which includes the godel numeral of the first. But what seed attempted (unless I misunderstood it) was to use the godel numeral ┌ψ┐ in the syntactic definition for ψ, which doesn’t make sense because ┌ψ┐ is not defined until ψ is.