aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorJames Pollard <james@pollard.dev>2020-06-29 21:29:32 +0100
committerJames Pollard <james@pollard.dev>2020-06-29 21:29:32 +0100
commit1e0d5047d2272fdeb06391d1c5fa4e0472be2365 (patch)
tree7287aa9e2ce8ea25e1007c95296fd75df684347f /src/common
parent9aa32499597678e3b0e7ef0b8a85ca5beda44938 (diff)
downloadvericert-1e0d5047d2272fdeb06391d1c5fa4e0472be2365.tar.gz
vericert-1e0d5047d2272fdeb06391d1c5fa4e0472be2365.zip
Eliminate memory bounds assumption!
Diffstat (limited to 'src/common')
-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.