I was to give a detailed proof of this theorem:
Here is my trial:
Define $$ S_{X} :=\{ U\subseteq X : U = f_{i}^{-1}(V_{i}) \,, \, V_{i} \textbf{ open in} Y_{i} \}$$
This collection is nonempty as $\forall i \in \mathcal{I}, f_{i}^{-1}(Y_{i}) = X.$ is contained in it. Now, to show that it is indeed a topology: \
(1) $\emptyset \in S_{X}$ as $f_{i}^{-1}(\emptyset) = \emptyset,$ and the $\emptyset$ is open in $Y_{i} \, ,\forall i \in \mathcal{I}.$ Also, $\forall i \in \mathcal{I}, f_{i}^{-1}(Y_{i}) = X,$ and $Y_{i}$ is open in $Y_{i} \forall i \in \mathcal{I}$ as $\{ Y_{i} | i \in \mathcal{I} \}$ is a family of topological spaces i.e. $X \in S_{X}.$\
(2)\textbf{Closure under arbitrary union.}\
If $\{ U_{i} = f_{i}^{-1}(V_{i}) \, | \, i \in \mathcal{I} \}$ is a collection of sets in $S_{X},$ we need to show that $\bigcup_{i \in \mathcal{I}} U_{i} \in S_{X}. $
But each $U_{i} = f_{i}^{-1}(V_{i})$ and $\bigcup_{i \in \mathcal{I}} U_{i} = \bigcup_{i \in \mathcal{I}} f_{i}^{-1}(V_{i}) = f_{i}^{-1}( \bigcup_{i \in \mathcal{I}} V_{i})$ and since arbitrary union of open sets are open, then $\bigcup_{i \in \mathcal{I}} V_{i}$ is open in $Y_{i} \, ,\forall i \in \mathcal{I}.$ and so $\bigcup_{i \in \mathcal{I}} U_{i} \in S_{X}$ as required.\
(3)\textbf{Closure under finite intersection.}\
If $\{ U_{i} = f_{i}^{-1}(V_{i}) \, | \, i = 1, ..., n. \}$ is a collection of sets in $S_{X},$ we need to show that $\bigcap_{i = 1}^n U_{i} \in S_{X}.$
But each $U_{i} = f_{i}^{-1}(V_{i})$ and $ \bigcap_{i = 1}^n U_{i} = \bigcap_{i = 1}^n f_{i}^{-1}(V_{i}) = f_{i}^{-1}( \bigcap_{i = 1}^n V_{i})$ and since finite intersection of open sets are open, then $ \bigcap_{i = 1}^n V_{i}$ is open in $Y_{i}\,, i = 1, ..., n.$ and so $\bigcap_{i = 1}^n U_{i} \in S_{X}$ as required.\
\textbf{Uniqueness of this topology:}\
Assume that there are 2 smallest topologies for which $f_{i}$'s are continuous, say $S_{X}$ and $S_{X'},$ then since $S_{X}$ is the smallest, then, $$S_{X} \subseteq S_{X'} \quad (1)$$
Also, since $S_{X'}$ is the smallest, then, $$S_{X'} \subseteq S_{X} \quad (2)$$
Therefore, from (1) and (2), we have that $$S_{X'} = S_{X} $$ as required.\
We now have $f_{i}: (X, S_{X}) \rightarrow Y_{i}$ where $X$ and $Y_{i}$'s are topological spaces and $f_{i}$'s are continuous.
\textbf{To prove the property given in the question:}\
(1)Assume that $g$ is continuous and since $f_{i}$'s are continuous by our definition for the topology and since the composition of 2 continuous functions is a continuous function then, $f_{i} \circ g$ is continuous for all $i \in \mathcal{I}.$\
(2)Assume that $f_{i} \circ g$ is continuous for all $i \in \mathcal{I},$ and we know that $f_{i}$ 's are continuous for all $i \in \mathcal{I}$ by our definition for the topology, we want to show that $g$ is continuous i.e. if $U$ open in $X$, then $g^{-1}(U)$ is open in $W.$\
By the construction of our topology on $X,$ we have $U = f_{i}^{-1}(V_{i})$ for some $V_{i} \textbf{ open in} Y_{i}.$ So $g^{-1}(U) = g^{-1}(f_{i}^{-1}(V_{i})) = (f_{i} \circ g)^{-1}(V_{i}).$\
Since $f_{i} \circ g$ is continuous for all $i \in \mathcal{I},$ and $V_{i} \textbf{ open in} Y_{i}$ for all $i \in \mathcal{I},$ then $g^{-1}(U)$ is open in $W$ as required.\
But I received comments that:
1- My topology is generally not a topology and that I can correct it by taking the smallest topology on $X$ that contains my set $S_{X}$ which is given in Corollary 5 below and in this case I even do not require My proof of it being a topology. Is my understanding for this comment correct? and does really what mentioned in this comment correct my solution?
2- For proving the property given in the question, I recieved a comment that my $U$ should be corrected to be a union of finite intersections of $f_{i}^{-1}(V_{i})$ for various $i \in mathcal{I}.$ but I do not understand how this will match the correction suggested in 1- above (the paragraph just above this paragraph) and how I will proceed from this to prove the property required?
Could anyone help me answer those questions please?
