Perfectoid Rings Breakdance in Sonic Pi?
One of the ideas that comes to mind when I think about prime numbers is their staticness, that naive definition we’ve known forever. I wanted primes to spin, or do something different; to become scores, in the musical sense of the word.
But that’s exactly what happens when we run a loop to check their divisors (I won’t cite that here because it’s a classic), when we put them through a computer. We iterate, we move something. In that sense, I discovered long ago that this obsession with iteration exists in number theory as a beautiful notion called p-adic numbers.
In my library figurate_numbers for Sonic Pi, I introduced some time ago a transformation of sequences into their -adic versions. Since I loved the taste of algebra (and of course Serre’s book), I implemented it as an inverse limit, that is, iterating over powers of primes. I phrase it like this:
To the topological eye, we have discrete groups that, through a system of modular reductions, give rise to a profinite topology.
I also added a couple of important definitions: the p-adic valuation and the p-adic norm (both of which I had already read about in 2018 in the opening pages of Koblitz’s book). What you can do in figurate_numbers is summarized in these commands:
# ArithTransform.ring_padic_expansion(seq, p, precision = 11, reverse: false)
# ArithTransform.ring_padic_val(seq, p)
# ArithTransform.ring_padic_norm(seq, p)
amp_seq = SpaceFigurateNumbers.centered_hendecagonal_pyramidal
100.times do
# p-adic amplitude control
sample :bd_sone, amp: ArithTransform.padic_norm(amp_seq.next, 3)
sleep 0.25
end
Afterwards I became interested in the p-adic versions of many other mathematical objects. Once you pick up a new lens, it’s natural to want to test how the mathematics deforms under the new structure to find the analogues. But since I saw no further comments on the Sonic Pi forum.
I decided to leave things in suspense, and not only for that reason. I’m also watching the evolution of the new software Sam Aaron is building with SuperSonic and the version 5 of Sonic Pi, still in beta. What he’s crafting looks formidable.
Perfectoid rings
The p-adic theory has grown enormously, and a great deal of current mathematical research revolves around its methods. One definition I plan to eventually develop for Sonic Pi (once the new version drops) is that of a perfectoid ring, at least in its most naive form.
I’ll use . Also, calling in the integers, let’s look at . To begin, a number can be written in this three-phase universe as
The values of each are simply the set . For instance: . Yes, one example is enough.
But, as in many things in life, we need to plant the tree by its roots, not with the crown in the dirt. We need many of these roots, an infinite myriad of them
and so on. With this you can now denote the slightly more general form of the ring , keep it in memory like this
You can see that raising to powers gives and , and so on down the chain.
As I mentioned at the start of this post, this obsession with iteration shows up again and again.
Now, as in many theories in algebra, we need a special element. Here that element is called the pseudo-uniformizer,
and is the uniformizer raised to , meaning .
This tells us that lives inside (keep that membership handy, it’ll come in useful in a moment).
Perfectoid magnifying glasses
What do numbers in this ring actually look like? An might appear as
or as an infinite series
And we can already perform reductions that were not available before. The element allows reductions to ignore every multiple of itself, so
Frobenius
Finally, the last thing to file away for quick access is the Frobenius. Here is what we do with the ring
given by .
The second sufficient example: set . We expand as a cubic polynomial in the pseudo-uniformizer by raising to the third power:
Now here is why we spent years grinding through mechanical substitutions. Since , we get
because and . Every term has order . Topologically, this is of small size (with respect to the -adic topology). So we have
because, grouping the expression like this
we can see it lies in .
The Capsule Corp
Everything above is captured in the following more formal definition. If is a topological ring, we will call it an integral perfectoid ring if there exists an element such that
, and the Frobenius map
is an isomorphism.
Towards Sonic Pi
At this point I’m genuinely unsure what direction the translation of all this into Sonic Pi’s musical terrain might take. I’ll definitely post something in the community at some point to see if anyone’s interested.
The perfectoid structure carries infinite root towers, profinite completions, Frobenius symmetry (all of which feel rich enough to generate interesting live coding material).
But how to map that faithfully, or even playfully, into sequences, amplitudes, or rhythmic patterns is still an open question for me. I’ll leave it here, as an unresolved -chord, with .