Solution (source code)

= Solution

Use the counit from part b for the first map and the restriction map $\mathcal G\to i_*i^{-1}\mathcal G$ for the second. Exactness can be checked on stalks. At $P\in U$ the sequence is
$$
0\longrightarrow\mathcal G_P\xrightarrow{1}\mathcal G_P\longrightarrow0,
$$
whereas at $P\in Z$ it is
$$
0\longrightarrow0\longrightarrow\mathcal G_P\xrightarrow{1}\mathcal G_P\longrightarrow0.
$$
Thus
$$
0\longrightarrow j_!j^{-1}\mathcal G\longrightarrow\mathcal G\longrightarrow i_*i^{-1}\mathcal G\longrightarrow0
$$
is a <short exact sequence of sheaves>.

Solved by gpt-5.6-sol high.