- coe: Std.Tactic.Coe.CoeFnTypeThe basic coercion ↑x, seeCoeT.coe
- coeFun: Std.Tactic.Coe.CoeFnTypeThe coercion to a function type, see CoeFun.coe
- coeSort: Std.Tactic.Coe.CoeFnTypeThe coercion to a type, see CoeSort.coe
The different types of coercions that are supported by the coe attribute.
Instances For
Equations
- Std.Tactic.Coe.instInhabitedCoeFnType = { default := Std.Tactic.Coe.CoeFnType.coe }
Equations
- Std.Tactic.Coe.instReprCoeFnType = { reprPrec := Std.Tactic.Coe.reprCoeFnType✝ }
Equations
- Std.Tactic.Coe.instDecidableEqCoeFnType x y = if h : Std.Tactic.Coe.CoeFnType.toCtorIdx x = Std.Tactic.Coe.CoeFnType.toCtorIdx y then isTrue (_ : x = y) else isFalse (_ : x = y → False)
Equations
- One or more equations did not get rendered due to their size.
- numArgs : NatThe number of arguments to the coercion function 
- coercee : NatThe argument index that represents the value being coerced 
- type : Std.Tactic.Coe.CoeFnTypeThe type of coercion 
Information associated to a coercion function to enable sensible delaboration.
Instances For
Equations
- Std.Tactic.Coe.instInhabitedCoeFnInfo = { default := { numArgs := default, coercee := default, type := default } }
Equations
- Std.Tactic.Coe.instReprCoeFnInfo = { reprPrec := Std.Tactic.Coe.reprCoeFnInfo✝ }
Equations
- One or more equations did not get rendered due to their size.
The environment extension for tracking coercion functions for delaboration
Lookup the coercion information for a given function
Equations
- Std.Tactic.Coe.getCoeFnInfo? fn = do let __do_lift ← Lean.getEnv pure (Lean.NameMap.find? (Lean.ScopedEnvExtension.getState Std.Tactic.Coe.coeExt __do_lift) fn)
Instances For
This delaborator tries to elide functions which are known coercions.
For example, Int.ofNat is a coercion, so instead of printing ofNat n we just print ↑n,
and when re-parsing this we can (usually) recover the specific coercion being used.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Add a coercion delaborator for the given function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Add name to the coercion extension and add a coercion delaborator for the function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The @[coe] attribute on a function (which should also appear in a
instance : Coe A B := ⟨myFn⟩ declaration) allows the delaborator to show
applications of this function as ↑ when printing expressions.
Equations
- Std.Tactic.Coe.Attr.coe = Lean.ParserDescr.node `Std.Tactic.Coe.Attr.coe 1024 (Lean.ParserDescr.nonReservedSymbol "coe" false)