Factorization of correlation functions and the replica limit of the Toda lattice equation