Theorem: MeasureTheory.Measure.prod_swap
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

tactic: have : sum (fun (i : ℕ × ℕ) ↦ map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2)))
     = sum (fun (i : ℕ × ℕ) ↦ map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) := by
  ext s hs
  rw [sum_apply _ hs, sum_apply _ hs]
  exact ((Equiv.prodComm ℕ ℕ).tsum_eq _).symm
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
⊢ map Prod.swap (μ.prod ν) = ν.prod μ
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
⊢ map Prod.swap (μ.prod ν) = ν.prod μ

tactic: rw [← sum_sFiniteSeq μ, ← sum_sFiniteSeq ν, prod_sum, prod_sum,
  map_sum measurable_swap.aemeasurable, this]
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
⊢ map Prod.swap (μ.prod ν) = ν.prod μ
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
⊢ (sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) =
    sum fun p => (sFiniteSeq ν p.1).prod (sFiniteSeq μ p.2)

tactic: congr 1
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
⊢ (sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) =
    sum fun p => (sFiniteSeq ν p.1).prod (sFiniteSeq μ p.2)
state_after: case e_f
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
⊢ (fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) = fun p =>
    (sFiniteSeq ν p.1).prod (sFiniteSeq μ p.2)

tactic: ext1 i
state_before: case e_f
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
⊢ (fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) = fun p =>
    (sFiniteSeq ν p.1).prod (sFiniteSeq μ p.2)
state_after: case e_f.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
i : ℕ × ℕ
⊢ map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1)) = (sFiniteSeq ν i.1).prod (sFiniteSeq μ i.2)

tactic: refine (prod_eq ?_).symm
state_before: case e_f.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
i : ℕ × ℕ
⊢ map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1)) = (sFiniteSeq ν i.1).prod (sFiniteSeq μ i.2)
state_after: case e_f.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
i : ℕ × ℕ
⊢ ∀ (s : Set β) (t : Set α),
    MeasurableSet s →
      MeasurableSet t →
        (map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) (s ×ˢ t) =
          (sFiniteSeq ν i.1) s * (sFiniteSeq μ i.2) t

tactic: intro s t hs ht
state_before: case e_f.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
i : ℕ × ℕ
⊢ ∀ (s : Set β) (t : Set α),
    MeasurableSet s →
      MeasurableSet t →
        (map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) (s ×ˢ t) =
          (sFiniteSeq ν i.1) s * (sFiniteSeq μ i.2) t
state_after: case e_f.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
i : ℕ × ℕ
s : Set β
t : Set α
hs : MeasurableSet s
ht : MeasurableSet t
⊢ (map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) (s ×ˢ t) = (sFiniteSeq ν i.1) s * (sFiniteSeq μ i.2) t

tactic: simp_rw [map_apply measurable_swap (hs.prod ht), preimage_swap_prod, prod_prod, mul_comm]
state_before: case e_f.h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
this :
  (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
i : ℕ × ℕ
s : Set β
t : Set α
hs : MeasurableSet s
ht : MeasurableSet t
⊢ (map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) (s ×ˢ t) = (sFiniteSeq ν i.1) s * (sFiniteSeq μ i.2) t
state_after: no goals

tactic: ext s hs
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
⊢ (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) =
    sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))
state_after: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
s : Set (β × α)
hs : MeasurableSet s
⊢ (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) s =
    (sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) s

tactic: rw [sum_apply _ hs, sum_apply _ hs]
state_before: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
s : Set (β × α)
hs : MeasurableSet s
⊢ (sum fun i => map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) s =
    (sum fun i => map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) s
state_after: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
s : Set (β × α)
hs : MeasurableSet s
⊢ ∑' (i : ℕ × ℕ), (map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) s =
    ∑' (i : ℕ × ℕ), (map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) s

tactic: exact ((Equiv.prodComm ℕ ℕ).tsum_eq _).symm
state_before: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite ν
inst✝ : SFinite μ
s : Set (β × α)
hs : MeasurableSet s
⊢ ∑' (i : ℕ × ℕ), (map Prod.swap ((sFiniteSeq μ i.1).prod (sFiniteSeq ν i.2))) s =
    ∑' (i : ℕ × ℕ), (map Prod.swap ((sFiniteSeq μ i.2).prod (sFiniteSeq ν i.1))) s
state_after: no goals