Theorem: NumberField.Units.dirichletUnitTheorem.sum_logEmbedding_component
File: Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean

tactic: have h := congr_arg Real.log (prod_eq_abs_norm (x : K))
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) =
    Real.log ↑|(Algebra.norm ℚ) ((algebraMap (𝓞 K) K) ↑x)|
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))

tactic: rw [Units.norm, Rat.cast_one, Real.log_one, Real.log_prod] at h
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) =
    Real.log ↑|(Algebra.norm ℚ) ((algebraMap (𝓞 K) K) ↑x)|
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∑ i : InfinitePlace K, Real.log (i ((algebraMap (𝓞 K) K) ↑x) ^ i.mult) = 0
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))

case hf
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) = 0
⊢ ∀ x_1 ∈ univ, x_1 ((algebraMap (𝓞 K) K) ↑x) ^ x_1.mult ≠ 0

tactic: simp_rw [Real.log_pow] at h
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∑ i : InfinitePlace K, Real.log (i ((algebraMap (𝓞 K) K) ↑x) ^ i.mult) = 0
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∑ x_1 : InfinitePlace K, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) = 0
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))

tactic: rw [← insert_erase (mem_univ w₀), sum_insert (not_mem_erase w₀ univ), add_comm,
  add_eq_zero_iff_eq_neg] at h
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∑ x_1 : InfinitePlace K, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) = 0
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))

tactic: convert h using 1
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w =
    ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x))

case h.e'_3
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
⊢ -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)) = -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))

tactic: refine (sum_subtype _ (fun w => ?_) (fun w => (mult w) * (Real.log (w (x : K))))).symm
state_before: case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w =
    ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x))
state_after: case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
w : InfinitePlace K
⊢ w ∈ univ.erase w₀ ↔ w ≠ w₀

tactic: exact ⟨ne_of_mem_erase, fun h => mem_erase_of_ne_of_mem h (mem_univ w)⟩
state_before: case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
w : InfinitePlace K
⊢ w ∈ univ.erase w₀ ↔ w ≠ w₀
state_after: no goals

tactic: norm_num
state_before: case h.e'_3
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  ∑ x_1 ∈ univ.erase w₀, ↑x_1.mult * Real.log (x_1 ((algebraMap (𝓞 K) K) ↑x)) =
    -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
⊢ -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)) = -(↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)))
state_after: no goals

tactic: exact fun w _ => pow_ne_zero _ (AbsoluteValue.ne_zero _ (coe_ne_zero x))
state_before: case hf
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) = 0
⊢ ∀ x_1 ∈ univ, x_1 ((algebraMap (𝓞 K) K) ↑x) ^ x_1.mult ≠ 0
state_after: no goals