Theorem: ContinuousOn.if
File: Mathlib/Topology/ContinuousOn.lean

tactic: apply ContinuousOn.if'
state_before: α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
⊢ ContinuousOn (fun a => if p a then f a else g a) s

tactic: rintro a ha
state_before: case hpf
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
⊢ ∀ (a : α), a ∈ s ∩ frontier {a | p a} → Tendsto (fun a => f a) (𝓝[s ∩ {a | p a}] a) (𝓝 (if p a then f a else g a))

tactic: simp only [← hp a ha, ite_self]
state_before: case hpf
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
ha : a ∈ s ∩ frontier {a | p a}
⊢ Tendsto (fun a => f a) (𝓝[s ∩ {a | p a}] a) (𝓝 (if p a then f a else g a))

tactic: apply tendsto_nhdsWithin_mono_left (inter_subset_inter_right s subset_closure)
state_before: case hpf
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
ha : a ∈ s ∩ frontier {a | p a}
⊢ Tendsto (fun a => f a) (𝓝[s ∩ {a | p a}] a) (𝓝 (f a))

tactic: exact hf a ⟨ha.1, ha.2.1⟩
state_before: case hpf
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
ha : a ∈ s ∩ frontier {a | p a}
⊢ Tendsto (fun a => f a) (𝓝[s ∩ closure {a | p a}] a) (𝓝 (f a))

tactic: rintro a ha
state_before: case hpg
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
⊢ ∀ (a : α), a ∈ s ∩ frontier {a | p a} → Tendsto (fun a => g a) (𝓝[s ∩ {a | ¬p a}] a) (𝓝 (if p a then f a else g a))

tactic: simp only [hp a ha, ite_self]
state_before: case hpg
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
ha : a ∈ s ∩ frontier {a | p a}
⊢ Tendsto (fun a => g a) (𝓝[s ∩ {a | ¬p a}] a) (𝓝 (if p a then f a else g a))

tactic: apply tendsto_nhdsWithin_mono_left (inter_subset_inter_right s subset_closure)
state_before: case hpg
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
ha : a ∈ s ∩ frontier {a | p a}
⊢ Tendsto (fun a => g a) (𝓝[s ∩ {a | ¬p a}] a) (𝓝 (g a))

tactic: rcases ha with ⟨has, ⟨_, ha⟩⟩
state_before: case hpg
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
ha : a ∈ s ∩ frontier {a | p a}
⊢ Tendsto (fun a => g a) (𝓝[s ∩ closure {a | ¬p a}] a) (𝓝 (g a))

tactic: rw [← mem_compl_iff, ← closure_compl] at ha
state_before: case hpg.intro.intro
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
has : a ∈ s
left✝ : a ∈ closure {a | p a}
ha : ¬a ∈ interior {a | p a}
⊢ Tendsto (fun a => g a) (𝓝[s ∩ closure {a | ¬p a}] a) (𝓝 (g a))

tactic: apply hg a ⟨has, ha⟩
state_before: case hpg.intro.intro
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
a : α
has : a ∈ s
left✝ : a ∈ closure {a | p a}
ha : a ∈ closure ({a | p a}ᶜ)
⊢ Tendsto (fun a => g a) (𝓝[s ∩ closure {a | ¬p a}] a) (𝓝 (g a))

tactic: exact hf.mono (inter_subset_inter_right s subset_closure)
state_before: case hf
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
⊢ ContinuousOn (fun a => f a) (s ∩ {a | p a})

tactic: exact hg.mono (inter_subset_inter_right s subset_closure)
state_before: case hg
α✝ : Type ?u.373923
β✝ : Type ?u.373926
γ : Type ?u.373929
δ : Type ?u.373932
inst✝⁶ : TopologicalSpace α✝
inst✝⁵ : TopologicalSpace β✝
inst✝⁴ : TopologicalSpace γ
inst✝³ : TopologicalSpace δ
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
p : α → Prop
inst✝ : (a : α) → Decidable (p a)
s : Set α
f g : α → β
hp : ∀ (a : α), a ∈ s ∩ frontier {a | p a} → f a = g a
hf : ContinuousOn f (s ∩ closure {a | p a})
hg : ContinuousOn g (s ∩ closure {a | ¬p a})
⊢ ContinuousOn (fun a => g a) (s ∩ {a | ¬p a})