diff options
author | 2016-06-20 02:26:56 -0400 | |
---|---|---|
committer | 2016-06-20 02:26:56 -0400 | |
commit | b41ac7998a11354618b122874c03bc68c2833a94 (patch) | |
tree | 392059ae71999c37174187ec194826262dc59ca8 /src/ModularArithmetic/ModularArithmeticTheorems.v | |
parent | 2d7d0872895639be94f6b274bbe2ef05044bd6db (diff) |
[F q] is [Algebra.field]
Diffstat (limited to 'src/ModularArithmetic/ModularArithmeticTheorems.v')
-rw-r--r-- | src/ModularArithmetic/ModularArithmeticTheorems.v | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ModularArithmetic/ModularArithmeticTheorems.v b/src/ModularArithmetic/ModularArithmeticTheorems.v index 4e0ba461e..5a84d80b7 100644 --- a/src/ModularArithmetic/ModularArithmeticTheorems.v +++ b/src/ModularArithmetic/ModularArithmeticTheorems.v @@ -150,14 +150,12 @@ Section FandZ. Qed. Require Crypto.Algebra. - Global Instance ring_modulo : @Algebra.ring (F m) Logic.eq (ZToField 0) (ZToField 1) opp add sub mul. + Global Instance commutative_ring_modulo : @Algebra.commutative_ring (F m) Logic.eq (ZToField 0) (ZToField 1) opp add sub mul. Proof. - repeat split; Fdefn. + repeat split; Fdefn; try apply F_eq_dec. { rewrite Z.add_0_r. auto. } - { apply F_eq_dec. } { rewrite <-Z.add_sub_swap, <-Z.add_sub_assoc, Z.sub_diag, Z.add_0_r. apply Z_mod_same_full. } { rewrite Z.mul_1_r. auto. } - { apply F_eq_dec. } Qed. Lemma ZToField_0 : @ZToField m 0 = 0. |