lean4-htt/tests/elab/def10.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

30 lines
756 B
Text

def f : Bool → Bool → Nat
| true, true => 0
| _, _ => 3
example : f true true = 0 :=
rfl
def g : Bool → Bool → Bool → Nat
| true, _, true => 1
| _, false, false => 2
| a, _, b => f a b
theorem ex1 : g true true true = 1 := rfl
theorem ex2 : g true false true = 1 := rfl
theorem ex3 : g true false false = 2 := rfl
theorem ex4 : g false false false = 2 := rfl
theorem ex5 : g false true true = 3 := rfl
theorem f_eq (h : a = true → b = true → False) : f a b = 3 := by
simp (config := { iota := false }) [f]
split
· contradiction
· rfl
theorem ex6 : g x y z > 0 := by
simp [g]
split
next => decide
next => decide
next a b c h₁ h₂ => simp (config := { decide := true }) [f_eq h₁]