diff --git a/README.md b/README.md index 6b1e651e..96dba19c 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,26 @@
简体中文 · English
+English · 简体中文
人机协同的 Lean 4 数学研究工作台与模块化可编程运行时
+Open-Source Human-in-the-Loop Lean 4 Research Workbench & Modular Agent Runtime
- 由西湖大学
-
WestlakeNLP 实验室(自然语言处理实验室)开源研发
+ Developed at
+
WestlakeNLP
+ (Natural Language Processing Lab, Westlake University)
- ⭐ 点赞收藏 · - 演示视频 · - 在线工作台 · - 产品官网 · - 公开证明档案 · - 运行指南 · - 研究组件 (M1–M5) · - 引用本项目 + ⭐ Star · + 1-Min Film · + Proof Highlights · + 5-Cmd Replay · + Browse 29 Proofs · + Cloud Workbench · + M1–M5 Modules · + Cite
+
TheoremOS 官方演示视频(1:07 · 英文旁白与字幕) — 提出猜想 → 引理图谱与人机点拨 → 终端诊断 → 多学者协作 → M1–M5 开放架构 → S3 独立核验 → 公开档案与成功解答轨迹回溯 · 下载 1080p 高码率原片 (31 MB)
+TheoremOS Overview Film (1:07 · EN narration & subtitles) — Conjecture → Lean Lemma Graph & Guidance → CLI Replay → Co-Authorship → M1–M5 Harness → S3 Kernel Acceptance → Public Archives & Solved Proof Trajectory · Download full-bitrate 1080p master (31 MB)
+ +--- -### 核心亮点 +## Why TheoremOS? -| 网页工作台与人机协同 | 零信任独立 Lean 验收 (`S1` / `S3`) | M1–M5 可替换策略与实验对比 | +| Human-in-the-Loop Workbench | Zero-Trust Acceptance (`S1` / `S3`) | Replaceable M1–M5 Modules | | :--- | :--- | :--- | -| 内置 [`apps/web`](./apps/web/) 科研工作台,支持自然语言、TeX 与单文件 Lean 输入、后台语义审查、Codex 原生团队、可选的首轮路线审批与实时 Lean 反馈视图。 | 模型输出“已完成”或局部引理通过**从不替代最终验收**;[`evaluation.ts`](./src/solver/evaluation.ts) 固定完整原题与环境独立重验,[`archive.ts`](./src/solver/archive.ts) 完整保留每轮尝试、报错与用量以便断点续跑。 | 将证明构造、检查反馈、搜索调度、上下文筛选与协作分工拆分为 5 个带版本的 TypeScript 组件,历史对照消融实验可用各自固定的版本复现。 | +| Built-in [`apps/web`](./apps/web/) UI supporting natural language, TeX, or single-file Lean input, blind back-translation statement review, native Codex teams, optional initial route approval, and live Lean diagnostics. | A model claiming completion or passing local helper lemmas **never counts as theorem acceptance**; [`evaluation.ts`](./src/solver/evaluation.ts) re-verifies the frozen original problem cleanly, while [`archive.ts`](./src/solver/archive.ts) checkpoints every attempt for pause and resume. | Decouples proof construction, evidence checks, search scheduling, context assembly, and role assignment into 5 versioned TypeScript interfaces (`M1–M5`) so ablation runs stay reproducible on pinned revisions. | -| 仓库 | 定位与内容 | 许可证 | +| Repository | Role & Contents | License | | --- | --- | --- | -| [**HuggingMath/theorem-os**](https://github.com/HuggingMath/theorem-os)(本仓库) | 开源网页工作台、命令行工具(`bun run math`)、M1–M5 核心运行时与测试 | [`AGPL-3.0-only`](./LICENSE) | -| [**HuggingMath/TheoremOS**](https://github.com/HuggingMath/TheoremOS) | [产品官网](https://theoremos.top/)、29 条公开证明档案、Dimitrov 独立复核包与双语指南 | [Rights reserved](https://github.com/HuggingMath/TheoremOS/blob/main/LICENSE) | +| [**HuggingMath/theorem-os**](https://github.com/HuggingMath/theorem-os) *(main open-source repo)* | Web workbench (`apps/web`), CLI runner (`bun run math`), M1–M5 runtime, S1/S3 verifier & tests | [`AGPL-3.0-only`](./LICENSE) | +| [**HuggingMath/TheoremOS**](https://github.com/HuggingMath/TheoremOS) *(archive & site)* | [Product website](https://theoremos.top/en/), 29 archived proof records, Dimitrov proof kit & bilingual guides | [Rights reserved](https://github.com/HuggingMath/TheoremOS/blob/main/LICENSE) | --- -## 快速开始 + + +## Quick Start -| 你想做什么 | 推荐入口 | 需要准备 | +| What you want to do | Where to start | Requirements | | --- | --- | --- | -| **免密钥体验独立 Lean 验收闭环** | [小题示例与回放](./examples/getting-started/README.md) | Linux、Bun 1.2+、Lean 4.36.0(无需模型 API Key) | -| **使用在线云端工作台** | [在线工作台](https://app.theoremos.top/) · [申请内测](https://github.com/HuggingMath/TheoremOS/issues/new?template=early-access.yml) | 白名单邮箱与支持 Responses API 的模型 Key | -| **本地 Docker Compose 自部署网页工作台** | [工作台部署指南](./docs/web-workbench.md) · [`compose.yml`](./apps/web/compose.yml) | Linux、Docker Compose、`/dev/fuse`(完整 Mathlib 环境) | -| **替换 M1–M5 研究策略并跑基准对比** | [组件替换示例](./examples/components/README.md) · [IMO2026 示例](./examples/imo2026/README.md) | Codex CLI、Elan/Lean、Bubblewrap 与 FUSE | +| **Replay local Lean verification (no API key)** | [5-Command Replay below](#1-replay-preset-local-lean-verification-in-5-commands-zero-api-keys) · [Getting-Started](./examples/getting-started/README.md) | Linux, Bun 1.2+, Lean 4.36.0 (stdlib only; zero LLM calls) | +| **Browse 29 verified proofs & trajectories** | [Proof Archive (EN)](https://theoremos.top/en/archive.html) · [中文档案](https://theoremos.top/archive.html) | Browser only (no account required) | +| **Self-host the workbench via Docker Compose** | [Workbench Deployment Guide](./docs/web-workbench.md) · [`compose.yml`](./apps/web/compose.yml) | Linux, Docker Compose, `/dev/fuse` (full Mathlib image) | +| **Try the hosted cloud workbench** | [Cloud Workbench](https://app.theoremos.top/) · [Request Access](https://github.com/HuggingMath/TheoremOS/issues/new?template=early-access.yml) | Allowlisted email & Responses API key | +| **Swap M1–M5 research policies & benchmark** | [Component Example](./examples/components/README.md) · [IMO2026 Guide](./examples/imo2026/README.md) | Codex CLI, Elan/Lean, Bubblewrap & FUSE | -### 1. 五条命令本地体验预设验收回放(无需模型 API Key) +### 1. Replay Preset Local Lean Verification in 5 Commands (Zero API Keys) -从 GitHub 克隆后安装依赖并准备示例所需的 Lean 工具链(只需标准库,无需下载 Mathlib): +Run the standalone standard-library example on your host (no Mathlib download or LLM credentials needed): ```bash git clone https://github.com/HuggingMath/theorem-os.git && cd theorem-os @@ -85,21 +104,21 @@ bun run math example replay --dir "$THEOREMOS_REPLAY" bun run math inspect --run "$THEOREMOS_REPLAY/result.json" ``` -回放会在本机真实构建并运行宿主检查流程:先提交故意失败的候选并接收 Lean 报错,再用 `Nat.zero_add` 修复并由独立内核验收输出 `evaluated_passed`(`modelInvoked: false`、`official: false`)。准备好模型凭据后,可按 [运行指南](./docs/usage.md) 运行 `bun run math example prepare / check / resume`。 +The replay builds the pinned runtime, submits a deliberately failing candidate, inspects the Lean diagnostic, repairs it using `Nat.zero_add`, and runs independent whole-problem verification (`evaluated_passed`, `modelInvoked: false`, `official: false`). Once your model profile is ready, continue with `bun run math example prepare / check / resume` — see the [Usage Guide](./docs/usage.md).
-
+
|
-
+
|
| - 研究循环图谱 — M1–M5 决策边界与 S3 独立最终验收解耦(EN)。 + Modular Research Loop — Five swappable M1–M5 components separated from fixed S3 acceptance (中文图). | - Lean 实时工作区 — 按题隔离环境、依赖导入与编译器诊断一目了然(EN)。 + Live Lean Workspace — Per-task sealed environment, imports, and compiler diagnostics (中文截图). |
-
+
|
-
+
|
- 预设回放结果 — 无模型调用展示 evaluated_passed 与零 sorry 检查输出。
+ Preset Local Replay — Zero-model verification check showing evaluated_passed and zero sorry placeholders.
|
- 研究方案库 — 浏览器内保存、切换、导入或导出自定义研究配置(EN)。 + Strategy Plan Library — Save, switch, export, or import custom module configurations (中文截图). |
-
+
|
- TheoremOS 由西湖大学 WestlakeNLP 实验室(自然语言处理实验室,2018 年成立,由张岳教授领导)研发。实验室围绕自然语言处理、大模型推理与 AI for Science 开展基础与应用研究,致力于探索辅助自然科学与人文社科发现的智能系统。
+ TheoremOS is developed at WestlakeNLP, the Natural Language Processing Lab at Westlake University (founded in 2018 and led by Prof. Yue Zhang). The lab pursues fundamental and applied research in natural language processing, language-model reasoning, and AI for Science.
- 实验室官网:westlakenlp.com · - X (Twitter):@NlpWestlake · - 联系邮箱:liuzhenhao@westlake.edu.cn + Website: westlakenlp.com · + X (Twitter): @NlpWestlake · + Contact: liuzhenhao@westlake.edu.cn |
- ⭐ Star theorem-os · - ⭐ Star TheoremOS · - 体验在线工作台 · - 提交反馈 / Issue + ⭐ Star TheoremOS · + Browse 29 Proofs · + Launch Cloud Workbench · + Open an Issue
diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 00000000..ed2aa830 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,264 @@ +简体中文 · English
+人机协同的 Lean 4 数学研究工作台与模块化可编程运行时
+
+ 由西湖大学
+
WestlakeNLP 实验室(自然语言处理实验室)开源研发
+
+ ⭐ 点赞收藏 · + 演示视频 · + 在线工作台 · + 产品官网 · + 公开证明档案 · + 运行指南 · + 研究组件 (M1–M5) · + 引用本项目 +
+ +
+
+TheoremOS 官方演示视频(1:07 · 英文旁白与字幕) — 提出猜想 → 引理图谱与人机点拨 → 终端诊断 → 多学者协作 → M1–M5 开放架构 → S3 独立核验 → 公开档案与成功解答轨迹回溯 · 下载 1080p 高码率原片 (31 MB)
+ +### 核心亮点 + +| 网页工作台与人机协同 | 零信任独立 Lean 验收 (`S1` / `S3`) | M1–M5 可替换策略与实验对比 | +| :--- | :--- | :--- | +| 内置 [`apps/web`](./apps/web/) 科研工作台,支持自然语言、TeX 与单文件 Lean 输入、后台语义审查、Codex 原生团队、可选的首轮路线审批与实时 Lean 反馈视图。 | 模型输出“已完成”或局部引理通过**从不替代最终验收**;[`evaluation.ts`](./src/solver/evaluation.ts) 固定完整原题与环境独立重验,[`archive.ts`](./src/solver/archive.ts) 完整保留每轮尝试、报错与用量以便断点续跑。 | 将证明构造、检查反馈、搜索调度、上下文筛选与协作分工拆分为 5 个带版本的 TypeScript 组件,历史对照消融实验可用各自固定的版本复现。 | + +| 仓库 | 定位与内容 | 许可证 | +| --- | --- | --- | +| [**HuggingMath/theorem-os**](https://github.com/HuggingMath/theorem-os)(本仓库) | 开源网页工作台、命令行工具(`bun run math`)、M1–M5 核心运行时与测试 | [`AGPL-3.0-only`](./LICENSE) | +| [**HuggingMath/TheoremOS**](https://github.com/HuggingMath/TheoremOS) | [产品官网](https://theoremos.top/)、29 条公开证明档案、Dimitrov 独立复核包与双语指南 | [Rights reserved](https://github.com/HuggingMath/TheoremOS/blob/main/LICENSE) | + +--- + +## 快速开始 + +| 你想做什么 | 推荐入口 | 需要准备 | +| --- | --- | --- | +| **免密钥体验独立 Lean 验收闭环** | [小题示例与回放](./examples/getting-started/README.md) | Linux、Bun 1.2+、Lean 4.36.0(无需模型 API Key) | +| **使用在线云端工作台** | [在线工作台](https://app.theoremos.top/) · [申请内测](https://github.com/HuggingMath/TheoremOS/issues/new?template=early-access.yml) | 白名单邮箱与支持 Responses API 的模型 Key | +| **本地 Docker Compose 自部署网页工作台** | [工作台部署指南](./docs/web-workbench.md) · [`compose.yml`](./apps/web/compose.yml) | Linux、Docker Compose、`/dev/fuse`(完整 Mathlib 环境) | +| **替换 M1–M5 研究策略并跑基准对比** | [组件替换示例](./examples/components/README.md) · [IMO2026 示例](./examples/imo2026/README.md) | Codex CLI、Elan/Lean、Bubblewrap 与 FUSE | + +### 1. 五条命令本地体验预设验收回放(无需模型 API Key) + +从 GitHub 克隆后安装依赖并准备示例所需的 Lean 工具链(只需标准库,无需下载 Mathlib): + +```bash +git clone https://github.com/HuggingMath/theorem-os.git && cd theorem-os +bun install --frozen-lockfile +elan toolchain install leanprover/lean4:v4.36.0 + +export THEOREMOS_REPLAY="$PWD/../theorem-os-runs/first-replay" +bun run math doctor --lean-only +bun run math example replay --dir "$THEOREMOS_REPLAY" +bun run math inspect --run "$THEOREMOS_REPLAY/result.json" +``` + +回放会在本机真实构建并运行宿主检查流程:先提交故意失败的候选并接收 Lean 报错,再用 `Nat.zero_add` 修复并由独立内核验收输出 `evaluated_passed`(`modelInvoked: false`、`official: false`)。准备好模型凭据后,可按 [运行指南](./docs/usage.md) 运行 `bun run math example prepare / check / resume`。 + +
+
+ |
+
+
+ |
+
| + 研究循环图谱 — M1–M5 决策边界与 S3 独立最终验收解耦(EN)。 + | ++ Lean 实时工作区 — 按题隔离环境、依赖导入与编译器诊断一目了然(EN)。 + | +
+
+ |
+
+
+ |
+
+ 预设回放结果 — 无模型调用展示 evaluated_passed 与零 sorry 检查输出。
+ |
+ + 研究方案库 — 浏览器内保存、切换、导入或导出自定义研究配置(EN)。 + | +
+
+
+
+ |
+
+ TheoremOS 由西湖大学 WestlakeNLP 实验室(自然语言处理实验室,2018 年成立,由张岳教授领导)研发。实验室围绕自然语言处理、大模型推理与 AI for Science 开展基础与应用研究,致力于探索辅助自然科学与人文社科发现的智能系统。
+ + 实验室官网:westlakenlp.com · + X (Twitter):@NlpWestlake · + 联系邮箱:liuzhenhao@westlake.edu.cn + |
+
+ ⭐ Star theorem-os · + ⭐ Star TheoremOS · + 体验在线工作台 · + 提交反馈 / Issue +
diff --git a/README_EN.md b/README_EN.md deleted file mode 100644 index c7b03dd2..00000000 --- a/README_EN.md +++ /dev/null @@ -1,255 +0,0 @@ -English · 简体中文
-Open-Source Collaborative Lean 4 Mathematical Research Workbench & Modular Runtime
-
- Developed at
-
WestlakeNLP
- (Natural Language Processing Lab, Westlake University)
-
- ⭐ Star · - Overview Film · - Cloud Workbench · - Website · - Proof Archive Repo · - Usage Guide · - Modules (M1–M5) · - Cite -
- -
-
-TheoremOS Overview Film (1:07 · EN narration & subtitles) — Conjecture → Lean Lemma Graph & Guidance → CLI Replay → Co-Authorship → M1–M5 Harness → S3 Kernel Acceptance → Public Archives & Solved Proof Trajectory · Download full-bitrate 1080p master (31 MB)
- -### Why TheoremOS? - -| Web Workbench & Human Control | Zero-Trust Acceptance (`S1` / `S3`) | Replaceable M1–M5 Modules | -| :--- | :--- | :--- | -| Built-in [`apps/web`](./apps/web/) UI supporting natural language, TeX, or single-file Lean input, background semantic review, native Codex teams, optional initial route approval, and live Lean diagnostics. | A model claiming completion or local helper passes **never counts as theorem acceptance**; [`evaluation.ts`](./src/solver/evaluation.ts) re-verifies the frozen original problem cleanly, while [`archive.ts`](./src/solver/archive.ts) checkpoints every attempt for pause and resume. | Decouples proof construction, evidence checks, search scheduling, context assembly, and role assignment into versioned TypeScript interfaces used by past ablation studies. Use the pinned revision to reproduce a study. | - -| Repository | Scope & Contents | License | -| --- | --- | --- | -| [**HuggingMath/theorem-os**](https://github.com/HuggingMath/theorem-os) *(this repo)* | Open-source web workbench, CLI runner (`bun run math`), M1–M5 modules, and test suite | [`AGPL-3.0-only`](./LICENSE) | -| [**HuggingMath/TheoremOS**](https://github.com/HuggingMath/TheoremOS) | [Product website](https://theoremos.top/en/), 29 archived proof records, Dimitrov proof kit & bilingual guides | [Rights reserved](https://github.com/HuggingMath/TheoremOS/blob/main/LICENSE) | - ---- - -## Quick Start - -| What you want to do | Where to start | Requirements | -| --- | --- | --- | -| **Replay local Lean verification (no API key)** | [Getting-Started Example](./examples/getting-started/README.md) | Linux, Bun 1.2+, Lean 4.36.0 (stdlib only; zero LLM calls) | -| **Try the hosted cloud workbench** | [Cloud Workbench](https://app.theoremos.top/) · [Request Access](https://github.com/HuggingMath/TheoremOS/issues/new?template=early-access.yml) | Allowlisted email & Responses API key | -| **Self-host the workbench via Docker Compose** | [Workbench Deployment Guide](./docs/web-workbench.md) · [`compose.yml`](./apps/web/compose.yml) | Linux, Docker Compose, `/dev/fuse` (full Mathlib image) | -| **Swap M1–M5 research policies & benchmark** | [Component Example](./examples/components/README.md) · [IMO2026 Guide](./examples/imo2026/README.md) | Codex CLI, Elan/Lean, Bubblewrap & FUSE | - -### 1. Replay Preset Local Lean Verification in 5 Commands (Zero API Keys) - -Run the standalone standard-library example on your host (no Mathlib download or LLM credentials needed): - -```bash -git clone https://github.com/HuggingMath/theorem-os.git && cd theorem-os -bun install --frozen-lockfile -elan toolchain install leanprover/lean4:v4.36.0 - -export THEOREMOS_REPLAY="$PWD/../theorem-os-runs/first-replay" -bun run math doctor --lean-only -bun run math example replay --dir "$THEOREMOS_REPLAY" -bun run math inspect --run "$THEOREMOS_REPLAY/result.json" -``` - -The replay builds the pinned runtime, submits a deliberately failing candidate, inspects the Lean diagnostic, repairs it using `Nat.zero_add`, and runs independent whole-problem verification (`evaluated_passed`, `modelInvoked: false`, `official: false`). Once your model profile is ready, continue with `bun run math example prepare / check / resume` — see the [Usage Guide](./docs/usage.md). - -
-
- |
-
-
- |
-
| - Modular Research Loop — Five swappable M1–M5 components separated from fixed S3 acceptance (中文图). - | -- Live Lean Workspace — Per-task sealed environment, imports, and compiler diagnostics (中文截图). - | -
-
- |
-
-
- |
-
- Preset Local Replay — Zero-model verification check showing evaluated_passed and zero sorry placeholders.
- |
- - Strategy Plan Library — Save, switch, export, or import custom module configurations (中文截图). - | -
-
-
-
- |
-
- TheoremOS is developed at WestlakeNLP, the Natural Language Processing Lab at Westlake University (founded in 2018 and led by Prof. Yue Zhang). The lab pursues fundamental and applied research in natural language processing, language-model reasoning, and AI for Science.
- - Website: westlakenlp.com · - X (Twitter): @NlpWestlake · - Contact: liuzhenhao@westlake.edu.cn - |
-
- ⭐ Star theorem-os · - ⭐ Star TheoremOS · - Launch Cloud Workbench · - Open an Issue -