How ivan-sergeyev/seymour works
Project type and purpose
• This is a formal-verification/math project written in Lean 4 whose goal is to verify Seymour’s decomposition theorem for regular matroids.
• Beyond the core proofs (under the Seymour/… tree), it includes a documentation “blueprint” (LaTeX + web), a small alternate blueprint, a Jekyll-based home page, build scripts, and CI workflows.
Main components
a. Source Code
• Lean 4 theorem files under Seymour/… and the root Seymour.lean entry point
• Blueprint generator sources under blueprint/src and blueprint_2
• Jekyll site under home_page/
• Utility scripts under scripts/
b. Build & Packaging
• Lake (lakefile.toml, lake-manifest.json, lean-toolchain) orchestrates compilation of Lean code and documentation
• Third‐party dependencies: Mathlib4, LeanProject template, leanblueprint, doc-gen4
c. Documentation Pipeline
• Lean code → doc-gen4 → generated HTML (dependency graph, API docs)
• Lean code → leanblueprint → LaTeX blueprint under blueprint/src → PDF + web version
• Alternate blueprint under blueprint_2 (static LaTeX → PDF)
• Jekyll (home_page/) pulls markdown, built assets, and hosts via GitHub Pages
d. Continuous Integration
• .github/workflows/build-project.yml: runs lake build, documentation generation, blueprint build
• .github/workflows/lint.yml: runs lake lint checks
• .github/workflows/update*.yml: automatic dependency updates
e. External Services
• GitHub (repo, Actions, Pages)
• Online references (Truemper monograph, Oxley text, etc.)
Relationships & Data Flow
• Developer pushes code → GitHub Actions triggers Lake build → Lean proofs check → doc-gen4 + leanblueprint run → artifacts (HTML, PDF) output
• Lake fetches Mathlib4 and other dependencies from GitHub
• Generated docs & site assets are deployed to GitHub Pages
• Scripts (update_mathlib, customize_template.py) modify local templates or update library versions
Architectural patterns & design principles
• Modular organization of proofs by topic (Basic, Matrix, Matroid)
• Documentation-as-code: proofs double as source for docs
• Static site generation (Jekyll) for landing page
• CI-driven pipeline combining build, lint, test, doc generation, and deployment