Skip to content

Commit

Permalink
chore(algebra/associated): move prime_dvd_prime_iff_eq (#12706)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-VandeVelde committed Mar 15, 2022
1 parent 7ed4f2c commit b622d4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/algebra/associated.lean
Expand Up @@ -432,6 +432,11 @@ end
theorem associated_eq_eq : (associated : α → α → Prop) = eq :=
by { ext, rw associated_iff_eq }

lemma prime_dvd_prime_iff_eq
{M : Type*} [cancel_comm_monoid_with_zero M] [unique Mˣ] {p q : M} (pp : prime p) (qp : prime q) :
p ∣ q ↔ p = q :=
by rw [pp.dvd_prime_iff_associated qp, ←associated_eq_eq]

end unique_units

/-- The quotient of a monoid by the `associated` relation. Two elements `x` and `y`
Expand Down
3 changes: 0 additions & 3 deletions src/data/list/prime.lean
Expand Up @@ -46,9 +46,6 @@ section cancel_comm_monoid_with_zero

variables {M : Type*} [cancel_comm_monoid_with_zero M] [unique (units M)]

lemma prime_dvd_prime_iff_eq {p q : M} (pp : prime p) (qp : prime q) : p ∣ q ↔ p = q :=
by rw [pp.dvd_prime_iff_associated qp, ←associated_eq_eq]

lemma mem_list_primes_of_dvd_prod {p : M} (hp : prime p) {L : list M} (hL : ∀ q ∈ L, prime q)
(hpL : p ∣ L.prod) : p ∈ L :=
begin
Expand Down

0 comments on commit b622d4d

Please sign in to comment.