l3lab/ntp-mathlib huggingface dataset:
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
⊢ (logEmbedding K) x = 0 ↔ x ∈ torsion K

Next tactic:
rw [mem_torsion]
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
⊢ (logEmbedding K) x = 0 ↔ ∀ (w : InfinitePlace K), w ↑↑x = 1

Next tactic:
refine ⟨fun h w => ?_, fun h => ?_⟩
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · 

Proof state:
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
⊢ w ↑↑x = 1

Next tactic:
by_cases hw : w = w₀
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · 

Proof state:
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 ↑↑x = 1

Next 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
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · suffices -mult w₀ * Real.log (w₀ (x : K)) = 0 by
        

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
this : -↑(mult w₀) * Real.log (w₀ ↑↑x) = 0
⊢ w ↑↑x = 1

Next tactic:
rw [neg_mul, neg_eq_zero, ← hw] at this
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · suffices -mult w₀ * Real.log (w₀ (x : K)) = 0 by
        rw [neg_mul, neg_eq_zero, ← hw] at this
        

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
h : (logEmbedding K) x = 0
w : InfinitePlace K
hw : w = w₀
this : ↑(mult w) * Real.log (w ↑↑x) = 0
⊢ w ↑↑x = 1

Next tactic:
exact mult_log_place_eq_zero.mp this
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · 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
      

Proof state:
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₀
⊢ -↑(mult w₀) * Real.log (w₀ ↑↑x) = 0

Next tactic:
rw [← sum_logEmbedding_component, sum_eq_zero]
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · 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
      rw [← sum_logEmbedding_component, sum_eq_zero]
      

Proof state:
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

Next tactic:
exact fun w _ => congrFun h w
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · 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
      rw [← sum_logEmbedding_component, sum_eq_zero]
      exact fun w _ => congrFun h w
    · 

Proof state:
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 ↑↑x = 1

Next tactic:
exact mult_log_place_eq_zero.mp (congrFun h ⟨w, hw⟩)
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · 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
      rw [← sum_logEmbedding_component, sum_eq_zero]
      exact fun w _ => congrFun h w
    · exact mult_log_place_eq_zero.mp (congrFun h ⟨w, hw⟩)
  · 

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

Next tactic:
ext w
theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K := by
  rw [mem_torsion]
  refine ⟨fun h w => ?_, fun h => ?_⟩
  · by_cases hw : w = w₀
    · 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
      rw [← sum_logEmbedding_component, sum_eq_zero]
      exact fun w _ => congrFun h w
    · exact mult_log_place_eq_zero.mp (congrFun h ⟨w, hw⟩)
  · ext w
    

Proof state:
case refine_2.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
h : ∀ (w : InfinitePlace K), w ↑↑x = 1
w : { w // w ≠ w₀ }
⊢ (logEmbedding K) x w = OfNat.ofNat 0 w

Next tactic:
rw [logEmbedding_component, h w.val, Real.log_one, mul_zero, Pi.zero_apply]
theorem logEmbedding_component_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : {w : InfinitePlace K // w ≠ w₀}) : |logEmbedding K x w| ≤ r := by
  

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : { w // w ≠ w₀ }
⊢ |(logEmbedding K) x w| ≤ r

Next tactic:
lift r to NNReal using hr
theorem logEmbedding_component_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : {w : InfinitePlace K // w ≠ w₀}) : |logEmbedding K x w| ≤ r := by
  lift r to NNReal using hr
  

Proof state:
case intro
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
w : { w // w ≠ w₀ }
r : NNReal
h : ‖(logEmbedding K) x‖ ≤ ↑r
⊢ |(logEmbedding K) x w| ≤ ↑r

Next tactic:
simp_rw [Pi.norm_def, NNReal.coe_le_coe, Finset.sup_le_iff, ← NNReal.coe_le_coe] at h
theorem logEmbedding_component_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : {w : InfinitePlace K // w ≠ w₀}) : |logEmbedding K x w| ≤ r := by
  lift r to NNReal using hr
  simp_rw [Pi.norm_def, NNReal.coe_le_coe, Finset.sup_le_iff, ← NNReal.coe_le_coe] at h
  

Proof state:
case intro
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (↥(𝓞 K))ˣ
w : { w // w ≠ w₀ }
r : NNReal
h : ∀ b ∈ univ, ↑‖(logEmbedding K) x b‖₊ ≤ ↑r
⊢ |(logEmbedding K) x w| ≤ ↑r

Next tactic:
exact h w (mem_univ _)
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
⊢ |Real.log (w ↑↑x)| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ x ≤ ↑(mult w) * x

Next tactic:
nth_rw 1 [← one_mul x]
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 1 * x ≤ ↑(mult w) * x

Next tactic:
refine mul_le_mul ?_ le_rfl hx ?_
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    

Proof state:
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 1 ≤ ↑(mult w)
case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 0 ≤ ↑(mult w)

Next tactic:
all_goals { rw [mult]; split_ifs <;> norm_num }
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals 

Proof state:
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 1 ≤ ↑(mult w)

Next tactic:
{ rw [mult]; split_ifs <;> norm_num }
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { 

Proof state:
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 1 ≤ ↑(mult w)

Next tactic:
rw [mult]
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; 

Proof state:
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 1 ≤ ↑(if IsReal w then 1 else 2)

Next tactic:
split_ifs
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> 

Proof state:
case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
h✝ : IsReal w
⊢ 1 ≤ ↑1

Next tactic:
norm_num
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> 

Proof state:
case neg
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
h✝ : ¬IsReal w
⊢ 1 ≤ ↑2

Next tactic:
norm_num
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals 

Proof state:
case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 0 ≤ ↑(mult w)

Next tactic:
{ rw [mult]; split_ifs <;> norm_num }
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { 

Proof state:
case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 0 ≤ ↑(mult w)

Next tactic:
rw [mult]
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; 

Proof state:
case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
⊢ 0 ≤ ↑(if IsReal w then 1 else 2)

Next tactic:
split_ifs
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> 

Proof state:
case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
h✝ : IsReal w
⊢ 0 ≤ ↑1

Next tactic:
norm_num
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> 

Proof state:
case neg
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x✝ : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x✝‖ ≤ r
w : InfinitePlace K
x : ℝ
hx : 0 ≤ x
h✝ : ¬IsReal w
⊢ 0 ≤ ↑2

Next tactic:
norm_num
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  

Proof state:
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
⊢ |Real.log (w ↑↑x)| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
by_cases hw : w = w₀
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · 

Proof state:
case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
⊢ |Real.log (w ↑↑x)| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    

Proof state:
case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : (fun x => ‖x‖) (-↑(mult w₀) * Real.log (w₀ ↑↑x)) = (fun x => ‖x‖) (∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w)
⊢ |Real.log (w ↑↑x)| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
    

Proof state:
case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : (fun x => ‖x‖) (-↑(mult w₀) * Real.log (w₀ ↑↑x)) ≤ ∑ i : { w // w ≠ w₀ }, ‖(logEmbedding K) x i‖
⊢ |Real.log (w ↑↑x)| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
simp_rw [norm_mul, norm_neg, Real.norm_eq_abs, Nat.abs_cast] at hyp
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
    simp_rw [norm_mul, norm_neg, Real.norm_eq_abs, Nat.abs_cast] at hyp
    

Proof state:
case pos
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : ↑(mult w₀) * |Real.log (w₀ ↑↑x)| ≤ ∑ x_1 : { w // w ≠ w₀ }, |(logEmbedding K) x x_1|
⊢ |Real.log (w ↑↑x)| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
refine (le_trans ?_ hyp).trans ?_
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
    simp_rw [norm_mul, norm_neg, Real.norm_eq_abs, Nat.abs_cast] at hyp
    refine (le_trans ?_ hyp).trans ?_
    · 

Proof state:
case pos.refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : ↑(mult w₀) * |Real.log (w₀ ↑↑x)| ≤ ∑ x_1 : { w // w ≠ w₀ }, |(logEmbedding K) x x_1|
⊢ |Real.log (w ↑↑x)| ≤ ↑(mult w₀) * |Real.log (w₀ ↑↑x)|

Next tactic:
rw [← hw]
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
    simp_rw [norm_mul, norm_neg, Real.norm_eq_abs, Nat.abs_cast] at hyp
    refine (le_trans ?_ hyp).trans ?_
    · rw [← hw]
      

Proof state:
case pos.refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : ↑(mult w₀) * |Real.log (w₀ ↑↑x)| ≤ ∑ x_1 : { w // w ≠ w₀ }, |(logEmbedding K) x x_1|
⊢ |Real.log (w ↑↑x)| ≤ ↑(mult w) * |Real.log (w ↑↑x)|

Next tactic:
exact tool _ (abs_nonneg _)
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
    simp_rw [norm_mul, norm_neg, Real.norm_eq_abs, Nat.abs_cast] at hyp
    refine (le_trans ?_ hyp).trans ?_
    · rw [← hw]
      exact tool _ (abs_nonneg _)
    · 

Proof state:
case pos.refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : ↑(mult w₀) * |Real.log (w₀ ↑↑x)| ≤ ∑ x_1 : { w // w ≠ w₀ }, |(logEmbedding K) x x_1|
⊢ ∑ x_1 : { w // w ≠ w₀ }, |(logEmbedding K) x x_1| ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
refine (sum_le_card_nsmul univ _ _
        (fun w _ => logEmbedding_component_le hr h w)).trans ?_
theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r := by
  have tool : ∀ x : ℝ, 0 ≤ x → x ≤ mult w * x := fun x hx => by
    nth_rw 1 [← one_mul x]
    refine mul_le_mul ?_ le_rfl hx ?_
    all_goals { rw [mult]; split_ifs <;> norm_num }
  by_cases hw : w = w₀
  · have hyp := congr_arg (‖·‖) (sum_logEmbedding_component x).symm
    replace hyp := (le_of_eq hyp).trans (norm_sum_le _ _)
    simp_rw [norm_mul, norm_neg, Real.norm_eq_abs, Nat.abs_cast] at hyp
    refine (le_trans ?_ hyp).trans ?_
    · rw [← hw]
      exact tool _ (abs_nonneg _)
    · refine (sum_le_card_nsmul univ _ _
        (fun w _ => logEmbedding_component_le hr h w)).trans ?_
      

Proof state:
case pos.refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
x : (↥(𝓞 K))ˣ
hr : 0 ≤ r
h : ‖(logEmbedding K) x‖ ≤ r
w : InfinitePlace K
tool : ∀ (x : ℝ), 0 ≤ x → x ≤ ↑(mult w) * x
hw : w = w₀
hyp : ↑(mult w₀) * |Real.log (w₀ ↑↑x)| ≤ ∑ x_1 : { w // w ≠ w₀ }, |(logEmbedding K) x x_1|
⊢ card univ • r ≤ ↑(Fintype.card (InfinitePlace K)) * r

Next tactic:
rw [nsmul_eq_mul]