diff options
author | ckeller <ckeller@users.noreply.github.com> | 2019-02-14 20:09:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-14 20:09:40 +0100 |
commit | ec41af7ac01cef7c30785e6dd704381f31e7c2d3 (patch) | |
tree | 13d51483c50d7b5a668d90b8b67a8b99ef0fbe56 /src/versions/standard/Int63/Int63Axioms_standard.v | |
parent | ba22fad2fb46962eef5f30d976e9eaeb587023a0 (diff) | |
download | smtcoq-ec41af7ac01cef7c30785e6dd704381f31e7c2d3.tar.gz smtcoq-ec41af7ac01cef7c30785e6dd704381f31e7c2d3.zip |
V8.7 (#36)
Port SMTCoq to Coq-8.7
Diffstat (limited to 'src/versions/standard/Int63/Int63Axioms_standard.v')
-rw-r--r-- | src/versions/standard/Int63/Int63Axioms_standard.v | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/versions/standard/Int63/Int63Axioms_standard.v b/src/versions/standard/Int63/Int63Axioms_standard.v index d4e45fc..9a90d39 100644 --- a/src/versions/standard/Int63/Int63Axioms_standard.v +++ b/src/versions/standard/Int63/Int63Axioms_standard.v @@ -11,12 +11,41 @@ Require Import Bvector. -Require Export BigNumPrelude. +(* Require Export BigNumPrelude. *) Require Import Int31 Cyclic31. Require Export Int63Native. Require Export Int63Op. Require Import Psatz. +Local Open Scope Z_scope. + + +(* Taken from BigNumPrelude *) + + Lemma div_le_0 : forall p x, 0 <= x -> 0 <= x / 2 ^ p. + Proof. + intros p x Hle;destruct (Z_le_gt_dec 0 p). + apply Zdiv_le_lower_bound;auto with zarith. + replace (2^p) with 0. + destruct x;compute;intro;discriminate. + destruct p;trivial;discriminate. + Qed. + + Lemma div_lt : forall p x y, 0 <= x < y -> x / 2^p < y. + Proof. + intros p x y H;destruct (Z_le_gt_dec 0 p). + apply Zdiv_lt_upper_bound;auto with zarith. + apply Z.lt_le_trans with y;auto with zarith. + rewrite <- (Z.mul_1_r y);apply Z.mul_le_mono_nonneg;auto with zarith. + assert (0 < 2^p);auto with zarith. + replace (2^p) with 0. + destruct x;change (0<y);auto with zarith. + destruct p;trivial;discriminate. + Qed. + + +(* Int63Axioms *) + Definition wB := (2^(Z_of_nat size)). Notation "[| x |]" := (to_Z x) (at level 0, x at level 99) : int63_scope. |