Skip to content

Commit

Permalink
chore(data/nat/prime): slightly golf proof of mem_factors (#12143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-VandeVelde committed Feb 21, 2022
1 parent afcc7e7 commit b3b5e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/nat/prime.lean
Expand Up @@ -692,7 +692,7 @@ begin
end

lemma mem_factors {n p} (hn : n ≠ 0) : p ∈ factors n ↔ prime p ∧ p ∣ n :=
⟨λ h, ⟨prime_of_mem_factors h, (mem_factors_iff_dvd hn $ prime_of_mem_factors h).mp h⟩,
⟨λ h, ⟨prime_of_mem_factors h, dvd_of_mem_factors h⟩,
λ ⟨hprime, hdvd⟩, (mem_factors_iff_dvd hn hprime).mpr hdvd⟩

lemma le_of_mem_factors {n p : ℕ} (h : p ∈ n.factors) : p ≤ n :=
Expand Down

0 comments on commit b3b5e35

Please sign in to comment.