The areas / V34. The tactics of Mathlib
Mathlib.Tactic.FunProp.Core
23 declarations. Mathlib docs · Source
Tactic fun_prop for proving function properties like Continuous f, Differentiable ℝ f, ...
def Mathlib.Meta.FunProp.synthesizeInstance E1 #
Mathlib.Meta.FunProp.Origin → Lean.Expr → Lean.Expr → Lean.MetaM Bool
Synthesize instance of type type and
- assign it to
xifxis meta variable - check it is equal to
x
def Mathlib.Meta.FunProp.synthesizeArgs E1 #
Mathlib.Meta.FunProp.Origin →
Array Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM Bool
Synthesize arguments xs either with typeclass synthesis, with fun_prop or with
discharger.
def Mathlib.Meta.FunProp.tryTheoremCore E1 #
Array Lean.Expr →
Lean.Expr →
Lean.Expr →
Lean.Expr →
Mathlib.Meta.FunProp.Origin →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to apply theorem - core function
def Mathlib.Meta.FunProp.tryTheoremWithHint? E1 #
Lean.Expr →
Mathlib.Meta.FunProp.Origin →
Array (ℕ × Lean.Expr) →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
optParam Bool false → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to apply a theorem provided some of the theorem arguments.
def Mathlib.Meta.FunProp.tryTheorem? E1 #
Lean.Expr →
Mathlib.Meta.FunProp.Origin →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
optParam Bool false → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to apply a theorem thmOrigin to the goal e.
def Mathlib.Meta.FunProp.applyIdRule E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to prove e using the identity lambda theorem.
For example, e = q(Continuous fun x ↦ x) and funPropDecl is FunPropDecl for Continuous.
def Mathlib.Meta.FunProp.applyConstRule E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to prove e using the constant lambda theorem.
For example, e = q(Continuous fun x ↦ y) and funPropDecl is FunPropDecl for Continuous.
def Mathlib.Meta.FunProp.applyApplyRule E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to prove e using the apply lambda theorem.
For example, e = q(Continuous fun f ↦ f x) and funPropDecl is FunPropDecl for Continuous.
def Mathlib.Meta.FunProp.applyCompRule E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Lean.Expr →
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to prove e using composition lambda theorem.
For example, e = q(Continuous fun x ↦ f (g x)) and funPropDecl is FunPropDecl for
Continuous
You also have to provide the functions f and g.
def Mathlib.Meta.FunProp.applyPiRule E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to prove e using pi lambda theorem.
For example, e = q(Continuous fun x y ↦ f x y) and funPropDecl is FunPropDecl for
Continuous
def Mathlib.Meta.FunProp.letCase E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to prove e = q(P (fun x ↦ let y := φ x; ψ x y).
For example,
funPropDeclisFunPropDeclforContinuouse = q(Continuous fun x ↦ let y := φ x; ψ x y)f = q(fun x ↦ let y := φ x; ψ x y)
def Mathlib.Meta.FunProp.applyMorRules E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Mathlib.Meta.FunProp.FunctionData →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Prove function property of using morphism theorems.
def Mathlib.Meta.FunProp.applyTransitionRules E1 #
Lean.Expr →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Prove function property of using transition theorems.
def Mathlib.Meta.FunProp.removeArgRule E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Mathlib.Meta.FunProp.FunctionData →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to remove applied argument i.e. prove P (fun x ↦ f x y) from P (fun x ↦ f x).
For example
funPropDeclisFunPropDeclforContinuouse = q(Continuous fun x ↦ foo (bar x) y)fDatacontains info onfun x ↦ foo (bar x) y
This tries to prove Continuous fun x ↦ foo (bar x) y from Continuous fun x ↦ foo (bar x)
def Mathlib.Meta.FunProp.bvarAppCase E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Mathlib.Meta.FunProp.FunctionData →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Prove function property of fun f ↦ f x₁ ... xₙ.
def Mathlib.Meta.FunProp.getDeclTheorems E1 #
Mathlib.Meta.FunProp.FunPropDecl → Lean.Name → Array ℕ → ℕ → Lean.MetaM (Array Mathlib.Meta.FunProp.FunctionTheorem)
Get candidate theorems from the environment for function property funPropDecl and
function funName.
def Mathlib.Meta.FunProp.getLocalTheorems E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Mathlib.Meta.FunProp.Origin → Array ℕ → ℕ → Mathlib.Meta.FunProp.FunPropM (Array Mathlib.Meta.FunProp.FunctionTheorem)
Get candidate theorems from the local context for function property funPropDecl and
function funName.
def Mathlib.Meta.FunProp.tryTheorems E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Mathlib.Meta.FunProp.FunctionData →
Array Mathlib.Meta.FunProp.FunctionTheorem →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Try to apply function theorems thms to e.
def Mathlib.Meta.FunProp.fvarAppCase E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Mathlib.Meta.FunProp.FunctionData →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Prove function property of fun x ↦ f x₁ ... xₙ where f is free variable.
def Mathlib.Meta.FunProp.constAppCase E1 #
Mathlib.Meta.FunProp.FunPropDecl →
Lean.Expr →
Mathlib.Meta.FunProp.FunctionData →
(Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)) →
Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Prove function property of fun x ↦ f x₁ ... xₙ where f is declared function.
def Mathlib.Meta.FunProp.cacheResult E1 #
Lean.Expr → Mathlib.Meta.FunProp.Result → Mathlib.Meta.FunProp.FunPropM Mathlib.Meta.FunProp.Result
Cache result if it does not have any subgoals.
def Mathlib.Meta.FunProp.cacheFailure E1 #
Lean.Expr → Mathlib.Meta.FunProp.FunPropM Unit
Cache for failed goals such that fun_prop can fail fast next time.
opaque Mathlib.Meta.FunProp.funProp E1 #
Lean.Expr → Mathlib.Meta.FunProp.FunPropM (Option Mathlib.Meta.FunProp.Result)
Main funProp function. Returns proof of e.