l3lab/ntp-mathlib huggingface dataset:
instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
    IsOpenPosMeasure (MeasureTheory.Measure.pi μ) := by
  constructor
  rintro U U_open ⟨a, ha⟩
  obtain ⟨s, ⟨hs, hsU⟩⟩ := isOpen_pi_iff'.1 U_open a ha
  refine' ne_of_gt (lt_of_lt_of_le _ (measure_mono hsU))
  simp only [pi_pi]
  

Proof state:
case open_pos.intro.intro.intro
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsOpenPosMeasure (μ i)
U : Set ((i : ι) → α i)
U_open : IsOpen U
a : (i : ι) → α i
ha : a ∈ U
s : (a : ι) → Set (α a)
hs : ∀ (a_1 : ι), IsOpen (s a_1) ∧ a a_1 ∈ s a_1
hsU : Set.pi univ s ⊆ U
⊢ 0 < ∏ i : ι, ↑↑(μ i) (s i)

Next tactic:
rw [CanonicallyOrderedCommSemiring.prod_pos]
instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
    IsOpenPosMeasure (MeasureTheory.Measure.pi μ) := by
  constructor
  rintro U U_open ⟨a, ha⟩
  obtain ⟨s, ⟨hs, hsU⟩⟩ := isOpen_pi_iff'.1 U_open a ha
  refine' ne_of_gt (lt_of_lt_of_le _ (measure_mono hsU))
  simp only [pi_pi]
  rw [CanonicallyOrderedCommSemiring.prod_pos]
  

Proof state:
case open_pos.intro.intro.intro
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsOpenPosMeasure (μ i)
U : Set ((i : ι) → α i)
U_open : IsOpen U
a : (i : ι) → α i
ha : a ∈ U
s : (a : ι) → Set (α a)
hs : ∀ (a_1 : ι), IsOpen (s a_1) ∧ a a_1 ∈ s a_1
hsU : Set.pi univ s ⊆ U
⊢ ∀ i ∈ Finset.univ, 0 < ↑↑(μ i) (s i)

Next tactic:
intro i _
instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
    IsOpenPosMeasure (MeasureTheory.Measure.pi μ) := by
  constructor
  rintro U U_open ⟨a, ha⟩
  obtain ⟨s, ⟨hs, hsU⟩⟩ := isOpen_pi_iff'.1 U_open a ha
  refine' ne_of_gt (lt_of_lt_of_le _ (measure_mono hsU))
  simp only [pi_pi]
  rw [CanonicallyOrderedCommSemiring.prod_pos]
  intro i _
  

Proof state:
case open_pos.intro.intro.intro
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsOpenPosMeasure (μ i)
U : Set ((i : ι) → α i)
U_open : IsOpen U
a : (i : ι) → α i
ha : a ∈ U
s : (a : ι) → Set (α a)
hs : ∀ (a_1 : ι), IsOpen (s a_1) ∧ a a_1 ∈ s a_1
hsU : Set.pi univ s ⊆ U
i : ι
a✝ : i ∈ Finset.univ
⊢ 0 < ↑↑(μ i) (s i)

Next tactic:
apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
⊢ IsFiniteMeasureOnCompacts (Measure.pi μ)

Next tactic:
constructor
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  constructor
  

Proof state:
case lt_top_of_isCompact
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
⊢ ∀ ⦃K : Set ((i : ι) → α i)⦄, IsCompact K → ↑↑(Measure.pi μ) K < ⊤

Next tactic:
intro K hK
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  constructor
  intro K hK
  

Proof state:
case lt_top_of_isCompact
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
K : Set ((i : ι) → α i)
hK : IsCompact K
⊢ ↑↑(Measure.pi μ) K < ⊤

Next tactic:
suffices Measure.pi μ (Set.univ.pi fun j => Function.eval j '' K) < ⊤ by
    exact lt_of_le_of_lt (measure_mono (univ.subset_pi_eval_image K)) this
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  constructor
  intro K hK
  suffices Measure.pi μ (Set.univ.pi fun j => Function.eval j '' K) < ⊤ by
    

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
K : Set ((i : ι) → α i)
hK : IsCompact K
this : ↑↑(Measure.pi μ) (Set.pi univ fun j => eval j '' K) < ⊤
⊢ ↑↑(Measure.pi μ) K < ⊤

Next tactic:
exact lt_of_le_of_lt (measure_mono (univ.subset_pi_eval_image K)) this
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  constructor
  intro K hK
  suffices Measure.pi μ (Set.univ.pi fun j => Function.eval j '' K) < ⊤ by
    exact lt_of_le_of_lt (measure_mono (univ.subset_pi_eval_image K)) this
  

Proof state:
case lt_top_of_isCompact
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
K : Set ((i : ι) → α i)
hK : IsCompact K
⊢ ↑↑(Measure.pi μ) (Set.pi univ fun j => eval j '' K) < ⊤

Next tactic:
rw [Measure.pi_pi]
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  constructor
  intro K hK
  suffices Measure.pi μ (Set.univ.pi fun j => Function.eval j '' K) < ⊤ by
    exact lt_of_le_of_lt (measure_mono (univ.subset_pi_eval_image K)) this
  rw [Measure.pi_pi]
  

Proof state:
case lt_top_of_isCompact
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
K : Set ((i : ι) → α i)
hK : IsCompact K
⊢ ∏ i : ι, ↑↑(μ i) (eval i '' K) < ⊤

Next tactic:
refine' WithTop.prod_lt_top _
instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
  constructor
  intro K hK
  suffices Measure.pi μ (Set.univ.pi fun j => Function.eval j '' K) < ⊤ by
    exact lt_of_le_of_lt (measure_mono (univ.subset_pi_eval_image K)) this
  rw [Measure.pi_pi]
  refine' WithTop.prod_lt_top _
  

Proof state:
case lt_top_of_isCompact
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝⁴ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
inst✝³ : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : (i : ι) → TopologicalSpace (α i)
inst✝ : ∀ (i : ι), IsFiniteMeasureOnCompacts (μ i)
K : Set ((i : ι) → α i)
hK : IsCompact K
⊢ ∀ i ∈ Finset.univ, ↑↑(μ i) (eval i '' K) ≠ ⊤

Next tactic:
exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
    MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
      ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : Fintype ι'
p : ι → Prop
inst✝ : DecidablePred p
⊢ MeasurePreserving ⇑(MeasurableEquiv.piEquivPiSubtypeProd α p)

Next tactic:
set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
    MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
      ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
  set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : Fintype ι'
p : ι → Prop
inst✝ : DecidablePred p
e : ((i : Subtype p) → α ↑i) × ((i : { i // ¬p i }) → α ↑i) ≃ᵐ ((i : ι) → α i) :=
  (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
⊢ MeasurePreserving ⇑(MeasurableEquiv.piEquivPiSubtypeProd α p)

Next tactic:
refine' MeasurePreserving.symm e _
theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
    MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
      ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
  set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
  refine' MeasurePreserving.symm e _
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : Fintype ι'
p : ι → Prop
inst✝ : DecidablePred p
e : ((i : Subtype p) → α ↑i) × ((i : { i // ¬p i }) → α ↑i) ≃ᵐ ((i : ι) → α i) :=
  (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
⊢ MeasurePreserving ⇑e

Next tactic:
refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
    MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
      ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
  set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
  refine' MeasurePreserving.symm e _
  refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : Fintype ι'
p : ι → Prop
inst✝ : DecidablePred p
e : ((i : Subtype p) → α ↑i) × ((i : { i // ¬p i }) → α ↑i) ≃ᵐ ((i : ι) → α i) :=
  (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
s : (i : ι) → Set (α i)
x✝ : ∀ (i : ι), MeasurableSet (s i)
⊢ ↑↑(Measure.map (⇑e) (Measure.prod (Measure.pi fun i => μ ↑i) (Measure.pi fun i => μ ↑i))) (Set.pi univ s) =
    ∏ i : ι, ↑↑(μ i) (s i)

Next tactic:
have : e ⁻¹' pi univ s =
      (pi univ fun i : { i // p i } => s i) ×ˢ pi univ fun i : { i // ¬p i } => s i :=
    Equiv.preimage_piEquivPiSubtypeProd_symm_pi p s
theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
    MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
      ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
  set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
  refine' MeasurePreserving.symm e _
  refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
  have : e ⁻¹' pi univ s =
      (pi univ fun i : { i // p i } => s i) ×ˢ pi univ fun i : { i // ¬p i } => s i :=
    Equiv.preimage_piEquivPiSubtypeProd_symm_pi p s
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : Fintype ι'
p : ι → Prop
inst✝ : DecidablePred p
e : ((i : Subtype p) → α ↑i) × ((i : { i // ¬p i }) → α ↑i) ≃ᵐ ((i : ι) → α i) :=
  (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
s : (i : ι) → Set (α i)
x✝ : ∀ (i : ι), MeasurableSet (s i)
this : ⇑e ⁻¹' Set.pi univ s = (Set.pi univ fun i => s ↑i) ×ˢ Set.pi univ fun i => s ↑i
⊢ ↑↑(Measure.map (⇑e) (Measure.prod (Measure.pi fun i => μ ↑i) (Measure.pi fun i => μ ↑i))) (Set.pi univ s) =
    ∏ i : ι, ↑↑(μ i) (s i)

Next tactic:
rw [e.map_apply, this, prod_prod, pi_pi, pi_pi]
theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
    MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
      ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
  set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
  refine' MeasurePreserving.symm e _
  refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
  have : e ⁻¹' pi univ s =
      (pi univ fun i : { i // p i } => s i) ×ˢ pi univ fun i : { i // ¬p i } => s i :=
    Equiv.preimage_piEquivPiSubtypeProd_symm_pi p s
  rw [e.map_apply, this, prod_prod, pi_pi, pi_pi]
  

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ i)
inst✝¹ : Fintype ι'
p : ι → Prop
inst✝ : DecidablePred p
e : ((i : Subtype p) → α ↑i) × ((i : { i // ¬p i }) → α ↑i) ≃ᵐ ((i : ι) → α i) :=
  (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
s : (i : ι) → Set (α i)
x✝ : ∀ (i : ι), MeasurableSet (s i)
this : ⇑e ⁻¹' Set.pi univ s = (Set.pi univ fun i => s ↑i) ×ˢ Set.pi univ fun i => s ↑i
⊢ (∏ i : Subtype p, ↑↑(μ ↑i) (s ↑i)) * ∏ i : { i // ¬p i }, ↑↑(μ ↑i) (s ↑i) = ∏ i : ι, ↑↑(μ i) (s i)

Next tactic:
exact Fintype.prod_subtype_mul_prod_subtype p fun i => μ i (s i)
theorem measurePreserving_piCongrLeft (f : ι' ≃ ι) :
    MeasurePreserving (MeasurableEquiv.piCongrLeft α f)
      (Measure.pi fun i' => μ (f i')) (Measure.pi μ) where
  measurable := (MeasurableEquiv.piCongrLeft α f).measurable
  map_eq := by
    

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝² : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝¹ : ∀ (i : ι), SigmaFinite (μ i)
inst✝ : Fintype ι'
f : ι' ≃ ι
⊢ Measure.map (⇑(MeasurableEquiv.piCongrLeft α f)) (Measure.pi fun i' => μ (f i')) = Measure.pi μ

Next tactic:
refine' (pi_eq fun s _ => _).symm
theorem measurePreserving_piCongrLeft (f : ι' ≃ ι) :
    MeasurePreserving (MeasurableEquiv.piCongrLeft α f)
      (Measure.pi fun i' => μ (f i')) (Measure.pi μ) where
  measurable := (MeasurableEquiv.piCongrLeft α f).measurable
  map_eq := by
    refine' (pi_eq fun s _ => _).symm
    

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝² : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝¹ : ∀ (i : ι), SigmaFinite (μ i)
inst✝ : Fintype ι'
f : ι' ≃ ι
s : (i : ι) → Set (α i)
x✝ : ∀ (i : ι), MeasurableSet (s i)
⊢ ↑↑(Measure.map (⇑(MeasurableEquiv.piCongrLeft α f)) (Measure.pi fun i' => μ (f i'))) (Set.pi univ s) =
    ∏ i : ι, ↑↑(μ i) (s i)

Next tactic:
rw [MeasurableEquiv.map_apply, MeasurableEquiv.coe_piCongrLeft f,
      Equiv.piCongrLeft_preimage_univ_pi, pi_pi _ _, f.prod_comp (fun i => μ i (s i))]
theorem measurePreserving_sumPiEquivProdPi_symm {π : ι ⊕ ι' → Type*}
    {m : ∀ i, MeasurableSpace (π i)} (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm
      ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i))) (Measure.pi μ) where
  measurable := (MeasurableEquiv.sumPiEquivProdPi π).symm.measurable
  map_eq := by
    

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α i)
m✝ : (i : ι) → MeasurableSpace (α i)
μ✝ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
π : ι ⊕ ι' → Type u_4
m : (i : ι ⊕ ι') → MeasurableSpace (π i)
μ : (i : ι ⊕ ι') → Measure (π i)
inst✝ : ∀ (i : ι ⊕ ι'), SigmaFinite (μ i)
⊢ Measure.map (⇑(MeasurableEquiv.sumPiEquivProdPi π).symm)
      (Measure.prod (Measure.pi fun i => μ (Sum.inl i)) (Measure.pi fun i => μ (Sum.inr i))) =
    Measure.pi μ

Next tactic:
refine' (pi_eq fun s _ => _).symm
theorem measurePreserving_sumPiEquivProdPi_symm {π : ι ⊕ ι' → Type*}
    {m : ∀ i, MeasurableSpace (π i)} (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm
      ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i))) (Measure.pi μ) where
  measurable := (MeasurableEquiv.sumPiEquivProdPi π).symm.measurable
  map_eq := by
    refine' (pi_eq fun s _ => _).symm
    

Proof state:
ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α i)
m✝ : (i : ι) → MeasurableSpace (α i)
μ✝ : (i : ι) → Measure (α i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
π : ι ⊕ ι' → Type u_4
m : (i : ι ⊕ ι') → MeasurableSpace (π i)
μ : (i : ι ⊕ ι') → Measure (π i)
inst✝ : ∀ (i : ι ⊕ ι'), SigmaFinite (μ i)
s : (i : ι ⊕ ι') → Set (π i)
x✝ : ∀ (i : ι ⊕ ι'), MeasurableSet (s i)
⊢ ↑↑(Measure.map (⇑(MeasurableEquiv.sumPiEquivProdPi π).symm)
            (Measure.prod (Measure.pi fun i => μ (Sum.inl i)) (Measure.pi fun i => μ (Sum.inr i))))
      (Set.pi univ s) =
    ∏ i : ι ⊕ ι', ↑↑(μ i) (s i)

Next tactic:
simp_rw [MeasurableEquiv.map_apply, MeasurableEquiv.coe_sumPiEquivProdPi_symm,
      Equiv.sumPiEquivProdPi_symm_preimage_univ_pi, Measure.prod_prod, Measure.pi_pi,
      Fintype.prod_sum_type]
theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
    (i : Fin (n + 1)) :
    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
      ((μ i).prod <| Measure.pi fun j => μ (i.succAbove j)) := by
  

Proof state:
ι : Type u_1
ι' : Type u_2
α✝ : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α✝ i)
m✝ : (i : ι) → MeasurableSpace (α✝ i)
μ✝ : (i : ι) → Measure (α✝ i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
n : ℕ
α : Fin (n + 1) → Type u
m : (i : Fin (n + 1)) → MeasurableSpace (α i)
μ : (i : Fin (n + 1)) → Measure (α i)
inst✝ : ∀ (i : Fin (n + 1)), SigmaFinite (μ i)
i : Fin (n + 1)
⊢ MeasurePreserving ⇑(MeasurableEquiv.piFinSuccAbove α i)

Next tactic:
set e := (MeasurableEquiv.piFinSuccAbove α i).symm
theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
    (i : Fin (n + 1)) :
    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
      ((μ i).prod <| Measure.pi fun j => μ (i.succAbove j)) := by
  set e := (MeasurableEquiv.piFinSuccAbove α i).symm
  

Proof state:
ι : Type u_1
ι' : Type u_2
α✝ : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α✝ i)
m✝ : (i : ι) → MeasurableSpace (α✝ i)
μ✝ : (i : ι) → Measure (α✝ i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
n : ℕ
α : Fin (n + 1) → Type u
m : (i : Fin (n + 1)) → MeasurableSpace (α i)
μ : (i : Fin (n + 1)) → Measure (α i)
inst✝ : ∀ (i : Fin (n + 1)), SigmaFinite (μ i)
i : Fin (n + 1)
e : α i × ((j : Fin n) → α (Fin.succAbove i j)) ≃ᵐ ((j : Fin (n + 1)) → α j) :=
  (MeasurableEquiv.piFinSuccAbove α i).symm
⊢ MeasurePreserving ⇑(MeasurableEquiv.piFinSuccAbove α i)

Next tactic:
refine' MeasurePreserving.symm e _
theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
    (i : Fin (n + 1)) :
    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
      ((μ i).prod <| Measure.pi fun j => μ (i.succAbove j)) := by
  set e := (MeasurableEquiv.piFinSuccAbove α i).symm
  refine' MeasurePreserving.symm e _
  

Proof state:
ι : Type u_1
ι' : Type u_2
α✝ : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α✝ i)
m✝ : (i : ι) → MeasurableSpace (α✝ i)
μ✝ : (i : ι) → Measure (α✝ i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
n : ℕ
α : Fin (n + 1) → Type u
m : (i : Fin (n + 1)) → MeasurableSpace (α i)
μ : (i : Fin (n + 1)) → Measure (α i)
inst✝ : ∀ (i : Fin (n + 1)), SigmaFinite (μ i)
i : Fin (n + 1)
e : α i × ((j : Fin n) → α (Fin.succAbove i j)) ≃ᵐ ((j : Fin (n + 1)) → α j) :=
  (MeasurableEquiv.piFinSuccAbove α i).symm
⊢ MeasurePreserving ⇑e

Next tactic:
refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
    (i : Fin (n + 1)) :
    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
      ((μ i).prod <| Measure.pi fun j => μ (i.succAbove j)) := by
  set e := (MeasurableEquiv.piFinSuccAbove α i).symm
  refine' MeasurePreserving.symm e _
  refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
  

Proof state:
ι : Type u_1
ι' : Type u_2
α✝ : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α✝ i)
m✝ : (i : ι) → MeasurableSpace (α✝ i)
μ✝ : (i : ι) → Measure (α✝ i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
n : ℕ
α : Fin (n + 1) → Type u
m : (i : Fin (n + 1)) → MeasurableSpace (α i)
μ : (i : Fin (n + 1)) → Measure (α i)
inst✝ : ∀ (i : Fin (n + 1)), SigmaFinite (μ i)
i : Fin (n + 1)
e : α i × ((j : Fin n) → α (Fin.succAbove i j)) ≃ᵐ ((j : Fin (n + 1)) → α j) :=
  (MeasurableEquiv.piFinSuccAbove α i).symm
s : (i : Fin (n + 1)) → Set (α i)
x✝ : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
⊢ ↑↑(Measure.map (⇑e) (Measure.prod (μ i) (Measure.pi fun j => μ (Fin.succAbove i j)))) (Set.pi univ s) =
    ∏ i : Fin (n + 1), ↑↑(μ i) (s i)

Next tactic:
rw [e.map_apply, i.prod_univ_succAbove _, ← pi_pi, ← prod_prod]
theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
    (i : Fin (n + 1)) :
    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
      ((μ i).prod <| Measure.pi fun j => μ (i.succAbove j)) := by
  set e := (MeasurableEquiv.piFinSuccAbove α i).symm
  refine' MeasurePreserving.symm e _
  refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
  rw [e.map_apply, i.prod_univ_succAbove _, ← pi_pi, ← prod_prod]
  

Proof state:
ι : Type u_1
ι' : Type u_2
α✝ : ι → Type u_3
inst✝³ : Fintype ι
m✝¹ : (i : ι) → OuterMeasure (α✝ i)
m✝ : (i : ι) → MeasurableSpace (α✝ i)
μ✝ : (i : ι) → Measure (α✝ i)
inst✝² : ∀ (i : ι), SigmaFinite (μ✝ i)
inst✝¹ : Fintype ι'
n : ℕ
α : Fin (n + 1) → Type u
m : (i : Fin (n + 1)) → MeasurableSpace (α i)
μ : (i : Fin (n + 1)) → Measure (α i)
inst✝ : ∀ (i : Fin (n + 1)), SigmaFinite (μ i)
i : Fin (n + 1)
e : α i × ((j : Fin n) → α (Fin.succAbove i j)) ≃ᵐ ((j : Fin (n + 1)) → α j) :=
  (MeasurableEquiv.piFinSuccAbove α i).symm
s : (i : Fin (n + 1)) → Set (α i)
x✝ : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
⊢ ↑↑(Measure.prod (μ i) (Measure.pi fun j => μ (Fin.succAbove i j))) (⇑e ⁻¹' Set.pi univ s) =
    ↑↑(Measure.prod (μ i) (Measure.pi fun i_1 => μ (Fin.succAbove i i_1)))
      (s i ×ˢ Set.pi univ fun i_1 => s (Fin.succAbove i i_1))

Next tactic:
congr 1 with ⟨x, f⟩