Zulip Chat Archive
Stream: Is there code for X?
Topic: Iff not
Marcus Rossel (Apr 13 2023 at 12:02):
Does the following lemma not exist (in mathlib 4)?:
example (p q : Prop) : (p ↔ q) ↔ (¬p ↔ ¬q) := ...
Library search couldn't find it.
Yaël Dillies (Apr 13 2023 at 12:03):
Eric Wieser (Apr 13 2023 at 12:03):
docs#iff.not docs4#Iff.not :point_up:
Marcus Rossel (Apr 13 2023 at 12:04):
Thanks! I guess library search (for mathlib 4) isn't quite ready yet?
Yaël Dillies (Apr 13 2023 at 12:05):
What does example (p q : Prop) : (¬ p ↔ ¬ q) ↔ (p ↔ q) := by library_search
do?
Marcus Rossel (Apr 13 2023 at 12:09):
That works
Kevin Buzzard (Apr 13 2023 at 13:22):
I guess the rule of thumb is "more complex expression on the left hand side" but even so I thought that lean 3 library search would have got it
Eric Wieser (Apr 13 2023 at 13:28):
I think lean3 library search does, but this is Lean 4
Scott Morrison (Apr 13 2023 at 20:50):
Interesting, I thought I had fixed Lean4's library_search to find the symmetric versions of lemmas. I created https://github.com/leanprover-community/mathlib4/issues/3426 to track library_search issues, and anyone should feel free to contribute examples that should work there.
Last updated: Dec 20 2023 at 11:08 UTC