Theorem: Real.smul_map_diagonal_volume_pi
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: refine (Measure.pi_eq fun s hs => ?_).symm
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
⊢ ofReal |(Matrix.diagonal D).det| • Measure.map (⇑(toLin' (Matrix.diagonal D))) volume = volume
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ (ofReal |(Matrix.diagonal D).det| • Measure.map (⇑(toLin' (Matrix.diagonal D))) volume) (univ.pi s) =
    ∏ i : ι, volume (s i)

tactic: simp only [det_diagonal, Measure.coe_smul, Algebra.id.smul_eq_mul, Pi.smul_apply]
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ (ofReal |(Matrix.diagonal D).det| • Measure.map (⇑(toLin' (Matrix.diagonal D))) volume) (univ.pi s) =
    ∏ i : ι, volume (s i)
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ ofReal |∏ i : ι, D i| * (Measure.map (⇑(toLin' (Matrix.diagonal D))) volume) (univ.pi s) = ∏ x : ι, volume (s x)

tactic: rw [Measure.map_apply _ (MeasurableSet.univ_pi hs)]
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ ofReal |∏ i : ι, D i| * (Measure.map (⇑(toLin' (Matrix.diagonal D))) volume) (univ.pi s) = ∏ x : ι, volume (s x)
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ ofReal |∏ i : ι, D i| * volume (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi s) = ∏ x : ι, volume (s x)

ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ Measurable ⇑(toLin' (Matrix.diagonal D))

tactic: swap
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ ofReal |∏ i : ι, D i| * volume (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi s) = ∏ x : ι, volume (s x)

ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ Measurable ⇑(toLin' (Matrix.diagonal D))
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ Measurable ⇑(toLin' (Matrix.diagonal D))

ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ ofReal |∏ i : ι, D i| * volume (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi s) = ∏ x : ι, volume (s x)

tactic: rw [this, volume_pi_pi, Finset.abs_prod,
  ENNReal.ofReal_prod_of_nonneg fun i _ => abs_nonneg (D i), ← Finset.prod_mul_distrib]
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
B : ∀ (i : ι), ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)
⊢ ofReal |∏ i : ι, D i| * volume (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi s) = ∏ x : ι, volume (s x)
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
B : ∀ (i : ι), ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)
⊢ ∏ x : ι, ofReal |D x| * volume ((fun x_1 => D x * x_1) ⁻¹' s x) = ∏ x : ι, volume (s x)

tactic: simp only [B]
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
B : ∀ (i : ι), ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)
⊢ ∏ x : ι, ofReal |D x| * volume ((fun x_1 => D x * x_1) ⁻¹' s x) = ∏ x : ι, volume (s x)
state_after: no goals

tactic: exact Continuous.measurable (LinearMap.continuous_on_pi _)
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ Measurable ⇑(toLin' (Matrix.diagonal D))
state_after: no goals

tactic: ext f
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
state_after: case h
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
f : ι → ℝ
⊢ (f ∈ ⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) ↔ f ∈ univ.pi fun i => (fun x => D i * x) ⁻¹' s i

tactic: simp only [LinearMap.coe_proj, Algebra.id.smul_eq_mul, LinearMap.smul_apply, mem_univ_pi,
  mem_preimage, LinearMap.pi_apply, diagonal_toLin']
state_before: case h
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
f : ι → ℝ
⊢ (f ∈ ⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) ↔ f ∈ univ.pi fun i => (fun x => D i * x) ⁻¹' s i
state_after: no goals

tactic: intro i
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
⊢ ∀ (i : ι), ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
⊢ ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)

tactic: have A : D i ≠ 0 := by
  simp only [det_diagonal, Ne] at h
  exact Finset.prod_ne_zero_iff.1 h i (Finset.mem_univ i)
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
⊢ ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
A : D i ≠ 0
⊢ ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)

tactic: rw [volume_preimage_mul_left A, ← mul_assoc, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul,
  mul_inv_cancel A, abs_one, ENNReal.ofReal_one, one_mul]
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
A : D i ≠ 0
⊢ ofReal |D i| * volume ((fun x => D i * x) ⁻¹' s i) = volume (s i)
state_after: no goals

tactic: simp only [det_diagonal, Ne] at h
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
h : (Matrix.diagonal D).det ≠ 0
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
⊢ D i ≠ 0
state_after: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
h : ¬∏ i : ι, D i = 0
⊢ D i ≠ 0

tactic: exact Finset.prod_ne_zero_iff.1 h i (Finset.mem_univ i)
state_before: ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
D : ι → ℝ
s : ι → Set ℝ
hs : ∀ (i : ι), MeasurableSet (s i)
this : (⇑(toLin' (Matrix.diagonal D)) ⁻¹' univ.pi fun i => s i) = univ.pi fun i => (fun x => D i * x) ⁻¹' s i
i : ι
h : ¬∏ i : ι, D i = 0
⊢ D i ≠ 0
state_after: no goals