Theorem: IsCyclotomicExtension.Rat.nrComplexPlaces_eq_totient_div_two
File: Mathlib/NumberTheory/Cyclotomic/Embeddings.lean

tactic: have := IsCyclotomicExtension.numberField {n} ℚ K
state_before: n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
⊢ NrComplexPlaces K = φ ↑n / 2

tactic: by_cases hn : 2 < n
state_before: n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: case pos
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
⊢ NrComplexPlaces K = φ ↑n / 2

case neg
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
⊢ NrComplexPlaces K = φ ↑n / 2

tactic: obtain ⟨k, hk : φ n = k + k⟩ := totient_even hn
state_before: case pos
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: case pos.intro
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
⊢ NrComplexPlaces K = φ ↑n / 2

tactic: have key := card_add_two_mul_card_eq_rank K
state_before: case pos.intro
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: case pos.intro
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
key : NrRealPlaces K + 2 * NrComplexPlaces K = FiniteDimensional.finrank ℚ K
⊢ NrComplexPlaces K = φ ↑n / 2

tactic: rw [nrRealPlaces_eq_zero K hn, zero_add, IsCyclotomicExtension.finrank (n := n) K
  (cyclotomic.irreducible_rat n.pos), hk, ← two_mul, Nat.mul_right_inj (by norm_num)] at key
state_before: case pos.intro
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
key : NrRealPlaces K + 2 * NrComplexPlaces K = FiniteDimensional.finrank ℚ K
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: case pos.intro
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
key : NrComplexPlaces K = k
⊢ NrComplexPlaces K = φ ↑n / 2

tactic: simp [hk, key, ← two_mul]
state_before: case pos.intro
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
key : NrComplexPlaces K = k
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: no goals

tactic: norm_num
state_before: n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : 2 < n
k : ℕ
hk : φ ↑n = k + k
key : 2 * NrComplexPlaces K = 2 * k
⊢ 2 ≠ 0
state_after: no goals

tactic: rw [this]
state_before: case neg
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this✝ : NumberField K
hn : ¬2 < n
this : φ ↑n = 1
⊢ NrComplexPlaces K = φ ↑n / 2
state_after: case neg
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this✝ : NumberField K
hn : ¬2 < n
this : φ ↑n = 1
⊢ NrComplexPlaces K = 1 / 2

tactic: apply nrComplexPlaces_eq_zero_of_finrank_eq_one
state_before: case neg
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this✝ : NumberField K
hn : ¬2 < n
this : φ ↑n = 1
⊢ NrComplexPlaces K = 1 / 2
state_after: case neg.h
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this✝ : NumberField K
hn : ¬2 < n
this : φ ↑n = 1
⊢ FiniteDimensional.finrank ℚ K = 1

tactic: rw [IsCyclotomicExtension.finrank K (cyclotomic.irreducible_rat n.pos), this]
state_before: case neg.h
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this✝ : NumberField K
hn : ¬2 < n
this : φ ↑n = 1
⊢ FiniteDimensional.finrank ℚ K = 1
state_after: no goals

tactic: by_cases h1 : 1 < n.1
state_before: n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
⊢ φ ↑n = 1
state_after: case pos
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : 1 < ↑n
⊢ φ ↑n = 1

case neg
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : ¬1 < ↑n
⊢ φ ↑n = 1

tactic: convert totient_two
state_before: case pos
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : 1 < ↑n
⊢ φ ↑n = 1
state_after: case h.e'_2.h.e'_1
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : 1 < ↑n
⊢ ↑n = 2

tactic: exact (eq_of_le_of_not_lt (succ_le_of_lt h1) hn).symm
state_before: case h.e'_2.h.e'_1
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : 1 < ↑n
⊢ ↑n = 2
state_after: no goals

tactic: convert totient_one
state_before: case neg
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : ¬1 < ↑n
⊢ φ ↑n = 1
state_after: case h.e'_2.h.e'_1
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : ¬1 < ↑n
⊢ ↑n = 1

tactic: rw [← PNat.one_coe, PNat.coe_inj]
state_before: case h.e'_2.h.e'_1
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : ¬1 < ↑n
⊢ ↑n = 1
state_after: case h.e'_2.h.e'_1
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : ¬1 < ↑n
⊢ n = 1

tactic: exact eq_of_le_of_not_lt (not_lt.mp h1) (PNat.not_lt_one _)
state_before: case h.e'_2.h.e'_1
n : ℕ+
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
h : IsCyclotomicExtension {n} ℚ K
this : NumberField K
hn : ¬2 < n
h1 : ¬1 < ↑n
⊢ n = 1
state_after: no goals