# Category: games

On the island of two truths, statements are either false (truth-value $0$), Q-true (value $Q$) or K-true (value $K$).

The King and Queen of the island have an opinion on all statements which may differ from their actual truth-value. We say that the Queen believes a statement $p$ is she assigns value $Q$ to it, and that she knows $p$ is she believes $p$ and the actual truth-value of $p$ is indeed $Q$. Similarly for the King, replacing $Q$’s by $K$’s.

All other inhabitants of the island are loyal to the Queen, or to the King, or to both. This means that they agree with the Queen (or King, or both) on all statements they have an opinion on. Two inhabitants are said to be loyal to each other if they agree on all statements they both have an opinion of.

Last time we saw that Queen and King agree on all statements one of them believes to be false, as well as the negation of such statements. This raised the question:

Are the King and Queen loyal to each other? That is, do Queen and King agree on all statements?

We cannot resolve this issue without the information Oscar was able to extract from Pointex in Karin Cvetko-Vah‘s post Pointex:

“Oscar was determined to get some more information. “Could you at least tell me whether the queen and the king know that they’re loyal to themselves?” he asked.
“Well, of course they know that!” replied Pointex.
“You said that a proposition can be Q-TRUE, K-TRUE or FALSE,” Oscar said.
“Yes, of course. What else!” replied Pointex as he threw the cap high up.
“Well, you also said that each native was loyal either to the queen or to the king. I was just wondering … Assume that A is loyal to the queen. Then what is the truth value of the statement: A is loyal to the queen?”
“Q, of course,” answered Pointex as he threw the cap up again.
“And what if A is not loyal to the queen? What is then the truth value of the statement: A is loyal to the queen?”
He barely finished his question as something fell over his face and covered his eyes. It was the funny cap.
“Thanx,” said Pointex as Oscar handed him the cap. “The value is 0, of course.”
“Can the truth value of the statement: ‘A is loyal to the queen’ be K in any case?”
“Well, what do you think? Of course not! What a ridiculous thing to ask!” replied Pointex.”

Puzzle : Show that Queen and King are not loyal to each other, that is, there are statements on which they do not agree.

Solution : ‘The King is loyal to the Queen’ must have actual truth-value $0$ or $Q$, and the sentence ‘The Queen is loyal to the King’ must have actual truth-value $0$ or $K$. But both these sentences are the same as the sentence ‘The Queen and King are loyal to each other’ and as this sentence can have only one truth-value, it must have value $0$ so the statement is false.

Note that we didn’t produce a specific statement on which the Queen and King disagree. Can you find one?

Last time we had a brief encounter with the island of two truths, invented by Karin Cvetko-Vah. See her posts:

On this island, false statements have truth-value $0$ (as usual), but non-false statements are not necessarily true, but can be given either truth-value $Q$ (statements which the Queen on the island prefers) or $K$ (preferred by the King).

Think of the island as Trump’s paradise where nobody is ever able to say: “Look, alternative truths are not truths. They’re falsehoods.”

Even the presence of just one ‘alternative truth’ has dramatic consequences on the rationality of your reasoning. If we know the truth-values of specific sentences, we can determine the truth-value of more complex sentences in which we use logical connectives such as $\vee$ (or), $\wedge$ (and), $\neg$ (not), and $\implies$ (then) via these truth tables:

$\begin{array}{c|ccc} \downarrow~\bf{\wedge}~\rightarrow & 0 & Q & K \\ \hline 0 & 0 & 0 & 0 \\ Q & 0 & Q & Q \\ K & 0 & K & K \end{array} \quad \begin{array}{c|ccc} \downarrow~\vee~\rightarrow & 0 & Q & K \\ \hline 0 & 0 & Q & K \\ Q & Q & Q & K \\ K & K & Q & K \end{array}$
$\begin{array}{c|ccc} \downarrow~\implies~\rightarrow & 0 & Q & K \\ \hline 0 & Q & Q & K \\ Q & 0 & Q & K \\ K & 0 & Q & K \end{array} \quad \begin{array}{c|c} \downarrow & \neg~\downarrow \\ \hline 0 & Q \\ Q & 0 \\ K & 0 \end{array}$

Note that the truth-values $Q$ and $K$ are not completely on equal footing as we have to make a choice which one of them will stand for $\neg 0$.

Common tautologies are no longer valid on this island. The best we can have are $Q$-tautologies (giving value $Q$ whatever the values of the components) or $K$-tautologies.

Here’s one $Q$-tautology (check!) : $(\neg p) \vee (\neg \neg p)$. Verify that $p \vee (\neg p)$ is neither a $Q$- nor a $K$-tautology.

Can you find any $K$-tautology at all?

Already this makes it incredibly difficult to adapt Smullyan-like Knights and Knaves puzzles to this skewed island. Last time I gave one easy example.

Puzzle : On an island of two truths all inhabitants are either Knaves (saying only false statements), Q-Knights (saying only $Q$-valued statements) or K-Knights (who only say $K$-valued statements).

The King came across three inhabitants, whom we will call $A$, $B$ and $C$. He asked $A$: “Are you one of my Knights?” $A$ answered, but so indistinctly that the King could not understand what he said.

He then asked $B$: “What did he say?” $B$ replies: “He said that he is a Knave.” At this point, $C$ piped up and said: “That’s not true!”

Was $C$ a Knave, a Q-Knight or a K-Knight?

Solution : Q- and K-Knights can never claim to be a Knave. Neither can Knaves because they can only say false statements. So, no inhabitant on the island can ever claim to be a Knave. So, $B$ lies and is a Knave, so his stament has truth-value $0$. $C$ claims the negation of what $B$ says so the truth-value of his statement is $\neg 0 = Q$. $C$ must be a Q-Knight.

As if this were not difficult enough, Karin likes to complicate things by letting the Queen and King assign their own truth-values to all sentences, which may coincide with their actual truth-value or not.

Clearly, these two truth-assignments follow the logic of the island of two truths for composed sentences, and we impose one additional rule: if the Queen assigns value $0$ to a statement, then so does the King, and vice versa.

I guess she wanted to set the stage for variations to the island of two truths of epistemic modal logical puzzles as in Smullyan’s book Forever Undecided (for a quick summary, have a look at Smullyan’s paper Logicians who reason about themselves).

A possible interpretation of the Queen’s truth-assignment is that she assigns value $Q$ to all statements she believes to be true, value $0$ to all statements she believes to be false, and value $K$ to all statements she has no fixed opinion on (she neither believes them to be true nor false). The King assigns value $K$ to all statements he believes to be true, $0$ to those he believes to be false, and $Q$ to those he has no fixed opinion on.

For example, if the Queen has no fixed opinion on $p$ (so she assigns value $K$ to it), then the King can either believe $p$ (if he also assigns value $K$ to it) or can have no fixed opinion on $p$ (if he assigns value $Q$ to it), but he can never believe $p$ to be false.

Puzzle : We say that Queen and King ‘agree’ on a statement $p$ if they both assign the same value to it. So, they agree on all statements one of them (and hence both) believe to be false. But there’s more:

• Show that Queen and King agree on the negation of all statements one of them believes to be false.
• Show that the King never believes the negation of whatever statement.
• Show that the Queen believes all negations of statements the King believes to be false.

Solution : If one of them believes $p$ to be false (s)he will assign value $0$ to $p$ (and so does the other), but then they both have to assign value $Q$ to $\neg p$, so they agree on this.

The value of $\neg p$ can never be $K$, so the King does not believe $\neg p$.

If the King believes $p$ to be false he assigns value $0$ to it, and so does the Queen, but then the value of $\neg p$ is $Q$ and so the Queen believes $\neg p$.

We see that the Queen and King agree on a lot of statements, they agree on all statements one of them believes to be false, and they agree on the negation of such statements!

Can you find any statement at all on which they do not agree?

Well, that may be a little bit premature. We didn’t say which sentences about the island are allowed, and what the connection (if any) is between the Queen and King’s value-assignments and the actual truth values.

For example, the Queen and King may agree on a classical ($0$ or $1$) truth-assignments to the atomic sentences for the island, and replace all $1$’s with $Q$. This will give a consistent assignment of truth-values, compatible with the island’s strange logic. (We cannot do the same trick replacing $1$’s by $K$ because $\neg 0 = Q$).

Clearly, such a system may have no relation at all with the intended meaning of these sentences on the island (the actual truth-values).

That’s why Karin Cvetko-Vah introduced the notions of ‘loyalty’ and ‘sanity’ for inhabitants of the island. That’s for next time, and perhaps then you’ll be able to answer the question whether Queen and King agree on all statements.

(all images in this post are from Smullyan’s book Alice in Puzzle-Land)

Raymond Smullyan‘s logic puzzles are legendary. Among his best known are his Knights (who always tell the truth) and Knaves (who always lie) puzzles. Here’s a classic example.

“On the day of his arrival, the anthropologist Edgar Abercrombie came across three inhabitants, whom we will call $A$, $B$ and $C$. He asked $A$: “Are you a Knight or a Knave?” $A$ answered, but so indistinctly that Abercrombie could not understand what he said.

He then asked $B$: “What did he say?” $B$ replies: “He said that he is a knave.” At this point, $C$ piped up and said: “Don’t believe that; it’s a lie!”

Was $C$ a Knight or a Knave?”

If you are stumped by this, try to figure out what kind of inhabitant can say “I am a Knave”.

Some years ago, my friend and co-author Karin Cvetko-Vah wrote about a much stranger island, the island of two truths.

“The island was ruled by a queen and a king. It is important to stress that the queen was neither inferior nor superior to the king. Rather than as a married couple one should think of the queen and the king as two parallel powers, somewhat like the Queen of the Night and the King Sarastro in Mozart’s famous opera The Magic Flute. The queen and the king had their own castle each, each of them had their own court, their own advisers and servants, and most importantly each of them even had their own truth value.

On the island, a proposition p is either FALSE, Q-TRUE or K-TRUE; in each of the cases we say that p has value 0, Q or K, respectively. The queen finds the truth value Q to be superior, while the king values the most the value K. The queen and the king have their opinions on all issues, while other residents typically have their opinions on some issues but not all.”

The logic of the island of two truths is the easiest example of what Karin and I called a non-commutative frame or skew Heyting algebra (see here), a notion we then used, jointly with Jens Hemelaer, to define the notion of a non-commutative topos.

If you take our general definitions, and take Q as the distinguished top-element, then the truth tables for the island of two truths are these ones (value of first term on the left, that of the second on top):

$\begin{array}{c|ccc} \wedge & 0 & Q & K \\ \hline 0 & 0 & 0 & 0 \\ Q & 0 & Q & Q \\ K & 0 & K & K \end{array} \quad \begin{array}{c|ccc} \vee & 0 & Q & K \\ \hline 0 & 0 & Q & K \\ Q & Q & Q & K \\ K & K & Q & K \end{array} \quad \begin{array}{c|ccc} \rightarrow & 0 & Q & K \\ \hline 0 & Q & Q & K \\ Q & 0 & Q & K \\ K & 0 & Q & K \end{array} \quad \begin{array}{c|c} & \neg \\ \hline 0 & Q \\ Q & 0 \\ K & 0 \end{array}$

Note that on this island the order of statements is important! That is, the truth value of $p \wedge q$ may differ from that of $q \wedge p$ (and similarly for $\vee$).

Let’s reconsider Smullyan’s puzzle at the beginning of this post, but now on an island of two truths, where every inhabitant is either of Knave, or a Q-Knight (uttering only Q-valued statements), or a K-Knight (saying only K-valued statements).

Again, can you determine what type $C$ is?

Well, if you forget about the distinction between Q- and K-valued sentences, then we’re back to classical logic (or more generally, if you divide out Green’s equivalence relation from any skew Heyting algebra you obtain an ordinary Heyting algebra), and we have seen that then $B$ must be a Knave and $C$ a Knight, so in our new setting we know that $C$ is either a Q-Knight or a K-Knight, but which of the two?

Now, $C$ claims the negation of what $B$ said, so the truth value is $\neg 0 = Q$, and therefore $C$ must be a Q-Knight.

Recall that in Karin Cvetko-Vah‘s island of two truths all sentences have a unique value which can be either $0$ (false) or one of the non-false values Q or K, and the value of combined statements is given by the truth tables above. The Queen and King both have an opinion on all statements, which may or may not coincide with the actual value of that statement. However, if the Queen assigns value $0$ to a statement, then so does the King, and conversely.

Other inhabitants of the island have only their opinion about a subset of all statements (which may be empty). Two inhabitants agree on a statement if they both have an opinion on it and assign the same value to it.

Now, each inhabitant is either loyal to the Queen or to the King (or both), meaning that they agree with the Queen (resp. King) on all statements they have an opinion of. An inhabitant loyal to the Queen is said to believe a sentence when she assigns value $Q$ to it (and symmetric for those loyal to the King), and knows the statement if she believes it and that value coincides with the actual value of that statement.

Further, if A is loyal to the Queen, then the value of the statement ‘A is loyal to the Queen’ is Q, and if A is not loyal to the Queen, then the value of the sentence ‘A is loyal to the Queen’ is $0$ (and similarly for statements about loyalty to the King).

These notions are enough for the first batch of ten puzzles in Karin’s posts

Just one example:

Show that if anybody on the island knows that A is not loyal to the Queen, then everybody that has an opinion about the sentence ‘A is loyal to the Queen’ knows that.

After these two posts, Karin decided that it was more fun to blog about the use of non-commutative frames in data analysis.

But, she once gave me a text containing many more puzzles (as well as all the answers), so perhaps I’ll share these in a follow-up post.

I’m retiring in two weeks so I’m cleaning out my office.

So far, I got rid of almost all paper-work and have split my book-collection in two: the books I want to take with me, and those anyone can grab away.

Here’s the second batch (math/computer books in the middle, popular science to the right, thrillers to the left).

If you’re interested in some of these books (click for a larger image, if you want to zoom in) and are willing to pay the postage, leave a comment and I’ll try to send them if they survive the current ‘take-away’ phase.

Here are two books I definitely want to keep. On the left, an original mimeographed version of Mumford’s ‘Red Book’.

On the right, ‘Een pak met een korte broek’ (‘A suit with shorts’), a collection of papers by family and friends, presented to Hendrik Lenstra on the occasion of the defence of his Ph.D. thesis on Euclidean number-fields, May 18th 1977.

If the title intrigues you, a photo of young Hendrik in suit and shorts is included.

This collection includes hilarious ‘papers’ by famous people including

• ‘A headache-causing problem’ by Conway (J.H.), Paterson (M.S.), and Moscow (U.S.S.R.)
• ‘A projective plain of order ten’ by A.M. Odlyzko and N.J.A. Sloane
• ‘La chasse aux anneaux principaux non-Euclidiens dans l’enseignement’ by Pierre Samuel
• ‘On time-like theorems’ by Michiel Hazewinkel
• ‘She loves me, she loves me not’ by Richard K. Guy
• ‘Theta invariants for affine root systems’ by E.J.N. Looijenga
• ‘The prime of primes’ by F. Lenstra and A.J. Oort
• (and many more, most of them in Dutch)

Perhaps I can do a couple of posts on some of these papers. It might break this clean-up routine.

In 1982, the BBC ran a series of 10 weekly programmes entitled de Bono’s Thinking Course. In the book accompanying the series Edward de Bono recalls the origin of his ‘L-Game’:

Many years ago I was sitting next to the famous mathematician, Professor Littlewood, at dinner in Trinity College. We were talking about getting computers to play chess. We agreed that chess was difficult because of the large number of pieces and different moves. It seemed an interesting challenge to design a game that was as simple as possible and yet could be played with a degree of skill.

As a result of that challenge I designed the ‘L-Game’, in which each player has only one piece (the L-shape piece). In turn he moves this to any new vacant position (lifting up, turning over, moving across the board to a vacant position, etc.). After moving his L-piece he can – if he wishes – move either one of the small neutral pieces to any new position. The object of the game is to block your opponent’s L-shape so that no move is open to it.

It is a pleasant exercise in symmetry to calculate the number of possible L-game positions.

The $4 \times 4$ grid has $8$ symmetries, making up the dihedral group $D_8$: $4$ rotations and $4$ reflections.

An L-piece breaks all these symmetries, that is, it changes in form under each of these eight operations. That is, using the symmetries of the $4 \times 4$-grid we can put one of the L-pieces (say the Red one) on the grid as a genuine L, and there are exactly 6 possibilities to do so.

For each of these six positions one can then determine the number of possible placings of the Blue L-piece. This is best done separately for each of the 8 different shapes of that L-piece.

Here are the numbers when the red L is placed in the left bottom corner:

In total there are thus 24 possibilities to place the Blue L-piece in that case. We can repeat the same procedure for the remaining Red L-positions. Here are the number of possibilities for Blue in each case:

That is, there are 82 possibilities to place the two L-pieces if the Red one stands as a genuine L on the board.

But then, the L-game has exactly $18368 = 8 \times 82 \times 28$ different positions, where the factor

• $8$ gives the number of symmetries of the square $4 \times 4$ grid.
• Using these symmetries we can put the Red L-piece on the grid as a genuine $L$ and we just saw that this leaves $82$ possibilities for the Blue L-piece.
• This leaves $8$ empty squares and so $28 = \binom{8}{2}$ different choices to place the remaining two neutral pieces.

The $2296 = 82 \times 28$ positions in which the red L-piece is placed as a genuine L can then be analysed by computer and the outcome is summarised in Winning Ways 2 pages 384-386 (with extras on pages 408-409).

Of the $2296$ positions only $29$ are $\mathcal{P}$-positions, meaning that the next player (Red) will loose. Here are these winning positions for Blue

Here, neutral piece(s) should be put on the yellow square(s). A (potential) remaining neutral piece should be placed on one of the coloured squares. The different colours indicate the remoteness of the $\mathcal{P}$-position:

• Pink means remoteness $0$, that is, Red has no move whatsoever, so mate in $0$.
• Orange means remoteness $2$: Red still has a move, but will be mated after Blue’s next move.
• Purple stands for remoteness $4$, that is, Blue mates Red in $4$ moves, Red starting.
• Violet means remoteness $6$, so Blue has a mate in $6$ with Red starting
• Olive stands for remoteness $8$: Blue mates within eight moves.

Memorising these gives you a method to spot winning opportunities. After Red’s move image a board symmetry such that Red’s piece is a genuine L, check whether you can place your Blue piece and one of the yellow pieces to obtain one of the 29 $\mathcal{P}$-positions, and apply the reverse symmetry to place your piece.

If you don’t know this, you can run into trouble very quickly. From the starting position, Red has five options to place his L-piece before moving one of the two yellow counters.

All possible positions of the first option loose immediately.

For example in positions $a,b,c,d,f$ and $l$, Blue wins by playing

Here’s my first attempt at an opening repertoire for the L-game. Question mark means immediate loss, question mark with a number means mate after that number of moves, x means your opponent plays a sensible strategy.

Surely I missed cases, and made errors in others. Please leave corrections in the comments and I’ll try to update the positions.

Last time, we’ve viewed major and minor triads (chords) as inscribed triangles in a regular $12$-gon.

If we move clockwise along the $12$-gon, starting from the endpoint of the longest edge (the root of the chord, here the $0$-vertex) the edges skip $3,2$ and $4$ vertices (for a major chord, here on the left the major $0$-chord) or $2,3$ and $4$ vertices (for a minor chord, here on the right the minor $0$-chord).

The symmetries of the $12$-gon, the dihedral group $D_{12}$, act on the $24$ major- and minor-chords transitively, preserving the type for rotations, and interchanging majors with minors for reflections.

Mathematical Music Theoreticians (MaMuTh-ers for short) call this the $T/I$-group, and view the rotations of the $12$-gon as transpositions $T_k : x \mapsto x+k~\text{mod}~12$, and the reflections as involutions $I_k : x \mapsto -x+k~\text{mod}~12$.

Note that the elements of the $T/I$-group act on the vertices of the $12$-gon, from which the action on the chord-triangles follows.

There is another action on the $24$ major and minor chords, mapping a chord-triangle to its image under a reflection in one of its three sides.

Note that in this case the reflection $I_k$ used will depend on the root of the chord, so this action on the chords does not come from an action on the vertices of the $12$-gon.

There are three such operations: (pictures are taken from Alexandre Popoff’s blog, with the ‘funny names’ removed)

The $P$-operation is reflection in the longest side of the chord-triangle. As the longest side is preserved, $P$ interchanges the major and minor chord with the same root.

The $L$-operation is refection in the shortest side. This operation interchanges a major $k$-chord with a minor $k+4~\text{mod}~12$-chord.

Finally, the $R$-operation is reflection in the middle side. This operation interchanges a major $k$-chord with a minor $k+9~\text{mod}~12$-chord.

From this it is already clear that the group generated by $P$, $L$ and $R$ acts transitively on the $24$ major and minor chords, but what is this $PLR$-group?

If we label the major chords by their root-vertex $1,2,\dots,12$ (GAP doesn’t like zeroes), and the corresponding minor chords $13,14,\dots,24$, then these operations give these permutations on the $24$ chords:

 P:=(1,13)(2,14)(3,15)(4,16)(5,17)(6,18)(7,19)(8,20)(9,21)(10,22)(11,23)(12,24) L:=(1,17)(2,18)(3,19)(4,20)(5,21)(6,22)(7,23)(8,24)(9,13)(10,14)(11,15)(12,16) R:=(1,22)(2,23)(3,24)(4,13)(5,14)(6,15)(7,16)(8,17)(9,18)(10,19)(11,20)(12,21) 

Then GAP gives us that the $PLR$-group is again isomorphic to $D_{12}$:

 gap> G:=Group(P,L,R);; gap> Size(G); 24 gap> IsDihedralGroup(G); true 

In fact, if we view both the $T/I$-group and the $PLR$-group as subgroups of the symmetric group $Sym(24)$ via their actions on the $24$ major and minor chords, these groups are each other centralizers! That is, the $T/I$-group and $PLR$-group are dual to each other.

For more on this, there’s a beautiful paper by Alissa Crans, Thomas Fiore and Ramon Satyendra: Musical Actions of Dihedral Groups.

What does this new MaMuTh info learns us more about our Elephant, the Topos of Triads, studied by Thomas Noll?

Last time we’ve seen the eight element triadic monoid $T$ of all affine maps preserving the three tones $\{ 0,4,7 \}$ of the major $0$-chord, computed the subobject classified $\Omega$ of the corresponding topos of presheaves, and determined all its six Grothendieck topologies, among which were these three:

Why did we label these Grothendieck topologies (and corresponding elements of $\Omega$) by $P$, $L$ and $R$?

We’ve seen that the sheafification of the presheaf $\{ 0,4,7 \}$ in the triadic topos under the Grothendieck topology $j_P$ gave us the sheaf $\{ 0,3,4,7 \}$, and these are the tones of the major $0$-chord together with those of the minor $0$-chord, that is the two chords in the $\langle P \rangle$-orbit of the major $0$-chord. The group $\langle P \rangle$ is the cyclic group $C_2$.

For the sheafication with respect to $j_L$ we found the $T$-set $\{ 0,3,4,7,8,11 \}$ which are the tones of the major and minor $0$-,$4$-, and $8$-chords. Again, these are exactly the six chords in the $\langle P,L \rangle$-orbit of the major $0$-chord. The group $\langle P,L \rangle$ is isomorphic to $Sym(3)$.

The $j_R$-topology gave us the $T$-set $\{ 0,1,3,4,6,7,9,10 \}$ which are the tones of the major and minor $0$-,$3$-, $6$-, and $9$-chords, and lo and behold, these are the eight chords in the $\langle P,R \rangle$-orbit of the major $0$-chord. The group $\langle P,R \rangle$ is the dihedral group $D_4$.

More on this can be found in the paper Commuting Groups and the Topos of Triads by Thomas Fiore and Thomas Noll.

The operations $P$, $L$ and $R$ on major and minor chords are reflexions in one side of the chord-triangle, so they preserve two of the three tones. There’s a distinction between the $P$ and $L$ operations and $R$ when it comes to how the third tone changes.

Under $P$ and $L$ the third tone changes by one halftone (because the corresponding sides skip an even number of vertices), whereas under $R$ the third tone changes by two halftones (a full tone), see the pictures above.

The $\langle P,L \rangle = Sym(3)$ subgroup divides the $24$ chords in four orbits of six chords each, three major chords and their corresponding minor chords. These orbits consist of the

• $0$-, $4$-, and $8$-chords (see before)
• $1$-, $5$-, and $9$-chords
• $2$-, $6$-, and $10$-chords
• $3$-, $7$-, and $11$-chords

and we can view each of these orbits as a cycle tracing six of the eight vertices of a cube with one pair of antipodal points removed.

These four ‘almost’ cubes are the NE-, SE-, SW-, and NW-regions of the Cube Dance Graph, from the paper Parsimonious Graphs by Jack Douthett and Peter Steinbach.

To translate the funny names to our numbers, use this dictionary (major chords are given by a capital letter):

The four extra chords (at the N, E, S, and P places) are augmented triads. They correspond to the triads $(0,4,8),~(1,5,9),~(2,6,10)$ and $(3,7,11)$.

That is, two triads are connected by an edge in the Cube Dance graph if they share two tones and differ by an halftone in the third tone.

This graph screams for a group or monoid acting on it. Some of the edges we’ve already identified as the action of $P$ and $L$ on the $24$ major and minor triads. Because the triangle of an augmented triad is equilateral, we see that they are preserved under $P$ and $L$.

But what about the edges connecting the regular triads to the augmented ones? If we view each edge as two directed arrows assigned to the same operation, we cannot do this with a transformation because the operation sends each augmented triad to six regular triads.

Alexandre Popoff, Moreno Andreatta and Andree Ehresmann suggest in their paper Relational poly-Klumpenhouwer networks for transformational and voice-leading analysis that one might use a monoid generated by relations, and they show that there is such a monoid with $40$ elements acting on the Cube Dance graph.

Popoff claims that usual presheaf toposes, that is contravariant functors to $\mathbf{Sets}$ are not enough to study transformational music theory. He suggest to use instead functors to $\mathbf{Rel}$, that is Sets with as the morphisms binary relations, and their compositions.

Another Elephant enters the room…

(to be continued)

Here, MaMuTh stands for Mathematical Music Theory which analyses the pitch, timing, and structure of works of music.

The Elephant is the nickname for the ‘bible’ of topos theory, Sketches of an Elephant: A Topos Theory Compendium, a two (three?) volume book, written by Peter Johnstone.

How can we get as quickly as possible from the MaMuth to the Elephant, musical illiterates such as myself?

What Mamuth-ers call a pitch class (sounds that are a whole number of octaves apart), is for us a residue modulo $12$, as an octave is usually divided into twelve (half)tones.

We’ll just denote them by numbers from $0$ to $11$, or view them as the vertices of a regular $12$-gon, and forget the funny names given to them, as there are several such encodings, and we don’t know a $G$ from a $D\#$.

Our regular $12$-gon has exactly $24$ symmetries. Twelve rotations, which they call transpositions, given by the affine transformations
$T_k~:~x \mapsto x+k~\text{mod}~12$
and twelve reflexions, which they call involutions, given by
$I_k~:~x \mapsto -x+k~\text{mod}~12$
What for us is the dihedral group $D_{12}$ (all symmetries of the $12$-gon), is for them the $T/I$-group (for transpositions/involutions).

Let’s move from individual notes (or pitch classes) to chords (or triads), that is, three notes played together.

Not all triples of notes sound nice when played together, that’s why the most commonly played chords are among the major and minor triads.

A major triad is an ordered triple of elements from $\mathbb{Z}_{12}$ of the form
$(n,n+4~\text{mod}~12,n+7~\text{mod}~12)$
and a minor triad is an ordered triple of the form
$(n,n+3~\text{mod}~12,n+7~\text{mod}~12)$
where the first entry $n$ is called the root of the triad (or chord) and its funny name is then also the name of that chord.

For us, it is best to view a triad as an inscribed triangle in our regular $12$-gon. The triangles of major and minor triads have edges of different lengths, a small one, a middle, and a large one.

Starting from the root, and moving clockwise, we encounter in a major chord-triangle first the middle edge, then the small edge, and finally the large edge. For a minor chord-triangle, we have first the small edge, then the middle one, and finally the large edge.

On the left, two major triads, one with root $0$, the other with root $6$. On the right, two minor triads, also with roots $0$ and $6$.

(Btw. if you are interested in the full musical story, I strongly recommend the alpof blog by Alexandre Popoff, from which the above picture is taken.)

Clearly, there are $12$ major triads (one for each root), and $12$ minor triads.

From the shape of the triad-triangles it is also clear that rotations (transpositions) send major triads to major triads (and minors to minors), and that reflexions (involutions) interchange major with minor triads.

That is, the dihedral group $D_{12}$ (or if you prefer the $T/I$-group) acts on the set of $24$ major and minor triads, and this action is transitive (an element stabilising a triad-triangle must preserve its type (so is a rotation) and its root (so must be the identity)).

Can we hear the action of the very special group element $T_6$ (the unique non-trivial central element of $D_{12}$) on the chords?

This action is not only the transposition by three full tones, but also a point-reflexion with respect to the center of the $12$-gon (see two examples in the picture above). This point reflexion can be compositionally meaningful to refer to two very different upside-down worlds.

In It’s $T_6$-day, Alexandre Popoff gives several examples. Here’s one of them, the Ark theme in Indiana Jones – Raiders of the Lost Ark.

“The $T_6$ transformation is heard throughout the map room scene (in particular at 2:47 in the video): that the ark is a dreadful object from a very different world is well rendered by the $T_6$ transposition, with its inherent tritone and point reflection.”

Let’s move on in the direction of the Elephant.

We saw that the only affine map of the form $x \mapsto \pm x + k$ fixing say the major $0$-triad $(0,4,7)$ is the identity map.

But, we can ask for the collection of all affine maps $x \mapsto a x + b$ fixing this major $0$-triad set-wise, that is, such that
$\{ b, 4a+b~\text{mod}~12, 7a+b~\text{mod}~2 \} \subseteq \{ 0,4,7 \}$

A quick case-by-case analysis shows that there are just eight such maps: the identity and the constant maps
$x \mapsto x,~x \mapsto 0,~x \mapsto 4, ~x \mapsto 7$
and the four maps
$\underbrace{x \mapsto 3x+7}_a,~\underbrace{x \mapsto 8x+4}_b,~x \mapsto 9x+4,~x \mapsto 4x$

Compositions of such maps again preserve the set $\{ 0,4,7 \}$ so they form a monoid, and a quick inspection with GAP learns that $a$ and $b$ generate this monoid.

 gap> a:=Transformation([10,1,4,7,10,1,4,7,10,1,4,7]);; gap> b:=Transformation([12,8,4,12,8,4,12,8,4,12,8,4]);; gap> gens:=[a,b];; gap> T:=Monoid(gens); gap> Size(T); 8 

The monoid $T$ is the triadic monoid of Thomas Noll’s paper The topos of triads.

The monoid $T$ can be seen as a one-object category (with endomorphisms the elements of $T$). The corresponding presheaf topos is then the category of all sets equipped with a right $T$-action.

Actually, Noll considers just one such presheaf (and its sub-presheaves) namely $\mathcal{F}=\mathbb{Z}_{12}$ with the action of $T$ by affine maps described before.

He is interested in the sheafifications of these presheaves with respect to Grothendieck topologies, so we have to describe those.

For any monoid category, the subobject classifier $\Omega$ is the set of all right ideals in the monoid.

Using the GAP sgpviz package we can draw its Cayley graph (red coloured vertices are idempotents in the monoid, the blue vertex is the identity map).

 gap> DrawCayleyGraph(T); 

The elements of $T$ (vertices) which can be connected by oriented paths (in both ways) in the Cayley graph, such as here $\{ 2,4 \}$, $\{ 3,7 \}$ and $\{ 5,6,8 \}$, will generate the same right ideal in $T$, so distinct right ideals are determined by unidirectional arrows, such as from $1$ to $2$ and $3$ or from $\{ 2,4 \}$ to $5$, or from $\{ 3,7 \}$ to $6$.

This gives us that $\Omega$ consists of the following six elements:

• $0 = \emptyset$
• $C = \{ 5,6,8 \} = a.T \wedge b.T$
• $L = \{ 2,4,5,6,8 \}=a.T$
• $R = \{ 3,7,5,6,8 \}=b.T$
• $P = \{ 2,3,4,5,6,7,8 \}=a.T \vee b.T$
• $1 = T$

As a subobject classifier $\Omega$ is itself a presheaf, so wat is the action of the triad monoid $T$ on it? For all $A \in \Omega$, and $s \in T$ the action is given by $A.s = \{ t \in T | s.t \in A \}$ and it can be read off from the Cayley-graph.

$\Omega$ is a Heyting algebra of which the inclusions, and logical operations can be summarised in the picture below, using the Hexboards and Heytings-post.

In this case, Grothendieck topologies coincide with Lawvere-Tierney topologies, which come from closure operators $j~:~\Omega \rightarrow \Omega$ which are order-increasing, idempotent, and compatible with the $T$-action and with the $\wedge$, that is,

• if $A \leq B$, then $j(A) \leq j(B)$
• $j(j(A)) = j(A)$
• $j(A).t=j(A.t)$
• $j(A \wedge B) = j(A) \wedge j(B)$

Colouring all cells with the same $j$-value alike, and remaining cells $A$ with $j(A)=A$ coloured yellow, we have six such closure operations $j$, that is, Grothendieck topologies.

The triadic monoid $T$ acts via affine transformations on the set of pitch classes $\mathbb{Z}_{12}$ and we’ve defined it such that it preserves the notes $\{ 0,4,7 \}$ of the major $(0,4,7)$-chord, that is, $\{ 0,4,7 \}$ is a subobject of $\mathbb{Z}_{12}$ in the topos of $T$-sets.

The point of the subobject classifier $\Omega$ is that morphisms to it classify subobjects, so there must be a $T$-equivariant map $\chi$ making the diagram commute (vertical arrows are the natural inclusions)
$\xymatrix{\{ 0,4,7 \} \ar[r] \ar[d] & 1 \ar[d] \\ \mathbb{Z}_{12} \ar[r]^{\chi} & \Omega}$

What does the morphism $\chi$ do on the other pitch classes? Well, it send an element $k \in \mathbb{Z}_{12} = \{ 1,2,\dots,12=0 \}$ to

• $1$ iff $k \in \{ 0,4,7 \}$
• $P$ iff $a(k)$ and $b(k)$ are in $\{ 0,4,7 \}$
• $L$ iff $a(k) \in \{ 0,4,7 \}$ but $b(k)$ is not
• $R$ iff $b(k) \in \{ 0,4,7 \}$ but $a(k)$ is not
• $C$ iff neither $a(k)$ nor $b(k)$ is in $\{ 0,4,7 \}$

Remember that $a$ and $b$ are the transformations (images of $(1,2,\dots,12)$)
 a:=Transformation([10,1,4,7,10,1,4,7,10,1,4,7]);; b:=Transformation([12,8,4,12,8,4,12,8,4,12,8,4]);; 
so we see that

• $0,1,4$ are mapped to $1$
• $3$ is mapped to $P$
• $8,11$ are mapped to $L$
• $1,6,9,10$ are mapped to $R$
• $2,5$ are mapped to $C$

Finally, we can compute the sheafification of the sub-presheaf $\{ 0,4,7 \}$ of $\mathbb{Z}$ with respect to a Grothendieck topology $j$: it consists of the set of those $k \in \mathbb{Z}_{12}$ such that $j(\chi(k)) = 1$.

The musically interesting Grothendieck topologies are $j_P, j_L$ and $j_R$ with corresponding sheaves:

• For $j_P$ we get the sheaf $\{ 0,3,4,7 \}$ which Mamuth-ers call a Major-Minor Mixture as these are the notes of both the major and minor $0$-triads
• For $j_L$ we get $\{ 0,3,4,7,8,11 \}$ which is an example of an Hexatonic scale (six notes), here they are the notes of the major and minor $0,~4$ and $8$-triads
• For $j_R$ we get $\{ 0,1,3,4,6,7,9,10 \}$ which is an example of an Octatonic scale (eight notes), here they are the notes of the major and minor $0,~3,~6$ and $9$-triads

We could have played the same game starting with the three notes of any other major triad.

Those in the know will have noticed that so far I’ve avoided another incarnation of the dihedral $D_{12}$ group in music, namely the $PLR$-group, which explains the notation for the elements of the subobject classifier $\Omega$, but this post is already way too long.

(to be continued…)

A couple of days ago, Peter Rowlett posted on The Aperiodical: Introducing hexboard – a LaTeX package for drawing games of Hex.

Hex is a strategic game with two players (Red and Blue) taking turns placing a stone of their color onto any empty space. A player wins when they successfully connect their sides together through a chain of adjacent stones.

Here’s a short game on a $5 \times 5$ board (normal play uses $11\times 11$ boards), won by Blue, drawn with the LaTeX-package hexboard.

As much as I like mathematical games, I want to use the versability of the hexboard-package for something entirely different: drawing finite Heyting algebras in which it is easy to visualise the logical operations.

Every full hexboard is a poset with minimal cell $0$ and maximal cell $1$ if cell-values increase if we move horizontally to the right or diagonally to the upper-right. With respect to this order, $p \vee q$ is the smallest cell bigger than both $p$ and $q$, and $p \wedge q$ is the largest cell smaller than $p$ and $q$.

The implication $p \Rightarrow q$ is the largest cell $r$ such that $r \wedge p \leq q$, and the negation $\neg p$ stands for $p \Rightarrow 0$. With these operations, the full hexboard becomes a Heyting algebra.

Now the fun part. Every filled area of the hexboard, bordered above and below by a string of strictly increasing cells from $0$ to $1$ is also a Heyting algebra, with the induced ordering, and with the logical operations defined similarly.

Note that this mustn’t be a sub-Heyting algebra as the operations may differ. Here, we have a different value for $p \Rightarrow q$, and $\neg p$ is now $0$.

If you’re in for an innocent “Where is Wally?”-type puzzle: $W = (\neg \neg p \Rightarrow p)$.

Click on the image to get the solution.

The downsets in these posets can be viewed as the open sets of a finite topology, so these Heyting algebra structures come from the subobject classifier of a topos.

There are more interesting toposes with subobject classifier determined by such hex-Heyting algebras.

For example, the Topos of Triads of Thomas Noll in music theory has as its subobject classifier the hex-Heyting algebra (with cell-values as in the paper):

Note to self: why not write a couple of posts on this topos?

Another example: the category of all directed graphs is the presheaf topos of the two object category ($V$ for vertices, and $E$ for edges) with (apart from the identities) just two morphisms $s,t : V \rightarrow E$ (for start- and end-vertex of a directed edge).

The subobject classifier $\Omega$ of this topos is determined by the two Heyting algebras $\Omega(E)$ and $\Omega(V)$ below.

These ‘hex-Heyting algebras’ are exactly what Eduardo Ochs calls ‘planar Heyting algebras’.

Eduardo has a very informative research page, containing slides and handouts of talks in which he tries to explain topos theory to “children” (using these planar Heyting algebras) including:

Perhaps now is a good time to revive my old sga4hipsters-project.

Raymond Smullyan‘s logic puzzles frequently involve Knights (who always tell the truth) and Knaves (who always lie).

In his book Logical Labyrinths (really a first course in propositional logic) he introduced islands where the lying or truth-telling habits can vary from day to day—that is, an inhabitant might lie on some days and tell the truth on other days, but on any given day, he or she lies the entire day or tells the truth the entire day.

An island is said to be Boolean if is satisfies the following conditions:

• $\mathbf{N}$ : For any inhabitant $A$ there is an inhabitant who tells the truth on all and only those days on which $A$ lies.
• $\mathbf{M}$ : For any inhabitants $A$ and $B$ there is an inhabitant $C$ who tells the truth on all and only those days on which $A$ and $B$ both tell the truth.
• $\mathbf{J}$ : For any inhabitants $A$ and $B$ there is an inhabitant $C$ who tells the truth on all and only those days on which either $A$ tells the truth or $B$ tells the truth (or both). (In other words, $C$ lies on those and only those days on which $A$ and $B$ both lie.)

On any given day there are only Knights and Knaves on the island, but these two populations may vary from one day to the other. The subsets (of all days) for which there is an inhabitant who is a Knight then and a Knave on all other days form a Boolean algebra with operations $\wedge = \cap$ ($\mathbf{M}$eet), $\vee= \cup$ ($\mathbf{J}$oin) and $\neg=$ set-complement ($\mathbf{N}$egation).

Here’s a nice puzzle from Smullyan’s book:

Solomon’s Island also turned out to be quite interesting. When Craig arrived on it, he had the following conversation with the resident sociologist:

Craig : Is this island a Boolean island?
Sociologist : No.
Craig : Can you tell me something about the lying and truth-telling habits of the residents here?
Sociologist : For any inhabitants $A$ and $B$, there is an inhabitant $C$ who tells the truth on all and only those days on which either $A$ lies or $B$ lies (or both).

Show that the sociologist didn’t go native, and that his research is lousy.
(My wording, not Smullyan’s)

Smullyan’s version: This interview puzzled inspector Craig; he felt that something was wrong. After a while he realized for sure that something was wrong, the sociologist was either lying or mistaken!

Extending Smullyan’s idea, we can say that an island is Heyting if, in addition to $\mathbf{M}$ and $\mathbf{J}$ is satisfies the following rules

• $\mathbf{T}$ : at least one inhabitant tells the truth on all days.
• $\mathbf{F}$ : at least one inhabitant lies on all days.
• $\mathbf{I}$ : For any inhabitants $A$ and $B$ there is an inhabitant $C$ sharing Knight-days with $A$ only when $B$ tells the truth, and there are no inhabitants doing this while telling the truth on more days than $C$.

Let’s give an example of an Heyting island which is not Boolean.

On Three-island there are only three kinds of people: Knights, Knaves and Alternates, who can neither lie nor tell the truth two days in a row. All Alternates tell the truth on the same days.

Here’s a riddle:

You meet John, who is a Knight, James, an Alternate, and William, a Knave. You don’t know who is who. You can only ask one question containing at most four words, giving you a Yes or No answer, to just one of the three. The answer must tell you whether that person is James or not.

You may like to watch Smullyan on the Carson show for a hint.

Or, you might just watch it reminiscing long forgotten times, when talkshow-hosts still listened to their guests, and could think for themselves…

In this neverending pandemic there’s a shortage of stories putting a lasting smile on my face. Here’s one.

If you are at all interested in chess, you’ll know by now that some days ago IGMs (that is, international grandmasters for the rest of you) Magnus Carlsen and Hikaru Nakamura opened an official game with a double bongcloud, and couldn’t stop laughing.

The bongcloud attack is the chess opening in which white continues after

1. e2-e4, e7-e5

with

2. Ke1-e2 !

thereby blocking the diagonals for the bishop and queen, losing the ability to castle, and putting its king in danger.

If you are left clueless, you should download the free e-book Winning with the bongcloud immediately.

If you are (or were) a chess player, it is the perfect parody to all those books you had to suffer through in order to build up an ‘opening repertoire’.

If you are new to chess (perhaps after watching The queen’s gambit), it gives you a nice selection of easy mate-in-one problems.

Every possible defence against the bongcloud is illustrated with a ‘game’ illustrating the massive advantage the attack gives, ending with a situation in which … black(!) has a one-move mate.

One example:

In the two knight Copacabana tango defense against the bongcloud, that is the position after

the Haight-Asbury (yeah, well) game (Linares, 1987) continued with:

4. Kg3, Nxe4?
5. Kh3, d6+
6. Qg4!, Bxg4
7. Kxg4, Qf6??
8. Ne2, h5+??
9. Kh3!, Nxf2
10. Kg3!

giving this position

which ‘Winning with the bongcloud’ evaluates as:

White continues his textbook execution of a “pendulum,” swinging back and forth between g3 and h3 to counter every Black threat. With the dynamically placed King, Black’s attack teeters on the edge of petering out. Nxh1 will trap the Black Knight and extinguish the threat.

In the actual game, play took a different turn as Black continued his h-file pressure. Nonetheless, this game is an excellent example of how 2. …Nc6 is often a wasted tempo in the Bongcloud.

Here’s Nakamura philosophising over the game and the bongcloud. Try to watch at least the first 30 seconds or so to see the commentators reaction to the actual Carlsen-Nakamura game.

Now, that put a smile on your face, didn’t it?