Equations
- Lean.Meta.throwFunctionExpected f = Lean.throwError (Lean.toMessageData "function expected" ++ Lean.toMessageData (Lean.indentExpr f) ++ Lean.toMessageData "")
def
Lean.Meta.throwIncorrectNumberOfLevels
{α : Type}
(constName : Lean.Name)
(us : List Lean.Level)
:
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.throwTypeExcepted type = Lean.throwError (Lean.toMessageData "type expected" ++ Lean.toMessageData (Lean.indentExpr type) ++ Lean.toMessageData "")
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.throwUnknownMVar mvarId = Lean.throwError (Lean.toMessageData "unknown metavariable '?" ++ Lean.toMessageData mvarId.name ++ Lean.toMessageData "'")
@[export lean_infer_type]
Equations
- One or more equations did not get rendered due to their size.
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.const c [] a) = Lean.Meta.inferConstType c []
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.const c us a) = Lean.Meta.checkInferTypeCache e (Lean.Meta.inferConstType c us)
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.proj n i s a) = Lean.Meta.checkInferTypeCache (Lean.Expr.proj n i s a) (Lean.Meta.inferProjType n i s)
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.mvar mvarId a) = Lean.Meta.inferMVarType mvarId
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.fvar fvarId a) = Lean.Meta.inferFVarType fvarId
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.mdata a e_1 a_1) = Lean.Meta.inferTypeImp.infer e e_1
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.lit v a) = pure (Lean.Literal.type v)
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.sort lvl a) = pure (Lean.mkSort (Lean.mkLevelSucc lvl))
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.forallE a a_1 a_2 a_3) = Lean.Meta.checkInferTypeCache (Lean.Expr.forallE a a_1 a_2 a_3) (Lean.Meta.inferForallType (Lean.Expr.forallE a a_1 a_2 a_3))
- Lean.Meta.inferTypeImp.infer e (Lean.Expr.lam a a_1 a_2 a_3) = Lean.Meta.checkInferTypeCache (Lean.Expr.lam a a_1 a_2 a_3) (Lean.Meta.inferLambdaType (Lean.Expr.lam a a_1 a_2 a_3))
isPropQuick e
is an "approximate" predicate which returns LBool.true
if e
is a proposition.
isProp whnf e
return true
if e
is a proposition.
If `e` contains metavariables, it may not be possible
to decide whether is a proposition or not. We return `false` in this
case. We considered using `LBool` and retuning `LBool.undef`, but
we have no applications for it.
Equations
- One or more equations did not get rendered due to their size.
isProofQuick e
is an "approximate" predicate which returns LBool.true
if e
is a proof.
Equations
- One or more equations did not get rendered due to their size.
isTypeQuick e
is an "approximate" predicate which returns LBool.true
if e
is a type.
Equations
- One or more equations did not get rendered due to their size.
Return true iff e : Sort _
or e : (forall As, Sort _)
.
Remark: it subsumes isType
Equations
- Lean.Meta.isTypeFormer e = do let type ← Lean.Meta.inferType e Lean.Meta.isTypeFormerType type