Hacker News new | ask | show | jobs
by tuxdev 4885 days ago
Just because you don't explicitly write it down doesn't mean you didn't prove something. For optimization, you have to prove to yourself that the new code behaves equivalently to the old code. Anytime you use algebra you're doing a small proof to show that two expressions should be treated equivalently. Writing a proof down is the very last step, the hard part is thinking it through.
1 comments

I do derivations all the time. I just do a series of algebraic transformations, starting from what I have, and getting to what I need. Some might say that I'm doing a proof. But I never use proof by contradiction, contrapositive, induction, or proper proof techniques.
Doing a derivation like that is sometimes called a proof by "chaining if and only ifs", though that's far from a standard name taught to students. It's basic, but most certainly a required method of proof to come up with convenient formulas.