The Matrix: Eyes, Minds, and Pontyfication
The mind column, the three columns together, and the platform they add up to

Models now sit inside how people think together. Assistants keep memories of their users from one conversation to the next, agents act for them across tools, and agent platforms give each agent a durable object of its own to remember in, inside the provider's cloud. A model also fills in what nobody said, a preference or a likely next step, and both the memory and the inference belong to the vendor. A family's care plan or a team's decisions can pass through such a mind, and none of the parties can see what it kept or what it concluded about them.
Eyes have become a credential. To prove that an account belongs to a human, World asks people to look into an Orb that scans their irises, and it has paid them in its own token for doing so. Kenya's data protection regulator found that the payment undercut free consent and ordered the iris data collected there deleted, and in January 2026 Orbs went up in Rome. A scan proves that a body stood in front of a machine that someone else owns.
Decentralization brings beliefs of its own about minds. Bitcoin's saying is don't trust, verify, and it moves trust from people into code that anyone can check. The fediverse kept people in the loop: each server's admins decide what reaches their members and share blocklists with the servers they trust, and Bluesky lets anyone run a labeler and each person choose whose labels to apply. In both, trust travels as something people give one another and can take back, which is how this column wants it.
So the last column asks what a mind can hold of a collaboration, and on whose behalf: what a model may learn from records people made and signed, what it may conclude about the people who made them, and how a group's understanding stays with the group.
The last column of the matrix climbs from models of the brain to software that knows whose it is. Its cells read Brain models, Neural nets, Memories, Concepts, Understanding, Wisdom, Belief systems, Physics, Discrete Maths, C&C, CTC of CS, SocioWare and Socio-aware SW. It is the goal the other two columns climb toward, and over people's records it is the column I keep thinnest.
This is the fourth of four posts on the matrix, after The Matrix, Then and Now, Language Understanding: From Words to Core Creation and Unified Computations: From Co-computation to Meta Teams. It has three parts and a payoff. The first walks down the mind column. The second reads all three columns together, the big picture. The third is the grid itself, as a cheat sheet for the curriculum, and the only place in the series where it appears. After a capstone to build, the post ends with the payoff: the platform I would build from the whole matrix, imagined in its first two verticals, social and health. The code for the column and the capstone is gathered in an appendix at the end.
The mind column
The 2014 notes put a fence around this column before climbing it.
Notice that concepts, understanding and wisdom refer to concepts, understanding, wisdom and belief systems strictly in the context of being able to recognize and solve function problems and have no further correspondence to these three terms.
I wrote that to keep the matrix from claiming too much about minds, and it does a second job now. Every cell in this column is defined by the problems it solves over records, and a definition that narrow leaves no room for inferring things about a person. Nothing about a person is inferred that they did not confirm, and trust travels as vouches people give one another. The column climbs by what it can do with records people made and signed.
Brain models and neural nets
Rows 1 and 2. The notes say the mesh of row 2 forms "something close to a zero latency h-graphical neural net". A node in the matrix can be a word, a machine or a neuron, and the hypergraph that relates nodes is also a network a model can learn over. Message passing on hypergraphs is ordinary now: each node gathers what its incident hyperedges carry, each hyperedge gathers from its members, and a few rounds of that give every node a representation shaped by its neighborhood.
The matrix adds one condition: learning happens where the records already are. A party's model trains and runs over that party's own copy, or over what a share lets it see, and nowhere else. One round of the gathering step, over a party's own incidence index, fits in a few lines (appendix A1).
The vectors never leave the party that computed them. What leaves is what a person did with a suggestion, signed.
Memories, concepts, understanding, wisdom
Rows 3 to 6 are the ladder, and each rung is defined by the one below.
Memories are row 3's maps of maps. "This recursively associative unfolding of graphs is akin to how our memories work," the notes say, and the computation post built those maps as indexes that can always be rebuilt from the rows. A concept is row 4's node whose meaning is the pattern of its relations to other nodes, and the warning attached to it holds for the whole column: "Merely remembering the key value pairs cannot get us far enough." A system that retrieves without relating has a memory and no concepts.
Understanding is row 5's capability to solve a cluster of problems together with one representation. Wisdom is row 6's generalizing and specializing over concepts and over the understanding of concepts: noticing that a function problem keeps coming back and holding its general solution, so the next instance costs a lookup.
Both rungs have a measure, and it is the third Kolmogorov of this post. A general solution is a short description of many instances. Mt. Kolmogorov: A Complex Climb argued that a large data app has a much shorter description that generates the rest, usually its schema, and that finding it is most of the work. Understanding, in the matrix's narrow sense, is having found a short description of a cluster of problems. Wisdom is knowing when to make it shorter.
Belief systems
Row 7 closes the fundamentals. A belief, in the matrix, is an assertion graded by who signed it, and a belief system is the set of assertions a party is prepared to stand behind, each traceable to whoever made it. It changes by adding an assertion that names the one it revises.
An assertion is a hyperedge about a hyperedge: a signed row whose references name what it is about. The vocabulary of what an assertion may claim is closed and short: that a clinic is licensed, which party operates a host, a bridge or an agent, that two parties confirmed each other, that something is revoked, that two keys belong to one person, that an entry was witnessed. No claim carries a number, a rank or a score (appendix A2).
Who may make which claim is decided by the key that signs, and the paper grades a record by the set of roles and keys that signed it with accountable keys. Derived facts carry their provenance as a positive Boolean expression over the records they came from, and for premises used together and or for alternative derivations, and an observer's valuation of records extends to its acceptance of every derived fact. Acceptance is computed from signatures, so a party can say why it believes what it believes, in records.
Žižek describes the opposite case as the decline of symbolic efficiency: fictions multiply and nobody fully believes any of them, because no one stands behind them. Grading every assertion by who signed it is the matrix's answer, and the essay's ontolog grows the same way, one co-signed addition at a time.
Physics and discrete mathematics
Rows 8 and 9 are where the column turns outward. Physics is the limit every simulation has to respect: how long a message takes, where the work runs, what a battery allows. It is also the matrix's name for the ground the socioware essay keeps returning to, a body in a place, where every code and every weight eventually has to land. Discrete mathematics is the shell: records signed and never rewritten, merges that agree in any order, and arrows that must not exist.
The shape is older than the matrix, and three Kolmogorovs mark it in this column.
The first is the Kolmogorov of 1933. His Grundbegriffe gave probability its axioms, as a measure on a space of outcomes, and with them a place inside exact mathematics. Chance had a shell from then on. That is the arrangement rows 8 and 9 ask for: people, devices that come and go, gossip spreading in rounds, models suggesting a reading and clusters forming are probabilistic by nature, and they run inside a discrete substrate that limits what they can do without making them predictable. Whatever the core proposes counts once the shell accepts it.
Paul Erdős showed in 1947 how far that arrangement reaches. He colored the edges of a complete graph at random, counted, and proved that a graph with no large clique and no large independent set exists, without ever showing one:
$$\binom{n}{k}\thinspace 2^{1-\binom{k}{2}} < 1 \quad\Longrightarrow\quad R(k,k) > n$$
For n = ⌊2^(k/2)⌋ and k ≥ 3 the left side holds, so R(k,k) > 2^(k/2). Chance worked inside exact mathematics, and the conclusion was certain.
The second is the Kolmogorov of 1954, on stable orbits, completed by Moser in 1962 and Arnold in 1963. The KAM theorem says that under small perturbations most of the orderly motion of a nearly integrable system survives: trajectories can wander chaotically while invariant tori persist. My 2014 notes describe sinks whose movement "is chaotic with respect to time but deterministic with respect to the time invariant h-space". I did not have KAM in mind when I wrote that, and it is the right theorem for it. The planets of row 6 and the sinks of row 7 are invariant structures in a system whose moment-to-moment motion nobody controls.
The third is the Kolmogorov of 1965, whose complexity measures a string by the length of the shortest program that prints it. That is the measure the ladder above needs, and it is the summit Mt. Kolmogorov climbs toward. Its own warning applies here as well: Kolmogorov complexity is not computable, so nobody reaches the summit, and we compare the descriptions we have. There is a fourth Kolmogorov, from 1932, who read propositions as problems to be solved, and he opens the first section of Mathematics' Architecture & Processes.
Computability and complexity, socioware, socio-aware software
Rows 10 to 12 hand the column to people. Row 10's cell, C&C, CTC of CS, reads in full as computability and complexity, seen as the closed timelike curves of computer science. It comes right after physics and discrete mathematics because it is where the two meet.
A closed timelike curve is a path through spacetime that comes back to its own past. Gödel found a solution of Einstein's equations that contains them, a rotating universe published in 1949 for Einstein's seventieth birthday, and he is the same Gödel whose incompleteness theorem rests on a sentence that speaks about itself. Computer science has its loops in the same two places. Computability is where programs meet programs: Turing's halting problem cannot be decided because a program that decided it could be handed its own description and made to contradict itself, and Kleene's recursion theorem lets any program obtain its own code. Complexity is where programs meet their resources, and the two resources it counts are the matrix's own, time and space.
Physics made the loop exact. Deutsch showed in 1991 that a quantum system sent around a closed timelike curve stays consistent when its state is a fixed point of what happens to it on the way, so nature only has to find a state that maps to itself. Aaronson and Watrous showed in 2009 what such a loop would buy. In Deutsch's model, a classical or a quantum computer with one at its disposal solves exactly the problems that polynomial space solves, so time that loops back on itself becomes as strong as space. Row 7's Time vs Space is the trade such a loop collapses.
That is why the cell sits where people take over the column. A team of people and machines solving problems together meets both loops. Some questions about its own programs no program can settle, so a person signs where a proof cannot reach. Some questions cost too much to answer from a center, so each party answers from where it stands. And the way the matrix gets out of the loop is a fixed point too. A collaboration of monotone boxes reaches the least fixed point above everything it was given, whatever the order of arrival, as Unified Computations shows, and nothing has to be sent back in time for the state to agree with itself.
Row 11's cell is SocioWare: software whose units are parties and whose wiring is their agreements. Row 12's is Socio-aware SW: software that knows whose it is, who signed each part of it, and what each of them agreed to.
The column takes its name from Merleau-Ponty's Eye and Mind, and its last cells keep his painter's lesson: the one who sees is also seen, from inside the visible, with a body in a place. Socio-aware software sees from a position too. It runs on someone's device, over someone's records, and it knows which.
Heidegger's word for the failure this guards against is enframing: a person shows up as stock, a record or a risk score on call for further ordering. A distance used to route belongs to the network; shown on a person, it becomes that frame. That is why the claims above carry no scores, why a feed is in time order, and why a vote tally compares no two posts. The socioware essay names what is at stake in one word, sovereignty, where the real refuses to disappear: whose body, whose land, whose keys. Its last line is the column's last cell: we could call it socioware.
The big picture
Read across, the three columns climb together in five bands. In each band, language, computation and mind say one thing three ways.
| Band | Rows | Language Understanding | Unified computations | Eyes, Minds |
|---|---|---|---|---|
| Structure | 1 and 2 | Language, paragraphs | Co-computation, network latencies | Brain models, neural nets |
| Meaning | 3 and 4 | Dictionaries, contexts | Map of shortcuts, map of maps | Memories, concepts |
| The collective | 5 to 7 | Context clusters, their centers, chaotic CCCs | EXPSPACE, pseudo-infinite space, time vs space | Understanding, wisdom, belief systems |
| Models and action | 8 and 9 | Stochastic patterns, seeing vs creating | ST invariance, STI computation | Physics, discrete maths |
| People | 10 to 12 | Code creation, co-re-creation, core creation | Team problem solving, teams for TPS, meta teams | Computability and complexity, socioware, socio-aware software |
In the structure band a node is a word, a machine and a neuron, and composition keeps its shape: a paragraph of words is a unit of language, a cluster of boxes is a box, a net of neurons is a model. In the meaning band everything is a reference: a dictionary points at another dictionary, an index shortens a walk, a concept is the pattern of its links. In the collective band everything is an addition that agrees in any order: clusters of context, logs that converge, beliefs graded by who signed them. In the band of models and action, what is probabilistic proposes and what is discrete accepts: a model's suggestion, a simulation's run, a projection checked against a shell. In the people band every move is a signed addition, and teams form teams.
The figure draws the same table as a picture: three columns climbing through five bands, and around the bands of the collective and of models, the shell. People, devices, gossip, models and clusters sit inside; signatures, append-only logs, monotone merges and fences make the wall.
The anarchic team
Seen from the big picture, all three columns rest on one structure, the signed append-only log each party keeps. The language column's records are rows in it, the computation column's merges are unions of it, and the mind column's beliefs are assertions in it, graded by the signatures it holds. Mathematics' Anarchitecture & Processes calls it the one ring, with one ring per party and no ring for all of them.
That answers most of the question Anarchitecture asked in January 2020: "How would the architecture of a system produced by an anarchic team look like?" Many logs, many ologs and one ontolog. Each member keeps a log of what they signed. Each keeps an olog, their own map of what their records mean. Between them grows one ontolog of declared equivalences, each carrying its round-trip law, added to only by co-signature. Conway's law says a system's structure copies the communication structure of the team that built it, and a team that communicates through signed additions builds this. The socioware essay's last section reaches the same place from the sociology side, and Anarchitecture & Skunkworks carries it across organizations.
The cheat sheet
Here is the grid, the only time it appears in the series. The first image holds the fundamentals, rows 1 to 7.
The second holds the derived rows, 8 to 12.
A short key for reading it as a curriculum:
- Read a row to learn one concept across all three fields at once. Row 7 is a good first row: sinks, chaotic clusters, time against space and belief systems are one idea seen four ways.
- Read a column to follow one field from structure to people. Each column has its post: language, computation, and this one.
- Learn the fundamentals first, since they are the substrate. Build with the derived rows.
- The modules below are pinned to the rows they exercise, in the order to build them.
- Records: flat, signed, with typed references (the language post; rows 1 to 3).
- Parties: boxes with an inbox and an outbox (the computation post; rows 1 and 2).
- Transport over any carrier, with relays that cannot read (the computation post; row 2).
- Logs and merges: append-only, merged by identity, with stated sync times (the computation post; rows 6 and 7).
- Meaning: an olog per party, an ontolog between parties, and the round-trip law (the language post; rows 3 and 4).
- Code generated from the olog, the short description that seeds the rest (rows 4 and 12, after Mt. Kolmogorov).
- Retrieval by content and origin (the language post; rows 5 to 7).
- Monotone queries, and co-signed steps where absence matters (the computation post; rows 5 and 10 to 12).
- Determinism and fences: the same result on every host, and arrows that must not exist (the computation post; rows 8 and 9).
- Multiplayer: shared editing and team sessions (rows 10 to 12; Suggestions from Papa puts it in a UI).
- Learning where the records are, with a confirmation step and assertions graded by signature (this post).
- The capstone, below.
The mathematics under modules 1, 4 and 8, propositions and types, constraints and operators, transformers and mutators, is in Mathematics' Architecture & Processes and Mathematics' Anarchitecture & Processes. Suggestions from Papa puts the log under a UI, Specs as Laws puts the laws in front of the code, and Anarchitecture & Skunkworks takes the whole curriculum across organizations.
What to build: the capstone
A small socio-aware app for a group that keeps its own records: a team, a family or a cooperative. It runs over any carrier and lets several people work at once. A local model reads only where the records are, and its suggestions wait until a person confirms them. Every assertion carries who signed it, and the arrows that must not exist are checked in CI.
The piece of UI that makes the app socio-aware is small. An agent works for a person, at machine speed, and where it would have signed something on that person's behalf it leaves a draft. The person sees what is waiting, which agent prepared each draft, and signs or discards it. Only the person does either; the agent can list drafts and nothing more.
The framework-free part is three functions over the person's own store: one lists what is waiting, one signs a draft with the key the person's PIN opens, and one discards it (appendix A3). The appendix also gives the screen twice, in Svelte 5 and in ReactiveScript (appendix A4 and A5).
In both versions the screen does one thing an agent cannot: it turns a draft into a row signed by the person whose PIN opened the key.
Both screens enforce the rule at run time. Idris 2 can state it where the compiler checks it: a draft indexed by where it is in its life, consumed when it is signed or discarded (appendix A6).
Two mistakes an agent's code might make are refused before anything runs: signing a draft that is already signed, and both signing and discarding the same draft. The life cycle of a draft is a type, and a draft is spent the moment a person acts on it.
Build that, and the matrix's last cell is on your screen. The software knows whose it is, who prepared each part, who signed it, and what is still waiting for a person. The matrix drew that problem in 2014, and the answer was already in the way it drew it.
The payoff: a platform of peers
Every problem in this series lands on some family somewhere, so let me end with one, a scene at a time.
A woman in a town in the Tarai has lived with diabetes for twelve years. Her son drives for a logistics company in Doha, and her daughter is finishing a nursing degree in Sydney. Between the three of them they keep her care going: a reading sent at night, a test booked from abroad, money for medicine when her allowance runs short. What holds it together is a chain of screenshots, calls across time zones and whichever apps each of them happened to install.
Her clinic keeps its own folders, and the lab two streets away writes its reports in its own codes. When she changes doctors, her history starts again on paper. Every few years a platform comes along offering to hold all of it, on its own servers and on its own terms.
Some evenings she asks an assistant on her phone what a reading means. It answers fluently, with nothing to show where the answer came from, and it either forgets her by the next question or remembers her in a place she will never see.
The booking system her clinic rents runs in a cloud region on another continent. On the day that region goes dark, her appointment goes with it, though she, her doctor and the clinic are all exactly where they were.
Her son writes about her recovery on a social network, and his friends answer him there. When he moves to another server, the conversation stays behind.
The money he sends home passes through counters and apps that each take their fee, and somewhere along the way it stops being his to follow.
And when some new service wants to know that she is human, it may ask to scan her eyes.
Here is the platform I would build from the matrix for her and the people around her, as I imagine it. It starts with two verticals, social and health, because those are where the records that matter most to people pile up, and because her family is a social network and a care team at once.
The ethos
A few rules would hold everywhere on it.
The record belongs to the person it describes, or to whoever made it. A patient is the source of her own rows and a poster of their own posts, and every backup is a sink that keeps what it holds without becoming a source. Anything computed from records, a summary, a trend or a model's suggestion, names its inputs and runs where the keys are.
Connectivity is a luxury. Every app works with no signal, every device keeps its own copy, and the cloud, where there is one, is one more peer that relays sealed envelopes it cannot read and keeps backups for those who want them.
People decide and software remembers. Clinicians set plans and doses, and no app calculates a dose or makes a diagnosis. Assistants run on the phone or on a machine the parties own, and whatever an assistant prepares is a draft, the kind the capstone types, until a person signs it.
Trust is something people give. It is published as vouches and never as scores, and each device ranks what it sees from its own position. Nobody proves they are human with their eyes. People pair in person, phone to phone, by scanning a code and checking a short string of emoji and digits, and a clinic proves its license where a license is what matters.
Nobody is held hostage by a bill. Whatever the state of a payment, a person can open their own record, and a clinician can open the record of the patient in front of them.
A social app
The first app is a place to post in public, and it starts anonymous. An account begins with a generated name and no phone number or email, a person can keep separate personas for separate parts of their life, and the phone strips location and camera details from photos and videos before anything leaves it. A post is one signed record. It spreads by gossip, phone to phone inside the trust circles its author belongs to, and through several relays the author chooses, so no single relay can hold it hostage or take it down everywhere. Each circle has its own key, rotated when a member leaves.
It would be a good neighbor to the open social web. Bridges carry posts to the fediverse and to Bluesky and bring the replies back, so a person can reach people who will never install the app. Links to the same person's accounts on closed platforms stay private unless the author publishes them, one post at a time, because a public link would undo the anonymity. Private messages flow only between people who follow each other or share a circle, which keeps strangers out of anyone's inbox.
What a person sees is ranked on their own phone, from the vouches of the people they trust. No feed is tuned for someone else's engagement numbers, and so nothing in the app has a reason to keep anyone scrolling.
Health apps for a family and its clinics
The second vertical is care, and it starts with her.
A patient's companion for a chronic condition, diabetes first, lives on her phone. She photographs her glucometer, a lab report, a meal or a medicine; the number is read on the phone, and she confirms it before it is saved, in airplane mode if need be. Her family sees what she chooses for each of them: the numbers, a single color for the day, or alerts only, and she can change that for anyone at any time. When a reading is low, the app shows the steps her doctor gave her, right away and with no signal, and tells the family she chose.
A second patient app serves every kind of clinic and every patient, with or without a condition: bookings, bills, identity, reports and prescriptions, for a dentist as much as for a diabetologist. The two patient apps behave alike on everything they share, in the exact sense of Unified Computations: they are bisimilar on those actions, so whatever holds for one of them in a clinic holds for the other.
The clinic runs a desk app on its own computers. The desks coordinate among themselves over the clinic's own network, with or without internet, and a patient who walks in pairs by scanning the desk's code, so her last month is on the clinician's screen before she sits down. The clinician reads one page and sets the plan, and the plan, the next tests and the referrals come back to her phone as a checklist. Specialties are turned on as a clinic needs them, diabetes, dentistry with a tooth chart the dentist signs, general practice, and every record opened is logged against the role that opened it.
Lab results travel from the lab to the patient and from her to the clinic, even when the lab is in another country. She is the hub of her own care, and none of her providers has to trust a server that none of them owns. When the internet goes down the clinic keeps working, and when it comes back, whatever was added merges in any order.
Paying for care, by any route
Care costs money, and in a family spread across countries the money often comes from somewhere else. The platform would never hold it. It carries signed requests and receipts, and the money moves on rails that are already licensed to move it: cash at the desk, a clinic's own QR code, a card, the mobile wallets and bank transfers people already use at home, and licensed remittance rails for family abroad. Each rail is a bridge, and a bridge can be swapped. The rails are the only part anyone rents.
The patient is the one who acts. She starts a request to pay, talks it over with the family she trusts in posts only they can see, and commits it with her signature; the clinic she trusts co-signs it, and its status comes back to her. Her son in Doha or her daughter in Sydney picks any rail the clinic accepts and pays. A clinic never sends a request to her family on its own, and each payer is known to her through a pairing of their own, never through a lookup of a phone number or an email.
The social app and the health apps share circles and keys, and they stay unlinked. A health request shows up in the social app as a card to pay, without its purpose, so a family can help without the whole circle learning why.
The world it adds up to
Go back to the woman in the Tarai and let the platform run for a season. Her readings live on her phone and at her clinic, and her children see what she lets them see, from wherever work has taken them. When the power goes out in town, the clinic's desks keep talking to one another over their own cables, and her phone still holds her record and her doctor's plan. When a cloud region far away burns, or a configuration file goes out wrong to every machine it can reach, nothing in her care was waiting on it. The next time anyone's phone finds a network, whatever was added catches up, in whatever order it arrives, and agrees. Her son's money reaches the clinic on whichever rail he can reach that week, and the platform that carried his request never touched it. Her assistant runs on her own phone and leaves its suggestions for her to sign. The people who vouch for her are people she knows, and nobody has scanned her eyes.
Do the same for every clinic and lab, for the offices that keep a country's records and the services that move its money, and the world's critical infrastructure loses the few places where all of it can go dark at once. Each party keeps its own records and its own keys. The clouds stay, as large and generous peers that relay, back up and sell their compute, and none of them is anyone's only home. An outage becomes weather, local and survivable and over by the next sync. When conflict reaches a data center, it reaches the copies kept there and leaves every other copy standing. Power moves too: a provider can still lose a customer and a customer can still leave, but no one can hold a family's history or a clinic's archive hostage to a bill, a policy change or a quarterly target.
That is what I meant in 2014 by planets. Bodies in orbit keep in step without a center, each holding its own mass and each pulling on the others. A collaboration that works between planets works across a village whose phones come online once a day, across a country, and across a family whose syncs cross time zones the way the planets' cross light minutes. The matrix was a map of how to get there, and these apps are the first places I would want to arrive.
Readings
- Risav Karna, The Matrix, Then and Now, Collaborative Systems in the Age of Codes and Weights and Collaboration Is Composition (2026).
- Risav Karna, Anarchitecture and Mathematics' Anarchitecture & Processes (2020).
- Risav Karna, Mt. Kolmogorov: A Complex Climb (2024).
- Andrei Kolmogorov, Grundbegriffe der Wahrscheinlichkeitsrechnung (1933); "On conservation of conditionally periodic motions for a small change in Hamilton's function" (1954); "Three approaches to the quantitative definition of information" (1965).
- Jürgen Moser, "On invariant curves of area-preserving mappings of an annulus" (1962); Vladimir Arnold, "Proof of a theorem of A. N. Kolmogorov on the preservation of conditionally periodic motions under a small perturbation of the Hamiltonian" (1963).
- Kurt Gödel, "An Example of a New Type of Cosmological Solutions of Einstein's Field Equations of Gravitation", Reviews of Modern Physics 21 (1949).
- David Deutsch, "Quantum mechanics near closed timelike lines", Physical Review D 44 (1991).
- Scott Aaronson and John Watrous, "Closed timelike curves make quantum and classical computing equivalent", Proceedings of the Royal Society A 465 (2009).
- Paul Erdős, "Some remarks on the theory of graphs", Bulletin of the American Mathematical Society 53 (1947).
- Maurice Merleau-Ponty, Eye and Mind (1961).
- Martin Heidegger, "The Question Concerning Technology" (1954).
- Slavoj Žižek, The Ticklish Subject (1999).
- Yifan Feng and others, "Hypergraph Neural Networks" (2019).
- Melvin Conway, "How Do Committees Invent?" (1968).
Appendix: the code
The code below is in the order the text uses it. Each part names the section it belongs to.
A1. One round of gathering
From Brain models and neural nets.
// learn.ts
/** One round of gathering: each row's vector becomes the mean of itself and the rows it names. */
export async function gather(index: IncidenceIndex, rows: readonly string[], vec: ReadonlyMap<string, Float32Array>) {
const next = new Map<string, Float32Array>();
for (const id of rows) {
const own = vec.get(id);
if (own === undefined) continue;
const others = (await index.incidencesOf(id))
.map((ref) => (ref.kind === 'entry' ? vec.get(ref.to) : undefined))
.filter((v): v is Float32Array => v !== undefined); // only what this party holds
const sum = others.reduce((acc, v) => acc.map((x, i) => x + v[i]!), Float32Array.from(own));
next.set(id, sum.map((x) => x / (others.length + 1)));
}
return next;
}
A2. The closed list of claims
From Belief systems.
// claims.ts
export const CLAIMS = [
'licensed_clinic', // a directory signer about a clinic
'operated_by', // which party runs a host, a bridge or an agent
'bridge_of',
'paired_with', // two parties that confirmed each other
'revoked',
'same_as', // two keys, one person
'witnessed', // a holder's log entry
] as const;
A3. Drafts
From What to build: the capstone.
// drafts.ts
export interface Draft {
readonly id: string;
readonly kind: string;
readonly preparedBy: string; // the agent's key
readonly agentName: string | null;
}
/** The drafts waiting for this person, each with the agent that prepared it. */
export declare function waitingDrafts(): Promise<Draft[]>;
/** Signs a draft as the person, with the key their PIN opens now, and closes it. Only the person can. */
export declare function signDraft(id: string, pin: string): Promise<void>;
export declare function discardDraft(id: string): Promise<void>;
A4. The screen in Svelte 5
From What to build: the capstone.
<!-- Waiting.svelte -->
<script lang="ts">
import { discardDraft, signDraft, waitingDrafts, type Draft } from './drafts';
let drafts = $state<Draft[] | null>(null);
let pin = $state('');
let failed = $state<string | null>(null);
const messageOf = (e: unknown) => (e instanceof Error ? e.message : String(e));
async function refresh() {
try {
drafts = await waitingDrafts();
} catch (e) {
failed = messageOf(e);
}
}
async function sign(id: string) {
try {
await signDraft(id, pin);
pin = '';
failed = null;
await refresh();
} catch (e) {
failed = messageOf(e);
}
}
async function discard(id: string) {
try {
await discardDraft(id);
await refresh();
} catch (e) {
failed = messageOf(e);
}
}
refresh();
</script>
<section>
<h2>Waiting for your signature</h2>
{#if drafts === null}
<p>Loading…</p>
{:else if drafts.length === 0}
<p>Nothing is waiting.</p>
{:else}
<ul>
{#each drafts as d (d.id)}
<li>
<span>{d.kind}, prepared by {d.agentName ?? 'an agent'}</span>
<button onclick={() => sign(d.id)} disabled={pin.length < 4}>Sign</button>
<button onclick={() => discard(d.id)}>Discard</button>
</li>
{/each}
</ul>
{/if}
<input type="password" inputmode="numeric" bind:value={pin} placeholder="PIN" />
{#if failed}<p role="alert">{failed}</p>{/if}
</section>
A5. The screen in ReactiveScript
From What to build: the capstone.
ReactiveScript compiles to Solid 2.0. The same three functions are declared once for .rx, the list as a loader and the other two as I/O.
// drafts.d.rx
export type Draft = { id: string; kind: string; preparedBy: string; agentName: string | null }
export pure fn waitingDrafts(): Promise<Draft[]>
export fn signDraft(id: string, pin: string): Promise<void>
export fn discardDraft(id: string): Promise<void>
// waiting.rx
import { Draft, waitingDrafts, signDraft, discardDraft } from "./drafts.js"
export default component Waiting() {
drafts = await waitingDrafts()
source pin := ""
source failed: string | null := null
canSign = pin.length >= 4
action sign(id: string) {
try {
await signDraft(id, pin)
pin := ""
failed := null
refresh drafts
} catch (e) {
failed := e.message
}
}
action discard(id: string) {
try {
await discardDraft(id)
refresh drafts
} catch (e) {
failed := e.message
}
}
<section>
<h2>Waiting for your signature</h2>
{errored fallback(e) { <p role="alert">{e.message}</p> } {
loading fallback { <p>Loading…</p> } {
if drafts.length === 0 {
<p>Nothing is waiting.</p>
} else {
<ul>
{for d in drafts {
<li>
<span>{d.kind}, prepared by {d.agentName ?? "an agent"}</span>{" "}
<button disabled={!canSign} onClick={() => { sign(d.id) }}>Sign</button>{" "}
<button onClick={() => { discard(d.id) }}>Discard</button>
</li>
}}
</ul>
}
}
}}
<input type="password" inputMode="numeric" value={pin} onInput={e => { pin := e.target.value }} placeholder="PIN" />
{if failed !== null { <p role="alert">{failed}</p> }}
</section>
}
The two versions do the same work in their own idioms. Svelte keeps the list in state and loads it again after each write. ReactiveScript makes the list an equation over a question, drafts = await waitingDrafts(), so loading and failing are regions of the markup, and refresh drafts asks the question again once a signature lands; its checker also refuses an action that awaits without handling its failure.
A6. Drafts as a type
From What to build: the capstone.
module Draft
public export
data Status = Waiting | Signed | Discarded
||| An agent's draft, indexed by where it is in its life.
public export
data Draft : Status -> Type where
||| What an agent prepared, for a person to sign.
Prepared : (kind : String) -> (body : String) -> (agent : String) -> Draft Waiting
||| The same draft, signed by the person whose PIN opened the key.
SignedBy : (person : String) -> (1 _ : Draft Waiting) -> Draft Signed
||| The same draft, thrown away by the person.
Dropped : (1 _ : Draft Waiting) -> Draft Discarded
||| Only a waiting draft can be signed, and signing uses it up.
export
sign : (person : String) -> (1 d : Draft Waiting) -> Draft Signed
sign person d = SignedBy person d
export
discard : (1 d : Draft Waiting) -> Draft Discarded
discard d = Dropped d
Signing a signed draft fails to type check, with When unifying: Draft Signed and: Draft Waiting. Signing a draft and also discarding it fails on linearity, with Trying to use linear name d in non-linear context.
About the author
- Technical Leadership & Architecture
Comments
Join the discussionNo comments yet. Be the first to comment.
An Architecture
In this series, we explore ways to think about the architecture of common libraries & UIs. We will use JS, Bun, TS, Svelte 5+, Nx, RxJS, ScalaJS, ReasonML, Idris 2+, and Lean 4+.





