File: .lake/packages/lean4/src/lean/Lean/Meta/Tactic/Simp/BuiltinSimprocs/Char.lean

full_name: Char.fromExpr?
code: def fromExpr? (e : Expr) : SimpM (Option Char) 
goal: Lean.Meta.SimpM (Option Char)

full_name: Char.reduceUnary
code: @[inline] def reduceUnary [ToExpr α] (declName : Name) (op : Char → α) (arity : Nat := 1) (e : Expr) : SimpM DStep 
goal: Lean.Meta.SimpM Lean.Meta.Simp.DStep

full_name: Char.reduceBinPred
code: @[inline] def reduceBinPred (declName : Name) (arity : Nat) (op : Char → Char → Bool) (e : Expr) : SimpM Step 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Step

full_name: Char.reduceBoolPred
code: @[inline] def reduceBoolPred (declName : Name) (arity : Nat) (op : Char → Char → Bool) (e : Expr) : SimpM DStep 
goal: Lean.Meta.SimpM Lean.Meta.Simp.DStep

full_name: Char.reduceToLower
code: builtin_dsimproc [simp, seval] reduceToLower (Char.toLower _) := reduceUnary ``Char.toLower Char.toLower
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceToUpper
code: builtin_dsimproc [simp, seval] reduceToUpper (Char.toUpper _) := reduceUnary ``Char.toUpper Char.toUpper
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceToNat
code: builtin_dsimproc [simp, seval] reduceToNat (Char.toNat _) := reduceUnary ``Char.toNat Char.toNat
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceIsWhitespace
code: builtin_dsimproc [simp, seval] reduceIsWhitespace (Char.isWhitespace _) := reduceUnary ``Char.isWhitespace Char.isWhitespace
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceIsUpper
code: builtin_dsimproc [simp, seval] reduceIsUpper (Char.isUpper _) := reduceUnary ``Char.isUpper Char.isUpper
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceIsLower
code: builtin_dsimproc [simp, seval] reduceIsLower (Char.isLower _) := reduceUnary ``Char.isLower Char.isLower
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceIsAlpha
code: builtin_dsimproc [simp, seval] reduceIsAlpha (Char.isAlpha _) := reduceUnary ``Char.isAlpha Char.isAlpha
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceIsDigit
code: builtin_dsimproc [simp, seval] reduceIsDigit (Char.isDigit _) := reduceUnary ``Char.isDigit Char.isDigit
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceIsAlphaNum
code: builtin_dsimproc [simp, seval] reduceIsAlphaNum (Char.isAlphanum _) := reduceUnary ``Char.isAlphanum Char.isAlphanum
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceToString
code: builtin_dsimproc [simp, seval] reduceToString (toString (_ : Char)) := reduceUnary ``toString toString 3
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceVal
code: builtin_dsimproc [simp, seval] reduceVal (Char.val _) := fun e => do
  let_expr Char.val arg ← e | return .continue
  let some c ← fromExpr? arg | return .continue
  return .done <| toExpr c.val
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceLT
code: builtin_simproc [simp, seval] reduceLT  (( _ : Char) < _)  := reduceBinPred ``LT.lt 4 (. < .)
goal: Lean.Meta.Simp.Simproc

full_name: Char.reduceLE
code: builtin_simproc [simp, seval] reduceLE  (( _ : Char) ≤ _)  := reduceBinPred ``LE.le 4 (. ≤ .)
goal: Lean.Meta.Simp.Simproc

full_name: Char.reduceGT
code: builtin_simproc [simp, seval] reduceGT  (( _ : Char) > _)  := reduceBinPred ``GT.gt 4 (. > .)
goal: Lean.Meta.Simp.Simproc

full_name: Char.reduceGE
code: builtin_simproc [simp, seval] reduceGE  (( _ : Char) ≥ _)  := reduceBinPred ``GE.ge 4 (. ≥ .)
goal: Lean.Meta.Simp.Simproc

full_name: Char.reduceEq
code: builtin_simproc [simp, seval] reduceEq  (( _ : Char) = _)  := reduceBinPred ``Eq 3 (. = .)
goal: Lean.Meta.Simp.Simproc

full_name: Char.reduceNe
code: builtin_simproc [simp, seval] reduceNe  (( _ : Char) ≠ _)  := reduceBinPred ``Ne 3 (. ≠ .)
goal: Lean.Meta.Simp.Simproc

full_name: Char.reduceBEq
code: builtin_dsimproc [simp, seval] reduceBEq  (( _ : Char) == _)  := reduceBoolPred ``BEq.beq 4 (. == .)
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceBNe
code: builtin_dsimproc [simp, seval] reduceBNe  (( _ : Char) != _)  := reduceBoolPred ``bne 4 (. != .)
goal: Lean.Meta.Simp.DSimproc

full_name: Char.isValue
code: /--
Return `.done` for Char values. We don't want to unfold in the symbolic evaluator.
In regular `simp`, we want to prevent the nested raw literal from being converted into
a `OfNat.ofNat` application. TODO: cleanup
-/
builtin_dsimproc ↓ [simp, seval] isValue (Char.ofNat _ ) := fun e => do
  unless (← fromExpr? e).isSome do return .continue
  return .done e
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceOfNatAux
code: builtin_dsimproc [simp, seval] reduceOfNatAux (Char.ofNatAux _ _) := fun e => do
  let_expr Char.ofNatAux n _ ← e | return .continue
  let some n ← Nat.fromExpr? n | return .continue
  return .done <| toExpr (Char.ofNat n)
goal: Lean.Meta.Simp.DSimproc

full_name: Char.reduceDefault
code: builtin_dsimproc [simp, seval] reduceDefault ((default : Char)) := fun e => do
  let_expr default _ _ ← e | return .continue
  return .done <| toExpr (default : Char)
goal: Lean.Meta.Simp.DSimproc