l3lab/ntp-mathlib huggingface dataset:
theorem ULift.isOpen_iff [TopologicalSpace α] {s : Set (ULift.{v} α)} :
    IsOpen s ↔ IsOpen (ULift.up ⁻¹' s) := by
  unfold ULift.topologicalSpace
  

Proof state:
α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
s : Set (ULift.{v, u} α)
⊢ IsOpen s ↔ IsOpen (up ⁻¹' s)

Next tactic:
erw [← Equiv.ulift.coinduced_symm]
theorem ULift.isOpen_iff [TopologicalSpace α] {s : Set (ULift.{v} α)} :
    IsOpen s ↔ IsOpen (ULift.up ⁻¹' s) := by
  unfold ULift.topologicalSpace
  erw [← Equiv.ulift.coinduced_symm]
  

Proof state:
α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
s : Set (ULift.{v, u} α)
⊢ IsOpen s ↔ IsOpen (up ⁻¹' s)

Next tactic:
rfl
theorem ULift.isClosed_iff [TopologicalSpace α] {s : Set (ULift.{v} α)} :
    IsClosed s ↔ IsClosed (ULift.up ⁻¹' s) := by
  

Proof state:
α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
s : Set (ULift.{v, u} α)
⊢ IsClosed s ↔ IsClosed (up ⁻¹' s)

Next tactic:
rw [← isOpen_compl_iff, ← isOpen_compl_iff, isOpen_iff, preimage_compl]
theorem ULift.closedEmbedding_down [TopologicalSpace α] :
    ClosedEmbedding (ULift.down : ULift.{v, u} α → α) :=
  ⟨embedding_uLift_down, by 

Proof state:
α : Type u
β : Type v
γ : Type u_1
δ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
⊢ IsClosed (range down)

Next tactic:
simp only [ULift.down_surjective.range_eq, isClosed_univ]
theorem IsOpen.trans (hγ : IsOpen γ) (hβ : IsOpen β) : IsOpen (γ : Set α) := by
  

Proof state:
α : Type u
β✝ : Type v
γ✝ : Type u_1
δ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
β : Set α
γ : Set ↑β
hγ : IsOpen γ
hβ : IsOpen β
⊢ IsOpen (Subtype.val '' γ)

Next tactic:
rcases isOpen_induced_iff.mp hγ with ⟨δ, hδ, rfl⟩
theorem IsOpen.trans (hγ : IsOpen γ) (hβ : IsOpen β) : IsOpen (γ : Set α) := by
  rcases isOpen_induced_iff.mp hγ with ⟨δ, hδ, rfl⟩
  

Proof state:
case intro.intro
α : Type u
β✝ : Type v
γ : Type u_1
δ✝ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
β : Set α
hβ : IsOpen β
δ : Set α
hδ : IsOpen δ
hγ : IsOpen (Subtype.val ⁻¹' δ)
⊢ IsOpen (Subtype.val '' (Subtype.val ⁻¹' δ))

Next tactic:
rw [Subtype.image_preimage_coe]
theorem IsOpen.trans (hγ : IsOpen γ) (hβ : IsOpen β) : IsOpen (γ : Set α) := by
  rcases isOpen_induced_iff.mp hγ with ⟨δ, hδ, rfl⟩
  rw [Subtype.image_preimage_coe]
  

Proof state:
case intro.intro
α : Type u
β✝ : Type v
γ : Type u_1
δ✝ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
β : Set α
hβ : IsOpen β
δ : Set α
hδ : IsOpen δ
hγ : IsOpen (Subtype.val ⁻¹' δ)
⊢ IsOpen (δ ∩ β)

Next tactic:
exact IsOpen.inter hδ hβ
theorem IsClosed.trans (hγ : IsClosed γ) (hβ : IsClosed β) : IsClosed (γ : Set α) := by
  

Proof state:
α : Type u
β✝ : Type v
γ✝ : Type u_1
δ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
β : Set α
γ : Set ↑β
hγ : IsClosed γ
hβ : IsClosed β
⊢ IsClosed (Subtype.val '' γ)

Next tactic:
rcases isClosed_induced_iff.mp hγ with ⟨δ, hδ, rfl⟩
theorem IsClosed.trans (hγ : IsClosed γ) (hβ : IsClosed β) : IsClosed (γ : Set α) := by
  rcases isClosed_induced_iff.mp hγ with ⟨δ, hδ, rfl⟩
  

Proof state:
case intro.intro
α : Type u
β✝ : Type v
γ : Type u_1
δ✝ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
β : Set α
hβ : IsClosed β
δ : Set α
hδ : IsClosed δ
hγ : IsClosed (Subtype.val ⁻¹' δ)
⊢ IsClosed (Subtype.val '' (Subtype.val ⁻¹' δ))

Next tactic:
rw [Subtype.image_preimage_coe]
theorem IsClosed.trans (hγ : IsClosed γ) (hβ : IsClosed β) : IsClosed (γ : Set α) := by
  rcases isClosed_induced_iff.mp hγ with ⟨δ, hδ, rfl⟩
  rw [Subtype.image_preimage_coe]
  

Proof state:
case intro.intro
α : Type u
β✝ : Type v
γ : Type u_1
δ✝ : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝ : TopologicalSpace α
β : Set α
hβ : IsClosed β
δ : Set α
hδ : IsClosed δ
hγ : IsClosed (Subtype.val ⁻¹' δ)
⊢ IsClosed (δ ∩ β)

Next tactic:
convert IsClosed.inter hδ hβ
theorem mk_eq_fun_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p)
    (i : ι) : (hf i).mk (f i) x = f i x :=
  haveI h_ss : aeSeqSet hf p ⊆ { x | ∀ i, f i x = (hf i).mk (f i) x } := by
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x}

Next tactic:
rw [aeSeqSet, ← compl_compl { x | ∀ i, f i x = (hf i).mk (f i) x }, Set.compl_subset_compl]
theorem mk_eq_fun_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p)
    (i : ι) : (hf i).mk (f i) x = f i x :=
  haveI h_ss : aeSeqSet hf p ⊆ { x | ∀ i, f i x = (hf i).mk (f i) x } := by
    rw [aeSeqSet, ← compl_compl { x | ∀ i, f i x = (hf i).mk (f i) x }, Set.compl_subset_compl]
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x}ᶜ ⊆
    toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x}ᶜ

Next tactic:
refine' Set.Subset.trans (Set.compl_subset_compl.mpr fun x h => _) (subset_toMeasurable _ _)
theorem mk_eq_fun_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p)
    (i : ι) : (hf i).mk (f i) x = f i x :=
  haveI h_ss : aeSeqSet hf p ⊆ { x | ∀ i, f i x = (hf i).mk (f i) x } := by
    rw [aeSeqSet, ← compl_compl { x | ∀ i, f i x = (hf i).mk (f i) x }, Set.compl_subset_compl]
    refine' Set.Subset.trans (Set.compl_subset_compl.mpr fun x h => _) (subset_toMeasurable _ _)
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x✝ : α
hx : x✝ ∈ aeSeqSet hf p
i : ι
x : α
h : x ∈ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x}
⊢ x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x}

Next tactic:
exact h.1
theorem aeSeq_eq_mk_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α}
    (hx : x ∈ aeSeqSet hf p) (i : ι) : aeSeq hf p i x = (hf i).mk (f i) x := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ aeSeq hf p i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x

Next tactic:
simp only [aeSeq, hx, if_true]
theorem aeSeq_eq_fun_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α}
    (hx : x ∈ aeSeqSet hf p) (i : ι) : aeSeq hf p i x = f i x := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ aeSeq hf p i x = f i x

Next tactic:
simp only [aeSeq_eq_mk_of_mem_aeSeqSet hf hx i, mk_eq_fun_of_mem_aeSeqSet hf hx i]
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ p x fun n => aeSeq hf p n x

Next tactic:
simp only [aeSeq, hx, if_true]
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ p x fun n => AEMeasurable.mk (f n) (_ : AEMeasurable (f n)) x

Next tactic:
rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ p x fun n => f n x

Next tactic:
have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
    rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
    refine' Set.Subset.trans (Set.compl_subset_compl.mpr _) (subset_toMeasurable _ _)
    exact fun x hx => hx.2
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
  have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ aeSeqSet hf p ⊆ {x | p x fun n => f n x}

Next tactic:
rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
  have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
    rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ {x | p x fun n => f n x}ᶜ ⊆
    toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x}ᶜ

Next tactic:
refine' Set.Subset.trans (Set.compl_subset_compl.mpr _) (subset_toMeasurable _ _)
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
  have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
    rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
    refine' Set.Subset.trans (Set.compl_subset_compl.mpr _) (subset_toMeasurable _ _)
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x} ⊆
    {x | p x fun n => f n x}

Next tactic:
exact fun x hx => hx.2
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
  have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
    rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
    refine' Set.Subset.trans (Set.compl_subset_compl.mpr _) (subset_toMeasurable _ _)
    exact fun x hx => hx.2
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
h_ss : aeSeqSet hf p ⊆ {x | p x fun n => f n x}
⊢ p x fun n => f n x

Next tactic:
have hx' := Set.mem_of_subset_of_mem h_ss hx
theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x := by
  simp only [aeSeq, hx, if_true]
  rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
  have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
    rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
    refine' Set.Subset.trans (Set.compl_subset_compl.mpr _) (subset_toMeasurable _ _)
    exact fun x hx => hx.2
  have hx' := Set.mem_of_subset_of_mem h_ss hx
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
h_ss : aeSeqSet hf p ⊆ {x | p x fun n => f n x}
hx' : x ∈ {x | p x fun n => f n x}
⊢ p x fun n => f n x

Next tactic:
exact hx'
theorem fun_prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => f n x := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
⊢ p x fun n => f n x

Next tactic:
have h_eq : (fun n => f n x) = fun n => aeSeq hf p n x :=
    funext fun n => (aeSeq_eq_fun_of_mem_aeSeqSet hf hx n).symm
theorem fun_prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => f n x := by
  have h_eq : (fun n => f n x) = fun n => aeSeq hf p n x :=
    funext fun n => (aeSeq_eq_fun_of_mem_aeSeqSet hf hx n).symm
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
h_eq : (fun n => f n x) = fun n => aeSeq hf p n x
⊢ p x fun n => f n x

Next tactic:
rw [h_eq]
theorem fun_prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => f n x := by
  have h_eq : (fun n => f n x) = fun n => aeSeq hf p n x :=
    funext fun n => (aeSeq_eq_fun_of_mem_aeSeqSet hf hx n).symm
  rw [h_eq]
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
h_eq : (fun n => f n x) = fun n => aeSeq hf p n x
⊢ p x fun n => aeSeq hf p n x

Next tactic:
exact prop_of_mem_aeSeqSet hf hx
theorem measure_compl_aeSeqSet_eq_zero [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : μ (aeSeqSet hf p)ᶜ = 0 := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
⊢ ↑↑μ (aeSeqSet hf p)ᶜ = 0

Next tactic:
rw [aeSeqSet, compl_compl, measure_toMeasurable]
theorem measure_compl_aeSeqSet_eq_zero [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : μ (aeSeqSet hf p)ᶜ = 0 := by
  rw [aeSeqSet, compl_compl, measure_toMeasurable]
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
⊢ ↑↑μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x}ᶜ = 0

Next tactic:
have hf_eq := fun i => (hf i).ae_eq_mk
theorem measure_compl_aeSeqSet_eq_zero [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : μ (aeSeqSet hf p)ᶜ = 0 := by
  rw [aeSeqSet, compl_compl, measure_toMeasurable]
  have hf_eq := fun i => (hf i).ae_eq_mk
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
hf_eq : ∀ (i : ι), f i =ᵐ[μ] AEMeasurable.mk (f i) (_ : AEMeasurable (f i))
⊢ ↑↑μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x}ᶜ = 0

Next tactic:
simp_rw [Filter.EventuallyEq, ← ae_all_iff] at hf_eq
theorem measure_compl_aeSeqSet_eq_zero [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : μ (aeSeqSet hf p)ᶜ = 0 := by
  rw [aeSeqSet, compl_compl, measure_toMeasurable]
  have hf_eq := fun i => (hf i).ae_eq_mk
  simp_rw [Filter.EventuallyEq, ← ae_all_iff] at hf_eq
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
hf_eq : ∀ᵐ (a : α) ∂μ, ∀ (i : ι), f i a = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) a
⊢ ↑↑μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x) ∧ p x fun n => f n x}ᶜ = 0

Next tactic:
exact Filter.Eventually.and hf_eq hp
theorem aeSeq_eq_mk_ae [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ∀ᵐ a : α ∂μ, ∀ i : ι, aeSeq hf p i a = (hf i).mk (f i) a :=
  haveI h_ss : aeSeqSet hf p ⊆ { a : α | ∀ i, aeSeq hf p i a = (hf i).mk (f i) a } := fun x hx i =>
    by 

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ aeSeq hf p i x = AEMeasurable.mk (f i) (_ : AEMeasurable (f i)) x

Next tactic:
simp only [aeSeq, hx, if_true]
theorem iSup [CompleteLattice β] [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝¹ : CompleteLattice β
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
⊢ ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n

Next tactic:
simp_rw [Filter.EventuallyEq, ae_iff, iSup_apply]
theorem iSup [CompleteLattice β] [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n := by
  simp_rw [Filter.EventuallyEq, ae_iff, iSup_apply]
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝¹ : CompleteLattice β
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
⊢ ↑↑μ {a | ¬⨆ i, aeSeq hf p i a = ⨆ i, f i a} = 0

Next tactic:
have h_ss : aeSeqSet hf p ⊆ { a : α | ⨆ i : ι, aeSeq hf p i a = ⨆ i : ι, f i a } := by
    intro x hx
    congr
    exact funext fun i => aeSeq_eq_fun_of_mem_aeSeqSet hf hx i
theorem iSup [CompleteLattice β] [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n := by
  simp_rw [Filter.EventuallyEq, ae_iff, iSup_apply]
  have h_ss : aeSeqSet hf p ⊆ { a : α | ⨆ i : ι, aeSeq hf p i a = ⨆ i : ι, f i a } := by
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝¹ : CompleteLattice β
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
⊢ aeSeqSet hf p ⊆ {a | ⨆ i, aeSeq hf p i a = ⨆ i, f i a}

Next tactic:
intro x hx
theorem iSup [CompleteLattice β] [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n := by
  simp_rw [Filter.EventuallyEq, ae_iff, iSup_apply]
  have h_ss : aeSeqSet hf p ⊆ { a : α | ⨆ i : ι, aeSeq hf p i a = ⨆ i : ι, f i a } := by
    intro x hx
    

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝¹ : CompleteLattice β
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
x : α
hx : x ∈ aeSeqSet hf p
⊢ x ∈ {a | ⨆ i, aeSeq hf p i a = ⨆ i, f i a}

Next tactic:
congr
theorem iSup [CompleteLattice β] [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n := by
  simp_rw [Filter.EventuallyEq, ae_iff, iSup_apply]
  have h_ss : aeSeqSet hf p ⊆ { a : α | ⨆ i : ι, aeSeq hf p i a = ⨆ i : ι, f i a } := by
    intro x hx
    congr
    

Proof state:
case e_s
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝¹ : CompleteLattice β
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
x : α
hx : x ∈ aeSeqSet hf p
⊢ (fun i => aeSeq hf p i x) = fun i => f i x

Next tactic:
exact funext fun i => aeSeq_eq_fun_of_mem_aeSeqSet hf hx i
theorem iSup [CompleteLattice β] [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ⨆ n, aeSeq hf p n =ᵐ[μ] ⨆ n, f n := by
  simp_rw [Filter.EventuallyEq, ae_iff, iSup_apply]
  have h_ss : aeSeqSet hf p ⊆ { a : α | ⨆ i : ι, aeSeq hf p i a = ⨆ i : ι, f i a } := by
    intro x hx
    congr
    exact funext fun i => aeSeq_eq_fun_of_mem_aeSeqSet hf hx i
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
f : ι → α → β
μ : Measure α
p : α → (ι → β) → Prop
inst✝¹ : CompleteLattice β
inst✝ : Countable ι
hf : ∀ (i : ι), AEMeasurable (f i)
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x
h_ss : aeSeqSet hf p ⊆ {a | ⨆ i, aeSeq hf p i a = ⨆ i, f i a}
⊢ ↑↑μ {a | ¬⨆ i, aeSeq hf p i a = ⨆ i, f i a} = 0

Next tactic:
exact measure_mono_null (Set.compl_subset_compl.mpr h_ss) (measure_compl_aeSeqSet_eq_zero hf hp)
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by 

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
⊢ LinearMap.comp
      (lift (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))
      (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃)) (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃))) =
    LinearMap.id

Next tactic:
ext