.lean
2 claimants
2 primary
0 secondary
shared primary (2)
SWH popularity
Distinct files in the full Software Heritage archive (2026-06-04 export), dated by first appearance, following Desmazières, Di Cosmo, Lorentz (MSR 2025). Case-aggregated. citation.
1.7M
first seen 2021–2025 (80.9%)
2023
median year (half its files since)
Case variants in archive: .lean (2.1M), .Lean (158) — aggregated above.
Claimants (4)
Languages that list .lean among their extensions. Strength reflects whether the upstream source treated it as their primary extension.
| Language | Source | Strength |
| Lean | linguist | primary |
| Lean | pygments | primary |
| Lean 4 | linguist | primary |
| Lean 4 | pygments | primary |
Wikidata says… (3)
File formats, image formats, audio codecs and other non-PL
entities that claim .lean on Wikidata
(property P1195) or in the Wikipedia infobox.
Source: data/derived/external_extension_index.csv.
Click Use as new PL on any row to open the
Add-PL form pre-filled with that entry's name, Wikipedia/Wikidata
URL, and this extension — one submission creates the PL + claim.
Disambiguation rules (2)
Linguist heuristics that decide, by content, which language a .lean file actually is.
| Rule | Predicts | Kind | Predicates (truncated) | Measured on SWH |
h/linguist/.lean/0 | Lean | predicates | [{"kind": "any", "regexes": ["^import [a-z]"]}] | |
h/linguist/.lean/1 | Lean 4 | predicates | [{"kind": "any", "regexes": ["^import [A-Z]"]}] | |
SWH-mined examples (1)
Real archived programs with this extension, byte-verified against the SWH archive, grouped by predicted language and by how the prediction was made. Useful for deciding what this extension actually is when the attribution is uncertain.
Lean 4 (1) — 1 via Linguist heuristic
swh:1:cnt:4304f49277615a8e932ae620b36a6df9250111d6;origin=https://github.com/verified-optimization/CvxLean;anchor=swh:1:rev:4d8c9ab20d101f9b4e7fb1ca9eaa95080fbfd448;path=/CvxLeanTest.lean