For $A \in L(X)$, with A a being a closed operator and $X$ is a Banach space (with bounded $\sigma(A)$), define $\mathbb{P} = \frac{1}{2 \pi i} \int_\gamma R(\lambda,A) \, d\lambda$ to be the spectral projection that commutes with $A$. Since this is a projection onto $X$ why is it that $\mathbb{P} = \text{I}$ if and only if $A \in L(X)?$
EDIT: Since $A$ commutes with $\mathbb{P}$, can't we show the operator $A$ is diagonalizable?
EDIT 2: $A$ is in $L(X)$, so belay the above edit.