mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
49 lines
850 B
Lean4
49 lines
850 B
Lean4
def fact : Nat → Nat
|
|
| 0 => 1
|
|
| (n+1) => (n+1)*fact n
|
|
|
|
#check fact 6
|
|
|
|
#guard fact 10 == 3628800
|
|
|
|
-- set_option pp.all true
|
|
theorem tst1 : 100000000000 + 200000000000 = 300000000000 :=
|
|
rfl
|
|
|
|
theorem tst2 : 100000000000 * 200000000000 = 20000000000000000000000 :=
|
|
rfl
|
|
|
|
theorem tst3 : fact 7 = 5040 :=
|
|
rfl
|
|
|
|
theorem tst4 : fact 10 = 3628800 :=
|
|
rfl
|
|
|
|
theorem tst5 : 100000000001 < 300000000000 :=
|
|
of_decide_eq_true rfl
|
|
|
|
theorem tst6 : "hello".length = 5 :=
|
|
rfl
|
|
|
|
theorem tst7 : "helloworld".length = 10 :=
|
|
rfl
|
|
|
|
theorem tst8 : "hello" ++ "world" = "helloworld" :=
|
|
rfl
|
|
|
|
theorem tst9 : "abc" ≠ "cde" :=
|
|
by decide
|
|
|
|
theorem tst10 : "helloWorld" ≠ "helloworld" :=
|
|
by decide
|
|
|
|
theorem tst11 : "helloWorld" = "helloWorld" :=
|
|
by decide
|
|
|
|
theorem tst12 : 'a' ≠ 'c' :=
|
|
by decide
|
|
|
|
/-- info: tst10 : "helloWorld" ≠ "helloworld" -/
|
|
#guard_msgs in
|
|
#check tst10
|