Friday, February 26, 2010

oopsilon-deltoids

Proving, or disproving, the existence of limits is a great target for the tools of logic. The bare-bones limit concept involves a cascade of three quantifiers, mixing universal and existential quantification:
For every positive real number epsilon, there exists a positive real number delta, for every real number x, if |x-c| is less than delta, then |f(x)-f(c)| is less than epsilon.

Limit notation conceals some of the quantification of epsilon and delta:
As x approaches c, f(x) approaches L.
"Approaching" means getting arbitrarily close, and the limit forms says you can get within epsilon of L by getting within delta of c.

Continuity adds an extra feature to the limit concept --- the limit L that is approached by f(x) is exactly f(c). Now pile on another feature: f is continuous at every real number. As a limit this says that for every real number c, the limit of f(x) as x approaches c is f(c). Expressed with quantifiers, the whole bundle becomes:
For every real number c, for every positive real number delta, there exists a positive real number delta, for every real number x, if |x-c| is less than delta, then |f(x)-f(c)| is less than epsilon.
Okay so far? This is the sort of statement we learn how to structure proofs (and disproofs) of in CSC165. We become adept at juggling long strings of symbols and realizing the importance of having one sort of quantifier precede another. We become used to freely changing the symbolic names of variables as suits our purposes. We (and here I think I mean me) can lose sight of conventions that attach particular meaning to particular symbols.

The generic statement above talks about the function f(x). To make it more concrete, let's suppose this is the square function, so f(x) is x2. Suppose, in addition, that I use letters near the end of the Latin alphabet to stand for real numbers, so y seems as good a choice as c for the point in the domain we approach for the limit. Now the above statement about continuity becomes:
For every real number y, for every positive real number epsilon, there exists a positive real number delta, for every real number x, if |x-y| is less than delta, then |x2 - y2| is less than epsilon.

From a logical point-of-view, this is extremely similar to the first statement about continuity at every real point, except instead of a generic function f(x), there is a definite function x2. However, from a psychological and cognitive point-of-view, many people are in the habit of thinking of y as the dependent variable that (graphically) expresses position in the vertical dimension of a graph. Looking at the statement above, they picture y2 shooting out sideways or something.

The lesson is that logical expression is very sensitive to context and connotations that it is afloat in. Although logic can't completely concede to the surrounding context, since it tries to be precise and self-sufficient, logic has to be aware of strange, distracting associations that the use of a particular symbol or word may cause.

Thursday, February 18, 2010

symmetry

Symmetric: The same, only different.

That'll do as a first approximation of a definition. Symmetrical objects aren't identical, but their shared structure (the "same" part) provides us with a short-cut to understanding them.

Logical operations have an abundance of symmetry. Lots of us are familiar with De Morgan's Law: not (P and Q) is equivalent to (not P) or (not Q): the not operation distributes over and, plus "toggles" it into an or. Symmetrically, you can replace every and by an or (and vice-versa) above, to get the other half of De Morgan's law.

There's probably some deep aesthetic pleasure and satisfaction we experience when we discover symmetry, and this probably helps us remember and use symmetrical concepts. However, occasionally the symmetry is so striking that we find it difficult to completely absorb and use. Perhaps this difficulty recedes when we become used to the symmetry, but it's certainly there at first.

I'm thinking of the distributive laws. One form states that P and (Q or R) is equivalent to (P and Q) or (P and R). We can certainly verify this using logical tools such as truth tables and Venn diagrams, and it is analogous to the distributive property in arithmetic, where multiplication is distributed over addition (just substitute multiplication for and and addition for or). However, the comfort and support of analogy evaporate when the second, symmetrical, form is considered: transform each and above into an or, and vice versa. In algebra, there is no distribution of addition over multiplication to help our intuition, but in logic and distributes over or, and or distributes over and.

I became forcefully aware of this working on an exercise I had posed to my students. In the middle of several transformations of some logical expressions, many of us ended up starting at something like:

(not P or R1) and (not P or R2)

Most of us saw one application of the distributive law --- distribute the middle and over the bracketed ors, corresponding to what we would call "expanding " in arithmetic:

((not P or R1) and not P) or ((not P or R1) and R2)

Unfortunately this approach, even when repeated on the bracketed expression on either side of the central or, didn't seem to lead very quick to the desired result. The interesting thing is that few of us saw that the original expression contained another application of the distributive law: the or following not P was distributed over the and, and this can be reversed, corresponding to what would call "factoring" in arithmetic. This approach yields:

not P or (R1 and R2)

... which happened to take us closer to the solution of the exercise.

What intrigues me is the tendency to "see" the first possible application of the distributive law, and not the second. An underlying difficulty is that there are twice as many distributive laws in logic (and over or plus or over and) as there are in arithmetic. This is probably aggravated by it being cognitively a bit harder to recognize the possibility of factoring compared to the possibility of expanding (gathering versus distributing, perhaps).

And we haven't (most of us, anyway) had several years of schoolwork preparing us to recognize these patterns. In some parallel universe, kids learn to manipulate logic symbols in grade one, and they just shake their heads ironically at our difficulty. But then, they are completely stumped by addition being commutative.

Friday, February 5, 2010

The goldilocks problem

In teaching students how to design and implement proofs, we start them with an extremely structured format. This structure is both a boon and an irritation, since it helps organize the ingredients of a proof, while at the same time making the format of a proof extremely predictable. We have the goldilocks problem of making the form predictable enough, but not too predictable.

If students want to prove something about all natural numbers, they introduce a name for a generic natural number, prove things about it, and then conclude that the results they've proved apply to all natural numbers.

We force them to indent the results they prove about the generic natural number, to emphasize that they are inside the "world" where name they've introduced is a generic natural number.

If they go further and implement a proof about an implication, of the form P implies Q, we have them (at least for a direct proof) assume P is true, indent some more, and then derive Q. Our rationale for this step is that if P were false the implication would be vacuously true, so they only have to worry about the case where P is true.

We expect students who become mature theoreticians will develop their own voice, and write clear, valid proofs that diverge from the proof format that we impose in our course, with its arbitrary order and indentation. We don't know exactly when they will develop this mathematical maturity (some of them may already have), so in the mean time we coerce them into mastering one format for proofs that they, and the course teaching staff, can agree works.

My challenge in communicating the proof format to them is to get most students to the point that they are nodding along with the proof format because they understand it, but stop before they are all nodding off. Goldilocks.