Theorem: tendsto_indicator_const_apply_iff_eventually'
File: Mathlib/Topology/IndicatorConstPointwise.lean

tactic: have heart := @tendsto_ite ι L β (fun i ↦ x ∈ As i) _ (x ∈ A) _ b 0 (𝓝 b) (𝓝 (0 : β))
              nhd_o nhd_b ?_ ?_
state_before: α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ Tendsto (fun i => (As i).indicator (fun x => b) x) L (𝓝 (A.indicator (fun x => b) x)) ↔
    ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A
state_after: case refine_3
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
heart :
  Tendsto (fun i => if (fun i => x ∈ As i) i then b else 0) L (if x ∈ A then 𝓝 b else 𝓝 0) ↔
    ∀ᶠ (i : ι) in L, (fun i => x ∈ As i) i ↔ x ∈ A
⊢ Tendsto (fun i => (As i).indicator (fun x => b) x) L (𝓝 (A.indicator (fun x => b) x)) ↔
    ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A

case refine_1
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ 𝓟 {b} ≤ 𝓝 b

case refine_2
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ 𝓟 {0} ≤ 𝓝 0

tactic: convert heart
state_before: case refine_3
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
heart :
  Tendsto (fun i => if (fun i => x ∈ As i) i then b else 0) L (if x ∈ A then 𝓝 b else 𝓝 0) ↔
    ∀ᶠ (i : ι) in L, (fun i => x ∈ As i) i ↔ x ∈ A
⊢ Tendsto (fun i => (As i).indicator (fun x => b) x) L (𝓝 (A.indicator (fun x => b) x)) ↔
    ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A
state_after: case h.e'_1.h.e'_5
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
heart :
  Tendsto (fun i => if (fun i => x ∈ As i) i then b else 0) L (if x ∈ A then 𝓝 b else 𝓝 0) ↔
    ∀ᶠ (i : ι) in L, (fun i => x ∈ As i) i ↔ x ∈ A
⊢ 𝓝 (A.indicator (fun x => b) x) = if x ∈ A then 𝓝 b else 𝓝 0

tactic: by_cases hxA : x ∈ A <;> simp [hxA]
state_before: case h.e'_1.h.e'_5
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
heart :
  Tendsto (fun i => if (fun i => x ∈ As i) i then b else 0) L (if x ∈ A then 𝓝 b else 𝓝 0) ↔
    ∀ᶠ (i : ι) in L, (fun i => x ∈ As i) i ↔ x ∈ A
⊢ 𝓝 (A.indicator (fun x => b) x) = if x ∈ A then 𝓝 b else 𝓝 0
state_after: no goals

tactic: simp only [principal_singleton, le_def, mem_pure]
state_before: case refine_1
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ 𝓟 {b} ≤ 𝓝 b
state_after: case refine_1
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ ∀ x ∈ 𝓝 b, b ∈ x

tactic: exact fun s s_nhd ↦ mem_of_mem_nhds s_nhd
state_before: case refine_1
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ ∀ x ∈ 𝓝 b, b ∈ x
state_after: no goals

tactic: simp only [principal_singleton, le_def, mem_pure]
state_before: case refine_2
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ 𝓟 {0} ≤ 𝓝 0
state_after: case refine_2
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ ∀ x ∈ 𝓝 0, 0 ∈ x

tactic: exact fun s s_nhd ↦ mem_of_mem_nhds s_nhd
state_before: case refine_2
α : Type u_1
A : Set α
β : Type u_2
inst✝¹ : Zero β
inst✝ : TopologicalSpace β
ι : Type u_3
L : Filter ι
As : ι → Set α
b : β
nhd_b : {0}ᶜ ∈ 𝓝 b
nhd_o : {b}ᶜ ∈ 𝓝 0
x : α
⊢ ∀ x ∈ 𝓝 0, 0 ∈ x
state_after: no goals