The Monoid Inside Every Program
Essay for a general readership, companion to WP0215 and WP0004. A program is a sequence of operations, and operations compose, so every computation has a monoid acting on the machine's states. The essay starts from Ada Lovelace's separation of operations from the objects they act on, in her 1843 notes on the Analytical Engine. It defines monoids and groups through reversible operations and overwrites (a compass with eight operations, Landauer's principle, the Rubik's cube) and shows wheels as groups in action: Llull's turning discs, the Enigma rotors and Rejewski's use of cycle lengths, the Bombe, Colossus. It then explains how a group is taken apart (quotients, simple pieces, the Jordan-Hölder theorem, the classification of the finite simple groups, solvable groups, the cube group divided into its factors), Galois's criterion for formulas in roots, and the reading of WP0052 in which a new primitive extends what composition can reach. The Krohn-Rhodes theorem carries the same structure to finite machines: every machine is emulated by a chain of simple groups and flip-flops, the coupling of the parts matters, and a chain of counters and flip-flops suffices exactly when every group in the machine's monoid is solvable (Ésik 1999). Consequences follow for what programs can compute (Schützenberger, Barrington), for systems that track a symmetric world (WP0215, Section 4.2), and for learned programs (networks that learn group operations; Transformer depth for solvable machines). Published on giulioruffini.com on 23 November 2026: https://www.giulioruffini.com/blogs/the-monoid-inside-every-program-blog.html
Authors
- Giulio Ruffini (ORCID: https://orcid.org/0000-0003-3084-0177)
Institutions
- Neuroelectrics Barcelona SLU (Spain) (ES)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-23
- DOI
- https://doi.org/10.5281/zenodo.24461729
- Primary Topic
- semigroups and automata theory
- Type
- preprint