Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringclasses
2 values
requests==2.32.3
tqdm==4.66.4

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

lean-llm-starter

A deterministic Lean 4 verification harness that treats the LLM as an untrusted proposal engine and Lean 4 as the trusted kernel.

Architecture

operator intent
  -> Prolog gate
  -> Granite 4.1 / Llemma inference
  -> schema validation
  -> Lean 4 parse / verify
  -> WORM-ready audit artifacts

Trust split:

  • inference/ proposes proof artifacts
  • logic/ blocks unauthorized or malformed runs
  • lean4/ type-checks and verifies
  • infra/verification-loop/ pins deterministic execution
  • eval/ runs reproducible local benchmarks

Repo Layout

lean-llm-starter/
β”œβ”€β”€ .github/workflows/ci.yml
β”œβ”€β”€ .gitattributes
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ Makefile
β”œβ”€β”€ README.md
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ HUGGINGFACE_PUBLISHING.md
β”‚   └── REPO_MAP.md
β”œβ”€β”€ eval/
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── run_minif2f.py
β”œβ”€β”€ fixtures/
β”‚   └── sample_input.jsonl
β”œβ”€β”€ inference/
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ prompt.txt
β”‚   └── server.py
β”œβ”€β”€ infra/
β”‚   └── verification-loop/
β”‚       β”œβ”€β”€ .env.example
β”‚       └── docker-compose.yml
β”œβ”€β”€ lean4/
β”‚   β”œβ”€β”€ lakefile.toml
β”‚   β”œβ”€β”€ lean-toolchain
β”‚   β”œβ”€β”€ MiniF2F.lean
β”‚   β”œβ”€β”€ VerifyMain.lean
β”‚   └── src/
β”‚       └── SovereignCorpus/
β”‚           β”œβ”€β”€ Bridge/
β”‚           β”‚   β”œβ”€β”€ Granite4Parser.lean
β”‚           β”‚   └── Granite4Schema.lean
β”‚           β”œβ”€β”€ Core.lean
β”‚           └── Tactics/
β”‚               └── PlasmaGate.lean
β”œβ”€β”€ logic/
β”‚   β”œβ”€β”€ sovereign_verification.pl
β”‚   └── verification_loop.pl
└── hf/
    └── README.md

What This Starter Includes

  • Lean 4 harness skeleton
  • Granite 4.1 JSON interchange schema
  • Lean-side parser scaffold
  • Prolog gate and retry loop scaffold
  • vLLM / docker compose verification loop
  • MiniF2F-style eval harness
  • GitHub Actions CI scaffold
  • Hugging Face publishing docs and model card template
  • sample JSONL parse fixture

What It Does Not Pretend Yet

  • not fully air-gapped out of the box
  • not fully air-gapped out of the box
  • not a finished proof search system
  • not yet shipping weights

Current verified state:

  • Lean 4 project builds successfully on this machine with C:\Users\jessi\.elan\bin\lake.exe
  • Python eval and inference files compile
  • parse-mode fixture is present

This is a scaffold you can harden into:

  • a GitHub repo
  • a Hugging Face model or Space companion repo
  • a deterministic local verification loop

Quick Start

If lake is not on your PATH on Windows, use:

C:\Users\jessi\.elan\bin\lake.exe

1. Lean side

cd lean4
C:\Users\jessi\.elan\bin\lake.exe update
C:\Users\jessi\.elan\bin\lake.exe build

2. Inference side

cd inference
docker build -t lean-llm-inference .
docker run -d -p 8080:8080 --name lean-llm-inference lean-llm-inference

3. Eval side

cd eval
pip install -r requirements.txt
python run_minif2f.py

4. Full verification loop

docker compose --env-file infra/verification-loop/.env.example up -d granite-verifier
swipl -g "verify_with_retries('theorem demo : True := by trivial', 'ED25519_SIG', 3, Result), writeln(Result), halt" logic/verification_loop.pl

5. Shortcut targets

make lean-build
make infra-up
make eval

6. Parse smoke test

cd lean4
C:\Users\jessi\.elan\bin\lake.exe exe verify -- --parse ../fixtures/sample_input.jsonl

Hugging Face Readiness

This repo is prepared for later Hugging Face publication with:

  • .gitattributes for LFS-managed weight files
  • hf/README.md model card template
  • docs/HUGGINGFACE_PUBLISHING.md publish checklist

Recommended publish modes:

  1. code-only harness repo
  2. model repo for GGUF / safetensors
  3. Space repo for interactive verify loop UI
Downloads last month
13