Pure functions for extracting values. They are pure (OptionT Id) rather than monadic (MetaM).
This is possible because Sym assumes terms are in canonical form, no whnf or
reduction is needed to recognize literals.
Returns true if e is a Nat literal (OfNat.ofNat _ n _ with a raw literal n).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns none if the width is not safe to evaluate (see isSafeBitVecWidth).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Sym.getUInt8Value? e = do let __do_lift ← Lean.Meta.Sym.getNatValue? e pure (UInt8.ofNat __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getUInt16Value? e = do let __do_lift ← Lean.Meta.Sym.getNatValue? e pure (UInt16.ofNat __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getUInt32Value? e = do let __do_lift ← Lean.Meta.Sym.getNatValue? e pure (UInt32.ofNat __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getUInt64Value? e = do let __do_lift ← Lean.Meta.Sym.getNatValue? e pure (UInt64.ofNat __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getInt8Value? e = do let __do_lift ← Lean.Meta.Sym.getIntValue? e pure (Int8.ofInt __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getInt16Value? e = do let __do_lift ← Lean.Meta.Sym.getIntValue? e pure (Int16.ofInt __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getInt32Value? e = do let __do_lift ← Lean.Meta.Sym.getIntValue? e pure (Int32.ofInt __do_lift)
Instances For
Equations
- Lean.Meta.Sym.getInt64Value? e = do let __do_lift ← Lean.Meta.Sym.getIntValue? e pure (Int64.ofInt __do_lift)
Instances For
Equations
Instances For
Equations
- Lean.Meta.Sym.getBoolValue? (Lean.Expr.const `Bool.true []) = pure true
- Lean.Meta.Sym.getBoolValue? (Lean.Expr.const `Bool.false []) = pure false
- Lean.Meta.Sym.getBoolValue? e = failure