I have a problem with understanding how the resolution of the identity of an operator is presented in some literature for physicists.

I'm a student of mathematics, and I understand the notion of a spectral measure (which is somethimes called the resolution of identity) and also have some knowledge in spectral theory (for normal operators).

# Here is my brief explanation what do I understand:

Let $H$ be Hilbert space (with an inner product linear w.r.t 2nd coordinate) with an orthonormal basis $(e_{n})$ and define a linear operator (diagonal operator) $$ A = \sum_{i \geq 1} \lambda_i \left|e_i\right>\left<e_i\right|,$$ where $(\lambda_i)$ is a sequence of complex numbers (the properties of this sequences determine the properties of $A$ such as boundedness, selfadjointness, compactness etc.), to make sense of $A$ we assume that the above series converges in SOT, I also used Dirac bra-ket notation. The associated spectral measure of $A$ is defined via $$ E(\Delta) = \sum_i \mathbf{1}_{\Delta}(\lambda_i) \left|e_i\right>\left<e_i\right|,$$ where $\Delta$ is an element of Borel sigma field over the spectrum of $A$, and we have that $$\left<x| Ay\right> = \int_{\sigma(A)} \lambda \left<x| E(d\lambda)y\right> \ \ (x,y \in H).$$

Very often physicists would use the following notation for $A$ which acts on an element $\psi \in H$ $$ A\left|\psi\right> = \sum_{i} \lambda_i \left|i\right>\left<i\right|\left|\psi\right>.$$

# My problems with notation

I started reading some notes, books about quantum field theory, and often it is written that, the identity operator $I$ on some (separable) Hilbert space $H$, has the expansion, called the resolution of the identity $$ I= \int dq^{\prime} \left|q^{\prime}\right>\left<q^{\prime}\right|,$$ I don't know whether it matters here but $\{\left|q\right>\}$ is supposed to be a complete set of states.

Reference: http://eduardo.physics.illinois.edu/phys582/582-chapter5.pdf bottom of p. 129.

# My question

Is the notion of the above resolution of the identity the same as an integral w.r.t a spectral measure ($I$ is a diagonal operator)? If yes, how should I understand the above notation. If no, what do they actually mean by this resolution of the identity and how do they define this integral. I noticed that in a lot of book concerning quantum mechanics there are many calculations, but not very many definitions and assumptions, which makes stuff hard to understand for a mathematician.