.lean

2 claimants 2 primary 0 secondary shared primary (2)

SWH popularity

From the SWH-MSR-ARV dataset (Desmazières, Di Cosmo, Lorentz, MSR 2025; file nb_extensions_alphanum.csv) — one row per (ext, year) in the full SWH archive. Case-aggregated. citation.

1.0M
total occurrences
286.1K
since 2019 (28.3%)
2007–2023
years active

Case variants in archive: .lean (1.0M), .Lean (55) — aggregated above.

Attribution status

This extension is attributed to Lean; Lean; Lean 4; 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 formattext/x-lean; text/x-lean3Use as new PL ↗
Lean 4 file format Q130224300
file format
file formattext/x-lean4Use as new PL ↗
Lean file format family Q130225066
file format family
file format familyUse as new PL ↗

Disambiguation rules (2)

Linguist heuristics that decide, by content, which language a .lean file actually is.
RulePredictsKindPredicates (truncated)
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. Useful for deciding what this extension actually is when the attribution is uncertain.
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)