{"id":44904276,"url":"https://github.com/leanprover-community/proofwidgets4","last_synced_at":"2026-04-02T12:34:38.801Z","repository":{"id":63303503,"uuid":"566256168","full_name":"leanprover-community/ProofWidgets4","owner":"leanprover-community","description":"Helper toolkit for creating your own Lean 4 UserWidgets","archived":false,"fork":false,"pushed_at":"2026-02-17T20:52:03.000Z","size":1295,"stargazers_count":182,"open_issues_count":14,"forks_count":43,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-18T01:35:10.284Z","etag":null,"topics":["lean","lean4","visualization"],"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,"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":"2022-11-15T09:42:25.000Z","updated_at":"2026-02-17T20:28:06.000Z","dependencies_parsed_at":"2023-02-17T22:01:06.011Z","dependency_job_id":"c1a3aaa4-11bc-476c-bc6c-b3b966f2b76a","html_url":"https://github.com/leanprover-community/ProofWidgets4","commit_stats":null,"previous_names":["leanprover-community/proofwidgets4","edayers/proofwidgets4"],"tags_count":137,"template":false,"template_full_name":null,"purl":"pkg:github/leanprover-community/ProofWidgets4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FProofWidgets4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FProofWidgets4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FProofWidgets4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FProofWidgets4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover-community","download_url":"https://codeload.github.com/leanprover-community/ProofWidgets4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover-community%2FProofWidgets4/sbom","scorecard":{"id":581973,"data":{"date":"2025-08-11","repo":{"name":"github.com/leanprover-community/ProofWidgets4","commit":"6e47cc88cfbf1601ab364e9a4de5f33f13401ff8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/15 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"29 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/leanprover-community/ProofWidgets4/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/leanprover-community/ProofWidgets4/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/leanprover-community/ProofWidgets4/build.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:48","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.71 not signed: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/240140790","Warn: release artifact v0.0.70 not signed: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/239884177","Warn: release artifact v0.0.69 not signed: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/239850225","Warn: release artifact v0.0.68 not signed: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/234747067","Warn: release artifact v0.0.67 not signed: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/229922179","Warn: release artifact v0.0.71 does not have provenance: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/240140790","Warn: release artifact v0.0.70 does not have provenance: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/239884177","Warn: release artifact v0.0.69 does not have provenance: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/239850225","Warn: release artifact v0.0.68 does not have provenance: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/234747067","Warn: release artifact v0.0.67 does not have provenance: https://api.github.com/repos/leanprover-community/ProofWidgets4/releases/229922179"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T19:24:58.039Z","repository_id":63303503,"created_at":"2025-08-20T19:24:58.039Z","updated_at":"2025-08-20T19:24:58.039Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29987656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"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":["lean","lean4","visualization"],"created_at":"2026-02-17T22:09:22.702Z","updated_at":"2026-04-02T12:34:38.795Z","avatar_url":"https://github.com/leanprover-community.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProofWidgets\n\nProofWidgets is a library of user interface components for [Lean 4](https://leanprover.github.io/). It\nsupports:\n- symbolic visualizations of mathematical objects and data structures\n- data visualization\n- interfaces for tactics and tactic modes\n- alternative and domain-specific goal state displays\n- user interfaces for entering expressions and editing proofs\n\nAuthors: Wojciech Nawrocki, E.W.Ayers with contributions from Tomáš Skřivan\n\n### How does ProofWidgets relate to user widgets?\n\nProofWidgets relies on the [user widgets](https://leanprover.github.io/lean4/doc/examples/widgets.lean.html)\nmechanism built into Lean. User widgets provide the minimum of functionality needed to enable\ncustom user interfaces. ProofWidgets builds on top of this with a higher-level component library,\nsyntax sugar, and user-friendly abstractions. Stable parts of ProofWidgets may eventually be\nbackported into Lean core, but ProofWidgets overall will remain a separate library\nfor the foreseeable future.\n\n## Usage\n\n### Viewing the demos\n\nTo get started, clone ProofWidgets and run `lake build`, as follows:\n\n```bash\ngit clone https://github.com/leanprover-community/ProofWidgets4 --depth 1\ncd ProofWidgets4/\nlake build\n```\n\nAfter doing this you will hopefully be able to view the demos in `ProofWidgets/Demos/`.\nTop tip: use the pushpin icon (![pin](https://raw.githubusercontent.com/microsoft/vscode-codicons/31b33da05aab662f1973ba5667dad672c8e20fbc/src/icons/pin.svg))\nto keep a widget in view. You can then live-code your widgets.\n\n### Using ProofWidgets as a dependency\n\nTo ensure ProofWidgets works with your version of the Lean toolchain,\nreference a **release tag** rather than the `main` branch.\nAdd the following to your `lakefile.lean`:\n\n```lean\n-- Replace v0.0.3 with a version published under Releases\nrequire \"leanprover-community\" / \"proofwidgets\" @ git \"v0.0.3\"\n```\n\n[Developing ProofWidgets](#developing-proofwidgets) involves building TypeScript code with NPM.\nWhen depending on `ProofWidgets` but not writing any custom TypeScript yourself,\nyou may want to spare yourself and your users from having to install and run NPM.\nThis repository contains pre-built JavaScript files (`widget/js/`)\nwhich will be reused as long as none of the sources have changed.\nConsequently, you and your users should not need to have NPM installed.\n\nHowever, in case there is a bug in the build process,\nProofWidgets may still revert to a full build.\nYou can force ProofWidgets to fail with a custom error instead by importing it like so:\n\n```lean\n-- Replace v0.0.3 with a version published under Releases\nrequire \"leanprover-community\" / \"proofwidgets\" @ git \"v0.0.3\"\n  with NameMap.empty.insert `errorOnBuild \"\u003cmy message\u003e\"\n```\n\n⚠️ [EXPERIMENTAL] To use ProofWidgets4 JS components in widgets defined in other Lean packages,\nimport [@leanprover-community/proofwidgets4](https://www.npmjs.com/package/@leanprover-community/proofwidgets4) from NPM.\n\n## Features\n\n![Red-black tree](doc/infoview-rbtree.png)\n\n### JSX-like syntax\n\n```lean\nimport ProofWidgets.Component.HtmlDisplay\nopen scoped ProofWidgets.Jsx\n\n-- click on the line below to see it in your infoview!\n#html \u003cb\u003eYou can use HTML in Lean {.text s!\"{1 + 3}\"}!\u003c/b\u003e\n```\n\nSee the `Jsx.lean` and `ExprPresentation.lean` demos.\n\n### Support for libraries\n\nWe have good support for building diagrams with [Penrose](https://penrose.cs.cmu.edu/), and expose\nsome [Recharts](https://recharts.org/en-US/) components for plotting functions and other kinds of\ndata. See the `Venn.lean` and `Plot.lean` demos.\n\nFor more purpose-specific integrations of libraries see the `Rubiks.lean` and `RbTree.lean` demos.\n\n### Custom `Expr` displays\n\nJust like delaborators and unexpanders allow you to customize how expressions are displayed as text,\nProofWidgets allows \"delaborating\" into (potentially interactive) HTML. See the\n`ExprPresentation.lean` demo.\n\n### Multi-stage interactions\n\nProof widgets can be used to create proving loops involving user interactions and running tactics\nin the background. See the `LazyComputation.lean` demo, and the `Conv.lean` demo for an example of\nediting the proof script.\n\n### Animated HTML\n\nAs a hidden feature, you can also make animated widgets using the `AnimatedHtml` component. This\nworks particularly well with libraries that ease between different plots, for example Recharts.\nYou can see an example of how to do this in the `Plot.lean` demo.\n\n## Developing ProofWidgets\n\n**Contributions are welcome!** Check out issues tagged with \"good first issue\".\n\nThe package consists of widget user interface modules written in TypeScript (under `widget/`),\nand Lean modules (under `ProofWidgets/`).\nTo build ProofWidgets from source,\nyou must have NPM (the [Node.js](https://nodejs.org/en) package manager) installed.\nDuring a build, we first compile the TypeScript widget code using NPM,\nand afterwards build all Lean modules.\nLean modules may use TypeScript compilation outputs.\nThe Lakefile handles all of this, so executing `lake build` should suffice to build the entire package.\nIn order to build only the TypeScript, run `lake build widgetJsAll`.\nWidgets can also be built in development mode using `lake build widgetJsAllDev`.\nThis makes them easier to inspect in developer tools.\n\nWe use the `include_str` term elaborator\nto splice the minified JavaScript\nproduced during the first part of the build (by `tsc` and Rollup)\ninto ProofWidgets Lean modules.\nThe minifed JS is stored in `widget/js/`.\nModifying any TypeScript source will trigger a rebuild,\nand should correctly propagate the new minified code\nto where it is used in Lean.\n\n⚠️ Note however that due to Lake issue [#86](https://github.com/leanprover/lake/issues/86),\n*all* the widget sources are rebuilt whenever any single one changes,\nwhich might take a while.\n\n## Cite\n\nWe have written [a paper describing the design of ProofWidgets4](https://drops.dagstuhl.de/opus/volltexte/2023/18399/).\n\nIf this work helps you in your own research, you can cite it as follows:\n```bibtex\n@InProceedings{nawrocki_et_al:LIPIcs.ITP.2023.24,\n  author =\t{Nawrocki, Wojciech and Ayers, Edward W. and Ebner, Gabriel},\n  title =\t{{An Extensible User Interface for Lean 4}},\n  booktitle =\t{14th International Conference on Interactive Theorem Proving (ITP 2023)},\n  pages =\t{24:1--24:20},\n  series =\t{Leibniz International Proceedings in Informatics (LIPIcs)},\n  ISBN =\t{978-3-95977-284-6},\n  ISSN =\t{1868-8969},\n  year =\t{2023},\n  volume =\t{268},\n  editor =\t{Naumowicz, Adam and Thiemann, Ren\\'{e}},\n  publisher =\t{Schloss Dagstuhl -- Leibniz-Zentrum f{\\\"u}r Informatik},\n  address =\t{Dagstuhl, Germany},\n  URL =\t\t{https://drops.dagstuhl.de/opus/volltexte/2023/18399},\n  URN =\t\t{urn:nbn:de:0030-drops-183991},\n  doi =\t\t{10.4230/LIPIcs.ITP.2023.24},\n  annote =\t{Keywords: user interfaces, human-computer interaction, Lean}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover-community%2Fproofwidgets4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover-community%2Fproofwidgets4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover-community%2Fproofwidgets4/lists"}