Theorem of formal functions via derived completion

Thanks to Anatoly Preygel
Thanks to Daniel Halpern-Leistner
Thanks to Bhargav Bhatt

This is my attempt at working out what Anatoly, Dan, and Bhargav
suggested is true (in a talk and a conversation). It is made a tad more
difficult perhaps than they intended in that I tried to put it into the
framework of derived completion. On the other hand, one can state a more
general version of the principle in the new section, for example because
one can work with pseudo-coherent complexes everywhere.

What I am not quite sure about is how derived completion behaves when
one doesn't work over a Noetherian scheme and/or when one doesn't work
with pseudo-coherent complexes.