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
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
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