Prove that the girth of a graph is the minimum girth of its connected components. Let $G$ be a graph with connected components $C_1, C_2, \dots C_r$. Prove that $g(G) = min\{g(C_1), g(C_2), \dots , g(C_r)\}$.
I tried this problem and I just wanted to make sure whether it was right. Please point out any errors. Thanks.
Proof:
Let $G$ be a graph with connected components $C_1, C_2, \dots C_r$.
That means that $G = C_1\cup\dots\cup C_r$.
By definition, the girth of $G$ is the length of the smallest cycle in $G$. But $G$ is just $C_1\cup\dots\cup C_r$, so its girth is the length of the smallest cycle in $C_1\cup\dots\cup C_r$. The length of the smallest cycle in $C_1\cup\dots\cup C_r$ is $min\{g(C_1), g(C_2), \dots , g(C_r)\}$, therefore $g(G) = min\{g(C_1), g(C_2), \dots , g(C_r)\}$.
Please let me know if this is okay or not. If it isn't point out the error. Thanks.

I feel like you're missing explaining a key step when you say

The length of the smallest cycle in $C_1 \cup \dots \cup C_r$ is $\min\{g(C_1),g(C_2),…,g(C_r)\}$.

The key step - and the reason why it's connected components we look at, and not anything else - is that a cycle in $G$ is a cycle in $C_i$ for some $i$. A cycle must be entirely contained in a single connected component, because a cycle is a connected subgraph.
Therefore, in particular, when we take the smallest cycle in $G$, we can first find the smallest cycle in each $C_i$, and then take the smallest out of those.
