File: Mathlib/Tactic/Find.lean

full_name: _private.Mathlib.Tactic.Find.0.Mathlib.Tactic.Find.matchHyps
code: private partial def matchHyps : List Expr → List Expr → List Expr → MetaM Bool
  
goal: List Lean.Expr → List Lean.Expr → List Lean.Expr → Lean.MetaM Bool

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

full_name: Mathlib.Tactic.Find.findDeclsPerHead
code: initialize findDeclsPerHead : DeclCache (Lean.HashMap HeadIndex (Array Name)) ←
  DeclCache.mk "#find: init cache" failure {} fun _ c headMap ↦ do
    if (← isBlackListed c.name) then
      return headMap
    -- TODO: this should perhaps use `forallTelescopeReducing` instead,
    -- to avoid leaking metavariables.
    let (_, _, ty) ← forallMetaTelescopeReducing c.type
    let head := ty.toHeadIndex
    pure <| headMap.insert head (headMap.findD head #[] |>.push c.name)
goal: Batteries.Tactic.DeclCache (Lean.HashMap Lean.HeadIndex (Array Lean.Name))

full_name: Mathlib.Tactic.Find.initFn._@.Mathlib.Tactic.Find._hyg.271
code: initialize findDeclsPerHead : DeclCache (Lean.HashMap HeadIndex (Array Name)) ←
  DeclCache.mk "#find: init cache" failure {} fun _ c headMap ↦ do
    if (← isBlackListed c.name) then
      return headMap
    -- TODO: this should perhaps use `forallTelescopeReducing` instead,
    -- to avoid leaking metavariables.
    let (_, _, ty) ← forallMetaTelescopeReducing c.type
    let head := ty.toHeadIndex
    pure <| headMap.insert head (headMap.findD head #[] |>.push c.name)
goal: IO (Batteries.Tactic.DeclCache (Lean.HashMap Lean.HeadIndex (Array Lean.Name)))

full_name: Mathlib.Tactic.Find.findType
code: def findType (t : Expr) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Mathlib.Tactic.Find.«_aux_Mathlib_Tactic_Find___elabRules_Mathlib_Tactic_Find_command#find__1»
code: elab "#find " t:term : command =>
  liftTermElabM do
    let t ← Term.elabTerm t none
    Term.synthesizeSyntheticMVars (postpone := .no) (ignoreStuckTC := true)
    findType t
goal: Lean.Elab.Command.CommandElab

full_name: Mathlib.Tactic.Find.«command#find_»
code: elab "#find " t:term : command =>
  liftTermElabM do
    let t ← Term.elabTerm t none
    Term.synthesizeSyntheticMVars (postpone := .no) (ignoreStuckTC := true)
    findType t
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Find.tacticFind
code: elab "find" : tactic => do
  findType (← getMainTarget)
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Find._aux_Mathlib_Tactic_Find___elabRules_Mathlib_Tactic_Find_tacticFind_1
code: elab "find" : tactic => do
  findType (← getMainTarget)
goal: Lean.Elab.Tactic.Tactic

full_name: Mathlib.Tactic.Find.«tactic#find_»
code: elab "#find " t:term : tactic => do
  let t ← Term.elabTerm t none
  Term.synthesizeSyntheticMVars (postpone := .no) (ignoreStuckTC := true)
  findType t
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Find.«_aux_Mathlib_Tactic_Find___elabRules_Mathlib_Tactic_Find_tactic#find__1»
code: elab "#find " t:term : tactic => do
  let t ← Term.elabTerm t none
  Term.synthesizeSyntheticMVars (postpone := .no) (ignoreStuckTC := true)
  findType t
goal: Lean.Elab.Tactic.Tactic