formalizing mechanical analysis