He dressed quite formally - too formally for the occasion.
He formally filed a complaint, which involved much paperwork.
He proved it formally but gave his students no intuitive feel for the matter.