If an element $b$ of a $C^*$-algebra $B$ is self-adjoint with $\delta=\|b-b^2\|<\frac14$, then there is a projection $p\in B$ with $\|b-p\|\leq2\delta$
I believe the proof as following however I am not sure, is this true or not? (The specific details of the proof may vary depending on the specific context and properties of the $C^*$-algebra B)
Given that $b$ is a self-adjoint element in a $C^*$-algebra $B$ with $\delta = \| b - b^2\| < \frac14$, we want to show that there exists a projection $p \in B$ such that $\| b - p\| \leq 2\delta$.
Since $b$ is self-adjoint, it can be written as $b = a + ic$, where $a$ and $c$ are self-adjoint elements and $i$ is the imaginary unit.
Consider the polynomial function $f(z) = z^2$. Since $\delta = \| b - b^2\|$, we have: $$\| b - b^2\| = \| f(b) - b^2\|\,.$$
Using the triangle inequality and the fact that $\| x^2\| = \| x\|^2$ for any self-adjoint element $x$ in a $C^*$-algebra, we can write: $$\| f(b) - b^2\| \leq \| f(b) - b\| + \| b - b^2\| = \| b^2 - b\| + \| b - b^2\| \,.$$
Now, let's focus on the term $\| b^2- b\|$. We can expand it as follows: $$\| b^2- b\| = \| (a + ic)^2 -(a + ic)\| = \| (a^2 - c^2) + 2iac - (a + ic)\| \,.$$
Using the fact that $\| x + y\| \leq \| x\| + \| y\|$ for any elements $x$ and $y$ in a $C^*$-algebra, we can write: $$\| b^2 - b\| \leq \| a^2 - c^2 - a\| + \| 2iac - ic\| = \| a^2 - c^2 - a\| + \| ic\| \| 2a - 1\| \,.$$
Since $a$ and $c$ are self-adjoint elements,$$ \| a^2 - c^2 - a\| = \| a^2 - a - c^2\| \leq \| a^2 - a\| + \| c^2\| \,.$$
Using the fact that $\| xy\| \leq \| x\| \| y\|$ for any elements $x$ and $y$ in a $C^*$-algebra, we have: $$\| a^2 - a\| \leq \| a\| \| a - 1\| \,.$$
Combining these inequalities, we obtain: $$\| b^2 - b\| \leq (\| a\| \| a - 1\| + \| c^2\| ) + \| ic\| \| 2a - 1\| \,.$$
Since $\| a\| , \| c\| \leq \| b\|$, we can further simplify: $$\| b^2 - b\| \leq (\| b\| \| a - 1\| + \| b\|^2) + \| ic\| \| 2a - 1\| \,.$$
Now, we know that $\| b^2 - b\| < \frac14$ (given $\delta < \frac14$). Therefore, we can write: $$(\| b\| \| a - 1\| + \| b\|^2) + \| ic\| \| 2a - 1\| < \frac14\,.$$
Let's define $p = (b + b^*)/2$, where $b^*$ denotes the adjoint of $b$. Note that $p$ is self-adjoint since $b$ is self-adjoint. Now, we can calculate $\| b - p\|$: $$\| b - p\| = \| b - (b + b^*)/2\| = \| (b - b^*)/2\| = \| ic/2\| = \| c/2\| \,.$$
Since $\| ic\| = \| c\|$, we have $$\| b - p\| = \| c/2\| = \| ic/2\| \leq \| ic\| = \| c\| \,.$$
Combining this with the inequality we obtained earlier, we have: $$\| b - p\| \leq \| c\| \leq (\| b\| \| a - 1\| + \| b\|^2) + \| ic\| \| 2a - 1\| < \frac14\,.$$
Let $\sigma(b)$ denote the spectrum of $b.$ Then $$\sigma(b-b^2)=\{x-x^2 \,:\, x\in \sigma(b)\}$$ We have $$\delta:=\|b-b^2\|=\max\{|x-x^2|\,:\,x\in \sigma(b)\}$$ Therefore $|x-x^2|\le \delta$ for $x\in \sigma(b).$ The inequality $|x-x^2|\le \delta$ is equivalent to $$ x\in \textstyle\left [{1\over 2}-\sqrt{{1\over 4}+\delta}, {1\over 2}-\sqrt{{1\over 4}-\delta}\right ]\cup \left [{1\over 2}+\sqrt{{1\over 4}-\delta}, {1\over 2}-\sqrt{{1\over 4}+\delta}\right ]$$ Therefore $\sigma(b)$ is contained in the union of two disjoint intervals, say $I_1\cup I_2.$ For $x\in I_1$ we have $|x|\le 2\delta.$ For $x\in I_2$ there holds $|1-x|\le 2\delta.$ Let $f(x)={\bf 1}_{I_2}(x).$ Then $f$ is continuous on $\sigma(b),$ as $I_1\cap I_2=\emptyset.$ By the continuous functional calculus the element $f(b)$ is a projection. Moreover $$\|b-f(b)\|\le \max\left [\max\{|x|\,:\,x\in I_1\},\ \max\{|x-1|\,:\,x\in I_2\}\right ]$$ The last quantity is less than or equal $2\delta.$