Theorem: CauchyFilter.denseRange_pureCauchy
File: Mathlib/Topology/UniformSpace/Completion.lean

tactic: have h_ex : ∀ s ∈ 𝓤 (CauchyFilter α), ∃ y : α, (f, pureCauchy y) ∈ s := fun s hs =>
  let ⟨t'', ht''₁, (ht''₂ : gen t'' ⊆ s)⟩ := (mem_lift'_sets monotone_gen).mp hs
  let ⟨t', ht'₁, ht'₂⟩ := comp_mem_uniformity_sets ht''₁
  have : t' ∈ f.val ×ˢ f.val := f.property.right ht'₁
  let ⟨t, ht, (h : t ×ˢ t ⊆ t')⟩ := mem_prod_same_iff.mp this
  let ⟨x, (hx : x ∈ t)⟩ := f.property.left.nonempty_of_mem ht
  have : t'' ∈ f.val ×ˢ pure x :=
    mem_prod_iff.mpr
      ⟨t, ht, { y : α | (x, y) ∈ t' }, h <| mk_mem_prod hx hx,
        fun ⟨a, b⟩ ⟨(h₁ : a ∈ t), (h₂ : (x, b) ∈ t')⟩ =>
        ht'₂ <| prod_mk_mem_compRel (@h (a, x) ⟨h₁, hx⟩) h₂⟩
  ⟨x, ht''₂ <| by dsimp [gen] ; exact this⟩
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
⊢ f ∈ closure (range pureCauchy)

tactic: simp only [closure_eq_cluster_pts, ClusterPt, nhds_eq_uniformity, lift'_inf_principal_eq,
  Set.inter_comm _ (range pureCauchy), mem_setOf_eq]
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
⊢ f ∈ closure (range pureCauchy)

tactic: refine (lift'_neBot_iff ?_).mpr (fun s hs => ?_)
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
⊢ NeBot (Filter.lift' (𝓤 (CauchyFilter α)) fun t => range pureCauchy ∩ UniformSpace.ball f t)

tactic: . refine monotone_const.inter ?_
  simp_rw [UniformSpace.ball]
  exact monotone_preimage
state_before: case refine_1
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
⊢ Monotone fun t => range pureCauchy ∩ UniformSpace.ball f t

case refine_2
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)

tactic: . let ⟨y, hy⟩ := h_ex s hs
  have : pureCauchy y ∈ range pureCauchy ∩ { y : CauchyFilter α | (f, y) ∈ s } :=
    ⟨mem_range_self y, hy⟩
  exact ⟨_, this⟩
state_before: case refine_2
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)

tactic: dsimp [gen]
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
t'' : Set (α × α)
ht''₁ : t'' ∈ 𝓤 α
ht''₂ : gen t'' ⊆ s
t' : Set (α × α)
ht'₁ : t' ∈ 𝓤 α
ht'₂ : t' ○ t' ⊆ t''
this✝ : t' ∈ ↑f ×ˢ ↑f
t : Set α
ht : t ∈ ↑f
h : t ×ˢ t ⊆ t'
x : α
hx : x ∈ t
this : t'' ∈ ↑f ×ˢ pure x
⊢ (f, pureCauchy x) ∈ gen t''

tactic: exact this
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
t'' : Set (α × α)
ht''₁ : t'' ∈ 𝓤 α
ht''₂ : gen t'' ⊆ s
t' : Set (α × α)
ht'₁ : t' ∈ 𝓤 α
ht'₂ : t' ○ t' ⊆ t''
this✝ : t' ∈ ↑f ×ˢ ↑f
t : Set α
ht : t ∈ ↑f
h : t ×ˢ t ⊆ t'
x : α
hx : x ∈ t
this : t'' ∈ ↑f ×ˢ pure x
⊢ t'' ∈ ↑f ×ˢ ↑(pureCauchy x)

tactic: refine monotone_const.inter ?_
state_before: case refine_1
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
⊢ Monotone fun t => range pureCauchy ∩ UniformSpace.ball f t

tactic: simp_rw [UniformSpace.ball]
state_before: case refine_1
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
⊢ Monotone fun t => UniformSpace.ball f t

tactic: exact monotone_preimage
state_before: case refine_1
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
⊢ Monotone fun t => Prod.mk f ⁻¹' t

tactic: let ⟨y, hy⟩ := h_ex s hs
state_before: case refine_2
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)

tactic: have : pureCauchy y ∈ range pureCauchy ∩ { y : CauchyFilter α | (f, y) ∈ s } :=
  ⟨mem_range_self y, hy⟩
state_before: case refine_2
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
y : α
hy : (f, pureCauchy y) ∈ s
⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)

tactic: exact ⟨_, this⟩
state_before: case refine_2
α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : CauchyFilter α
h_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s
s : Set (CauchyFilter α × CauchyFilter α)
hs : s ∈ 𝓤 (CauchyFilter α)
y : α
hy : (f, pureCauchy y) ∈ s
this : pureCauchy y ∈ range pureCauchy ∩ {y | (f, y) ∈ s}
⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)