funProp
environment extension that stores all registered function properties #
Basic information about function property
To use funProp
to prove a function property P : (α→β)→Prop
one has to provide FunPropDecl
.
- funPropName : Lean.Name
function transformation name
- path : Array Lean.Meta.DiscrTree.Key
path for discriminatory tree
- funArgId : Nat
argument index of a function this function property talks about. For example, this would be 4 for
@Continuous α β _ _ f
- dischargeStx? : Option (Lean.TSyntax `tactic)
Custom discharger for this function property.
Instances For
Equations
- Mathlib.Meta.FunProp.instInhabitedFunPropDecl = { default := { funPropName := default, path := default, funArgId := default, dischargeStx? := default } }
discriminatory tree for function properties
Instances For
Equations
- Mathlib.Meta.FunProp.instInhabitedFunPropDecls = { default := { decls := default } }
@[inline, reducible]
Equations
Instances For
def
Mathlib.Meta.FunProp.addFunPropDecl
(declName : Lean.Name)
(dischargeStx? : Option (Lean.TSyntax `tactic))
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Mathlib.Meta.FunProp.isFunProp e = do let __do_lift ← Mathlib.Meta.FunProp.getFunProp? e pure (Option.isSome __do_lift)
Instances For
Returns function property declaration from e = P f
.
Equations
- Mathlib.Meta.FunProp.getFunPropDecl? e = do let __do_lift ← Mathlib.Meta.FunProp.getFunProp? e match __do_lift with | some (decl, snd) => pure (some decl) | none => pure none
Instances For
Returns function f
from e = P f
and P
is function property.
Equations
- Mathlib.Meta.FunProp.getFunPropFun? e = do let __do_lift ← Mathlib.Meta.FunProp.getFunProp? e match __do_lift with | some (fst, f) => pure (some f) | none => pure none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Mathlib.Meta.FunProp.FunPropDecl.discharger
(funPropDecl : Mathlib.Meta.FunProp.FunPropDecl)
(e : Lean.Expr)
:
Equations
- Mathlib.Meta.FunProp.FunPropDecl.discharger funPropDecl e = match funPropDecl.dischargeStx? with | some stx => Mathlib.Meta.FunProp.tacticToDischarge stx e | x => pure none