Definition about probability mass function by Rober V. Hogg The following definition of pmf is on page51 from Probability and statistical inference by Robert V. Hogg, etc.
The pmf $f(x)$ of a discrete random variable X is a function that satisfies the following properties:
(a)$f(x)\gt 0, x\in S;$
(b)$\sum_{x\in S}f(x)=1;$
(c)$P(X\in A)=\sum_{x\in A}f(x),$    where $A\subset S$.
My question is about part(c). X is a random variable, and A is a subset of sample space S, how can $X\in A$. Moreover, how can ${x\in A}$?
In my opinion, the LHS of part(c) just means that we want to compute the probability of a single event, and the RHS of part(c) just means that we sum up all the related possibilities that we need.
For example, if X: numbers of the sum of a fair six-side dice. Then P(X=3)=P({(1,2),(2,1)})=1/36+1/36=2/36, where A is a subset of S.
Am I right? And could someone explain more about part(c)? It's better if someone can give me an example.
 A: My question is about part(c). X is a random variable, and A is a subset of sample space S, how can X∈A?: X takes one of several outcomes. $X\in A$ simply means that that outcome is in the set A, so the notation is correct.
Moreover, how can ${{x} \in A}$?: Again, this notation is saying all of the outcomes x that are in A (A is an event and a subset, so it is a set of outcomes).
In my opinion, the LHS of part(c) just means that we want to compute the probability of a single event, and the RHS of part(c) just means that we sum up all the related possibilities that we need.
For example, if X: numbers of the sum of a fair six-side dice. Then P(X=3)=P({(1,2),(2,1)})=1/36+1/36=2/36, where A is a subset of S.
Am I right?: Yes, you are right. The example you provided suffices as an example of the answer to the next question: And could someone explain more about part(c)? It's better if someone can give me an example
I think the main point to answer here is that X is a single outcome, a single element, so you want to say that the element is in the set A, not a subset of A. Hope this helps clarify things.
A: I think the confusion here is you have misquoted the author or are misinterpreting things. Let $X: S\to \mathbb R$ be a discrete random variable, i.e. takes values in a countable subset of the real line, say $E$. We denote the set $\{\omega \in S: X(\omega) \in A\}$ as $(X\in A)$. Put $f(k) = P(X = k)$ for each $k\in E$. By the axiom of countable additivity, $$P(X\in E) = P\left(\bigcup_{k \in E} \{X=k\}\right) = \sum_{k\in E}P(X=k) = \sum_{k\in E}f(k)$$
Of course this sum evaluates to 1 as $X:S\to E$, so $P(X\in E) = P(S) = 1$. And for any set $B\subset \mathbb R$, one has $$P(X\in B) = P(X\in B\cap E)$$
$B\cap E$ is countable, so by the same argument as before, we have $$P(X\in B) = \sum_{k\in B\cap E}f(k)$$
