lean4-htt/tests/lean/run/reduce1.lean
Leonardo de Moura 35b2f596f1 test: use decide and nativeDecide
They are not active yet.
2021-03-11 07:46:33 -08:00

40 lines
1.2 KiB
Text

partial def fact : Nat → Nat
| 0 => 1
| (n+1) => (n+1)*fact n
#eval fact 10
#eval fact 100
theorem tst1 : fact 10 = 3628800 :=
by nativeDecide
theorem tst2 : fact 100 = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 :=
by nativeDecide
theorem tst3 : decide (10000000000000000 < 200000000000000000000) = true :=
by nativeDecide
theorem tst4 : 10000000000000000 < 200000000000000000000 :=
by decide
theorem tst5 : 10000000000000000 < 200000000000000000000 :=
by nativeDecide
theorem tst6 : 10000000000000000 < 200000000000000000000 :=
let h₁ : 10000000000000000 < 10000000000000010 := by nativeDecide
let h₂ : 10000000000000010 < 200000000000000000000 := by nativeDecide
Nat.ltTrans h₁ h₂
theorem tst7 : 10000000000000000 < 200000000000000000000 :=
by decide
theorem tst8 : 10000000000000000 < 200000000000000000000 :=
let h₁ : 10000000000000000 < 10000000000000010 := by decide
let h₂ : 10000000000000010 < 200000000000000000000 := by decide
Nat.ltTrans h₁ h₂
theorem tst9 : 10000000000000000 < 200000000000000000000 :=
by decide
theorem tst10 : 10000000000000000 < 200000000000000000000 :=
by nativeDecide