hcju/stacksqa huggingface dataset:
By Lemma \ref{lemma-ML-local} the inverse system $H^i_\mathfrak m(M_n)$ satisfies the Mittag-Leffler condition. Let $E_n \subset H^i_\mathfrak m(M_n)$ be the image of $H^i_\mathfrak m(M_{n'})$ for $n' \gg n$. Then $(E_n)$ is an inverse system with surjective transition maps and $H^i_\mathfrak m(M) = \lim E_n$. Since $H^i_\mathfrak m(M)$ has the descending chain condition by Lemma \ref{lemma-descending-chain} we find there can only be a finite number of nontrivial kernels of the surjections $H^i_\mathfrak m(M) \to E_n$. Thus $E_n \to E_{n - 1}$ is an isomorphism for all $n \gg 0$ as desired.
Proof of (1). Let $\mathcal{J}^\bullet$ be a K-injective complex of $\mathcal{O}_f$-modules representing $N$. By Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-K-injective-flat} it follows that $\mathcal{J}^\bullet$ is a K-injective complex of $\mathcal{O}$-modules as well. Let $\mathcal{F}^\bullet$ be a complex of $\mathcal{O}_f$-modules representing $L$. Then $$ R\SheafHom_\mathcal{O}(L, N) = R\SheafHom_\mathcal{O}(\mathcal{F}^\bullet, \mathcal{J}^\bullet) = R\SheafHom_{\mathcal{O}_f}(\mathcal{F}^\bullet, \mathcal{J}^\bullet) $$ by Modules on Sites, Lemma \ref{sites-modules-lemma-epimorphism-modules} because $\mathcal{J}^\bullet$ is a K-injective complex of $\mathcal{O}$ and of $\mathcal{O}_f$-modules. \medskip\noindent Proof of (2). Let $\mathcal{I}^\bullet$ be a K-injective complex of $\mathcal{O}$-modules representing $K$. Then $R\SheafHom_\mathcal{O}(\mathcal{O}_f, K)$ is represented by $\SheafHom_\mathcal{O}(\mathcal{O}_f, \mathcal{I}^\bullet)$ which is a K-injective complex of $\mathcal{O}_f$-modules and of $\mathcal{O}$-modules by Cohomology on Sites, Lemmas \ref{sites-cohomology-lemma-hom-K-injective} and \ref{sites-cohomology-lemma-K-injective-flat}. Let $\mathcal{F}^\bullet$ be a complex of $\mathcal{O}_f$-modules representing $L$. Then $$ R\SheafHom_\mathcal{O}(L, K) = R\SheafHom_\mathcal{O}(\mathcal{F}^\bullet, \mathcal{I}^\bullet) = R\SheafHom_{\mathcal{O}_f}(\mathcal{F}^\bullet, \SheafHom_\mathcal{O}(\mathcal{O}_f, \mathcal{I}^\bullet)) $$ by Modules on Sites, Lemma \ref{sites-modules-lemma-adjoint-hom-restrict} and because $\SheafHom_\mathcal{O}(\mathcal{O}_f, \mathcal{I}^\bullet)$ is a K-injective complex of $\mathcal{O}_f$-modules. \medskip\noindent Proof of (3). This follows from the fact that $R\SheafHom_\mathcal{O}(\mathcal{O}_g, \mathcal{I}^\bullet)$ is K-injective as a complex of $\mathcal{O}$-modules and the fact that $\SheafHom_\mathcal{O}(\mathcal{O}_f, \SheafHom_\mathcal{O}(\mathcal{O}_g, \mathcal{H})) =  \SheafHom_\mathcal{O}(\mathcal{O}_{gf}, \mathcal{H})$ for all sheaves of $\mathcal{O}$-modules $\mathcal{H}$.
It is clear that (2) implies (1). The implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-map-twice-localize}. A free resolution of the $\mathcal{O}$-module $\mathcal{O}_f$ is given by $$ 0 \to \bigoplus\nolimits_{n \in \mathbf{N}} \mathcal{O} \to \bigoplus\nolimits_{n \in \mathbf{N}} \mathcal{O} \to \mathcal{O}_f \to 0 $$ where the first map sends a local section $(x_0, x_1, \ldots)$ to $(fx_0 - x_1, fx_1 - x_2, \ldots)$ and the second map sends $(x_0, x_1, \ldots)$ to $x_0 + x_1/f + x_2/f^2 + \ldots$. Applying $\SheafHom_\mathcal{O}(-, \mathcal{I}^\bullet)$ where $\mathcal{I}^\bullet$ is a K-injective complex of $\mathcal{O}$-modules representing $K$ we get a short exact sequence of complexes $$ 0 \to \SheafHom_\mathcal{O}(\mathcal{O}_f, \mathcal{I}^\bullet) \to \prod \mathcal{I}^\bullet \to \prod \mathcal{I}^\bullet \to 0 $$ because $\mathcal{I}^n$ is an injective $\mathcal{O}$-module. The products are products in $D(\mathcal{O})$, see Injectives, Lemma \ref{injectives-lemma-derived-products}. This means that the object $T(K, f)$ is a representative of $R\SheafHom_\mathcal{O}(\mathcal{O}_f, K)$ in $D(\mathcal{O})$. Thus the equivalence of (1) and (3).
We will use the results of Lemma \ref{lemma-hom-from-Af} without further mention. If $f \in \mathcal{I}(U)$, and $g \in \mathcal{O}(U)$, then $\mathcal{O}_{U, gf}$ is an $\mathcal{O}_{U, f}$-module hence $R\SheafHom_\mathcal{O}(\mathcal{O}_{U, gf}, K|_U) = 0$, hence $gf \in \mathcal{I}(U)$. Suppose $f, g \in \mathcal{O}(U)$. Then there is a short exact sequence $$ 0 \to \mathcal{O}_{U, f + g} \to \mathcal{O}_{U, f(f + g)} \oplus \mathcal{O}_{U, g(f + g)} \to \mathcal{O}_{U, gf(f + g)} \to 0 $$ because $f, g$ generate the unit ideal in $\mathcal{O}(U)_{f + g}$. This follows from Algebra, Lemma \ref{algebra-lemma-standard-covering} and the easy fact that the last arrow is surjective. Because $R\SheafHom_\mathcal{O}( - , K|_U)$ is an exact functor of triangulated categories the vanishing of $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, f(f + g)}, K|_U)$, $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, g(f + g)}, K|_U)$, and $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, gf(f + g)}, K|_U)$, implies the vanishing of  $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, f + g}, K|_U)$. We omit the verification of the sheaf condition.
Let $U$ be an object of $\mathcal{C}$ and let $f \in \mathcal{I}(U)$. Recall that $$ \Hom_{D(\mathcal{O}_U)}(\mathcal{O}_{U, f}, R\SheafHom_\mathcal{O}(K, L)|_U) = \Hom_{D(\mathcal{O}_U)}( K|_U \otimes_{\mathcal{O}_U}^\mathbf{L} \mathcal{O}_{U, f}, L|_U) $$ by Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-internal-hom}. The right hand side is zero by Lemma \ref{lemma-hom-from-Af} and the relationship between internal hom and actual hom, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-section-RHom-over-U}. The same vanishing holds for all $U'/U$. Thus the object $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, f}, R\SheafHom_\mathcal{O}(K, L)|_U)$ of $D(\mathcal{O}_U)$ has vanishing $0$th cohomology sheaf (by locus citatus). Similarly for the other cohomology sheaves, i.e., $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, f}, R\SheafHom_\mathcal{O}(K, L)|_U)$ is zero in $D(\mathcal{O}_U)$. By Lemma \ref{lemma-hom-from-Af} we conclude.
Using Lemma \ref{lemma-ideal-of-elements-complete-wrt} we see that $K' \in D(\mathcal{O}')$ is in $D_{comp}(\mathcal{O}', \mathcal{I}\mathcal{O}')$ if and only if $T(K'|_U, f)$ is zero for every local section $f \in \mathcal{I}(U)$. Observe that the cohomology sheaves of $T(K'|_U, f)$ are computed in the category of abelian sheaves, so it doesn't matter whether we think of $f$ as a section of $\mathcal{O}$ or take the image of $f$ as a section of $\mathcal{O}'$. The lemma follows immediately from this and the definition of derived complete objects.
We may assume $f$ is given by a morphism of ringed sites corresponding to a continuous functor $\mathcal{C} \to \mathcal{D}$ (Modules on Sites, Lemma \ref{sites-modules-lemma-morphism-ringed-topoi-comes-from-morphism-ringed-sites} ). Let $U$ be an object of $\mathcal{C}$ and let $g$ be a section of $\mathcal{I}$ over $U$. We have to show that $\Hom_{D(\mathcal{O}_U)}(\mathcal{O}_{U, g}, Rf_*K|_U) = 0$ whenever $K$ is derived complete with respect to $\mathcal{I}'$. Namely, by Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-section-RHom-over-U} this, applied to all objects over $U$ and all shifts of $K$, will imply that $R\SheafHom_{\mathcal{O}_U}(\mathcal{O}_{U, g}, Rf_*K|_U)$ is zero, which implies that $T(Rf_*K|_U, g)$ is zero (Lemma \ref{lemma-hom-from-Af}) which is what we have to show (Definition \ref{definition-derived-complete}). Let $V$ in $\mathcal{D}$ be the image of $U$. Then $$ \Hom_{D(\mathcal{O}_U)}(\mathcal{O}_{U, g}, Rf_*K|_U) = \Hom_{D(\mathcal{O}'_V)}(\mathcal{O}'_{V, g'}, K|_V) = 0 $$ where $g' = f^\sharp(g) \in \mathcal{I}'(V)$. The second equality because $K$ is derived complete and the first equality because the derived pullback of $\mathcal{O}_{U, g}$ is $\mathcal{O}'_{V, g'}$ and Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-adjoint}.
Define $K^\wedge$ by the last displayed formula of the lemma. There is a map of complexes $$ (\mathcal{O} \to \prod\nolimits_{i_0} \mathcal{O}_{f_{i_0}} \to \prod\nolimits_{i_0 < i_1} \mathcal{O}_{f_{i_0}f_{i_1}} \to \ldots \to \mathcal{O}_{f_1\ldots f_r}) \longrightarrow \mathcal{O} $$ which induces a map $K \to K^\wedge$. It suffices to prove that $K^\wedge$ is derived complete and that $K \to K^\wedge$ is an isomorphism if $K$ is derived complete. \medskip\noindent Let $f$ be a global section of $\mathcal{O}$. By Lemma \ref{lemma-map-twice-localize} the object $R\SheafHom_\mathcal{O}(\mathcal{O}_f, K^\wedge)$ is equal to $$ R\SheafHom_\mathcal{O}( (\mathcal{O}_f \to \prod\nolimits_{i_0} \mathcal{O}_{ff_{i_0}} \to \prod\nolimits_{i_0 < i_1} \mathcal{O}_{ff_{i_0}f_{i_1}} \to \ldots \to \mathcal{O}_{ff_1\ldots f_r}), K) $$ If $f = f_i$ for some $i$, then $f_1, \ldots, f_r$ generate the unit ideal in $\mathcal{O}_f$, hence the extended alternating {\v C}ech complex $$ \mathcal{O}_f \to \prod\nolimits_{i_0} \mathcal{O}_{ff_{i_0}} \to \prod\nolimits_{i_0 < i_1} \mathcal{O}_{ff_{i_0}f_{i_1}} \to \ldots \to \mathcal{O}_{ff_1\ldots f_r} $$ is zero (even homotopic to zero). In this way we see that $K^\wedge$ is derived complete. \medskip\noindent If $K$ is derived complete, then $R\SheafHom_\mathcal{O}(\mathcal{O}_f, K)$ is zero for all $f = f_{i_0} \ldots f_{i_p}$, $p \geq 0$. Thus $K \to K^\wedge$ is an isomorphism in $D(\mathcal{O})$.
In More on Algebra, Lemma \ref{more-algebra-lemma-extended-alternating-Cech-is-colimit-koszul} we have seen that the extended alternating {\v C}ech complex $$ \mathcal{O} \to \prod\nolimits_{i_0} \mathcal{O}_{f_{i_0}} \to \prod\nolimits_{i_0 < i_1} \mathcal{O}_{f_{i_0}f_{i_1}} \to \ldots \to \mathcal{O}_{f_1\ldots f_r} $$ is a colimit of the Koszul complexes $K^n = K(\mathcal{O}, f_1^n, \ldots, f_r^n)$ sitting in degrees $0, \ldots, r$. Note that $K^n$ is a finite chain complex of finite free $\mathcal{O}$-modules with dual $\SheafHom_\mathcal{O}(K^n, \mathcal{O}) = K_n$ where $K_n$ is the Koszul cochain complex sitting in degrees $-r, \ldots, 0$ (as usual). By Lemma \ref{lemma-derived-completion} the functor $E \mapsto E^\wedge$ is gotten by taking $R\SheafHom$ from the extended alternating {\v C}ech complex into $E$: $$ E^\wedge = R\SheafHom(\colim K^n, E) $$ This is equal to $R\lim (E \otimes_\mathcal{O}^\mathbf{L} K_n)$ by Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-colim-and-lim-of-duals}.
Let $S$ be the set of rings $A_0$ of the form $A_0 = \mathbf{Z}[x_1, \ldots, x_n]/J$. Every finite type $\mathbf{Z}$-algebra is isomorphic to an element of $S$. Let $\mathcal{A}_0$ be the category whose objects are pairs $(A_0, I_0)$ where $A_0 \in S$ and $I_0 \subset A_0$ is an ideal and whose morphisms $(A_0, I_0) \to (B_0, J_0)$ are ring maps $\varphi : A_0 \to B_0$ such that $J_0 = \varphi(I_0)B_0$. \medskip\noindent Suppose we can construct $K(A_0, I_0) \to A_0$ functorially for objects of $\mathcal{A}_0$ having properties (a), (b), (c), and (d). Then we take $$ K(A, I) = \colim_{\varphi : (A_0, I_0) \to (A, I)} K(A_0, I_0) $$ where the colimit is over ring maps $\varphi : A_0 \to A$ such that $\varphi(I_0)A = I$ with $(A_0, I_0)$ in $\mathcal{A}_0$. A morphism between $(A_0, I_0) \to (A, I)$ and $(A_0', I_0') \to (A, I)$ are given by maps $(A_0, I_0) \to (A_0', I_0')$ in $\mathcal{A}_0$ commuting with maps to $A$. The category of these $(A_0, I_0) \to (A, I)$ is filtered (details omitted). Moreover, $\colim_{\varphi : (A_0, I_0) \to (A, I)} A_0 = A$ so that $K(A, I)$ is a complex of $A$-modules. Finally, given $\varphi : A \to B$ and $I \subset A$ for every $(A_0, I_0) \to (A, I)$ in the colimit, the composition $(A_0, I_0) \to (B, IB)$ lives in the colimit for $(B, IB)$. In this way we get a map on colimits. Properties (a), (b), (c), and (d) follow readily from this and the corresponding properties of the complexes $K(A_0, I_0)$. \medskip\noindent Endow $\mathcal{C}_0 = \mathcal{A}_0^{opp}$ with the chaotic topology. We equip $\mathcal{C}_0$ with the sheaf of rings $\mathcal{O} : (A, I) \mapsto A$. The ideals $I$ fit together to give a sheaf of ideals $\mathcal{I} \subset \mathcal{O}$. Choose an injective resolution $\mathcal{O} \to \mathcal{J}^\bullet$. Consider the object $$ \mathcal{F}^\bullet = \bigcup\nolimits_n \mathcal{J}^\bullet[\mathcal{I}^n] $$ Let $U = (A, I) \in \Ob(\mathcal{C}_0)$. Since the topology in $\mathcal{C}_0$ is chaotic, the value $\mathcal{J}^\bullet(U)$ is a resolution of $A$ by injective $A$-modules. Hence the value $\mathcal{F}^\bullet(U)$ is an object of $D(A)$ representing the image of $R\Gamma_I(A)$ in $D(A)$, see Dualizing Complexes, Section \ref{dualizing-section-local-cohomology}. Choose a complex of $\mathcal{O}$-modules $\mathcal{K}^\bullet$ and a commutative diagram $$ \xymatrix{ \mathcal{O} \ar[r] & \mathcal{J}^\bullet \\ \mathcal{K}^\bullet \ar[r] \ar[u] & \mathcal{F}^\bullet \ar[u] } $$ where the horizontal arrows are quasi-isomorphisms. This is possible by the construction of the derived category $D(\mathcal{O})$. Set $K(A, I) = \mathcal{K}^\bullet(U)$ where $U = (A, I)$. Properties (a) and (b) are clear and properties (c) and (d) follow from Dualizing Complexes, Lemmas \ref{dualizing-lemma-compute-local-cohomology-noetherian} and \ref{dualizing-lemma-local-cohomology-change-rings}.
Let $\mathcal{C}' \subset \mathcal{C}$ be the full subcategory of objects $U$ such that $\mathcal{I}|_U$ is generated by finitely many sections. Then $\mathcal{C}' \to \mathcal{C}$ is a special cocontinuous functor (Sites, Definition \ref{sites-definition-special-cocontinuous-functor}). Hence it suffices to work with $\mathcal{C}'$, see Sites, Lemma \ref{sites-lemma-equivalence}. In other words we may assume that for every object $U$ of $\mathcal{C}$ there exists a finitely generated ideal $I \subset \mathcal{I}(U)$ such that $\mathcal{I}|_U = \Im(I \otimes \mathcal{O}_U \to \mathcal{O}_U)$. We will say that $I$ generates $\mathcal{I}|_U$. Warning: We do not know that $\mathcal{I}(U)$ is a finitely generated ideal in $\mathcal{O}(U)$. \medskip\noindent Let $U$ be an object and $I \subset \mathcal{O}(U)$ a finitely generated ideal which generates $\mathcal{I}|_U$. On the category $\mathcal{C}/U$ consider the complex of presheaves $$ K_{U, I}^\bullet : U'/U \longmapsto K(\mathcal{O}(U'), I\mathcal{O}(U')) $$ with $K(-, -)$ as in Lemma \ref{lemma-all-rings}. We claim that the sheafification of this is independent of the choice of $I$. Indeed, if $I' \subset \mathcal{O}(U)$ is a finitely generated ideal which also generates $\mathcal{I}|_U$, then there exists a covering $\{U_j \to U\}$ such that $I\mathcal{O}(U_j) = I'\mathcal{O}(U_j)$. (Hint: this works because both $I$ and $I'$ are finitely generated and generate $\mathcal{I}|_U$.) Hence $K_{U, I}^\bullet$ and $K_{U, I'}^\bullet$ are the {\it same} for any object lying over one of the $U_j$. The statement on sheafifications follows. Denote $K_U^\bullet$ the common value. \medskip\noindent The independence of choice of $I$ also shows that $K_U^\bullet|_{\mathcal{C}/U'} = K_{U'}^\bullet$ whenever we are given a morphism $U' \to U$ and hence a localization morphism $\mathcal{C}/U' \to \mathcal{C}/U$. Thus the complexes $K_U^\bullet$ glue to give a single well defined complex $K^\bullet$ of $\mathcal{O}$-modules. The existence of the map $K^\bullet \to \mathcal{O}$ and the quasi-isomorphism of the lemma follow immediately from the corresponding properties of the complexes $K(-, -)$ in Lemma \ref{lemma-all-rings}.
Observe that the second complex is the tensor product of the first complex with $\mathcal{O}'$. We can write the first extended alternating {\v C}ech complex as a colimit of the Koszul complexes $K_n = K(\mathcal{O}, f_1^n, \ldots, f_r^n)$, see More on Algebra, Lemma \ref{more-algebra-lemma-extended-alternating-Cech-is-colimit-koszul}. Hence it suffices to prove $K_n \to K_n \otimes_\mathcal{O} \mathcal{O}'$ is a quasi-isomorphism. Since $\mathcal{O} \to \mathcal{O}'$ is flat it suffices to show that $H^i \to H^i \otimes_\mathcal{O} \mathcal{O}'$ is an isomorphism where $H^i$ is the $i$th cohomology sheaf $H^i = H^i(K_n)$. These sheaves are annihilated by $f_1^n, \ldots, f_r^n$, see More on Algebra, Lemma \ref{more-algebra-lemma-homotopy-koszul}. Thus it suffices to show that $\mathcal{O}/(f_1^n, \ldots, f_r^n) \to \mathcal{O}'/(f_1^n, \ldots, f_r^n)$ is an isomorphism. Equivalently, we will show that $\mathcal{O}/(f_1, \ldots, f_r)^n \to \mathcal{O}'/(f_1, \ldots, f_r)^n$ is an isomorphism for all $n$. This holds for $n = 1$ by assumption. It follows for all $n$ by induction using Modules on Sites, Lemma \ref{sites-modules-lemma-flat-over-thickening} applied to the ring map $\mathcal{O}/(f_1, \ldots, f_r)^{n + 1} \to \mathcal{O}/(f_1, \ldots, f_r)^n$ and the module $\mathcal{O}'/(f_1, \ldots, f_r)^{n + 1}$.
Lemma \ref{lemma-pushforward-derived-complete} implies restriction $r : D(\mathcal{O}') \to D(\mathcal{O})$ sends $D_{comp}(\mathcal{O}', \mathcal{I}\mathcal{O}')$ into $D_{comp}(\mathcal{O}, \mathcal{I})$. We will construct a quasi-inverse $E \mapsto E'$. \medskip\noindent Let $K \to \mathcal{O}$ be the morphism of $D(\mathcal{O})$ constructed in Lemma \ref{lemma-global-extended-cech-complex}.  Set $K' = K \otimes_\mathcal{O}^\mathbf{L} \mathcal{O}'$ in $D(\mathcal{O}')$. Then $K' \to \mathcal{O}'$ is a map in $D(\mathcal{O}')$ which satisfies the conclusions of Lemma \ref{lemma-global-extended-cech-complex} with respect to $\mathcal{I}' = \mathcal{I}\mathcal{O}'$. The map $K \to r(K')$ is a quasi-isomorphism by Lemma \ref{lemma-map-identifies-koszul-and-cech-complexes}. Now, for $E \in D_{comp}(\mathcal{O}, \mathcal{I})$ we set $$ E' = R\SheafHom_\mathcal{O}(r(K'), E) $$ viewed as an object in $D(\mathcal{O}')$ using the $\mathcal{O}'$-module structure on $K'$. Since $E$ is derived complete we have $E = R\SheafHom_\mathcal{O}(K, E)$, see proof of Proposition \ref{proposition-derived-completion}. On the other hand, since $K \to r(K')$ is an isomorphism in we see that there is an isomorphism $E \to r(E')$ in $D(\mathcal{O})$. To finish the proof we have to show that, if $E = r(M')$ for an object $M'$ of $D_{comp}(\mathcal{O}', \mathcal{I}')$, then $E' \cong M'$. To get a map we use $$ M' = R\SheafHom_{\mathcal{O}'}(\mathcal{O}', M') \to R\SheafHom_\mathcal{O}(r(\mathcal{O}'), r(M')) \to R\SheafHom_\mathcal{O}(r(K'), r(M')) = E' $$ where the second arrow uses the map $K' \to \mathcal{O}'$. To see that this is an isomorphism, one shows that $r$ applied to this arrow is the same as the isomorphism $E \to r(E')$ above. Details omitted.
The first statement we have seen in Lemma \ref{lemma-pushforward-derived-complete}. Note that the second statement makes sense as we have a derived completion functor $D(\mathcal{O}') \to D_{comp}(\mathcal{O}', \mathcal{I}')$ by Proposition \ref{proposition-derived-completion}. OK, so now let $K \in D_{comp}(\mathcal{O}, \mathcal{I})$ and $M \in D_{comp}(\mathcal{O}', \mathcal{I}')$. Then we have $$ \Hom(K, Rf_*M) = \Hom(Lf^*K, M) = \Hom(Lf_{comp}^*K, M) $$ by the universal property of derived completion.
By Proposition \ref{proposition-derived-completion} the derived completion functors exist. By Lemma \ref{lemma-pushforward-derived-complete} the object $Rf_*(K^\wedge)$ is derived complete, and hence we obtain a canonical map $(Rf_*K)^\wedge \to Rf_*(K^\wedge)$ by the universal property of derived completion. We may check this map is an isomorphism locally on $\mathcal{C}$. Thus, since derived completion commutes with localization (Remark \ref{remark-localization-and-completion}) we may assume that $\mathcal{I}$ is generated by global sections $f_1, \ldots, f_r$. Then $\mathcal{I}'$ is generated by $g_i = f^\sharp(f_i)$. By Lemma \ref{lemma-derived-completion-koszul} we have to prove that $$ R\lim \left( Rf_*K \otimes^\mathbf{L}_\mathcal{O} K(\mathcal{O}, f_1^n, \ldots, f_r^n) \right) = Rf_*\left( R\lim K \otimes^\mathbf{L}_{\mathcal{O}'} K(\mathcal{O}', g_1^n, \ldots, g_r^n) \right) $$ Because $Rf_*$ commutes with $R\lim$ (Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-Rf-commutes-with-Rlim}) it suffices to prove that $$ Rf_*K \otimes^\mathbf{L}_\mathcal{O} K(\mathcal{O}, f_1^n, \ldots, f_r^n) = Rf_*\left( K \otimes^\mathbf{L}_{\mathcal{O}'} K(\mathcal{O}', g_1^n, \ldots, g_r^n) \right) $$ This follows from the projection formula (Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-projection-formula}) and the fact that $Lf^*K(\mathcal{O}, f_1^n, \ldots, f_r^n) = K(\mathcal{O}', g_1^n, \ldots, g_r^n)$.
Apply Lemma \ref{lemma-pushforward-commutes-with-derived-completion} to the morphism of ringed topoi $(\mathcal{C}, \mathcal{O}) \to (pt, A)$ and take cohomology to get the first statement. The second spectral sequence is the second spectral sequence of Derived Categories, Lemma \ref{derived-lemma-two-ss-complex-functor}. The first spectral sequence is the spectral sequence of More on Algebra, Example \ref{more-algebra-example-derived-completion-spectral-sequence} applied to $R\Gamma(\mathcal{C}, \mathcal{F})^\wedge$.
Write $U = \Spec(A)$. The ring $A$ is Noetherian and hence $I \subset A$ is finitely generated. Then we have $$ R\Gamma(U, K^\wedge) = R\Gamma(U, K)^\wedge $$ by Remark \ref{remark-local-calculation-derived-completion}. Now $R\Gamma(U, K)$ is a pseudo-coherent complex of $A$-modules (Derived Categories of Schemes, Lemma \ref{perfect-lemma-pseudo-coherent-affine}). By More on Algebra, Lemma \ref{more-algebra-lemma-derived-completion-pseudo-coherent} we conclude that the $p$th cohomology module of $R\Gamma(U, K^\wedge)$ is equal to the $I$-adic completion of $H^p(U, K)$. This proves the first equality. The second (less important) equality follows immediately from a second application of the lemma just used.
Proof of (1). There is a canonical map $$ K \longrightarrow R\lim (K \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{O}_X/\mathcal{I}^n), $$ see Remark \ref{remark-compare-with-completion}. Derived completion commutes with passing to open subschemes (Remark \ref{remark-localization-and-completion}). Formation of $R\lim$ commutes with passsing to open subschemes. It follows that to check our map is an isomorphism, we may work locally. Thus we may assume $X = U = \Spec(A)$. Say $I = (f_1, \ldots, f_r)$. Let $K_n = K(A, f_1^n, \ldots, f_r^n)$ be the Koszul complex. By More on Algebra, Lemma \ref{more-algebra-lemma-sequence-Koszul-complexes} we have seen that the pro-systems $\{K_n\}$ and $\{A/I^n\}$ of $D(A)$ are isomorphic. Using the equivalence $D(A) = D_{\QCoh}(\mathcal{O}_X)$ of Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-compare-bounded} we see that the pro-systems $\{K(\mathcal{O}_X, f_1^n, \ldots, f_r^n)\}$ and $\{\mathcal{O}_X/\mathcal{I}^n\}$ are isomorphic in $D(\mathcal{O}_X)$. This proves the second equality in $$ K^\wedge = R\lim \left( K \otimes_{\mathcal{O}_X}^\mathbf{L} K(\mathcal{O}_X, f_1^n, \ldots, f_r^n) \right) = R\lim (K \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{O}_X/\mathcal{I}^n) $$ The first equality is Lemma \ref{lemma-derived-completion-koszul}. \medskip\noindent Assume $K$ is pseudo-coherent. For $U \subset X$ affine open we have $H^q(U, K^\wedge) = \lim H^q(U, K)/\mathcal{I}^n(U)H^q(U, K)$ by Lemma \ref{lemma-sections-derived-completion-pseudo-coherent}. As this is true for every $U$ we see that $H^q(K^\wedge) = \lim H^q(K)/\mathcal{I}^nH^q(K)$ as sheaves. This proves (2). \medskip\noindent Part (3) is a special case of (2). Parts (4) and (5) follow from Derived Categories of Schemes, Lemma \ref{perfect-lemma-Rlim-quasi-coherent}.