Show HN: Python Simulator of David Deutsch’s "Constructor Theory of Time"

35 SandroG 5 5/18/2025, 8:22:33 PM github.com ↗
Hi HN,

I turned the freshly published paper “The Constructor Theory of Time” by David Deutsch and Chiara Marletto (arXiv, 13 May 2025) into an executable Python library.

What you’ll find • One-to-one translation of the paper’s formalism: Substrates, Attributes, Tasks, Constructors, and task-algebra operators • Possibility / impossibility predicates and counterfactuals encoded exactly as defined • Test suite that mirrors every lemma and example (>95 % coverage, mypy-typed) • Reproductions of key results: time-keeping substrates, irreversibility proofs, quantum branching tasks, and a self-replicating constructor

Why share? Reading the paper is tough going; expressing each definition in code clarified the ideas and surfaced a couple of questions for discussion. Hoping it helps others and sparks extensions.

Looking for feedback: • Did I miss any subtleties in the formalism? • Which additional theorems or examples would you like implemented next?

Repo: https://github.com/gvelesandro/constructor-theory-simulator

Thanks for taking a look—issues and PRs welcome!

Comments (5)

amelius · 1h ago
Can it simulate a hydrogen atom? How about two hydrogen atoms coming into contact with various energies?
SandroG · 12m ago
canvascritic · 55m ago
Clearly a labor of love. Props to you

I suppose if one is teaching or evangelizing constructor theory, this could be sort of like an interactive textbook

Needless to say, constructor theory hasn't really earned a stable foothold in mainstream physics, and there's a lot of hype in this space, but that's not a criticism of this particular project, just good to know for anyone not familiar

The quantum gravity + graviton tasks stuff especially. without a falsifiable physical model backing it, this can feel like mathematized cosplay. But that has more to do with constructor theory vs this project

Would love to see someone do a pluggable backend so you could test different "task ontologies" against each other.

Mainly I came here to say that categories can likely be used to great effect here a la Geroch

For instance you can start by modeling tasks as morphisms between substrate states (objects), and then enforce composition explicitly. define constructors as functors that map tasks and substrates while preserving structure.

for quantum or irreversible effects, use monads to encapsulate branching and decoherence. Then one could represent task sequences as categorical diagrams and check for commutativity. Or embed substrates via Yoneda to expose behavior in terms of available tasks

revskill · 2h ago
What is it for ?
monocasa · 2h ago