This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -957,6 +957,25 @@ strict_mono.lt_iff_lt (pow_right_strict_mono k)
957
957
lemma pow_right_injective {x : ℕ} (k : 2 ≤ x) : function.injective (nat.pow x) :=
958
958
strict_mono.injective (pow_right_strict_mono k)
959
959
960
+ lemma pow_dvd_pow_iff_pow_le_pow {k l : ℕ} : Π {x : ℕ} (w : 0 < x), x^k ∣ x^l ↔ x^k ≤ x^l
961
+ | (x+1 ) w :=
962
+ begin
963
+ split,
964
+ { intro a, exact le_of_dvd (pow_pos (succ_pos x) l) a, },
965
+ { intro a, cases x with x,
966
+ { simp only [one_pow], },
967
+ { have le := (pow_le_iff_le_right (le_add_left _ _)).mp a,
968
+ use (x+2 )^(l-k),
969
+ rw [←nat.pow_add, add_comm k, nat.sub_add_cancel le], } }
970
+ end
971
+
972
+ /-- If `1 < x`, then `x^k` divides `x^l` if and only if `k` is at most `l`. -/
973
+ lemma pow_dvd_pow_iff_le_right {x k l : ℕ} (w : 1 < x) : x^k ∣ x^l ↔ k ≤ l :=
974
+ by rw [pow_dvd_pow_iff_pow_le_pow (lt_of_succ_lt w), pow_le_iff_le_right w]
975
+
976
+ lemma pow_dvd_pow_iff_le_right' {b k l : ℕ} : (b+2 )^k ∣ (b+2 )^l ↔ k ≤ l :=
977
+ pow_dvd_pow_iff_le_right (nat.lt_of_sub_eq_succ rfl)
978
+
960
979
lemma pow_left_strict_mono {m : ℕ} (k : 1 ≤ m) : strict_mono (λ (x : ℕ), x^m) :=
961
980
λ _ _ h, pow_lt_pow_of_lt_left h k
962
981
Original file line number Diff line number Diff line change @@ -460,6 +460,20 @@ begin
460
460
rw e, exact pow_dvd_pow _ l } }
461
461
end
462
462
463
+ /--
464
+ If `p` is prime,
465
+ and `a` doesn't divide `p^k`, but `a` does divide `p^(k+1)`
466
+ then `a = p^(k+1)`.
467
+ -/
468
+ lemma eq_prime_pow_of_dvd_least_prime_pow
469
+ {a p k : ℕ} (pp : prime p) (h₁ : ¬(a ∣ p^k)) (h₂ : a ∣ p^(k+1 )) :
470
+ a = p^(k+1 ) :=
471
+ begin
472
+ obtain ⟨l, ⟨h, rfl⟩⟩ := (dvd_prime_pow pp).1 h₂,
473
+ congr,
474
+ exact le_antisymm h (not_le.1 ((not_congr (pow_dvd_pow_iff_le_right (prime.one_lt pp))).1 h₁)),
475
+ end
476
+
463
477
section
464
478
open list
465
479
You can’t perform that action at this time.
0 commit comments