Theorem: IsPrimitiveRoot.nrRealPlaces_eq_zero_of_two_lt
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

tactic: refine (@Fintype.card_eq_zero_iff _ (_)).2 ⟨fun ⟨w, hwreal⟩ ↦ ?_⟩
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
⊢ NumberField.InfinitePlace.NrRealPlaces K = 0
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : w.IsReal
⊢ False

tactic: rw [NumberField.InfinitePlace.isReal_iff] at hwreal
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : w.IsReal
⊢ False
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
⊢ False

tactic: let f := w.embedding
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
⊢ False
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
⊢ False

tactic: have hζ' : IsPrimitiveRoot (f ζ) k := hζ.map_of_injective f.injective
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
⊢ False
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
⊢ False

tactic: have him : (f ζ).im = 0 := by
  rw [← Complex.conj_eq_iff_im, ← NumberField.ComplexEmbedding.conjugate_coe_eq]
  congr
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
⊢ False
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
⊢ False

tactic: have hre : (f ζ).re = 1 ∨ (f ζ).re = -1 := by
  rw [← Complex.abs_re_eq_abs] at him
  have := Complex.norm_eq_one_of_pow_eq_one hζ'.pow_eq_one (by linarith)
  rwa [Complex.norm_eq_abs, ← him, ← abs_one, abs_eq_abs] at this
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
⊢ False
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hre : (f ζ).re = 1 ∨ (f ζ).re = -1
⊢ False

tactic: cases hre with
| inl hone =>
  exact hζ'.ne_one (by linarith) <| Complex.ext (by simp [hone]) (by simp [him])
| inr hnegone =>
  replace hζ' := hζ'.eq_orderOf
  simp only [show f ζ = -1 from Complex.ext (by simp [hnegone]) (by simp [him]),
    orderOf_neg_one, ringChar.eq_zero, OfNat.zero_ne_ofNat, ↓reduceIte] at hζ'
  linarith
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hre : (f ζ).re = 1 ∨ (f ζ).re = -1
⊢ False
state_after: no goals

tactic: rw [← Complex.conj_eq_iff_im, ← NumberField.ComplexEmbedding.conjugate_coe_eq]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
⊢ (f ζ).im = 0
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
⊢ (NumberField.ComplexEmbedding.conjugate f) ζ = f ζ

tactic: congr
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
⊢ (NumberField.ComplexEmbedding.conjugate f) ζ = f ζ
state_after: no goals

tactic: rw [← Complex.abs_re_eq_abs] at him
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
⊢ (f ζ).re = 1 ∨ (f ζ).re = -1
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : |(f ζ).re| = Complex.abs (f ζ)
⊢ (f ζ).re = 1 ∨ (f ζ).re = -1

tactic: have := Complex.norm_eq_one_of_pow_eq_one hζ'.pow_eq_one (by linarith)
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : |(f ζ).re| = Complex.abs (f ζ)
⊢ (f ζ).re = 1 ∨ (f ζ).re = -1
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : |(f ζ).re| = Complex.abs (f ζ)
this : ‖f ζ‖ = 1
⊢ (f ζ).re = 1 ∨ (f ζ).re = -1

tactic: rwa [Complex.norm_eq_abs, ← him, ← abs_one, abs_eq_abs] at this
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : |(f ζ).re| = Complex.abs (f ζ)
this : ‖f ζ‖ = 1
⊢ (f ζ).re = 1 ∨ (f ζ).re = -1
state_after: no goals

tactic: linarith
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : |(f ζ).re| = Complex.abs (f ζ)
⊢ k ≠ 0
state_after: no goals

tactic: exact hζ'.ne_one (by linarith) <| Complex.ext (by simp [hone]) (by simp [him])
state_before: case inl
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hone : (f ζ).re = 1
⊢ False
state_after: no goals

tactic: linarith
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hone : (f ζ).re = 1
⊢ 1 < k
state_after: no goals

tactic: simp [hone]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hone : (f ζ).re = 1
⊢ (f ζ).re = Complex.re 1
state_after: no goals

tactic: simp [him]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hone : (f ζ).re = 1
⊢ (f ζ).im = Complex.im 1
state_after: no goals

tactic: replace hζ' := hζ'.eq_orderOf
state_before: case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
hζ' : IsPrimitiveRoot (f ζ) k
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
⊢ False
state_after: case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
hζ' : k = orderOf (f ζ)
⊢ False

tactic: simp only [show f ζ = -1 from Complex.ext (by simp [hnegone]) (by simp [him]),
  orderOf_neg_one, ringChar.eq_zero, OfNat.zero_ne_ofNat, ↓reduceIte] at hζ'
state_before: case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
hζ' : k = orderOf (f ζ)
⊢ False
state_after: case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
hζ' : k = 2
⊢ False

tactic: linarith
state_before: case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
hζ' : k = 2
⊢ False
state_after: no goals

tactic: simp [hnegone]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
hζ' : k = orderOf (f ζ)
⊢ (f ζ).re = (-1).re
state_after: no goals

tactic: simp [him]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : K
k : ℕ
hk : 2 < k
hζ : IsPrimitiveRoot ζ k
x✝ : { w // w.IsReal }
w : NumberField.InfinitePlace K
hwreal : NumberField.ComplexEmbedding.IsReal w.embedding
f : K →+* ℂ := w.embedding
him : (f ζ).im = 0
hnegone : (f ζ).re = -1
hζ' : k = orderOf (f ζ)
⊢ (f ζ).im = (-1).im
state_after: no goals