TITLE: K theory long exact sequence
QUESTION [6 upvotes]: (1) Suppose that $Z\subset X$ is a closed embedding, $U = X\setminus Z$ is the complement. If relevant, suppose that both $X, Z$ are smooth and even (if relevant) that the normal bundle of $Z\subset X$ is trivial. Then is it true that there is an exact triangle of complexes $K^* (Z)\to K^* (X)\to K^* (U) \to$? Here by $K$ theory I mean (connective) K theory of the category of perfect complexes. For what I need (this came up in the context of trace formulae), rational coefficients are enough. I found many places where very similar results are written down, but not this one explicitly.
(2) Suppose that, further, in the example above we have a (suitably flat) sheaf of smooth, compact (DG) algebras, $\mathcal{A}$, over $X$. Then we can study $K$ theory of categories of bundles of $\mathcal{A}$-modules over the three spaces. Again, is it true that these fall into an exact triangle as above?
It seems like both of these statements should follow from some colimit-compatibility of the $K$ theory functor, but I can't find a reference.

REPLY [3 votes]: You can combine Adeel Khan's answer with Proposition 6.9 of my paper with David Gepner to prove that there are these kinds of localization sequences in a great deal of generality. (Note that our proposition is simply an analogue for stable $\infty$-categories of a dg-categorical result of Toën.) So, if $A$ is a sheaf of (quasi-coherent) dg algebras on $X$, then this proposition shows that there is a fiber sequence $$K_Z(X,A)\rightarrow K(X,A)\rightarrow K(U,A).$$ Identifying the fiber term as $K(Z,i^*A)$, where $i:Z\rightarrow X$ is the inclusion and $i^*A$ is the derived pullback, is not something I've thought about. This kind of dévissage statement is much more difficult for dg algebras than it is for ordinary algebras, and it fails in some cases. There's a discussion of this in my paper with David and Tobias Barthel.