Many of our tests in `tests/lean/run/` produce output from `#eval` (or `#check`) statements, that is then ignored. This PR tries to capture all the useful output using `#guard_msgs`. I've only done a cursory check that the output is still sane --- there is a chance that some "unchecked" tests have already accumulated regressions and this just cements them! In the other direction, I did identify two rotten tests: * a minor one in `setStructInstNotation.lean`, where a comment says `Set Nat`, but `#check` actually prints `?_`. Weird? * `CompilerProbe.lean` is generating empty output, apparently indicating that something is broken, but I don't know the signficance of this file. In any case, I'll ask about these elsewhere. (This started by noticing that a recent `grind` test file had an untested `trace_state`, and then got carried away.)
29 lines
627 B
Text
29 lines
627 B
Text
theorem ex1 : a + b < b + 1 + a + c := by
|
|
simp (config := { arith := true })
|
|
|
|
theorem ex2 : a + b < b + 1 + a + c := by
|
|
simp_arith
|
|
|
|
theorem ex3 : a + (fun x => x) b < b + 1 + a + c := by
|
|
simp_arith
|
|
|
|
/--
|
|
info: a b c : Nat
|
|
⊢ (fun x => x) b ≤ b + c
|
|
-/
|
|
#guard_msgs in
|
|
theorem ex4 : a + (fun x => x) b < b + 1 + a + c := by
|
|
simp_arith (config := { beta := false })
|
|
trace_state
|
|
simp_arith
|
|
|
|
theorem ex5 (h : a + d + b > b + 1 + (a + (c + c) + d)) : False := by
|
|
simp_arith at h
|
|
|
|
#print ex5
|
|
|
|
theorem ex6 (p : Nat → Prop) (h : p (a + 1 + a + 2 + b)) : p (2*a + b + 3) := by
|
|
simp_arith at h
|
|
assumption
|
|
|
|
#print ex6
|