.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.

2.1M
total files
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.

Attribution status

This extension is attributed to Lean; Lean 4 as primary by 4 authoritative claims.

Authoritative sources: ✓ Linguist ✓ Pygments ✗ Wikidata · no claim ✗ Wikipedia · no claim

Disagree or have a correction? Open a labelling issue.

Claimants (4)

Languages that list .lean among their extensions. Strength reflects whether the upstream source treated it as their primary extension.
LanguageSourceStrength
Leanlinguistprimary
Leanpygmentsprimary
Lean 4linguistprimary
Lean 4pygmentsprimary

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.
Right entry isn't listed? Add manually ↗
FormatClass (Wikidata P31)Suggested labelMIMENotesAction
Lean 3 file format Q130223835
file format
file format—text/x-lean; text/x-lean3—Use as new PL ↗
Lean 4 file format Q130224300
file format
file format—text/x-lean4—Use as new PL ↗
Lean file format family Q130225066
file format family
file format family———Use as new PL ↗

Disambiguation rules (2)

Linguist heuristics that decide, by content, which language a .lean file actually is.
RulePredictsKindPredicates (truncated)Measured on SWH
h/linguist/.lean/0Leanpredicates[{"kind": "any", "regexes": ["^import [a-z]"]}]
h/linguist/.lean/1Lean 4predicates[{"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
CvxLeanTest.lean · 52 B · seen 386× in SWH
predicted: Lean 4 via heuristic
swh:1:cnt:4304f49277615a8e932ae620b36a6df9250111d6;origin=https://github.com/verified-optimization/CvxLean;anchor=swh:1:rev:4d8c9ab20d101f9b4e7fb1ca9eaa95080fbfd448;path=/CvxLeanTest.lean
Open in SWH · Raw bytes
Request more SWH-mined examples
If the examples above don't disambiguate what .lean is, request a fresh mining run.
(or open the pre-filled issue directly)