Tag Archives: exposition

A proof by diagram chasing



In Rigorous proofs, I went through the details of a medium-easy epsilon-delta proof in great detail as a way of showing what is hidden by the wording of the proof. In this post, I will do the same for an easy diagram-chasing proof in category theory. This theorem is stated and proved in Category Theory for Computing Science, page 365, but the proof I give here maximizes the diagram-chasing as a way of illustrating the points I want to make.

Theorem (J. Lambek) Let $F$ be a functor from a category to itself and let $\alpha:Fa\to a$ be an algebra for $F$ which is initial. Then $\alpha$ is an isomorphism.

Proof

  1. $F\alpha:FFa\to Fa$ is also an $F$-algebra.
  2. Initiality means that there is a unique algebra morphism $\eta:a\to Fa$ from $\alpha:Fa\to a$ to $F\alpha:FFa\to Fa$ for which this diagram commutes:



  3. To that diagram we can adjoin another (obviously) commutative square:



  4. Then the outside rectangle in the diagram above also commutes.
  5. This means that $\alpha\circ\eta:a\to a$ is an $F$-algebra morphism from $\alpha:Fa\to a$ to itself.
  6. Another such $F$-algebra morphism is $\text{id}_{A}$.
  7. Initiality of $\alpha$ means that the diagram below commutes:



  8. Because the upper bow and the left square both commute we are justified in inserting a diagonal arrow as below.



  9. Now we can read off the diagram that $F\alpha\circ F(\eta)=\text{id}_{Fa}$ and $\eta\circ\alpha=\text{id}_a$. By definition, then, $\eta$ is a two-sided inverse to $\alpha$, so $\alpha$ is an isomorphism.

Analysis of the proof

This is an analysis of the proof showing what is not mentioned in the proof, similar to the analysis in Rigorous proofs.

  • An $F$-algebra is any arrow of the form $\alpha:Fa\to a$. This definition directly verifies statement (1). You do need to know the definition of “functor” and that the notation $Fa$ means $F(a)$ and $FFa$ means $F(F(a))$.
  • When I am chasing diagrams, I visualize the commutativity of the diagram in (2) by thinking of the red path and the blue path as having the same composites in this graph:





    In other words, $F\alpha\circ F\eta=\eta\circ\alpha$. Notice that the diagram carries all the domain and codomain information for the arrows, whereas the formula “$F\alpha\circ F\eta=\eta\circ\alpha$” requires you to hold the domains and codomains in your head.

  • (Definition of morphism of $F$-algebra) The reader needs to know that a morphism of $F$ algebras is any arrow $\delta:c\to d$ for which




    commutes.
  • (Definition of initial $F$-algebra) $\alpha$ is an initial $F$-algebra means that for any algebra $\beta:Fb\to b$, there is a unique arrow $\delta$ for which the diagram above commutes.
  • (2) is justified by the last two definitions.
  • Pulling a “rabbit out of a hat” in a proof means introducing something that is obviously correct with no motivation, and then checking that it results in a proof. Step (9) in the proof given in Rigorous proofs has an example of adding zero cleverly. It is completely OK to pull a rabbit out of a hat in a proof, as long as the result is correct, but it makes students furious.
  • In statement (3) of the proof we are considering here, the rabbit is the trivially commutative diagram that is adjoined on the right of the diagram from (2).
  • Statement (4) uses a fact known to all diagram chasers: Two joined commutative squares make the outside rectangle commute. You can visualize this by seeing that the three red paths shown below all have the same composite. When I am chasing a complicated diagram I trace the various paths with my finger, or in my head.



    You could also show it by pointing out that $\alpha\circ F\alpha\circ F\eta=\alpha\circ\eta\circ\alpha$, but to check that I think most of us would go back and look at the diagram in (3) to see why it is true. Why not work directly with the diagram?

  • The definition of initiality requires that there be only one $F$-algebra morphism from $\alpha:Fa\to a$ to itself. This means that the upper and lower bows in (7) commute.
  • The diagonal identity arrow in (8) is justified by the fact that the upper bow is exactly the same diagram as the upper triangular diagram in (8). It follows that the upper triangle in (8) commutes. I visualize this as moving the bow down and to the left with the upper left node $Fa$ as a hinge, so that the two triangles coincide. (It needs to be flipped, too.) I should make an interactive diagram that shows this.
  • The lower triangle in (8) also commutes because the square in (2) is given to be commutative.
  • (Definition of isomorphism in a category) An arrow $f:a\to b$ in a category is an isomorphism if there is an arrow $g:b\to a$ for which these diagrams commute:


    xx


    This justifies statement (9).

Remark: I have been profligate in using as many diagrams as I want because this can be seen on a screen instead of on paper. That and the fact that much more data about domains and codomains are visible because I am using diagrams instead of equations involving composition means that the proof requires the readers to carry much less invisible data in their heads.

Send to Kindle

Abstracting algebra

This post has been turned into a page on WordPress, accessible in the upper right corner of the screen.  The page will be referred to by all topic posts for Abstracting Algebra.

 

Send to Kindle

Representations of mathematical objects

This is a long post. Notes on viewing.

About this post

A mathematical object, or a type of math object, is represented in practice in a great variety of ways, including some that mathematicians rarely think of as "representations".  

In this post you will find examples and comments about many different types of representations as well as references to the literature. I am not aware that anyone has considered all these different ideas of representation in one place before. Reading through this post should raise your consciousness about what is going on when you do math.  

This is also an experiment in exposition.  The examples are discussed in a style similar to the way a Mathematica command is discussed in the Documentation Center, using mostly nonhierarchical bulleted lists. I find it easy to discover what I want to know when it is written in that way.  (What is hard is discovering the name of a command that will do what I want.)

Types of representations

Using language

  • Language can be used to define a type of object.
  • A definition is intended to be precise enough to determine all the properties that objects of that type all have.  (Pay attention to the two uses of the word "all" in that sentence; they are both significant, in very different ways.)
  • Language can be used to describe an object, exhibiting properties without determining all properties.
  • It can also provide metaphors, making use of one of the basic tools of our brain to understand the world. 
  • The language used is most commonly mathematical English, a special dialect of English.
  • The symbolic language of mathematics (distinct from mathematical English) is used widely in calculations. Phrases from the symbolic language are often embedded in a statement in math English. The symbolic language includes among others algebraic notation and logical notation. 
  • The language may also be a formal language, a language that is mathematically defined and is thus itself a mathematical object. Logic texts generally present the first order predicate calculus as a formal language. 
  • Neither mathematical English nor the symbolic language is a formal language. Both allow irregularities and ambiguities.

Mathematical objects

The representation itself may be a mathematical object, such as:

  • A linear representation of a group. Not only are the groups mathematical objects, so is the representation.
  • An embedding of a manifold into Euclidean space. A definition given in a formal language of the first order predicate calculus of the property of commutativity of binary operations. (Thus a property can be represented as a math object.)

Visual representations

A math object can be represented visually using a physical object such as a picture, graph (in several senses), or diagram.  

  • The visual processing of our brain is our major source of knowledge of the world and takes about a fifth of the brain's processing power.  We can learn many things using our vision that would take much longer to learn using verbal descriptions.  (Proofs are a different matter.)
  • When you look at a graph (for example) your brain creates a mental representation of the graph (see below).

Mental representations

If you are a mathematician, a math object such as "$42$", "the real numbers" or "continuity" has a mental representation in your brain.  

  • In the math ed literature, such a representation is called "mental image", "concept image", "procept", or "schema".   (The word "image" in these names is not thought of as necessarily visual.) 
  • The procept or schema describe all the things that come to mind when you think about a particular math object: The definition, important theorems, visual images, important examples, and various metaphors that help you understand it. 
  • The visual images occuring in a mental schema for an object may themselves be mental representations of physical objects. The examples and theorems may be mental representations of ideas you learned from language or pictures, and so on.  The relationships between different kinds of representations get quite convoluted.

Metaphors

Conceptual metaphors are a particular kind of mental representation of an object which involve mentally associating some aspects of the objects with some aspects of something else — a physical object, an image, an action or another abstract object.

  • A conceptual metaphor may give you new insight into the object.
  • It may also mislead you because you think of properties of the other object that the math object doesn't have.
  • A graph of a function is a conceptual metaphor.
  • When you say that a point on a graph "rises as it goes from left to right" your metaphor is an action. 
  • When you say that the cosets of a normal subgroup of a group "get along" with the group multiplication, your metaphor identifies a property they have with an aspect of human behavior.

Properties of representations

A representation of a math object may or may not

  • determine it completely
  • exhibit some of its properties
  • suggest easy proofs of some theorems
  • provide a useful way of thinking about it
  • mislead you about the object's properties
  • mislead you about what is significant about the object

Examples of representations

This list shows many of the possibilities of representation.  In each case I discuss the example in terms of the two bulleted lists above. Some of the examples are reused from my previous publications.

Functions

Example (F1) "Let $f(x)$ be the function defined by $f(x)=x^3-x$."

  • This is an expression in mathematical English that a fluent reader of mathematical English will recognize gives a definition of a specific function.
  • (F1) is therefore a representation of that function.  
  • The word "representation" is not usually used in this way in math.  My intention is that it should be recognized as the same kind of object as many other representations.
  • The expression contains the formula $x^3-x$.  This is an encapsulated computation in the symbolic language of math. It allows someone who knows basic algebra and calculus to perform calculations that find the roots, extrema and inflection points of the function $f$.  
  • The word "let" suggests to the fluent reader of mathematical English that (F1) is a definition which is probably going to hold for the next chunk of text, but probably not for the whole article or book.
  • Statements in mathematical English are generally subject to conventions.  In a calculus text (F1) would automatically mean that the function had the real numbers as domain and codomain.
  • The last two remarks show that a beginner has to learn to read mathematical English. 
  • Another convention is discussed in the following diatribe.

Diatribe 

You would expect $f(x)$ by itself to mean the value of $f$ at $x$, but in (F1) the $x$ has the property of a bound variable.  In mathematical English, "let" binds variables. However, after the definition, in the text the "$x$" in the expression "$f(x)$" will be free, but the $f$ will be bound to the specific meaning.  It is reasonable to say that the term "$f(x)$" represents the expression "$x^3-x$" and that $f$ is the (temporary) name of the function. Nevertheless, it is very common to say "the function $f(x)$" to mean $f$.  

A fluent reader of mathematical English knows all this, but probably no one has ever said it explicitly to them.  Mathematical English and the symbolic language should be taught explicitly, including its peculiarities such as "the function $f(x)$".  (You may want to deprecate this usage when you teach it, but students deserve to understand its meaning.)

The positive integers

You have a mental representation of the positive integers $1,2,3,\ldots$.  In this discussion I will assume that "you" know a certain amount of math.  Non-mathematicians may have very different mental representations of the integers.

  • You have a concept of "an integer" in some operational way as an abstract object.
  • "Abstract object" needs a post of its own. Meanwhile see Mathematical Objects (abstractmath) and the Wikipedia articles on Mathematical objects and Abstract objects.
  • You have a connection in your brain between the concept of integer and the concept of listing things in order, numbering them by $1,2,3,\ldots$.
  • You have a connection in your brain between the concept of an integer and the concept of counting a finite number of objects.  But then you need zero!
  • You understand how to represent an integer using the decimal representation, and perhaps representations to other bases as well. 
  • Your mental image has the integer "$42"$ connected to but not the same as the decimal representation "42". This is not true of many students.
  • The decimal rep has a picture of the string "42" associated to it, and of course the picture of the string may come up when you think of the integer $42$ as well (it does for me — it is a an icon for the number $42$.)
  • You have a concept of the set of integers. 
  • Students need to be told that by convention "the set of integers" means the set of all integers.  This particularly applies to students whose native language does not have articles, but American students have trouble with this, too.
  • Your concept of  "the set of integers" may have the icon "$\mathbb{N}$" associated with it.  If you are a mathematician, the icon and the concept of the set of integers are associated with each other but not identified with each other.
  • For me, at least, the concept "set of integers" is mentally connected to each integer by the "element of" relation. (See third bullet below.)
  • You have a mental representation of the fact that the set of integers is infinite.  
  • This does not mean that your brain contains an infinite number of objects, but that you have a representation of infinity as a concept, it is brain-connected to the concept of the set of integers, and also perhaps to a proof of the fact that $\mathbb{N}$ is infinite.
  • In particular, the idea that the set of integers is mentally connected to each integer does not mean that the whole infinite number of integers is attached in your brain to the concept of the set of integers.  Rather, the idea is a predicate in your brain.  When it is connected to "$42$", it says "yes".  To "$\pi$" it says "No".
  • Philosophers worry about the concept of completed infinity.  It exists as a concept in your brain that interacts as a meme with concepts in other mathematicians' brains. In that way, and in that way only (as far as I am concerned) it is a physical object, in particular an object that exists in scattered physical form in a social network.

Graph of a function

This is a graph of the function $y=x^3-x$:

Graph of a cubic function

  • The graph is a physical object, either on a screen or on paper
  • It is processed by your visual system, the most powerful sensory management system in your brain
  • It also represents the graph in the mathematical sense (set of ordered pairs) of the function $y=x^3-x$
  • Both the mathematical graph and the physical graph are represented by modules in your brain, which associates the two of them with each other by a conceptual metaphor
  • The graph shows some properties of the function: inflection point, going off to infinity in a specific way, and so on.
  • These properties are made apparent (if you are knowledgeable) by means of the powerful pattern recognition system in your brain. You see them much more quickly than you can discover them by calculation.
  • These properties are not proved by the graph. Nevertheless, the graph communicates information: for example, it suggests that you can prove that there is an inflection point near $(0,0)$.
  • The graph does not determine or define the function: It is inaccurate and it does not (cannot) show all of the graph.
  • More subtle details about this graph are discussed in my post Representations 2.

Continuity

Example (C1) The $\epsilon-\delta$ definition of the continuity of a function $f:\mathbb{R}\to\mathbb{R}$ may be given in the symbolic language of math:

A function $f$ is continuous at a number $c$ if \[\forall\epsilon(\epsilon\gt0\implies(\forall x(\exists\delta(|x-c|\lt\delta\implies|f(x)-f(c)|\lt\epsilon)))\]

  • To understand (C1), you must be familiar with the notation of first order logic.  For most students, getting the notation right is quite a bit of work.  
  • You must also understand  the concepts, rules and semantics of first order logic.  
  • Even if you are familiar with all that, continuity is still a difficult concept to understand.
  • This statement does show that the concept is logically complicated. I don't see how it gives any other intuition about the concept. 

Example (C2) The definition of continuity can also be represented in mathematical English like this:

A function $f$ is continuous at a number $c$ if for any $\epsilon\gt0$ and for any $x$ there is a $\delta$ such that if $|x-c|\lt\delta$, then $|f(x)-f(c)|\lt\epsilon$. 

  • This definition doesn't give any more intuition that (C1) does.
  • It is easier to read that (C1) for most math students, but it still requires intimate familiarity with the quirks of math English.
  • The fact that "continuous" is in boldface signals that this is a definition.  This is a convention.
  • The phrase "For any $\epsilon\gt0$" contains an unmarked parenthetic insertion that makes it grammatically incoherent.  It could be translated as: "For any $\epsilon$ that is greater than $0$".  Most math majors eventually understand such things subconsciously.  This usage is very common.
  • Unless it is explicitly pointed out, most students won't notice that  if you change the phrase "for any $x$ there is a $\delta$"  to "there is a $\delta$ for any $x$" the result means something quite different.  Cauchy never caught onto this.
  • In both (C1) and (C2), the "if" in the phrase "A function $f$ is continuous at a number $c$ if…" means "if and only if" because it is in a definition.  Students rarely see this pointed out explicitly.  

Example (C3) The definition of continuity can be given in a formally defined first order logical theory

  • The theory would have to contain function symbols and axioms expressing the algebra of real numbers as an ordered field. 
  • I don't know that such a definition has ever been given, but there are various semi-automated and automated theorem-proving systems (which I know little about) that might be able to state such a definition.  I would appreciate information about this.
  • Such a definition would make the property of continuity a mathematical object.
  • An automated theorem-proving system might be able to prove that $x^3-x$ is continuous, but I wonder if the resulting proof would aid your intuition much.

Example (C4) A function from one topological space to another is continuous if the inverse of every open set in the codomain is an open set in the domain.

  • This definition is stated in mathematical English.
  • All definitions start with primitive data. 
  • In definitions (C1) – (C3), the primitive data are real numbers and the statement uses properties of an ordered field.
  • In (C4), the data are real numbers and the arithmetic operations of a topological field, along with the open sets of the field. The ordering is not mentioned.
  • This shows that a definition need not mention some important aspects of the structure. 
  • One marvelous example of this is that  a partition of a set and an equivalence relation on a set are based on essentially disjoint sets of data, but they define exactly the same type of structure.

Example (C4) "The graph of a continuous function can be drawn without picking up the chalk".

  • This is a metaphor that associates an action with the graph.
  • It is incorrect: The graphs of some continuous functions cannot be drawn.  For example, the function $x\mapsto x^2\sin(1/x)$ is continuous on the interval $[-1,1]$ but cannot be drawn at $x=0$. 
  • Generally speaking, if the function can be drawn then it can be drawn without picking up the chalk, so the metaphor provides a useful insight, and it provides an entry into consciousness-raising examples like the one in the preceding bullet.

References

  1. 1.000… and .999… (post)
  2. Conceptual blending (post)
  3. Conceptual blending (Wikipedia)
  4. Conceptual metaphors (Wikipedia)
  5. Convention (abstractmath)
  6. Definitions (abstractmath)
  7. Embodied cognition (Wikipedia)
  8. Handbook of mathematical discourse (see articles on conceptual blendmental representationrepresentationmetaphor, parenthetic assertion)
  9. Images and Metaphors (abstractmath).
  10. The interplay of text, symbols and graphics in math education, Lin Hammill
  11. Math and the modules of the mind (post)
  12. Mathematical discourse: Language, symbolism and visual images, K. L. O’Halloran.
  13. Mathematical objects (abmath)
  14. Mathematical objects (Wikipedia)
  15. Mathematical objects are “out there?” (post)
  16. Metaphors in computing science ​(post)
  17. Procept (Wikipedia)
  18. Representations 2 (post)     
  19. Representations and models (abstractmath)
  20. Representations II: dry bones (post)
  21. Representation theorems (Wikipedia) Concrete representations of abstractly defined objects.
  22. Representation theory (Wikipedia) Linear representations of algebraic structures.
  23. Semiotics, symbols and mathematical visualization, Norma Presmeg, 2006.
  24. The transition to formal thinking in mathematics, David Tall, 2010
  25. Theory in mathematical logic (Wikipedia)
  26. What is the object of the encapsulation of a process? Tall et al., 2000.
  27. Where mathematics comes from, by George Lakoff and Rafael Núñez, Basic Books, 2000. 
  28. Where mathematics comes from (Wikipedia) This is a review of the preceding book.  It is a permanent link to the version of 04:23, 25 October 2012.  The review is opinionated, partly wrong, not well written and does not fit the requirements of a Wikipedia entry.  I recommend it anyway; it is well worth reading.  It contains links to three other reviews.

Notes on Viewing  

This post uses MathJax. If you see mathematical expressions with dollar signs around them, or badly formatted formulas, try refreshing the screen. Sometimes you have to do it two or three times.

Send to Kindle

Explaining “higher” math to beginners


The interactive example in this post require installing Wolfram CDF player, which is free and works on most desktop computers using Firefox, Safari and Internet Explorer, but not Chrome. The source code is the Mathematica Notebook algebra2.nb, which is available for free use under a Creative Commons Attribution-ShareAlike 2.5 License. The notebook can be read by CDF Player if you cannot make the embedded versions in this post work.

Notes on viewing

Explaining math

I am in the process of writing an explanation of monads for people with not much math background.  In that article, I began to explain my ideas about exposition for readers at that level and after I had written several paragraphs decided I needed a separate article about exposition.  This is that article. It is mostly about language.

Who is it written for?

Interested laypeople

There are many recent books explaining some aspect of math for people who are not happy with high school algebra; some of them are listed in the references.  They must be smart readers who know how to concentrate, but for whom algebra and logic and definition-theorem-proof do not communicate.  They could be called interested laypeople, but that is a lousy name and I would appreciate suggestions for a better name. 

Math newbies

My post on monads is aimed at people who have some math, and who are interested in "understanding" some aspect of "higher math"; not understanding in the sense of being able to prove things about monads, but merely how to think about them.   I will call them math newbies.  Of course, I am including math majors, but I want to make it available to other people who are willing to tackle mathematical explanations and who are interested in knowing more about advanced stuff. 

These "other people" may include people (students and practitioners) in other science & technology areas as well as liberal-artsy people.  There are such people, I have met them.  I recall one theologian who asked me about what was the big deal about ruler-and-compass construction and who seemed to feel enlightened when I told him that those constructions preserve exactly the ideal nature of geometric objects.  (I later found out he was a famous theologian I had never heard of, just like Ngô Bảo Châu is a famous mathematician nonmathematicians have never heard of.)

Algebra and other foreign languages

If you are aiming at interested laypeople you absolutely must avoid algebra.  It is a foreign language that simply does not communicate to most of the educated people in the world.  Learning a foreign language is difficult. 

So how do you avoid algebra?  Well, you have to be clever and insightful.  The book by Matthew Watkins (below) has absolutely wonderful tricks for doing that, and I think anyone interested in math exposition ought to read it.  He uses metaphors, pictures and saying the same thing in different words. When you finish reading his book, you won't know how to prove statements related to the prime number theorem (unless you already knew how) but you have a good chance of understanding the statement of some theorem in that subject. See my review of the book for more details.

If your article is for math newbies, you don't have to avoid algebra completely.  But remember they are newbies and not as fluent as you are — they do things analogous to "Throw Mama from the train a kiss" and "I can haz cheeseburger?".  But if you are trying to give them some way of thinking about a concept, you need many other things (metaphors, illustrative applications, diagrams…)  You don't need the definition-theorem-proof style too common in "exposition".  (You do need that for math majors who want to become professional mathematicians.) 

Unfamiliar notation

In writing expositions for interested laypeople or math newbies, you should not introduce an unfamiliar notation system (which is like a minilanguage).  I expect to write the monad article without commutative diagrams.  Now, commutative diagrams are a wonderful invention, the best way of writing about categories, and they are widely used by other than category theorists.  But to explain monads to a newbie by introducing and then using commutative diagrams is like incorporating a short grammar of Spanish which you will then use in an explanation of Sancho Panza's relationship with Don Quixote. 

The abstractmath article on and, or and not does not use any of the several symbolic notations for logic that are in use.  The explanations simply use "and", "or" and "not".  I did introduce the notation, but didn't use it in the explanations.  When I rewrite the article I expect to put the notation at the end of the article instead of in the middle.  I expect to rewrite the other articles on mathematical reasoning to follow that practice, too.

Technical terminology

This is about the technical terminology used in math.  Technical terminology belongs to the math dialect (or register) of English, which is not a foreign language in the same sense as algebra.  One big problem is changing the meaning of ordinary English words to a technical meaning.  This requires a definition, and definitions are not something most people take seriously until they have been thoroughly brainwashed into using mathematical methodology.  Math majors have to be brainwashed in this way, but if you are writing for laypeople or newbies you cannot use the technology of formal definition.

Groups, simple groups

"You say the Monster Group is SIMPLE???  You must be a GENIUS!"  So Mark Ronan in his book (below) referred to simple groups as atoms.  Marcus du Sautoy calls them building blocks.  The mathematical meaning of "simple group" is not a transparent consequence of the meanings of "simple" and "group". Du Sautoy usually writes "group of symmetries" instead of just "group", which gives you an image of what he is talking about without having to go into the abstract definition of group. So in that usage, "group" just means "collection", which is what some students continue to think well after you give the definition.  

A better, but ugly, name for "group" might be "symmetroid". It sounds technical, but that might be an advantage, not a disadvantage. "Group" obviously means any collection, as I've known since childhood. "Symmetroid" I've never heard of so maybe I'd better find out what it means.

In beginning abstract math courses my students fervently (but subconsciously) believe that they can figure out what a word means by what it means already, never mind the "definition" which causes their eyes to glaze over. You have to be really persuasive to change their minds.

Prime factorization

Matthew Watkins referred to the prime factorization of an integer as a cluster. I am not sure why Watkins doesn't like "prime factorization", which usually refers to an expression such as  $p^{n_1}_1p^{n_2}_2\ldots p^{n_k}_k$.  This (as he says) has a spurious ordering that makes you have to worry about what the uniqueness of factorization means. The prime factorization is really a multiset of primes, where the order does not matter. 

Watkins illustrates a cluster of primes as a bunch of pingpong balls stuck together with glue, so the prime factorization of 90 would be four smushed together balls marked 2, 3, 3 and 5. Below is another way of illustrating the prime factorization of 90. Yes, the random movement programming could be improved, but Mathematica seduces you into infinite playing around and I want to finish this post. (Actually, I am beginning to think I like smushed pingpong balls better. Even better would be a smushed pingpong picture that I could click on and look at it from different angles.)

Metaphors, pictures, graphs, animation

Any exposition of math should use metaphors, pictures and graphs, especially manipulable pictures (like the one above) and graphs.  This applies to expositions for math majors as well as laypeople and newbies.  Calculus and other texts nowadays have begun doing this, more with pictures than with metaphors. 

I was turned on to these ideas as far back as 1967 (date not certain) when I found an early version of David Mumford's "Red Book", which I think evolved into the book The Red Book of Varieties and Schemes.  The early version was a revelation to me both about schemes and about exposition. I have lost the early book and only looked at the published version briefly when it appeared (1999).  I remember (not necessarily correctly) that he illustrated the spectrum as a graph whose coordinates were primes, and generic points were smudges.  Writing this post has motivated me to go to the University of Minnesota math library and look at the published version again.

References

Expositions for educated non-mathematicians

Previous posts in G&G

Relevant abmath articles

Send to Kindle

Metaphors in computing science 2

In Metaphors in Computer Science 1, I discussed some metaphors used when thinking about various aspects of computing.  This is a continuation of that post.

Metaphor: A program is a list of instructions.

  • I discussed this metaphor in detail in the earlier post.
  • Note particularly that the instructions can be in a natural or a programming language. (Is that a zeugma?)  Many writers would call instructions in a natural language an algorithm.
  • I will continue to use “program” in the broader sense.

Metaphor: A programming language is a language.

  • This metaphor is a specific conceptual blend that associates the strings of symbols that constitute a program in a computer language with text in a natural language.
  • The metaphor is based on some similarities between expressions in a programming language and expressions in a natural language.
    • In both, the expressions have a meaning.
    • Both natural and programming languages have specific rules for constructing well-formed expressions.
  • This way of thinking ignores many deep differences between programming languages and natural languages. In particular, they don’t talk about the same things!
  • The metaphor has been powerful in suggesting ways of thinking about computer programs, for example semantics (below) and ambiguity.

Metaphor: A computer program is a list of statements

  • A consequence of this metaphor is that a computer program is a list of symbols that can be stored in a computer’s memory.
  • This metaphor comes with the assumption that if the program is written in accordance with the language’s rules, a computer can execute the program and perhaps produce an output.
  • This is the profound discovery, probably by Alan Turing, that made the computer revolution possible. (You don’t have to have different physical machines to do different things.)
  • You may want me to say more in the heading above: “A computer program is a list of statements in a programming language that satisfies the well-formedness requirements of the language.”  But the point of the metaphor is only that a program is a list of statements.  The metaphor is not intended to define the concept of “program”.

Metaphor: A program in a computer language has meanings.

A program is intended to mean something to a human reader.

  • Some languages are designed to be easily read by a human reader: Cobol, Basic, SQL.
    • Their instructions look like English.
    • The algorithm can nevertheless be difficult to understand.
  • Some languages are written in a dense symbolic style.
    • In many cases the style is an extension of the style of algebraic formulas: C, Fortran.
    • Other languages are written in a notation not based on algebra:  Lisp, APL, Forth.
  • The boundary between “easily read” and “dense symbolic” is a matter of opinion!

A program is intended to be executed by a computer.

  • The execution always involves translation into intermediate languages. 
    • Most often the execution requires repeated translation into a succession of intermediate languages.
    • Each translation requires the preservation of the intended meaning of the program.
  • The preservation of intended meaning is what is usually called the semanticsof a programming language.
    • In fact, the meaning of the program to a person could be called semantics, too.
    • And the human semantics had better correspond in “meaning” to the machine semantics!
  • The actual execution of the program requires successive changes in the state of the computer.
    • By “state” I mean a list of the form of the electrical charges of each unit of memory in the computer.
    • Or you can restrict it to the relevant units of memory, but spelling that out is horrifying to contemplate.
    • The resulting state of the machine after the program is run is required to preserve the intended meaning as well as all the intermediate translations.
    • Notice that the actual execution is a series of physical events.  You can describe the execution in English or in some notation, but that notation is not the actual execution.

References

Conceptual blend (Wikipedia)

Conceptual metaphors (Wikipedia)

Images and Metaphors (article in abstractmath)

Semantics in computer science (Wikipedia)

Send to Kindle

Computable algebraic expressions in tree form

Invisible algebra

  1. An  expression such as $4(x-2)=6$ has an invisible abstract structure.  In this simple case it is

using the style of presenting trees used in academic computing science.  The parentheses are a clue to the structure; omitting them results in  $4x-2=6$, which has the different structure

By the time students take calculus they supposedly have learned to perceive and work with this invisible structure, but many of them still struggle with it.  They have a lot of trouble with more complex expressions, but even something like $\sin x + y$ gives some of them trouble.

Make the invisible visible

The tree expression makes the invisible structure explicit. Some math educators such as Jason Dyer and Bret Victor have experimented with the idea of students working directly with a structured form of an algebraic expression, including making the structured form interactive.

How could the tree structure be used to help struggling algebra students?

1) If they are learning on the computer, the program could provide the tree structure at the push of a button. Lessons could be designed to present algebraic expressions that look similar but have different structure.

2) You could point out things such as:

a) “inside the parentheses pushes it lower in the tree”
b) “lower in the tree means it is calculated earlier”

3) More radically, you could teach algebra directly using the tree structure, with the intention of introducing the expression-as-a-string form later.  This is analogous to the use of the initial teaching alphabet for beginners at reading, and also the use of shape notes to teach sight reading of music for singing.  Both of these methods have been shown to help beginners, but the ITA didn’t catch on and although lots of people still sing from shape notes (See Note 1) they are not as far as I know used for teaching in school.

4) You could produce an interactive form of the structure tree that the student could use to find the value or solve the equation.  But that needs a section to itself.

Interactive trees

When I discovered the TreeForm command in Mathematica (which I used to make the trees above), I was inspired to use it and the Manipulate command to make the tree interactive.


This is a screenshot of what Mathematica shows you.  When this is running in Mathematica, moving the slide back and forth causes the dependent values in the tree also change, and when you slide to 3.5, the slot corresponding to $ 4(x-2)$ becomes 6 and the slot over “Equals” becomes “True”:

As seen in this post, these are just screen shots that you can’t manipulate.  The Mathematica notebook Expressions.nb gives the code for this and lets you experiment with it.  If you don’t have Mathematica available to you, you can still manipulate the tree with the slider if you download the CDF form of the notebook and open it in Mathematica CDF Player, which is available free here.  The abstractmath website has other notebooks you may want to look at as well.

Moving the slider back and forth constitutes finding the correct value of x by experiment.  This is a peculiar form of bottom-up evaluation.   With an expression whose root node is a value rather than an equation, wiggling the slider constitutes calculating various values with all the intermediate steps shown as you move it.  Bret Victor s blog shows a similar system, though not showing the tree.

Another way to use the tree is to arrange to show it with the calculated values blank.  (The constants and the labels showing the operation would remain.)   The student could start at the top blank space (over Times)  and put in the required value, which would obviously have to be 6 to make the space over Equals change to “True”.  Then the blank space over Plus would have to be 1.5 in order to make multiplying it by 4 be 6.  Then the bottom left blank space would have to be 3.5 to make it equal to 1.5 when -2 is added.  This is top down evaluation.

You could have the student enter these numbers in the blank spaces on the computer or print out the tree with blank spaces and have them do it with a pencil.  Jason Dyer’s blog has examples.

Implementation

My example code in the notebook is a kludge.  If you defined a  special VertexRenderingFunction for TreeForm in Mathematica, you could create a function that would turn any algebraic expression into a manipulatable tree with a slider like the one above (or one with blank spaces to be filled in).  [Note 2]. I expect I will work on that some time soon but my main desire in this series of blog posts is to through out ideas with some Mathematica code attached that others might want to develop further. You are free to reuse all the Mathematica code and all my blog posts under the Creative Commons Attribution – ShareAlike 3.0 License.  I would like to encourage this kind of open-source behavior.

Notes

1. Including me every Tuesday at 5:30 pm in Minneapolis (commercial).

2. There is a problem with Equals.  In the hacked example above I set the increment the value jumps by when the slider is moved to 0.1, so that the correct value 3.5 occurs when you slide.  If you had an equation with an irrational root this would not work.  One thing that should work is to introduce a fuzzy form of Equals with the slide-increment smaller that the latitude allowed in the fuzzy Equals.

Send to Kindle

Playing with Riemann Sums

I had a satori [Note 2].  I felt like the guy in the ads who sits in front of his new ultrafast computer with the wind blowing his hair back and bracing himself by holding onto the desk.  (My hair was dark then but I certainly was not wearing a tie.)

That convergence theorem was talking about something BIG.

I visualized a Cloud of Riemann Sums floating around and swerving closer to the Right Answer as their meshes decreased.

A Riemann Sum has a lot of parameters:

  • Its mesh.  This can be any positive real number.
  • Its choice of subintervals. Any positive integer!  There can be billions of subintervals.
  • And, ye gods, the individual choice of each evaluation point for each subinterval in each Riemann Sum

Those are three independent parameters, except for the constraint imposed by the mesh on each choice of subintervals.  [Note 3].

I tell my students that we have to zoom in and zoom out [Reference 2] from a problem.  When we zoom out a complicated structure is thought of as a point in a certain relationship with other structures-as-points.  Then to understand something we zoom in (selectively) to see the details that make it work.  What I remember from my satori is that I didn’t visualize them as points but rather as little blurs, sort of like the blurs in Mumford’s red book [Reference 3], which I think was the first non-constipated math text I had ever seen.

Riemann Sums in Mathematica

In the nineties, I was on a grant to create Mathematica programs for students, and one of the notebooks I created allowed you to easily exhibit Riemann sums with various parameters.  I also included code that would show a cloud.

Below is a cloud.  It is a plot of the values of 300 Riemann sums for \int_0^{\pi} \sin x \,dx.  They have randomly chosen meshes from 0 to \pi/2 and the subintervals and individual evaluation points for each subinterval are also chosen randomly.

The cloud below is a plot of the values of 300 Riemann sums for the area of the upper right quarter circle of radius 2 with center at origin.  Its meshes range from 0 to 1, and other properties are similar to the one above.  The vertical spread of the points is considerably bigger,  presumably because of the vertical tangent line at the right hand end of the integral.

When you click on the code for either of these you get a different cloud with the same parameters.

You can access the notebook containing the code for this via Abmath Gate.    Be sure to read the ReadMe file.

Notes

[1] This was 1961.  Of course the book didn’t say things such as “with any choice of points-to-evaluate-at”.  It said what it had to say in stilted academic prose which required reading it two or three times before understanding it.  Academic prose is much better these days.  See Reference [1].

I was quite good at reading complicated prose. My ACT scores were a tad higher in English or Language or whatever it is called that they were in Math.  With the Internet, math exposition should do much more with pictures, interactive things, and lots of examples (which don’t waste paper now).  But that is another diatribe…

[2] This is a snooty word for lightbulb flashing over your head.  Every once in awhile I give in to the temptation to use some obscure word to impress people as to the variety of things I know about.  Teachers, don’t do this to your students.  Other professors are fair game.

[3] The same choice of subinterval can correspond to many different meshes, if your definition of mesh requires only that each subinterval be narrower than the mesh, rather than requiring that the mesh be the size of the biggest subinterval.  (I had never thought about that until I wrote this.)

[4] The Mathematica Demonstrations website has several other notebooks that exhibit Riemann Sums.

References

[1]  The Revolution in Technical Exposition II, post on this blog.

[2]  Zooming and Chunking in abmath.

[3] D. Mumford, The Red Book of Varieties and Schemes (second expanded ed.), Springer Lecture Notes in Math 1358, Springer-Verlag, Berlin, 1999.   (I have not seen this edition.  What I remember is the Red Book as it was in the 1967 Algebraic Geometry Summer School at Bowdoin.  I hope the smudges survive in the new version.  As I remember the smudges were bigger for points that were more generic or something like that.  Those smudges caused me a kind of sartori, too.)

Send to Kindle

Expository writing in the future

I have written a lot about math exposition in the past. [Note 1.] Lately I have been thinking about the effect of technological change on exposition.

Texting

A lot of commentators have complained that their students’ writing style has “deteriorated” because of texting, specifically their use of abbreviations and acronyms.

Last January I resumed teaching mathematics after an exactly ten year lapse. My students and I email a lot, post on message boards, hand in homework, write up tests. I have seen very few “lol”s and “cu”s and the like, mostly in emails and almost entirely from students whose native language is not English. (See Note 1.)

As far as I can see the students’ written language has not deteriorated. In fact I think native English speakers write better English than they did ten years ago. (But Minnesota has a considerably better educational system than Ohio.)

Besides, if lol and cu become part of the written language, so what? Many Old Fogies may find it jarring, but Old Fogies die and their descendants talk however they want to.

Bulleted lists

I have been using Powerpoint part of the time in teaching (I had already given some talks using it). People complain about that affecting our style, too. But I think that in particular bulleted and numbered lists are great. I wish people would use them more often. Consider this passage from a recent version of Thomas’ Calculus [1]:

\displaystyle  \int_a^bx\,dx=\dfrac{b^2}{2}-\dfrac{a^2}{2}\quad (a<  b)\quad\quad\quad(1)

This computation gives the area of a trapezoid. Equation (1) remains valid when {a} and {b} are negative. When {a<b<0}, the definite integral value … is a negative number, the negative of the area of the trapezoid dropping down to the line {y=x} below the {x}-axis. When {a<0} and {b>0}, Equation (1) is still valid and the definite integral gives the difference between two areas …

It would be much better to write something like this:

Equation (1) is valid for any {a} and {b}.

  • When {a} and {b} are positive, Equation (1) gives the area of a trapezoid.
  • When {a} and {b} are both negative, the result is negative and is the negative of the area…
  • When {a<0} and {b>0}, the result is the difference between two areas…

That is much easier to read than the first version, in which you have to parse through the paragraph detecting that it states parallel facts. That is not terribly difficult but it slows you down. Especially in this case where the sentences are not written in parallel and contain remarks about validity in scattered places when in fact the equation is valid for all cases.

This book does use numbered or lettered lists in many other places.

The future is upon us

Lots of lists and illustrations require more paper. This will go away soon. Some future edition of the book on an e-reader could contain this list of facts as a nicely spaced list, much easier to grasp, and could contain three graphs, with {a} and {b} respectively left of the {x}-axis, straddling it, and to the right of it. This will cost some preparation time but no paper and computer memory at the scale of a book is practically free.

I use bulleted lists a lot in abstractmath, as here. Abstractmath is intended to be read on the computer. It is not organized linearly and a paper copy would not be particularly useful.

By the way, since the last time I looked at this page all the bullets have been replaced with copyright signs. (In three different browsers!) Somebody’s been Messing With Me. AArgH.

The Irish mystery writer Ken Bruen regularly uses lists, without bullets or numbers. Look at page 3 of The Killing of the Tinkers.

Some people find bulleted lists jarring simply because they are new. I think some are academic snobs who diss anything that sounds like something a business person would do. See my remarks at the end of the section on texting.

Notes

1. You can see much of what I have said on this blog about exposition by reading the posts labeled “exposition” (scroll down to the list of categories in the left column.) See also Varieties of Mathematical Prose by Atish Bagchi and me.

2. Foreign language speakers also write things like “Hi Charles” instead of “Dear Professor Wells” or using no greeting at all (which is probably the best thing to do). Dealing with a foreign language requires familiarity with the local social structure and customs of address, of being aware of levels of the various formal and informal registers, and so on. When we lived in Switzerland, how was I to know that “Ciao” went with “du” and “wiederluege” went with “Sie”? (If I remember correctly. Ye Gods, that was 35 years ago.)

References

1. Thomas’ Calculus, Early Transcendentals, Eleventh Edition, Media Upgrade. Pearson Education, 2008.

Send to Kindle