Saturday, October 16, 2010

Navigating scope

In CSC165 I coerce students into using a highly-structured expression of proof. Just as the programming language python uses white space on the left (indentation) to indicate scope, they must indent portions of their proof that share scope.

You want to prove something about every real number, so you name a generic real number x so that you can reason about it...

Assume x is a generic real number. To tip off the reader that I'm within the world-view where x has the properties of a real number, I indent one level from the left.

Several assumptions later I may have indented the text nearly off the right-hand margin. To make things even more unnatural, any non-trivial steps in reasoning must be justified. The prose ends up being broken up, and the flow is broken.

It feels as though truth and beauty are at odds here, or at least structure and beauty. I convince myself that, down the road, there will be a payoff when I (or some of my students) will write proofs that have both an easy-flowing style and crystal-clear structure.

Until then, I coerce my students into writing structured proofs.