l3lab/ntp-mathlib huggingface dataset:
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), the norm of a primitive root is
`1` if `n ≠ 2`. -/
theorem norm_eq_one [IsDomain L] [IsCyclotomicExtension {n} K L] (hn : n ≠ 2)
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = 1 := by
  haveI := IsCyclotomicExtension.neZero' n K L
  by_cases h1 : n = 1
  · rw [h1, one_coe, one_right_iff] at hζ
    rw [hζ, show 1 = algebraMap K L 1 by simp, Algebra.norm_algebraMap, one_pow]
  · replace h1 : 2 ≤ n
    · by_contra! h
      exact h1 (PNat.eq_one_of_lt_two h)
-- Porting note: specyfing the type of `cyclotomic_coeff_zero K h1` was not needed.
    rw [← hζ.powerBasis_gen K, PowerBasis.norm_gen_eq_coeff_zero_minpoly, hζ.powerBasis_gen K, ←
      hζ.minpoly_eq_cyclotomic_of_irreducible hirr,
      (cyclotomic_coeff_zero K h1 : coeff (cyclotomic n K) 0 = 1), mul_one,
      hζ.powerBasis_dim K, ← hζ.minpoly_eq_cyclotomic_of_irreducible hirr, natDegree_cyclotomic]
    

Proof state:
case neg
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K
inst✝² : Algebra K L
inst✝¹ : IsDomain L
inst✝ : IsCyclotomicExtension {n} K L
hn : n ≠ 2
hirr : Irreducible (cyclotomic (↑n) K)
this : NeZero ↑↑n
h1 : 2 ≤ n
⊢ (-1) ^ φ ↑n = 1

Next tactic:
exact (totient_even <| h1.lt_of_ne hn.symm).neg_one_pow
/-- If `K` is linearly ordered, the norm of a primitive root is `1` if `n` is odd. -/
theorem norm_eq_one_of_linearly_ordered {K : Type*} [LinearOrderedField K] [Algebra K L]
    (hodd : Odd (n : ℕ)) : norm K ζ = 1 := by
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K✝ : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K✝
inst✝² : Algebra K✝ L
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : Algebra K L
hodd : Odd ↑n
⊢ (Algebra.norm K) ζ = 1

Next tactic:
have hz := congr_arg (norm K) ((IsPrimitiveRoot.iff_def _ n).1 hζ).1
/-- If `K` is linearly ordered, the norm of a primitive root is `1` if `n` is odd. -/
theorem norm_eq_one_of_linearly_ordered {K : Type*} [LinearOrderedField K] [Algebra K L]
    (hodd : Odd (n : ℕ)) : norm K ζ = 1 := by
  have hz := congr_arg (norm K) ((IsPrimitiveRoot.iff_def _ n).1 hζ).1
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K✝ : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K✝
inst✝² : Algebra K✝ L
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : Algebra K L
hodd : Odd ↑n
hz : (Algebra.norm K) (ζ ^ ↑n) = (Algebra.norm K) 1
⊢ (Algebra.norm K) ζ = 1

Next tactic:
rw [← (algebraMap K L).map_one, Algebra.norm_algebraMap, one_pow, map_pow, ← one_pow ↑n] at hz
/-- If `K` is linearly ordered, the norm of a primitive root is `1` if `n` is odd. -/
theorem norm_eq_one_of_linearly_ordered {K : Type*} [LinearOrderedField K] [Algebra K L]
    (hodd : Odd (n : ℕ)) : norm K ζ = 1 := by
  have hz := congr_arg (norm K) ((IsPrimitiveRoot.iff_def _ n).1 hζ).1
  rw [← (algebraMap K L).map_one, Algebra.norm_algebraMap, one_pow, map_pow, ← one_pow ↑n] at hz
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K✝ : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K✝
inst✝² : Algebra K✝ L
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : Algebra K L
hodd : Odd ↑n
hz : (Algebra.norm K) ζ ^ ↑n = 1 ^ ↑n
⊢ (Algebra.norm K) ζ = 1

Next tactic:
exact StrictMono.injective hodd.strictMono_pow hz
theorem norm_of_cyclotomic_irreducible [IsDomain L] [IsCyclotomicExtension {n} K L]
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = ite (n = 2) (-1) 1 := by
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K
inst✝² : Algebra K L
inst✝¹ : IsDomain L
inst✝ : IsCyclotomicExtension {n} K L
hirr : Irreducible (cyclotomic (↑n) K)
⊢ (Algebra.norm K) ζ = if n = 2 then -1 else 1

Next tactic:
split_ifs with hn
theorem norm_of_cyclotomic_irreducible [IsDomain L] [IsCyclotomicExtension {n} K L]
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = ite (n = 2) (-1) 1 := by
  split_ifs with hn
  · 

Proof state:
case pos
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K
inst✝² : Algebra K L
inst✝¹ : IsDomain L
inst✝ : IsCyclotomicExtension {n} K L
hirr : Irreducible (cyclotomic (↑n) K)
hn : n = 2
⊢ (Algebra.norm K) ζ = -1

Next tactic:
subst hn
theorem norm_of_cyclotomic_irreducible [IsDomain L] [IsCyclotomicExtension {n} K L]
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = ite (n = 2) (-1) 1 := by
  split_ifs with hn
  · subst hn
    

Proof state:
case pos
p : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : CommRing L
ζ : L
inst✝⁴ : Field K
inst✝³ : Algebra K L
inst✝² : IsDomain L
inst✝¹ : IsCyclotomicExtension {2} A B
hζ : IsPrimitiveRoot ζ ↑2
inst✝ : IsCyclotomicExtension {2} K L
hirr : Irreducible (cyclotomic (↑2) K)
⊢ (Algebra.norm K) ζ = -1

Next tactic:
convert norm_eq_neg_one_pow (K := K) hζ
theorem norm_of_cyclotomic_irreducible [IsDomain L] [IsCyclotomicExtension {n} K L]
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = ite (n = 2) (-1) 1 := by
  split_ifs with hn
  · subst hn
    convert norm_eq_neg_one_pow (K := K) hζ
    

Proof state:
case h.e'_3
p : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : CommRing L
ζ : L
inst✝⁴ : Field K
inst✝³ : Algebra K L
inst✝² : IsDomain L
inst✝¹ : IsCyclotomicExtension {2} A B
hζ : IsPrimitiveRoot ζ ↑2
inst✝ : IsCyclotomicExtension {2} K L
hirr : Irreducible (cyclotomic (↑2) K)
⊢ -1 = (-1) ^ FiniteDimensional.finrank K L

Next tactic:
erw [IsCyclotomicExtension.finrank _ hirr, totient_two, pow_one]
theorem norm_of_cyclotomic_irreducible [IsDomain L] [IsCyclotomicExtension {n} K L]
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = ite (n = 2) (-1) 1 := by
  split_ifs with hn
  · subst hn
    convert norm_eq_neg_one_pow (K := K) hζ
    erw [IsCyclotomicExtension.finrank _ hirr, totient_two, pow_one]
  · 

Proof state:
case neg
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : IsCyclotomicExtension {n} A B
inst✝⁴ : CommRing L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝³ : Field K
inst✝² : Algebra K L
inst✝¹ : IsDomain L
inst✝ : IsCyclotomicExtension {n} K L
hirr : Irreducible (cyclotomic (↑n) K)
hn : ¬n = 2
⊢ (Algebra.norm K) ζ = 1

Next tactic:
exact hζ.norm_eq_one hn hirr
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
⊢ (Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))

Next tactic:
haveI := IsCyclotomicExtension.neZero' n K L
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this : NeZero ↑↑n
⊢ (Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))

Next tactic:
let E := AlgebraicClosure L
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  

Proof state:
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this : NeZero ↑↑n
E : Type v := AlgebraicClosure L
⊢ (Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))

Next tactic:
obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  

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

Next tactic:
apply (algebraMap K E).injective
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  

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

Next tactic:
letI := IsCyclotomicExtension.finiteDimensional {n} K L
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  

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

Next tactic:
letI := IsCyclotomicExtension.isGalois n K L
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  

Proof state:
case intro.a
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) 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 ℤ))

Next tactic:
rw [norm_eq_prod_embeddings]
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  rw [norm_eq_prod_embeddings]
  

Proof state:
case intro.a
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
⊢ (Finset.prod Finset.univ fun σ => σ (ζ - 1)) = (algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))

Next tactic:
conv_lhs =>
    congr
    rfl
    ext
    rw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  rw [norm_eq_prod_embeddings]
  conv_lhs =>
    

Proof state:
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
| Finset.prod Finset.univ fun σ => σ (ζ - 1)

Next tactic:
congr
    rfl
    ext
    rw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  rw [norm_eq_prod_embeddings]
  conv_lhs =>
    

Proof state:
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
| Finset.prod Finset.univ fun σ => σ (ζ - 1)

Next tactic:
congr
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  rw [norm_eq_prod_embeddings]
  conv_lhs =>
    congr
    

Proof state:
case s
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
| Finset.univ
case f
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
| fun σ => σ (ζ - 1)

Next tactic:
rfl
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  rw [norm_eq_prod_embeddings]
  conv_lhs =>
    congr
    rfl
    

Proof state:
case f
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
| fun σ => σ (ζ - 1)

Next tactic:
ext
/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the norm of
`ζ - 1` is `eval 1 (cyclotomic n ℤ)`. -/
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 ℤ)) := by
  haveI := IsCyclotomicExtension.neZero' n K L
  let E := AlgebraicClosure L
  obtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm
  apply (algebraMap K E).injective
  letI := IsCyclotomicExtension.finiteDimensional {n} K L
  letI := IsCyclotomicExtension.isGalois n K L
  rw [norm_eq_prod_embeddings]
  conv_lhs =>
    congr
    rfl
    ext
    

Proof state:
case f.h
p n : ℕ+
A : Type w
B : Type z
K : Type u
L : Type v
C : Type w
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : IsCyclotomicExtension {n} A B
inst✝³ : Field L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
inst✝² : Field K
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
h : 2 < ↑n
hirr : Irreducible (cyclotomic (↑n) K)
this✝¹ : NeZero ↑↑n
E : Type v := AlgebraicClosure L
z : E
hz : IsRoot (cyclotomic (↑n) E) z
this✝ : FiniteDimensional K L := finiteDimensional {n} K L
this : IsGalois K L := isGalois n K L
x✝ : L →ₐ[K] E
| x✝ (ζ - 1)

Next tactic:
rw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]