Let (X,S) be a measurable space.Suppose f is a function from from X to [-inf,inf] such that inverse image of (a,inf) belongs to S for all a in R. Is f S-measurable function?
For f to be S measurable function inverse image of (a,inf] has to be in S but since the inverse image of the singleton set containing infinity is the intersection of inverse images of (n,inf) where n belongs to natural number set. Inverse image of (a,inf] also belongs to S.Is this correct?
I am using the hypothesis in the first paragraph. In the second para you changed $(a, \infty) $ to $(a, \infty]$.
This is not true. Let $A$ be a set which is not in $S$ and $f(x)=\infty$ for all $x \in A$, $f(x)=-\infty$ for all $x \in X \setminus A$. Then $f^{-1}(a, \infty)$ is the empty set for each real number $a$, but $f$ is not measurable.
If you have $(a, \infty]$ instead of $(a, \infty)$ the your argument is correct.