From f5e8adaf854212883568e60baa19a38668609dad Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 11 Dec 2018 20:16:04 -0500 Subject: Add ZRange.cc_m, ZRange.is_bounded_by_bool_cc_m --- src/Util/ZRange/Operations.v | 1 + src/Util/ZRange/OperationsBounds.v | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'src/Util') 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) -- cgit v1.2.3