Federer-Morse theorem