scholia
Manifest validA formal proof is legible to a compiler, not to a mathematician. This DSH plugin renders a Lean 4 / Mathlib theorem as a paper page and reduces its 1,829-module dependency cone to one readable main line. Formal proof → readable paper.
scholia
(package name dsh-scholia)
v0.1 — early and incomplete. Interfaces will change.
A DSH plugin that turns a formalized theorem (Lean 4 / Mathlib) into something a mathematician can actually read: a paper-style page with the statement rendered as math, a proof outline, and annotations anchored to the formal objects.
Everything here is generated from a real corpus of Mathlib declarations plus out-of-corpus Lean sources used as regression fixtures.
What it produces
| Artifact | What it is |
|---|---|
Paper view out/render/*.html | One page per theorem: rendered statement, Lean source, per-step annotations. Zero <script>. |
Main-line outline out/outline/<root>/index.html | The proof's dependency cone reduced to a single ordered line of steps, each with the author's own one-sentence summary. |
Step pages out/outline/<root>/NN.html | For one step: the modules it brings with it, each with its own summary. |
Dependency graph out/graph/*.svg | The module-level import DAG, statically rendered. |
Start with out/outline/Euler.Solution/index.html and out/render/CHSH_inequality_of_comm.html.
How the outline is built
The module graph alone is unreadable at 1829 nodes. What works is a main line:
- start from the module that declares the paper's theorem (taken from the source
repo's
formalization.yaml); - at each step follow the dependency with the largest subtree;
- each step's load is the telescoping difference
|subtree(p_i)| - |subtree(p_{i+1})|, which partitions the cone exactly — no overlaps, nothing missed.
Every module carries a /-! ... -/ docstring written by whoever wrote the file,
so each step can be labelled with a sentence of mathematics instead of a file name.
Reading order is foundations-first (--order reading); the reverse is the raw
dependency order.
Layout
src/core/ pure logic: skeleton extraction, anchors, graph, validation
src/io/ corpus streaming, SQLite lexicon index, artifacts, contract
src/render/ pure string generation: paper view, outline, graph, math
src/tools/ the DSH tools
scripts/ offline export scripts
vendor/katex/ vendored KaTeX (self-contained, server-side rendering)
docs/ SPEC / ARCHITECTURE / INTERFACES / USAGE (Chinese)
test/ incl. out-of-corpus Lean fixtures
out/ generated artifacts
Requirements
Node.js 24+ (uses the built-in node:sqlite), Lean 4 sources if you want to
regenerate the graph/outline artifacts.
The corpus (data/lsv2.jsonl) and the lexicon index (cache/lexicon.db) are
not in this repo — they are hundreds of MB. See docs/USAGE.md.
Status
- 360 tests, 0 failures.
- The paper view is the mature part; the outline and graph are newer (v1.4).
- Known limits are recorded in
docs/ARCHITECTURE.md§11, including the Unicode→LaTeX gaps, the surface-syntax dependence of the skeleton extractor, and what the v1.3 "signature unknown" handling covers.
License
MIT — see LICENSE.
Bundled third-party material keeps its own license:
vendor/katex/— KaTeX, MIT (seevendor/katex/LICENSEandPROVENANCE.json)test/fixtures/lean/— fragments from openai/NavierStokesAndEuler, Apache-2.0, attributed in each fixture header
Comments
Loading…
From the same category
DeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.
★ 41.7k
↓ 143/wk
MIT
Aug 24, 2026
dsh plugin --profile web add dsh-plugin-reactive-resumeby Tencent
Let AI agents use your real, logged-in browser without interrupting your work. CLI + extension for browser automation across any shell-capable AI agent.
★ 8.5k
↓ 5.9k/wk
MIT
TypeScript
Oct 9, 2026
dsh plugin --profile terminal add @wxg-prc-cpg/browser-skill-dsh-pluginby yjh051108
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
★ 7k
MIT
JavaScript
Sep 18, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby Q00
Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop. MCP server, 14 runtimes: Claude Code, Codex CLI, Gemini CLI, OpenCode,
★ 6.2k
MIT
Python
Oct 7, 2026
by dsh-market
The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场
★ 6k
↓ 95.5k/wk
MIT
TypeScript
Oct 9, 2026
dsh plugin --profile web add dshmarketby superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
★ 4.9k
NOASSERTION
Python
Oct 10, 2026
dsh plugin --profile web add treg-dsh