diff options
author | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2019-04-23 15:00:41 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2019-04-23 15:00:41 +0200 |
commit | 51c497b2e5a2b09788f2cf05f414634b037f52bf (patch) | |
tree | d1cfcc98a74cb78a042d90f91f6092078b3f3a0f /common/Switch.v | |
parent | b66ddea9b0304d390b56afadda80fa4d2f2184d6 (diff) | |
download | compcert-kvx-51c497b2e5a2b09788f2cf05f414634b037f52bf.tar.gz compcert-kvx-51c497b2e5a2b09788f2cf05f414634b037f52bf.zip |
lib/Coqlib.v: remove defns about multiplication, division, modulus
Instead, use definitions and lemmas from the Coq standard library
(ZArith, Znumtheory).
Diffstat (limited to 'common/Switch.v')
-rw-r--r-- | common/Switch.v | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/Switch.v b/common/Switch.v index 0ef91d60..5a6d4c63 100644 --- a/common/Switch.v +++ b/common/Switch.v @@ -288,10 +288,10 @@ Lemma validate_jumptable_correct: Proof. intros. rewrite (validate_jumptable_correct_rec cases tbl ofs); auto. -- f_equal. f_equal. rewrite Zmod_small. omega. +- f_equal. f_equal. rewrite Z.mod_small. omega. destruct (zle ofs v). omega. assert (M: ((v - ofs) + 1 * modulus) mod modulus = (v - ofs) + modulus). - { rewrite Zmod_small. omega. omega. } + { rewrite Z.mod_small. omega. omega. } rewrite Z_mod_plus in M by auto. rewrite M in H0. omega. - generalize (Z_mod_lt (v - ofs) modulus modulus_pos). omega. Qed. @@ -331,7 +331,7 @@ Proof. rewrite (split_between_prop v _ _ _ _ _ _ EQ). assert (0 <= (v - ofs) mod modulus < modulus) by (apply Z_mod_lt; omega). destruct (zlt ((v - ofs) mod modulus) sz). - rewrite Zmod_small by omega. eapply validate_jumptable_correct; eauto. + rewrite Z.mod_small by omega. eapply validate_jumptable_correct; eauto. eapply IHt; eauto. Qed. |