Zulip Chat Archive
Stream: general
Topic: ne.def
Johan Commelin (Sep 10 2020 at 03:11):
Would it be evil to teach rw about ne.def? I find it quite frustrating that rw fails because I have \ne instead of a \not _ = _ or vice versa.
Jalex Stark (Sep 10 2020 at 11:38):
I guess to combat the evilness we want a story for how to avoid scope creep that turns rw into simp_rw or something else it's not supposed to be. Maybe something like "we teach it only about 'basic logic synonyms'"?
Reid Barton (Sep 10 2020 at 11:50):
What's an example where this is an issue? As far as I can tell ne is reducible and rw should already look through reducible things.
Johan Commelin (Sep 10 2020 at 11:51):
If you have \not n = 0, and you want to rw \l nat.pos_iff_ne_zero, that seems to fail. Let me build a mwe
Reid Barton (Sep 10 2020 at 11:51):
I guess there are two possible cases: the goal contains a \ne b but you want to rewrite using a lemma that says a = b \iff ...; or the goal contains \not (a = b) but you want to rewrite using a lemma that says a \ne b \iff
Johan Commelin (Sep 10 2020 at 11:53):
Kevin Buzzard (Sep 10 2020 at 11:54):
lemma ne1 (n : ℕ) : n ≠ 0 ↔ true := sorry
lemma ne2 (n : ℕ) : ¬(n = 0) ↔ true := sorry
example (n : ℕ) : n ≠ 0 ↔ false :=
begin
rw ne2, -- fails
end
example (n : ℕ) : ¬ (n = 0) ↔ false :=
begin
rw ne1, -- fails
end
They're both failing for me.
Reid Barton (Sep 10 2020 at 11:55):
I wonder what md := reducible in rewrite_cfg does then
Reid Barton (Sep 10 2020 at 11:56):
actually even erw fails, and even if you tell it n
Kevin Buzzard (Sep 10 2020 at 13:28):
Has this always been the case?
Last updated: May 02 2025 at 03:31 UTC