aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine/proofview.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-20 11:39:59 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-20 11:39:59 +0200
commitdbe1c641164fc797edf0420f5f5a5e8b60b5a05a (patch)
treef0f4e297a03720e7b60bcc4c4a13eb1deecfe6f1 /engine/proofview.ml
parenta91d15dcb4c691463f0ad6f0e7277a52464d897c (diff)
parent088b3161c93e46ec2d865fe71a206cee15acd30c (diff)
Merge branch 'v8.5'
Diffstat (limited to 'engine/proofview.ml')
-rw-r--r--engine/proofview.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/engine/proofview.ml b/engine/proofview.ml
index 95e20bc25..45af16759 100644
--- a/engine/proofview.ml
+++ b/engine/proofview.ml
@@ -665,11 +665,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