diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-05-16 17:45:04 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-05-16 17:48:25 +0200 |
commit | 9b2beca375e1b3fd8f1298ee13656124fe24e807 (patch) | |
tree | daa04e29821321c1e63a6fd29288cae036de0d7a /proofs/proofview.ml | |
parent | cdaf25c41414510f9ebc0eeea174ed3f3ce0b91b (diff) |
Fix bug #4737: cycle tactic doesn't like zero goals.
Diffstat (limited to 'proofs/proofview.ml')
-rw-r--r-- | proofs/proofview.ml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml index 6d7dcb925..57ff77708 100644 --- a/proofs/proofview.ml +++ b/proofs/proofview.ml @@ -660,11 +660,12 @@ let with_shelf tac = (** [goodmod p m] computes the representative of [p] modulo [m] in the interval [[0,m-1]].*) let goodmod p m = - let p' = p mod m in - (* if [n] is negative [n mod l] is negative of absolute value less - than [l], so [(n mod l)+l] is the representative of [n] in the - interval [[0,l-1]].*) - if p' < 0 then p'+m else p' + if m = 0 then 0 else + let p' = p mod m in + (* if [n] is negative [n mod l] is negative of absolute value less + than [l], so [(n mod l)+l] is the representative of [n] in the + interval [[0,l-1]].*) + if p' < 0 then p'+m else p' let cycle n = let open Proof in |