mv fermat and variation to mathematique directory
add optimisation