Documentation

Lean.Meta.Tactic.Apply

Controls which new mvars are turned in to goals by the apply tactic.

  • nonDependentFirst mvars that don't depend on other goals appear first in the goal list.
  • nonDependentOnly only mvars that don't depend on other goals are added to goal list.
  • all all unassigned mvars are added to the goal list.
Instances For
    • If synthAssignedInstances is true, then apply will synthesize instance implicit arguments even if they have assigned by isDefEq, and then check whether the synthesized value matches the one inferred. The congr tactic sets this flag to false.

      synthAssignedInstances : Bool
    • If approx := true, then we turn on isDefEq approximations. That is, we use the approxDefEq combinator.

      approx : Bool

    Configures the behaviour of the apply tactic.

    Instances For

      Compute the number of expected arguments and whether the result type is of the form (?m ...) where ?m is an unassigned metavariable.

      Equations
      Equations
      def Lean.Meta.synthAppInstances (tacticName : Lean.Name) (mvarId : Lean.MVarId) (newMVars : Array Lean.Expr) (binderInfos : Array Lean.BinderInfo) (synthAssignedInstances : Bool) :
      Equations
      • One or more equations did not get rendered due to their size.
      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.Meta.postprocessAppMVars (tacticName : Lean.Name) (mvarId : Lean.MVarId) (newMVars : Array Lean.Expr) (binderInfos : Array Lean.BinderInfo) (synthAssignedInstances : optParam Bool true) :

      If synthAssignedInstances is true, then apply will synthesize instance implicit arguments even if they have assigned by isDefEq, and then check whether the synthesized value matches the one inferred. The congr tactic sets this flag to false.

      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.MVarId.apply (mvarId : Lean.MVarId) (e : Lean.Expr) (cfg : optParam Lean.Meta.ApplyConfig { newGoals := Lean.Meta.ApplyNewGoals.nonDependentFirst, synthAssignedInstances := true, approx := true }) :

      Close the given goal using apply e.

      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.MVarId.apply.go (mvarId : Lean.MVarId) (cfg : optParam Lean.Meta.ApplyConfig { newGoals := Lean.Meta.ApplyNewGoals.nonDependentFirst, synthAssignedInstances := true, approx := true }) (targetType : Lean.Expr) (eType : Lean.Expr) (rangeNumArgs : Std.Range) (i : Nat) :
      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.Meta.apply (mvarId : Lean.MVarId) (e : Lean.Expr) (cfg : optParam Lean.Meta.ApplyConfig { newGoals := Lean.Meta.ApplyNewGoals.nonDependentFirst, synthAssignedInstances := true, approx := true }) :
      Equations
      Equations
      • One or more equations did not get rendered due to their size.
      @[inline]

      Apply And.intro as much as possible to goal mvarId.

      Equations
      Equations
      • One or more equations did not get rendered due to their size.