-- Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
theorem sub_one_norm_eq_eval_cyclotomic [IsCyclotomicExtension {n} K L] (h : 2 < (n : ℕ))
    (hirr : Irreducible (cyclotomic n K)) : norm K (ζ - 1) = ↑(eval 1 (cyclotomic n ℤ))

Proof state:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
⊢ (algebraMap K E) ((Algebra.norm K) (ζ - 1)) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Tactic:
letI := IsCyclotomicExtension.finiteDimensional {n} K L

Result:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this : FiniteDimensional K L := finiteDimensional {n} K L
⊢ (algebraMap K E) ((Algebra.norm K) (ζ - 1)) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Proof state:
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ ∏ σ : L →ₐ[K] E, (1 - σ ζ) = eval 1 (cyclotomic' (↑n) E)

Tactic:
rw [cyclotomic', eval_prod, ← @Finset.prod_attach E E, ← univ_eq_attach]

Result:
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ ∏ σ : L →ₐ[K] E, (1 - σ ζ) = ∏ x : { x // x ∈ primitiveRoots (↑n) E }, eval 1 (X - C ↑x)

Proof state:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ (algebraMap K E) ((Algebra.norm K) (ζ - 1)) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Tactic:
rw [norm_eq_prod_embeddings]

Result:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ ∏ σ : L →ₐ[K] E, σ (ζ - 1) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Proof state:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝² : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝¹ : FiniteDimensional K L := finiteDimensional {n} K L
this✝ : IsGalois K L := isGalois n K L
Hprod : ∏ σ : L →ₐ[K] E, (1 - σ ζ) = eval 1 (cyclotomic' (↑n) E)
this : NeZero ↑↑n
⊢ ∏ x : L →ₐ[K] E, (1 - x ζ) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Tactic:
rw [Hprod, cyclotomic', ← cyclotomic_eq_prod_X_sub_primitiveRoots (isRoot_cyclotomic_iff.1 hz),
  ← map_cyclotomic_int, _root_.map_intCast, ← Int.cast_one, eval_intCast_map, eq_intCast,
  Int.cast_id]

Result:
no goals

Proof state:
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ ∏ σ : L →ₐ[K] E, (1 - σ ζ) = ∏ x : { x // x ∈ primitiveRoots (↑n) E }, eval 1 (X - C ↑x)

Tactic:
refine Fintype.prod_equiv (hζ.embeddingsEquivPrimitiveRoots E hirr) _ _ fun σ => ?_

Result:
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
σ : L →ₐ[K] E
⊢ 1 - σ ζ = eval 1 (X - C ↑((hζ.embeddingsEquivPrimitiveRoots E hirr) σ))

Proof state:
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
⊢ (Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))

Tactic:
haveI := IsCyclotomicExtension.neZero' n K L

Result:
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this : NeZero ↑↑n
⊢ (Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))

Proof state:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ ∏ x : L →ₐ[K] E, (1 - x ζ) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Tactic:
have Hprod : (Finset.univ.prod fun σ : L →ₐ[K] E => 1 - σ ζ) = eval 1 (cyclotomic' n E) := by
  rw [cyclotomic', eval_prod, ← @Finset.prod_attach E E, ← univ_eq_attach]
  refine Fintype.prod_equiv (hζ.embeddingsEquivPrimitiveRoots E hirr) _ _ fun σ => ?_
  simp

Result:
case intro.a
n : ℕ+
K : Type u
L : Type v
inst✝³ : Field L
ζ : L
inst✝² : Field K
inst✝¹ : Algebra K L
hζ : IsPrimitiveRoot ζ ↑n
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : (cyclotomic (↑n) E).IsRoot z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
Hprod : ∏ σ : L →ₐ[K] E, (1 - σ ζ) = eval 1 (cyclotomic' (↑n) E)
⊢ ∏ x : L →ₐ[K] E, (1 - x ζ) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))