If X has a top, then from the top on, a function is constant.Thus wlog, X is unbounded above.

Your proof generaly follows the proof for f in C(omega_0,S),where S is regular Lindelof and ever point is G_delta, thatf is eventually constant. There are some differences in thepremises of the two theorems that I'm going to puzzle uponand try to harmonize.

Nice proof.

> > In fact, that every countable set has an upper bound is equivalent to uncountable cofinality.> > True (aside from the trivial case where X has a greatest element) but> irrelevant. For totally ordered (but not necessarily well-ordered)> sets, having uncountable cofinality is not enough to force the> intersection of two closed cofinal subsets to be nonempty. Let zeta => omega^* + omega, the order type of the integers. Let X be an ordered> set of type zeta times omega_1. Every countable subset of X has an> upper bound. The order topology of X is the discrete topology. Every> uncountable subset of X is a closed cofinal subset. Partition X into> two disjoint uncountable subsets A and B. Then A and B are closed> cofinal subsets of X whose intersection is empty. Moreover, since X is> discrete, C(X,R) is the set of all functions from X into R; it is easy> to see that not all of them are eventually constant.> > > > > > Let Y be a topological space which is hereditarily Lindelof and such> > > > > that, for each point y in Y, the set {y} is the intersection of> > > > > countably many closed neighborhoods of y. [Example: any separable> > > > > metric space.]> >> > > > > THEOREM. If X and Y are as stated above, then every function f in> > > > > C(X,Y) is eventually constant.> >> > > > > PROOF. We may assume that X has no greatest element. For S a subset of> > > > > Y, let g(S) = {x in X: f(x) is in S}. Let Z = {y in Y: g({y}) is> > > > > bounded}.> >> > > > Is assuming X has no greatest element, an additional premise?> >> > > No. The assumption that X has no greatest element is made without loss> > > of generality, because the contrary case is trivial: if X has a> > > greatest element, then every function with domain X is eventually> > > constant.> >> > Uncountable cofinality implies X has no max.> > Sure. So what?>