Examples of Sheaves

Since the posts of sheaves have been more than a bit confusing, I’m going to take
the time to go through a couple of examples of real sheaves that are used in
algebraic topology and related fields. Todays example will be the most canonical one:
a sheaf of continuous functions over a topological space. This can be done for *any* topological space, because a topological space *must* be continuous and gluable with
other topological spaces.

Continue reading

Law vs. Thuggery: The Execution of Saddam

The big news over the last couple of days has been the execution of Saddam Hussein. I
want to put in my own two cents about it. It’s not math, but it does at least involve a bit of logic.
I wish I could remember who first said this, but I really don’t know. But the important thing,
in a moral sense, about the whole mess with Saddam is that he was a thug. A vicious,
bloodthirsty, sadistic, evil thug who believed that *power* justified itself. *He* was the
strongest thug in Iraq; therefore, according to his own worldview, he got to do whatever he
wanted until someone stronger came along. Rape, torture, murder were all perfectly acceptable
to him – he had the power to do it, therefore he was *allowed* to do it.
We, Americans, claim to not believe in that calculus of power. We claim to believe in
the idea of *law*: a set of fundamental rules that transcend the individual humans who are in positions of power, that limit them and their actions. No matter who you are, no matter how strong you are, no matter how many guns or bombs or soldiers you have, there are some things
that you simple *are not* allowed to do.
And that’s where the problem with the execution of Saddam comes in.
Did he get what any objective observer would call a fair trial? No. The justification
we keep hearing is *”we know he was guilty”*. But that’s not the point: if we really believe in the rule of law, then *even if the accused is obviously, undeniably, unquestionably guilty*, we have to give them a full and fair trial, with the right to hear the evidence against them, confront their accusers, and present their own defense. Not because they *deserve* it – but because **we** require it. The laws, the fundamental rules that
make us different from thugs like Saddam, say that we must do it; if we ignore our laws,
even in the case of an outrageously evil person like Saddam, then we *validate* the things he did, the way he acted.
After the trial is over, and a sentence is selected, the way that the sentence is carried
out is also dictated by laws. Even in the case of a death sentence, there are rules that
must be followed about how the condemned criminal is treated, and about how and when his
execution must be performed.
Under pressure from the American government, the Iraqi government executed Saddam *in violation of their laws concerning executions*. In the execution chamber, being led to his death, the guards spit at him and cursed at him. Witnesses were allowed to bring in cellphone video cameras and tape his execution, and take souvenir photos of his dead body. His execution
was illegal under the law of the land, and it was carried out with the same kind of
spectacle as the executions that he commanded when he was in charge.
Saddam himself summed it up well. On the way to his execution, he said “I am a militant and I have no fear for myself. I have spent my life in jihad and fighting aggression. Anyone who takes this route should not be afraid.” He spent his life as a thug ruling because he had the power to do it. Now we came along, and we were stronger than him. So by his own standards, his own rules, he did nothing wrong. He wasn’t being *punished*; he was simply being killed
because his opponents were stronger than he was. He knew it; everyone who sees the
video of reads the news reports about his execution will know it. He was killed by
a mob of thugs.
We *could* have done something different. We could have given him a fair and open trial,
with all of the charges against him clearly set out, enumerated, and presented with evidence. We could have allowed him to try to defend himself and justify his actions. We could have seen a genuine, fair conviction of him on the basis of public, open evidence. If (as one would expect), the fair trial ended with the sentence of death, we could have executed him in accordance with the law, with the dignity that he denied to his victims, but which is *required* by law.
We could have shown that we were different from him. But we didn’t. In the end, we and the Iraqi government we created acted as a gang of thugs. We allowed Saddam Hussein to die secure in the knowledge that his view of power was correct, and that he was justified in doing
all of the evil things that he did in his life. We *betrayed* everything we claim to stand for, everything we claim to believe, and everything we claimed that this war was meant to bring to the people of Iraq.
It’s a crime. Literally.

Balanced Binary Trees in Haskell

unbalanced-trees.jpg

So, we’ve built up some pretty nifty binary trees – we can use the binary tree both as the
basis of an implementation of a set, or as an implementation of a dictionary. But our
implementation has had one major problem: it’s got absolutely no way to maintain balance. What
that means is that depending on the order in which things are inserted to the tree, we might
have excellent performance, or we might be no better than a linear list. For example, look at
these trees. As you can see, a tree with the same values can wind up quite different. In a good insert order, you can wind up with a nicely balanced tree: the minimum distance from root to leaf is 3; the maximum is 4. On the other hand, take the same values, and insert them in a different order and you
get a rotten tree; the minimum distance from root to leaf is 1, and the maximum is 7. So depending on
luck, you can get a tree that gives you good performance, or one that ends up giving you no better than a plain old list.

Today we’re going to look at fixing that problem. That’s really more of a lesson in data
structures than it is in Haskell, but we’ll need to write more complicated and interesting
data structure manipulation code than we have so far, and it’ll be a lollapalooza of pattern
matching. What we’re going to do is turn our implementation into a red-black tree.

Continue reading

A Great Math Site: Understanding the Analemma

By way of the astronomy picture of the day, I encountered a really fantastic site about the analemma.

sky1.v01.small.JPEG

The analemma is the apparent path that the sun takes in the sky during the year. If you record the
precise position of the sun at the same time every day, instead of being in exactly the same place
every day, it will traverse a figure eight, like in this image. This is an effect caused by a combination of the eccentricity of the earth’s orbit, and the tilt of the earth’s axis. It can be a bit hard to visualize just where the figure-eight shape comes from; the analemma site uses a combination of diagrams and animations to make it extremely clear, and works through the entire process of demonstrating where each component of the analemma comes from, and deriving the equations that describe it.

A Second Stab at Sheaves

I’ve mostly been taking it easy this week, since readership is way down during the holidays, and I’m stuck at home with my kids, who don’t generally give me a lot of time for sitting
and reading math books. But I think I’ve finally got time to get back to the stuff
I originally messed up about sheaves.
I’ll start by talking about the intuition behind the idea of sheaves. The basic idea of
a sheave is to provide a way of taking some local property of a topological space, and
demonstrating that it holds everywhere. The classic example of this is manifolds, where the *local* property of being locally almost euclidean around a point is expanded to being almost euclidean around *all* points.

Continue reading

Friday Not-So-Random Five, December 29

Friday Not-So-Random Five
I decided in honor of the new year, I’d do something a bit different this week. Instead of
doing a random shuffle on my IPod, I separated out my favorites of the modern classical pieces that I discovered this year. Some of these are brand new recordings just released this year; others are older recordings that I just happened to discover this year.
1. **Igor Stravinsky, “Suite #1”, from “Shadow Dances” performed by the Orpheus Chamber Orchestra.** Beautiful piece for a small orchestra. Very typically Stravinsky; some strange tonalities, but they’re mostly very subtle. This is modern classical music that even people who don’t generally like modern classical can appreciate.
2. **Tan Dun, “Water Passion after St. Matthew”**. A piece written by the Chinese composer Tan Dun in honor of the 250th anniversary of the death of JS Bach. This is *definitely* not a piece for people who don’t like modern classical music. Mostly atonal, except for a few sections. It’s got some fragments from Bach’s St. Matthew’s Passion, with a very strong influence from Chinese opera. It often sounds oddly Jewish. I haven’t made up my mind about
this yet; it’s going to take a few more listenings before I really get it. At times, I think it’s brilliant, and at times, I think it’s just strange. In any case, it’s worth the
effort of listening to, to hear the voice of a very notable modern composer writing in
an utterly unique style.
3. **Steven Reich and Maya Beiser, “Cello Counterpoint”**. I’ve been a fan of Steven Reich for a long time. He’s a modern composer from the minimalist school, whose music is strongly
influenced by the time he spent studying with African drummers. This piece is just dazzling; it’s all played by Maya Beiser, but she’s recorded 7 different tracks, and plays the 8th live over the mixed recordings. This is an amazing piece of music.
4. **John Corigliano, “Fantasy on a Bach Air”**. A piece by John Corigliano, also in honor of JS Bach, built around a melody from a Bach air. Corigliano is my favorite modern composer; he tends to write a lot of very atonal stuff, but unlike composers like Stockhausen, he manages
to do it in a way that’s pleasant to listen to. He finds different kinds of musical structures for the music, which still appeal to your ear.
5. **Phillip Glass, “Overture from Les Enfants Terrible”**. “Les Enfants Terrible” is one of Phillip Glass’s latest operas. It’s distinctively Glass, but at the same time, it’s very different from much of Glass’s past work. It’s much more willing to be openly dissonant, and
to use larger, longer structures and more complex rhythms than most of Glass’s earlier work.

Doctor Who Chatter

Like my friend and blogfather [Orac][orac], I’m a huge fan of Doctor Who, and I’ve been
greatly enjoying its renewed life in the new series on BBC. In fact, the current Doctor, played by David Tennant, has become my favorite of all of the Doctors – better than the
usual fan favorite of Tom Baker, better than my own former favorite, Jon Pertwee.
The reason why I’m such a fan of Tennant is that his Doctor combines many of the personality
traits of the past Doctors, while giving it his own unique spin. Tennant’s Doctor has the
hands-on activity of Jon Pertwee, the exuberance of Peter Davison, the sense of *history* of
William Hartnell (the very first Dr), and the kind of goofy enthusiasm of Tom Baker.
But he’s more than just a mish-mash of past Doctors – he’s got those traits that connect his
character to his past incarnations, but he’s definitely his own person. His hyperactive
exuberance is quite different from any Doctor we’ve seen before. Now that’s partly just the
style of writing in the new series: the Christopher Eccleston Doctor had a similar
hyperactivity. But Eccleston’s hyperness was much more self-focused: his Doctor was almost as
egocentric as the Colin Baker incarnation. Tennant’s Doctor is just enthusiastic about the
universe, about humanity, about the excitement of living. But that’s also played in conflict
with the other major trait of this Doctor: he’s got a darkness, an edge of bitterness and
alienation just below the surface.
One of my favorite examples of this comes from last season’s episode “School Reunion” which
features the return of Sarah Jane Smith, the old companion of Tom Baker’s Doctor. Overall, Tennant’s Dr. in the episode is the bouncy happy silly doctor – particularly when he finally gets to admit to Sarah Jane that he is the Doctor, and when SJ shows him K9. But there’s
a scene, where he’s alone with the leader of the Krillitane, the villains of the episode. The
Krillitane tries to entice the Doctor to join forces with him, and Tennant sneers and replies
that in his youth he was so very patient, so very merciful, but *not any more*. Now he only
gives one warning, and this is it.
The reason I’m writing all this today is that I just watched a bit-torrented download of this
years special Christmas episode. Overall, it’s a rather goofy (if fun) affair – a rather
over-the-top monster story. But it’s got another really wonderful scene that is so typical of
what I like about this Doctor. He’s coming in to confront the monster, disguised as one of her
robots. After revealing himself, he shuts down the rest of her robots with great humorous
flair using the (extremely large) remote control hidden in his pocket (it’s larger on the
inside!); and he offers the monster one chance to let him move her and her children to some
other planet, where they won’t harm anyone. She refuses, and he replies “then this is *your*
doing”, reveals that he is from Gallifrey, and destroys all of her children. It’s a great
scene, and one that does a remarkable job of demonstrating just *who* this Doctor is.
At the end, the woman who appears to be the new companion doesn’t join the Doctor, but
tells him to find someone. He naturally replies, “I don’t need anyone”. She disagrees,
and tells him that she believes that he sometimes needs someone “to stop him” – and
in one of those perfectly played bits of alienation and loneliness at the heart of this
doctor, he agrees. It’s a subtly played scene, but it’s perfect.
Anyway, overall, this years Christmas special is good, but not great. As I said above,
it’s really a bit over-the-top and goofy. Definitely *not* the best writing of the
new series. But it’s got a few really tremendous scenes, and overall, it leaves me
with confidence that Russell Davies and crew are going to continue to do a great job
of keeping Doctor Who alive and kicking.
[orac]: http://www.scienceblogs.com/insolence

Giving IDists too much credit: the Pandas Thumb and CSI

Being a Nice Jewish BoyTM, Christmas is one of the most boring days of the
entire year. So yesterday, I was sitting with my laptop, looking for something interesting to read. I try to regularly read the [Panda’s Thumb][pt], but sometimes when I don’t have time, I just drop a bookmark in my “to read” folder; so on a boring Christmas afternoon, my PT backlog seemed like exactly what I needed.
[One of the articles in my backlog caught my interest.][pt-sc] (I turned out to be short enough that I should have just read it instead of dropping it into the backlog, but hey, that’s how things go sometimes!) The article was criticizing that genius of intelligent design, Sal Cordova, and [his article about Zebrafish and the genetics of regeneration
in some zebrafish species.][sc] I actually already addressed Sal’s argument [here][bm-sc].
[pt]: http://www.pandasthumb.org
[pt-sc]: http://www.pandasthumb.org/archives/2006/11/when_ignorance.html
[sc]: http://www.uncommondescent.com/archives/1781
[bm-sc]: http://scienceblogs.com/goodmath/2006/11/bad_news_for_uncommon_descent_1.php

Continue reading

Friday Random Ten for Dec 22

1. **Lunasa, “Feabhra”**: My favorite traditional Irish band. These guys are *really* traditional
instrumental Irish – Uillean pipes, flute, guitar, bodhran, and bass. The pipe player is
without doubt one of the best, if not *the* best in the world. I thought that I hated all kinds
of bagpipes until I saw Cillian Vallely performing live (before he joined Lunasa).
2. **Darol Angers Republic of Strings, “Bluebird”**: A track from Darol Angers latest project. Pretty much anything Darol does is gold; this isn’t one of my favorite tracks, because I don’t
like the singer, but it’s got red-hot fiddling holding it all together, which makes up for it.
3. **Tortoise, “Unknown”**: Tortoise is another post-rock ensemble; one of the earliest ones. They’re good, but not great.
4. **Bach, “Mer Sprach: Gehet Hin” from St. Matthews Passion**: Bach is the greatest composer
who ever lived; and I think that St. Matthews Passion is his finest work. A little slice
of perfection.
5. **Harry Bradley, “Dave Maguires/Gary Hastings Reels”**: very minimal traditional Irish fluting by a master. Harry is a brilliant flautist – he knows how to play with *enough* ornamentation to really punch the rhythm, but he never plays a single note more than he needs to. These reels feature him playing with nothing but a bouzouki and a trace of bohdran backing him. And it doesn’t need any more. It’s got amazing bounce and spirit to it, played by Harry at his reedy-sounding best.
6. **Rachel’s, “4 or 5 Trees”**. One of my favorite post-rock ensembles. Rachel’s is a very
classical-leaning PRE, and everything they do is brilliant.
7. **ProjeKct Two, “Escape from Sagittarius A”**: free improv by one of the trios that made up the last incarnation of King Crimson: Trey Gunn on bass/stick, Fripp on Guitar, and Adrian Belew playing a drum synth. Wierd, but good. It’s great to hear Fripp when he’s getting way
out there; he’s often so disciplined that he holds back, so it’s amazing to hear him really
kick loose. Sure, some of it isn’t great – but some of it has a brilliance that can only come
from spontanaeity.
8. **Mogwai, “I Chose Horses”**: yet another post-rock ensemble, this one from the more rock-oriented end of the genre. This is a mellowish track from them, with a very distinctively Mogwai sound to it.
9. **Miles Davis, “How Deep is the Ocean”**. Miles Davis. What more need be said?
10. **Godspeed You! Black Emperor, “Sleep: They Don’t Sleep Anymore On The Beach/Monheim/Broken Windows, Locks Of Love Part III”**. Godspeed is the absolute unquestionably greatest of the rock-leaning post-rock ensembles. This track is very typical.

Pathological Programming in a Circular Queue

Today, I’m going to show you a very simple, very goofy little language called “SCEQL”, which standards for “slow and clean esoteric queue language”. It’s based on nothing but a circular queue
of numbers with nothing but 8 commands. It’s not one of the more exciting languages, but it can
be a lot of fun to figure out how to make the circular queue do what you want it to.

Continue reading