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

Commit b61ce02

Browse files
kbuzzardineswright
andcommitted
feat(number_theory/padics/padic_norm): add p^v(n) | n (#8442)
Add some API for `padic_val_nat` (a convenient function for e.g. Sylow theory). Co-authored-by: Ines W <ineswright7@gmail.com>
1 parent 7ae8da4 commit b61ce02

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/number_theory/padics/padic_norm.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,28 @@ begin
398398
exact lt_irrefl 0 (lt_of_lt_of_le zero_lt_one hp),
399399
end
400400

401+
lemma pow_padic_val_nat_dvd {p n : ℕ} [fact (nat.prime p)] : p ^ (padic_val_nat p n) ∣ n :=
402+
begin
403+
cases eq_zero_or_pos n with hn hn,
404+
{ rw hn, exact dvd_zero (p ^ padic_val_nat p 0) },
405+
{ rw multiplicity.pow_dvd_iff_le_multiplicity,
406+
apply le_of_eq,
407+
rw padic_val_nat_def (ne_of_gt hn),
408+
{ apply enat.coe_get },
409+
{ apply_instance } }
410+
end
411+
412+
lemma pow_succ_padic_val_nat_not_dvd {p n : ℕ} [hp : fact (nat.prime p)] (hn : 0 < n) :
413+
¬ p ^ (padic_val_nat p n + 1) ∣ n :=
414+
begin
415+
{ rw multiplicity.pow_dvd_iff_le_multiplicity,
416+
rw padic_val_nat_def (ne_of_gt hn),
417+
{ rw [enat.coe_add, enat.coe_get],
418+
simp only [enat.coe_one, not_le],
419+
apply enat.lt_add_one (ne_top_iff_finite.2 (finite_nat_iff.2 ⟨hp.elim.ne_one, hn⟩)) },
420+
{ apply_instance } }
421+
end
422+
401423
lemma padic_val_nat_primes {p q : ℕ} [p_prime : fact p.prime] [q_prime : fact q.prime]
402424
(neq : p ≠ q) : padic_val_nat p q = 0 :=
403425
@padic_val_nat_of_not_dvd p p_prime q $

src/ring_theory/multiplicity.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ eq_some_iff.2 (by simpa)
148148
lemma eq_top_iff_not_finite {a b : α} : multiplicity a b = ⊤ ↔ ¬ finite a b :=
149149
roption.eq_none_iff'
150150

151+
lemma ne_top_iff_finite {a b : α} : multiplicity a b ≠ ⊤ ↔ finite a b :=
152+
by rw [ne.def, eq_top_iff_not_finite, not_not]
153+
154+
lemma lt_top_iff_finite {a b : α} : multiplicity a b < ⊤ ↔ finite a b :=
155+
by rw [lt_top_iff_ne_top, ne_top_iff_finite]
156+
151157
open_locale classical
152158

153159
lemma multiplicity_le_multiplicity_iff {a b c d : α} : multiplicity a b ≤ multiplicity c d ↔

0 commit comments

Comments
 (0)