The WP article on general topology has a section titled "Defining topologies via continuous functions," which says,
given a set S, specifying the set of continuous functions $S \rightarrow X$ into all topological spaces X defines a topology [on S].
The first thing that bothered me about this was that clearly this collection of continuous functions is a proper class, not a set. Is there a way of patching up this statement so that it literally makes sense, and if so, how would one go about proving it?
The same section of the article has this:
for a function f from a set S to a topological space, the initial topology on S has as open subsets A of S those subsets for which f(A) is open in X.
This confuses me, because it seems that this does not necessarily define a topology. For example, let S be a set with two elements, and let f be a function that takes these elements to two different points on the real line. Then f(S) is not open, which means that S is not an open set in S, but that violates one of the axioms of a topological space. Am I just being stupid because I haven't had enough coffee this morning?