l3lab/ntp-mathlib huggingface dataset:
theorem Measurable.map_prod_mk_left [SFinite ν] :
    Measurable fun x : α => map (Prod.mk x) ν := by
  

Proof state:
α : 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 ν
⊢ Measurable fun x => map (Prod.mk x) ν

Next tactic:
apply measurable_of_measurable_coe
theorem Measurable.map_prod_mk_left [SFinite ν] :
    Measurable fun x : α => map (Prod.mk x) ν := by
  apply measurable_of_measurable_coe; 

Proof state:
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 ν
⊢ ∀ (s : Set (α × β)), MeasurableSet s → Measurable fun b => ↑↑(map (Prod.mk b) ν) s

Next tactic:
intro s hs
theorem Measurable.map_prod_mk_left [SFinite ν] :
    Measurable fun x : α => map (Prod.mk x) ν := by
  apply measurable_of_measurable_coe; intro s hs
  

Proof state:
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 ν
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑(map (Prod.mk b) ν) s

Next tactic:
simp_rw [map_apply measurable_prod_mk_left hs]
theorem Measurable.map_prod_mk_left [SFinite ν] :
    Measurable fun x : α => map (Prod.mk x) ν := by
  apply measurable_of_measurable_coe; intro s hs
  simp_rw [map_apply measurable_prod_mk_left hs]
  

Proof state:
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 ν
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑ν (Prod.mk b ⁻¹' s)

Next tactic:
exact measurable_measure_prod_mk_left hs
theorem Measurable.map_prod_mk_right {μ : Measure α} [SFinite μ] :
    Measurable fun y : β => map (fun x : α => (x, y)) μ := by
  

Proof state:
α : 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
μ : Measure α
inst✝ : SFinite μ
⊢ Measurable fun y => map (fun x => (x, y)) μ

Next tactic:
apply measurable_of_measurable_coe
theorem Measurable.map_prod_mk_right {μ : Measure α} [SFinite μ] :
    Measurable fun y : β => map (fun x : α => (x, y)) μ := by
  apply measurable_of_measurable_coe; 

Proof state:
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
μ : Measure α
inst✝ : SFinite μ
⊢ ∀ (s : Set (α × β)), MeasurableSet s → Measurable fun b => ↑↑(map (fun x => (x, b)) μ) s

Next tactic:
intro s hs
theorem Measurable.map_prod_mk_right {μ : Measure α} [SFinite μ] :
    Measurable fun y : β => map (fun x : α => (x, y)) μ := by
  apply measurable_of_measurable_coe; intro s hs
  

Proof state:
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
μ : Measure α
inst✝ : SFinite μ
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑(map (fun x => (x, b)) μ) s

Next tactic:
simp_rw [map_apply measurable_prod_mk_right hs]
theorem Measurable.map_prod_mk_right {μ : Measure α} [SFinite μ] :
    Measurable fun y : β => map (fun x : α => (x, y)) μ := by
  apply measurable_of_measurable_coe; intro s hs
  simp_rw [map_apply measurable_prod_mk_right hs]
  

Proof state:
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
μ : Measure α
inst✝ : SFinite μ
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑μ ((fun x => (x, b)) ⁻¹' s)

Next tactic:
exact measurable_measure_prod_mk_right hs
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  

Proof state:
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
⊢ MeasurableEmbedding fun x => (g x.1, f x.2)

Next tactic:
have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    

Proof state:
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
⊢ Injective fun x => (g x.1, f x.2)

Next tactic:
intro x y hxy
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    

Proof state:
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
x y : γ × α
hxy : (fun x => (g x.1, f x.2)) x = (fun x => (g x.1, f x.2)) y
⊢ x = y

Next tactic:
rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    

Proof state:
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
x y : γ × α
hxy : (fun x => (g x.1, f x.2)) x = (fun x => (g x.1, f x.2)) y
⊢ (x.1, x.2) = (y.1, y.2)

Next tactic:
simp only [Prod.mk.inj_iff] at hxy ⊢
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    

Proof state:
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
x y : γ × α
hxy : g x.1 = g y.1 ∧ f x.2 = f y.2
⊢ x.1 = y.1 ∧ x.2 = y.2

Next tactic:
exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  

Proof state:
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
⊢ MeasurableEmbedding fun x => (g x.1, f x.2)

Next tactic:
refine' ⟨h_inj, _, _⟩
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · 

Proof state:
case refine'_1
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
⊢ Measurable fun x => (g x.1, f x.2)

Next tactic:
exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
  · -- Induction using the π-system of rectangles
    

Proof state:
case refine'_2
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
⊢ ∀ ⦃s : Set (γ × α)⦄, MeasurableSet s → MeasurableSet ((fun x => (g x.1, f x.2)) '' s)

Next tactic:
refine' fun s hs =>
      @MeasurableSpace.induction_on_inter _
        (fun s => MeasurableSet ((fun x : γ × α => (g x.fst, f x.snd)) '' s)) _ _
        generateFrom_prod.symm isPiSystem_prod _ _ _ _ _ hs
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
  · -- Induction using the π-system of rectangles
    refine' fun s hs =>
      @MeasurableSpace.induction_on_inter _
        (fun s => MeasurableSet ((fun x : γ × α => (g x.fst, f x.snd)) '' s)) _ _
        generateFrom_prod.symm isPiSystem_prod _ _ _ _ _ hs
    · 

Proof state:
case refine'_2.refine'_1
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
s : Set (γ × α)
hs : MeasurableSet s
⊢ (fun s => MeasurableSet ((fun x => (g x.1, f x.2)) '' s)) ∅

Next tactic:
simp only [Set.image_empty, MeasurableSet.empty]
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
  · -- Induction using the π-system of rectangles
    refine' fun s hs =>
      @MeasurableSpace.induction_on_inter _
        (fun s => MeasurableSet ((fun x : γ × α => (g x.fst, f x.snd)) '' s)) _ _
        generateFrom_prod.symm isPiSystem_prod _ _ _ _ _ hs
    · simp only [Set.image_empty, MeasurableSet.empty]
    · 

Proof state:
case refine'_2.refine'_2
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
s : Set (γ × α)
hs : MeasurableSet s
⊢ ∀ t ∈ image2 (fun x x_1 => x ×ˢ x_1) {s | MeasurableSet s} {t | MeasurableSet t},
    (fun s => MeasurableSet ((fun x => (g x.1, f x.2)) '' s)) t

Next tactic:
rintro t ⟨t₁, t₂, ht₁, ht₂, rfl⟩
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
  · -- Induction using the π-system of rectangles
    refine' fun s hs =>
      @MeasurableSpace.induction_on_inter _
        (fun s => MeasurableSet ((fun x : γ × α => (g x.fst, f x.snd)) '' s)) _ _
        generateFrom_prod.symm isPiSystem_prod _ _ _ _ _ hs
    · simp only [Set.image_empty, MeasurableSet.empty]
    · rintro t ⟨t₁, t₂, ht₁, ht₂, rfl⟩
      

Proof state:
case refine'_2.refine'_2.intro.intro.intro.intro
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
s : Set (γ × α)
hs : MeasurableSet s
t₁ : Set γ
t₂ : Set α
ht₁ : t₁ ∈ {s | MeasurableSet s}
ht₂ : t₂ ∈ {t | MeasurableSet t}
⊢ MeasurableSet ((fun x => (g x.1, f x.2)) '' (fun x x_1 => x ×ˢ x_1) t₁ t₂)

Next tactic:
rw [← Set.prod_image_image_eq]
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
  · -- Induction using the π-system of rectangles
    refine' fun s hs =>
      @MeasurableSpace.induction_on_inter _
        (fun s => MeasurableSet ((fun x : γ × α => (g x.fst, f x.snd)) '' s)) _ _
        generateFrom_prod.symm isPiSystem_prod _ _ _ _ _ hs
    · simp only [Set.image_empty, MeasurableSet.empty]
    · rintro t ⟨t₁, t₂, ht₁, ht₂, rfl⟩
      rw [← Set.prod_image_image_eq]
      

Proof state:
case refine'_2.refine'_2.intro.intro.intro.intro
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
s : Set (γ × α)
hs : MeasurableSet s
t₁ : Set γ
t₂ : Set α
ht₁ : t₁ ∈ {s | MeasurableSet s}
ht₂ : t₂ ∈ {t | MeasurableSet t}
⊢ MeasurableSet ((g '' t₁) ×ˢ (f '' t₂))

Next tactic:
exact (hg.measurableSet_image.mpr ht₁).prod (hf.measurableSet_image.mpr ht₂)
theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2) := by
  have h_inj : Function.Injective fun x : γ × α => (g x.fst, f x.snd) := by
    intro x y hxy
    rw [← @Prod.mk.eta _ _ x, ← @Prod.mk.eta _ _ y]
    simp only [Prod.mk.inj_iff] at hxy ⊢
    exact ⟨hg.injective hxy.1, hf.injective hxy.2⟩
  refine' ⟨h_inj, _, _⟩
  · exact (hg.measurable.comp measurable_fst).prod_mk (hf.measurable.comp measurable_snd)
  · -- Induction using the π-system of rectangles
    refine' fun s hs =>
      @MeasurableSpace.induction_on_inter _
        (fun s => MeasurableSet ((fun x : γ × α => (g x.fst, f x.snd)) '' s)) _ _
        generateFrom_prod.symm isPiSystem_prod _ _ _ _ _ hs
    · simp only [Set.image_empty, MeasurableSet.empty]
    · rintro t ⟨t₁, t₂, ht₁, ht₂, rfl⟩
      rw [← Set.prod_image_image_eq]
      exact (hg.measurableSet_image.mpr ht₁).prod (hf.measurableSet_image.mpr ht₂)
    · 

Proof state:
case refine'_2.refine'_3
α✝ : 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
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : α → β
g : γ → δ
hg : MeasurableEmbedding g
hf : MeasurableEmbedding f
h_inj : Injective fun x => (g x.1, f x.2)
s : Set (γ × α)
hs : MeasurableSet s
⊢ ∀ (t : Set (γ × α)),
    MeasurableSet t →
      (fun s => MeasurableSet ((fun x => (g x.1, f x.2)) '' s)) t →
        (fun s => MeasurableSet ((fun x => (g x.1, f x.2)) '' s)) tᶜ

Next tactic:
intro t _ ht_m