Theorem: zeta_sub_one_dvd_trace_sub_smul (FltRegular/NumberTheory/Cyclotomic/MoreLemmas.lean)

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x
Tactic:
letI := IsCyclotomicExtension.numberField {p} ℚ K
State after:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x
Tactic:
letI := IsCyclotomicExtension.isGalois p ℚ K
State after:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x
Tactic:
have : (Algebra.trace ℤ _ x : 𝓞 K) = ∑ σ : K ≃ₐ[ℚ] K, (intGal σ).toRingHom x := by
  apply (show Function.Injective (algebraMap (𝓞 K) K) from Subtype.val_injective)
  rw [← eq_intCast (algebraMap ℤ (𝓞 K)), ← IsScalarTower.algebraMap_apply,
    IsScalarTower.algebraMap_apply ℤ ℚ K, eq_intCast, Algebra.coe_trace_int,
    trace_eq_sum_automorphisms, map_sum]
  rfl
State after:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝¹ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this✝ : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
this : ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝¹ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this✝ : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
this : ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
⊢ ↑hζ.unit' - 1 ∣ ↑((Algebra.trace ℤ (𝓞 K)) x) - (↑p - 1) • x
Tactic:
rw [← Ideal.mem_span_singleton, ← Ideal.Quotient.eq_zero_iff_mem, map_sub, this,
  map_sum]
State after:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝¹ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this✝ : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
this : ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
⊢ ∑ x_1 : K ≃ₐ[ℚ] K, (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) ((intGal ↑x_1).toRingHom x) -
      (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) ((↑p - 1) • x) =
    0

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝¹ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this✝ : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
this : ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
⊢ ∑ x_1 : K ≃ₐ[ℚ] K, (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) ((intGal ↑x_1).toRingHom x) -
      (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) ((↑p - 1) • x) =
    0
Tactic:
simp_rw [← RingHom.comp_apply, quotient_zero_sub_one_comp_aut]
State after:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝¹ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this✝ : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
this : ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
⊢ ∑ x_1 : K ≃ₐ[ℚ] K, (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) x -
      (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) ((↑p - 1) • x) =
    0

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝¹ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this✝ : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
this : ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
⊢ ∑ x_1 : K ≃ₐ[ℚ] K, (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) x -
      (Ideal.Quotient.mk (Ideal.span {↑hζ.unit' - 1})) ((↑p - 1) • x) =
    0
Tactic:
rw [Finset.sum_const, map_nsmul, sub_eq_zero, Finset.card_univ, IsGalois.card_aut_eq_finrank,
  IsCyclotomicExtension.finrank K (cyclotomic.irreducible_rat p.pos), Nat.totient_prime hpri.out]
State after:
no goals

State before:
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ ↑((Algebra.trace ℤ (𝓞 K)) x) = ∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x
Tactic:
apply (show Function.Injective (algebraMap (𝓞 K) K) from Subtype.val_injective)
State after:
case a
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ (algebraMap (𝓞 K) K) ↑((Algebra.trace ℤ (𝓞 K)) x) = (algebraMap (𝓞 K) K) (∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x)

State before:
case a
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ (algebraMap (𝓞 K) K) ↑((Algebra.trace ℤ (𝓞 K)) x) = (algebraMap (𝓞 K) K) (∑ σ : K ≃ₐ[ℚ] K, (intGal ↑σ).toRingHom x)
Tactic:
rw [← eq_intCast (algebraMap ℤ (𝓞 K)), ← IsScalarTower.algebraMap_apply,
  IsScalarTower.algebraMap_apply ℤ ℚ K, eq_intCast, Algebra.coe_trace_int,
  trace_eq_sum_automorphisms, map_sum]
State after:
case a
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ ∑ σ : K ≃ₐ[ℚ] K, σ ↑x = ∑ x_1 : K ≃ₐ[ℚ] K, (algebraMap (𝓞 K) K) ((intGal ↑x_1).toRingHom x)

State before:
case a
K : Type u_1
p : ℕ+
hpri : Fact p.Prime
inst✝² : Field K
inst✝¹ : CharZero K
inst✝ : IsCyclotomicExtension {p} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑p
hp : p ≠ 2
x : 𝓞 K
this✝ : NumberField K := IsCyclotomicExtension.numberField {p} ℚ K
this : IsGalois ℚ K := IsCyclotomicExtension.isGalois p ℚ K
⊢ ∑ σ : K ≃ₐ[ℚ] K, σ ↑x = ∑ x_1 : K ≃ₐ[ℚ] K, (algebraMap (𝓞 K) K) ((intGal ↑x_1).toRingHom x)
Tactic:
rfl
State after:
no goals