---
name: STEP 1064 REI-PROVE 5-prover ensemble FULL operational verified (LeanHammer + Vampire 真の動作確認)
description: ★★★★★ 2026-05-11 STEP 1064. (a) 公開 site verify + (b) LeanHammer enable (lake update + build + 真の by hammer 動作 = `apply mul_add` proof 生成成功) + (c) Vampire 5.0.1 既 install verify (Refutation 2.7s). REI-PROVE 全 prover 環境準備完了
type: project
originSessionId: 42f100d8-b702-4b4b-a14f-b23a9209d888
---
# STEP 1064 — REI-PROVE 5-prover ensemble FULL operational verified

**2026-05-11**: 藤本さん指示 (a) → (b) → (c) 順次完遂. STEP 1057-1063 で構造完成した REI-PROVE が **全 prover 真の動作確認**.

## 達成 sumamry

| Prover | 状態 | verify 結果 |
|---|---|---|
| **DeepSeek-Prover-V2-7B** (Stage 2 LLM) | ✅ Ollama 既 pull (4.2GB GGUF Q4_K_M) | STEP 1057: 31.7s/87 tokens/2.7 tok/s CPU |
| **Goedel-Prover-V2-8B** (Stage 2 LLM) | ✅ Ollama 既 pull (8.7GB) | STEP 1057 verify: 26.3s, 正しい `rfl` 出力 |
| **BFS-Prover** (Stage 2 LLM) | ✅ Ollama 既 pull (4.7GB) | STEP 1057 verify: 17.6s |
| **Vampire 5.0.1** (Stage 1 ATP) | ✅ /mnt/c/Users/user/vampire-5.0.1/vampire 既 install | STEP 1064 verify: trivial TPTP 2.7s Refutation ✅ |
| **LeanHammer (JOSHCLUNE)** (Stage 1 hammer) | ✅ STEP 1064 で lake update + build + import test | **真の `by hammer` で `apply mul_add` proof 生成成功** ✅ |

## (a) 公開 site verify

| Endpoint | 状態 |
|---|---|
| `/api/octatheoria?domain=lmfdb` | ✅ 200 OK / 5 obs |
| `/data/activity-log/latest.json` | ✅ STEP 1057 まで反映 (1898 commits) |
| `/data/site-stats.json` | ✅ commit `a457ea73` (STEP 1060) — STEP 1061-1063 backend tuning は visible 影響なし |
| `#/hyperv-status` / `#/snst-music` / `#/quantum-music` 等 | ✅ 全 active |

## (b) LeanHammer enable + 真の `by hammer` 動作確認

### 手順
1. `data/lean4-mathlib/lakefile.toml` の Hammer entry uncomment
2. `lake update Hammer` 実行 (Hammer + premise-selection cloned + Mathlib cache 7869 files restored, 194 sec)
3. `lake build Hammer` 実行 (1134 jobs, ~5-10 分 first build)
4. `lake env lean HammerImportTest.lean` で import 確認 (exit 0)
5. `lake env lean HammerRealCallTest.lean` で **真の `by hammer` invocation** 確認

### 結果

`HammerRealCallTest.lean`:
```lean
example (a b c : Nat) : a * (b + c) = a * b + a * c := by hammer
```

Output:
```
warning: Found 5533 unindexed premises in the environment, which exceeds the maximum
         number of new premises (2048). Discarding premises beyond this limit
Try this:
  [apply]   apply mul_add
exit=0
```

→ **LeanHammer 真の動作確認 ✅** (premise selection + Aesop + ATP pipeline で `apply mul_add` 発見).

### Files
- `data/lean4-mathlib/lakefile.toml` Hammer entry uncomment (commented → enabled)
- `data/lean4-mathlib/HammerImportTest.lean` (新規, import + trivial test)
- `data/lean4-mathlib/HammerRealCallTest.lean` (新規, 真の by hammer test)
- `data/lean4-mathlib/.lake/packages/Hammer/` (cloned + built)
- `data/lean4-mathlib/.lake/packages/premise-selection/` (LeanHammer dependency)

### Honest scope
- LeanHammer v4.27.0 = Lean 4.27.0 と互換 (Rei stack matching)
- premise selection 5533 unindexed premises warning (2048 limit) = paper level の deep premise indexing は別途 setup 必要
- 1 件 verify success (mul_add) = 他の non-trivial goal でも別途 test 推奨

## (c) Vampire WSL install verify

### 確認内容
- WSL Ubuntu-22.04 に **既 manual install 済**: `/mnt/c/Users/user/vampire-5.0.1/vampire`
- `detectVampire()`: `{ installed: true, version: '5.0.1', path: '...' }` ✅
- trivial TPTP `! [X] : X = X` → **Refutation found 2.7 sec** ✅

### STEP 1060 e2e Error 原因解明
- STEP 1060 で観測した「vampire 6.7s Error」 = **placeholder TPTP `$true` conjecture が原因**
- STEP 1058 leanToTptp() 置換後は **真の TPTP 翻訳** が渡される
- → STEP 1063 detection cache + leanToTptp 置換で **operational に変わっている**

### Files
- `scripts/verify-vampire-trivial.ts` (新規, trivial TPTP test, 2.7s Refutation 確認)

## REI-PROVE 5-prover ensemble 完成図 (STEP 1064 時点)

```
┌─────────────────────────────────────────────────────────────────┐
│ ensembleVote(goal, config) — REI-PROVE 5-prover cascade        │
├─────────────────────────────────────────────────────────────────┤
│ Stage 1 (classical, 30s budget):                                │
│   ├─ Vampire 5.0.1 ATP                                          │
│   │   └─ leanToTptp() (STEP 1058 minimum-viable, first-order)   │
│   │   └─ runVampire() WSL Ubuntu-22.04 + detectVampire() cache  │
│   │   └─ ✅ trivial TPTP 2.7s Refutation verified                │
│   └─ LeanHammer (Stage 1.5)                                     │
│       └─ STEP 1059 simulated 12-tactic chain                    │
│       └─ STEP 1062 真の `by hammer` (lakefile uncomment 後)     │
│       └─ ✅ STEP 1064: `by hammer` で `apply mul_add` proof 生成 │
│                                                                 │
│ Stage 2 (LLM ensemble, 120s budget):                            │
│   ├─ DeepSeek-Prover-V2-7B (Ollama GGUF Q4_K_M, 2.7 tok/s CPU) │
│   ├─ Goedel-Prover-V2-8B   (Ollama Q8_0, 1.1 tok/s CPU)        │
│   └─ BFS-Prover            (Ollama Q4_K_M, 0.4 tok/s CPU)      │
│       └─ STEP 1061 buildPrompt + extractTactic 改善             │
│                                                                 │
│ Voting algorithm: computeVoteScores (agreement-based)           │
│ Output: ProverAttempt[] → winningAttempt (first cascade pass)   │
└─────────────────────────────────────────────────────────────────┘
```

## 累計 effects

### 環境準備 完成
- ✅ Ollama 0.23.2 + 3 LLM provers
- ✅ Vampire 5.0.1 + WSL Ubuntu-22.04
- ✅ LeanHammer v4.27.0 + premise-selection + lake build (1134 jobs)
- ✅ Mathlib v4.27.0 cache (7869 files)
- ✅ lean-auto + Duper (STEP 1052 既統合)

### Code 完成 (STEP 1057-1064)
- ✅ Lean-to-TPTP translator (minimum viable, 23 test PASS)
- ✅ LeanHammer subprocess invocation (28 test PASS)
- ✅ ensemble-voter cascade (22 test PASS, structural)
- ✅ LLM prompt + extraction 改善 (22 test PASS)
- ✅ LeanHammer optional integration (12 test PASS)
- ✅ Vampire env detection + lake env health (22 test PASS)
- ✅ 累計 129+ test PASS

### honest 残課題
- LLM single-prover timeout 適化 (現状 120s budget で aborted, prompt 短縮 + early exit logic)
- ensemble cascade 1 件 e2e 真の prove (Vampire active + Goedel rfl + LeanHammer success の協調動作)
- premise selection 5533 → 2048 limit の indexing tuning
- 真の hammer + LLM proof voting algorithm 改善 (STEP 1061 extractTactic で foundation)

## 永続記録 (将来 session 用)

「REI-PROVE 5-prover ensemble は **環境準備完了** + **個別 prover 真の動作確認済**」 状態.
将来「REI-PROVE で proof 生成」 と言われたら本 record + Activity Log step1064 entry を確認.

## Files committed

### Repo
- data/lean4-mathlib/lakefile.toml (Hammer enable)
- data/lean4-mathlib/HammerImportTest.lean (新規)
- data/lean4-mathlib/HammerRealCallTest.lean (新規)
- scripts/verify-vampire-trivial.ts (新規)
- CLAUDE.md (STEP 1064 entry)

### Memory
- memory/project_step1064_rei_prove_full_operational.md (本 file)
- memory/MEMORY.md 上位 entry +1
