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

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

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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
⊢ ∃ ε, ε > 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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' 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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.fst, Sum.inr p.snd)) ⁻¹' s
⊢ ∃ ε, ε > 0 ∧ ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.fst, Sum.inr p.snd)) ⁻¹' s
⊢ ∀ (a b : X ⊕ Y), Sum.dist a b < min (min εX εY) 1 → (a, 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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.fst, Sum.inr p.snd)) ⁻¹' 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

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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.fst, Sum.inr p.snd)) ⁻¹' 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

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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.fst, Sum.inr p.snd)) ⁻¹' 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

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.fst, Sum.inl p.snd)) (𝓤 X)).sets
hsY : s ∈ (Filter.map (fun p => (Sum.inr p.fst, Sum.inr p.snd)) (𝓤 Y)).sets
εX : ℝ
εX0 : εX > 0
hX : ∀ {a b : X}, dist a b < εX → (a, b) ∈ (fun p => (Sum.inl p.fst, Sum.inl p.snd)) ⁻¹' s
εY : ℝ
εY0 : εY > 0
hY : ∀ {a b : Y}, dist a b < εY → (a, b) ∈ (fun p => (Sum.inr p.fst, Sum.inr p.snd)) ⁻¹' 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: 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)

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)