The last post in the music category dates from almost 3 years ago. And even longer ago I started a not so long-lived series on computational composition using Strasheela. Time to change this situation.

Last week as a programming finger exercise I decided to implement a brute-force first species counterpoint solver in Python, enumerating *all* legal solutions and then *scoring* them. The first part is finished now, and can be seen at GitHub.

There are several directions in which I would like to take this little project. First of all it needs to be faster, which might be feasible by multi-threading (something I’d like to try just for getting some experience with multi-threading in Python). Observe that the code certainly hasn’t been written with speed in mind, I went for conceptually clear code not some super-fast C-type implementation. Then of course, I want to implement the scoring system. But before that, there are some rules that aren’t implemented yet (e.g. hidden fifths and octaves come to mind) and some of the rules have an ugly implementation.

Going to second species will be a significantly harder task: one has to interpret the function of a note correctly.

Feel free to chime in with suggestions! I have discovered a similar project and I should definitely try to implement something like melodypy.com but for now you’ll have to look at plaintext and hear the notes in your head.

I just gave a lecture on examples of spectral sequences in algebra and algebraic geometry for the ANAGRAMS seminar and without further ado, here are the notes. Nothing new or insightful in there, just some facts and examples taken together to help me during the lecture.

A long time ago I wrote about how to produce Čech cohomology groups in LaTeX, while in the previous post there is the Čech-to-derived spectral sequence making an appearance, and when I took the first screenshot in that blogpost I realised there was something wrong with the positioning of the exponent. Compare:

to

The first one is the naive approach, obtained by using

```
\DeclareMathOperator\cHH{\check{\HH}}
\DeclareMathOperator\HH{H}
```

The problem with it is that the accent raises the height of the box, thereby raising the exponent too. But visually speaking the and should be on the same height. This is done by using the `\smash`

macro (which already exists in Plain TeX, and is not part of `mathtools`

which I mistakingly thought up to today) which basically annihilates the height from its argument in all layout computations. It can create a horrendous mess, but here it is the solution.

To make sure that our macro is as generally applicable as possible we do insert the height of the argument which will then act as the total height of the result using the `\vphantom`

macro:

```
\newcommand\cechit[1]{\smash{\check{#1}}\vphantom{#1}}
\DeclareMathOperator\cHH{\cechit{\HH}}
\DeclareMathOperator\HH{H}
```

which results in the second screenshot.

The irony is that if I wouldn’t be using macros, there wouldn’t be a problem, as TeX will not treat it as one high box if you hardcode everything. Oh well…

Next week I’ll be giving a lecture on spectral sequences in algebraic geometry, and in the notes I’m preparing I wanted to put the spectral sequence below the title of the corresponding section in the table of contents. The `\addcontentsline`

command was known to me, but `\addtocontents`

wasn’t, and there is one caveat in using it: you need to make sure you put `\par`

at the end of the what you are adding (if it is actual text), forcing the next item to get its own paragraph.

So the macro

`\newcommand\tocequation[1]{\addtocontents{toc}{\vspace{.7em}#1\par}}`

does the trick (change the vertical spacing to your liking), and using it just requires to say `\tocequation{$a^2+b^2=c^2$}`

after the corresponding `\section`

. A small excerpt of the result is

The final results will be posted somewhere next week. I’ll be posting a follow-up blogpost on some nitpickery regarding the notation for Čech cohomology later.

Robert Thomason suggests the following in his article The classification of triangulated subcategories:

The reader may find the indirectness of the proof of this useful corollary psychologically uncomfortable. If so, rather than dosing himself with a benzodiazepine, he may find relief in deducing Corollary 2.3 from the following criterion for equality of two classes in , whose proof is very similar to that of Lemma 2.2. […]

I never checked whether we have diazepines next to the pens in the office supplies closet in the department.

Last week at the Maurice Auslander Memorial Workshop^{*} I was talking to Claire Amiot and she told me nice news about Bernhard Keller (who was her PhD advisor, and my MSc advisor). Last month he won the Prix Sophie Germain. This news about Bernhard might not have been picked up sufficiently by the non-French speaking part of the math community (or maybe I’m just slow on picking up on these things).

Congratulations Bernhard!

^{*} I was considering a blogpost about the event, but as I had no internet connection at the place I was staying at that plan was doomed from the start. The talks were all really nice, and the notes made by a team of German PhD students will come online soon I have been told. If you like algebraic geometry I especially suggest looking at the notes of the talks by Becker, Buchweitz and Wemyss.