Theorem: PiNat.exists_disjoint_cylinder
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: rcases eq_empty_or_nonempty s with (rfl | hne)
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
⊢ ∃ n, Disjoint s (cylinder x n)

tactic: have A : 0 < infDist x s := (hs.not_mem_iff_infDist_pos hne).1 hx
state_before: case inr
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
⊢ ∃ n, Disjoint s (cylinder x n)

tactic: obtain ⟨n, hn⟩ : ∃ n, (1 / 2 : ℝ) ^ n < infDist x s := exists_pow_lt_of_lt_one A one_half_lt_one
state_before: case inr
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
A : 0 < infDist x s
⊢ ∃ n, Disjoint s (cylinder x n)

tactic: refine' ⟨n, disjoint_left.2 fun y ys hy => ?_⟩
state_before: case inr.intro
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
A : 0 < infDist x s
n : ℕ
hn : (1 / 2) ^ n < infDist x s
⊢ ∃ n, Disjoint s (cylinder x n)

tactic: apply lt_irrefl (infDist x s)
state_before: case inr.intro
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
A : 0 < infDist x s
n : ℕ
hn : (1 / 2) ^ n < infDist x s
y : (n : ℕ) → E n
ys : y ∈ s
hy : y ∈ cylinder x n
⊢ False

tactic: calc
  infDist x s ≤ dist x y := infDist_le_dist_of_mem ys
  _ ≤ (1 / 2) ^ n := by
    rw [mem_cylinder_comm] at hy
    exact mem_cylinder_iff_dist_le.1 hy
  _ < infDist x s := hn
state_before: case inr.intro
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
A : 0 < infDist x s
n : ℕ
hn : (1 / 2) ^ n < infDist x s
y : (n : ℕ) → E n
ys : y ∈ s
hy : y ∈ cylinder x n
⊢ infDist x s < infDist x s

tactic: exact ⟨0, by simp⟩
state_before: case inl
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
x : (n : ℕ) → E n
hs : IsClosed ∅
hx : ¬x ∈ ∅
⊢ ∃ n, Disjoint ∅ (cylinder x n)

tactic: simp
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
x : (n : ℕ) → E n
hs : IsClosed ∅
hx : ¬x ∈ ∅
⊢ Disjoint ∅ (cylinder x 0)

tactic: rw [mem_cylinder_comm] at hy
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
A : 0 < infDist x s
n : ℕ
hn : (1 / 2) ^ n < infDist x s
y : (n : ℕ) → E n
ys : y ∈ s
hy : y ∈ cylinder x n
⊢ dist x y ≤ (1 / 2) ^ n

tactic: exact mem_cylinder_iff_dist_le.1 hy
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x : (n : ℕ) → E n
hx : ¬x ∈ s
hne : Set.Nonempty s
A : 0 < infDist x s
n : ℕ
hn : (1 / 2) ^ n < infDist x s
y : (n : ℕ) → E n
ys : y ∈ s
hy : x ∈ cylinder y n
⊢ dist x y ≤ (1 / 2) ^ n