Zulip Chat Archive

Stream: mathlib4

Topic: Exact? fails on le_antisymm


Bhavik Mehta (Sep 04 2023 at 13:32):

import Mathlib.Data.Real.Basic

example {x y : } (hxy : x  y) (hyx : y  x) : x = y := by exact?

This fails (and came up in Jakob's talk at LftCM) - is this expected behaviour?

Alex J. Best (Sep 04 2023 at 13:37):

The explanation for this is that conclusion a = b is very generic. so exact? skips putting such things in its discrimination tree for efficiency reasons afaiu. I definitely agree that we need to find some way to improve this situation (i.e. print a nice warning in this case at the very least, or implement an "exact? but I don't care if its slow please try with very generic lemmas in the tree also" mode).

Scott Morrison (Sep 04 2023 at 23:34):

Maybe at this point it is fine to just put them back in. We already prioritize trying more specific lemmas first, so hopefully the "not specific at all" lemmas would automatically be tried last.

If someone wants to try this out, just find where in LibrarySearch.lean we use insertIfSpecific and just it to insert!

Scott Morrison (Nov 17 2023 at 03:51):

#8459


Last updated: Dec 20 2023 at 11:08 UTC