Equations
- Lean.Meta.getHygienicIntro = do let a ← Lean.getOptions pure (Lean.Option.get a Lean.Meta.tactic.hygienic)
def
Lean.Meta.introNCore
(mvarId : Lean.MVarId)
(n : Nat)
(givenNames : List Lean.Name)
(useNamesForExplicitOnly : Bool)
(preserveBinderNames : Bool)
:
Equations
- Lean.Meta.introNCore mvarId n givenNames useNamesForExplicitOnly preserveBinderNames = do let hygienic ← Lean.Meta.getHygienicIntro if (n == 0) = true then pure (#[], mvarId) else Lean.Meta.introNImp mvarId n (Lean.Meta.mkAuxNameImp preserveBinderNames hygienic useNamesForExplicitOnly) givenNames
@[inline]
abbrev
Lean.Meta.introN
(mvarId : Lean.MVarId)
(n : Nat)
(givenNames : optParam (List Lean.Name) [])
(useNamesForExplicitOnly : optParam Bool false)
:
Equations
- Lean.Meta.introN mvarId n givenNames useNamesForExplicitOnly = Lean.Meta.introNCore mvarId n givenNames useNamesForExplicitOnly false
@[inline]
Equations
- Lean.Meta.introNP mvarId n = Lean.Meta.introNCore mvarId n [] false true
Equations
- Lean.Meta.intro mvarId name = do let discr ← Lean.Meta.introN mvarId 1 [name] false let x : Array Lean.FVarId × Lean.MVarId := discr match x with | (fvarIds, mvarId) => pure (Array.get! fvarIds 0, mvarId)
Equations
- Lean.Meta.intro1Core mvarId preserveBinderNames = do let discr ← Lean.Meta.introNCore mvarId 1 [] false preserveBinderNames let x : Array Lean.FVarId × Lean.MVarId := discr match x with | (fvarIds, mvarId) => pure (Array.get! fvarIds 0, mvarId)
@[inline]
Equations
- Lean.Meta.intro1 mvarId = Lean.Meta.intro1Core mvarId false
@[inline]
Equations
- Lean.Meta.intro1P mvarId = Lean.Meta.intro1Core mvarId true
Equations
- Lean.Meta.intros mvarId = do let type ← Lean.Meta.getMVarType mvarId let type ← Lean.Meta.instantiateMVars type let n : Nat := Lean.Meta.getIntrosSize type if (n == 0) = true then pure (#[], mvarId) else Lean.Meta.introN mvarId n [] false