aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/IntegerExtra.v
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-06-30 00:07:38 +0100
committerGitHub <noreply@github.com>2020-06-30 00:07:38 +0100
commit1506d59970e5c81352eefc4c15b4668b56928ab1 (patch)
treef6397bab2319a3ecc8535096bf50c31eb45c761d /src/common/IntegerExtra.v
parent8a260a8b81617e192fc929e0189fd3df1327f80a (diff)
parent1bfb8971328f63f5ae963eef45d7f3d4b9971a2a (diff)
downloadvericert-kvx-1506d59970e5c81352eefc4c15b4668b56928ab1.tar.gz
vericert-kvx-1506d59970e5c81352eefc4c15b4668b56928ab1.zip
Merge pull request #8 from p0llard/develop
Eliminate memory bounds assumptions
Diffstat (limited to 'src/common/IntegerExtra.v')
-rw-r--r--src/common/IntegerExtra.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/IntegerExtra.v b/src/common/IntegerExtra.v
index 8df70d9..7d3156b 100644
--- a/src/common/IntegerExtra.v
+++ b/src/common/IntegerExtra.v
@@ -143,7 +143,7 @@ Module PtrofsExtra.
Lemma divu_unsigned :
forall x y,
0 < Ptrofs.unsigned y ->
- Ptrofs.unsigned x < Ptrofs.max_unsigned ->
+ Ptrofs.unsigned x <= Ptrofs.max_unsigned ->
Ptrofs.unsigned (Ptrofs.divu x y) = Ptrofs.unsigned x / Ptrofs.unsigned y.
Proof.
intros.
@@ -154,7 +154,7 @@ Module PtrofsExtra.
apply Ptrofs.unsigned_range.
apply Z.div_le_upper_bound; auto.
eapply Z.le_trans.
- apply Z.lt_le_incl. exact H0.
+ exact H0.
rewrite Z.mul_comm.
apply Z.le_mul_diag_r; simplify; lia.
Qed.