Theorem: NumberField.mixedEmbedding.convexBodySumFun_apply'
File: Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean

tactic: simp_rw [convexBodySumFun_apply, ← Finset.sum_add_sum_compl {w | IsReal w}.toFinset,
  Set.toFinset_setOf, Finset.compl_filter, not_isReal_iff_isComplex, ← Finset.subtype_univ,
  ← Finset.univ.sum_subtype_eq_sum_filter, Finset.mul_sum]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ convexBodySumFun x = ∑ w : { w // w.IsReal }, ‖x.1 w‖ + 2 * ∑ w : { w // w.IsComplex }, ‖x.2 w‖
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ ∑ x_1 ∈ Finset.subtype IsReal Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x +
      ∑ x_1 ∈ Finset.subtype (fun x => x.IsComplex) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x =
    ∑ x_1 ∈ Finset.subtype IsReal Finset.univ, ‖x.1 x_1‖ + ∑ i ∈ Finset.subtype IsComplex Finset.univ, 2 * ‖x.2 i‖

tactic: congr
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ ∑ x_1 ∈ Finset.subtype IsReal Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x +
      ∑ x_1 ∈ Finset.subtype (fun x => x.IsComplex) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x =
    ∑ x_1 ∈ Finset.subtype IsReal Finset.univ, ‖x.1 x_1‖ + ∑ i ∈ Finset.subtype IsComplex Finset.univ, 2 * ‖x.2 i‖
state_after: case e_a.e_f
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ (fun x_1 => ↑(↑x_1).mult * (normAtPlace ↑x_1) x) = fun x_1 => ‖x.1 x_1‖

case e_a.e_f
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ (fun x_1 => ↑(↑x_1).mult * (normAtPlace ↑x_1) x) = fun i => 2 * ‖x.2 i‖

tactic: ext w
state_before: case e_a.e_f
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ (fun x_1 => ↑(↑x_1).mult * (normAtPlace ↑x_1) x) = fun x_1 => ‖x.1 x_1‖
state_after: case e_a.e_f.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
w : Subtype IsReal
⊢ ↑(↑w).mult * (normAtPlace ↑w) x = ‖x.1 w‖

tactic: rw [mult, if_pos w.prop, normAtPlace_apply_isReal, Nat.cast_one, one_mul]
state_before: case e_a.e_f.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
w : Subtype IsReal
⊢ ↑(↑w).mult * (normAtPlace ↑w) x = ‖x.1 w‖
state_after: no goals

tactic: ext w
state_before: case e_a.e_f
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
⊢ (fun x_1 => ↑(↑x_1).mult * (normAtPlace ↑x_1) x) = fun i => 2 * ‖x.2 i‖
state_after: case e_a.e_f.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
w : { x // x.IsComplex }
⊢ ↑(↑w).mult * (normAtPlace ↑w) x = 2 * ‖x.2 w‖

tactic: rw [mult, if_neg (not_isReal_iff_isComplex.mpr w.prop), normAtPlace_apply_isComplex,
  Nat.cast_ofNat]
state_before: case e_a.e_f.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
w : { x // x.IsComplex }
⊢ ↑(↑w).mult * (normAtPlace ↑w) x = 2 * ‖x.2 w‖
state_after: no goals