Description of the problem
A statement that can be normally proved by lia causes divergence if the hypothesis unsigned n is turned into a section variable. Note that the definition of unsigned involves the very large constant wB (which is 2^63).
Note: this is not an artificial example... I have run into this problem in a real proof.
Thanks!
Small Rocq / Coq file to reproduce the bug
From Stdlib Require Import ZArith Lia.
From Stdlib Require Import Uint63 ZifyUint63.
Open Scope Z_scope.
Notation unsigned z :=
(0 <= z < wB).
(* This proof works: *)
Goal forall n : Z, unsigned n -> 0 < n -> unsigned (n-1).
Proof. lia. Qed.
(* Now let's try the same thing again, using a section: *)
Section S.
Variable n : Z.
Variable bound_n : unsigned n.
Goal True.
Proof.
lia. (* does not terminate! *)
Qed.
End S.
Version of Rocq / Coq where this bug occurs
No response
Interface of Rocq / Coq where this bug occurs
No response
Last version of Rocq / Coq where the bug did not occur
No response
Description of the problem
A statement that can be normally proved by
liacauses divergence if the hypothesisunsigned nis turned into a section variable. Note that the definition ofunsignedinvolves the very large constantwB(which is2^63).Note: this is not an artificial example... I have run into this problem in a real proof.
Thanks!
Small Rocq / Coq file to reproduce the bug
Version of Rocq / Coq where this bug occurs
No response
Interface of Rocq / Coq where this bug occurs
No response
Last version of Rocq / Coq where the bug did not occur
No response