aboutsummaryrefslogtreecommitdiff
path: root/src/Compilers/Z/Bounds
diff options
context:
space:
mode:
authorGravatar Jason Gross <jagro@google.com>2018-06-27 19:37:10 -0400
committerGravatar Jason Gross <jagro@google.com>2018-06-27 19:37:10 -0400
commit174d4398c5198a3fae5b1ece9df58edb17ded679 (patch)
tree9be974974de440882b86b198d1aaa1c916b399f2 /src/Compilers/Z/Bounds
parent0e65b08ae341df1a270c9f0cb68fcd65463355d6 (diff)
Try out stronger land, lor bounds
Diffstat (limited to 'src/Compilers/Z/Bounds')
-rw-r--r--src/Compilers/Z/Bounds/InterpretationLemmas/IsBoundedBy.v22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Compilers/Z/Bounds/InterpretationLemmas/IsBoundedBy.v b/src/Compilers/Z/Bounds/InterpretationLemmas/IsBoundedBy.v
index ba0582827..45566839a 100644
--- a/src/Compilers/Z/Bounds/InterpretationLemmas/IsBoundedBy.v
+++ b/src/Compilers/Z/Bounds/InterpretationLemmas/IsBoundedBy.v
@@ -119,7 +119,7 @@ Local Ltac apply_is_bounded_by_truncation_bounds :=
=> apply is_bounded_by_truncation_bounds'
end.
Local Ltac handle_mul :=
- apply ZRange.monotone_four_corners_genb; try (split; auto);
+ apply (ZRange.monotone_four_corners_genb Z.mul); try (split; auto);
unfold Basics.flip;
let x := fresh "x" in
intro x;
@@ -161,13 +161,13 @@ Proof.
=> generalize dependent (interpToZ x); clear x; intros
| [ |- _ /\ True ] => split; [ | tauto ]
end ].
- { apply (@ZRange.monotone_four_corners true true _ _); split; auto. }
- { apply (@ZRange.monotone_four_corners true false _ _); split; auto. }
+ { apply (@ZRange.monotone_four_corners true true Z.add _); split; auto. }
+ { apply (@ZRange.monotone_four_corners true false Z.sub _); split; auto. }
{ handle_mul. }
- { apply ZRange.monotone_four_corners_genb; try (split; auto);
+ { apply (ZRange.monotone_four_corners_genb Z.shiftl); try (split; auto);
[ eexists; apply Z.shiftl_le_Proper1
| exists true; apply Z.shiftl_le_Proper2 ]. }
- { apply ZRange.monotone_four_corners_genb; try (split; auto);
+ { apply (ZRange.monotone_four_corners_genb Z.shiftr); try (split; auto);
[ eexists; apply Z.shiftr_le_Proper1
| exists true; apply Z.shiftr_le_Proper2 ]. }
{ cbv [Bounds.land Bounds.extremization_bounds]; break_innermost_match;
@@ -197,14 +197,14 @@ Proof.
{ apply Z.mod_bound_min_max; auto. }
{ handle_mul. }
{ auto with zarith. }
- { apply (@ZRange.monotone_eight_corners true true true _ _ _); split; auto. }
- { apply (@ZRange.monotone_eight_corners true true true _ _ _); split; auto. }
+ { apply (@ZRange.monotone_eight_corners true true true Z.add_with_carry _ _); split; auto. }
+ { apply (@ZRange.monotone_eight_corners true true true Z.add_with_carry _ _); split; auto. }
{ apply Z.mod_bound_min_max; auto. }
- { apply (@ZRange.monotone_eight_corners true true true _ _ _); split; auto. }
+ { apply (@ZRange.monotone_eight_corners true true true Z.add_with_carry _ _); split; auto. }
{ auto with zarith. }
- { apply (@ZRange.monotone_eight_corners false true false _ _ _); split; auto. }
- { apply (@ZRange.monotone_eight_corners false true false _ _ _); split; auto. }
+ { apply (@ZRange.monotone_eight_corners false true false Z.sub_with_borrow _ _); split; auto. }
+ { apply (@ZRange.monotone_eight_corners false true false Z.sub_with_borrow _ _); split; auto. }
{ apply Z.mod_bound_min_max; auto. }
- { apply (@ZRange.monotone_eight_corners false true false _ _ _); split; auto. }
+ { apply (@ZRange.monotone_eight_corners false true false Z.sub_with_borrow _ _); split; auto. }
{ auto with zarith. }
Qed.