-- 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)
⊢ 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_smul := fun (r : ℝ) (x : ι → ℂ) =>
  norm_smul_le (β := PiLp (.ofReal p) (fun _ : ι => ℂ)) r x

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 : ι → ℂ), ‖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))

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
⊢ 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_neg := fun x : ι → ℂ => norm_neg (E := PiLp (.ofReal p) (fun _ : ι => ℂ)) x

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‖
⊢ 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
⊢ 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 eq_norm := fun x : ι → ℂ => (PiLp.norm_eq_sum (p := .ofReal p) (f := x)
  ((toReal_ofReal (le_of_lt h₁)).symm ▸ h₁))

Result:
ι : 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))

Proof state:
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : Nonempty ι
p : ℝ
hp : 1 ≤ p
r : ℝ
⊢ 0 < p

Tactic:
linarith

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)
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))

Tactic:
simp_rw [eq_norm] at eq_zero nm_zero nm_neg nm_add

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)
⊢ 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
⊢ 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 eq_zero := fun x : ι → ℂ => norm_eq_zero (E := PiLp (.ofReal p) (fun _ : ι => ℂ)) (a := x)

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
⊢ 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))