Files
lean4/tests/elab/eqnOptions.lean
Garmelon 08eb78a5b2 chore: switch to new test/bench suite (#12590)
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.
2026-02-25 13:51:53 +00:00

56 lines
1012 B
Lean4

/-! Tests that options affecting equational theorems work as expected. -/
namespace Test1
def nonrecfun : Bool Nat
| false => 0
| true => 0
/--
info: equations:
@[defeq] theorem Test1.nonrecfun.eq_1 : nonrecfun false = 0
@[defeq] theorem Test1.nonrecfun.eq_2 : nonrecfun true = 0
-/
#guard_msgs in
#print equations nonrecfun
end Test1
namespace Test2
set_option backward.eqns.nonrecursive false in
def nonrecfun : Bool Nat
| false => 0
| true => 0
/--
info: equations:
@[defeq] theorem Test2.nonrecfun.eq_1 : ∀ (x : Bool),
nonrecfun x =
match x with
| false => 0
| true => 0
-/
#guard_msgs in
#print equations nonrecfun
end Test2
namespace Test3
def nonrecfun : Bool Nat
| false => 0
| true => 0
-- should have no effect
set_option backward.eqns.nonrecursive false
/--
info: equations:
@[defeq] theorem Test3.nonrecfun.eq_1 : nonrecfun false = 0
@[defeq] theorem Test3.nonrecfun.eq_2 : nonrecfun true = 0
-/
#guard_msgs in
#print equations nonrecfun
end Test3