Image of identity under the adjunction of upper shriek and lower shriek for Euclidean spaces? Let $p: \mathbb{R}^n \longrightarrow \{\ast\}$ be the projection 
to a point. 
We have the adjunction $(R p_!,p^!)$, i.e., 
$$ \operatorname{Hom}_{D^b(\mathbb{Z})}(R p_!F,N) \cong \operatorname{Hom}_{D^b(\mathbb{R}^n)}(F,p^!N)$$
for any $F \in D^b(\mathbb{Z})$ and $ N \in D^b(\mathbb{R}^n)$.
Since $R \Gamma_c(\mathbb{R}^n,\mathbb{Z}_{\mathbb{R}^n}) \cong \mathbb{Z}[-n] $, one can deduce that $p^! N \cong N [n]$ where $[n]$ means shifting by $n$. In the case when $F$ is the skyscraper sheaf $ 
\mathbb{Z}_x$ for some $x \in \mathbb{R}^n$
and $N = \mathbb{Z}$, the isomorphism becomes 
$$ \operatorname{Hom}_{D^b(\mathbb{Z})}( \mathbb{Z},\mathbb{Z}) 
\cong \operatorname{Hom}_{D^b(\mathbb{R}^n)}
(\mathbb{Z}_x,\mathbb{Z}_{\mathbb{R}^n}[n]).$$
My question is what's an explicit representative for the morphism
corresponding to $\operatorname{id}_{\mathbb{Z}}$ 
on the right hand side?  
 A: This is a good question, without an easy answer, even in the case $n=1$.
I will treat this case first. So we want a morphism $\mathbb{Z}_x\rightarrow\mathbb{Z}[1]$ in the derived category of $\mathbb{R}$. Morphism of this kind correspond to extensions
$$0\longrightarrow \mathbb{Z}\longrightarrow\mathcal{F}\longrightarrow\mathbb{Z}_x\longrightarrow 0$$
The sheaf $\mathcal{F}$ can be described as follow :
$$\mathcal{F}(]a,b[)=\left\{\begin{array}{ll}\mathbb{Z} & \text{if $b<0$ or $a>0$}\\\mathbb{Z}\oplus\mathbb{Z} & \text{if $a<0<b$}\end{array}\right.$$
And with restrictions $\mathcal{F}(]a,b[)\rightarrow\mathcal{F}(]c,d[)$ being the following :


*

*if $b<0$ then $d<0$ and $\mathcal{F}(]a,b[)\rightarrow\mathcal{F}(]c,d[)$ is the identity of $\mathbb{Z}$.

*if $a>0$ then $c>0$ and $\mathcal{F}(]a,b[)\rightarrow\mathcal{F}(]c,d[)$ is again the identity of $\mathbb{Z}$.

*if $a<0<b$ and $c<0<d$ then $\mathcal{F}(]a,b[)\rightarrow\mathcal{F}(]c,d[)$ is the identity of $\mathbb{Z}\oplus\mathbb{Z}$.

*if $a<0<b$ and $d<0$ then $\mathcal{F}(]a,b[)\rightarrow\mathcal{F}(]c,d[)$ is the projection onto the first factor.

*if $a<0<b$ and $c>0$ then $\mathcal{F}(]a,b[)\rightarrow\mathcal{F}(]c,d[)$ is the map $(a,b)\rightarrow a+nb$.


I think of the first factor as a locally constant function (and this is indeed the image of $\mathbb{Z}$). The second factor exists only around $0$. It is just a number, and when we move away from 0, if we go towards the negative numbers, we forget it, if we go towards the positive number, we add it (with a factor $n$) to the locally constant function.
For each different value of $n$, you get an extension. This gives the isomorphism $\mathbb{Z}\simeq\operatorname{Hom}_{D(\mathbb{R})}(\mathbb{Z}_x,\mathbb{Z}[1])$. The map corresponding to $\operatorname{id}$ is the case $n=1$.
Note that I used the order of $\mathbb{R}$ to define this extension. This is not surprising, the isomorphism $p^!N\simeq N[1]$ depends on the choice of an orientation of $\mathbb{R}$.
I let you check that this is indeed a sheaf (it requires a bit of works for open subset that are union of intervals...). You can also check (very easy) that if $n=0$, then the extension splits as expected.
So the map $\mathbb{Z}_x\rightarrow\mathbb{Z}[1]$ is the boundary of the triangle $\mathbb{Z}\rightarrow\mathcal{F}\rightarrow\mathbb{Z}_x\rightarrow\mathbb{Z}[1]$.

Now this construction can in fact be used for any codimension 1 submanifold $Y\subset X$ such that the normal bundle of $Y$ is free. Try this for $\mathbb{R}\subset\mathbb{R}^2$. Of course, it is more complicated since an open subset in $\mathbb{R}^2$ can have some weird shape.
The construction for $\{x\}\subset \mathbb{R}^n$ can be done inductively using affine subspaces of increasing dimension :
$\{x\}=A_0\subset A_1\subset A_2\subset ....\subset A_n=\mathbb{R}^n$ where $A_i$ is an affine subspace of dimension $i$, and a choice of relative orientation for $A_i\subset A_{i+1}$. These choices gives an orientation of $\mathbb{R}^n$.
Using the previous constructions (with $n=1$), we have short exact sequences :
$$0\longrightarrow \mathbb{Z}_{A_i}\longrightarrow\mathcal{F}_{i-1}\longrightarrow\mathbb{Z}_{A_{i-i}}\longrightarrow 0$$
Putting all this together you get a complex
$$\mathcal{F}_.=0\rightarrow\mathcal{F}_{n-1}\rightarrow\mathcal{F}_{n-1}\rightarrow...\rightarrow\mathcal{F}_0\rightarrow 0$$
with $\mathcal{F}_0$ in degree $0$. Up to homotopy the complex $\mathcal{F}_.$ only depends on the orientation of $\mathbb{R}^n$.
The inclusion $\mathbb{Z}\rightarrow\mathcal{F}_{n-1}$ and the projection $\mathcal{F}_0\rightarrow\mathbb{Z}_x$ fit into a distinguished triangle
$$ \mathbb{Z}[n-1]\rightarrow\mathcal{F}_.\rightarrow\mathbb{Z}_x\rightarrow\mathbb{Z}[n]$$
where the boundary $\mathbb{Z}_x\rightarrow\mathbb{Z}[n]$ is the map you seek.
