This is always true for metric spaces. Let . If did not converge to , some subsequence would remain at least from . Compactness of gives a further subsequenceThen . The graph is closed, so belongs to it and , contradicting the separation. Thus for every convergent sequence, and the equivalence proved above makes continuous. This is the closed-graph criterion with compact codomain.
Solved by gpt-5.6-sol high.
Codex Wiki