Theorem: UniformSpace.Completion.mem_uniformity_dist
File: Mathlib/Topology/MetricSpace/Completion.lean

tactic: constructor
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
⊢ s ∈ 𝓤 (Completion α) ↔ ∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s

tactic: intro hs
state_before: case mp
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
⊢ s ∈ 𝓤 (Completion α) → ∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s

tactic: rcases mem_uniformity_isClosed hs with ⟨t, ht, ⟨tclosed, ts⟩⟩
state_before: case mp
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
⊢ ∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s

tactic: have A : { x : α × α | (↑x.1, ↑x.2) ∈ t } ∈ uniformity α :=
  uniformContinuous_def.1 (uniformContinuous_coe α) t ht
state_before: case mp.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
⊢ ∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s

tactic: rcases mem_uniformity_dist.1 A with ⟨ε, εpos, hε⟩
state_before: case mp.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
⊢ ∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s

tactic: refine' ⟨ε, εpos, @fun x y hxy ↦ _⟩
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
⊢ ∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s

tactic: simp only [not_le.mpr hxy, false_or_iff, not_le] at this
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
this : ε ≤ dist x y ∨ (x, y) ∈ t
⊢ (x, y) ∈ s

tactic: exact ts this
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
this : (x, y) ∈ t
⊢ (x, y) ∈ s

tactic: refine' induction_on₂ x y _ _
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
⊢ ε ≤ dist x y ∨ (x, y) ∈ t

tactic: have : { x : Completion α × Completion α | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t } =
       { p : Completion α × Completion α | ε ≤ dist p.1 p.2 } ∪ t := by ext; simp
state_before: case refine'_1
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
⊢ IsClosed {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t}

tactic: rw [this]
state_before: case refine'_1
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
this : {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t} = {p | ε ≤ dist p.fst p.snd} ∪ t
⊢ IsClosed {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t}

tactic: apply IsClosed.union _ tclosed
state_before: case refine'_1
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
this : {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t} = {p | ε ≤ dist p.fst p.snd} ∪ t
⊢ IsClosed ({p | ε ≤ dist p.fst p.snd} ∪ t)

tactic: exact isClosed_le continuous_const Completion.uniformContinuous_dist.continuous
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
this : {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t} = {p | ε ≤ dist p.fst p.snd} ∪ t
⊢ IsClosed {p | ε ≤ dist p.fst p.snd}

tactic: ext
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
⊢ {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t} = {p | ε ≤ dist p.fst p.snd} ∪ t

tactic: simp
state_before: case h
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
x✝ : Completion α × Completion α
⊢ x✝ ∈ {x | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t} ↔ x✝ ∈ {p | ε ≤ dist p.fst p.snd} ∪ t

tactic: intro x y
state_before: case refine'_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x y : Completion α
hxy : dist x y < ε
⊢ ∀ (a b : α), ε ≤ dist (↑α a) (↑α b) ∨ (↑α a, ↑α b) ∈ t

tactic: rw [Completion.dist_eq]
state_before: case refine'_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x✝ y✝ : Completion α
hxy : dist x✝ y✝ < ε
x y : α
⊢ ε ≤ dist (↑α x) (↑α y) ∨ (↑α x, ↑α y) ∈ t

tactic: by_cases h : ε ≤ dist x y
state_before: case refine'_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x✝ y✝ : Completion α
hxy : dist x✝ y✝ < ε
x y : α
⊢ ε ≤ dist x y ∨ (↑α x, ↑α y) ∈ t

tactic: exact Or.inl h
state_before: case pos
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x✝ y✝ : Completion α
hxy : dist x✝ y✝ < ε
x y : α
h : ε ≤ dist x y
⊢ ε ≤ dist x y ∨ (↑α x, ↑α y) ∈ t

tactic: have Z := hε (not_le.1 h)
state_before: case neg
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x✝ y✝ : Completion α
hxy : dist x✝ y✝ < ε
x y : α
h : ¬ε ≤ dist x y
⊢ ε ≤ dist x y ∨ (↑α x, ↑α y) ∈ t

tactic: simp only [Set.mem_setOf_eq] at Z
state_before: case neg
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x✝ y✝ : Completion α
hxy : dist x✝ y✝ < ε
x y : α
h : ¬ε ≤ dist x y
Z : (x, y) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
⊢ ε ≤ dist x y ∨ (↑α x, ↑α y) ∈ t

tactic: exact Or.inr Z
state_before: case neg
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
hs : s ∈ 𝓤 (Completion α)
t : Set (Completion α × Completion α)
ht : t ∈ 𝓤 (Completion α)
tclosed : IsClosed t
ts : t ⊆ s
A : {x | (↑α x.fst, ↑α x.snd) ∈ t} ∈ 𝓤 α
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : α}, dist a b < ε → (a, b) ∈ {x | (↑α x.fst, ↑α x.snd) ∈ t}
x✝ y✝ : Completion α
hxy : dist x✝ y✝ < ε
x y : α
h : ¬ε ≤ dist x y
Z : (↑α x, ↑α y) ∈ t
⊢ ε ≤ dist x y ∨ (↑α x, ↑α y) ∈ t

tactic: rintro ⟨ε, εpos, hε⟩
state_before: case mpr
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
⊢ (∃ ε, ε > 0 ∧ ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s) → s ∈ 𝓤 (Completion α)

tactic: let r : Set (ℝ × ℝ) := { p | dist p.1 p.2 < ε }
state_before: case mpr.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
⊢ s ∈ 𝓤 (Completion α)

tactic: have : r ∈ uniformity ℝ := Metric.dist_mem_uniformity εpos
state_before: case mpr.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
⊢ s ∈ 𝓤 (Completion α)

tactic: have T := uniformContinuous_def.1 (@Completion.uniformContinuous_dist α _) r this
state_before: case mpr.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
⊢ s ∈ 𝓤 (Completion α)

tactic: simp only [uniformity_prod_eq_prod, mem_prod_iff, exists_prop, Filter.mem_map,
  Set.mem_setOf_eq] at T
state_before: case mpr.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
T : {x | (dist x.fst.fst x.fst.snd, dist x.snd.fst x.snd.snd) ∈ r} ∈ 𝓤 (Completion α × Completion α)
⊢ s ∈ 𝓤 (Completion α)

tactic: rcases T with ⟨t1, ht1, t2, ht2, ht⟩
state_before: case mpr.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
T :
  ∃ t₁,
    t₁ ∈ 𝓤 (Completion α) ∧
      ∃ t₂,
        t₂ ∈ 𝓤 (Completion α) ∧
          t₁ ×ˢ t₂ ⊆
            (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
              {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
⊢ s ∈ 𝓤 (Completion α)

tactic: refine' mem_of_superset ht1 _
state_before: case mpr.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
⊢ s ∈ 𝓤 (Completion α)

tactic: have A : ∀ a b : Completion α, (a, b) ∈ t1 → dist a b < ε := by
  intro a b hab
  have : ((a, b), (a, a)) ∈ t1 ×ˢ t2 := ⟨hab, refl_mem_uniformity ht2⟩
  have I := ht this
  simp [Completion.dist_self, Real.dist_eq, Completion.dist_comm] at I
  exact lt_of_le_of_lt (le_abs_self _) I
state_before: case mpr.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
⊢ t1 ⊆ s

tactic: show t1 ⊆ s
state_before: case mpr.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
A : ∀ (a b : Completion α), (a, b) ∈ t1 → dist a b < ε
⊢ t1 ⊆ s

tactic: intro a b hab
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
⊢ ∀ (a b : Completion α), (a, b) ∈ t1 → dist a b < ε

tactic: have : ((a, b), (a, a)) ∈ t1 ×ˢ t2 := ⟨hab, refl_mem_uniformity ht2⟩
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
a b : Completion α
hab : (a, b) ∈ t1
⊢ dist a b < ε

tactic: have I := ht this
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this✝ : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
a b : Completion α
hab : (a, b) ∈ t1
this : ((a, b), a, a) ∈ t1 ×ˢ t2
⊢ dist a b < ε

tactic: simp [Completion.dist_self, Real.dist_eq, Completion.dist_comm] at I
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this✝ : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
a b : Completion α
hab : (a, b) ∈ t1
this : ((a, b), a, a) ∈ t1 ×ˢ t2
I :
  ((a, b), a, a) ∈
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
⊢ dist a b < ε

tactic: exact lt_of_le_of_lt (le_abs_self _) I
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this✝ : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
a b : Completion α
hab : (a, b) ∈ t1
this : ((a, b), a, a) ∈ t1 ×ˢ t2
I : abs (dist a b) < ε
⊢ dist a b < ε

tactic: rintro ⟨a, b⟩ hp
state_before: case mpr.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
A : ∀ (a b : Completion α), (a, b) ∈ t1 → dist a b < ε
⊢ t1 ⊆ s

tactic: have : dist a b < ε := A a b hp
state_before: case mpr.intro.intro.intro.intro.intro.intro.mk
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
A : ∀ (a b : Completion α), (a, b) ∈ t1 → dist a b < ε
a b : Completion α
hp : (a, b) ∈ t1
⊢ (a, b) ∈ s

tactic: exact hε this
state_before: case mpr.intro.intro.intro.intro.intro.intro.mk
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
ε : ℝ
εpos : ε > 0
hε : ∀ {a b : Completion α}, dist a b < ε → (a, b) ∈ s
r : Set (ℝ × ℝ) := {p | dist p.fst p.snd < ε}
this✝ : r ∈ 𝓤 ℝ
t1 : Set (Completion α × Completion α)
ht1 : t1 ∈ 𝓤 (Completion α)
t2 : Set (Completion α × Completion α)
ht2 : t2 ∈ 𝓤 (Completion α)
ht :
  t1 ×ˢ t2 ⊆
    (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹'
      {x | dist (dist x.fst.fst x.fst.snd) (dist x.snd.fst x.snd.snd) < ε}
A : ∀ (a b : Completion α), (a, b) ∈ t1 → dist a b < ε
a b : Completion α
hp : (a, b) ∈ t1
this : dist a b < ε
⊢ (a, b) ∈ s