-- Mathlib/MeasureTheory/Measure/Lebesgue/VolumeOfBalls.lean
theorem Complex.volume_sum_rpow_le [Nonempty ι] {p : ℝ} (hp : 1 ≤ p) (r : ℝ) :
    volume {x : ι → ℂ | (∑ i, ‖x i‖ ^ p) ^ (1 / p) ≤ r} = (.ofReal r) ^ (2 * card ι) *
      .ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * card ι / p + 1))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
eq_zero : ∀ (x : ι → ℂ), (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p) = 0 ↔ x = 0
nm_zero : (∑ x : ι, ‖0 x‖ ^ p) ^ (1 / p) = 0
nm_neg : ∀ (x : ι → ℂ), (∑ x_1 : ι, ‖(-x) x_1‖ ^ p) ^ (1 / p) = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
nm_add :
  ∀ (x y : ι → ℂ),
    (∑ x_1 : ι, ‖(x + y) x_1‖ ^ p) ^ (1 / p) ≤ (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p) + (∑ x : ι, ‖y x‖ ^ p) ^ (1 / p)
nm_smul : ∀ (r : ℝ) (x : ι → ℂ), (∑ x_1 : ι, ‖(r • x) x_1‖ ^ p) ^ (1 / p) ≤ ‖r‖ * (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
rw [measure_le_eq_lt _ nm_zero (fun x ↦ nm_neg x) (fun x y ↦ nm_add x y) (eq_zero _).mp
  (fun r x => nm_smul r x), Complex.volume_sum_rpow_lt _ hp]

Result:
no goals

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
have : Fact (1 ≤ ENNReal.ofReal p) := fact_iff.mpr (ENNReal.ofReal_one ▸ (ofReal_le_ofReal hp))

Result:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
eq_zero : ∀ (x : ι → ℂ), (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p) = 0 ↔ x = 0
nm_zero : (∑ x : ι, ‖0 x‖ ^ p) ^ (1 / p) = 0
nm_neg : ∀ (x : ι → ℂ), (∑ x_1 : ι, ‖(-x) x_1‖ ^ p) ^ (1 / p) = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
nm_add :
  ∀ (x y : ι → ℂ),
    (∑ x_1 : ι, ‖(x + y) x_1‖ ^ p) ^ (1 / p) ≤ (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p) + (∑ x : ι, ‖y x‖ ^ p) ^ (1 / p)
nm_smul : ∀ (r : ℝ) (x : ι → ℂ), ‖r • x‖ ≤ ‖r‖ * ‖x‖
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
simp_rw [eq_norm] at nm_smul

Result:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
eq_zero : ∀ (x : ι → ℂ), (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p) = 0 ↔ x = 0
nm_zero : (∑ x : ι, ‖0 x‖ ^ p) ^ (1 / p) = 0
nm_neg : ∀ (x : ι → ℂ), (∑ x_1 : ι, ‖(-x) x_1‖ ^ p) ^ (1 / p) = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
nm_add :
  ∀ (x y : ι → ℂ),
    (∑ x_1 : ι, ‖(x + y) x_1‖ ^ p) ^ (1 / p) ≤ (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p) + (∑ x : ι, ‖y x‖ ^ p) ^ (1 / p)
nm_smul : ∀ (r : ℝ) (x : ι → ℂ), (∑ x_1 : ι, ‖(r • x) x_1‖ ^ p) ^ (1 / p) ≤ ‖r‖ * (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ i : ι, ‖x i‖ ^ (ENNReal.ofReal p).toReal) ^ (1 / (ENNReal.ofReal p).toReal)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
simp_rw [toReal_ofReal (le_of_lt h₁)] at eq_norm

Result:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
have nm_zero := norm_zero (E := PiLp (.ofReal p) (fun _ : ι => ℂ))

Result:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
nm_zero : ‖0‖ = 0
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
have h₁ : 0 < p := by linarith

Result:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
nm_zero : ‖0‖ = 0
eq_zero : ∀ (x : ι → ℂ), ‖x‖ = 0 ↔ x = 0
nm_neg : ∀ (x : ι → ℂ), ‖-x‖ = ‖x‖
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))

Tactic:
have nm_add := fun x y : ι → ℂ => norm_add_le (E := PiLp (.ofReal p) (fun _ : ι => ℂ)) x y

Result:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
h₁ : 0 < p
eq_norm : ∀ (x : ι → ℂ), ‖x‖ = (∑ x_1 : ι, ‖x x_1‖ ^ p) ^ (1 / p)
this : Fact (1 ≤ ENNReal.ofReal p)
nm_zero : ‖0‖ = 0
eq_zero : ∀ (x : ι → ℂ), ‖x‖ = 0 ↔ x = 0
nm_neg : ∀ (x : ι → ℂ), ‖-x‖ = ‖x‖
nm_add : ∀ (x y : ι → ℂ), ‖x + y‖ ≤ ‖x‖ + ‖y‖
⊢ volume {x | (∑ i : ι, ‖x i‖ ^ p) ^ (1 / p) ≤ r} =
    ENNReal.ofReal r ^ (2 * card ι) *
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * ↑(card ι) / p + 1))