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

Commit 96a2aa1

Browse files
feat(ring_theory/roots_of_unity): add minimal_polynomial_eq_pow (#5444)
This is the main result about minimal polynomial of primitive roots of unity: `μ` and `μ ^ p` have the same minimal polynomial. The proof is a little long, but I don't see how I can split it: it is entirely by contradiction, so any lemma extracted from it would start with a false assumption and at the end it would be used only in this proof. Co-authored-by: Johan Commelin <johan@commelin.net>
1 parent c5c02ec commit 96a2aa1

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

src/ring_theory/roots_of_unity.lean

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,58 @@ lemma minimal_polynomial_dvd_mod_p {p : ℕ} [hprime : fact p.prime] (hdiv : ¬
811811
(unique_factorization_monoid.dvd_pow_iff_dvd_of_squarefree (squarefree_minimal_polynomial_mod h
812812
hpos hdiv) (nat.prime.ne_zero hprime)).1 (minimal_polynomial_dvd_pow_mod h hpos hdiv)
813813

814+
/-- If `p` is a prime that does not divide `n`,
815+
then the minimal polynomials of a primitive `n`-th root of unity `μ`
816+
and of `μ ^ p` are the same. -/
817+
lemma minimal_polynomial_eq_pow {p : ℕ} [hprime : fact p.prime] (hdiv : ¬ p ∣ n) :
818+
minimal_polynomial (is_integral h hpos) =
819+
minimal_polynomial (is_integral (pow_of_prime h hprime hdiv) hpos) :=
820+
begin
821+
by_contra hdiff,
822+
set P := minimal_polynomial (is_integral h hpos),
823+
set Q := minimal_polynomial (is_integral (pow_of_prime h hprime hdiv) hpos),
824+
have Pmonic : P.monic := minimal_polynomial.monic _,
825+
have Qmonic : Q.monic := minimal_polynomial.monic _,
826+
have Pirr : irreducible P := minimal_polynomial.irreducible _,
827+
have Qirr : irreducible Q := minimal_polynomial.irreducible _,
828+
have PQprim : is_primitive (P * Q) := Pmonic.is_primitive.mul Qmonic.is_primitive,
829+
have prod : P * Q ∣ X ^ n - 1,
830+
{ apply (is_primitive.int.dvd_iff_map_cast_dvd_map_cast (P * Q) (X ^ n - 1) PQprim
831+
((monic_X_pow_sub_C 1 (ne_of_lt hpos).symm).is_primitive)).2,
832+
rw [map_mul],
833+
refine is_coprime.mul_dvd _ _ _,
834+
{ have aux := is_primitive.int.irreducible_iff_irreducible_map_cast Pmonic.is_primitive,
835+
refine (dvd_or_coprime _ _ (aux.1 Pirr)).resolve_left _,
836+
rw map_dvd_map (int.cast_ring_hom ℚ) int.cast_injective Pmonic,
837+
intro hdiv,
838+
refine hdiff (eq_of_monic_of_associated Pmonic Qmonic _),
839+
exact associated_of_dvd_dvd hdiv (dvd_symm_of_irreducible Pirr Qirr hdiv) },
840+
{ apply (map_dvd_map (int.cast_ring_hom ℚ) int.cast_injective Pmonic).2,
841+
exact minimal_polynomial_dvd_X_pow_sub_one h hpos },
842+
{ apply (map_dvd_map (int.cast_ring_hom ℚ) int.cast_injective Qmonic).2,
843+
exact minimal_polynomial_dvd_X_pow_sub_one (pow_of_prime h hprime hdiv) hpos } },
844+
replace prod := ring_hom.map_dvd (ring_hom.of (map (int.cast_ring_hom (zmod p)))) prod,
845+
rw [ring_hom.coe_of, map_mul, map_sub, map_one, map_pow, map_X] at prod,
846+
obtain ⟨R, hR⟩ := minimal_polynomial_dvd_mod_p h hpos hdiv,
847+
rw [hR, ← mul_assoc, ← map_mul, ← pow_two, map_pow] at prod,
848+
have habs : map (int.cast_ring_hom (zmod p)) P ^ 2 ∣ map (int.cast_ring_hom (zmod p)) P ^ 2 * R,
849+
{ use R },
850+
replace habs := lt_of_lt_of_le (enat.coe_lt_coe.2 one_lt_two)
851+
(multiplicity.le_multiplicity_of_pow_dvd (dvd_trans habs prod)),
852+
have hfree : squarefree (X ^ n - 1 : polynomial (zmod p)),
853+
{ refine squarefree_X_pow_sub_C 1 _ one_ne_zero,
854+
by_contra hzero,
855+
exact hdiv ((zmod.nat_coe_zmod_eq_zero_iff_dvd n p).1 (not_not.1 hzero)) },
856+
cases (multiplicity.squarefree_iff_multiplicity_le_one (X ^ n - 1)).1 hfree
857+
(map (int.cast_ring_hom (zmod p)) P) with hle hunit,
858+
{ exact not_lt_of_le hle habs },
859+
{ replace hunit := degree_eq_zero_of_is_unit hunit,
860+
rw degree_map_eq_of_leading_coeff_ne_zero _ _ at hunit,
861+
{ exact (ne_of_lt (minimal_polynomial.degree_pos (is_integral h hpos))).symm hunit },
862+
simp only [Pmonic, ring_hom.eq_int_cast, monic.leading_coeff, int.cast_one, ne.def,
863+
not_false_iff, one_ne_zero] }
864+
end
865+
814866
end minimal_polynomial
815867

816868
end is_primitive_root

0 commit comments

Comments
 (0)