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

tactic: rw [mem_torsion]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
⊢ (logEmbedding K) x = 0 ↔ x ∈ torsion K
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
⊢ (logEmbedding K) x = 0 ↔ ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1

tactic: refine ⟨fun h w => ?_, fun h => ?_⟩
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
⊢ (logEmbedding K) x = 0 ↔ ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1

case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1
⊢ (logEmbedding K) x = 0

tactic: by_cases hw : w = w₀
state_before: case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1

case neg
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : ¬w = w₀
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1

tactic: suffices -mult w₀ * Real.log (w₀ (x : K)) = 0 by
  rw [neg_mul, neg_eq_zero, ← hw] at this
  exact mult_log_place_eq_zero.mp this
state_before: case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
⊢ -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)) = 0

tactic: rw [← sum_logEmbedding_component, sum_eq_zero]
state_before: case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
⊢ -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)) = 0
state_after: case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
⊢ ∀ x_1 ∈ univ, (logEmbedding K) x x_1 = 0

tactic: exact fun w _ => congrFun h w
state_before: case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
⊢ ∀ x_1 ∈ univ, (logEmbedding K) x x_1 = 0
state_after: no goals

tactic: rw [neg_mul, neg_eq_zero, ← hw] at this
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
this : -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x)) = 0
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
this : ↑w.mult * Real.log (w ((algebraMap (𝓞 K) K) ↑x)) = 0
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1

tactic: exact mult_log_place_eq_zero.mp this
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
this : ↑w.mult * Real.log (w ((algebraMap (𝓞 K) K) ↑x)) = 0
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: no goals

tactic: exact mult_log_place_eq_zero.mp (congrFun h ⟨w, hw⟩)
state_before: case neg
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : ¬w = w₀
⊢ w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: no goals

tactic: ext w
state_before: case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1
⊢ (logEmbedding K) x = 0
state_after: case refine_2.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1
w : { w // w ≠ w₀ }
⊢ (logEmbedding K) x w = 0 w

tactic: rw [logEmbedding_component, h w.val, Real.log_one, mul_zero, Pi.zero_apply]
state_before: case refine_2.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1
w : { w // w ≠ w₀ }
⊢ (logEmbedding K) x w = 0 w
state_after: no goals