Theorem: ProbabilityTheory.iIndepFun_iff_measure_inter_preimage_eq_mul
File: Mathlib/Probability/Independence/Basic.lean

tactic: refine' ⟨fun h S sets h_meas => h _ fun i hi_mem => ⟨sets i, h_meas i hi_mem, rfl⟩, _⟩
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
⊢ iIndepFun m f ↔
    ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
      (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
        ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)

tactic: intro h S setsΩ h_meas
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
⊢ (∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
      (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
        ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)) →
    iIndepFun m f

tactic: let setsβ : ∀ i : ι, Set (β i) := fun i =>
  dite (i ∈ S) (fun hi_mem => (h_meas i hi_mem).choose) fun _ => Set.univ
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑μ (setsΩ i)

tactic: have h_measβ : ∀ i ∈ S, MeasurableSet[m i] (setsβ i) := by
  intro i hi_mem
  simp_rw [dif_pos hi_mem]
  exact (h_meas i hi_mem).choose_spec.1
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑μ (setsΩ i)

tactic: have h_preim : ∀ i ∈ S, setsΩ i = f i ⁻¹' setsβ i := by
  intro i hi_mem
  simp_rw [dif_pos hi_mem]
  exact (h_meas i hi_mem).choose_spec.2.symm
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑μ (setsΩ i)

tactic: have h_right_eq : (∏ i in S, μ (setsΩ i)) = ∏ i in S, μ (f i ⁻¹' setsβ i) := by
  refine' Finset.prod_congr rfl fun i hi_mem => _
  rw [h_preim i hi_mem]
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
h_left_eq : ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑μ (setsΩ i)

tactic: rw [h_left_eq, h_right_eq]
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
h_left_eq : ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)
h_right_eq : ∏ i in S, ↑↑μ (setsΩ i) = ∏ i in S, ↑↑μ (f i ⁻¹' setsβ i)
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑μ (setsΩ i)

tactic: exact h S h_measβ
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
h_left_eq : ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)
h_right_eq : ∏ i in S, ↑↑μ (setsΩ i) = ∏ i in S, ↑↑μ (f i ⁻¹' setsβ i)
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i) = ∏ i in S, ↑↑μ (f i ⁻¹' setsβ i)

tactic: intro i hi_mem
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
⊢ ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)

tactic: simp_rw [dif_pos hi_mem]
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
i : ι
hi_mem : i ∈ S
⊢ MeasurableSet (setsβ i)

tactic: exact (h_meas i hi_mem).choose_spec.1
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
i : ι
hi_mem : i ∈ S
⊢ MeasurableSet (Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i))

tactic: intro i hi_mem
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
⊢ ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i

tactic: simp_rw [dif_pos hi_mem]
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
i : ι
hi_mem : i ∈ S
⊢ setsΩ i = f i ⁻¹' setsβ i

tactic: exact (h_meas i hi_mem).choose_spec.2.symm
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
i : ι
hi_mem : i ∈ S
⊢ setsΩ i = f i ⁻¹' Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i)

tactic: congr with x
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
⊢ ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)

tactic: simp_rw [Set.mem_iInter]
state_before: case e_a.h
Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
x : Ω
⊢ (x ∈ ⋂ (i : ι) (_ : i ∈ S), setsΩ i) ↔ x ∈ ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i

tactic: constructor <;> intro h i hi_mem <;> specialize h i hi_mem
state_before: case e_a.h
Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
x : Ω
⊢ (∀ (i : ι), i ∈ S → x ∈ setsΩ i) ↔
    ∀ (i : ι),
      i ∈ S →
        x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ

tactic: rwa [h_preim i hi_mem] at h
state_before: case e_a.h.mp
Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h✝ :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
x : Ω
i : ι
hi_mem : i ∈ S
h : x ∈ setsΩ i
⊢ x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ

tactic: rwa [h_preim i hi_mem]
state_before: case e_a.h.mpr
Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h✝ :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
x : Ω
i : ι
hi_mem : i ∈ S
h : x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
⊢ x ∈ setsΩ i

tactic: refine' Finset.prod_congr rfl fun i hi_mem => _
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
h_left_eq : ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)
⊢ ∏ i in S, ↑↑μ (setsΩ i) = ∏ i in S, ↑↑μ (f i ⁻¹' setsβ i)

tactic: rw [h_preim i hi_mem]
state_before: Ω : Type u_3
ι✝ : Type ?u.3089001
β✝ : Type ?u.3089004
β' : Type ?u.3089007
γ : Type ?u.3089010
γ' : Type ?u.3089013
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f✝ : Ω → β✝
g : Ω → β'
ι : Type u_1
β : ι → Type u_2
m : (x : ι) → MeasurableSpace (β x)
f : (i : ι) → Ω → β i
h :
  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},
    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →
      ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑μ (f i ⁻¹' sets i)
S : Finset ι
setsΩ : ι → Set Ω
h_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i
setsβ : (i : ι) → Set (β i) :=
  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ
h_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)
h_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i
h_left_eq : ↑↑μ (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑μ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)
i : ι
hi_mem : i ∈ S
⊢ ↑↑μ (setsΩ i) = ↑↑μ (f i ⁻¹' setsβ i)