|
| 1 | +-- String.reduceAppend |
| 2 | +example : "hello" ++ " " ++ "world" = "hello world" := by simp |
| 3 | +example : "" ++ "a" = "a" := by simp |
| 4 | +example : "a" ++ "" = "a" := by simp |
| 5 | +example : "" ++ "" = "" := by simp |
| 6 | + |
| 7 | +-- String.reduceOfList |
| 8 | +example : String.ofList ['a', 'b', 'c'] = "abc" := by simp |
| 9 | +example : String.ofList [] = "" := by simp |
| 10 | +example : String.ofList ['x'] = "x" := by simp |
| 11 | + |
| 12 | +-- String.reduceToList |
| 13 | +example : "abc".toList = ['a', 'b', 'c'] := by simp |
| 14 | +example : "".toList = [] := by simp |
| 15 | +example : "x".toList = ['x'] := by simp |
| 16 | +example : "hello".toList = ['h', 'e', 'l', 'l', 'o'] := by simp |
| 17 | + |
| 18 | +-- String.reducePush |
| 19 | +example : "abc".push 'd' = "abcd" := by simp |
| 20 | +example : "".push 'a' = "a" := by simp |
| 21 | + |
| 22 | +-- String.reduceEq |
| 23 | +example : "hello" = "hello" := by simp |
| 24 | +example : "hello" = "foo" → False := by simp |
| 25 | + |
| 26 | +-- String.reduceNe |
| 27 | +example : "hello" ≠ "foo" := by simp |
| 28 | + |
| 29 | +-- String.reduceBEq |
| 30 | +example : ("hello" == "hello") = true := by simp |
| 31 | +example : ("hello" == "foo") = false := by simp |
| 32 | + |
| 33 | +-- String.reduceBNe |
| 34 | +example : ("hello" != "foo") = true := by simp |
| 35 | +example : ("hello" != "hello") = false := by simp |
| 36 | + |
| 37 | +-- String.reduceLT |
| 38 | +example : "abc" < "abd" := by simp |
| 39 | +example : "a" < "b" := by simp |
| 40 | + |
| 41 | +-- String.reduceLE |
| 42 | +example : "abc" ≤ "abc" := by simp |
| 43 | +example : "abc" ≤ "abd" := by simp |
| 44 | + |
| 45 | +-- String.reduceGT |
| 46 | +example : "abd" > "abc" := by simp |
| 47 | +example : "b" > "a" := by simp |
| 48 | + |
| 49 | +-- String.reduceGE |
| 50 | +example : "abc" ≥ "abc" := by simp |
| 51 | +example : "abd" ≥ "abc" := by simp |
| 52 | + |
| 53 | +-- Combined: roundtrip toList/ofList |
| 54 | +example : String.ofList "hello".toList = "hello" := by simp |
0 commit comments