Legitimate Probability Mass function I was given in a set of lecture notes that


If a function $p_X(x)$ satsifies:
(a) $p_X (x) \geq 0$, $\forall x \in \mathbb{R}$
(b) $\sum _{x } p_X(x) = 1$ 
Then $p_X(x)$ is a probablity mass function.


The definitions I was given are as follows: 
Discrete Random Variable:

A discrete random variable $X$ on a probability space $( \Omega,
\mathcal{F}, \mathbb{P})$ is a function $X : \Omega \rightarrow \mathbb{R}$ such that
(a) $\{ w \in \Omega : X(w) = x \} \in \mathcal{F}$ for each $x \in
\mathbb{R}$
(b) $Im(X) := \{ X(w): w \in \Omega \}$ is a finte or countable subset of
  $\mathbb{R} $

Probability Mass Function: 

The probability mass function (pmf) of $X$ is the function $p_X : \mathbb{R} \rightarrow [0.1]$ defined by
  $$ p_X (x) := \mathbb{P}(X=x) $$ 


Maybe it seems trivial to you all, but may someone explain how does the statement follow from the definitions? Or maybe the statement is not true? Thank you so much!
 A: 
(a) $\{ \omega \in \Omega : X(\omega) = x \} \in \mathcal{F}$ for each $x \in
\mathbb{R}$

This is just saying that the subset of outcomes with X-measure equal to any real value, $x$, must be an element of the sigma-algerbra, $\mathcal F$ of the probability space.   It follows that we can P-measure each of these subsets.   That's what we mean by $\mathsf P(X{=}x)$ when the probability space is $(\Omega, \mathcal F, \mathsf P)$ and $X:\Omega\to\Bbb R$.
tl;dr $\mathsf P(X{=}x) \mathop{:=} \mathsf P(\{\omega{\in}\Omega:X(\omega){=}x\})\\ \therefore \forall x\in\Bbb R: \mathsf P(X{=}x) \geq 0$ 
Further, the non-empty subsets must partition the space.


(b) $\operatorname{Im}(X) := \{ X(\omega): \omega \in \Omega \}$ is a finite or countable subset of $\mathbb{R} $

This means that the values that are X-measures of all outcomes of the space constitute a set of discrete points.   Then the series of P-measures of these points is $1$ (since their corrosponding subsets partition the space).
tl;dr $\therefore \sum_{x\in\operatorname{Im}(X)} \mathsf P(X{=}x) = 1$
