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

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

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

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

full_name: Int.reduceBinIntNatOp
code: def reduceBinIntNatOp (name : Name) (op : Int → Nat → Int) (e : Expr) : SimpM DStep 
goal: Lean.Meta.SimpM Lean.Meta.Simp.DStep

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

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

full_name: Int.reduceNeg
code: builtin_dsimproc [simp, seval] reduceNeg ((- _ : Int)) := fun e => do
  unless e.isAppOfArity ``Neg.neg 3 do return .continue
  let arg := e.appArg!
  if arg.isAppOfArity ``OfNat.ofNat 3 then
    -- We return .done to ensure `Neg.neg` is not unfolded even when `ground := true`.
    return .done e
  else
    let some v ← fromExpr? arg | return .continue
    if v < 0 then
      return .done <| toExpr (- v)
    else
      return .done <| toExpr v
goal: Lean.Meta.Simp.DSimproc

full_name: Int.isPosValue
code: /-- Return `.done` for positive Int values. We don't want to unfold in the symbolic evaluator. -/
builtin_dsimproc [seval] isPosValue ((OfNat.ofNat _ : Int)) := fun e => do
  let_expr OfNat.ofNat _ _ _ ← e | return .continue
  return .done e
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceAdd
code: builtin_dsimproc [simp, seval] reduceAdd ((_ + _ : Int)) := reduceBin ``HAdd.hAdd 6 (· + ·)
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceMul
code: builtin_dsimproc [simp, seval] reduceMul ((_ * _ : Int)) := reduceBin ``HMul.hMul 6 (· * ·)
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceSub
code: builtin_dsimproc [simp, seval] reduceSub ((_ - _ : Int)) := reduceBin ``HSub.hSub 6 (· - ·)
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceDiv
code: builtin_dsimproc [simp, seval] reduceDiv ((_ / _ : Int)) := reduceBin ``HDiv.hDiv 6 (· / ·)
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceMod
code: builtin_dsimproc [simp, seval] reduceMod ((_ % _ : Int)) := reduceBin ``HMod.hMod 6 (· % ·)
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceTDiv
code: builtin_dsimproc [simp, seval] reduceTDiv (div  _ _) := reduceBin ``Int.div 2 Int.div
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceTMod
code: builtin_dsimproc [simp, seval] reduceTMod (mod  _ _) := reduceBin ``Int.mod 2 Int.mod
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceFDiv
code: builtin_dsimproc [simp, seval] reduceFDiv (fdiv _ _) := reduceBin ``Int.fdiv 2 Int.fdiv
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceFMod
code: builtin_dsimproc [simp, seval] reduceFMod (fmod _ _) := reduceBin ``Int.fmod 2 Int.fmod
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceBdiv
code: builtin_dsimproc [simp, seval] reduceBdiv (bdiv _ _) := reduceBinIntNatOp ``bdiv bdiv
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceBmod
code: builtin_dsimproc [simp, seval] reduceBmod (bmod _ _) := reduceBinIntNatOp ``bmod bmod
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reducePow
code: builtin_dsimproc [simp, seval] reducePow ((_ : Int) ^ (_ : Nat)) := fun e => do
  let_expr HPow.hPow _ _ _ _ a b ← e | return .continue
  let some v₁ ← fromExpr? a | return .continue
  let some v₂ ← Nat.fromExpr? b | return .continue
  return .done <| toExpr (v₁ ^ v₂)
goal: Lean.Meta.Simp.DSimproc

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

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

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

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

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

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

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

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

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

full_name: Int.reduceAbs
code: builtin_dsimproc [simp, seval] reduceAbs (natAbs _) := reduceNatCore ``natAbs natAbs
goal: Lean.Meta.Simp.DSimproc

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

full_name: Int.reduceNegSucc
code: builtin_dsimproc [simp, seval] reduceNegSucc (Int.negSucc _) := fun e => do
  let_expr Int.negSucc a ← e | return .continue
  let some a ← getNatValue? a | return .continue
  return .done <| toExpr (-(Int.ofNat a + 1))
goal: Lean.Meta.Simp.DSimproc

full_name: Int.reduceOfNat
code: builtin_dsimproc [simp, seval] reduceOfNat (Int.ofNat _) := fun e => do
  let_expr Int.ofNat a ← e | return .continue
  let some a ← getNatValue? a | return .continue
  return .done <| toExpr (Int.ofNat a)
goal: Lean.Meta.Simp.DSimproc