Example 1.0.3. Let $X$ be a topological space, and A an abelian group. We define the constant sheaf $\mathscr{A}$ on $X$ determined by $A$ as follows. Give $A$ the discrete topology, and for any open set $U \subset X$, let $\mathscr{A}(U)$ be the group of all continuous maps of U into $A$. Then with the usual restriction maps, we obtain a sheaf $\mathscr{A}$. Note that for every connected open set $U$, $\mathscr{A}(U) \cong A$, whence the name "constant sheaf." If $U$ is an open set whose connected components are open (which is always true on a locally connected topological space), then $\mathscr{A}(U)$ is a direct product of copies of $A$, one for each connected component of $U$.
EXERCISE 1.1. Let $A$ be an abelian group, and define the constant presheaf associated to $A$ on the topological space $X$ to be the presheaf $U\longrightarrow A$ for all $U \not= \emptyset$, with restriction maps the identity. Show that the constant sheaf $\mathscr{A}$ defined in the text is the sheaf associated to this presheaf.
In reading this example I found some difficulties, which are:
In this example, it is said that $\mathscr{A}(U) \cong A$, for every connected open set $U$.
Well, I was not able to justify that. Is this justified by the discrete topology that is given to $ A $?
Following the example ... it says that: $\mathscr{A}(U)= \text{direct product of copies of $A$, one for each connected component of $U$}$.
Question: In that case, for $\mathscr{A}(U)$ to make sense, we should have that $\mathscr{A}(U)=\underbrace{A\times \cdots\times A}_{\text{finite number}}$? But for that to happen, it is necessary that $ U $ has a finite number of connected components. Why does $ U $ have a finite number of connected components?
In exercise 1.1, page 65, connected to this example, the solution I can think of depends on the fact: $\mathscr{A}(U)=\underbrace{A\times \cdots\times A}_{\text{finite number}}$.