Theorem: Metric.Sum.mem_uniformity
File: Mathlib/Topology/MetricSpace/Gluing.lean

tactic: constructor
state_before: X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ s ∈ 𝓤 (X ⊕ Y) ↔ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
state_after: case mp
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ s ∈ 𝓤 (X ⊕ Y) → ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s

case mpr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ (∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s) → s ∈ 𝓤 (X ⊕ Y)

tactic: rintro ⟨hsX, hsY⟩
state_before: case mp
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ s ∈ 𝓤 (X ⊕ Y) → ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
state_after: case mp.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
⊢ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s

tactic: rcases mem_uniformity_dist.1 hsX with ⟨εX, εX0, hX⟩
state_before: case mp.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
⊢ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
state_after: case mp.intro.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
⊢ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s

tactic: rcases mem_uniformity_dist.1 hsY with ⟨εY, εY0, hY⟩
state_before: case mp.intro.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
⊢ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
state_after: case mp.intro.intro.intro.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
⊢ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s

tactic: refine ⟨min (min εX εY) 1, lt_min (lt_min εX0 εY0) zero_lt_one, ?_⟩
state_before: case mp.intro.intro.intro.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
⊢ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
state_after: case mp.intro.intro.intro.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
⊢ ∀ (a b : X ⊕ Y), Sum.dist a b < min (min εX εY) 1 → (a, b) ∈ s

tactic: rintro (a | a) (b | b) h
state_before: case mp.intro.intro.intro.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
⊢ ∀ (a b : X ⊕ Y), Sum.dist a b < min (min εX εY) 1 → (a, b) ∈ s
state_after: case mp.intro.intro.intro.intro.intro.inl.inl
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a b : X
h : Sum.dist (Sum.inl a) (Sum.inl b) < min (min εX εY) 1
⊢ (Sum.inl a, Sum.inl b) ∈ s

case mp.intro.intro.intro.intro.intro.inl.inr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a : X
b : Y
h : Sum.dist (Sum.inl a) (Sum.inr b) < min (min εX εY) 1
⊢ (Sum.inl a, Sum.inr b) ∈ s

case mp.intro.intro.intro.intro.intro.inr.inl
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a : Y
b : X
h : Sum.dist (Sum.inr a) (Sum.inl b) < min (min εX εY) 1
⊢ (Sum.inr a, Sum.inl b) ∈ s

case mp.intro.intro.intro.intro.intro.inr.inr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a b : Y
h : Sum.dist (Sum.inr a) (Sum.inr b) < min (min εX εY) 1
⊢ (Sum.inr a, Sum.inr b) ∈ s

tactic: exact hX (lt_of_lt_of_le h (le_trans (min_le_left _ _) (min_le_left _ _)))
state_before: case mp.intro.intro.intro.intro.intro.inl.inl
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a b : X
h : Sum.dist (Sum.inl a) (Sum.inl b) < min (min εX εY) 1
⊢ (Sum.inl a, Sum.inl b) ∈ s
state_after: no goals

tactic: cases not_le_of_lt (lt_of_lt_of_le h (min_le_right _ _)) Sum.one_le_dist_inl_inr
state_before: case mp.intro.intro.intro.intro.intro.inl.inr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a : X
b : Y
h : Sum.dist (Sum.inl a) (Sum.inr b) < min (min εX εY) 1
⊢ (Sum.inl a, Sum.inr b) ∈ s
state_after: no goals

tactic: cases not_le_of_lt (lt_of_lt_of_le h (min_le_right _ _)) Sum.one_le_dist_inr_inl
state_before: case mp.intro.intro.intro.intro.intro.inr.inl
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a : Y
b : X
h : Sum.dist (Sum.inr a) (Sum.inl b) < min (min εX εY) 1
⊢ (Sum.inr a, Sum.inl b) ∈ s
state_after: no goals

tactic: exact hY (lt_of_lt_of_le h (le_trans (min_le_left _ _) (min_le_right _ _)))
state_before: case mp.intro.intro.intro.intro.intro.inr.inr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
hsX : s ∈ (Filter.map (fun p => (Sum.inl p.1, Sum.inl p.2)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.1, Sum.inr p.2)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.1, Sum.inl p.2)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.1, Sum.inr p.2)) ⁻¹' s
a b : Y
h : Sum.dist (Sum.inr a) (Sum.inr b) < min (min εX εY) 1
⊢ (Sum.inr a, Sum.inr b) ∈ s
state_after: no goals

tactic: rintro ⟨ε, ε0, H⟩
state_before: case mpr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ (∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s) → s ∈ 𝓤 (X ⊕ Y)
state_after: case mpr.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
ε : ℝ
ε0 : ε > 0
H : ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
⊢ s ∈ 𝓤 (X ⊕ Y)

tactic: constructor <;> rw [Filter.mem_sets, Filter.mem_map, mem_uniformity_dist] <;>
  exact ⟨ε, ε0, fun h => H _ _ h⟩
state_before: case mpr.intro.intro
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
ε : ℝ
ε0 : ε > 0
H : ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
⊢ s ∈ 𝓤 (X ⊕ Y)
state_after: no goals