Let f be such a surjection. Construct a member of P(S) outside f’s image by differing from each f(x) in whether it contains x.
#2
A nonempty set has functions without a fixed point iff it has at least two elements. It suffices to show that there is no surjection from S to S → 2, which is analogous to #1.
#3
T has only one element. Use that one.
#7 Haskell
source = “main = putStrLn (\”source = \” ++ show source ++ \”\\n\” ++ source)” main = putStrLn (“source = ” ++ show source ++ “\n” ++ source)
Is #8 supposed to read “Write a program that takes a function f taking a string as input as input, and produces its output by applying f to its source code. For example, if f reverses the given string, then the program should outputs its source code backwards.”?
If so, here.
source = “onme = putStrLn $ f $ \”source = \” ++ show source ++ \”\\n\” ++ source” onme f = putStrLn $ f $ “source = ” ++ show source ++ “\n” ++ source
#1
Let f be such a surjection. Construct a member of P(S) outside f’s image by differing from each f(x) in whether it contains x.
#2
A nonempty set has functions without a fixed point iff it has at least two elements. It suffices to show that there is no surjection from S to S → 2, which is analogous to #1.
#3
T has only one element. Use that one.
#7 Haskell
source = “main = putStrLn (\”source = \” ++ show source ++ \”\\n\” ++ source)”
main = putStrLn (“source = ” ++ show source ++ “\n” ++ source)
Is #8 supposed to read “Write a program that takes a function f taking a string as input as input, and produces its output by applying f to its source code. For example, if f reverses the given string, then the program should outputs its source code backwards.”?
If so, here.
source = “onme = putStrLn $ f $ \”source = \” ++ show source ++ \”\\n\” ++ source”
onme f = putStrLn $ f $ “source = ” ++ show source ++ “\n” ++ source