This paper develops a general theory of canonical bases, and how they arise
naturally in the context of categorification. As an application, we show that
Lusztig's canonical basis in the whole quantized universal enveloping algebra
is given by the classes of the indecomposable 1-morphisms in a categorification
when the associated Lie algebra is finite type and simply laced. We also
introduce natural categories whose Grothendieck groups correspond to the tensor
products of lowest and highest weight integrable representations. This
generalizes past work of the author's in the highest weight case.Comment: 55 pages; DVI may not compile correctly, PDF is preferred. v2: added
section on dual canonical bases. v3: improved exposition in line with new
version of 1309.3796. v4: final version, to appear in Compositio Mathematica.
v5: corrected references for proof of Theorem 4.