blob: 68b737f6894be72329864a27187d9e695cc8da19 [file]
import Lean
@[inline] def pred? (x : Nat) : Option Nat :=
match x with
| 0 => none
| x+1 => some x
def isZero (x : Nat) :=
match pred? x with
| some _ => false
| none => true
#eval Lean.Compiler.compile #[``isZero]
-- set_option trace.Compiler.simp true -- TODO: uncomment
#eval Lean.Compiler.compile #[``isZero]