ring_theory.polynomial.cyclotomic.expand ⟷
Mathlib.RingTheory.Polynomial.Cyclotomic.Expand
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
zmod.algebra creates a diamond about the zmod p-algebra structure on zmod p:
import algebra.algebra.basic
import data.zmod.algebra
example (p : ℕ) : algebra.id (zmod p) =
(zmod.algebra (zmod p) p) := rfl --fails
This is also causing troubles with the port. We turn zmod.algebra into a def.
@@ -126,6 +126,7 @@ section char_p
lemma cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type*) {p n : ℕ} [hp : fact (nat.prime p)]
[ring R] [char_p R p] (hn : ¬p ∣ n) : cyclotomic (n * p) R = (cyclotomic n R) ^ (p - 1) :=
begin
+ letI : algebra (zmod p) R := zmod.algebra _ _,
suffices : cyclotomic (n * p) (zmod p) = (cyclotomic n (zmod p)) ^ (p - 1),
{ rw [← map_cyclotomic _ (algebra_map (zmod p) R), ← map_cyclotomic _ (algebra_map (zmod p) R),
this, polynomial.map_pow] },
@@ -141,6 +142,7 @@ end
lemma cyclotomic_mul_prime_dvd_eq_pow (R : Type*) {p n : ℕ} [hp : fact (nat.prime p)] [ring R]
[char_p R p] (hn : p ∣ n) : cyclotomic (n * p) R = (cyclotomic n R) ^ p :=
begin
+ letI : algebra (zmod p) R := zmod.algebra _ _,
suffices : cyclotomic (n * p) (zmod p) = (cyclotomic n (zmod p)) ^ p,
{ rw [← map_cyclotomic _ (algebra_map (zmod p) R), ← map_cyclotomic _ (algebra_map (zmod p) R),
this, polynomial.map_pow] },
@@ -171,6 +173,7 @@ lemma is_root_cyclotomic_prime_pow_mul_iff_of_char_p {m k p : ℕ} {R : Type*} [
[is_domain R] [hp : fact (nat.prime p)] [hchar : char_p R p] {μ : R} [ne_zero (m : R)] :
(polynomial.cyclotomic (p ^ k * m) R).is_root μ ↔ is_primitive_root μ m :=
begin
+ letI : algebra (zmod p) R := zmod.algebra _ _,
rcases k.eq_zero_or_pos with rfl | hk,
{ rw [pow_zero, one_mul, is_root_cyclotomic_iff] },
refine ⟨λ h, _, λ h, _⟩,
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -123,7 +123,7 @@ theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime
induction' k with k hk
· simpa using h
have : m + k ≠ 0 := (add_pos_of_pos_of_nonneg hm k.zero_le).ne'
- rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
+ rw [Nat.add_succ, pow_succ, ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
exact hk (by linarith) (of_irreducible_expand hp.ne_zero h)
#align polynomial.cyclotomic_irreducible_pow_of_irreducible_pow Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow
-/
@@ -150,7 +150,7 @@ theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fa
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
apply mul_right_injective₀ (cyclotomic_ne_zero n <| ZMod p)
- rw [← pow_succ, tsub_add_cancel_of_le hp.out.one_lt.le, mul_comm, ← ZMod.expand_card]
+ rw [← pow_succ', tsub_add_cancel_of_le hp.out.one_lt.le, mul_comm, ← ZMod.expand_card]
nth_rw 3 [← map_cyclotomic_int]
rw [← map_expand, cyclotomic_expand_eq_cyclotomic_mul hp.out hn, Polynomial.map_mul,
map_cyclotomic, map_cyclotomic]
@@ -181,12 +181,12 @@ theorem cyclotomic_mul_prime_pow_eq (R : Type _) {p m : ℕ} [Fact (Nat.Prime p)
rw [pow_one, Nat.sub_self, pow_zero, mul_comm, cyclotomic_mul_prime_eq_pow_of_not_dvd R hm]
| a + 2, _ =>
by
- have hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ]⟩
- rw [pow_succ, mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv,
+ have hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ']⟩
+ rw [pow_succ', mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv,
cyclotomic_mul_prime_pow_eq a.succ_pos, ← pow_mul]
congr 1
simp only [tsub_zero, Nat.succ_sub_succ_eq_sub]
- rw [Nat.mul_sub_right_distrib, mul_comm, pow_succ']
+ rw [Nat.mul_sub_right_distrib, mul_comm, pow_succ]
#align polynomial.cyclotomic_mul_prime_pow_eq Polynomial.cyclotomic_mul_prime_pow_eq
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -123,7 +123,7 @@ theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime
induction' k with k hk
· simpa using h
have : m + k ≠ 0 := (add_pos_of_pos_of_nonneg hm k.zero_le).ne'
- rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
+ rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
exact hk (by linarith) (of_irreducible_expand hp.ne_zero h)
#align polynomial.cyclotomic_irreducible_pow_of_irreducible_pow Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow
-/
@@ -201,10 +201,10 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _}
rcases k.eq_zero_or_pos with (rfl | hk)
· rw [pow_zero, one_mul, is_root_cyclotomic_iff]
refine' ⟨fun h => _, fun h => _⟩
- · rw [is_root.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow] at h
+ · rw [is_root.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow] at h
replace h := pow_eq_zero h
- rwa [← is_root.def, is_root_cyclotomic_iff] at h
- · rw [← is_root_cyclotomic_iff, is_root.def] at h
+ rwa [← is_root.def, is_root_cyclotomic_iff] at h
+ · rw [← is_root_cyclotomic_iff, is_root.def] at h
rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, is_root.def, eval_pow, h,
zero_pow]
simp only [tsub_pos_iff_lt]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -208,7 +208,7 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _}
rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, is_root.def, eval_pow, h,
zero_pow]
simp only [tsub_pos_iff_lt]
- apply pow_strictMono_right hp.out.one_lt (Nat.pred_lt hk.ne')
+ apply pow_right_strictMono hp.out.one_lt (Nat.pred_lt hk.ne')
#align polynomial.is_root_cyclotomic_prime_pow_mul_iff_of_char_p Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2020 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
-import Mathbin.RingTheory.Polynomial.Cyclotomic.Roots
+import RingTheory.Polynomial.Cyclotomic.Roots
#align_import ring_theory.polynomial.cyclotomic.expand from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2020 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-
-! This file was ported from Lean 3 source module ring_theory.polynomial.cyclotomic.expand
-! leanprover-community/mathlib commit 0723536a0522d24fc2f159a096fb3304bef77472
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.RingTheory.Polynomial.Cyclotomic.Roots
+#align_import ring_theory.polynomial.cyclotomic.expand from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"
+
/-!
# Cyclotomic polynomials and `expand`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/0723536a0522d24fc2f159a096fb3304bef77472
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module ring_theory.polynomial.cyclotomic.expand
-! leanprover-community/mathlib commit 2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
+! leanprover-community/mathlib commit 0723536a0522d24fc2f159a096fb3304bef77472
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -148,6 +148,7 @@ section CharP
theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)]
[Ring R] [CharP R p] (hn : ¬p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ (p - 1) :=
by
+ letI : Algebra (ZMod p) R := ZMod.algebra _ _
suffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ (p - 1) by
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
@@ -165,6 +166,7 @@ theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fa
theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)] [Ring R]
[CharP R p] (hn : p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ p :=
by
+ letI : Algebra (ZMod p) R := ZMod.algebra _ _
suffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ p by
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
@@ -198,6 +200,7 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _}
[IsDomain R] [hp : Fact (Nat.Prime p)] [hchar : CharP R p] {μ : R} [NeZero (m : R)] :
(Polynomial.cyclotomic (p ^ k * m) R).IsRoot μ ↔ IsPrimitiveRoot μ m :=
by
+ letI : Algebra (ZMod p) R := ZMod.algebra _ _
rcases k.eq_zero_or_pos with (rfl | hk)
· rw [pow_zero, one_mul, is_root_cyclotomic_iff]
refine' ⟨fun h => _, fun h => _⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -37,6 +37,7 @@ We gather results relating cyclotomic polynomials and `expand`.
namespace Polynomial
+#print Polynomial.cyclotomic_expand_eq_cyclotomic_mul /-
/-- If `p` is a prime such that `¬ p ∣ n`, then
`expand R p (cyclotomic n R) = (cyclotomic (n * p) R) * (cyclotomic n R)`. -/
@[simp]
@@ -82,7 +83,9 @@ theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv
Nat.totient_mul ((Nat.Prime.coprime_iff_not_dvd hp).2 hdiv), Nat.totient_prime hp,
mul_comm (p - 1), ← Nat.mul_succ, Nat.sub_one, Nat.succ_pred_eq_of_pos hp.pos]
#align polynomial.cyclotomic_expand_eq_cyclotomic_mul Polynomial.cyclotomic_expand_eq_cyclotomic_mul
+-/
+#print Polynomial.cyclotomic_expand_eq_cyclotomic /-
/-- If `p` is a prime such that `p ∣ n`, then
`expand R p (cyclotomic n R) = cyclotomic (p * n) R`. -/
@[simp]
@@ -109,7 +112,9 @@ theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p
rw [nat_degree_expand, nat_degree_cyclotomic, nat_degree_cyclotomic, mul_comm n,
Nat.totient_mul_of_prime_of_dvd hp hdiv, mul_comm]
#align polynomial.cyclotomic_expand_eq_cyclotomic Polynomial.cyclotomic_expand_eq_cyclotomic
+-/
+#print Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow /-
/-- If the `p ^ n`th cyclotomic polynomial is irreducible, so is the `p ^ m`th, for `m ≤ n`. -/
theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime p) {R} [CommRing R]
[IsDomain R] {n m : ℕ} (hmn : m ≤ n) (h : Irreducible (cyclotomic (p ^ n) R)) :
@@ -124,16 +129,20 @@ theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime
rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
exact hk (by linarith) (of_irreducible_expand hp.ne_zero h)
#align polynomial.cyclotomic_irreducible_pow_of_irreducible_pow Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow
+-/
+#print Polynomial.cyclotomic_irreducible_of_irreducible_pow /-
/-- If `irreducible (cyclotomic (p ^ n) R)` then `irreducible (cyclotomic p R).` -/
theorem cyclotomic_irreducible_of_irreducible_pow {p : ℕ} (hp : Nat.Prime p) {R} [CommRing R]
[IsDomain R] {n : ℕ} (hn : n ≠ 0) (h : Irreducible (cyclotomic (p ^ n) R)) :
Irreducible (cyclotomic p R) :=
pow_one p ▸ cyclotomic_irreducible_pow_of_irreducible_pow hp hn.bot_lt h
#align polynomial.cyclotomic_irreducible_of_irreducible_pow Polynomial.cyclotomic_irreducible_of_irreducible_pow
+-/
section CharP
+#print Polynomial.cyclotomic_mul_prime_eq_pow_of_not_dvd /-
/-- If `R` is of characteristic `p` and `¬p ∣ n`, then
`cyclotomic (n * p) R = (cyclotomic n R) ^ (p - 1)`. -/
theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)]
@@ -148,7 +157,9 @@ theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fa
rw [← map_expand, cyclotomic_expand_eq_cyclotomic_mul hp.out hn, Polynomial.map_mul,
map_cyclotomic, map_cyclotomic]
#align polynomial.cyclotomic_mul_prime_eq_pow_of_not_dvd Polynomial.cyclotomic_mul_prime_eq_pow_of_not_dvd
+-/
+#print Polynomial.cyclotomic_mul_prime_dvd_eq_pow /-
/-- If `R` is of characteristic `p` and `p ∣ n`, then
`cyclotomic (n * p) R = (cyclotomic n R) ^ p`. -/
theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)] [Ring R]
@@ -160,7 +171,9 @@ theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type _) {p n : ℕ} [hp : Fact (Nat
rw [← ZMod.expand_card, ← map_cyclotomic_int n, ← map_expand,
cyclotomic_expand_eq_cyclotomic hp.out hn, map_cyclotomic, mul_comm]
#align polynomial.cyclotomic_mul_prime_dvd_eq_pow Polynomial.cyclotomic_mul_prime_dvd_eq_pow
+-/
+#print Polynomial.cyclotomic_mul_prime_pow_eq /-
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then
`cyclotomic (p ^ k * m) R = (cyclotomic m R) ^ (p ^ k - p ^ (k - 1))`. -/
theorem cyclotomic_mul_prime_pow_eq (R : Type _) {p m : ℕ} [Fact (Nat.Prime p)] [Ring R] [CharP R p]
@@ -176,7 +189,9 @@ theorem cyclotomic_mul_prime_pow_eq (R : Type _) {p m : ℕ} [Fact (Nat.Prime p)
simp only [tsub_zero, Nat.succ_sub_succ_eq_sub]
rw [Nat.mul_sub_right_distrib, mul_comm, pow_succ']
#align polynomial.cyclotomic_mul_prime_pow_eq Polynomial.cyclotomic_mul_prime_pow_eq
+-/
+#print Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP /-
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then `ζ` is a root of `cyclotomic (p ^ k * m) R`
if and only if it is a primitive `m`-th root of unity. -/
theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _} [CommRing R]
@@ -195,6 +210,7 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _}
simp only [tsub_pos_iff_lt]
apply pow_strictMono_right hp.out.one_lt (Nat.pred_lt hk.ne')
#align polynomial.is_root_cyclotomic_prime_pow_mul_iff_of_char_p Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
+-/
end CharP
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module ring_theory.polynomial.cyclotomic.expand
-! leanprover-community/mathlib commit 5bfbcca0a7ffdd21cf1682e59106d6c942434a32
+! leanprover-community/mathlib commit 2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.RingTheory.Polynomial.Cyclotomic.Roots
/-!
# Cyclotomic polynomials and `expand`.
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We gather results relating cyclotomic polynomials and `expand`.
## Main results
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -118,7 +118,7 @@ theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime
induction' k with k hk
· simpa using h
have : m + k ≠ 0 := (add_pos_of_pos_of_nonneg hm k.zero_le).ne'
- rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
+ rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
exact hk (by linarith) (of_irreducible_expand hp.ne_zero h)
#align polynomial.cyclotomic_irreducible_pow_of_irreducible_pow Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow
@@ -183,10 +183,10 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _}
rcases k.eq_zero_or_pos with (rfl | hk)
· rw [pow_zero, one_mul, is_root_cyclotomic_iff]
refine' ⟨fun h => _, fun h => _⟩
- · rw [is_root.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow] at h
+ · rw [is_root.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow] at h
replace h := pow_eq_zero h
- rwa [← is_root.def, is_root_cyclotomic_iff] at h
- · rw [← is_root_cyclotomic_iff, is_root.def] at h
+ rwa [← is_root.def, is_root_cyclotomic_iff] at h
+ · rw [← is_root_cyclotomic_iff, is_root.def] at h
rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, is_root.def, eval_pow, h,
zero_pow]
simp only [tsub_pos_iff_lt]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ef95945cd48c932c9e034872bd25c3c220d9c946
@@ -156,9 +156,9 @@ theorem cyclotomic_mul_prime_pow_eq (R : Type*) {p m : ℕ} [Fact (Nat.Prime p)]
have hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ']⟩
rw [pow_succ', mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv,
cyclotomic_mul_prime_pow_eq _ _ a.succ_pos, ← pow_mul]
- congr 1
- simp only [tsub_zero, Nat.succ_sub_succ_eq_sub]
- rwa [Nat.mul_sub_right_distrib, mul_comm, pow_succ]
+ · simp only [tsub_zero, Nat.succ_sub_succ_eq_sub]
+ rw [Nat.mul_sub_right_distrib, mul_comm, pow_succ]
+ · assumption
#align polynomial.cyclotomic_mul_prime_pow_eq Polynomial.cyclotomic_mul_prime_pow_eq
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then `ζ` is a root of `cyclotomic (p ^ k * m) R`
@@ -55,14 +55,14 @@ theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv
have hprim := Complex.isPrimitiveRoot_exp _ hpos.ne'
rw [cyclotomic_eq_minpoly_rat hprim hpos]
refine' minpoly.dvd ℚ _ _
- rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.definition,
+ rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def,
@isRoot_cyclotomic_iff]
convert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)
rw [Nat.mul_div_cancel _ (Nat.Prime.pos hp)]
· have hprim := Complex.isPrimitiveRoot_exp _ hnpos.ne.symm
rw [cyclotomic_eq_minpoly_rat hprim hnpos]
refine' minpoly.dvd ℚ _ _
- rw [aeval_def, ← eval_map, map_expand, expand_eval, ← IsRoot.definition, ←
+ rw [aeval_def, ← eval_map, map_expand, expand_eval, ← IsRoot.def, ←
cyclotomic_eq_minpoly_rat hprim hnpos, map_cyclotomic, @isRoot_cyclotomic_iff]
exact IsPrimitiveRoot.pow_of_prime hprim hp hdiv
· rw [natDegree_expand, natDegree_cyclotomic,
@@ -88,7 +88,7 @@ theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p
have hprim := Complex.isPrimitiveRoot_exp _ hpos.ne.symm
rw [cyclotomic_eq_minpoly hprim hpos]
refine' minpoly.isIntegrallyClosed_dvd (hprim.isIntegral hpos) _
- rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.definition,
+ rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def,
@isRoot_cyclotomic_iff]
· convert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)
rw [Nat.mul_div_cancel _ hp.pos]
@@ -169,12 +169,12 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type*} [
rcases k.eq_zero_or_pos with (rfl | hk)
· rw [pow_zero, one_mul, isRoot_cyclotomic_iff]
refine' ⟨fun h => _, fun h => _⟩
- · rw [IsRoot.definition, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow]
+ · rw [IsRoot.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow]
at h
replace h := pow_eq_zero h
- rwa [← IsRoot.definition, isRoot_cyclotomic_iff] at h
- · rw [← isRoot_cyclotomic_iff, IsRoot.definition] at h
- rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.definition, eval_pow,
+ rwa [← IsRoot.def, isRoot_cyclotomic_iff] at h
+ · rw [← isRoot_cyclotomic_iff, IsRoot.def] at h
+ rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.def, eval_pow,
h, zero_pow]
exact Nat.sub_ne_zero_of_lt $ pow_right_strictMono hp.out.one_lt $ Nat.pred_lt hk.ne'
#align polynomial.is_root_cyclotomic_prime_pow_mul_iff_of_char_p Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : ∀ (n : ℕ) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^ in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n xand notnpowRec n x * xin the definition to make sure that definitional unfolding ofnpowRecis blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ and pow_succ' have switched their meanings.Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.@@ -106,7 +106,7 @@ theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime
induction' k with k hk
· simpa using h
have : m + k ≠ 0 := (add_pos_of_pos_of_nonneg hm k.zero_le).ne'
- rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
+ rw [Nat.add_succ, pow_succ, ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
exact hk (by omega) (of_irreducible_expand hp.ne_zero h)
#align polynomial.cyclotomic_irreducible_pow_of_irreducible_pow Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow
@@ -128,7 +128,7 @@ theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type*) {p n : ℕ} [hp : Fac
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
apply mul_right_injective₀ (cyclotomic_ne_zero n <| ZMod p); dsimp
- rw [← pow_succ, tsub_add_cancel_of_le hp.out.one_lt.le, mul_comm, ← ZMod.expand_card]
+ rw [← pow_succ', tsub_add_cancel_of_le hp.out.one_lt.le, mul_comm, ← ZMod.expand_card]
conv_rhs => rw [← map_cyclotomic_int]
rw [← map_expand, cyclotomic_expand_eq_cyclotomic_mul hp.out hn, Polynomial.map_mul,
map_cyclotomic, map_cyclotomic]
@@ -153,12 +153,12 @@ theorem cyclotomic_mul_prime_pow_eq (R : Type*) {p m : ℕ} [Fact (Nat.Prime p)]
| 1, _ => by
rw [pow_one, Nat.sub_self, pow_zero, mul_comm, cyclotomic_mul_prime_eq_pow_of_not_dvd R hm]
| a + 2, _ => by
- have hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ]⟩
- rw [pow_succ, mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv,
+ have hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ']⟩
+ rw [pow_succ', mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv,
cyclotomic_mul_prime_pow_eq _ _ a.succ_pos, ← pow_mul]
congr 1
simp only [tsub_zero, Nat.succ_sub_succ_eq_sub]
- rwa [Nat.mul_sub_right_distrib, mul_comm, pow_succ']
+ rwa [Nat.mul_sub_right_distrib, mul_comm, pow_succ]
#align polynomial.cyclotomic_mul_prime_pow_eq Polynomial.cyclotomic_mul_prime_pow_eq
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then `ζ` is a root of `cyclotomic (p ^ k * m) R`
@@ -55,14 +55,14 @@ theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv
have hprim := Complex.isPrimitiveRoot_exp _ hpos.ne'
rw [cyclotomic_eq_minpoly_rat hprim hpos]
refine' minpoly.dvd ℚ _ _
- rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def,
+ rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.definition,
@isRoot_cyclotomic_iff]
convert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)
rw [Nat.mul_div_cancel _ (Nat.Prime.pos hp)]
· have hprim := Complex.isPrimitiveRoot_exp _ hnpos.ne.symm
rw [cyclotomic_eq_minpoly_rat hprim hnpos]
refine' minpoly.dvd ℚ _ _
- rw [aeval_def, ← eval_map, map_expand, expand_eval, ← IsRoot.def, ←
+ rw [aeval_def, ← eval_map, map_expand, expand_eval, ← IsRoot.definition, ←
cyclotomic_eq_minpoly_rat hprim hnpos, map_cyclotomic, @isRoot_cyclotomic_iff]
exact IsPrimitiveRoot.pow_of_prime hprim hp hdiv
· rw [natDegree_expand, natDegree_cyclotomic,
@@ -88,7 +88,7 @@ theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p
have hprim := Complex.isPrimitiveRoot_exp _ hpos.ne.symm
rw [cyclotomic_eq_minpoly hprim hpos]
refine' minpoly.isIntegrallyClosed_dvd (hprim.isIntegral hpos) _
- rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def,
+ rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.definition,
@isRoot_cyclotomic_iff]
· convert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)
rw [Nat.mul_div_cancel _ hp.pos]
@@ -169,12 +169,13 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type*} [
rcases k.eq_zero_or_pos with (rfl | hk)
· rw [pow_zero, one_mul, isRoot_cyclotomic_iff]
refine' ⟨fun h => _, fun h => _⟩
- · rw [IsRoot.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow] at h
+ · rw [IsRoot.definition, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow]
+ at h
replace h := pow_eq_zero h
- rwa [← IsRoot.def, isRoot_cyclotomic_iff] at h
- · rw [← isRoot_cyclotomic_iff, IsRoot.def] at h
- rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.def, eval_pow, h,
- zero_pow]
+ rwa [← IsRoot.definition, isRoot_cyclotomic_iff] at h
+ · rw [← isRoot_cyclotomic_iff, IsRoot.definition] at h
+ rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.definition, eval_pow,
+ h, zero_pow]
exact Nat.sub_ne_zero_of_lt $ pow_right_strictMono hp.out.one_lt $ Nat.pred_lt hk.ne'
#align polynomial.is_root_cyclotomic_prime_pow_mul_iff_of_char_p Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.
@@ -107,7 +107,7 @@ theorem cyclotomic_irreducible_pow_of_irreducible_pow {p : ℕ} (hp : Nat.Prime
· simpa using h
have : m + k ≠ 0 := (add_pos_of_pos_of_nonneg hm k.zero_le).ne'
rw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h
- exact hk (by linarith) (of_irreducible_expand hp.ne_zero h)
+ exact hk (by omega) (of_irreducible_expand hp.ne_zero h)
#align polynomial.cyclotomic_irreducible_pow_of_irreducible_pow Polynomial.cyclotomic_irreducible_pow_of_irreducible_pow
/-- If `Irreducible (cyclotomic (p ^ n) R)` then `Irreducible (cyclotomic p R).` -/
Ordered instances for subobjects into separate files (#10900)
Moving these to separate files should make typeclass synthesis less expensive. Additionally two of them are quite long and this shrinks them slightly.
This handles:
SubmonoidSubgroupSubsemiringSubringSubfieldSubmoduleSubalgebraThis also moves Units.posSubgroup into its own file.
The copyright headers are from:
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -42,7 +42,7 @@ theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv
suffices expand ℤ p (cyclotomic n ℤ) = cyclotomic (n * p) ℤ * cyclotomic n ℤ by
rw [← map_cyclotomic_int, ← map_expand, this, Polynomial.map_mul, map_cyclotomic_int,
map_cyclotomic]
- refine' eq_of_monic_of_dvd_of_natDegree_le ((cyclotomic.monic _ ℤ).mul (cyclotomic.monic _ _))
+ refine' eq_of_monic_of_dvd_of_natDegree_le ((cyclotomic.monic _ ℤ).mul (cyclotomic.monic _ ℤ))
((cyclotomic.monic n ℤ).expand hp.pos) _ _
· refine' (IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast _ _
(IsPrimitive.mul (cyclotomic.isPrimitive (n * p) ℤ) (cyclotomic.isPrimitive n ℤ))
@@ -54,14 +54,14 @@ theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv
· have hpos : 0 < n * p := mul_pos hnpos hp.pos
have hprim := Complex.isPrimitiveRoot_exp _ hpos.ne'
rw [cyclotomic_eq_minpoly_rat hprim hpos]
- refine' @minpoly.dvd ℚ ℂ _ _ algebraRat _ _ _
+ refine' minpoly.dvd ℚ _ _
rw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def,
@isRoot_cyclotomic_iff]
convert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)
rw [Nat.mul_div_cancel _ (Nat.Prime.pos hp)]
· have hprim := Complex.isPrimitiveRoot_exp _ hnpos.ne.symm
rw [cyclotomic_eq_minpoly_rat hprim hnpos]
- refine' @minpoly.dvd ℚ ℂ _ _ algebraRat _ _ _
+ refine' minpoly.dvd ℚ _ _
rw [aeval_def, ← eval_map, map_expand, expand_eval, ← IsRoot.def, ←
cyclotomic_eq_minpoly_rat hprim hnpos, map_cyclotomic, @isRoot_cyclotomic_iff]
exact IsPrimitiveRoot.pow_of_prime hprim hp hdiv
@@ -82,7 +82,7 @@ theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p
haveI := NeZero.of_pos hzero
suffices expand ℤ p (cyclotomic n ℤ) = cyclotomic (n * p) ℤ by
rw [← map_cyclotomic_int, ← map_expand, this, map_cyclotomic_int]
- refine' eq_of_monic_of_dvd_of_natDegree_le (cyclotomic.monic _ _)
+ refine' eq_of_monic_of_dvd_of_natDegree_le (cyclotomic.monic _ ℤ)
((cyclotomic.monic n ℤ).expand hp.pos) _ _
· have hpos := Nat.mul_pos hzero hp.pos
have hprim := Complex.isPrimitiveRoot_exp _ hpos.ne.symm
@@ -143,7 +143,7 @@ theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type*) {p n : ℕ} [hp : Fact (Nat.
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
rw [← ZMod.expand_card, ← map_cyclotomic_int n, ← map_expand,
- cyclotomic_expand_eq_cyclotomic hp.out hn, map_cyclotomic, mul_comm]
+ cyclotomic_expand_eq_cyclotomic hp.out hn, map_cyclotomic]
#align polynomial.cyclotomic_mul_prime_dvd_eq_pow Polynomial.cyclotomic_mul_prime_dvd_eq_pow
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then
f ^ n (#9617)
This involves moving lemmas from Algebra.GroupPower.Ring to Algebra.GroupWithZero.Basic and changing some 0 < n assumptions to n ≠ 0.
From LeanAPAP
@@ -175,8 +175,7 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type*} [
· rw [← isRoot_cyclotomic_iff, IsRoot.def] at h
rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.def, eval_pow, h,
zero_pow]
- simp only [tsub_pos_iff_lt]
- apply pow_right_strictMono hp.out.one_lt (Nat.pred_lt hk.ne')
+ exact Nat.sub_ne_zero_of_lt $ pow_right_strictMono hp.out.one_lt $ Nat.pred_lt hk.ne'
#align polynomial.is_root_cyclotomic_prime_pow_mul_iff_of_char_p Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
end CharP
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
+import Mathlib.Data.ZMod.Algebra
#align_import ring_theory.polynomial.cyclotomic.expand from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"
The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.
Algebra.GroupPower.Orderpow_mono → pow_right_monopow_le_pow → pow_le_pow_rightpow_le_pow_of_le_left → pow_le_pow_leftpow_lt_pow_of_lt_left → pow_lt_pow_leftstrictMonoOn_pow → pow_left_strictMonoOnpow_strictMono_right → pow_right_strictMonopow_lt_pow → pow_lt_pow_rightpow_lt_pow_iff → pow_lt_pow_iff_rightpow_le_pow_iff → pow_le_pow_iff_rightself_lt_pow → lt_self_powstrictAnti_pow → pow_right_strictAntipow_lt_pow_iff_of_lt_one → pow_lt_pow_iff_right_of_lt_onepow_lt_pow_of_lt_one → pow_lt_pow_right_of_lt_onelt_of_pow_lt_pow → lt_of_pow_lt_pow_leftle_of_pow_le_pow → le_of_pow_le_pow_leftpow_lt_pow₀ → pow_lt_pow_right₀Algebra.GroupPower.CovariantClasspow_le_pow_of_le_left' → pow_le_pow_left'nsmul_le_nsmul_of_le_right → nsmul_le_nsmul_rightpow_lt_pow' → pow_lt_pow_right'nsmul_lt_nsmul → nsmul_lt_nsmul_leftpow_strictMono_left → pow_right_strictMono'nsmul_strictMono_right → nsmul_left_strictMonoStrictMono.pow_right' → StrictMono.pow_constStrictMono.nsmul_left → StrictMono.const_nsmulpow_strictMono_right' → pow_left_strictMononsmul_strictMono_left → nsmul_right_strictMonoMonotone.pow_right → Monotone.pow_constMonotone.nsmul_left → Monotone.const_nsmullt_of_pow_lt_pow' → lt_of_pow_lt_pow_left'lt_of_nsmul_lt_nsmul → lt_of_nsmul_lt_nsmul_rightpow_le_pow' → pow_le_pow_right'nsmul_le_nsmul → nsmul_le_nsmul_leftpow_le_pow_of_le_one' → pow_le_pow_right_of_le_one'nsmul_le_nsmul_of_nonpos → nsmul_le_nsmul_left_of_nonposle_of_pow_le_pow' → le_of_pow_le_pow_left'le_of_nsmul_le_nsmul' → le_of_nsmul_le_nsmul_right'pow_le_pow_iff' → pow_le_pow_iff_right'nsmul_le_nsmul_iff → nsmul_le_nsmul_iff_leftpow_lt_pow_iff' → pow_lt_pow_iff_right'nsmul_lt_nsmul_iff → nsmul_lt_nsmul_iff_leftData.Nat.PowNat.pow_lt_pow_of_lt_left → Nat.pow_lt_pow_leftNat.pow_le_iff_le_left → Nat.pow_le_pow_iff_leftNat.pow_lt_iff_lt_left → Nat.pow_lt_pow_iff_leftpow_le_pow_iff_leftpow_lt_pow_iff_leftpow_right_injectivepow_right_injNat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.self_le_pow was a duplicate of le_self_pow.Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.Nat.pow_right_strictMono is defeq to pow_right_strictMono.Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.0 < n or 1 ≤ n to n ≠ 0.Nat lemmas have been protected.@@ -175,7 +175,7 @@ theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type*} [
rw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.def, eval_pow, h,
zero_pow]
simp only [tsub_pos_iff_lt]
- apply pow_strictMono_right hp.out.one_lt (Nat.pred_lt hk.ne')
+ apply pow_right_strictMono hp.out.one_lt (Nat.pred_lt hk.ne')
#align polynomial.is_root_cyclotomic_prime_pow_mul_iff_of_char_p Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
end CharP
@@ -80,7 +80,7 @@ theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p
· simp
haveI := NeZero.of_pos hzero
suffices expand ℤ p (cyclotomic n ℤ) = cyclotomic (n * p) ℤ by
- rw [← map_cyclotomic_int, ← map_expand, this, map_cyclotomic_int, map_cyclotomic]
+ rw [← map_cyclotomic_int, ← map_expand, this, map_cyclotomic_int]
refine' eq_of_monic_of_dvd_of_natDegree_le (cyclotomic.monic _ _)
((cyclotomic.monic n ℤ).expand hp.pos) _ _
· have hpos := Nat.mul_pos hzero hp.pos
Type _ and Sort _ (#6499)
We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.
This has nice performance benefits.
@@ -33,7 +33,7 @@ namespace Polynomial
`expand R p (cyclotomic n R) = (cyclotomic (n * p) R) * (cyclotomic n R)`. -/
@[simp]
theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv : ¬p ∣ n)
- (R : Type _) [CommRing R] :
+ (R : Type*) [CommRing R] :
expand R p (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R := by
rcases Nat.eq_zero_or_pos n with (rfl | hnpos)
· simp
@@ -74,7 +74,7 @@ theorem cyclotomic_expand_eq_cyclotomic_mul {p n : ℕ} (hp : Nat.Prime p) (hdiv
/-- If `p` is a prime such that `p ∣ n`, then
`expand R p (cyclotomic n R) = cyclotomic (p * n) R`. -/
@[simp]
-theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p ∣ n) (R : Type _)
+theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p ∣ n) (R : Type*)
[CommRing R] : expand R p (cyclotomic n R) = cyclotomic (n * p) R := by
rcases n.eq_zero_or_pos with (rfl | hzero)
· simp
@@ -120,7 +120,7 @@ section CharP
/-- If `R` is of characteristic `p` and `¬p ∣ n`, then
`cyclotomic (n * p) R = (cyclotomic n R) ^ (p - 1)`. -/
-theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)]
+theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type*) {p n : ℕ} [hp : Fact (Nat.Prime p)]
[Ring R] [CharP R p] (hn : ¬p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ (p - 1) := by
letI : Algebra (ZMod p) R := ZMod.algebra _ _
suffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ (p - 1) by
@@ -135,7 +135,7 @@ theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fa
/-- If `R` is of characteristic `p` and `p ∣ n`, then
`cyclotomic (n * p) R = (cyclotomic n R) ^ p`. -/
-theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)] [Ring R]
+theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type*) {p n : ℕ} [hp : Fact (Nat.Prime p)] [Ring R]
[CharP R p] (hn : p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ p := by
letI : Algebra (ZMod p) R := ZMod.algebra _ _
suffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ p by
@@ -147,7 +147,7 @@ theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type _) {p n : ℕ} [hp : Fact (Nat
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then
`cyclotomic (p ^ k * m) R = (cyclotomic m R) ^ (p ^ k - p ^ (k - 1))`. -/
-theorem cyclotomic_mul_prime_pow_eq (R : Type _) {p m : ℕ} [Fact (Nat.Prime p)] [Ring R] [CharP R p]
+theorem cyclotomic_mul_prime_pow_eq (R : Type*) {p m : ℕ} [Fact (Nat.Prime p)] [Ring R] [CharP R p]
(hm : ¬p ∣ m) : ∀ {k}, 0 < k → cyclotomic (p ^ k * m) R = cyclotomic m R ^ (p ^ k - p ^ (k - 1))
| 1, _ => by
rw [pow_one, Nat.sub_self, pow_zero, mul_comm, cyclotomic_mul_prime_eq_pow_of_not_dvd R hm]
@@ -162,7 +162,7 @@ theorem cyclotomic_mul_prime_pow_eq (R : Type _) {p m : ℕ} [Fact (Nat.Prime p)
/-- If `R` is of characteristic `p` and `¬p ∣ m`, then `ζ` is a root of `cyclotomic (p ^ k * m) R`
if and only if it is a primitive `m`-th root of unity. -/
-theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type _} [CommRing R]
+theorem isRoot_cyclotomic_prime_pow_mul_iff_of_charP {m k p : ℕ} {R : Type*} [CommRing R]
[IsDomain R] [hp : Fact (Nat.Prime p)] [hchar : CharP R p] {μ : R} [NeZero (m : R)] :
(Polynomial.cyclotomic (p ^ k * m) R).IsRoot μ ↔ IsPrimitiveRoot μ m := by
rcases k.eq_zero_or_pos with (rfl | hk)
@@ -2,14 +2,11 @@
Copyright (c) 2020 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-
-! This file was ported from Lean 3 source module ring_theory.polynomial.cyclotomic.expand
-! leanprover-community/mathlib commit 0723536a0522d24fc2f159a096fb3304bef77472
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
+#align_import ring_theory.polynomial.cyclotomic.expand from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"
+
/-!
# Cyclotomic polynomials and `expand`.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module ring_theory.polynomial.cyclotomic.expand
-! leanprover-community/mathlib commit 5bfbcca0a7ffdd21cf1682e59106d6c942434a32
+! leanprover-community/mathlib commit 0723536a0522d24fc2f159a096fb3304bef77472
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -125,6 +125,7 @@ section CharP
`cyclotomic (n * p) R = (cyclotomic n R) ^ (p - 1)`. -/
theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)]
[Ring R] [CharP R p] (hn : ¬p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ (p - 1) := by
+ letI : Algebra (ZMod p) R := ZMod.algebra _ _
suffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ (p - 1) by
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
@@ -139,6 +140,7 @@ theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type _) {p n : ℕ} [hp : Fa
`cyclotomic (n * p) R = (cyclotomic n R) ^ p`. -/
theorem cyclotomic_mul_prime_dvd_eq_pow (R : Type _) {p n : ℕ} [hp : Fact (Nat.Prime p)] [Ring R]
[CharP R p] (hn : p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ p := by
+ letI : Algebra (ZMod p) R := ZMod.algebra _ _
suffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ p by
rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R),
this, Polynomial.map_pow]
The unported dependencies are
algebra.order.moduleinit.corelinear_algebra.free_module.finite.rankalgebra.order.monoid.cancel.defsalgebra.absalgebra.group_power.lemmasinit.data.list.basiclinear_algebra.free_module.rankalgebra.order.monoid.cancel.basicinit.data.list.defaulttopology.subset_propertiesinit.logicThe following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file