Skip to content

Commit

Permalink
feat(algebra/char_p): eq_iff_modeq_int (#2731)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcommelin committed May 18, 2020
1 parent 9d762df commit f01260a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/algebra/char_p.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Characteristic of semirings.

import data.fintype.basic
import data.nat.choose
import data.int.modeq
import algebra.module

universes u v
Expand Down Expand Up @@ -84,6 +85,11 @@ begin
rw [pow_zero, nat.sub_zero, one_mul, nat.choose_zero_right, nat.cast_one, mul_one]
end

lemma eq_iff_modeq_int (R : Type*) [ring R] (p : ℕ) [char_p R p] (a b : ℤ) :
(a : R) = b ↔ a ≡ b [ZMOD p] :=
by rw [eq_comm, ←sub_eq_zero, ←int.cast_sub,
char_p.int_cast_eq_zero_iff R p, int.modeq.modeq_iff_dvd]

section frobenius

variables (R : Type u) [comm_ring R] {S : Type v} [comm_ring S] (f : R →* S) (g : R →+* S)
Expand Down

0 comments on commit f01260a

Please sign in to comment.