The Science of Mechanics in the Middle Ages