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

54 lines
1.5 KiB
Text

-- String.reduceAppend
example : "hello" ++ " " ++ "world" = "hello world" := by simp
example : "" ++ "a" = "a" := by simp
example : "a" ++ "" = "a" := by simp
example : "" ++ "" = "" := by simp
-- String.reduceOfList
example : String.ofList ['a', 'b', 'c'] = "abc" := by simp
example : String.ofList [] = "" := by simp
example : String.ofList ['x'] = "x" := by simp
-- String.reduceToList
example : "abc".toList = ['a', 'b', 'c'] := by simp
example : "".toList = [] := by simp
example : "x".toList = ['x'] := by simp
example : "hello".toList = ['h', 'e', 'l', 'l', 'o'] := by simp
-- String.reducePush
example : "abc".push 'd' = "abcd" := by simp
example : "".push 'a' = "a" := by simp
-- String.reduceEq
example : "hello" = "hello" := by simp
example : "hello" = "foo" → False := by simp
-- String.reduceNe
example : "hello" ≠ "foo" := by simp
-- String.reduceBEq
example : ("hello" == "hello") = true := by simp
example : ("hello" == "foo") = false := by simp
-- String.reduceBNe
example : ("hello" != "foo") = true := by simp
example : ("hello" != "hello") = false := by simp
-- String.reduceLT
example : "abc" < "abd" := by simp
example : "a" < "b" := by simp
-- String.reduceLE
example : "abc" ≤ "abc" := by simp
example : "abc" ≤ "abd" := by simp
-- String.reduceGT
example : "abd" > "abc" := by simp
example : "b" > "a" := by simp
-- String.reduceGE
example : "abc" ≥ "abc" := by simp
example : "abd" ≥ "abc" := by simp
-- Combined: roundtrip toList/ofList
example : String.ofList "hello".toList = "hello" := by simp