l3lab/ntp-mathlib huggingface dataset:
/-- A version of `uniformContinuous_sInf_dom` for binary functions -/
theorem uniformContinuous_sInf_dom₂ {α β γ} {f : α → β → γ} {uas : Set (UniformSpace α)}
    {ubs : Set (UniformSpace β)} {ua : UniformSpace α} {ub : UniformSpace β} {uc : UniformSpace γ}
    (ha : ua ∈ uas) (hb : ub ∈ ubs) (hf : UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := sInf uas; haveI := sInf ubs;
        exact @UniformContinuous _ _ _ uc fun p : α × β => f p.1 p.2 := by
  -- proof essentially copied from `continuous_Inf_dom`
  let _ : UniformSpace (α × β) := instUniformSpaceProd
  

Proof state:
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β✝
inst✝ : UniformSpace γ✝
α : Type u_2
β : Type u_3
γ : Type u_4
f : α → β → γ
uas : Set (UniformSpace α)
ubs : Set (UniformSpace β)
ua : UniformSpace α
ub : UniformSpace β
uc : UniformSpace γ
ha : ua ∈ uas
hb : ub ∈ ubs
hf : UniformContinuous fun p => f p.1 p.2
x✝ : UniformSpace (α × β) := instUniformSpaceProd
⊢ UniformContinuous fun p => f p.1 p.2

Next tactic:
have ha := uniformContinuous_sInf_dom ha uniformContinuous_id
/-- A version of `uniformContinuous_sInf_dom` for binary functions -/
theorem uniformContinuous_sInf_dom₂ {α β γ} {f : α → β → γ} {uas : Set (UniformSpace α)}
    {ubs : Set (UniformSpace β)} {ua : UniformSpace α} {ub : UniformSpace β} {uc : UniformSpace γ}
    (ha : ua ∈ uas) (hb : ub ∈ ubs) (hf : UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := sInf uas; haveI := sInf ubs;
        exact @UniformContinuous _ _ _ uc fun p : α × β => f p.1 p.2 := by
  -- proof essentially copied from `continuous_Inf_dom`
  let _ : UniformSpace (α × β) := instUniformSpaceProd
  have ha := uniformContinuous_sInf_dom ha uniformContinuous_id
  

Proof state:
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β✝
inst✝ : UniformSpace γ✝
α : Type u_2
β : Type u_3
γ : Type u_4
f : α → β → γ
uas : Set (UniformSpace α)
ubs : Set (UniformSpace β)
ua : UniformSpace α
ub : UniformSpace β
uc : UniformSpace γ
ha✝ : ua ∈ uas
hb : ub ∈ ubs
hf : UniformContinuous fun p => f p.1 p.2
x✝ : UniformSpace (α × β) := instUniformSpaceProd
ha : UniformContinuous id
⊢ UniformContinuous fun p => f p.1 p.2

Next tactic:
have hb := uniformContinuous_sInf_dom hb uniformContinuous_id
/-- A version of `uniformContinuous_sInf_dom` for binary functions -/
theorem uniformContinuous_sInf_dom₂ {α β γ} {f : α → β → γ} {uas : Set (UniformSpace α)}
    {ubs : Set (UniformSpace β)} {ua : UniformSpace α} {ub : UniformSpace β} {uc : UniformSpace γ}
    (ha : ua ∈ uas) (hb : ub ∈ ubs) (hf : UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := sInf uas; haveI := sInf ubs;
        exact @UniformContinuous _ _ _ uc fun p : α × β => f p.1 p.2 := by
  -- proof essentially copied from `continuous_Inf_dom`
  let _ : UniformSpace (α × β) := instUniformSpaceProd
  have ha := uniformContinuous_sInf_dom ha uniformContinuous_id
  have hb := uniformContinuous_sInf_dom hb uniformContinuous_id
  

Proof state:
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β✝
inst✝ : UniformSpace γ✝
α : Type u_2
β : Type u_3
γ : Type u_4
f : α → β → γ
uas : Set (UniformSpace α)
ubs : Set (UniformSpace β)
ua : UniformSpace α
ub : UniformSpace β
uc : UniformSpace γ
ha✝ : ua ∈ uas
hb✝ : ub ∈ ubs
hf : UniformContinuous fun p => f p.1 p.2
x✝ : UniformSpace (α × β) := instUniformSpaceProd
ha : UniformContinuous id
hb : UniformContinuous id
⊢ UniformContinuous fun p => f p.1 p.2

Next tactic:
have h_unif_cont_id := @UniformContinuous.prod_map _ _ _ _ (sInf uas) (sInf ubs) ua ub _ _ ha hb
/-- A version of `uniformContinuous_sInf_dom` for binary functions -/
theorem uniformContinuous_sInf_dom₂ {α β γ} {f : α → β → γ} {uas : Set (UniformSpace α)}
    {ubs : Set (UniformSpace β)} {ua : UniformSpace α} {ub : UniformSpace β} {uc : UniformSpace γ}
    (ha : ua ∈ uas) (hb : ub ∈ ubs) (hf : UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := sInf uas; haveI := sInf ubs;
        exact @UniformContinuous _ _ _ uc fun p : α × β => f p.1 p.2 := by
  -- proof essentially copied from `continuous_Inf_dom`
  let _ : UniformSpace (α × β) := instUniformSpaceProd
  have ha := uniformContinuous_sInf_dom ha uniformContinuous_id
  have hb := uniformContinuous_sInf_dom hb uniformContinuous_id
  have h_unif_cont_id := @UniformContinuous.prod_map _ _ _ _ (sInf uas) (sInf ubs) ua ub _ _ ha hb
  

Proof state:
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β✝
inst✝ : UniformSpace γ✝
α : Type u_2
β : Type u_3
γ : Type u_4
f : α → β → γ
uas : Set (UniformSpace α)
ubs : Set (UniformSpace β)
ua : UniformSpace α
ub : UniformSpace β
uc : UniformSpace γ
ha✝ : ua ∈ uas
hb✝ : ub ∈ ubs
hf : UniformContinuous fun p => f p.1 p.2
x✝ : UniformSpace (α × β) := instUniformSpaceProd
ha : UniformContinuous id
hb : UniformContinuous id
h_unif_cont_id : UniformContinuous (Prod.map id id)
⊢ UniformContinuous fun p => f p.1 p.2

Next tactic:
exact @UniformContinuous.comp _ _ _ (id _) (id _) _ _ _ hf h_unif_cont_id
theorem uniformContinuous₂_curry (f : α × β → γ) :
    UniformContinuous₂ (Function.curry f) ↔ UniformContinuous f := by
  

Proof state:
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
δ' : Type u_2
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : UniformSpace γ
inst✝¹ : UniformSpace δ
inst✝ : UniformSpace δ'
f : α × β → γ
⊢ UniformContinuous₂ (curry f) ↔ UniformContinuous f

Next tactic:
rw [UniformContinuous₂, uncurry_curry]
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      

Proof state:
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
x : α ⊕ β
H₁ : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
H₂ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
⊢ (x, x) ∈ r

Next tactic:
cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂]
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      

Proof state:
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
x : α ⊕ β
H₁ : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
H₂ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
⊢ (x, x) ∈ r

Next tactic:
cases x
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [

Proof state:
case inl
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
H₁ : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
H₂ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
val✝ : α
⊢ (inl val✝, inl val✝) ∈ r

Next tactic:
apply refl_mem_uniformity H₁
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; 

Proof state:
case inr
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
H₁ : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
H₂ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
val✝ : β
⊢ (inr val✝, inr val✝) ∈ r

Next tactic:
apply refl_mem_uniformity H₂
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      

Proof state:
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
⊢ ∃ t ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β), t ○ t ⊆ r

Next tactic:
rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      

Proof state:
case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
⊢ ∃ t ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β), t ○ t ⊆ r

Next tactic:
rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
      

Proof state:
case intro.intro.intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
tβ : Set (β × β)
htβ : tβ ∈ 𝓤 β
Htβ : tβ ○ tβ ⊆ (fun p => (inr p.1, inr p.2)) ⁻¹' r
⊢ ∃ t ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β), t ○ t ⊆ r

Next tactic:
refine' ⟨_, ⟨mem_map_iff_exists_image.2 ⟨tα, htα, subset_union_left _ _⟩,
        mem_map_iff_exists_image.2 ⟨tβ, htβ, subset_union_right _ _⟩⟩, _⟩
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
      refine' ⟨_, ⟨mem_map_iff_exists_image.2 ⟨tα, htα, subset_union_left _ _⟩,
        mem_map_iff_exists_image.2 ⟨tβ, htβ, subset_union_right _ _⟩⟩, _⟩
      

Proof state:
case intro.intro.intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
tβ : Set (β × β)
htβ : tβ ∈ 𝓤 β
Htβ : tβ ○ tβ ⊆ (fun p => (inr p.1, inr p.2)) ⁻¹' r
⊢ (fun p => (inl p.1, inl p.2)) '' tα ∪ (fun p => (inr p.1, inr p.2)) '' tβ ○
      (fun p => (inl p.1, inl p.2)) '' tα ∪ (fun p => (inr p.1, inr p.2)) '' tβ ⊆
    r

Next tactic:
rintro ⟨_, _⟩ ⟨z, ⟨⟨a, b⟩, hab, ⟨⟩⟩ | ⟨⟨a, b⟩, hab, ⟨⟩⟩,
          ⟨⟨_, c⟩, hbc, ⟨⟩⟩ | ⟨⟨_, c⟩, hbc, ⟨⟩⟩⟩
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
      refine' ⟨_, ⟨mem_map_iff_exists_image.2 ⟨tα, htα, subset_union_left _ _⟩,
        mem_map_iff_exists_image.2 ⟨tβ, htβ, subset_union_right _ _⟩⟩, _⟩
      rintro ⟨_, _⟩ ⟨z, ⟨⟨a, b⟩, hab, ⟨⟩⟩ | ⟨⟨a, b⟩, hab, ⟨⟩⟩,
          ⟨⟨_, c⟩, hbc, ⟨⟩⟩ | ⟨⟨_, c⟩, hbc, ⟨⟩⟩⟩
      · 

Proof state:
case intro.intro.intro.intro.mk.intro.intro.inl.intro.mk.intro.refl.inl.intro.mk.intro.refl
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
tβ : Set (β × β)
htβ : tβ ∈ 𝓤 β
Htβ : tβ ○ tβ ⊆ (fun p => (inr p.1, inr p.2)) ⁻¹' r
a b : α
hab : (a, b) ∈ tα
c : α
hbc : (b, c) ∈ tα
⊢ (inl (a, b).1, inl (b, c).2) ∈ r

Next tactic:
have A : (a, c) ∈ tα ○ tα := ⟨b, hab, hbc⟩
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
      refine' ⟨_, ⟨mem_map_iff_exists_image.2 ⟨tα, htα, subset_union_left _ _⟩,
        mem_map_iff_exists_image.2 ⟨tβ, htβ, subset_union_right _ _⟩⟩, _⟩
      rintro ⟨_, _⟩ ⟨z, ⟨⟨a, b⟩, hab, ⟨⟩⟩ | ⟨⟨a, b⟩, hab, ⟨⟩⟩,
          ⟨⟨_, c⟩, hbc, ⟨⟩⟩ | ⟨⟨_, c⟩, hbc, ⟨⟩⟩⟩
      · have A : (a, c) ∈ tα ○ tα := ⟨b, hab, hbc⟩
        

Proof state:
case intro.intro.intro.intro.mk.intro.intro.inl.intro.mk.intro.refl.inl.intro.mk.intro.refl
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
tβ : Set (β × β)
htβ : tβ ∈ 𝓤 β
Htβ : tβ ○ tβ ⊆ (fun p => (inr p.1, inr p.2)) ⁻¹' r
a b : α
hab : (a, b) ∈ tα
c : α
hbc : (b, c) ∈ tα
A : (a, c) ∈ tα ○ tα
⊢ (inl (a, b).1, inl (b, c).2) ∈ r

Next tactic:
exact Htα A
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
      refine' ⟨_, ⟨mem_map_iff_exists_image.2 ⟨tα, htα, subset_union_left _ _⟩,
        mem_map_iff_exists_image.2 ⟨tβ, htβ, subset_union_right _ _⟩⟩, _⟩
      rintro ⟨_, _⟩ ⟨z, ⟨⟨a, b⟩, hab, ⟨⟩⟩ | ⟨⟨a, b⟩, hab, ⟨⟩⟩,
          ⟨⟨_, c⟩, hbc, ⟨⟩⟩ | ⟨⟨_, c⟩, hbc, ⟨⟩⟩⟩
      · have A : (a, c) ∈ tα ○ tα := ⟨b, hab, hbc⟩
        exact Htα A
      · 

Proof state:
case intro.intro.intro.intro.mk.intro.intro.inr.intro.mk.intro.refl.inr.intro.mk.intro.refl
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
tβ : Set (β × β)
htβ : tβ ∈ 𝓤 β
Htβ : tβ ○ tβ ⊆ (fun p => (inr p.1, inr p.2)) ⁻¹' r
a b : β
hab : (a, b) ∈ tβ
c : β
hbc : (b, c) ∈ tβ
⊢ (inr (a, b).1, inr (b, c).2) ∈ r

Next tactic:
have A : (a, c) ∈ tβ ○ tβ := ⟨b, hab, hbc⟩
/-- Uniformity on a disjoint union. Entourages of the diagonal in the union are obtained
by taking independently an entourage of the diagonal in the first part, and an entourage of
the diagonal in the second part. -/
def UniformSpace.Core.sum : UniformSpace.Core (Sum α β) :=
  UniformSpace.Core.mk'
    (map (fun p : α × α => (inl p.1, inl p.2)) (𝓤 α) ⊔
      map (fun p : β × β => (inr p.1, inr p.2)) (𝓤 β))
    (fun r ⟨H₁, H₂⟩ x => by
      cases x <;> [apply refl_mem_uniformity H₁; apply refl_mem_uniformity H₂])
    (fun r ⟨H₁, H₂⟩ => ⟨symm_le_uniformity H₁, symm_le_uniformity H₂⟩)
    (fun r ⟨Hrα, Hrβ⟩ => by
      rcases comp_mem_uniformity_sets Hrα with ⟨tα, htα, Htα⟩
      rcases comp_mem_uniformity_sets Hrβ with ⟨tβ, htβ, Htβ⟩
      refine' ⟨_, ⟨mem_map_iff_exists_image.2 ⟨tα, htα, subset_union_left _ _⟩,
        mem_map_iff_exists_image.2 ⟨tβ, htβ, subset_union_right _ _⟩⟩, _⟩
      rintro ⟨_, _⟩ ⟨z, ⟨⟨a, b⟩, hab, ⟨⟩⟩ | ⟨⟨a, b⟩, hab, ⟨⟩⟩,
          ⟨⟨_, c⟩, hbc, ⟨⟩⟩ | ⟨⟨_, c⟩, hbc, ⟨⟩⟩⟩
      · have A : (a, c) ∈ tα ○ tα := ⟨b, hab, hbc⟩
        exact Htα A
      · have A : (a, c) ∈ tβ ○ tβ := ⟨b, hab, hbc⟩
        

Proof state:
case intro.intro.intro.intro.mk.intro.intro.inr.intro.mk.intro.refl.inr.intro.mk.intro.refl
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set ((α ⊕ β) × (α ⊕ β))
x✝ : r ∈ map (fun p => (inl p.1, inl p.2)) (𝓤 α) ⊔ map (fun p => (inr p.1, inr p.2)) (𝓤 β)
Hrα : r ∈ (map (fun p => (inl p.1, inl p.2)) (𝓤 α)).sets
Hrβ : r ∈ (map (fun p => (inr p.1, inr p.2)) (𝓤 β)).sets
tα : Set (α × α)
htα : tα ∈ 𝓤 α
Htα : tα ○ tα ⊆ (fun p => (inl p.1, inl p.2)) ⁻¹' r
tβ : Set (β × β)
htβ : tβ ∈ 𝓤 β
Htβ : tβ ○ tβ ⊆ (fun p => (inr p.1, inr p.2)) ⁻¹' r
a b : β
hab : (a, b) ∈ tβ
c : β
hbc : (b, c) ∈ tβ
A : (a, c) ∈ tβ ○ tβ
⊢ (inr (a, b).1, inr (b, c).2) ∈ r

Next tactic:
exact Htβ A
theorem uniformity_sum_of_isOpen_aux {s : Set (Sum α β)} (hs : IsOpen s) {x : Sum α β}
    (xs : x ∈ s) : { p : (α ⊕ β) × (α ⊕ β) | p.1 = x → p.2 ∈ s } ∈
    (@UniformSpace.Core.sum α β _ _).uniformity := by
  

Proof state:
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set (α ⊕ β)
hs : IsOpen s
x : α ⊕ β
xs : x ∈ s
⊢ {p | p.1 = x → p.2 ∈ s} ∈ UniformSpace.Core.sum.uniformity

Next tactic:
cases x
theorem uniformity_sum_of_isOpen_aux {s : Set (Sum α β)} (hs : IsOpen s) {x : Sum α β}
    (xs : x ∈ s) : { p : (α ⊕ β) × (α ⊕ β) | p.1 = x → p.2 ∈ s } ∈
    (@UniformSpace.Core.sum α β _ _).uniformity := by
  cases x
  · 

Proof state:
case inl
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set (α ⊕ β)
hs : IsOpen s
val✝ : α
xs : inl val✝ ∈ s
⊢ {p | p.1 = inl val✝ → p.2 ∈ s} ∈ UniformSpace.Core.sum.uniformity

Next tactic:
refine' mem_of_superset
      (union_mem_uniformity_sum (mem_nhds_uniformity_iff_right.1 (hs.1.mem_nhds xs)) univ_mem)
        (union_subset _ _)
theorem uniformity_sum_of_isOpen_aux {s : Set (Sum α β)} (hs : IsOpen s) {x : Sum α β}
    (xs : x ∈ s) : { p : (α ⊕ β) × (α ⊕ β) | p.1 = x → p.2 ∈ s } ∈
    (@UniformSpace.Core.sum α β _ _).uniformity := by
  cases x
  · refine' mem_of_superset
      (union_mem_uniformity_sum (mem_nhds_uniformity_iff_right.1 (hs.1.mem_nhds xs)) univ_mem)
        (union_subset _ _) <;> 

Proof state:
case inl.refine'_1
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set (α ⊕ β)
hs : IsOpen s
val✝ : α
xs : inl val✝ ∈ s
⊢ (fun p => (inl p.1, inl p.2)) '' {p | p.1 = val✝ → p.2 ∈ inl ⁻¹' s} ⊆ {p | p.1 = inl val✝ → p.2 ∈ s}

Next tactic:
rintro _ ⟨⟨_, b⟩, h, ⟨⟩⟩ ⟨⟩