Documentation

Lean.Meta.Tactic.Intro

Similar to mkFreshUserName, but takes into account tactic.hygienic option value. If tactic.hygienic = true, then the current macro scopes are applied to binderName. If not, then an unused (accessible) name (based on binderName) in the local context is used.

Equations
  • One or more equations did not get rendered due to their size.
def Lean.Meta.introNCore (mvarId : Lean.MVarId) (n : Nat) (givenNames : List Lake.Name) (useNamesForExplicitOnly : Bool) (preserveBinderNames : Bool) :
Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]
abbrev Lean.MVarId.introN (mvarId : Lean.MVarId) (n : Nat) (givenNames : optParam (List Lake.Name) []) (useNamesForExplicitOnly : optParam Bool false) :

Introduce n binders in the goal mvarId.

Equations
@[reducible, inline, deprecated Lean.MVarId.introN]
abbrev Lean.Meta.introN (mvarId : Lean.MVarId) (n : Nat) (givenNames : optParam (List Lake.Name) []) (useNamesForExplicitOnly : optParam Bool false) :
Equations
  • Lean.Meta.introN mvarId n givenNames useNamesForExplicitOnly = mvarId.introN n givenNames useNamesForExplicitOnly
@[reducible, inline]

Introduce n binders in the goal mvarId. The new hypotheses are named using the binder names. The suffix P stands for "preserving`.

Equations
@[reducible, inline, deprecated Lean.MVarId.introNP]
Equations

Introduce one binder using name as the the new hypothesis name.

Equations
  • mvarId.intro name = do let __discrmvarId.introN 1 [name] match __discr with | (fvarIds, mvarId) => pure (fvarIds[0]!, mvarId)
@[deprecated Lean.MVarId.intro]
Equations
def Lean.Meta.intro1Core (mvarId : Lean.MVarId) (preserveBinderNames : Bool) :
Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]

Introduce one object from the goal mvarid, without preserving the name used in the binder. Returns a pair made of the newly introduced variable (which will have an inaccessible name) and the new goal. This will fail if there is nothing to introduce, ie when the goal does not start with a forall, lambda or let.

Equations
@[reducible, inline, deprecated Lean.MVarId.intro1]
Equations
@[reducible, inline]

Introduce one object from the goal mvarid, preserving the name used in the binder. Returns a pair made of the newly introduced variable and the new goal. This will fail if there is nothing to introduce, ie when the goal does not start with a forall, lambda or let.

Equations
@[reducible, inline, deprecated Lean.MVarId.intro1P]
Equations

Introduce as many binders as possible without unfolding definitions.

Equations
  • One or more equations did not get rendered due to their size.
@[deprecated Lean.MVarId.intros]
Equations