aboutsummaryrefslogtreecommitdiff
path: root/src/Util
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2018-12-11 20:16:04 -0500
committerGravatar Jason Gross <jgross@mit.edu>2018-12-11 20:16:04 -0500
commitf5e8adaf854212883568e60baa19a38668609dad (patch)
tree7536f5834e38dbcf77d1e1732d2c9847c78d9732 /src/Util
parent0bce3c5eb31d57bf630fc8970195b9e176b13b94 (diff)
Add ZRange.cc_m, ZRange.is_bounded_by_bool_cc_m
Diffstat (limited to 'src/Util')
-rw-r--r--src/Util/ZRange/Operations.v1
-rw-r--r--src/Util/ZRange/OperationsBounds.v7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Util/ZRange/Operations.v b/src/Util/ZRange/Operations.v
index a0cf38f42..36548c0c5 100644
--- a/src/Util/ZRange/Operations.v
+++ b/src/Util/ZRange/Operations.v
@@ -188,6 +188,7 @@ Module ZRange.
Notation shiftl := (ZRange.four_corners_and_zero Z.shiftl).
Notation land := land_bounds.
Notation lor := lor_bounds.
+ Notation cc_m s := (ZRange.two_corners (Z.cc_m s)).
Module Export ZRangeNotations.
Notation "- x" := (opp x) : zrange_scope.
diff --git a/src/Util/ZRange/OperationsBounds.v b/src/Util/ZRange/OperationsBounds.v
index d57577210..c75ffbfe2 100644
--- a/src/Util/ZRange/OperationsBounds.v
+++ b/src/Util/ZRange/OperationsBounds.v
@@ -7,6 +7,7 @@ Require Import Crypto.Util.ZRange.CornersMonotoneBounds.
Require Import Crypto.Util.ZRange.LandLorBounds.
Require Import Crypto.Util.ZUtil.Definitions.
Require Import Crypto.Util.ZUtil.Morphisms.
+Require Import Crypto.Util.ZUtil.CC.
Require Import Crypto.Util.Notations.
Module ZRange.
@@ -79,6 +80,12 @@ Module ZRange.
: is_bounded_by_bool (Z.shiftl x y) (ZRange.shiftl x_bs y_bs) = true.
Proof. t. Qed.
+ Lemma is_bounded_by_bool_cc_m
+ s x x_bs
+ (Hboundedx : is_bounded_by_bool x x_bs = true)
+ : is_bounded_by_bool (Z.cc_m s x) (ZRange.cc_m s x_bs) = true.
+ Proof. t. Qed.
+
Lemma is_bounded_by_bool_land
x x_bs y y_bs
(Hboundedx : is_bounded_by_bool x x_bs = true)