Zulip Chat Archive
Stream: new members
Topic: library_search returning non-working suggestion
Carl Friedrich Bolz-Tereick (Jun 25 2020 at 10:52):
Is it expected that library_search sometimes returns a suggestion that only almost works? Here's an example that I ran into today:
import data.fintype.basic
lemma surprising_library_search_result (T : Type) (s t : finset T) (a : T) (ha : a ∈ t) (hsub : t ⊆ s) : a ∈ s :=
begin
library_search -- this suggests "exact hsub a ha", which doesn't work, needs to be "hsub ha" or "@hsub a ha"
end
Kevin Buzzard (Jun 25 2020 at 10:57):
That's probably a bug. There might be a library search issue on GitHub, you could add your example to that or, if there isn't, you can open a new issue. Otherwise your comment might just get lost in general Zulip noise
Shing Tak Lam (Jun 25 2020 at 11:20):
#3093 . I found this same issue a few days ago.
Carl Friedrich Bolz-Tereick (Jun 25 2020 at 11:24):
right, thank you, @Shing Tak Lam seems you found the exact same example even :-)
Shing Tak Lam (Jun 25 2020 at 11:24):
Your example is the exact same (modulo variable names) as mine from the GitHub error lol.
https://github.com/leanprover-community/mathlib/issues/3093#issuecomment-645238764
I think this is with how how library_search
deals with ∀ ⦃a⦄
, but I'm not sure. I tried debugging the issue with some help from Gabriel, but to no avail (see the comment in the thread).
Carl Friedrich Bolz-Tereick (Jun 25 2020 at 11:26):
right
Carl Friedrich Bolz-Tereick (Jun 25 2020 at 11:26):
it wasn't a big problem to still use the result, I was just surprised
Jannis Limperg (Jun 25 2020 at 11:48):
[Sorry, wrong thread, I'm too stupid for Zulip.]
Last updated: Dec 20 2023 at 11:08 UTC