{"id":25211472,"url":"https://github.com/tarc/lean4-intro","last_synced_at":"2025-04-05T06:27:09.250Z","repository":{"id":275631819,"uuid":"926669431","full_name":"tarc/lean4-intro","owner":"tarc","description":"Lean 4 development setup","archived":false,"fork":false,"pushed_at":"2025-02-04T03:04:41.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T03:19:53.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-03T16:59:40.000Z","updated_at":"2025-02-04T03:04:44.000Z","dependencies_parsed_at":"2025-02-03T18:48:14.954Z","dependency_job_id":null,"html_url":"https://github.com/tarc/lean4-intro","commit_stats":null,"previous_names":["tarc/lean4-samples","tarc/lean4-intro"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarc%2Flean4-intro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarc%2Flean4-intro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarc%2Flean4-intro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarc%2Flean4-intro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarc","download_url":"https://codeload.github.com/tarc/lean4-intro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247298303,"owners_count":20916006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-02-10T14:15:44.756Z","updated_at":"2025-04-05T06:27:09.224Z","avatar_url":"https://github.com/tarc.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lean 4 \u0026mdash; an introduction\n\nDeveloping in Lean requires\u0026mdash;at a minimum\u0026mdash;these three command line tools:\n\n- [[Toolset/#elan|elan]] \u0026mdash; The Lean toolchain installer\n- [[Toolset/#lean|lean]] \u0026mdash; Lean's command line program\n- [[Toolset/#lake|lake]] \u0026mdash; Lake (Lean Make)\n\nSee [[Toolset]] for an overview of each one.\n\nIn the next sections we will see how to setup a local environment with all the required tools to start developing in Lean.\n\n\u003e [!NOTE]  \n\u003e Throughout this repository Lean 4 is the only version used\u0026mdash;any reference to Lean without saying which version is meant to be referring to Lean 4.\n\n## Setting up\n\nTwo options are covered here:\n\n- Use [VS Code][vscode] with the [Lean 4 extension][extension] to setup everything automatically.\n- Use `nix-direnv` to automatically build a `devShell` with all the required tools and configurations.\n\n\n## Lean setup\n\nIf you're on Nix, head to the [Development setup](#development-setup) session for a quick way to get a development shell fully configured with everything needed.\n\n\nStart from [the quickstart session][quickstart] of the [Lean 4 documentation site][docs].\n\nIn short:\n\n1. Install [VS Code][vscode]\n2. Install [Lean 4 extension][extension]\n\n\n## This repository\n\n### Requirements\n\n- [Nix][nix]\n- [`direnv`]\n- [VS Code][vscode]\n- VS Code's [Lean 4 extension][extension]\n\n### Development setup\n\n1. Clone this repository and enter on it:\n\n    ```shell\n    git clone --recursive https://github.com/tarc/lean4-intro\n    cd lean4-intro\n    ```\n\n1. For `direnv` to work it must be allowed to handle the shell environmen\u0026mdash;when get into the directory\n\n    ```no-lang\n    direnv: error $HOME/projects/lean4-intro/.envrc is blocked. Run `direnv allow` to approve its content\n    ```\n\n    Go ahead and allow `direnv` for the `lean4-intro` path:\n\n    ```shell\n    direnv allow\n    ```\n\n::: WARNING ::::\n\n    The previous command may This should get the `elan` package manager in your path:\n\n    ```shell\n    elan --version\n    \u003e elan 3.1.1\n    ```\n\n1. Build the [`mathematics_in_lean`] project (this is an external repository that it's added as a submodule of this one):\n\n    ```shell\n    cd mathematics_in_lean\n    lake exe cache get\n    lake exe mk_all \u0026\u0026 lake build\n    ```\n1. Start VS Code from this path:\n    ```shell\n    code .\n    ```\n\n[docs]: https://lean-lang.org/lean4/doc/whatIsLean.html\n[quickstart]: https://lean-lang.org/lean4/doc/quickstart.html\n[vscode]: https://lean-lang.org/lean4/doc/setup.html\n[extension]: https://marketplace.visualstudio.com/items?itemName=leanprover.lean4\n[nix]: https://nixos.org/\n[`direnv`]: https://direnv.net/\n[`mathematics_in_lean`]: https://github.com/leanprover-community/mathematics_in_lean","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarc%2Flean4-intro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarc%2Flean4-intro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarc%2Flean4-intro/lists"}