- reducible: Lean.ReducibilityStatus
- semireducible: Lean.ReducibilityStatus
- irreducible: Lean.ReducibilityStatus
Equations
Equations
- Lean.instReprReducibilityStatus = { reprPrec := [anonymous] }
Equations
- Lean.getReducibilityStatusImp env declName = match Lean.EnumAttributes.getValue Lean.reducibilityAttrs env declName with | some s => s | none => Lean.ReducibilityStatus.semireducible
def
Lean.setReducibilityStatusImp
(env : Lean.Environment)
(declName : Lean.Name)
(s : Lean.ReducibilityStatus)
:
Equations
- Lean.setReducibilityStatusImp env declName s = match Lean.EnumAttributes.setValue Lean.reducibilityAttrs env declName s with | Except.ok env => env | x => env
def
Lean.getReducibilityStatus
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
:
Equations
- Lean.getReducibilityStatus declName = do let a ← Lean.getEnv pure (Lean.getReducibilityStatusImp a declName)
def
Lean.setReducibilityStatus
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
(s : Lean.ReducibilityStatus)
:
m Unit
Equations
- Lean.setReducibilityStatus declName s = Lean.modifyEnv fun env => Lean.setReducibilityStatusImp env declName s
def
Lean.setReducibleAttribute
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
:
m Unit
Equations
def
Lean.isReducible
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
:
m Bool
Equations
- Lean.isReducible declName = do let a ← Lean.getReducibilityStatus declName match a with | Lean.ReducibilityStatus.reducible => pure true | x => pure false
def
Lean.isIrreducible
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
:
m Bool
Equations
- Lean.isIrreducible declName = do let a ← Lean.getReducibilityStatus declName match a with | Lean.ReducibilityStatus.irreducible => pure true | x => pure false