Commit graph

19 commits

Author SHA1 Message Date
Joachim Breitner
0e49576fe4
feat: guard_msgs to treat trace messages separate (#8267)
This PR makes `#guard_msgs` to treat `trace` messages separate from
`info`, `warning` and `error`. It also introduce the ability to say
`#guard_msgs (pass info`, like `(drop info)` so far, and also adds
`(check info)` as the explicit form of `(info)`, for completeness.

Fixes #8266
2025-05-09 05:44:34 +00:00
Kim Morrison
3a457e6ad6
chore: use #guard_msgs in run tests (#4175)
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.)
2024-05-16 00:38:31 +00:00
Joachim Breitner
b181fd83ef
feat: in conv tactic, use try with_reducibe rfl (#3763)
The `conv` tactic tries to close “trivial” goals after itself. As of
now, it uses
`try rfl`, which means it can close goals that are only trivial after
reducing with
default transparency. This is suboptimal

* this can require a fair amount of unfolding, and possibly slow down
the proof
   a lot. And the user cannot even prevent it.
* it does not match what `rw` does, and a user might expect the two to
behave the
   same.

So this PR changes it to `with_reducible rfl`, matching `rw`’s behavior.

I considered `with_reducible eq_refl` to only solve trivial goals that
involve equality,
but not other relations (e.g. `Perm xs xs`), but a discussion on mathlib
pointed out
that it’s expected and desirable to solve more general reflexive goals:


https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Closing.20after.20.60rw.60.2C.20.60conv.60.3A.20.60eq_refl.60.20instead.20of.20.60rfl.60/near/429851605
2024-03-29 11:59:45 +00:00
Mario Carneiro
5f39370d94 chore: rename skip conv to rfl and add no-op skip 2022-08-01 13:54:36 -07:00
Leonardo de Moura
04b7924154 chore: fix tests 2021-09-16 10:29:38 -07:00
Leonardo de Moura
029c5b74a2 feat: ignore implicit arguments at congr conv tactic 2021-09-05 09:44:52 -07:00
Leonardo de Moura
aedc706e7d feat: in modifier at conv tactic
It is just a macro for `pattern`
2021-09-04 18:20:33 -07:00
Leonardo de Moura
229373a7e6 chore: fix test 2021-09-03 18:59:13 -07:00
Leonardo de Moura
3f70bc543f feat: add simp conv tactic 2021-09-03 12:06:29 -07:00
Leonardo de Moura
8a249bddd2 feat: add try rfl at end of convTarget 2021-09-03 08:14:47 -07:00
Leonardo de Moura
b5b5ef6fdf feat: add funext conv tactic 2021-09-03 08:00:37 -07:00
Leonardo de Moura
95b83ac2c0 feat: add 'conv at .. => ..' support 2021-09-02 19:40:08 -07:00
Leonardo de Moura
397774157f feat: nested tactic support in conv mode 2021-09-02 19:12:05 -07:00
Leonardo de Moura
41ce24e2c6 feat: add done and traceState conv tactics 2021-09-02 18:46:03 -07:00
Leonardo de Moura
33361929b9 feat: add rewrite conv tactic 2021-09-02 18:13:19 -07:00
Leonardo de Moura
4df9983843 feat: lhs and rhs conv tactics 2021-09-02 15:05:51 -07:00
Leonardo de Moura
e3ccc03a45 chore: add nested conv tactics 2021-09-01 18:44:35 -07:00
Leonardo de Moura
7a69c6483d feat: add congr conv tactic 2021-09-01 18:32:21 -07:00
Leonardo de Moura
346e3ac845 feat: add helper methods for conv 2021-09-01 17:43:32 -07:00