Your work, as one calculus
Yaron,
Nearly everything Part I of hyperactivity builds already exists in your work, as separate tools. Hyperactivity derives all of them from one calculus: computational cubical type theory, run as a programming language and an operating system. Your June post asks for proof to become as routine as types. In this language it is the default.
Your work, already here
Make illegal states unrepresentable → types that carry their evidence. You choose types so a bad value cannot be built. Here a type can state any property: sortedness, a frame decoder's contract, a mode. The value carries the evidence for it. The proof is written in the same language as the code, so the reasoning that makes code right is kept, not thrown away.
Incremental → dependency certificates. Incremental cuts recomputation off where a value did not change. Here every stored result keeps a certificate of the keys it read and the versions it saw, including the keys that were absent. Reuse is then a theorem. A maintained view is a proof that the update commutes with the query.
Set reconciliation → exchange between participants who hold different state. Your characteristic polynomials let two hosts find their difference at the cost of the difference. Here definitions are content-addressed together with their dependencies and evidence. Peers exchange exactly the constructions that differ, and check what they receive.
Mobile agents with fault tolerance → continuing processes. Your thesis work kept agents correct across failures. Here a running process is a guarded value with its continuation, its already-issued effects and its outstanding requests. Moving or re-specializing a live process is a proved transition, not a restart.
Your father's laws of interaction → interaction as the primitive. Law-governed interaction declares a system's regularities as laws over every exchange. Here interaction is the primitive. The kernel reduces interacting pairs, and a firm, an exchange or a fleet is one program whose laws are types.
Hyperactivity derives all of them from one calculus.
In OCaml terms
- A type states the property, not only the shape.
type light = Red | Yellow | Greenrules out red-and-green. Heremsortreturns a list, its counts against the input bag, and its sortedness, as one value. That answer type has exactly one inhabitant, somsortis the answer. Nothing searched for it, and no proof was written afterward (Part I §4.4). - Same data, different representation, keeps its proofs. You move between
'a arrayandint -> 'aand re-establish each invariant by hand. Here the equivalence is built once. Univalence makes it an identity, and transport carries the operation and its correctness proof across in one step (§4.1). - All the way to bytes.
Xor(Xor(Input, 0x5a), 0x5a)is proved to return its input and simplified toInput, with the proof carried along. It compiles to01 02 5a 03 02 5a 03 ff, and a theorem fixes what those bytes do (§§5.6, 9.3). Appendix C does the same for the x86 bytes of a C++ frame decoder. - The language is a value. Syntax, typing, steps and observations form a record, and the interpreter is a function over it (§5.4). C++ keeps its standard's meaning while gaining proofs; OCaml and OxCaml lift the same way. A new mode or a specification construct is a checked program over that record, not a compiler fork to be trusted (§6.3).
What it gives your formal methods team
- Specifications on the code you already have. A specification is a type over a program's meaning, attached to the exact source object, without changing how the program runs (§§5.1, 8.1).
- Feedback for agents. An unmet proof obligation names exactly what is missing, over every input. Review moves from agent code to the specification.
- Control of the language, made mathematical. The language definition is itself a checked value, extended by people and agents together.
- Proof down to deployment. The route to native code goes through C, with correctness composed across each step (§9.4). Source, proof and bytes are one object, related by evidence.
- The firm as one program. Market-data ingest, strategies, risk views maintained incrementally, the exchange gateway with a proved credit invariant, and the deployed bytes are one term (§§7.5, 10.3, 10.10).
Lineage
Hyperactivity composes the work it stands on, and each keeps full credit: Petri, McCarthy, Reynolds, Brian Cantwell Smith, Voevodsky, the cubical type theory authors (Cohen, Coquand, Huber, Mörtberg), Arthur Brock and Eric Harris-Braun, Unison and Statebox. Its C++ side descends from a protocol language that Gašper Ažman and I built at Citadel Securities. That language generated optimal reactive parser libraries for market data, written as C++ templates only. Your Incremental, and Umut Acar's self-adjusting computation before it, are direct ancestors of the persistent evaluator in §10.
Read further
Part I, hyperactivity: a decentralized operating system language for collective superintelligence. Start with §1 and §4.4, then §10. The Firm as One Program develops the trading-firm case.
I would like to talk with you about it.
Avik Jain · avikjain12345@gmail.com · linkedin.com/in/avikj