File: Mathlib/RingTheory/RootsOfUnity/Minpoly.lean

full_name: IsPrimitiveRoot.isIntegral
code: /-- `μ` is integral over `ℤ`. -/
-- Porting note: `hpos` was in the `variable` line, with an `omit` in mathlib3 just after this
-- declaration. For some reason, in Lean4, `hpos` gets included also in the declarations below,
-- even if it is not used in the proof.
theorem isIntegral (hpos : 0 < n) : IsIntegral ℤ μ 
goal: IsIntegral ℤ μ

full_name: IsPrimitiveRoot.minpoly_dvd_x_pow_sub_one
code: /-- The minimal polynomial of a root of unity `μ` divides `X ^ n - 1`. -/
theorem minpoly_dvd_x_pow_sub_one : minpoly ℤ μ ∣ X ^ n - 1 
goal: minpoly ℤ μ ∣ Polynomial.X ^ n - 1

full_name: IsPrimitiveRoot.separable_minpoly_mod
code: /-- The reduction modulo `p` of the minimal polynomial of a root of unity `μ` is separable. -/
theorem separable_minpoly_mod {p : ℕ} [Fact p.Prime] (hdiv : ¬p ∣ n) :
    Separable (map (Int.castRingHom (ZMod p)) (minpoly ℤ μ)) 
goal: (Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ μ)).Separable

full_name: IsPrimitiveRoot.squarefree_minpoly_mod
code: /-- The reduction modulo `p` of the minimal polynomial of a root of unity `μ` is squarefree. -/
theorem squarefree_minpoly_mod {p : ℕ} [Fact p.Prime] (hdiv : ¬p ∣ n) :
    Squarefree (map (Int.castRingHom (ZMod p)) (minpoly ℤ μ)) 
goal: Squarefree (Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ μ))

full_name: IsPrimitiveRoot.minpoly_dvd_expand
code: /-- Let `P` be the minimal polynomial of a root of unity `μ` and `Q` be the minimal polynomial of
`μ ^ p`, where `p` is a natural number that does not divide `n`. Then `P` divides `expand ℤ p Q`. -/
theorem minpoly_dvd_expand {p : ℕ} (hdiv : ¬p ∣ n) :
    minpoly ℤ μ ∣ expand ℤ p (minpoly ℤ (μ ^ p)) 
goal: minpoly ℤ μ ∣ (Polynomial.expand ℤ p) (minpoly ℤ (μ ^ p))

full_name: IsPrimitiveRoot.minpoly_dvd_pow_mod
code: /-- Let `P` be the minimal polynomial of a root of unity `μ` and `Q` be the minimal polynomial of
`μ ^ p`, where `p` is a prime that does not divide `n`. Then `P` divides `Q ^ p` modulo `p`. -/
theorem minpoly_dvd_pow_mod {p : ℕ} [hprime : Fact p.Prime] (hdiv : ¬p ∣ n) :
    map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣
      map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p)) ^ p 
goal: Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣
  Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p)) ^ p

full_name: IsPrimitiveRoot.minpoly_dvd_mod_p
code: /-- Let `P` be the minimal polynomial of a root of unity `μ` and `Q` be the minimal polynomial of
`μ ^ p`, where `p` is a prime that does not divide `n`. Then `P` divides `Q` modulo `p`. -/
theorem minpoly_dvd_mod_p {p : ℕ} [Fact p.Prime] (hdiv : ¬p ∣ n) :
    map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣
      map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p)) 
goal: Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣ Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p))

full_name: IsPrimitiveRoot.minpoly_eq_pow
code: /-- If `p` is a prime that does not divide `n`,
then the minimal polynomials of a primitive `n`-th root of unity `μ`
and of `μ ^ p` are the same. -/
theorem minpoly_eq_pow {p : ℕ} [hprime : Fact p.Prime] (hdiv : ¬p ∣ n) :
    minpoly ℤ μ = minpoly ℤ (μ ^ p) 
goal: minpoly ℤ μ = minpoly ℤ (μ ^ p)

full_name: IsPrimitiveRoot.minpoly_eq_pow_coprime
code: /-- If `m : ℕ` is coprime with `n`,
then the minimal polynomials of a primitive `n`-th root of unity `μ`
and of `μ ^ m` are the same. -/
theorem minpoly_eq_pow_coprime {m : ℕ} (hcop : Nat.Coprime m n) :
    minpoly ℤ μ = minpoly ℤ (μ ^ m) 
goal: minpoly ℤ μ = minpoly ℤ (μ ^ m)

full_name: IsPrimitiveRoot.pow_isRoot_minpoly
code: /-- If `m : ℕ` is coprime with `n`,
then the minimal polynomial of a primitive `n`-th root of unity `μ`
has `μ ^ m` as root. -/
theorem pow_isRoot_minpoly {m : ℕ} (hcop : Nat.Coprime m n) :
    IsRoot (map (Int.castRingHom K) (minpoly ℤ μ)) (μ ^ m) 
goal: (Polynomial.map (Int.castRingHom K) (minpoly ℤ μ)).IsRoot (μ ^ m)

full_name: IsPrimitiveRoot.is_roots_of_minpoly
code: /-- `primitiveRoots n K` is a subset of the roots of the minimal polynomial of a primitive
`n`-th root of unity `μ`. -/
theorem is_roots_of_minpoly [DecidableEq K] :
    primitiveRoots n K ⊆ (map (Int.castRingHom K) (minpoly ℤ μ)).roots.toFinset 
goal: primitiveRoots n K ⊆ (Polynomial.map (Int.castRingHom K) (minpoly ℤ μ)).roots.toFinset

full_name: IsPrimitiveRoot.totient_le_degree_minpoly
code: /-- The degree of the minimal polynomial of `μ` is at least `totient n`. -/
theorem totient_le_degree_minpoly : Nat.totient n ≤ (minpoly ℤ μ).natDegree 
goal: n.totient ≤ (minpoly ℤ μ).natDegree