-- Mathlib/Topology/MetricSpace/ThickenedIndicator.lean
theorem thickenedIndicatorAux_tendsto_indicator_closure {δseq : ℕ → ℝ}
    (δseq_lim : Tendsto δseq atTop (𝓝 0)) (E : Set α) :
    Tendsto (fun n => thickenedIndicatorAux (δseq n) E) atTop
      (𝓝 (indicator (closure E) fun _ => (1 : ℝ≥0∞)))

Proof state:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
key : x ∉ thickening ε E
⊢ thickenedIndicatorAux (δseq n) E x = 0

Tactic:
refine le_antisymm ?_ bot_le

Result:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
key : x ∉ thickening ε E
⊢ thickenedIndicatorAux (δseq n) E x ≤ 0

Proof state:
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
⊢ x ∉ thickening ε E

Tactic:
simpa only [thickening, mem_setOf_eq, not_lt] using ε_lt.le

Result:
no goals

Proof state:
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
δseq_lim : Tendsto δseq atTop (𝓝 0)
E : Set α
x : α
x_mem_closure : x ∉ closure E
⊢ (closure E).indicator (fun x => 1) x = 0

Tactic:
simp only [x_mem_closure, indicator_of_not_mem, not_false_iff]

Result:
no goals

Proof state:
case neg.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δseq_lim : ∃ a, ∀ b ≥ a, |δseq b| < ε
⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)

Tactic:
rcases δseq_lim with ⟨N, hN⟩

Result:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)

Proof state:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)

Tactic:
apply tendsto_atTop_of_eventually_const (i₀ := N)

Result:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
⊢ ∀ i ≥ N, thickenedIndicatorAux (δseq i) E x = 0

Proof state:
case pos
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
δseq_lim : Tendsto δseq atTop (𝓝 0)
E : Set α
x : α
x_mem_closure : x ∈ closure E
⊢ Tendsto (fun i => 1) atTop (𝓝 ((closure E).indicator (fun x => 1) x))

Tactic:
rw [show (indicator (closure E) fun _ => (1 : ℝ≥0∞)) x = 1 by
    simp only [x_mem_closure, indicator_of_mem]]

Result:
case pos
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
δseq_lim : Tendsto δseq atTop (𝓝 0)
E : Set α
x : α
x_mem_closure : x ∈ closure E
⊢ Tendsto (fun i => 1) atTop (𝓝 1)

Proof state:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
⊢ thickenedIndicatorAux (δseq n) E x = 0

Tactic:
have key : x ∉ thickening ε E := by simpa only [thickening, mem_setOf_eq, not_lt] using ε_lt.le

Result:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
key : x ∉ thickening ε E
⊢ thickenedIndicatorAux (δseq n) E x = 0

Proof state:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
key : x ∉ thickening ε E
⊢ thickenedIndicatorAux (δseq n) E x ≤ 0

Tactic:
apply (thickenedIndicatorAux_mono (lt_of_abs_lt (hN n n_large)).le E x).trans

Result:
case neg.intro.intro.intro
α : Type u_1
inst✝ : PseudoEMetricSpace α
δseq : ℕ → ℝ
E : Set α
x : α
x_mem_closure : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
N : ℕ
hN : ∀ b ≥ N, |δseq b| < ε
n : ℕ
n_large : n ≥ N
key : x ∉ thickening ε E
⊢ thickenedIndicatorAux ε E x ≤ 0