In the statistical physics of spin glasses and other systems with quenched disorder, the replica trick is a mathematical technique based on the application of the formula: or: where is most commonly the partition function, or a similar thermodynamic function. It is typically used to simplify the calculation of , reducing the problem to calculating the disorder average where is assumed to be an integer. This is physically equivalent to averaging over copies or replicas of the system, hence the name. The crux of the replica trick is that while the disorder averaging is done assuming to be an integer, to recover the disorder-averaged logarithm one must send continuously to zero. This apparent contradiction at the heart of the replica trick has never been formally resolved, however in all cases where the replica method can be compared with other exact solutions, the methods lead to the same results. (To prove that the replica trick works, one would have to prove that Carlson's theorem holds, that is, that the ratio is of exponential type less than pi.) It is occasionally necessary to require the additional property of replica symmetry breaking (RSB) in order to obtain physical results, which is associated with the breakdown of ergodicity. General formulation It is generally used for computations involving analytic functions (can be expanded in power series). Expand using its power series: into powers of or in other words replicas of , and perform the same computation which is to be done on , using the powers of . A particular case which is of great use in physics is in averaging the thermodynamic free energy, , over values of with a certain probability distribution, typically Gaussian. The partition function is then given by . Notice that if we were calculating just (or more generally, any power of ) and not its logarithm which we wanted to average, the resulting integral (assuming a Gaussian distribution) is just , a standard Gaussian integral which can be easily computed (e.g. completing the square). To calculate the free energy, we use the replica trick:which reduces the complicated task of averaging the logarithm to solving a relatively simple Gaussian integral, provided is an integer. The replica trick postulates that if can be calculated for all positive integers then this may be sufficient to allow the limiting behavior as to be calculated. Clearly, such an argument poses many mathematical questions, and