Equations
- Lean.setEnv env = Lean.modifyEnv fun (x : Lean.Environment) => env
Instances For
Equations
- Lean.withEnv env x = do let saved ← Lean.getEnv tryFinally (do Lean.setEnv env x) (Lean.setEnv saved)
Instances For
Equations
- Lean.isInductiveCore env declName = match env.findAsync? declName with | some { name := name, kind := Lean.ConstantKind.induct, sig := sig, constInfo := constInfo } => true | x => false
Instances For
Equations
- Lean.isInductive declName = do let __do_lift ← Lean.getEnv pure (Lean.isInductiveCore __do_lift declName)
Instances For
Equations
- Lean.isRecCore env declName = match env.findAsync? declName with | some { name := name, kind := Lean.ConstantKind.recursor, sig := sig, constInfo := constInfo } => true | x => false
Instances For
Equations
- Lean.isRec declName = do let __do_lift ← Lean.getEnv pure (Lean.isRecCore __do_lift declName)
Instances For
Equations
- Lean.withoutModifyingEnv x = do let __do_lift ← Lean.getEnv Lean.withEnv __do_lift.unlockAsync x
Instances For
Similar to withoutModifyingEnv, but also returns the updated environment
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.matchConst (Lean.Expr.const constName us) failK k = do let __do_lift ← Lean.getEnv match __do_lift.find? constName with | some cinfo => k cinfo us | none => failK ()
- Lean.matchConst e failK k = failK ()
Instances For
Equations
- Lean.hasConst constName skipRealize = do let __do_lift ← Lean.getEnv pure (__do_lift.contains constName skipRealize)
Instances For
Equations
- Lean.getConstInfo constName = do let __do_lift ← Lean.getEnv match __do_lift.find? constName with | some info => pure info | none => Lean.throwUnknownConstant constName
Instances For
Equations
- Lean.getConstVal constName = do let __do_lift ← Lean.getEnv match __do_lift.findConstVal? constName with | some val => pure val | none => Lean.throwUnknownConstant constName
Instances For
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
- Lean.isInductive? declName = do let __do_lift ← Lean.getEnv pure (Lean.isInductiveCore? __do_lift declName)
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.mkConstWithLevelParams constName = do let info ← Lean.getConstVal constName pure (Lean.mkConst constName (List.map Lean.mkLevelParam info.levelParams))
Instances For
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
- 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
Matches if e is a constant that is an inductive type with one constructor.
Such types can be used with primitive projections.
See also Lean.matchConstNonRecStructure for a more restrictive version.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Matches if e is a constant that is a non-recursive inductive type with no indices and with one constructor.
Such a type satisfies Lean.isNonRecStructure.
See also Lean.matchConstStructure for a less restrictive version.
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
- 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
Returns true if the recursor of the inductive type declName eliminates into an arbitrary Sort,
which is the case exactly when it takes an extra universe parameter for the motive.
Constructions that turn a value of the type into data (T.ctorIdx, T._sizeOf_1, T.noConfusion,
…) are only possible for such types.
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.