Mathematical foundation of simulation tools