A question related to a topology called "Topology of Pointwise convergence" This question is from Topology by Wayne Patty page 162.

Let $X$ be a set and let $(Y,U')$ be a topological space. For each $x\in X$ and $U\in U'$ let $S(x,U) = \{ f\in Y^X : f(x) \in U\}.$

Prove that $\{S(x,U) : x\in X\text{ and } U \in U'\}$ is a subbasis for a topology on $Y^X$. This topology is called the topology is called the topology of pointwise convergence or point open topology.
My question is that how to write open sets in $Y^X$? Can you please describe them.
Thanks!
 A: The basic open sets would be of the form $$\bigcap_{j=1}^n \{ f \in Y^X : f(x_j) \in U_j \} = \{ f \in Y^X : (\forall j = 1,\ldots,n)[ f(x_j) \in U_j] \}$$ for some collection $x_1,\ldots, x_n \in X$ and open sets $U_1, \ldots, U_n$ of $Y$. (These are precisely the finite intersection of your sub-basic sets.) With these as your basic sets, any open subset of the defined topology is an arbitrary union of these kinds of sets.
Now, intuitively, these sets are just specifying that two functions are "close" provided that they are close enough to each other (as determined by the $U_j$) on a finite collection of points (the $x_j$).
The reason one usually only talks about the basis is because these unions can be a bit tedious. For example, our union has to consist in some way of a family of finite subsets of $X$ along with corresponding collections of open subsets of $Y$. Maybe we could represent these by even-length tuples: $\vec{t} = \langle x_1, \ldots , x_n , U_1 , \ldots, U_n \rangle$ which has as its corresponding basic set $$U\left(\vec t\right) = \bigcap_{j=1}^n \{ f \in Y^X : f(x_j) \in U_j \}.$$ But now, we can have an arbitrary family $\mathscr F$ consisting of such even-length tuples where the first-half are points in $X$ and the second-half are the corresponding open subsets of $Y$ to form the open set $$\bigcup_{\vec t \in \mathscr F} U\left(\vec t\right).$$ In general, such a union cannot be represented as a single basic open set, though, as a union of basic open sets, is surely open. Moreover, by the property of bases, all open subsets of $Y^X$ with the topology of point-wise convergence are of this union form. If you really want to get in with indices, let $A$ be an index set and consider $\langle x_{1,\alpha},\ldots,x_{n_\alpha,\alpha} , U_{1,\alpha},\ldots , U_{n_\alpha,\alpha}\rangle$ for each $\alpha \in A$. (We need $n_\alpha$ since the length of the intersections are allowed to change.) Then we have the corresponding union: $$\bigcup_{\alpha \in A} \bigcap_{j=1}^{n_\alpha} \{ f\in Y^X : f(x_{j,\alpha}) \in U_{j,\alpha} \}.$$
To elaborate even more on why the basic open sets don't capture all of the open sets, let's take a look at our old friend $\mathbb R^2$. We can replace $2$ with $X = \{0,1\}$. Let $U_1 = (-3,0)$, $V_1 = (-2,0)$, $U_2 = (1,3)$ and $V_2 = (2,4)$. Observe that $$\{ f \in \mathbb R^X : f(0) \in U_1 \} \cap \{ f \in \mathbb R^X : f(1) \in V_1\} = \{ f \in \mathbb R^X : f(0) \in U_1 \wedge f(1) \in V_1 \},$$ which can be written as $U_1 \times V_1 = \{ \langle x, y \rangle \in\mathbb R^2 : x \in U_1 \wedge y \in V_1 \}$. Now, the open set $(U_1 \times V_1) \cup (U_2 \times V_2)$ cannot be written in the form $U \times V$. Indeed, suppose $(U_1 \times V_1) \cup (U_2 \times V_2) \subseteq U \times V$ for some $U$ and $V$. Notice that $\langle -2, -1\rangle \in U_1 \times V_1 \subseteq U\times V \implies -2 \in U$ and $\langle 2,3 \rangle \in U_2 \times V_2 \subseteq U\times V \implies 3 \in V$. So then $\langle -2,3 \rangle \in U \times V$. However, $\langle -2, 3 \rangle \not\in (U_1 \times V_1) \cup (U_2 \times V_2)$. That is, $U \times V \not\subseteq (U_1 \times V_1) \cup (U_2 \times V_2)$. In the notation above, following Patty, $$(U_1 \times V_1) \cup (U_2 \times V_2) = (S(0,U_1) \cap S(1,V_1)) \cup (S(0,U_2) \cap S(1,V_2)).$$
In the context of $\mathbb R^\mathbb R$, you can think of a basic neighborhood about a function $f$ as being determined some $\varepsilon > 0$ and finitely many points $x_1,\ldots, x_n$; namely, the neighborhood would be all functions $g$ so that $|f(x_j) - g(x_j)| < \varepsilon$ for each $j = 1, \ldots, n$. (You can use one $\varepsilon$ here by thinking about minimums.)
It is also called the topology of point-wise convergence because a net of functions $f_\lambda$ converges to another function $f$ if the functions converge point-wise, as the nomenclature suggests. It also ties in with the notion above that neighborhoods of functions are determined by specifying how close you need to be on a finite number of points in the domain.
