On the epistemic and social foundations of mathematics as tool and instrument in observatories, 1793-1846