FormalConjecturesUtil/Linters/CopyrightLinter.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
5 declarations, 0 contain sorry, 0 declared as axioms
The copyright linter
This file implements a linter that checks that every file in the project has the correct copyright header.
Imports (1)
Imported by 1 file
- def
CopyrightLinter.correctCopyrightPrefixThe part of the expected copyright before the year line 34 sourceSource documentation
The part of the expected copyright before the year.
no axioms what this means
Statement uses:
Stringdef correctCopyrightPrefix : String := …
- def
CopyrightLinter.correctCopyrightSuffixThe part of the expected copyright after the year line 39 sourceSource documentation
The part of the expected copyright after the year.
no axioms what this means
Statement uses:
Stringdef correctCopyrightSuffix : String := …
- def
CopyrightLinter.hasCorrectCopyrightCheck whether a file, given as aString, is prefixed with the correct copyright header line 56 sourceSource documentation
Check whether a file, given as a
String, is prefixed with the correct copyright header.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,BoolProof uses:
Id.run,Option,String.Slice,Id,String.dropPrefix?, CopyrightLinter.correctCopyrightPrefix,String.isPrefixOf, CopyrightLinter.correctCopyrightSuffix,String.Slice.extract,String.Slice.Pos.nextn,String.Slice.startPos,OfNat.ofNat,Nat,String.Slice.endPos,Bool.false3 instances, coercions and auxiliary constants left out.
def hasCorrectCopyright (file : String) : Bool := Id.run do …
- def
CopyrightLinter.correctCopyrightHeaderThe current correct copyright header line 61 sourceSource documentation
The current correct copyright header.
standard axioms: propext what this means
Statement uses:
StringProof uses:
HAppend.hAppend, CopyrightLinter.correctCopyrightPrefix, CopyrightLinter.correctCopyrightSuffix2 instances, coercions and auxiliary constants left out.
def correctCopyrightHeader : String := correctCopyrightPrefix ++ "2026" ++ correctCopyrightSuffix …
Mentions: CopyrightLinter.correctCopyrightPrefix, CopyrightLinter.correctCopyrightSuffix
- def
CopyrightLinter.copyrightLinterThe copyright linter ensures that every file has the right copyright header line 75 sourceSource documentation
The copyright linter ensures that every file has the right copyright header.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.Elab.Command.LinterProof uses:
Lean.Elab.Command.Linter.mk,Lean.withSetOptionIn,Lean.Syntax,Bind.bind,Lean.Elab.Command.CommandElabM,String,Unit,Lean.MonadLog.getFileName,ite,Eq,Bool,String.endsWith,Bool.true,Pure.pure,Lean.Elab.Command.Context,StateRefT',IO.RealWorld,Lean.Elab.Command.State,EIO,Lean.Exceptionand 24 more19 instances, coercions and auxiliary constants left out.
def copyrightLinter : Linter where run := withSetOptionIn fun stx ↦ do …