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

64 lines
1.6 KiB
Text

example (b : Bool) : (if (if b then true else true) then 1 else 2) = 1 := by
split
next h =>
guard_target =ₛ (if true = true then 1 else 2) = 1
guard_hyp h : b = true
simp
next h =>
guard_target =ₛ (if true = true then 1 else 2) = 1
guard_hyp h : ¬b = true
simp
example (b : Bool) : (if h : (if b then true else true) then 1 else 2) = 1 := by
split
next h' =>
guard_target = (if h : true = true then 1 else 2) = 1
guard_hyp h' : b = true
simp
next h' =>
guard_target = (if h : true = true then 1 else 2) = 1
guard_hyp h' : ¬b = true
simp
opaque f (a : Nat) (h : a > 0) : Nat
axiom fax : f a h = a
example : (if h : (if true then a > 0 else False) then f a (by grind) else a) = a := by
split
next =>
split
next => simp [fax]
next => simp
next => simp
set_option backward.split false
example (b : Bool) : (if (if b then true else true) then 1 else 2) = 1 := by
split
next h =>
guard_target =ₛ (if true = true then 1 else 2) = 1
guard_hyp h : b = true
simp
next h =>
guard_target =ₛ (if true = true then 1 else 2) = 1
guard_hyp h : ¬b = true
simp
example (b : Bool) : (if h : (if b then true else true) then 1 else 2) = 1 := by
split
next h' =>
guard_target = (if h : true = true then 1 else 2) = 1
guard_hyp h' : b = true
simp
next h' =>
guard_target = (if h : true = true then 1 else 2) = 1
guard_hyp h' : ¬b = true
simp
example : (if h : (if true then a > 0 else False) then f a (by grind) else a) = a := by
split
next =>
split
next => simp [fax]
next => simp
next => simp