  We provide a first-principles, perturbative derivation of the AdS5/CFT4
Y-system that has been proposed to solve the spectrum problem of N=4 SYM. The
proof relies on the computation of quantum effects in the fusion of some loop
operators, namely the transfer matrices. More precisely we show that the
leading quantum corrections in the fusion of transfer matrices induce the
correct shifts of the spectral parameter in the T-system. As intermediate steps
we study UV divergences in line operators up to first order and compute the
fusion of line operators up to second order for the pure spinor string in
AdS5xS5. We also argue that the derivation can be easily extended to other
integrable models, some of which describe string theory on AdS4, AdS3 and AdS2
spacetimes.
