Zulip Chat Archive

Stream: general

Topic: ring_exp bug


Patrick Massot (Jan 12 2022 at 11:31):

@Anne Baanen ring_exp is not pleasing the kernel:

import tactic.ring_exp data.real.basic

example (l ε : ) (ε_pos : ε  0) : |l - l|  ε :=
begin
  ring_exp,
  rw abs_zero,
  exact ε_pos,
end

Patrick Massot (Jan 12 2022 at 11:33):

Sorry about the edits, I simplified the example

Patrick Massot (Jan 12 2022 at 11:33):

To be clear: the interactive Lean says "goals accomplished" but the proof is rejected by the kernel.

Patrick Massot (Jan 12 2022 at 11:34):

and replacing ring_exp by ring_nf works

Anne Baanen (Jan 12 2022 at 11:40):

Thanks for the bug report! From a quick check, it looks like the issue occurs when the goal can't be closed and ring_exp tries to normalize as much as possible.

Anne Baanen (Jan 12 2022 at 11:41):

Further simplified example:

import tactic.ring_exp

example (l : ) : l - l = 0 :=
begin
  tactic.replace_at (tactic.ring_exp.normalize tactic.transparency.reducible) [] tt >> pure (),
  refl
end

Anne Baanen (Jan 12 2022 at 12:19):

#11394

Patrick Massot (Jan 12 2022 at 12:31):

Thanks a lot for this very quick fix!


Last updated: Dec 20 2023 at 11:08 UTC