Theorem: IsPrimitiveRoot.zeta_sub_one_prime_of_two_pow
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

Proof steps:
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
⊢ Prime (hζ.toInteger - 1)
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
⊢ Prime (hζ.toInteger - 1)
tactic: letI := IsCyclotomicExtension.numberField {(2 : ℕ+) ^ (k + 1)} ℚ K
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
⊢ Prime (hζ.toInteger - 1)
state_after: case refine_1
p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
h : hζ.toInteger - 1 = 0
⊢ False

case refine_2
p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
⊢ Irreducible (Ideal.absNorm (Ideal.span {hζ.toInteger - 1}))
tactic: refine Ideal.prime_of_irreducible_absNorm_span (fun h ↦ ?_) ?_
state_before: case refine_2
p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
⊢ Irreducible (Ideal.absNorm (Ideal.span {hζ.toInteger - 1}))
state_after: case refine_2
p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
tactic: rw [Nat.irreducible_iff_prime, Ideal.absNorm_span_singleton, ← Nat.prime_iff,
    ← Int.prime_iff_natAbs_prime]
state_before: case refine_2
p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))
this : NumberField K := numberField {2 ^ (k + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: case refine_2.zero
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {2 ^ (0 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (0 + 1))
this : NumberField K := numberField {2 ^ (0 + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))

case refine_2.succ
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
tactic: cases k
state_before: case refine_2.succ
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: case h.e'_3
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (Algebra.norm ℤ) (hζ.toInteger - 1) = 2
tactic: convert Int.prime_two
state_before: case h.e'_3
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (Algebra.norm ℤ) (hζ.toInteger - 1) = 2
state_after: case h.e'_3.a
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (algebraMap ℤ ℚ) ((Algebra.norm ℤ) (hζ.toInteger - 1)) = (algebraMap ℤ ℚ) 2
tactic: apply RingHom.injective_int (algebraMap ℤ ℚ)
state_before: case h.e'_3.a
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (algebraMap ℤ ℚ) ((Algebra.norm ℤ) (hζ.toInteger - 1)) = (algebraMap ℤ ℚ) 2
state_after: case h.e'_3.a
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (Algebra.norm ℚ) ((algebraMap (𝓞 K) K) (hζ.toInteger - 1)) = (algebraMap ℤ ℚ) 2
tactic: rw [← Algebra.norm_localization (Sₘ := K) ℤ (nonZeroDivisors ℤ)]
state_before: case h.e'_3.a
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (Algebra.norm ℚ) ((algebraMap (𝓞 K) K) (hζ.toInteger - 1)) = (algebraMap ℤ ℚ) 2
state_after: case h.e'_3.a
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (Algebra.norm ℚ) ((algebraMap (𝓞 K) K) (hζ.toInteger - 1)) = (Int.castRingHom ℚ) 2
tactic: simp only [PNat.pow_coe, id.map_eq_id, RingHomCompTriple.comp_eq, RingHom.coe_coe,
    Subalgebra.coe_val, algebraMap_int_eq, map_natCast]
state_before: case h.e'_3.a
p : ℕ+
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
n✝ : ℕ
inst✝ : IsCyclotomicExtension {2 ^ (n✝ + 1 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(2 ^ (n✝ + 1 + 1))
this : NumberField K := numberField {2 ^ (n✝ + 1 + 1)} ℚ K
⊢ (Algebra.norm ℚ) ((algebraMap (𝓞 K) K) (hζ.toInteger - 1)) = (Int.castRingHom ℚ) 2
state_after: no goals
tactic: exact hζ.norm_sub_one_two Nat.AtLeastTwo.prop (cyclotomic.irreducible_rat (by simp))