Zulip Chat Archive
Stream: new members
Topic: Is there a push_neg attribute?
Rida Hamadani (Aug 12 2024 at 06:10):
I would like to have docs#not_nonempty_iff apply automatically after push_neg
or !
, such as at contrapose!
. Is there a way to make this happen similar to how simp
or norm_num
attributes are added? Note that adding push_neg
as an attribute gives an unknown attribute
error.
Johan Commelin (Aug 12 2024 at 06:47):
Currently push_neg
uses a hard-coded list of lemmas. See Mathlib/Tactic/PushNeg.lean
Rida Hamadani (Aug 12 2024 at 06:52):
Thank you!
Rida Hamadani (Aug 14 2024 at 10:24):
I was trying to add that lemma to the hard-coded list, but Mathlib/Tactic/PushNeg.lean
does not even import IsEmpty
, is there a way to make push_neg
use lemmas such as docs#not_nonempty_iff, without making it import many files?
Johan Commelin (Aug 14 2024 at 12:02):
I think it will need a redesign for that to happen. cc @Patrick Massot who is the original author.
Patrick Massot (Aug 14 2024 at 13:51):
I think this could be added without too much trouble.
Rida Hamadani (Aug 14 2024 at 15:06):
Patrick Massot said:
I think this could be added without too much trouble.
Adding that particular lemma, or the ability to add lemmas without having to import more files in PushNeg.lean
?
Patrick Massot (Aug 14 2024 at 15:56):
The ability to add lemmas.
Last updated: May 02 2025 at 03:31 UTC