aboutsummaryrefslogtreecommitdiff
path: root/test-suite/bugs/closed
diff options
context:
space:
mode:
authorJason Gross2017-05-30 12:48:47 -0400
committerJason Gross2017-06-01 03:55:05 -0400
commit1d6a1036a7c472e1f20c5ec586d2484203a2fe2e (patch)
tree582c15703090acc0f79d930f0f0c81d5ed2b9440 /test-suite/bugs/closed
parent4af77d01c434ff11f0899d504628f4ff91c49142 (diff)
Fix bug #5019 (looping zify on dependent types)
This fixes [bug #5019](https://coq.inria.fr/bugs/show_bug.cgi?id=5019), "[zify] loops on dependent types"; before, we would see a `Z.of_nat (S ?k)` which could not be turned into `Z.succ (Z.of_nat k)`, add a hypothesis of the shape `0 <= Z.of_nat (S k)`, turn that into a hypothesis of the shape `0 <= Z.succ (Z.of_nat k)`, and loop forever on this. This may not be the "right" fix (there may be cases where `zify` should succeed where it still fails with this change), but this is a pure bugfix in the sense that the only places where it changes the behavior of `zify` are the places where, previously, `zify` looped forever.
Diffstat (limited to 'test-suite/bugs/closed')
-rw-r--r--test-suite/bugs/closed/5019.v5
1 files changed, 5 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/5019.v b/test-suite/bugs/closed/5019.v
new file mode 100644
index 0000000000..7c973f88b5
--- /dev/null
+++ b/test-suite/bugs/closed/5019.v
@@ -0,0 +1,5 @@
+Require Import Coq.ZArith.ZArith.
+Goal forall (T0 : Z -> Type) (k : nat) d (P : T0 (Z.of_nat (S k)) -> Prop), P d.
+ clear; intros.
+ Timeout 1 zify. (* used to loop forever; should take < 0.01 s *)
+Admitted.