{"id":47300581,"url":"https://github.com/leanprover-community/LeanProject","last_synced_at":"2026-03-31T06:00:46.748Z","repository":{"id":250452904,"uuid":"834000323","full_name":"leanprover-community/LeanProject","owner":"leanprover-community","description":"A template for blueprint-driven formalization projects in Lean.","archived":false,"fork":false,"pushed_at":"2026-02-23T23:27:03.000Z","size":177,"stargazers_count":94,"open_issues_count":1,"forks_count":14,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-24T05:51:06.726Z","etag":null,"topics":["formal-mathematics","formalisation-mathematics","formalised-mathematics","lean-blueprint","lean-theorem-prover","lean4","leanblueprint","mathematical-programming","mathematics","proof-assistant","theorem-proving"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leanprover-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-26T08:02:47.000Z","updated_at":"2026-02-23T23:27:00.000Z","dependencies_parsed_at":"2024-11-08T16:21:00.739Z","dependency_job_id":"50bbef72-53f5-493b-b601-1a047fcf1e50","html_url":"https://github.com/leanprover-community/LeanProject","commit_stats":null,"previous_names":["pitmonticone/leanproject","leanprover-community/leanproject"],"tags_count":31,"template":true,"template_full_name":null,"purl":"pkg:github/leanprover-community/LeanProject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FLeanProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FLeanProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FLeanProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FLeanProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover-community","download_url":"https://codeload.github.com/leanprover-community/LeanProject/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FLeanProject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31223288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-31T04:08:55.938Z","status":"ssl_error","status_checked_at":"2026-03-31T04:08:47.883Z","response_time":111,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formal-mathematics","formalisation-mathematics","formalised-mathematics","lean-blueprint","lean-theorem-prover","lean4","leanblueprint","mathematical-programming","mathematics","proof-assistant","theorem-proving"],"created_at":"2026-03-17T01:38:19.987Z","updated_at":"2026-03-31T06:00:46.743Z","avatar_url":"https://github.com/leanprover-community.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Lean 4 Project Template\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-lightblue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Zulip : Topic](https://img.shields.io/badge/Zulip-Topic-%237E57C2.svg?logo=zulip\u0026logoColor=white)](https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/Tutorial.3A.20Getting.20Started.20with.20Blueprint-Driven.20Projects)\n[![YouTube : Tutorial](https://img.shields.io/badge/YouTube-Tutorial-%23FF0000.svg?logo=youtube\u0026logoColor=white)](https://youtu.be/KyuyTsLgkMY)\n\nThis repository contains a template for blueprint-driven formalization projects in Lean 4.\n\n## Install Lean 4\n\nEnsure that you have a functioning Lean 4 installation. If you do not, please follow\nthe [Lean installation guide](https://leanprover-community.github.io/get_started.html).\n\n## Use this Template\n\nTo create a new repository using this template, ensure you are on the correct repository page\n([LeanProject](https://github.com/leanprover-community/LeanProject)) and then follow these steps:\n\n1. Click the **Use this template** button located at the top right of the repository page.\n2. Click the **Create a new repository** button.\n3. Select the account or organization where you want to create it, choose a name for the new\nrepository, and click the **Create repository** button.\n\n## Clone this Repository\n\nTo clone this repository to your local machine, please refer to the relevant section of the\nGitHub documentation [here](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).\n\n## Customize this Template\n\nTo tailor this template to your specific project, follow these steps:\n\n1. If you don't have a Python environment, you can install one by following the instructions in the\n[Python installation guide](https://www.python.org/downloads/).\n1. Verify your Python installation by running:\n    ```bash\n    python3 --version\n    ```\n1. Verify your Pip installation by running:\n    ```bash\n    pip3 --version\n    ```\n1. Ensure your terminal is in the project directory by running the following command:\n    ```bash\n    cd path/to/your/project\n    ```\n1.\tExecute the customization script by running:\n    ```bash\n    scripts/customize_template.py NewProject\n    ```\n    where `NewProject` must be replaced by the name of your project.\n\nThe script [`customize_template.py`](scripts/customize_template.py) will automatically rename the\nproject folder and update the necessary files and configurations to match the new project name.\n\n## Configure GitHub Pages\n\nTo set up GitHub Pages for your repository, follow these steps:\n\n1. Go to the **Settings** tab of your repository.\n2. In the left sidebar, click on the **Pages** section.\n3. In the **Source** dropdown, select `GitHub Actions`.\n\nThe workflow [`deploy-pages.yml`](.github/workflows/deploy-pages.yml) builds the Jekyll site in\n[`website`](website), runs the\n[`upstreaming-dashboard-action`](https://github.com/leanprover-community/upstreaming-dashboard-action),\nand deploys the result to GitHub Pages.\n\n## Repository Layout\n\nThe template repository is organized as follows (listing the main folders and files):\n\n- [`.github`](.github) contains GitHub-specific configuration files and workflows.\n    - [`workflows`](.github/workflows) contains GitHub Actions workflow files.\n        - [`build-project.yml`](.github/workflows/build-project.yml) defines the workflow for building\n        the Lean project on pushes, pull requests, and manual triggers. This is a minimalistic build\n        workflow which is not necessary if you decide to generate a blueprint (see instructions below)\n        and can be manually disabled by clicking on the **Actions** tab, selecting **Build Project**\n        in the left sidebar, then clicking the horizontal triple dots (⋯) on the right,\n        and choosing **Disable workflow**.\n        - [`deploy-pages.yml`](.github/workflows/deploy-pages.yml) defines the workflow for building\n        and deploying the GitHub Pages site, including generation of the upstreaming dashboard.\n        - [`create-release.yml`](.github/workflows/create-release.yml): defines the workflow for creating a new Git tag and GitHub release when the `lean-toolchain` file is updated in the `main` branch. Ensure the following settings are configured under **Settings \u003e Actions \u003e General \u003e Workflow permissions**: \"Read and write permissions\" and \"Allow GitHub Actions to create and approve pull requests\".\n        - [`update.yml`](.github/workflows/update.yml) is the dependency\n        update workflow to be triggered manually by default. [It's not documented yet, but it will be soon.]\n    - [`dependabot.yml`](.github/dependabot.yml) is the configuration file to automate CI dependency updates.\n- [`.vscode`](.vscode) contains Visual Studio Code configuration files\n    - [`extensions.json`](.vscode/extensions.json) recommends VS Code extensions for the project.\n    - [`settings.json`](.vscode/settings.json) defines the project-specific settings for VS Code.\n- [`Project`](Project) should contain the Lean code files.\n    - [`Mathlib`](Project/Mathlib) should contain `.lean` files with declarations missing from the\n    current version of Mathlib.\n    - [`Example.lean`](Project/Example.lean) is a sample Lean file.\n- [`scripts`](scripts) contains scripts to update Mathlib ensuring that the latest version is\nfetched and integrated into the development environment.\n- [`website`](website) contains the Jekyll files for the GitHub Pages homepage that displays the\nupstreaming dashboard.\n- [`.gitignore`](.gitignore) specifies files and folders to be ignored by Git.\nand environment.\n- [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) should contain the code of conduct for the project.\n- [`CONTRIBUTING.md`](CONTRIBUTING.md) should provide the guidelines for contributing to the\nproject.\n- [`lakefile.toml`](lakefile.toml) is the configuration file for the Lake build system used in\nLean projects.\n- [`lean-toolchain`](lean-toolchain) specifies the Lean version and toolchain used for the project.\n\n## Blueprint\n\n### 0. Selected Collaborative Projects\n\n- [Fermat's Last Theorem for Exponent 3](https://pitmonticone.github.io/FLT3/) by Riccardo Brasca et al.\n- [Polynomial Freiman-Ruzsa Conjecture](https://github.com/teorth/pfr) by Terence Tao et al.\n- [Fermat's Last Theorem](https://imperialcollegelondon.github.io/FLT/) by Kevin Buzzard et al.\n- [Carleson Operators on Doubling Metric Measure Spaces](http://florisvandoorn.com/carleson/) by Floris van Doorn et al.\n- [Bonn Collaborative Formalization Seminar Series in Analysis](https://github.com/fpvandoorn/BonnAnalysis) by Floris van Doorn et al.\n- [Prime Number Theorem and More](https://github.com/AlexKontorovich/PrimeNumberTheoremAnd) by Alex Kontorovich et al.\n- [Infinity Cosmos](https://github.com/emilyriehl/infinity-cosmos) by Emily Riehl et al.\n- [Analytic Number Theory Exponent Database](https://github.com/teorth/expdb) by Terence Tao et al.\n- [Groupoid Model of Homotopy Type Theory](https://github.com/sinhp/GroupoidModelofHoTTinLean4) by Sina Hazratpour et al.\n- [Equational Theories](https://github.com/teorth/equational_theories) by Terence Tao et al.\n- [Sphere Packing in 8 Dimensions](https://github.com/thefundamentaltheor3m/Sphere-Packing-Lean) by Maryna Viazovska et al.\n\nFor more examples of completed and ongoing Lean projects and libraries, please\nsee the [Lean Reservoir](https://reservoir.lean-lang.org).\n\n### 1. Install Dependencies\n\nTo install the necessary dependencies, follow the instructions in the\n[PyGraphViz installation guide](https://pygraphviz.github.io/documentation/stable/install.html).\n\n### 2. Install LeanBlueprint Package\n\nAssuming you have a properly configured Python environment, install LeanBlueprint by running:\n\n```bash\npip install leanblueprint\n```\n\nIf you have an existing installation of LeanBlueprint, you can upgrade to the latest version by\nrunning:\n\n```bash\npip install -U leanblueprint\n```\n\n### 3. Configure Blueprint\n\nTo set up the blueprint for your project, run:\n\n```bash\nleanblueprint new\n```\n\nThen, follow the prompts and answer the questions as you like, except for a few specific\nquestions which should be answered as indicated below to ensure compatibility with this template.\n\nRespond affirmatively with `y` to the following prompt:\n\n```console\nProceed with blueprint creation? [y/n]\n```\n\nRespond affirmatively with `y` to the following prompt:\n\n```console\nModify lakefile and lake-manifest to allow checking declarations exist? [y/n] (y)\n```\n\nRespond negatively with `n` to the following prompt:\n\n```console\nModify lakefile and lake-manifest to allow building the documentation? [y/n] (y):\n```\n\nIf you want to generate a Jekyll-based home page for the project, respond\naffirmatively with `y` to the following prompt:\n\n```console\nDo you want to create a home page for the project, with links to the blueprint, the API documentation and the repository? [y/n]:\n```\n\nRespond affirmatively with `y` to the following prompt:\n\n```console\nConfigure continuous integration to compile blueprint? [y/n] (y):\n```\n\nFor more details about the LeanBlueprint package and its commands, please refer to its\n[documentation](https://github.com/PatrickMassot/leanblueprint/tree/master#starting-a-blueprint).\n\nAfter configuring the blueprint, please wait for the GitHub Action workflow to finish.\nYou can keep track of the progress in the **Actions** tab of your repository.\n\n## Selected Projects Using this Template\n\nIf you have used this template to create your own Lean project and would like to share it with the community, please consider opening a [PR](https://github.com/leanprover-community/LeanProject/pulls) to add your project to this list:\n\n- [Infinity Cosmos](https://github.com/emilyriehl/infinity-cosmos) by Emily Riehl et al.\n- [Analytic Number Theory Exponent Database](https://github.com/teorth/expdb) by Terence Tao et al.\n- [Equational Theories](https://github.com/teorth/equational_theories) by Terence Tao et al.\n- [Groupoid Model of Homotopy Type Theory](https://github.com/sinhp/GroupoidModelofHoTTinLean4) by Sina Hazratpour et al.\n- [Soundness of FRI](https://github.com/BoltonBailey/FRISoundness) by Bolton Bailey et al.\n- [Weil's Converse Theorem](https://github.com/CBirkbeck/WeilConverse) by Chris Birkbeck et al.\n- [Proofs from THE BOOK](https://github.com/mo271/FormalBook) by Moritz Firsching et al.\n- [Automata Theory](https://github.com/shetzl/autth) by Stefan Hetzl et al.\n- [Dirichlet Nonvanishing](https://github.com/CBirkbeck/DirichletNonvanishing) by Chris Birkbeck et al.\n- [Seymour's Decomposition Theorem](https://github.com/Ivan-Sergeyev/seymour) by Ivan Sergeyev et al.\n- [Spectral Theorem](https://github.com/oliver-butterley/SpectralThm) by Oliver Butterley and Yoh Tanimoto.\n- [NeuralNetworks](https://github.com/or4nge19/NeuralNetworks) by Matteo Cipollina.\n- [ABC Exceptions](https://github.com/b-mehta/ABC-Exceptions) by Bhavik Mehta et al.\n- [Sphere Packing in 8 Dimensions](https://github.com/thefundamentaltheor3m/Sphere-Packing-Lean) by Maryna Viazovska et al.\n- [LeanBridge](https://github.com/CBirkbeck/LeanBridge) by Chris Birkbeck et al.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover-community%2FLeanProject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover-community%2FLeanProject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover-community%2FLeanProject/lists"}