Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit ae5b55b

Browse files
committed
feat(algebra/ring): ring_hom.map_dvd (#2813)
Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
1 parent 52b839f commit ae5b55b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/algebra/ring.lean

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ is_ring_hom, is_semiring_hom, ring_hom, semiring_hom, semiring, comm_semiring, r
4747
domain, integral_domain, nonzero_comm_semiring, nonzero_comm_ring, units
4848
-/
4949
universes u v w
50-
variable {α : Type u}
50+
variables {α : Type u} {β : Type v} {γ : Type w}
5151

5252
set_option default_priority 100 -- see Note [default priority]
5353
set_option old_structure_cmd true
@@ -219,7 +219,7 @@ lemma coe_add_monoid_hom {α : Type*} {β : Type*} {rα : semiring α} {rβ : se
219219

220220
namespace ring_hom
221221

222-
variables {β : Type v} {γ : Type w} [rα : semiring α] [rβ : semiring β]
222+
variables [rα : semiring α] [rβ : semiring β]
223223

224224
section
225225
include rα rβ
@@ -326,7 +326,7 @@ end ring_hom
326326
class comm_semiring (α : Type u) extends semiring α, comm_monoid α
327327

328328
section comm_semiring
329-
variables [comm_semiring α] {a b c : α}
329+
variables [comm_semiring α] [comm_semiring β] {a b c : α}
330330

331331
instance comm_semiring_has_dvd : has_dvd α :=
332332
has_dvd.mk (λ a b, ∃ c, b = a * c)
@@ -407,6 +407,9 @@ dvd.elim h (begin intros d h₁, rw [h₁, mul_assoc], apply dvd_mul_right end)
407407
theorem dvd_of_mul_left_dvd (h : a * b ∣ c) : b ∣ c :=
408408
dvd.elim h (λ d ceq, dvd.intro (a * d) (by simp [ceq]))
409409

410+
lemma ring_hom.map_dvd (f : α →+* β) {a b : α} : a ∣ b → f a ∣ f b :=
411+
λ ⟨z, hz⟩, ⟨f z, by rw [hz, f.map_mul]⟩
412+
410413
end comm_semiring
411414

412415
/- ring -/

0 commit comments

Comments
 (0)