ProblemExtraction/Core.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 compfiles documentation, Pinned compfiles corpus index
19 declarations, 0 contain sorry, 0 declared as axioms
Core data structures and extraction functions used by the problem-extraction commands.
Imports (7)
Imported by 1 file
- structure
ProblemExtraction.Replacementline 21 sourceno axioms what this means
- inductive
ProblemExtraction.EntryVariantline 27 sourceno axioms what this means
- structure
ProblemExtraction.EntryAn entry in the state of the Problem Extraction environment extension line 38 sourceSource documentation
An entry in the state of the Problem Extraction environment extension
no axioms what this means
structure Entry where …
- abbrev
ProblemExtraction.ExtractionExtensionline 44 sourceno axioms what this means
Proof uses:
Lean.SimplePersistentEnvExtension, ProblemExtraction.Entry,Array - abbrev
ProblemExtraction.DetermineDeclsExtensionline 60 sourceno axioms what this means
Proof uses:
Lean.SimplePersistentEnvExtension,Lean.Name,Array - inductive
ProblemExtraction.ProblemTagline 69 sourceno axioms what this means
- def
ProblemExtraction.ProblemTag.toNatline 77 sourceno axioms what this means
Statement uses: ProblemExtraction.ProblemTag,
NatProof uses:
ProblemExtraction.ProblemTag.toNat.match_1,Unit,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- instance
ProblemExtraction.(instance at line 84)line 84 source - structure
ProblemExtraction.ProblemFileMetadataline 92 sourceno axioms what this means
- structure
ProblemExtraction.ProblemMetadataEntryline 115 sourceno axioms what this means
- abbrev
ProblemExtraction.ProblemMetadataExtensionline 119 sourceno axioms what this means
Proof uses:
Lean.SimplePersistentEnvExtension, ProblemExtraction.ProblemMetadataEntry,Array - def
ProblemExtraction.parseAuthorsline 129 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,ListProof uses:
Option.getD,Option.map,String.Slice,String.splitToList,String.Slice.toString,Char,Decidable.decide,Eq,Char.ofNat,Std.Iter.findSome?,Std.Iterators.Types.Map,String.Slice.SplitIterator,String.Slice.Pattern.ForwardSliceSearcher,String.toSlice,String.Slice.Subslice,Id,MonadLiftT.monadLift,Pure.pure,Std.Iterators.PostconditionT,String.Slice.Subslice.toSliceand 3 more13 instances, coercions and auxiliary constants left out.
- def
ProblemExtraction.parseCopyrightHeaderline 135 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
StringProof uses:
String.join,List.map,String.append,List.takeWhile,Bool.not,Bool.or,String.startsWith,String.splitOn1 instances, coercions and auxiliary constants left out.
- def
ProblemExtraction.findModuleImportsHelper function forextractFromExtline 144 sourceSource documentation
Helper function for
extractFromExt.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadError,Lean.Environment,Lean.Name,Array,Lean.ImportProof uses:
ProblemExtraction.findModuleImports.match_1,Option,Lean.ModuleIdx,Lean.Environment.getModuleIdx?,Pure.pure,Lean.ModuleData.imports,GetElem?.getElem!,Lean.ModuleData,LT.lt,Nat,Lean.ModuleIdx.toNat,Array.size,Lean.EnvironmentHeader.moduleData,Lean.Environment.header,Unit,Lean.throwError,Function.comp,String,Std.Format,Lean.MessageDataand 4 more10 instances, coercions and auxiliary constants left out.
def findModuleImports {m : Type → Type} [Monad m] [MonadError m] (env : Environment) (md : Name) : m (Array Import) := … - def
ProblemExtraction.getDeclsInPackageGets the declarations that originate in modules beneathpackageline 152 sourceSource documentation
Gets the declarations that originate in modules beneath
package.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.Name,Lean.Core.CoreM,ArrayProof uses:
Bind.bind,Lean.Environment,Lean.MonadEnv.getEnv,Prod,Lean.ConstantInfo,Lean.PersistentHashMap.toArray,Lean.SMap.map₂,Lean.Environment.constants,Bool,Array.map,Lean.Name.isPrefixOf,Lean.EnvironmentHeader.moduleNames,Lean.Environment.header,Pure.pure,Lean.Core.Context,StateRefT',IO.RealWorld,Lean.Core.State,EIO,Lean.Exceptionand 14 more17 instances, coercions and auxiliary constants left out.
def getDeclsInPackage (package : Name) : CoreM (Array Name) := do …
- def
ProblemExtraction.extractFromExtline 158 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadEnv,Lean.MonadError, ProblemExtraction.ExtractionExtension,Lean.NameMap,StringProof uses:
Bind.bind,Lean.Environment,Lean.MonadEnv.getEnv,Array, ProblemExtraction.Entry,Lean.SimplePersistentEnvExtension.getState,Lean.EnvExtension.asyncMode,Lean.PersistentEnvExtensionState,Prod,List,Lean.PersistentEnvExtension.toEnvExtension,Lean.Name.anonymous,String.Pos.Raw,Lean.mkNameMap,ForIn.forIn,inferInstance,Membership,ProblemExtraction.extractFromExt.match_3,ForInStep,Lean.Nameand 28 more16 instances, coercions and auxiliary constants left out.
- def
ProblemExtraction.extractProblemsUsing the data in the problem extraction environment extension, constructs a map from module name to problem source code line 203 sourceSource documentation
Using the data in the problem extraction environment extension, constructs a map from module name to problem source code.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadEnv,Lean.MonadError,Lean.NameMap,StringProof uses: ProblemExtraction.extractFromExt,
ProblemExtraction.problemExtractionExtensiondef extractProblems {m : Type → Type} [Monad m] [MonadEnv m] [MonadError m] : m (NameMap String) := … - def
ProblemExtraction.extractSolutionsUsing the data in the solution extraction environment extension, constructs a map from module name to solution source code line 211 sourceSource documentation
Using the data in the solution extraction environment extension, constructs a map from module name to solution source code.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadEnv,Lean.MonadError,Lean.NameMap,StringProof uses: ProblemExtraction.extractFromExt,
ProblemExtraction.solutionExtractionExtensiondef extractSolutions {m : Type → Type} [Monad m] [MonadEnv m] [MonadError m] : m (NameMap String) := … - def
ProblemExtraction.extractMetadataUsing the data in the solution extraction environment extension, constructs a map from module name to problem metadata line 219 sourceSource documentation
Using the data in the solution extraction environment extension, constructs a map from module name to problem metadata
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadEnv,Lean.MonadError,Lean.NameMap, ProblemExtraction.ProblemFileMetadataProof uses:
Bind.bind,Lean.Environment,Lean.MonadEnv.getEnv,Array, ProblemExtraction.ProblemMetadataEntry,Lean.SimplePersistentEnvExtension.getState,ProblemExtraction.problemMetadataExtension,Lean.EnvExtension.asyncMode,Lean.PersistentEnvExtensionState,Prod,List,Lean.PersistentEnvExtension.toEnvExtension,Lean.Name.anonymous,Lean.mkNameMap,ForIn.forIn,inferInstance,Membership,ProblemExtraction.extractMetadata.match_1,ForInStep,Lean.Nameand 3 more7 instances, coercions and auxiliary constants left out.
def extractMetadata {m : Type → Type} [Monad m] [MonadEnv m] [MonadError m] : m (NameMap ProblemFileMetadata) := do …Mentions: ProblemExtraction.ProblemFileMetadata