I've encounted this question many time in similar form in different books, but I still don't understand it. In Enderton's set theory, it says:
I don't how this proof proved H(B) is injective and subjective.
Or in Munkres's Topology
What does the $g(n)$ exactly mean in this proof?
Thanks!
In Enderton, the author is defining a function $H : \mathcal{P}(A) \to {}^A2$ by letting $H(B) = f_B \in {}^A2$, where $f_B : A \to 2$ is the characteristic function of $B$, for each $B \in \mathcal{P}(A)$.
The function $H$ is injective since distinct subsets have distinct characteristic functions. Explicitly, if $B \ne B'$ then either there is some $a \in B$ with $a \not \in B'$, in which case $f_B(a) = 1 \ne 0 = f_{B'}(a)$, or there is some $a \in B'$ with $a \not \in B$, in which case $f_B(a) = 0 \ne 1 = f_{B'}(a)$.
The function $H$ is surjective since each function $A \to 2$ is the characteristic function of the preimage of $1$, namely given $g : A \to 2$ we have $g = H(B)$, where $B = \{ x \in A \mid g(x) = 1 \}$.
In Munkres, it means exactly what it says: $g(n)$ is the result of applying the function $g : \mathbb{Z}^+ \to X^{\omega}$ to the element $n \in \mathbb{Z}^+$. Note that since the codomain of $g$ is $X^{\omega}$ we have $g(n) \in X^{\omega}$, so $g(n)$ is itself an $\omega$-sequence of elements of $X$. The author has then chosen to express the terms of $g(n)$ by writing $g(n) = (x_{n1}, x_{n2}, \dots)$; in other words, $x_{nk}$ is the $k^{\text{th}}$ term of the sequence $g(n)$.