{"id":13993047,"url":"https://github.com/leanprover-community/lean4-samples","last_synced_at":"2025-07-22T16:33:52.119Z","repository":{"id":39615136,"uuid":"452801263","full_name":"leanprover-community/lean4-samples","owner":"leanprover-community","description":"Code samples for Lean 4","archived":true,"fork":false,"pushed_at":"2023-10-19T07:01:06.000Z","size":1214,"stargazers_count":67,"open_issues_count":4,"forks_count":22,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-07-18T15:30:26.045Z","etag":null,"topics":["lean4"],"latest_commit_sha":null,"homepage":"","language":"Lean","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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-01-27T18:38:21.000Z","updated_at":"2024-05-27T09:27:21.000Z","dependencies_parsed_at":"2023-10-19T08:24:00.660Z","dependency_job_id":null,"html_url":"https://github.com/leanprover-community/lean4-samples","commit_stats":null,"previous_names":["leanprover-community/lean4-samples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2Flean4-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2Flean4-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2Flean4-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2Flean4-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover-community","download_url":"https://codeload.github.com/leanprover-community/lean4-samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214674840,"owners_count":15768057,"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":["lean4"],"created_at":"2024-08-09T14:02:12.852Z","updated_at":"2024-08-09T14:09:41.364Z","avatar_url":"https://github.com/leanprover-community.png","language":"Lean","funding_links":[],"categories":["Lean"],"sub_categories":[],"readme":"# Deprecated lean4-samples repository.\n\nThis repository was prepared during the early development of Lean, and is now deprecated and unmaintained.\n\nWe do not recommend using it as a source for examples or teaching materials. Please see\n\n* the Lean [language documentation](https://lean-lang.org/documentation/) and\n* the Lean [community webpage](https://leanprover-community.github.io/)\n\nfor getting started.\n\n## The future of this repo\n\nIf someone has a clear plan for this repository, and would like to take over maintainership and develop it into an up-to-date resource,\nplease contact us on [zulip](https://leanprover.zulipchat.com/).\n\n----\n\n# Old README contents\nCode samples for Lean 4.  These samples are designed to work inside Visual Studio Code with the\nLean4 \"extension\".  The extension will install the Lean4 compiler and language service for you so it\nis easy to setup - see the [Quick Start](https://leanprover.github.io/lean4/doc/quickstart.html) for\nmore information.\n\nCurrently each folder must be opened separately in Visual Studio Code for that sample to compile\ncorrectly since each folder contains a separate Lean Package that is buildable using `lake build`.\nLake is the build system that comes with Lean.\n\n## Get started\n\nIn order to run these samples you need a working Lean 4 environment.\nSee [Quickstart](https://leanprover.github.io/lean4/doc/quickstart.html)\ninstructions on how to set that up.\n\n## Use Gitpod\n\nYou can also use [Gitpod](https://www.gitpod.io/docs/) to browse these samples and it will setup a\nworking Lean 4 environment for you.  Start by pointing your browser at\n[https://gitpod.io/#https://github.com/leanprover/lean4-samples](https://gitpod.io/#https://github.com/leanprover/lean4-samples)\nthen when lean is installed use File/Open Folder... to open the sample that you want to play with.\n\nSee [Demo Video](https://youtu.be/_0QZXHoyZlA) showing how to do this.\n\n## Use Github Codespaces\n\nIf you have a Github Team or Enterprise account you can also play with these samples in a [Github Codespace](https://docs.github.com/en/codespaces).\n\n[![Open in GitHub Codespaces in West Europe](images/badge1.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=452801263\u0026machine=standardLinux32gb\u0026location=WestEurope)\n\n[![Open in GitHub Codespaces in West US](images/badge2.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=452801263\u0026machine=standardLinux32gb\u0026location=WestUs2)\n\nSee [Demo Video](https://youtu.be/NLdM1_2TrfE) showing how it works.\n\n## Hello world\n\nEvery language needs a [simple hello world sample](HelloWorld/README.md).\n\n## Guess My Number\n\nExplore more standard input processing with a [simple guess-my-number game](GuessMyNumber/README.md).\n\n## CSV Parser\n\n[CSV parser](CSVParser/README.md) is the simplest practical CSV parser you can write in Lean.\n\n## Rubik's cube\n\n[Rubik's cube](RubiksCube/README.md) is an example showing how to build custom [user widgets](https://leanprover.github.io/lean4/doc/examples/widgets.lean.html)\nfor the InfoView using TypeScript and Lake. Given a sequence of moves, it renders a Rubik's cube\nin 3D which can be animated with the movement of a slider.\n\n\n## List Comprehension using Syntax Extension\n\nExplore how you can extend the Lean syntax to implement the popular python-style\n[List Comprehension](ListComprehension/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover-community%2Flean4-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover-community%2Flean4-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover-community%2Flean4-samples/lists"}