Sussman has a great guest lecture that mentions exactly these sorts of issues, and that he found it much easier to verify work he and his grad students did in mathematical physics after developing the "mechanics programming" notation he explains in Structure and Interpretarion of Classical Mechanics and Functional Differential Geometry.