funProp Meta programming functions like in Lean.Expr.* but for working with bundled morphisms. #
Function application in normal lean expression looks like .app f x but when we work with bundled
morphism f it looks like .app (.app coe f) x where f. In mathlib coe is usually
DFunLike.coe but it can be any coercion that is registered with the coe attribute.
The main difference when working with expression involving morphisms is that the notion the head of expression changes. For example in:
coe (f a) b
the head of expression is considered to be f and not coe.
An abbreviation of ∀ x, p x. It is used by fun_prop to represent Pi types as function
applications and should not occur in any place other than the implementation of fun_prop.
Equations
- Mathlib.Meta.FunProp.Forall p = ((x : α) → p x)
Instances For
Is name a coercion from some function space to functions?
Equations
- Mathlib.Meta.FunProp.Mor.isCoeFunName name = do let __x ← Lean.Meta.getCoeFnInfo? name match __x with | some info => pure (info.type == Lean.Meta.CoeFnType.coeFun) | x => pure false
Instances For
Is e a coercion from some function space to functions?
Equations
- One or more equations did not get rendered due to their size.
Instances For
Is e morphism application?
Equations
- One or more equations did not get rendered due to their size.
- Mathlib.Meta.FunProp.Mor.isMorApp? e = pure none
Instances For
Previously, fun_prop incorrectly switched to default transparency when reducing an
expression if a projection was applied to it. Setting this option to true restores this
behavior.
Note that this option is only for backward compatibility and will be removed in the future.
Equations
Given e = f a₁ a₂ ... aₙ, returns k f #[a₁, ..., aₙ] where f can be bundled morphism.
∀ x, p x is represented as Forall p.
Equations
Instances For
If the given expression is a sequence of morphism applications f a₁ .. aₙ, return f.
Otherwise return the input expression.
Equations
- One or more equations did not get rendered due to their size.
- Mathlib.Meta.FunProp.Mor.getAppFn (Lean.Expr.mdata data b) = Mathlib.Meta.FunProp.Mor.getAppFn b
- Mathlib.Meta.FunProp.Mor.getAppFn (f.app arg) = Mathlib.Meta.FunProp.Mor.getAppFn f
- Mathlib.Meta.FunProp.Mor.getAppFn e = pure e
Instances For
Given f a₁ a₂ ... aₙ, returns #[a₁, ..., aₙ] where f can be bundled morphism.
Equations
- Mathlib.Meta.FunProp.Mor.getAppArgs e = Mathlib.Meta.FunProp.Mor.withApp e fun (x : Lean.Expr) (xs : Array Mathlib.Meta.FunProp.Mor.Arg) => pure xs