The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.ApplyWith

3 declarations. Mathlib docs · Source

The applyWith tactic

The applyWith tactic is like apply, but allows passing a custom configuration to the underlying apply operation.

def Mathlib.Tactic.manyConfig E1 #

Lean.ParserDescr

A configuration with at least one configuration option.

In comparison, optConfig allows zero or more options.

def Mathlib.Tactic.elabApplyConfig E1 #

Lean.Syntax → optParam Lean.Meta.ApplyConfig { } → optParam Bool true → Lean.Elab.Tactic.TacticM Lean.Meta.ApplyConfig

Elaborator for the configuration in apply (config := cfg) syntax.

def Mathlib.Tactic.applyWith E1 #

Lean.ParserDescr

apply e tries to match the current goal against the conclusion of e's type. If it succeeds, then the tactic returns as many subgoals as the number of premises that have not been fixed by type inference or type class resolution. Non-dependent premises are added before dependent ones.

The apply tactic uses higher-order pattern matching, type class resolution, and first-order unification with dependent types.

Extensions:

    • apply (config := cfg) e allows for additional configuration (see Lean.Meta.ApplyConfig):
      • newGoals controls which new goals are added by apply, in which order.
      • -synthAssignedInstances will not synthesize instance implicit arguments if they have been assigned by isDefEq.
      • +allowSynthFailures will create new goals when instance synthesis fails, rather than erroring.
      • +approx enables isDefEq approximations (see Lean.Meta.approxDefEq).