chars int64 40 24k | content_type stringclasses 9
values | id stringlengths 13 64 | source stringclasses 5
values | subset stringclasses 31
values | text stringlengths 40 24k |
|---|---|---|---|---|---|
13,106 | lean_file_chunk | 7ab2687418b7010af3748e3c6029415a26bc53d548c2477fa03038bd122ad6c5 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
import Lean.Meta.Tactic.Refl
import Lean.Meta.Tactic.Assumption
import Lean.Meta.SameCtorUtils
import Init.Omeg... |
20,549 | lean_file_chunk | 46b051c357d79107e4ce24e16c0037b5455f62ffd04ca236da312eee41556a04 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.AddDecl
public import Lean.ReservedNameAction
import Lean.Structure
import Lean.Meta.Tactic.Subst
import Lean.Meta.FunInfo... |
3,830 | lean_file_chunk | 03051bed3f54a16430d48e340fff4be62b3a186488e9afa1d9c19170832b75a7 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.KAbstract
public import Lean.Meta.Check
public section
namespace Lean.Meta
namespace GeneralizeTelescope
structur... |
9,301 | lean_file_chunk | cdadb4a17b55ca31322de69fd3e9d435a1da138ba3cf20a972a524afb7d06129 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
import Init.While
public section
namespace Lean.Meta
/-!
Helper functions for recognizing builtin ... |
1,120 | lean_file_chunk | af5dd6bc2edddbd40a70c40fb293264090006ffc178f385acb4cc5cd5827be5b | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joachim Breitner
-/
module
prelude
public import Lean.Meta.Basic
import Lean.Meta.InferType
import Init.Omega
open Lean Meta
/-!
This module provides builder for efficient `Nat β β¦` ... |
21,930 | lean_file_chunk | c6c6b71776319e3052888c9464c99f5994dc8157e1c1d5ec197cd70eadfe63b2 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Data.LBool
public import Lean.Meta.Basic
import Init.Data.Range.Polymorphic.Iterators
public section
namespace Lean
/-... |
772 | lean_file_chunk | ae7cad9d22085bef294a01d6c0e530e38041852d8c67b7d4abf5312007773f37 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
public section
/-! # Helper methods for inductive datatypes -/
namespace Lean.Meta
/-- Return true if the ... |
12,240 | lean_file_chunk | 31e07203b38f7e11bd62a1d5a83f4e9802e29b5417e035c95cccfa288824f9e7 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.AppBuilder
import Lean.ExtraModUses
import Lean.Meta.WHNF
public section
namespace Lean.Meta
/--
Tags declarations to... |
11,511 | lean_file_chunk | 701041682e239e8cab76869cecc2dfb0dc2eb0f4a866242dbb173d20bdc2cfe9 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2026 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Authors: Eric Wieser, Kyle Miller, Jovan Gerbscheid, Kim Morrison, Sebastian Ullrich
-/
module
prelude
public import Lean.Meta.Closure
public import Lean.Meta.SynthInstance
public impo... |
23,967 | lean_file_chunk | 5529c9ca3d063e0d50e0518908e46bcd526c70c6886fa3569e834c04ec911c17 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.AddDecl
public import Lean.Meta.AppBuilder
public import Lean.DefEqAttrib
import Lean.Meta.WHNF
public section
namespace L... |
804 | lean_file_chunk | f9185e19a8f31521f3a7f1d1b9f7702fbcfcf0eaeeca9a871fba627ec1716805 | lean_source_file | lean_toolchain_source_file_chunks | name := instDeclName
levelParams := indInfo.levelParams
type := instDeclType
value := instDeclValue
safety := .safe
hints := .abbrev
}
... |
5,883 | lean_file_chunk | 89fb6b89d098662cc27f734f16b770afbd174df34eb458d4337eb95cb5445ec6 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
public section
namespace Lean.Meta
namespace AbstractMVars
structure State where
ngen : NameGen... |
23,979 | lean_file_chunk | 241499f7a71add113151716d9b44d8c175c2c2f100907206772835242a2e257c | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.SynthInstance
public import Lean.Meta.DecLevel
import Lean.Meta.CtorRecognizer
import Lean.Structure
import Init.Omeg... |
6,231 | lean_file_chunk | 38dbbb8df43be653ebfa7ceac854c07cbe0ffefdf6c98d3018169c70cd874766 | lean_source_file | lean_toolchain_source_file_chunks | /-- Returns `a <= b` -/
def mkLe (a b : Expr) : MetaM Expr :=
mkAppM ``LE.le #[a, b]
/-- Returns `Inhabited.default Ξ±` -/
def mkDefault (Ξ± : Expr) : MetaM Expr :=
mkAppOptM ``Inhabited.default #[Ξ±, none]
/-- Returns `@Classical.ofNonempty Ξ± _` -/
def mkOfNonempty (Ξ± : Expr) : MetaM Expr := do
mkAppOptM ``Classi... |
2,723 | lean_file_chunk | 11edbb31546cea8d865012d873cdf6d47868a9425f016b4dad12633bbe31394d | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
-/
module
prelude
public import Lean.HeadIndex
public import Lean.Meta.Basic
public section
namespace Lean.Meta
/--
Abstract occurrences of `p` in `e`. We d... |
20,558 | lean_file_chunk | f4c71763d9447674b7a48e4629e6a6b24a962c04448a84acbc5adb5e44487071 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Rotella
-/
module
prelude
public import Lean.Meta.TryThis
public import Lean.Util.Diff
public section
namespace Lean.Meta.Hint
open Elab Tactic PrettyPrinter TryThis
/--
A... |
480 | lean_file_chunk | 024b6bf1cc155fa639366c461e7d4a4381641a94de2c7fc0d967d2a720a78a33 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Match.MatchPatternAttr
public import Lean.Meta.Match.Match
public import Lean.Meta.Match.CaseValues
public import Le... |
6,255 | lean_file_chunk | de585bfd5d61a9b01fa077a45623c7e66283f9b9075f31450849d94765120d06 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.InferType
import Init.Data.Range.Polymorphic.Iterators
public section
namespace Lean.Meta
private structure FunIn... |
10,964 | lean_file_chunk | c13f835a762ec6642513c3e5849313b4a58e976a0cc9f7d68356c55fb9b80429 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Mario Carneiro, Thomas Murrills
-/
module
prelude
public import Lean.Data.Lsp.Basic
public import Lean.PrettyPrinter
public section
/-!
# "Try this" data types
This d... |
1,735 | lean_file_chunk | 48c6f3bc52a0c18859f8ffda0b4b26a6bed7301293c1e11bfa01f740b0b33ca1 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2024 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joe Hendrix
-/
module
prelude
public import Lean.Meta.Basic
public section
namespace Lean.Meta
/--
Provides an interface for iterating over values that are bundled with the `Meta` s... |
1,757 | lean_file_chunk | 1b2889b2ad58fe970bea14d9ad7176a7267b766cfc075ea20396a67b681468ac | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.FunInfo
import Init.Data.Range.Polymorphic.Iterators
public section
namespace Lean.Meta
partial def reduce (e : E... |
5,043 | lean_file_chunk | 66268dc42fb13f80ea5e40d0ff6ba338d76c958002c33f9743533fdacfa8d121 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
import Lean.PrettyPrinter
public section
namespace Lean.Meta
def collectAboveThreshold [BEq Ξ±]... |
355 | lean_file_chunk | 1ccd5211f347550d5eadd3fa142c50a51b123640898d8219b2fb2dd3ed9da60f | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jannis Limperg, Kim Morrison
-/
module
prelude
public import Lean.Meta.WHNF
public import Lean.Meta.DiscrTree.Basic
public import Lean.Meta.DiscrTree.Util
pub... |
5,309 | lean_file_chunk | 25708b971637cbcc393d668c6216b230afed3160f9eb8007fa03d7ef8f551276 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2026 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joachim Breitner
-/
module
prelude
public import Lean.Meta.AppBuilder
public section
namespace Lean.Meta
/--
Builds a proof of `String.ofList lβ β String.ofList lβ` for two distinct... |
5,549 | lean_file_chunk | d4c09384560e9d1a3849d1f73f9c23cde0ab23a70a6192de32841f32e4f707ca | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
import Init.Data.Range.Polymorphic.Iterators
public section
namespace Lean.Meta
variable {m} [Monad m] [Mon... |
3,192 | lean_file_chunk | ed5037ee7e7c76689c88db3bdc31e47a372b5c9b43c1fa30261695d3b40d3b94 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joachim Breitner
-/
module
prelude
public import Lean.Meta.Basic
import Lean.Util.CollectLevelParams
import Lean.Elab.DeclarationRange
import Lean.Compiler.Options
open Lean Meta
nam... |
2,058 | lean_file_chunk | d1e715973a8d79934d21e3d3c0ba8ec7cd826fdd0d313bed90658649476def54 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2023 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Match.MatcherInfo
public section
/-!
This exports a predicate for checking whether a name should be made
visible in auto-c... |
7,514 | lean_file_chunk | 632107759d0417f1b808ef6f31ea29eef080669456171016d4e55434e011fc4f | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Sym.AlphaShareBuilder
public import Lean.Meta.Sym.AlphaShareCommon
public import Lean.Meta.Sym.ExprPtr
p... |
2,149 | lean_file_chunk | def3007cf7d1bd35b719eeafdecebe504b9bede9918ccf25ff0237cbe2166edb | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Basic
public section
namespace Lean.Meta
/--
Implements the `TransparencyMode` hierarchy for unfolding decisions.
Se... |
1,750 | lean_file_chunk | 90e0e234efcadd4ae8f413981ce3aa11c368dc69e7c1cdfd7918aff7a4d434ba | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner
-/
module
prelude
public import Lean.Elab.Command
public section
namespace Lean.Elab.Command
open Lean.Parser.Command
open Lean.Parser.Term
/--
Declares an aux... |
2,628 | lean_file_chunk | 3d86e5a3908c5bdf6bf0a75446ad8cadf8d7a915bcee07b7f1f9660b5904fbdc | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Parser.Command
public section
namespace Lean.Elab
def getDeclarationRange? [Monad m] [MonadFileMap m] (stx : Syntax) :... |
23,991 | lean_file_chunk | 385ef6822292f9fe8e1526b05b41845d42149431350dbef74e02fe5549439255 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Structure
public import Lean.Elab.MutualInductive
import Init.Omega
public section
namespace Lean.Elab.Command
bu... |
23,978 | lean_file_chunk | 4cd0eecfe9e56e0fb7b433cbb48656f10e4dbfb1c541fc025c3acc4c3c6865ad | lean_source_file | lean_toolchain_source_file_chunks | | throwError "Internal error in addFieldInheritedDefault: Structure field `{fieldName}` does not already exist"
replaceFieldInfo { info with inheritedDefaults := info.inheritedDefaults.push (structName, d) }
/--
Reduces projections applied to constructors or parent fvars, for structure types that have appeared as pa... |
23,925 | lean_file_chunk | b28ab590283cf463eeacac29844af2eb2366eae136f4ecfad8e6f6bc2ca2555d | lean_source_file | lean_toolchain_source_file_chunks | let (type, paramInfoOverrides, numBinders) β elabFieldType structParams view
/-
Currently, having autoParams with binders is accepted for new fields.
This code is a possibility in case it should be an error.
(However, we could also arrange for the tactic to enter `numBinders` automatical... |
7,746 | lean_file_chunk | 39b6974c314ebea79ebea4dd252759a8af63628322c64afa0f5ceb59b635ebdc | lean_source_file | lean_toolchain_source_file_chunks | -- TODO(kmill): if it is a direct parent, try adding the coercion function from the environment and use that instead of `val`.
-- (This should be evaluated to see if it is a good idea.)
else
throwError m!"Internal error in mkRemainingProjections: `{field.name}` has no value"
let mut par... |
23,919 | lean_file_chunk | 517d1d8318e5b118709c82bd67aec106f58431d24e21630e47d7eab954d58858 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Gabriel Ebner
-/
module
prelude
public import Lean.Meta.Diagnostics
public import Lean.Elab.Binders
public import Lean.Elab.Command.Scope
public import Lean.... |
14,180 | lean_file_chunk | b6476a58aba98ff9e964381a71c2617b52ed72568b4591e85fb455916be7d128 | lean_source_file | lean_toolchain_source_file_chunks | In the current implementation, we call `withInitQuotContext` once in `elabCommandTopLevel` using the
source input of the command as the hint. This helps with keeping macro scopes stable on changes to
other parts of the file but not on changes to the command itself. Thus in each *declaration*
elaborator we call `withIni... |
23,976 | lean_file_chunk | 80ce747d2531ad2c72120364cd34327256ba70fd64b4246409213a3a150bdd9a | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Gabriel Ebner
-/
module
prelude
public import Lean.Compiler.ImplementedByAttr
public import Lean.Elab.Eval
public import Lean.Elab.Binders
public import Lean... |
2,075 | lean_file_chunk | f123f4deb129888f685ed6e9e433868bced1bb24edf24a188acaaa8b91262f14 | lean_source_file | lean_toolchain_source_file_chunks | let stWorld β mkAppM ``STWorld #[Ο, m]
discard <| mkInstMVar stWorld
mkAppM ``StateRefT' #[Ο, Ο, m]
@[builtin_term_elab noindex] def elabNoindex : TermElab := fun stx expectedType? => do
let e β elabTerm stx[1] expectedType?
return DiscrTree.mkNoindexAnnotation e
@[builtin_term_elab Β«unsafeΒ»]
def elabUnsafe :... |
23,984 | lean_file_chunk | 00f4f2b61ce5794019876f4a7c7b05e02ff002118bd9a0ad35d150fb133f2f9e | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Reduce
public import Lean.Elab.Eval
public import Lean.Elab.Command
public import Lean.Elab.Open
import Init.Data.Na... |
8,275 | lean_file_chunk | d914129b7591b3b26a1d875744dd4f3c1825457587b1d896f7ee65fbb9985216 | lean_source_file | lean_toolchain_source_file_chunks | addDeclarationRangesFromSyntax declName stx id
runTermElabM fun _ => addDocString declName (mkNullNode #[]) doc
| _ => throwUnsupportedSyntax
@[builtin_command_elab Lean.Parser.Command.include] def elabInclude : CommandElab
| `(Lean.Parser.Command.include| include $ids*) => do
let sc β getScope
let var... |
3,730 | lean_file_chunk | d4c72471f073296c65263cf511599f6e0195c7e4564baffb7aa5931ae2e80e61 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2026 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Wojciech RΓ³ΕΌowski
-/
module
prelude
public import Lean.EnvExtension
public import Lean.Message
import Lean.Elab.Term
public section
namespace Lean.Elab
open Meta
register_builtin_op... |
7,488 | lean_file_chunk | d1f2e3928e9e743aed3cd359dca5cf8ac7de80dd8e1f7f186cf227f26829f1b6 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.App
public section
namespace Lean.Elab.Term
open Meta
/--
Decompose `e` into `(r, a, b)`.
Remark: it assumes the... |
748 | lean_file_chunk | 1b1c6231d8ea2f3e32ae6329fe1394d4d4dcda190b32b8033b6cca17a134c0b1 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Term
public section
namespace Lean.Elab.Term
/-! This module assumes `match`-expressions use the following syntax... |
3,414 | lean_file_chunk | fcbcc52247408c62df2f1df845ad962268a78a8892e6fe903e10f513345a135d | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2024 Lean FRO. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joe Hendrix
-/
module
prelude
public import Lean.Elab.Tactic.ElabTerm
public import Lean.Elab.Command
public import Lean.Elab.Tactic.Meta
public import Lean.Meta.CheckTactic
public section... |
12,422 | lean_file_chunk | b05aa521d17706de94cfbfc57ad96f05545e79cf3b124692bd6ae39c13332236 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Eqns
public import Lean.Elab.Command
import Lean.PrettyPrinter.Delaborator.Builtins
public section
namespace Lean.Ela... |
636 | lean_file_chunk | 38d28ddd7c2cbd8337d7390ba83288e5508b11f7274135ffa875fbb623e91aef | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
module
prelude
public import Lean.Elab.Command
public section
/-!
# Defines `#time` command.
Time the elaboration of a command, and print the result (in milliseco... |
9,068 | lean_file_chunk | a5ceeeb07206c1183d63b0afc219c2f77efd2020087c0089dfa8ac4b62b7a498 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich, Mac Malone
-/
module
prelude
public import Lean.Parser.Module
public section
namespace Lean
namespace ParseImports
structure State wher... |
14,527 | lean_file_chunk | 9adbb89b2d9b5ea8712fa3bb36c471262940e742a6ee1fcfb2d0234066a8d951 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2024 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
module
prelude
public import Lean.Elab.MutualDef
import Lean.Compiler.Options
import Lean.Meta.Reduce
import all Lean.Elab.ErrorUtils
public section
/-!
# Implementati... |
6,476 | lean_file_chunk | 5762533512f0b087bbdb65a4aab92154e4e77371c862bcc437854f5716a00bbd | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Rotella
-/
module
prelude
public import Lean.Widget.UserWidget
meta import Lean.Widget.UserWidget
public section
namespace Lean.Elab.ErrorExplanation
open Meta Parser Term
-... |
8,259 | lean_file_chunk | 7237048f1522768cb4a25f38eeef213aa775f3fcbf49ca27dcd61d39b6f38df0 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Rotella
-/
module
prelude
public import Lean.Meta.Hint
import Init.Data.String.OrderInstances
public section
/-!
# Missing-field hints for structure instance elaborator
This... |
1,666 | lean_file_chunk | e15ae6caad9d0a895ade78e8b760fb02ae0ae196234dfaebf9eef901431b612b | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
module
prelude
import Lean.Elab.InfoTree.Main
namespace Lean
/--
Uses documentation from a specified declaration.
`@[inherit_doc decl]` is used to inherit ... |
10,817 | lean_file_chunk | af7bd541d25505bed0068d3d77afb98f51b4869013eb803b6fe7e56f4ad26966 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.Elab.DeclNameGen
public import Lean.Elab.DeclUtil
public section
namespace Lean.Elab
inductive DefKind... |
12,756 | lean_file_chunk | 4de7eb4aaffb70b0c3f1cf64943787dbd819ae384bc7f43fad02b5d73546043c | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.DocString.Add
meta import Lean.Parser.Command
public section
namespace Lean.Elab
/--
Ensure the env... |
578 | lean_file_chunk | 6353f3c8b267d3cd4683fd2834eb771b056e17c8c6b0dbd196e55382cb95522a | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Command
import Lean.Meta.Injective
import Lean.Meta.Constructions.CtorIdx
namespace Lean.Elab.Command
@[builtin_co... |
3,131 | lean_file_chunk | d5f6cb802afe9def7f94faccb3676360cf224308874fb806f1a320780609c450 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Parser.Term
meta import Lean.Parser.Term
meta import Lean.Parser.Do
import Init.Syntax
public section
/--
Determines th... |
3,179 | lean_file_chunk | 7b50e03fb757ac13afcdd130c27e47d6dc68b96feaf53fc226a633dbb9f56c18 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Exception
public section
namespace Lean.Elab
builtin_initialize postponeExceptionId : InternalExceptionId β registerIn... |
19,516 | lean_file_chunk | c2f3de669c855e195ffd7895613dafddf03c1b10f12b52bf226135f47db1458a | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Diagnostics
public import Lean.Meta.WrapInstance
public import Lean.Elab.Open
public import Lean.Elab.SetOption
publ... |
12,571 | lean_file_chunk | 8bc31dda111a645d40befc62a675e8d8d59d0e360c05496c391a025b35bba531 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2023 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
module
prelude
public import Lean.Elab.Notation
public import Lean.Server.CodeActions.Attr
public section
/-! `#guard_msgs` and `#guard_panic` commands for testing comma... |
10,504 | lean_file_chunk | 6fd75f87573c2ce5104b6bf6f95d3ca68b8a23143a21e7418a80376960a8062c | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner
-/
module
prelude
public import Lean.Meta.Constructions.CasesOn
public import Lean.Compiler.ImplementedByAttr
public import Lean.Elab.PreDefinition.WF.Eqns
import... |
4,378 | lean_file_chunk | 97861f5e8dd2130f552f3c07ff517b3df4bcd2e3abaab321d1fc005d85e0da12 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Hint
public section
/-! # Basic support for auto bound implicit local names -/
namespace Lean.Elab
register_buil... |
655 | lean_file_chunk | 58c4fa7668c43a0b4de4214e3ced97ee0b49eec201ee54c839b325d3d0137eea | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2022 Sebastian Ullrich. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Ullrich
-/
module
prelude
public import Lean.Meta.Eval
public import Lean.Elab.SyntheticMVars
public section
namespace Lean.Elab.Term
open Meta
unsafe def evalTerm (Ξ±)... |
11,128 | lean_file_chunk | b8179c85d86a48a4220c0437ba12d097ec35f4eeb8437238f2d68ffac6443024 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Parser.Extension
meta import Lean.Parser.Command
public import Lean.KeyedDeclsAttribute
import Lean.BuiltinDocAttr
public... |
4,237 | lean_file_chunk | 532b350140be548f8f53ebf3ba7812ab8d5b49e34b48c06f830b456bfcc3b107 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.Meta.Check
public import Lean.Parser.Command
public section
namespace Lean.Meta
def forallTelescope... |
23,958 | lean_file_chunk | 56e3655ea65fb35ba75e3e314b12d761370a9df569cd53391bdd30dc46611492 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Kyle Miller
-/
module
prelude
public import Lean.Meta.Structure
public import Lean.Elab.App
public import Lean.Elab.StructInstHint
public section
/-!
# Str... |
23,984 | lean_file_chunk | 71b3c55f0dfb3a7694160149007bdaa143d1e96f691dbc9e6ca74cd0c15480e1 | lean_source_file | lean_toolchain_source_file_chunks | let fieldNames := getStructureFieldsFlattened env structName false
for source in sources do
let sourceFieldNames := getStructureFieldsFlattened env source.structName false
for fieldName in sourceFieldNames do
if fieldNames.contains fieldName then
match fields.find? fieldName with
| none ... |
12,792 | lean_file_chunk | f1e43f85f14e7109575239d78e5cba5e02a8d0029b589e4dadd5e5b661e109c7 | lean_source_file | lean_toolchain_source_file_chunks | let autoParam? := fieldType.getAutoParamTactic?
let fieldType := fieldType.consumeTypeAnnotations
if binfo.isInstImplicit then
let e β addStructFieldMVar fieldName fieldType .synthetic
modify fun s => { s with instMVars := s.instMVars.push e.mvarId! }
loop
else if let some (.const tacticDe... |
748 | lean_file_chunk | 716f07dafeddcf80fd2b8a0c46d158a06fa9436105c6fe31f61ff9b8b1472eec | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
module
prelude
public import Lean.Elab.Command
public section
open Lean Elab Command
namespace Lean.Elab.Tactic.InfoTrees
@[builtin_command_elab infoTreesCmd, inher... |
8,994 | lean_file_chunk | 562f3bf773983bb22e7105eb66cabe91b3ba3fc50a556d089785914ee25846bc | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2022 Kim Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Patrick Massot, Kim Morrison, Damiano Testa
-/
module
prelude
public import Lean.Elab.Command
/-!
# Commands to assert and check the (non-)existence of declarations or imports
These c... |
2,151 | lean_file_chunk | d72d2c1cd5b815db29fb8d68d9616504b498ffef6076122b0e7987d753a18136 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Attributes
import Init.Syntax
public section
namespace Lean.Elab.Command
@[builtin_macro Lean.Parser.Command.mixf... |
2,496 | lean_file_chunk | 0d7bcc4994b259b79ca495386f4bd54efb62816106a287aeae5ba5f90ead0f2f | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Term
public section
namespace Lean.Elab.Term
/--
Auxiliary inductive datatype for combining unelaborated syntax
a... |
21,620 | lean_file_chunk | 859aaed190d1736020af96118296614e97fed3ac55abf26fd12294d38bddab32 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Command
public import Lean.Parser.Syntax
public meta import Lean.Parser.Syntax
import Init.Data.String.Modify
import... |
3,901 | lean_file_chunk | 20d15b783d24bf281204d8f24ff9c0f01204ed94255fd8823f2efb7442a6bc3d | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Syntax
public section
namespace Lean.Elab.Command
open Lean.Syntax
open Lean.Parser.Term hiding macroArg
open Lean... |
3,695 | lean_file_chunk | a5f6b34d8233daeb792cd39fedcec8ef7d1e35ca367be2569da7473e4a2f9684 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.Elab.Util
public import Lean.Compiler.InitAttr
import Lean.Parser.Term
public import Init.Data.Format.... |
291 | lean_file_chunk | 08412a8ab7dd1909be59e31458727a6a119ef2e04fed264b0c9af0ada799faa0 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Wojciech Nawrocki. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Wojciech Nawrocki, Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.Elab.InfoTree.Types
public import Lean.Elab.InfoTree.Main |
23,934 | lean_file_chunk | 83cc97e2849dfa167cfda226dce142b5c4987972b4f7ee5b8c4a552aa79ba3a8 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Ullrich
Elaboration of syntax quotations as terms and patterns (in `match_syntax`). See also `./Hygiene.lean` for the basic
hygiene workings and data types. -/
module... |
9,898 | lean_file_chunk | 015ad7ca4220fce75ddb8e45075f348491712db8b67b34f1365d9bb67b470089 | lean_source_file | lean_toolchain_source_file_chunks | -- such as `if` and `then` and would blow up the generated code.
-- See also `elabMatchSyntax` docstring below.
if quoted.isIdent || lit then
-- NOTE: We could make this case split more precise by refining `HeadCheck`,
-- but matching on literals is quite rare.
ot... |
23,998 | lean_file_chunk | 00865d9ed8dc939ddb7bd877540ec1b96b01376fab94d1f86a08191174f7ef81 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2024 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Kyle Miller
-/
module
prelude
public import Lean.Meta.Constructions
public import Lean.Meta.SizeOf
public import Lean.Meta.MkIffOfInductiveProp
public import Lean.El... |
23,995 | lean_file_chunk | 0186339b8fc6c61e1c7ded2870a18f4070278b27b2fc35ebcaaabe03be2f5ad8 | lean_source_file | lean_toolchain_source_file_chunks | If the parameter for an index does not appear in the correct position in a constructor for it to be
an inductive type parameter, it is not promoted.
That said, the `inductive` command itself has some capacity for reordering
in `Lean.Elab.Command.reorderCtorArgs`.
Promotion can be disabled with `set_option inductive.au... |
23,962 | lean_file_chunk | 20455816ce5276e3946909cff9552fc9d08e9cbf6008c4f0be8449584d631b92 | lean_source_file | lean_toolchain_source_file_chunks | let u β getResultingUniverse indTypes >>= instantiateLevelMVars
-- For `Prop` candidates, need to examine `u` itself, rather than `univForInfer` (which has been simplified).
if let Level.mvar mvarId := u.normalize then
if β isPropCandidate numParams indTypes indFVars then
-- May as well assign now, since ... |
18,416 | lean_file_chunk | 81d7b2ad283840899c7ad497a18a80562aa4cdf8715389f1f544fae44d1997c3 | lean_source_file | lean_toolchain_source_file_chunks | let indTypes β replaceIndFVarsWithConsts views newIndFVars levelParams numVars (numParams + views.size) indTypes (applyVariables := false)
let decl := Declaration.inductDecl levelParams (numParams + views.size) indTypes false
Term.ensureNoUnassignedMVars decl
addDecl decl
private structure AddAndFinalizeCo... |
525 | lean_file_chunk | 5154a549c4dbe84249cc1287923ca221022611400bdcd38f984d575ce455231f | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Graf
-/
module
prelude
public import Lean.Elab.BuiltinDo.Basic
public import Lean.Elab.BuiltinDo.Let
public import Lean.Elab.BuiltinDo.Match
public import Lean.Elab.BuiltinDo.... |
784 | lean_file_chunk | b90f254def5f538974748e3d196fa7cc40afe659e5647bf8373708c599f8bb2a | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Deriving.Basic
public import Lean.Elab.Deriving.Util
public import Lean.Elab.Deriving.Inhabited
public import Lean.E... |
7,042 | lean_file_chunk | aacc20f740d75c5479010c98ca1947edb2cecf0d598760d1b37b07b50d026d70 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.Syntax
public import Lean.Elab.AuxDef
public import Lean.Elab.BuiltinNotation
public section
namespace Lean.Elab.C... |
404 | lean_file_chunk | 480c8354eaae62472547e57d6b0a0dba44ad72d4a23e650b4bde422ef64fe714 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Graf
-/
module
prelude
public import Lean.Elab.Do.Basic
public import Lean.Elab.Do.InferControlInfo
public import Lean.Elab.Do.PatternVar
public import Lean... |
3,406 | lean_file_chunk | a99ec39e60323f023ae0411cc31292c1c94256b6f1af38774194082d7555f40e | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.AutoBound
public section
namespace Lean.Elab.Level
structure Context where
options : Options
ref ... |
2,197 | lean_file_chunk | 91c1802a801ff1b0fe0d2759aa67f43f3c7aee4129259d1003f81e9133b032b6 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.Elab.Tactic.Basic
public import Lean.Elab.Tactic.ElabTerm
public import Lean.Elab.Tactic.Induction
pub... |
5,879 | lean_file_chunk | 42bfa24fb1440066514fee913ddaa9ae3958c3c2ebd5c1fa421829e5f95597d8 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.MacroArgUtil
public import Lean.Elab.AuxDef
public import Lean.Elab.Do.Basic
public section
namespace Lean.Elab.Co... |
23,987 | lean_file_chunk | b6ffd3602c430ba4c9d19b90f805af76219b4d08051f421f5a73010575b2c91b | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Thrane Christiansen
-/
module
prelude
public import Lean.Elab.Term.TermElabM
public import Lean.Elab.Command.Scope
import Lean.DocString.Syntax
import Lean.BuiltinDocAttr
import I... |
23,958 | lean_file_chunk | c0af59dd157d0949ebb1e1301e07f2543e38b568afd077ead5d18dc8e201c33f | lean_source_file | lean_toolchain_source_file_chunks | /-- Environment extension for docstring roles -/
builtin_initialize docCodeBlockExt : SimpleScopedEnvExtension (Name Γ Name) (NameMap (Array Name)) β
registerSimpleScopedEnvExtension {
addEntry := fun xs (roleName, expander) => xs.alter roleName fun v? =>
v?.getD #[] |>.push expander
initial := {}
}
... |
18,244 | lean_file_chunk | fab933786a0ea502e71d148caf5a01c7ad051600b2d322ba22cefaeb20e874cb | lean_source_file | lean_toolchain_source_file_chunks | pure m!"\n\nHint: {hintTitle}\n{indentD <| m!"\n".joinSep edits.toList}"
def nameOrBuiltinName [Monad m] [MonadEnv m] (x : Name) : m Name := do
let env β getEnv
if env.contains x then return x
else return `Lean.Doc ++ x
/--
Finds registered expander names that `x` is a suffix of, for use in error message hints ... |
6,444 | lean_file_chunk | 6a1d28a87e3a1f026d38ff2dc1bf95afe4c8ee3787016f912ee3f3502020dec4 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Elab.MutualDef
public section
namespace Lean.Elab.Term
open Meta
structure LetRecDeclView where
ref : Synt... |
2,587 | lean_file_chunk | 4316d8d27e9073f0b48e6961e47cc585c35bf423d107cda03678628ad96c7d69 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Sebastian Ullrich
-/
module
prelude
public import Lean.Elab.DeclModifiers
public import Lean.Elab.Term.TermElabM
public section
namespace Lean.Elab
open M... |
1,452 | lean_file_chunk | 529a80bf13906b958abf56d79f523944d5fe1117a9568d548515187dc8240c86 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel
-/
module
prelude
public import Lean.Elab.Command
public section
namespace Lean.Elab.Term.Doc
open Lean.Parser.Term.Doc
open Lean.Elab.Command
open Lean.Parser.Command
... |
16,595 | lean_file_chunk | 99aac30b12a3bfee20a6e00474e841702eb8a99684065ac6fee239d761390abf | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Kyle Miller
-/
module
prelude
public import Lean.Elab.MutualInductive
public section
namespace Lean.Elab.Command
open Meta
/-
```
def Lean.Parser.Command.... |
22,007 | lean_file_chunk | 560c900c05b50fb984b1f8d1665af38fa7238bb032f42bc729506d25bc0ae002 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Wojciech RΓ³ΕΌowski
-/
module
prelude
public import Lean.Elab.PreDefinition.PartialFixpoint
public import Lean.Elab.Tactic.Rewrite
public import Lean.Meta.Tactic.Simp
public import Lea... |
23,883 | lean_file_chunk | 8e6226ba35dfa20a8b30aa886a376323c97d592012d191380a85f7bfb2d4ed47 | lean_source_file | lean_toolchain_source_file_chunks | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Tactic.ElimInfo
public import Lean.Elab.Binders
public import Lean.Elab.RecAppSyntax
public import Lean.IdentifierSu... |
23,990 | lean_file_chunk | 93d29683110c2b0f2805bcfba253c4c9ecaac7e2c401df3bef9a71084cde537e | lean_source_file | lean_toolchain_source_file_chunks | then, the method returns `true` because `Elem` is an output parameter for the local instance `[self : Get Cont Idx Elem]`.
Remark: if `resultIsOutParamSupport` is `false`, this method returns `false`.
-/
private partial def isNextOutParamOfLocalInstanceAndResult : M Bool := do
if !(β read).resultIsOutParamSupport ... |
23,979 | lean_file_chunk | cf4b1743edf736e3aeede30435401d7e5ed8266275b1200cc754c4958453cabe | lean_source_file | lean_toolchain_source_file_chunks | | throwError "failed to elaborate eliminator, insufficient number of arguments"
trace[Elab.app.elab_as_elim] "motive: {motive}"
forallTelescope (β get).fType fun xs fType => do
trace[Elab.app.elab_as_elim] "xs: {xs}"
let mut expectedType := (β read).expectedType
trace[Elab.app.elab_as_elim] "expectedTyp... |
23,971 | lean_file_chunk | 7ed7f0571202e3f1d838ef307b81c141d54a427f0a6c716d22de3f19eebc1318 | lean_source_file | lean_toolchain_source_file_chunks | /- If `eType` is still a metavariable application, we try to apply default instances to "unblock" it. -/
if (β isMVarApp eType) then
synthesizeSyntheticMVarsUsingDefault
let eType β instantiateMVars eType
try
let lvalRes β resolveLValAux e eType lval
return (e, lvalRes)
catch
| ex@(Exception.err... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.