I think this is a basic topic in complexity, but I would like to ask how to understand co-$\mathcal{L}$ where $\mathcal{L}$ is a class of languages. From the definition of my textbook, $$co-\mathcal{L} = \{ \overline{L} \mid L \in \mathcal{L} \}$$
and where $\overline{L}$ is the complement. From what I read in an earlier part of my textbook, the complement of $L$ is equal to $\Sigma^* - L$.
However, say that $\mathcal{L}$ is NP. An instance of a language $L$ that is in $\mathcal{L}$ is the set of graphs with Hamiltonian paths. However, in this case, its complement $\bar{L} \in$co-$\mathcal{L}$ is the set of graphs without Hamiltonian paths, i.e. $\bar{L} \in $co-NP.
But is the set of graphs without Hamiltonian paths equal to $\Sigma^* - L$ (following the definition of complement) ? In this case, we would be including some strings $\in \Sigma^* - L$ that do not represent graphs.
Another example is $A_{TM}$, which represents the language
$$\{\langle M,w\rangle \mid M \text{ accepts input } w \}$$
In this case, does $\overline{A_{TM}}$ represent $\Sigma^* - A_{TM}$?. If this is the case, we would be including in $\overline{A_{TM}}$ several strings that do not represent TM's, or that refer to other input that is not equal to $w$. Or rather, does $\overline{A_{TM}}$ represent the language
$$\{\langle M,w \rangle \mid M \text{ diverges on input } w \}$$