In his paper "Qualitative Distinctions Between Some Toposes of Generalized Graphs" (reproduced [here](http://conceptualmathematics.files.wordpress.com/2013/01/toposesofgeneralizedgraphs.pdf)), page 267, Lawvere says that the [idempotent-splitting completion](http://ncatlab.org/nlab/show/Karoubi+envelope) of the category of open sets of Euclidean spaces $\mathbb{R}^n$ and smooth maps between them is the category of smooth (second-countable, Hausdorff) manifolds and smooth maps. 


It's not very hard to see that every smooth manifold is a smooth retract of such an open set, so that the category of smooth manifolds embeds fully and faithfully in the idempotent-splitting completion. However, I haven't been able to find a proof of the converse, that every smooth retract of an open set is in fact a smooth manifold. Equivalently: if $p: U \to U$ is a smooth map on an open set $U$ of $\mathbb{R}^n$ such that $p \circ p = p$, then the fixed-point set $Fix(p) = \{x \in U: p(x) = x\}$ admits a smooth structure so that the inclusion $Fix(p) \hookrightarrow U$ is a smooth embedding. Can someone provide details of a proof? 



Idempotents split in category of smooth manifolds?
Assume that:


$$0\in Fix(p)$$


and $U$ is a small neighborhood of $0$.


Let $$f(x)=x-p(x)$$


Identifying $\mathbb R^n$ with $T\_0\mathbb R^n$, set $\pi\_{\mathrm{ker}(dp(0))}$ to be the projection $\mathbb R^n\to\mathrm{ker}(dp(0))$. 


Then $g=\pi\_{\mathrm{ker}(dp(0))}\circ f$ is smooth and regular at $0$, so $M=g^{-1}(0)$ is a manifold of dimension equal to the rank of $dp(0)$. 


By construction, $M$ contains $Fix(p)$. 


On the other hand, since $Fix(p)$ is the image of $p$, $p$ preserves $M$. 


Thus, $p|\_M$ is a smooth retraction of full rank on $M$. In particular, it's a local diffeomorphism (since it has full rank), and since it's a retraction and we're working in a small neighborhood of $0$, it's the identity.


