ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Util/SleepHeartbeats.lean

full_name: sleepAtLeastHeartbeats
code: /-- A low level command to sleep for at least a given number of heartbeats by running in a loop
until the desired number of heartbeats is hit.
Warning: this function relies on interpreter / compiler
behaviour that is not guaranteed to function in the way that is relied upon here.
As such this function is not to be considered reliable, especially after future updates to Lean.
This should be used with caution and basically only for demo / testing purposes
and not in compiled code without further testing. -/
def sleepAtLeastHeartbeats (n : Nat) : IO Unit 
goal: IO Unit

full_name: _aux_Mathlib_Util_SleepHeartbeats___elabRules_tacticSleep_heartbeats__1
code: /-- do nothing for at least n heartbeats -/
elab "sleep_heartbeats " n:num : tactic => do
  match Syntax.isNatLit? n with
  | none    => throwIllFormedSyntax
  /- as this is a user facing command we multiply the user input by 1000 to match the maxHeartbeats
     option -/
  | some m => sleepAtLeastHeartbeats (m * 1000)
goal: Lean.Elab.Tactic.Tactic

full_name: tacticSleep_heartbeats_
code: /-- do nothing for at least n heartbeats -/
elab "sleep_heartbeats " n:num : tactic => do
  match Syntax.isNatLit? n with
  | none    => throwIllFormedSyntax
  /- as this is a user facing command we multiply the user input by 1000 to match the maxHeartbeats
     option -/
  | some m => sleepAtLeastHeartbeats (m * 1000)
goal: Lean.ParserDescr
File: Mathlib/Util/AssertNoSorry.lean

full_name: commandAssert_no_sorry_
code: /-- Throws an error if the given identifier uses sorryAx. -/
elab "assert_no_sorry " n:ident : command => do
  let env ← Lean.getEnv
  let (_, s) := ((Lean.Elab.Command.CollectAxioms.collect
    (← liftCoreM <| Lean.Elab.realizeGlobalConstNoOverloadWithInfo n)).run env).run {}
  if s.axioms.contains ``sorryAx
  then throwError "{n} contains sorry"
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Util_AssertNoSorry___elabRules_commandAssert_no_sorry__1
code: /-- Throws an error if the given identifier uses sorryAx. -/
elab "assert_no_sorry " n:ident : command => do
  let env ← Lean.getEnv
  let (_, s) := ((Lean.Elab.Command.CollectAxioms.collect
    (← liftCoreM <| Lean.Elab.realizeGlobalConstNoOverloadWithInfo n)).run env).run {}
  if s.axioms.contains ``sorryAx
  then throwError "{n} contains sorry"
goal: Lean.Elab.Command.CommandElab
File: Mathlib/Util/FormatTable.lean

full_name: instInhabitedAlignment
code: /-- Possible alignment modes for each table item: left-aligned, right-aligned and centered. -/
inductive Alignment where
  | left
  | right
  | center
deriving Inhabited, BEq
goal: Inhabited Alignment

full_name: Alignment.center
code: /-- Possible alignment modes for each table item: left-aligned, right-aligned and centered. -/
inductive Alignment where
  | left
  | right
  | center
deriving Inhabited, BEq
goal: Alignment

full_name: Alignment.right
code: /-- Possible alignment modes for each table item: left-aligned, right-aligned and centered. -/
inductive Alignment where
  | left
  | right
  | center
deriving Inhabited, BEq
goal: Alignment

full_name: Alignment
code: /-- Possible alignment modes for each table item: left-aligned, right-aligned and centered. -/
inductive Alignment where
  | left
  | right
  | center
deriving Inhabited, BEq
goal: Type

full_name: Alignment.left
code: /-- Possible alignment modes for each table item: left-aligned, right-aligned and centered. -/
inductive Alignment where
  | left
  | right
  | center
deriving Inhabited, BEq
goal: Alignment

full_name: instBEqAlignment
code: BEq
goal: BEq Alignment

full_name: String.justify
code: /-- Align a `String` `s` to the left, right, or center within a field of width `width`. -/
def String.justify (s : String) (a : Alignment) (width : Nat) : String 
goal: String

full_name: formatTable
code: /--
Render a two-dimensional array of `String`s` into a markdown-compliant table.
`headers` is a list of column headers,
`table` is a 2D array of cell contents,
`alignments` describes how to align each table column (default: left-aligned) -/
def formatTable (headers : Array String) (table : Array (Array String))
    (alignments : Option (Array Alignment) := none) :
    String 
goal: String
File: Mathlib/Util/LongNames.lean

full_name: printNameHashMap
code: /-- Helper function for `#long_names` and `#long_instances`. -/
def printNameHashMap (h : Batteries.HashMap Name (Array Name)) : IO Unit 
goal: IO Unit

full_name: «command#long_names_»
code: /--
Lists all declarations with a long name, gathered according to the module they are defined in.
Use as `#long_names` or `#long_names 100` to specify the length.
-/
elab "#long_names " N:(num)? : command =>
  Command.runTermElabM fun _ => do
    let N := N.map TSyntax.getNat |>.getD 50
    let namesByModule ← allNamesByModule (fun n => n.toString.length > N)
    let namesByModule := namesByModule.filter fun m _ => m.getRoot.toString = "Mathlib"
    printNameHashMap namesByModule
goal: Lean.ParserDescr

full_name: «_aux_Mathlib_Util_LongNames___elabRules_command#long_names__1»
code: /--
Lists all declarations with a long name, gathered according to the module they are defined in.
Use as `#long_names` or `#long_names 100` to specify the length.
-/
elab "#long_names " N:(num)? : command =>
  Command.runTermElabM fun _ => do
    let N := N.map TSyntax.getNat |>.getD 50
    let namesByModule ← allNamesByModule (fun n => n.toString.length > N)
    let namesByModule := namesByModule.filter fun m _ => m.getRoot.toString = "Mathlib"
    printNameHashMap namesByModule
goal: Lean.Elab.Command.CommandElab

full_name: «command#long_instances_»
code: /--
Lists all instances with a long name beginning with `inst`,
gathered according to the module they are defined in.
This is useful for finding automatically named instances with absurd names.

Use as `#long_names` or `#long_names 100` to specify the length.
-/
elab "#long_instances " N:(num)?: command =>
  Command.runTermElabM fun _ => do
    let N := N.map TSyntax.getNat |>.getD 50
    let namesByModule ← allNamesByModule
      (fun n => n.lastComponentAsString.startsWith "inst" && n.lastComponentAsString.length > N)
    let namesByModule := namesByModule.filter fun m _ => m.getRoot.toString = "Mathlib"
    printNameHashMap namesByModule
goal: Lean.ParserDescr

full_name: «_aux_Mathlib_Util_LongNames___elabRules_command#long_instances__1»
code: /--
Lists all instances with a long name beginning with `inst`,
gathered according to the module they are defined in.
This is useful for finding automatically named instances with absurd names.

Use as `#long_names` or `#long_names 100` to specify the length.
-/
elab "#long_instances " N:(num)?: command =>
  Command.runTermElabM fun _ => do
    let N := N.map TSyntax.getNat |>.getD 50
    let namesByModule ← allNamesByModule
      (fun n => n.lastComponentAsString.startsWith "inst" && n.lastComponentAsString.length > N)
    let namesByModule := namesByModule.filter fun m _ => m.getRoot.toString = "Mathlib"
    printNameHashMap namesByModule
goal: Lean.Elab.Command.CommandElab
File: Mathlib/Lean/LocalContext.lean

full_name: Lean.LocalContext.firstDeclM
code: /-- Return the result of `f` on the first local declaration on which `f` succeeds. -/
@[specialize] def firstDeclM (lctx : LocalContext) (f : LocalDecl → m β) : m β 
goal: m β

full_name: Lean.LocalContext.lastDeclM
code: /-- Return the result of `f` on the last local declaration on which `f` succeeds. -/
@[specialize] def lastDeclM (lctx : LocalContext) (f : LocalDecl → m β) : m β 
goal: m β
File: Mathlib/Util/AtomM.lean

full_name: Mathlib.Tactic.AtomM.instInhabitedContext
code: /-- The context (read-only state) of the `AtomM` monad. -/
structure AtomM.Context :=
  /-- The reducibility setting for definitional equality of atoms -/
  red : TransparencyMode
  /-- A simplification to apply to atomic expressions when they are encountered,
  before interning them in the atom list. -/
  evalAtom : Expr → MetaM Simp.Result := fun e ↦ pure { expr := e }
  deriving Inhabited
goal: Inhabited Mathlib.Tactic.AtomM.Context

full_name: Mathlib.Tactic.AtomM.Context
code: /-- The context (read-only state) of the `AtomM` monad. -/
structure AtomM.Context :=
  /-- The reducibility setting for definitional equality of atoms -/
  red : TransparencyMode
  /-- A simplification to apply to atomic expressions when they are encountered,
  before interning them in the atom list. -/
  evalAtom : Expr → MetaM Simp.Result := fun e ↦ pure { expr := e }
  deriving Inhabited
goal: Type

full_name: Mathlib.Tactic.AtomM.Context.red
code: /-- The context (read-only state) of the `AtomM` monad. -/
structure AtomM.Context :=
  /-- The reducibility setting for definitional equality of atoms -/
  red : TransparencyMode
  /-- A simplification to apply to atomic expressions when they are encountered,
  before interning them in the atom list. -/
  evalAtom : Expr → MetaM Simp.Result := fun e ↦ pure { expr := e }
  deriving Inhabited
goal: Lean.Meta.TransparencyMode

full_name: Mathlib.Tactic.AtomM.Context.evalAtom
code: /-- The context (read-only state) of the `AtomM` monad. -/
structure AtomM.Context :=
  /-- The reducibility setting for definitional equality of atoms -/
  red : TransparencyMode
  /-- A simplification to apply to atomic expressions when they are encountered,
  before interning them in the atom list. -/
  evalAtom : Expr → MetaM Simp.Result := fun e ↦ pure { expr := e }
  deriving Inhabited
goal: Lean.Expr → Lean.MetaM Lean.Meta.Simp.Result

full_name: Mathlib.Tactic.AtomM.State.atoms
code: /-- The mutable state of the `AtomM` monad. -/
structure AtomM.State :=
  /-- The list of atoms-up-to-defeq encountered thus far, used for atom sorting. -/
  atoms : Array Expr := #[]
goal: Array Lean.Expr

full_name: Mathlib.Tactic.AtomM.State
code: /-- The mutable state of the `AtomM` monad. -/
structure AtomM.State :=
  /-- The list of atoms-up-to-defeq encountered thus far, used for atom sorting. -/
  atoms : Array Expr := #[]
goal: Type

full_name: Mathlib.Tactic.AtomM
code: /-- The monad that `ring` works in. This is only used for collecting atoms. -/
abbrev AtomM 
goal: Type

full_name: Mathlib.Tactic.AtomM.run
code: /-- Run a computation in the `AtomM` monad. -/
def AtomM.run {α : Type} (red : TransparencyMode) (m : AtomM α)
    (evalAtom : Expr → MetaM Simp.Result := fun e ↦ pure { expr := e }) :
    MetaM α 
goal: Lean.MetaM α

full_name: Mathlib.Tactic.AtomM.addAtom
code: /-- Get the index corresponding to an atomic expression, if it has already been encountered, or
put it in the list of atoms and return the new index, otherwise. -/
def AtomM.addAtom (e : Expr) : AtomM Nat 
goal: Mathlib.Tactic.AtomM Nat
File: Mathlib/Lean/Exception.lean

full_name: successIfFail
code: /--
A generalisation of `fail_if_success` to an arbitrary `MonadError`.
-/
def successIfFail {α : Type} {M : Type → Type} [MonadError M] [Monad M] (m : M α) :
    M Exception 
goal: M Lean.Exception

full_name: Lean.Exception.isFailedToSynthesize
code: /--
Check if an exception is a "failed to synthesize" exception.

These exceptions are raised in several different places,
and the only commonality is the prefix of the string, so that's what we look for.
-/
def isFailedToSynthesize (e : Exception) : IO Bool 
goal: IO Bool
File: Mathlib/Lean/Message.lean

full_name: instToMessageDataProd_mathlib
code: instance {α β : Type} [ToMessageData α] [ToMessageData β] : ToMessageData (α × β) 
goal: Lean.ToMessageData (α × β)
File: Mathlib/Lean/EnvExtension.lean

full_name: instInhabitedState_mathlib
code: instance {σ : Type} [Inhabited σ] : Inhabited (ScopedEnvExtension.State σ) 
goal: Inhabited (Lean.ScopedEnvExtension.State σ)
File: Mathlib/Lean/PrettyPrinter/Delaborator.lean

full_name: Lean.PrettyPrinter.Delaborator.withBindingBodyUnusedName'
code: /-- Assuming the current expression in a lambda or pi,
descend into the body using an unused name generated from the binder's name.
Provides `d` with both `Syntax` for the bound name as an identifier
as well as the fresh fvar for the bound variable.
See also `Lean.PrettyPrinter.Delaborator.withBindingBodyUnusedName`. -/
def withBindingBodyUnusedName' {α} (d : Syntax → Expr → DelabM α) : DelabM α 
goal: Lean.PrettyPrinter.Delaborator.DelabM α

full_name: Lean.PrettyPrinter.Delaborator.OptionsPerPos.setBool
code: /-- Update `OptionsPerPos` at the given position, setting the key `n`
to have the boolean value `v`. -/
def OptionsPerPos.setBool (opts : OptionsPerPos) (p : SubExpr.Pos) (n : Name) (v : Bool) :
    OptionsPerPos 
goal: Lean.PrettyPrinter.Delaborator.OptionsPerPos
File: Mathlib/Lean/Json.lean

full_name: Lean.instFromJsonPUnit_mathlib
code: FromJson
goal: Lean.FromJson PUnit

full_name: Lean.instToJsonPUnit_mathlib
code: ToJson
goal: Lean.ToJson PUnit

full_name: Lean.instFromJsonFin_mathlib
code: instance {n : Nat} : FromJson (Fin n) 
goal: Lean.FromJson (Fin n)

full_name: Lean.instToJsonFin_mathlib
code: instance {n : Nat} : ToJson (Fin n) 
goal: Lean.ToJson (Fin n)

full_name: Lean.instFromJsonSubtypeOfDecidablePred_mathlib
code: instance {α : Type u} [FromJson α] (p : α → Prop) [DecidablePred p] : FromJson (Subtype p) 
goal: Lean.FromJson (Subtype p)

full_name: Lean.instToJsonSubtype_mathlib
code: instance {α : Type u} [ToJson α] (p : α → Prop) : ToJson (Subtype p) 
goal: Lean.ToJson (Subtype p)
File: Mathlib/Util/WhatsNew.lean

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.throwUnknownId
code: private def throwUnknownId (id : Name) : CommandElabM Unit 
goal: Lean.Elab.Command.CommandElabM Unit

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.levelParamsToMessageData
code: private def levelParamsToMessageData (levelParams : List Name) : MessageData 
goal: Lean.MessageData

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.mkHeader
code: private def mkHeader (kind : String) (id : Name) (levelParams : List Name) (type : Expr)
    (safety : DefinitionSafety) : CoreM MessageData 
goal: Lean.CoreM Lean.MessageData

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.mkHeader'
code: private def mkHeader' (kind : String) (id : Name) (levelParams : List Name) (type : Expr)
    (isUnsafe : Bool) : CoreM MessageData 
goal: Lean.CoreM Lean.MessageData

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.printDefLike
code: private def printDefLike (kind : String) (id : Name) (levelParams : List Name) (type : Expr)
    (value : Expr) (safety := DefinitionSafety.safe) : CoreM MessageData 
goal: Lean.CoreM Lean.MessageData

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.printInduct
code: private def printInduct (id : Name) (levelParams : List Name) (_numParams : Nat) (_numIndices : Nat)
    (type : Expr) (ctors : List Name) (isUnsafe : Bool) : CoreM MessageData 
goal: Lean.CoreM Lean.MessageData

full_name: _private.Mathlib.Util.WhatsNew.0.Mathlib.WhatsNew.printIdCore
code: private def printIdCore (id : Name) : ConstantInfo → CoreM MessageData
  
goal: Lean.ConstantInfo → Lean.CoreM Lean.MessageData

full_name: Mathlib.WhatsNew.diffExtension
code: def diffExtension (old new : Environment)
    (ext : PersistentEnvExtension EnvExtensionEntry EnvExtensionEntry EnvExtensionState) :
    CoreM (Option MessageData) 
goal: Lean.CoreM (Option Lean.MessageData)

full_name: Mathlib.WhatsNew.whatsNew
code: def whatsNew (old new : Environment) : CoreM MessageData 
goal: Lean.CoreM Lean.MessageData

full_name: Mathlib.WhatsNew._aux_Mathlib_Util_WhatsNew___elabRules_Mathlib_WhatsNew_commandWhatsnewIn___1
code: /-- `whatsnew in $command` executes the command and then prints the
declarations that were added to the environment. -/
elab "whatsnew " "in" ppLine cmd:command : command => do
  let oldEnv ← getEnv
  try
    elabCommand cmd
  finally
    let newEnv ← getEnv
    logInfo (← liftCoreM <| whatsNew oldEnv newEnv)
goal: Lean.Elab.Command.CommandElab

full_name: Mathlib.WhatsNew.commandWhatsnewIn__
code: /-- `whatsnew in $command` executes the command and then prints the
declarations that were added to the environment. -/
elab "whatsnew " "in" ppLine cmd:command : command => do
  let oldEnv ← getEnv
  try
    elabCommand cmd
  finally
    let newEnv ← getEnv
    logInfo (← liftCoreM <| whatsNew oldEnv newEnv)
goal: Lean.ParserDescr
File: Mathlib/Lean/CoreM.lean

full_name: CoreM.withImportModules
code: /--
Run a `CoreM α` in a fresh `Environment` with specified `modules : List Name` imported.
-/
def CoreM.withImportModules {α : Type} (modules : Array Name) (run : CoreM α)
    (searchPath : Option SearchPath := none) (options : Options := {})
    (trustLevel : UInt32 := 0) (fileName := "") :
    IO α 
goal: IO α
File: Mathlib/Lean/Meta.lean

full_name: Lean.MVarId.let
code: /-- Add the hypothesis `h : t`, given `v : t`, and return the new `FVarId`. -/
def «let» (g : MVarId) (h : Name) (v : Expr) (t : Option Expr := .none) :
    MetaM (FVarId × MVarId) 
goal: Lean.MetaM (Lean.FVarId × Lean.MVarId)

full_name: Lean.MVarId.existsi
code: /-- Has the effect of `refine ⟨e₁,e₂,⋯, ?_⟩`.
-/
def existsi (mvar : MVarId) (es : List Expr) : MetaM MVarId 
goal: Lean.MetaM Lean.MVarId

full_name: Lean.MVarId.intros!
code: /-- Applies `intro` repeatedly until it fails. We use this instead of
`Lean.MVarId.intros` to allowing unfolding.
For example, if we want to do introductions for propositions like `¬p`,
the `¬` needs to be unfolded into `→ False`, and `intros` does not do such unfolding. -/
partial def intros! (mvarId : MVarId) : MetaM (Array FVarId × MVarId) 
goal: Lean.MetaM (Array Lean.FVarId × Lean.MVarId)

full_name: Lean.MVarId.intros!.run
code: /-- Applies `intro` repeatedly until it fails. We use this instead of
`Lean.MVarId.intros` to allowing unfolding.
For example, if we want to do introductions for propositions like `¬p`,
the `¬` needs to be unfolded into `→ False`, and `intros` does not do such unfolding. -/
partial def intros! (mvarId : MVarId) : MetaM (Array FVarId × MVarId) 
goal: Lean.MetaM (Array Lean.FVarId × Lean.MVarId)

full_name: Lean.MVarId.getType''
code: /-- Get the type the given metavariable after instantiating metavariables and cleaning up
annotations. -/
def _root_.Lean.MVarId.getType'' (mvarId : MVarId) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Lean.Elab.Tactic.liftMetaTactic'
code: /-- Analogue of `liftMetaTactic` for tactics that return a single goal. -/
-- I'd prefer to call that `liftMetaTactic1`,
-- but that is taken in core by a function that lifts a `tac : MVarId → MetaM (Option MVarId)`.
def liftMetaTactic' (tac : MVarId → MetaM MVarId) : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: _private.Mathlib.Lean.Meta.0.Lean.Elab.Tactic.TacticM.runCore
code: @[inline] private def TacticM.runCore (x : TacticM α) (ctx : Context) (s : State) :
    TermElabM (α × State) 
goal: Lean.Elab.TermElabM (α × Lean.Elab.Tactic.State)

full_name: _private.Mathlib.Lean.Meta.0.Lean.Elab.Tactic.TacticM.runCore'
code: @[inline] private def TacticM.runCore' (x : TacticM α) (ctx : Context) (s : State) : TermElabM α 
goal: Lean.Elab.TermElabM α

full_name: Lean.Elab.Tactic.run_for
code: /-- Copy of `Lean.Elab.Tactic.run` that can return a value. -/
-- We need this because Lean 4 core only provides `TacticM` functions for building simp contexts,
-- making it quite painful to call `simp` from `MetaM`.
def run_for (mvarId : MVarId) (x : TacticM α) : TermElabM (Option α × List MVarId) 
goal: Lean.Elab.TermElabM (Option α × List Lean.MVarId)
File: Mathlib/Lean/Expr/ReplaceRec.lean

full_name: Lean.Expr.replaceRec
code: /-- A version of `Expr.replace` where the replacement function is available to the function `f?`.

`replaceRec f? e` will call `f? r e` where `r = replaceRec f?`.
If `f? r e = none` then `r` will be called on each immediate subexpression of `e` and reassembled.
If it is `some x`, traversal terminates and `x` is returned.
If you wish to recursively replace things in the implementation of `f?`, you can apply `r`.

The function is also memoised, which means that if the
same expression (by reference) is encountered the cached replacement is used. -/
def replaceRec (f? : (Expr → Expr) → Expr → Option Expr) : Expr → Expr 
goal: Lean.Expr → Lean.Expr
File: Mathlib/Lean/Expr/ExtraRecognizers.lean

full_name: Lean.Expr.coeTypeSet?
code: /-- If `e` is a coercion of a set to a type, return the set.
Succeeds either for `Set.Elem s` terms or `{x // x ∈ s}` subtype terms. -/
def coeTypeSet? (e : Expr) : Option Expr 
goal: Option Lean.Expr
File: Mathlib/Lean/Name.lean

full_name: _private.Mathlib.Lean.Name.0.isBlackListed
code: private def isBlackListed (declName : Name) : CoreM Bool 
goal: Lean.CoreM Bool

full_name: allNames
code: /--
Retrieve all names in the environment satisfying a predicate.
-/
def allNames (p : Name → Bool) : CoreM (Array Name) 
goal: Lean.CoreM (Array Lean.Name)

full_name: allNamesByModule
code: /--
Retrieve all names in the environment satisfying a predicate,
gathered together into a `HashMap` according to the module they are defined in.
-/
def allNamesByModule (p : Name → Bool) : CoreM (Batteries.HashMap Name (Array Name)) 
goal: Lean.CoreM (Batteries.HashMap Lean.Name (Array Lean.Name))

full_name: Lean.Name.decapitalize
code: /-- Decapitalize the last component of a name. -/
def Lean.Name.decapitalize (n : Name) : Name 
goal: Lean.Name

full_name: Lean.Name.isAuxLemma
code: /-- Whether the lemma has a name of the form produced by `Lean.Meta.mkAuxLemma`. -/
def Lean.Name.isAuxLemma (n : Name) : Bool 
goal: Bool

full_name: Lean.Meta.unfoldAuxLemmas
code: /-- Unfold all lemmas created by `Lean.Meta.mkAuxLemma`.
The names of these lemmas end in `_auxLemma.nn` where `nn` is a number. -/
def Lean.Meta.unfoldAuxLemmas (e : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr
File: Mathlib/Lean/Thunk.lean

full_name: Thunk.get_pure
code: @[simp] theorem get_pure {α} (x : α) : (Thunk.pure x).get = x 
goal: (Thunk.pure x).get = x

full_name: Thunk.get_mk
code: @[simp] theorem get_mk {α} (f : Unit → α) : (Thunk.mk f).get = f () 
goal: { fn := f }.get = f ()

full_name: Thunk.instDecidableEq_mathlib
code: instance [DecidableEq α] : DecidableEq (Thunk α) 
goal: DecidableEq (Thunk α)

full_name: Thunk.prod
code: /-- The cartesian product of two thunks. -/
def prod (a : Thunk α) (b : Thunk β) : Thunk (α × β) 
goal: Thunk (α × β)

full_name: Thunk.prod_get_fst
code: @[simp] theorem prod_get_fst {a : Thunk α} {b : Thunk β} : (prod a b).get.1 = a.get 
goal: (a.prod b).get.fst = a.get

full_name: Thunk.prod_get_snd
code: @[simp] theorem prod_get_snd {a : Thunk α} {b : Thunk β} : (prod a b).get.2 = b.get 
goal: (a.prod b).get.snd = b.get

full_name: Thunk.add
code: /-- The sum of two thunks. -/
def add [Add α] (a b : Thunk α) : Thunk α 
goal: Thunk α

full_name: Thunk.instAdd_mathlib
code: instance [Add α] : Add (Thunk α) 
goal: Add (Thunk α)

full_name: Thunk.add_get
code: @[simp] theorem add_get [Add α] {a b : Thunk α} : (a + b).get = a.get + b.get 
goal: (a + b).get = a.get + b.get