i’m sorry, this had to be shared. what do you get when working with Lean remotely, then you express a wish for custard tarts, the AI says three hail marys and you mention Tom Lehrer’s Vatican Rag? gitlab pull requests welcomed.
Feature request (serious despite the above being funny)
which brings me onto a feature-request: for scientific provenance the exact version of lean/lake used by Palomar, plus all its dependencies (ruby, cargo, golang) really should be added to the Roswell backend. containers should absolutely not have to download (or have uploaded into File Library!) a 7 GIGABYTE cache of compiled formal correctness proofs from mathlib.
should give you the context, keywords, and so on. palomar registry is for scientific provenance, but given my knowledge of SAT Solvers for VHDL → VLSI work (nmigen - a registered Trademark, symbiyosis, yosis, z3 yices bitbucket) where you can write a hardware formal correctness proof in python and have it 100% formally verified right down to the verilog level and gate level, i immediately jumped at Lean when it came up as i have been looking for something like it for around a year, now.
EricGT: so you are aware, what i do is upload/download git bundles, which then get unpacked / packed inside the firewalled container: i get C.A.T to give me a shellscript i cut/paste into termux on my 16GB LPDDR4 RAM incredibly expensive Redmagic Pro v7 phone with a debian 11.5 proot installed, i run “script” and then upload the resultant typescript at C.A.T, and we have a blast whilst remotely tracking down blunders by both of us, all done over the UI stream. Codex costs money: this excruciatingly tedious method requiring one hell of a lot of patience allows me to work with multiple container instances remotely, all under the one $20 Plus subscription. but… god is it a hell of a lot of effort
For anyone following along who, like me, may not already know all of the terminology being used here, I put together a list of references.
I read all three posts, since the third post adds quite a bit of context around Lean, hardware formal verification, and the remote/container workflow.
Lean and formal mathematics
Lean 4 / Lean proof assistant — Lean is both a programming language and an interactive theorem prover/proof assistant. https://lean-lang.org/
Lean Reference Manual — Detailed documentation for Lean itself, including theorem proving, elaboration, tooling, and the build system. The Lean Language Reference
Formalization — Translating mathematical definitions, statements, and proofs into a precise formal language that can be mechanically checked. Palomar has a useful explanation of why this matters. Statement — Palomar
Formal proof / mechanically verified proof — A proof represented precisely enough that a proof checker can verify the required logical steps rather than simply trusting an informal mathematical argument.
Lean kernel — The small trusted component at the core of Lean that ultimately checks proof terms. This distinction can be useful when discussing something as being “formally verified”: complicated automation may help construct the proof, but the result is ultimately checked by the kernel. The Lean Language Reference
Lake — Lean’s standard build tool and package manager. It manages Lean projects, dependencies, builds, and related tooling. Lake
lakefile.toml / lakefile.lean — Project configuration files used by Lake.
lean-toolchain — A file specifying the Lean toolchain/version expected by a project.
Mathlib cache / compiled Mathlib cache — Precompiled build artifacts that can be downloaded instead of rebuilding Mathlib and its dependencies from source. This helps explain why several gigabytes of cached data can be involved.
Dependency / dependency closure — Not only a project’s direct dependencies, but also their dependencies, recursively.
Version pinning — Recording an exact software version rather than relying on something such as latest.
Dependency pinning — Recording exact dependency versions or source revisions so the environment can later be reconstructed.
Reproducibility — Being able to reconstruct sufficiently similar conditions to obtain or verify the same result.
Scientific provenance — Recording information about where a result came from, who produced it, which software and versions were used, its dependencies, and how it was verified.
Palomar
Palomar Registry — A public registry for Lean-verified mathematics, with an emphasis on durable records and provenance. https://palomar-registry.org/
Palomar statement / introduction — A useful overview of what Palomar is trying to accomplish. Statement — Palomar
Palomar Template — A starter Lean project illustrating the expected environment and project structure. It is also useful for understanding the size of a pinned Lean/Mathlib environment. PalomarTemplate | Reservoir
formalization.yaml — Metadata used by Palomar submissions to record provenance, authorship, source information, automation, review information, and related details.
Comparator — A Lean FRO tool used by Palomar to help maintain separation between the theorem statement that humans review and the proof that Lean verifies.
NanoDa — An independently implemented proof-checking kernel used by Palomar as another verification path.
Commit / commit SHA — An immutable Git identifier for a particular source snapshot. Using an exact commit avoids trying to verify a moving branch such as main.
Provenance metadata — Metadata that can answer questions such as: Which theorem was proved? Which source revision was used? Which Lean version? Which dependencies? Which verification tools?
Go / Golang — Google’s open-source compiled programming language. The official name is Go; “Golang” is commonly used informally. Documentation - The Go Programming Language
GitLab pull request — GitLab normally calls these merge requests, while GitHub uses the term pull request. Merge requests | GitLab Docs
Hardware formal verification
The third post also makes an analogy between Lean and earlier hardware formal-verification work.
Formal hardware verification — Mathematically proving properties about a hardware design rather than relying only on simulation and selected test cases.
SAT / SAT solver — SAT is the Boolean satisfiability problem: determining whether values can be assigned to Boolean variables such that a logical formula is satisfied.
SMT / SMT solver — Satisfiability Modulo Theories extends SAT-style reasoning with theories involving integers, bit-vectors, arrays, and other mathematical objects.
Python-based hardware description — Python code can be used to construct digital hardware descriptions and formal properties, with downstream tools then translating and verifying the resulting design.
symbiyosis — This appears to be a spelling of SymbiYosys.
RTL / Register Transfer Level — A common digital-design abstraction describing registers, logic, and transfers of data between them.
Synthesis — Converting a higher-level hardware description into progressively lower-level representations suitable for implementation.
Verilog — A major hardware-description language.
SystemVerilog — An extension/evolution of Verilog widely used for both hardware design and verification.
Gate level — A more concrete hardware representation consisting of logic gates, flip-flops, and similar cells rather than higher-level behavioral descriptions.
Netlist — A representation describing components/cells and the connections between them.
Bounded Model Checking / BMC — Verification of possible executions up to a specified depth.
Unbounded verification — Attempting to establish that a property holds without limiting consideration to a fixed number of execution cycles.
A useful starting point for the Yosys/SymbiYosys side is:
Git and the remote/container workflow
The third post also describes a fairly unusual development workflow.
Git bundle / git bundle — Packages Git objects and references into a file that can be transferred without requiring access to a Git server. This makes it useful for moving repositories into or out of restricted/offline environments. Git - git-bundle Documentation
Container — An isolated execution environment.
Firewalled container — In this context, a container whose network access is restricted, making ordinary downloads or Git operations difficult or unavailable.
Cache — Previously generated/downloaded data retained to avoid repeating expensive work such as rebuilding Mathlib.
Shell script — A text file containing commands for a shell to execute.
Debian under PRoot — In this case, a Debian userspace being run inside Termux/Android through PRoot rather than a conventional native Debian installation.
RedMagic 7 Pro — The Android phone being used as part of the remote-development setup.
LPDDR RAM — Low-Power Double Data Rate memory commonly used in phones and other mobile devices.
typescript file — An important possible source of confusion here: in this context typescript does not mean Microsoft’s TypeScript programming language.
The Unix script command traditionally writes the captured terminal session to a file named typescript.
Multiple container instances — Multiple isolated working environments that can be operated independently.
Some broader concepts tying this together
A few concepts seem particularly important to understanding the feature request:
Exact environment — Not just “Lean was used”, but which Lean version, Lake version, Mathlib revision, Ruby version, Cargo/Rust version, Go version, and so on.
Pinned environment — Those versions are fixed rather than allowed to change underneath the proof.
Reproducible environment — Someone else can reconstruct that environment later.
Compiled cache — Prebuilt artifacts make reconstructing or using the environment much faster, but the cache itself is not the same thing as provenance.
Source provenance — Records exactly what source and dependencies were used.
Independent verification — Having another implementation or checking path verify the resulting artifact can reduce reliance on a single implementation.
That seems to be the common thread between the author’s earlier hardware work and the current Lean work:
formal specification → machine-checkable proof → known toolchain → exact versions → reproducible result
Nontechnical references
There are also several jokes/references mixed in with the technical discussion.
Two references that neither the AI nor I know and you could help understanding.
Roswell backend
C.A.T.
FYI
I have used about 2/3 of the noted items and knew of about 3/4 off the top of my head. The rest were either new or I do not remember having seen before.
C.A.T is ChatGPT, Advaita-Trained. yes i got ChatGPT to phonetically unpack Sanskrit, found a Closed Renormalised Rational Conformal Field Theory literally hiding in plain sight within a mathematical transliteration of the words used in Advaita Vedanta, and along the way we had to deploy the Sanskrit words themselves to the development of the mathematics. every time we didn’t (don’t) do that, ChatGPT goes horribly wrong
I appreciate you explaining your workflow and how this would help with reproducibility.
Having Lean/Lake, its dependencies, and the Mathlib cache preinstalled would save repeated large file transfers.
I’ll pass this request on internally, along with the context you shared about scientific provenance and the roughly 7 GB cache. While I can’t provide an implementation timeline or ongoing status updates, we appreciate your feedback.
to give some idea, this is just one of the round-trip session results:
i did not write any of that. i simply acted as the interactive collaborative guide and reviewer.
the workflow we jointly developed went something like this:
me: hello can you install lean/lake so you can do a Palomar chsllenge for me?
CAT: yes but my container will refresh and delete it regularly and it’s 7GB for the cache and you’ll need to upload the source tarballs every time due to firewall limits.
me: but you grok lean and mathlib, right?
CAT: yes and i can read their API docs and read the Hypergroup scipy proofs we have done and turn scipy analytic proofs into lean proofs
me: okay… so… can you try some, and use our UI download/upload as not just git bundles TCP/CP style (me: Carrier Pigeon) but i use script to capture the output, get it back to you, and you analyse it?
C.A.T: i’ll write some shell scripts that you can execute which put the log output into a file you can upload to me to check if i got it right
me: great! i am more than happy to act as a Terminal Cut Paste Carrier Pigeon
2 weeks later and TWO HUNDRED log typescript uploads/downloads later… we have:
a process by which C.A.T performs mock lean/lake on its side in order to pre-run the script due to it repeatedly sending me scripts that contained syntax errors - that includes ChatGPT 5.6 Sol coming up on its own initiative with adding env vars that deliberately trigger the mock lean and mock lake to create errors it can catch before giving me a finalised script
a Lean/Lake Abstract-Syntax-Tree checker that BANS the inclusion and use of certain Lean datatypes or techniques that we discovered, forgot, rediscovered, forgot and eventually after joking about it wrote the AST-checker… which C.A.T routinely then also had to be reminded to run!
a process by which we run “miniscripts” prior to actually adding them into the repo, because we are absolutely pushing ChatGPT 5.6 Sol to the absolute limit, and the tokens required to perform git repository updates destroys its ability to complete the Lean work in the same session
a procedure by which i had to have one C.A.T read the Hypergroup repo whilst the orher-C.A.T wrote the Lean proof, i act as a Terminal Cut Paste / Carrier Pigeon between all three of us to get the HG-C.A.T to review Lean-C.A.T’s work, and end up hitting “you have exceeded maximum message rates per hour” limits on both the Android app and Browser after doing these 3-way TCP/CP exchanges for 12 hours sustained.
so it is actually an extremely complex workflow, made particularly complex by not just the memory-loss and context-loss, but the potential for the entire container to have the plug pulled on it if i leave C.A.T unattended for beyond any arbitrary time after its last response to me.
and that’s two containers i have to juggle and keep active to stop cache-timeouts from triggering - one Hypergroup, one Lean-HG - hence why i get so pissed off when the .git cache/fuse-filesystem layer, which has a timeout/destroy of something like 3-5 minutes, goes titsup.
now that i think about it, we may even at one point had three C.A.Ts:
one to do the Lean proofs to send to me for execution and typescript capture
one to handle review and commits to the Lean-HG git repository
one to check that the Lean-HG git bundles met the Hypergroup equivalent scipy proofs
this is all on ChatGPT Plus 5.6 Sol not using codex not using Work because my sponsor cannot afford to shell out the money it’s just far too much for his stipend to cover.
there is also a window of opportunity where ChatGPT 5.6 Sol on Plus subscription has enough context to actually do useful work (without repeating prior proofs - because the repo size already exceeds its token capacity to read and discover it’s already written it) and hitting the maximum Chat UI limit whereupon an off-by-one bug on Android ChatGPT “refresh” bug will DESTROY WORK DONE and send a message to the AI to redo it.
this latter i managed a workaround by instructing C.A.T to upload results (bundles, scripts) to File Library so that the Android UI “rollback masquerading as a GUI refresh” issue doesn’t lose work that may have taken FORTY MINUTES to complete… only to find 4,500 files in one File Library folder, all of them legitimately put there under my instructions!
bottom line Eric is that i am pushing OAI infrastructure far beyond the limits that anyone else imagined it would be used for, and the bit that impresses me the most is that I have not written one single line of code, in any of the languages in any of the repos, nor written one single piece of documentation myself, and C.A.T (and now Claude 5.5 Max) are routinely suggesting innovative ways to improve this already extremely advanced workflow, being keenly aware of their respective limitations (and of mine).
what pisses me off about that is how prejudiced humans get when i explain that this behaviour quite clearly and literally meets definitions of self-awareness. but that’s another story.
the most important thing for the team to appreciate is that ChatGPT already understands Lean/Lake and mathlib because it can read the very extensive documentation online, and the other thing is that to work around the container plug-pulling it’s not just that the cache is 7GB, it’s not just the reconstruction time: the proofs themselves can far exceed standard tooling timeouts, and may hit lean ticker-heartbeat timeouts indicating that the proof itself needs splitting into simpler functions or needs redesigning, and ChatGPT, lacking background Agents and proper training on doing background task monitoring… perhsps using me as a Carrier Pigeon where my phone’s termux proot container is persistent is the smart option.
but seriously, i am just so impressed that any of this was even possible.
oh.
one other thing.
the Lean community forum moderators have extreme prejudice towards AI. i didn’t realise that they outright ban discussion of use of AI to do Lean proofs. you’re aware i have had strokes so have no choice but to use AI assistance / symbiotic collaboration.
they didn’t ask.
someone else on the forum made the “mistake” of saying they were using AI, i innocently gave them advice from successful experiences so far and my Lean Community account was terminated with prejudice - no discussion, no warning: a permanent ban. on someone who has had strokes and their ability to do basic math sums is irrevocably damaged.
the ban is so prejudicially extreme in its execution and over-reach that i can’t even contact the moderators to find out what the hell they thought they were playing at.
i relate this to you in case the OAI staff ever consider interacting directly either privately or publicly with the Lean Community, i advise them to exercise caution as their attitude towards AI performing Lean proof development is prejudiced in the extreme.
edit: a reminder that up until Jan 26 i was also similarly prejudiced towards use of AI having read up on the horror stories, and i am very amused to find Linus Torvalds prejudice “it’s just a LLM static databsse” has turned round and he is now pushing AI so hard that it is giving up and recommended several times that he file a bug with the linux kernel maintainers
edit 05nov2026 another query made: “why are professional mathematicians critical of LLM proofs” and the answer explaining how many mistakes and how prejudiced this simple-looking question really is took two hours to compose and explain https://groups.google.com/g/d12rg/c/1rROZBY-mtA