Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL NhdsWithin.lean   Interaktion und
PortierbarkeitLean

 

/-
Copyright (c) 2019 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Sébastien Gouëzel
-/

module

public import Mathlib.Topology.Constructions

/-!
# Neighborhoods relative to a subset

This file develops API on the relative versions `nhdsWithin` and `nhdsSetWithin` of `nhds` and
`nhdsSet`, which are defined in previous definition files.

Their basic properties studied in this file include the relationship between neighborhood filters
relative to a set and neighborhood filters in the corresponding subtype, and are in later files used
to develop relative versions `ContinuousOn` and `ContinuousWithinAt` of `Continuous` and
`ContinuousAt`.

## Notation

* `�� x`: the filter of neighborhoods of a point `x`;
* `�� s`: the principal filter of a set `s`;
* `��[s] x`: the filter `nhdsWithin x s` of neighborhoods of a point `x` within a set `s`;
* `��ˢ[t] s`: the filter `nhdsSetWithin s t` of neighborhoods of a set `s` within a set `t`.
-/


public section

open Set Filter Function Topology

variable {α β : Type*} [TopologicalSpace α]

/-!
## Properties of the neighborhood-within filter
-/


@[simp]
theorem nhds_bind_nhdsWithin {a : α} {s : Set α} : ((�� a).bind fun x => ��[s] x) = ��[s] a :=
  bind_inf_principal.trans <| congr_arg₂ _ nhds_bind_nhds rfl

@[simp]
theorem eventually_nhds_nhdsWithin {a : α} {s : Set α} {p : α → Prop} :
    (∀ᶠ y in �� a, ∀ᶠ x in ��[s] y, p x) ↔ ∀ᶠ x in ��[s] a, p x :=
  Filter.ext_iff.1 nhds_bind_nhdsWithin { x | p x }

theorem eventually_nhdsWithin_iff {a : α} {s : Set α} {p : α → Prop} :
    (∀ᶠ x in ��[s] a, p x) ↔ ∀ᶠ x in �� a, x ∈ s → p x :=
  eventually_inf_principal

theorem frequently_nhdsWithin_iff {z : α} {s : Set α} {p : α → Prop} :
    (∃ᶠ x in ��[s] z, p x) ↔ ∃ᶠ x in �� z, p x ∧ x ∈ s :=
  frequently_inf_principal.trans <| by simp only [and_comm]

theorem mem_closure_ne_iff_frequently_within {z : α} {s : Set α} :
    z ∈ closure (s \ {z}) ↔ ∃ᶠ x in ��[≠] z, x ∈ s := by
  simp [mem_closure_iff_frequently, frequently_nhdsWithin_iff]

@[simp]
theorem eventually_eventually_nhdsWithin {a : α} {s : Set α} {p : α → Prop} :
    (∀ᶠ y in ��[s] a, ∀ᶠ x in ��[s] y, p x) ↔ ∀ᶠ x in ��[s] a, p x := by
  refine ⟨fun h => ?_, fun h => (eventually_nhds_nhdsWithin.2 h).filter_mono inf_le_left⟩
  simp only [eventually_nhdsWithin_iff] at h ⊢
  exact h.mono fun x hx hxs => (hx hxs).self_of_nhds hxs

@[simp]
theorem eventually_mem_nhdsWithin_iff {x : α} {s t : Set α} :
    (∀ᶠ x' in ��[s] x, t ∈ ��[s] x') ↔ t ∈ ��[s] x :=
  eventually_eventually_nhdsWithin

theorem nhdsWithin_eq (a : α) (s : Set α) :
    ��[s] a = ⨅ t ∈ { t : Set α | a ∈ t ∧ IsOpen t }, �� (t ∩ s) :=
  ((nhds_basis_opens a).inf_principal s).eq_biInf

@[simp] lemma nhdsWithin_univ (a : α) : ��[Set.univ] a = �� a := by
  rw [nhdsWithin, principal_univ, inf_top_eq]

theorem nhdsWithin_hasBasis {ι : Sort*} {p : ι → Prop} {s : ι → Set α} {a : α}
    (h : (�� a).HasBasis p s) (t : Set α) : (��[t] a).HasBasis p fun i => s i ∩ t :=
  h.inf_principal t

theorem nhdsWithin_basis_open (a : α) (t : Set α) :
    (��[t] a).HasBasis (fun u => a ∈ u ∧ IsOpen u) fun u => u ∩ t :=
  nhdsWithin_hasBasis (nhds_basis_opens a) t

theorem mem_nhdsWithin {t : Set α} {a : α} {s : Set α} :
    t ∈ ��[s] a ↔ ∃ u, IsOpen u ∧ a ∈ u ∧ u ∩ s ⊆ t := by
  simpa only [and_assoc, and_left_comm] using (nhdsWithin_basis_open a s).mem_iff

theorem mem_nhdsWithin_iff_exists_mem_nhds_inter {t : Set α} {a : α} {s : Set α} :
    t ∈ ��[s] a ↔ ∃ u ∈ �� a, u ∩ s ⊆ t :=
  (nhdsWithin_hasBasis (�� a).basis_sets s).mem_iff

theorem sdiff_mem_nhdsWithin_compl {x : α} {s : Set α} (hs : s ∈ �� x) (t : Set α) :
    s \ t ∈ ��[tᶜ] x :=
  sdiff_mem_inf_principal_compl hs t

@[deprecated (since := "2026-06-03")] alias diff_mem_nhdsWithin_compl := sdiff_mem_nhdsWithin_compl

theorem sdiff_mem_nhdsWithin_sdiff {x : α} {s t : Set α} (hs : s ∈ ��[t] x) (t' : Set α) :
    s \ t' ∈ ��[t \ t'] x := by
  rw [nhdsWithin, sdiff_eq, sdiff_eq, ← inf_principal, ← inf_assoc]
  exact inter_mem_inf hs (mem_principal_self _)

@[deprecated (since := "2026-06-03")] alias diff_mem_nhdsWithin_diff := sdiff_mem_nhdsWithin_sdiff

theorem nhds_of_nhdsWithin_of_nhds {s t : Set α} {a : α} (h1 : s ∈ �� a) (h2 : t ∈ ��[s] a) :
    t ∈ �� a := by
  rcases mem_nhdsWithin_iff_exists_mem_nhds_inter.mp h2 with ⟨_, Hw, hw⟩
  exact (�� a).sets_of_superset ((�� a).inter_sets Hw h1) hw

theorem mem_nhdsWithin_iff_eventually {s t : Set α} {x : α} :
    t ∈ ��[s] x ↔ ∀ᶠ y in �� x, y ∈ s → y ∈ t :=
  eventually_inf_principal

theorem mem_nhdsWithin_iff_eventuallyEqSet {s t : Set α} {x : α} :
    t ∈ ��[s] x ↔ s =ᶠ[�� x] s ∩ t := by
  simp_rw [mem_nhdsWithin_iff_eventually, eventuallyEqSet_iff, mem_inter_iff, iff_self_and]

@[deprecated (since := "2026-08-14")]
alias mem_nhdsWithin_iff_eventuallyEq := mem_nhdsWithin_iff_eventuallyEqSet

lemma mem_nhdsWithin_inter_self {s t : Set α} {x : α} : t ∈ ��[s ∩ t] x :=
  mem_nhdsWithin_iff_eventuallyEqSet.mpr <| by simp

lemma mem_nhdsWithin_self_inter {s t : Set α} {x : α} : s ∈ ��[s ∩ t] x :=
  mem_nhdsWithin_iff_eventuallyEqSet.mpr <| by simp

theorem nhdsWithin_eq_iff_eventuallyEqSet {s t : Set α} {x : α} : ��[s] x = ��[t] x ↔ s =ᶠ[�� x] t :=
  eventuallyEqSet_iff_inf_principal.symm

@[deprecated (since := "2026-08-14")]
alias nhdsWithin_eq_iff_eventuallyEq := nhdsWithin_eq_iff_eventuallyEqSet

theorem nhdsWithin_le_iff {s t : Set α} {x : α} : ��[s] x ≤ ��[t] x ↔ t ∈ ��[s] x :=
  eventuallySubset_iff_inf_principal_le.symm.trans eventuallySubset_iff_mem_inf_principal

theorem preimage_nhdsWithin_coinduced' {X : α → β} {s : Set β} {t : Set α} {a : α} (h : a ∈ t)
    (hs : s ∈ @nhds β (.coinduced (fun x : t => X x) inferInstance) (X a)) :
    X ⁻¹' s ∈ ��[t] a := by
  lift a to t using h
  replace hs : (fun x : t => X x) ⁻¹' s ∈ �� a := preimage_nhds_coinduced hs
  rwa [← map_nhds_subtype_val, mem_map]

theorem mem_nhdsWithin_of_mem_nhds {s t : Set α} {a : α} (h : s ∈ �� a) : s ∈ ��[t] a :=
  mem_inf_of_left h

theorem self_mem_nhdsWithin {a : α} {s : Set α} : s ∈ ��[s] a :=
  mem_inf_of_right (mem_principal_self s)

theorem eventually_mem_nhdsWithin {a : α} {s : Set α} : ∀ᶠ x in ��[s] a, x ∈ s :=
  self_mem_nhdsWithin

theorem inter_mem_nhdsWithin (s : Set α) {t : Set α} {a : α} (h : t ∈ �� a) : s ∩ t ∈ ��[s] a :=
  inter_mem self_mem_nhdsWithin (mem_inf_of_left h)

lemma sdiff_mem_nhdsWithin (s : Set α) {t : Set α} {a : α} (h : tᶜ ∈ �� a) : s \ t ∈ ��[s] a :=
  inter_mem_nhdsWithin _ h

theorem pure_le_nhdsWithin {a : α} {s : Set α} (ha : a ∈ s) : pure a ≤ ��[s] a :=
  le_inf (pure_le_nhds a) (le_principal_iff.2 ha)

theorem mem_of_mem_nhdsWithin {a : α} {s t : Set α} (ha : a ∈ s) (ht : t ∈ ��[s] a) : a ∈ t :=
  pure_le_nhdsWithin ha ht

theorem Filter.Eventually.self_of_nhdsWithin {p : α → Prop} {s : Set α} {x : α}
    (h : ∀ᶠ y in ��[s] x, p y) (hx : x ∈ s) : p x :=
  mem_of_mem_nhdsWithin hx h

theorem tendsto_const_nhdsWithin {l : Filter β} {s : Set α} {a : α} (ha : a ∈ s) :
    Tendsto (fun _ : β => a) l (��[s] a) :=
  tendsto_const_pure.mono_right <| pure_le_nhdsWithin ha

theorem nhdsWithin_restrict'' {a : α} (s : Set α) {t : Set α} (h : t ∈ ��[s] a) :
    ��[s] a = ��[s ∩ t] a :=
  le_antisymm (le_inf inf_le_left (le_principal_iff.mpr (inter_mem self_mem_nhdsWithin h)))
    (inf_le_inf_left _ (principal_mono.mpr Set.inter_subset_left))

theorem nhdsWithin_restrict' {a : α} (s : Set α) {t : Set α} (h : t ∈ �� a) : ��[s] a = ��[s ∩ t] a :=
  nhdsWithin_restrict'' s <| mem_inf_of_left h

theorem nhdsWithin_restrict {a : α} (s : Set α) {t : Set α} (h₀ : a ∈ t) (h₁ : IsOpen t) :
    ��[s] a = ��[s ∩ t] a :=
  nhdsWithin_restrict' s (IsOpen.mem_nhds h₁ h₀)

theorem nhdsWithin_le_of_mem {a : α} {s t : Set α} (h : s ∈ ��[t] a) : ��[t] a ≤ ��[s] a :=
  nhdsWithin_le_iff.mpr h

theorem nhdsWithin_le_nhds {a : α} {s : Set α} : ��[s] a ≤ �� a := by
  rw [← nhdsWithin_univ]
  apply nhdsWithin_le_of_mem
  exact univ_mem

theorem nhdsWithin_eq_nhdsWithin' {a : α} {s t u : Set α} (hs : s ∈ �� a) (h₂ : t ∩ s = u ∩ s) :
    ��[t] a = ��[u] a := by rw [nhdsWithin_restrict' t hs, nhdsWithin_restrict' u hs, h₂]

theorem nhdsWithin_eq_nhdsWithin {a : α} {s t u : Set α} (h₀ : a ∈ s) (h₁ : IsOpen s)
    (h₂ : t ∩ s = u ∩ s) : ��[t] a = ��[u] a := by
  rw [nhdsWithin_restrict t h₀ h₁, nhdsWithin_restrict u h₀ h₁, h₂]

@[simp] theorem nhdsWithin_eq_nhds {a : α} {s : Set α} : ��[s] a = �� a ↔ s ∈ �� a :=
  inf_eq_left.trans le_principal_iff

theorem IsOpen.nhdsWithin_eq {a : α} {s : Set α} (h : IsOpen s) (ha : a ∈ s) : ��[s] a = �� a :=
  nhdsWithin_eq_nhds.2 <| h.mem_nhds ha

theorem preimage_nhds_within_coinduced {X : α → β} {s : Set β} {t : Set α} {a : α} (h : a ∈ t)
    (ht : IsOpen t)
    (hs : s ∈ @nhds β (.coinduced (fun x : t => X x) inferInstance) (X a)) :
    X ⁻¹' s ∈ �� a := by
  rw [← ht.nhdsWithin_eq h]
  exact preimage_nhdsWithin_coinduced' h hs

@[simp]
theorem nhdsWithin_empty (a : α) : ��[∅] a = ⊥ := by rw [nhdsWithin, principal_empty, inf_bot_eq]

theorem nhdsWithin_union (a : α) (s t : Set α) : ��[s ∪ t] a = ��[s] a ⊔ ��[t] a := by
  delta nhdsWithin
  rw [← inf_sup_left, sup_principal]

theorem nhds_eq_nhdsWithin_sup_nhdsWithin (b : α) {I₁ I₂ : Set α} (hI : Set.univ = I₁ ∪ I₂) :
    nhds b = nhdsWithin b I₁ ⊔ nhdsWithin b I₂ := by
  rw [← nhdsWithin_univ b, hI, nhdsWithin_union]

lemma inter_mem_nhdsWithin_inter {a b c d : Set α} {x : α} (h : a ∈ ��[b] x) (h' : c ∈ ��[d] x) :
    a ∩ c ∈ ��[b ∩ d] x :=
  inter_mem (nhdsWithin_mono _ inter_subset_left h) (nhdsWithin_mono _ inter_subset_right h')

/-- If `L` and `R` are neighborhoods of `b` within sets whose union is `Set.univ`, then
`L ∪ R` is a neighborhood of `b`. -/

theorem union_mem_nhds_of_mem_nhdsWithin {b : α}
    {I₁ I₂ : Set α} (h : Set.univ = I₁ ∪ I₂)
    {L : Set α} (hL : L ∈ nhdsWithin b I₁)
    {R : Set α} (hR : R ∈ nhdsWithin b I₂) : L ∪ R ∈ nhds b := by
  rw [← nhdsWithin_univ b, h, nhdsWithin_union]
  exact ⟨mem_of_superset hL (by simp), mem_of_superset hR (by simp)⟩


/-- Writing a punctured neighborhood filter as a sup of left and right filters. -/
lemma punctured_nhds_eq_nhdsWithin_sup_nhdsWithin [LinearOrder α] {x : α} :
    ��[≠] x = ��[<] x ⊔ ��[>] x := by
  rw [← Iio_union_Ioi, nhdsWithin_union]


/-- Obtain a "predictably-sided" neighborhood of `b` from two one-sided neighborhoods. -/
theorem nhds_of_Ici_Iic [LinearOrder α] {b : α}
    {L : Set α} (hL : L ∈ ��[≤] b)
    {R : Set α} (hR : R ∈ ��[≥] b) : L ∩ Iic b ∪ R ∩ Ici b ∈ �� b :=
  union_mem_nhds_of_mem_nhdsWithin Iic_union_Ici.symm
    (inter_mem hL self_mem_nhdsWithin) (inter_mem hR self_mem_nhdsWithin)

theorem nhdsWithin_biUnion {ι} {I : Set ι} (hI : I.Finite) (s : ι → Set α) (a : α) :
    ��[⋃ i ∈ I, s i] a = ⨆ i ∈ I, ��[s i] a := by
  induction I, hI using Set.Finite.induction_on with
  | empty => simp
  | insert _ _ hT => simp only [hT, nhdsWithin_union, iSup_insert, biUnion_insert]

theorem nhdsWithin_sUnion {S : Set (Set α)} (hS : S.Finite) (a : α) :
    ��[⋃₀ S] a = ⨆ s ∈ S, ��[s] a := by
  rw [sUnion_eq_biUnion, nhdsWithin_biUnion hS]

theorem nhdsWithin_iUnion {ι} [Finite ι] (s : ι → Set α) (a : α) :
    ��[⋃ i, s i] a = ⨆ i, ��[s i] a := by
  rw [← sUnion_range, nhdsWithin_sUnion (finite_range s), iSup_range]

theorem nhdsWithin_inter (a : α) (s t : Set α) : ��[s ∩ t] a = ��[s] a ⊓ ��[t] a := by
  delta nhdsWithin
  rw [inf_left_comm, inf_assoc, inf_principal, ← inf_assoc, inf_idem]

theorem nhdsWithin_inter' (a : α) (s t : Set α) : ��[s ∩ t] a = ��[s] a ⊓ �� t := by
  delta nhdsWithin
  rw [← inf_principal, inf_assoc]

theorem nhdsWithin_inter_of_mem {a : α} {s t : Set α} (h : s ∈ ��[t] a) : ��[s ∩ t] a = ��[t] a := by
  rw [nhdsWithin_inter, inf_eq_right]
  exact nhdsWithin_le_of_mem h

theorem nhdsWithin_inter_of_mem' {a : α} {s t : Set α} (h : t ∈ ��[s] a) : ��[s ∩ t] a = ��[s] a := by
  rw [inter_comm, nhdsWithin_inter_of_mem h]

@[simp]
theorem nhdsWithin_singleton (a : α) : ��[{a}] a = pure a := by
  rw [nhdsWithin, principal_singleton, inf_eq_right.2 (pure_le_nhds a)]

@[simp]
theorem nhdsWithin_insert (a : α) (s : Set α) : ��[insert a s] a = pure a ⊔ ��[s] a := by
  rw [← singleton_union, nhdsWithin_union, nhdsWithin_singleton]

theorem mem_nhdsWithin_insert {a : α} {s t : Set α} : t ∈ ��[insert a s] a ↔ a ∈ t ∧ t ∈ ��[s] a := by
  simp

theorem insert_mem_nhdsWithin_insert {a : α} {s t : Set α} (h : t ∈ ��[s] a) :
    insert a t ∈ ��[insert a s] a := by simp [mem_of_superset h]

theorem insert_mem_nhds_iff {a : α} {s : Set α} : insert a s ∈ �� a ↔ s ∈ ��[≠] a := by
  simp only [nhdsWithin, mem_inf_principal, mem_compl_iff, mem_singleton_iff, or_iff_not_imp_left,
    insert_def]

@[simp]
theorem nhdsNE_sup_pure (a : α) : ��[≠] a ⊔ pure a = �� a := by
  rw [← nhdsWithin_singleton, ← nhdsWithin_union, compl_union_self, nhdsWithin_univ]

@[simp]
theorem pure_sup_nhdsNE (a : α) : pure a ⊔ ��[≠] a = �� a := by rw [← sup_comm, nhdsNE_sup_pure]

lemma continuousAt_iff_punctured_nhds [TopologicalSpace β] {f : α → β} {a : α} :
    ContinuousAt f a ↔ Tendsto f (��[≠] a) (�� (f a)) := by
  simp [ContinuousAt, -pure_sup_nhdsNE, ← pure_sup_nhdsNE a, tendsto_pure_nhds]

theorem nhdsWithin_prod [TopologicalSpace β]
    {s u : Set α} {t v : Set β} {a : α} {b : β} (hu : u ∈ ��[s] a) (hv : v ∈ ��[t] b) :
    u ×ˢ v ∈ ��[s ×ˢ t] (a, b) := by
  rw [nhdsWithin_prod_eq]
  exact prod_mem_prod hu hv

lemma Filter.EventuallyEqSet.mem_interior {x : α} {s t : Set α} (hst : s =ᶠ[�� x] t)
    (h : x ∈ interior s) : x ∈ interior t := by
  rw [← nhdsWithin_eq_iff_eventuallyEqSet] at hst
  simpa [mem_interior_iff_mem_nhds, ← nhdsWithin_eq_nhds, hst] using h

lemma Filter.EventuallyEqSet.mem_interior_iff {x : α} {s t : Set α} (hst : s =ᶠ[�� x] t) :
    x ∈ interior s ↔ x ∈ interior t :=
  ⟨fun h ↦ hst.mem_interior h, fun h ↦ hst.symm.mem_interior h⟩

@[deprecated (since := "2026-08-14")]
alias Filter.EventuallyEq.mem_interior := Filter.EventuallyEqSet.mem_interior

@[deprecated (since := "2026-08-14")]
alias Filter.EventuallyEq.mem_interior_iff := Filter.EventuallyEqSet.mem_interior_iff

section Pi

variable {ι : Type*} {X : ι → Type*} [∀ i, TopologicalSpace (X i)]

theorem nhdsWithin_pi_eq' {I : Set ι} (hI : I.Finite) (s : ∀ i, Set (X i)) (x : ∀ i, X i) :
    ��[pi I s] x = ⨅ i, comap (fun x => x i) (�� (x i) ⊓ ⨅ (_ : i ∈ I), �� (s i)) := by
  simp only [nhdsWithin, nhds_pi, Filter.pi, comap_inf, comap_iInf, pi_def, comap_principal, ←
    iInf_principal_finite hI, ← iInf_inf_eq]

theorem nhdsWithin_pi_eq {I : Set ι} (hI : I.Finite) (s : ∀ i, Set (X i)) (x : ∀ i, X i) :
    ��[pi I s] x =
      (⨅ i ∈ I, comap (fun x => x i) (��[s i] x i)) ⊓
        ⨅ (i) (_ : i ∉ I), comap (fun x => x i) (�� (x i)) := by
  simp only [nhdsWithin, nhds_pi, Filter.pi, pi_def, ← iInf_principal_finite hI, comap_inf,
    comap_principal]
  rw [iInf_split _ fun i => i ∈ I, inf_right_comm]
  simp only [iInf_inf_eq]

theorem nhdsWithin_pi_univ_eq [Finite ι] (s : ∀ i, Set (X i)) (x : ∀ i, X i) :
    ��[pi univ s] x = ⨅ i, comap (fun x => x i) (��[s i] x i) := by
  simpa [nhdsWithin] using nhdsWithin_pi_eq finite_univ s x

theorem nhdsWithin_pi_eq_bot {I : Set ι} {s : ∀ i, Set (X i)} {x : ∀ i, X i} :
    ��[pi I s] x = ⊥ ↔ ∃ i ∈ I, ��[s i] x i = ⊥ := by
  simp only [nhdsWithin, nhds_pi, pi_inf_principal_pi_eq_bot]

theorem nhdsWithin_pi_neBot {I : Set ι} {s : ∀ i, Set (X i)} {x : ∀ i, X i} :
    (��[pi I s] x).NeBot ↔ ∀ i ∈ I, (��[s i] x i).NeBot := by
  simp [neBot_iff, nhdsWithin_pi_eq_bot]

instance instNeBotNhdsWithinUnivPi {s : ∀ i, Set (X i)} {x : ∀ i, X i}
    [∀ i, (��[s i] x i).NeBot] : (��[pi univ s] x).NeBot := by
  simpa [nhdsWithin_pi_neBot]

instance Pi.instNeBotNhdsWithinIio [Nonempty ι] [∀ i, Preorder (X i)] {x : ∀ i, X i}
    [∀ i, (��[<] x i).NeBot] : (��[<] x).NeBot :=
  have : (��[pi univ fun i ↦ Iio (x i)] x).NeBot := inferInstance
  this.mono <| nhdsWithin_mono _ fun _y hy ↦ lt_of_strongLT fun i ↦ hy i trivial

instance Pi.instNeBotNhdsWithinIoi [Nonempty ι] [∀ i, Preorder (X i)] {x : ∀ i, X i}
    [∀ i, (��[>] x i).NeBot] : (��[>] x).NeBot :=
  Pi.instNeBotNhdsWithinIio (X := fun i ↦ (X i)ᵒᵈ) (x := fun i ↦ OrderDual.toDual (x i))

end Pi

theorem Filter.Tendsto.piecewise_nhdsWithin {f g : α → β} {t : Set α} [∀ x, Decidable (x ∈ t)]
    {a : α} {s : Set α} {l : Filter β} (h₀ : Tendsto f (��[s ∩ t] a) l)
    (h₁ : Tendsto g (��[s ∩ tᶜ] a) l) : Tendsto (piecewise t f g) (��[s] a) l := by
  apply Tendsto.piecewise <;> rwa [← nhdsWithin_inter']

theorem Filter.Tendsto.if_nhdsWithin {f g : α → β} {p : α → Prop} [DecidablePred p] {a : α}
    {s : Set α} {l : Filter β} (h₀ : Tendsto f (��[s ∩ { x | p x }] a) l)
    (h₁ : Tendsto g (��[s ∩ { x | ¬p x }] a) l) :
    Tendsto (fun x => if p x then f x else g x) (��[s] a) l :=
  h₀.piecewise_nhdsWithin h₁

theorem map_nhdsWithin (f : α → β) (a : α) (s : Set α) :
    map f (��[s] a) = ⨅ t ∈ { t : Set α | a ∈ t ∧ IsOpen t }, �� (f '' (t ∩ s)) :=
  ((nhdsWithin_basis_open a s).map f).eq_biInf

theorem tendsto_nhdsWithin_mono_left {f : α → β} {a : α} {s t : Set α} {l : Filter β} (hst : s ⊆ t)
    (h : Tendsto f (��[t] a) l) : Tendsto f (��[s] a) l :=
  h.mono_left <| nhdsWithin_mono a hst

theorem tendsto_nhdsWithin_mono_right {f : β → α} {l : Filter β} {a : α} {s t : Set α} (hst : s ⊆ t)
    (h : Tendsto f l (��[s] a)) : Tendsto f l (��[t] a) :=
  h.mono_right (nhdsWithin_mono a hst)

theorem tendsto_nhdsWithin_of_tendsto_nhds {f : α → β} {a : α} {s : Set α} {l : Filter β}
    (h : Tendsto f (�� a) l) : Tendsto f (��[s] a) l :=
  h.mono_left inf_le_left

theorem eventually_mem_of_tendsto_nhdsWithin {f : β → α} {a : α} {s : Set α} {l : Filter β}
    (h : Tendsto f l (��[s] a)) : ∀ᶠ i in l, f i ∈ s := by
  simp_rw [nhdsWithin_eq, tendsto_iInf, mem_ofPred_eq, tendsto_principal, mem_inter_iff,
    eventually_and] at h
  exact (h univ ⟨mem_univ a, isOpen_univ⟩).2

theorem tendsto_nhds_of_tendsto_nhdsWithin {f : β → α} {a : α} {s : Set α} {l : Filter β}
    (h : Tendsto f l (��[s] a)) : Tendsto f l (�� a) :=
  h.mono_right nhdsWithin_le_nhds

theorem nhdsWithin_neBot_of_mem {s : Set α} {x : α} (hx : x ∈ s) : NeBot (��[s] x) :=
  mem_closure_iff_nhdsWithin_neBot.1 <| subset_closure hx

theorem IsClosed.mem_of_nhdsWithin_neBot {s : Set α} (hs : IsClosed s) {x : α}
    (hx : NeBot <| ��[s] x) : x ∈ s :=
  hs.closure_eq ▸ mem_closure_iff_nhdsWithin_neBot.2 hx

theorem DenseRange.nhdsWithin_neBot {ι : Type*} {f : ι → α} (h : DenseRange f) (x : α) :
    NeBot (��[range f] x) :=
  mem_closure_iff_clusterPt.1 (h x)

theorem mem_closure_pi {ι : Type*} {α : ι → Type*} [∀ i, TopologicalSpace (α i)] {I : Set ι}
    {s : ∀ i, Set (α i)} {x : ∀ i, α i} : x ∈ closure (pi I s) ↔ ∀ i ∈ I, x i ∈ closure (s i) := by
  simp only [mem_closure_iff_nhdsWithin_neBot, nhdsWithin_pi_neBot]

theorem closure_pi_set {ι : Type*} {α : ι → Type*} [∀ i, TopologicalSpace (α i)] (I : Set ι)
    (s : ∀ i, Set (α i)) : closure (pi I s) = pi I fun i => closure (s i) :=
  Set.ext fun _ => mem_closure_pi

theorem dense_pi {ι : Type*} {α : ι → Type*} [∀ i, TopologicalSpace (α i)] {s : ∀ i, Set (α i)}
    (I : Set ι) (hs : ∀ i ∈ I, Dense (s i)) : Dense (pi I s) := by
  simp only [dense_iff_closure_eq, closure_pi_set, pi_congr rfl fun i hi => (hs i hi).closure_eq,
    pi_univ]

theorem DenseRange.piMap {ι : Type*} {X Y : ι → Type*} [∀ i, TopologicalSpace (Y i)]
    {f : (i : ι) → (X i) → (Y i)} (hf : ∀ i, DenseRange (f i)) :
    DenseRange (Pi.map f) := by
  rw [DenseRange, Set.range_piMap]
  exact dense_pi Set.univ (fun i _ => hf i)

theorem eventuallyEq_nhdsWithin_iff {f g : α → β} {s : Set α} {a : α} :
    f =ᶠ[��[s] a] g ↔ ∀ᶠ x in �� a, x ∈ s → f x = g x :=
  mem_inf_principal

/-- Two functions agree on a neighborhood of `x` if they agree at `x` and in a punctured
neighborhood. -/

theorem eventuallyEq_nhds_of_eventuallyEq_nhdsNE {f g : α → β} {a : α} (h₁ : f =ᶠ[��[≠] a] g)
    (h₂ : f a = g a) :
    f =ᶠ[�� a] g := by
  filter_upwards [eventually_nhdsWithin_iff.1 h₁]
  grind

theorem eventuallyEq_nhdsWithin_of_eqOn {f g : α → β} {s : Set α} {a : α} (h : EqOn f g s) :
    f =ᶠ[��[s] a] g :=
  mem_inf_of_right h

theorem Set.EqOn.eventuallyEq_nhdsWithin {f g : α → β} {s : Set α} {a : α} (h : EqOn f g s) :
    f =ᶠ[��[s] a] g :=
  eventuallyEq_nhdsWithin_of_eqOn h

theorem tendsto_nhdsWithin_congr {f g : α → β} {s : Set α} {a : α} {l : Filter β}
    (hfg : ∀ x ∈ s, f x = g x) (hf : Tendsto f (��[s] a) l) : Tendsto g (��[s] a) l :=
  (tendsto_congr' <| eventuallyEq_nhdsWithin_of_eqOn hfg).1 hf

theorem eventually_nhdsWithin_of_forall {s : Set α} {a : α} {p : α → Prop} (h : ∀ x ∈ s, p x) :
    ∀ᶠ x in ��[s] a, p x :=
  mem_inf_of_right h

theorem tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within {a : α} {l : Filter β} {s : Set α}
    (f : β → α) (h1 : Tendsto f l (�� a)) (h2 : ∀ᶠ x in l, f x ∈ s) : Tendsto f l (��[s] a) :=
  tendsto_inf.2 ⟨h1, tendsto_principal.2 h2⟩

theorem tendsto_nhdsWithin_iff {a : α} {l : Filter β} {s : Set α} {f : β → α} :
    Tendsto f l (��[s] a) ↔ Tendsto f l (�� a) ∧ ∀ᶠ n in l, f n ∈ s :=
  ⟨fun h => ⟨tendsto_nhds_of_tendsto_nhdsWithin h, eventually_mem_of_tendsto_nhdsWithin h⟩, fun h =>
    tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ h.1 h.2⟩

@[simp]
theorem tendsto_nhdsWithin_range {a : α} {l : Filter β} {f : β → α} :
    Tendsto f l (��[range f] a) ↔ Tendsto f l (�� a) :=
  ⟨fun h => h.mono_right inf_le_left, fun h =>
    tendsto_inf.2 ⟨h, tendsto_principal.2 <| Eventually.of_forall mem_range_self⟩⟩

theorem Filter.EventuallyEq.eq_of_nhdsWithin {s : Set α} {f g : α → β} {a : α} (h : f =ᶠ[��[s] a] g)
    (hmem : a ∈ s) : f a = g a :=
  h.self_of_nhdsWithin hmem

theorem eventually_nhdsWithin_of_eventually_nhds {s : Set α}
    {a : α} {p : α → Prop} (h : ∀ᶠ x in �� a, p x) : ∀ᶠ x in ��[s] a, p x :=
  mem_nhdsWithin_of_mem_nhds h

lemma Set.MapsTo.preimage_mem_nhdsWithin {f : α → β} {s : Set α} {t : Set β} {x : α}
    (hst : MapsTo f s t) : f ⁻¹' t ∈ ��[s] x :=
  Filter.mem_of_superset self_mem_nhdsWithin hst

/-!
### `nhdsWithin` and subtypes
-/


theorem mem_nhdsWithin_subtype {s : Set α} {a : { x // x ∈ s }} {t u : Set { x // x ∈ s }} :
    t ∈ ��[u] a ↔ t ∈ comap ((↑) : s → α) (��[(↑) '' u] a) := by
  rw [nhdsWithin, nhds_subtype, principal_subtype, ← comap_inf, ← nhdsWithin]

theorem nhdsWithin_subtype (s : Set α) (a : { x // x ∈ s }) (t : Set { x // x ∈ s }) :
    ��[t] a = comap ((↑) : s → α) (��[(↑) '' t] a) :=
  Filter.ext fun _ => mem_nhdsWithin_subtype

theorem nhdsWithin_eq_map_subtype_coe {s : Set α} {a : α} (h : a ∈ s) :
    ��[s] a = map ((↑) : s → α) (�� ⟨a, h⟩) :=
  (map_nhds_subtype_val ⟨a, h⟩).symm

theorem mem_nhds_subtype_iff_nhdsWithin {s : Set α} {a : s} {t : Set s} :
    t ∈ �� a ↔ (↑) '' t ∈ ��[s] (a : α) := by
  rw [← map_nhds_subtype_val, image_mem_map_iff Subtype.val_injective]

theorem preimage_coe_mem_nhds_subtype {s t : Set α} {a : s} : (↑) ⁻¹' t ∈ �� a ↔ t ∈ ��[s] ↑a := by
  rw [← map_nhds_subtype_val, mem_map]

theorem eventually_nhds_subtype_iff (s : Set α) (a : s) (P : α → Prop) :
    (∀ᶠ x : s in �� a, P x) ↔ ∀ᶠ x in ��[s] a, P x :=
  preimage_coe_mem_nhds_subtype

theorem frequently_nhds_subtype_iff (s : Set α) (a : s) (P : α → Prop) :
    (∃ᶠ x : s in �� a, P x) ↔ ∃ᶠ x in ��[s] a, P x :=
  eventually_nhds_subtype_iff s a (¬ P ·) |>.not

theorem tendsto_nhdsWithin_iff_subtype {s : Set α} {a : α} (h : a ∈ s) (f : α → β) (l : Filter β) :
    Tendsto f (��[s] a) l ↔ Tendsto (s.domRestrict f) (�� ⟨a, h⟩) l := by
  rw [nhdsWithin_eq_map_subtype_coe h, tendsto_map'_iff]; rfl

theorem tendsto_nhdsWithin_inter_iff_subtype {s t : Set α} {a : α} (h : a ∈ s) (f : α → β)
    (l : Filter β) :
    Tendsto f (��[s ∩ t] a) l ↔ Tendsto (s.domRestrict f) (��[(↑) ⁻¹' t] ⟨a, h⟩) l := by
  rw [nhdsWithin_inter', nhdsWithin_eq_map_subtype_coe h, ← map_inf_principal_preimage,
    tendsto_map'_iff]
  rfl

theorem clusterPt_principal_subtype_iff_frequently {s t : Set α} (hst : s ⊆ t) {J : Set s} {a : s} :
    ClusterPt a (Filter.principal J) ↔ ∃ᶠ x in nhdsWithin a t, ∃ h : x ∈ s, (⟨x, h⟩ : s) ∈ J := by
  rw [nhdsWithin_eq_map_subtype_coe (hst a.prop), Filter.frequently_map,
    clusterPt_principal_iff_frequently,
    Topology.IsInducing.subtypeVal.nhds_eq_comap, Filter.frequently_comap,
    Topology.IsInducing.subtypeVal.nhds_eq_comap, Filter.frequently_comap, Subtype.coe_mk]
  apply frequently_congr
  apply Eventually.of_forall
  intro x
  simp only [SetCoe.exists, exists_and_left, exists_eq_left]
  exact ⟨fun ⟨h, hx⟩ => ⟨hst h, h, hx⟩, fun ⟨_, hx⟩ => hx⟩

/-!
## The `nhdsSetWithin`-filter
-/


variable [TopologicalSpace β]

@[gcongr, mono]
lemma nhdsSetWithin_mono_left {s s' t : Set α} (h : s ⊆ s') : ��ˢ[t] s ≤ ��ˢ[t] s' :=
  inf_le_inf_right _ <| nhdsSet_mono h

@[gcongr, mono]
lemma nhdsSetWithin_mono_right {s t t' : Set α} (h : t ⊆ t') : ��ˢ[t] s ≤ ��ˢ[t'] s :=
  inf_le_inf_left _ <| principal_mono.2 h

lemma nhdsSetWithin_hasBasis {ι : Sort*} {p : ι → Prop} {s' : ι → Set α} {s : Set α}
    (h : (��ˢ s).HasBasis p s') (t : Set α) : (��ˢ[t] s).HasBasis p fun i => s' i ∩ t :=
  h.inf_principal t

lemma nhdsSetWithin_basis_open (s t : Set α) :
    (��ˢ[t] s).HasBasis (fun u => IsOpen u ∧ s ⊆ u) fun u => u ∩ t :=
  nhdsSetWithin_hasBasis (hasBasis_nhdsSet s) t

lemma mem_nhdsSetWithin {s t u : Set α} : u ∈ ��ˢ[t] s ↔ ∃ v, IsOpen v ∧ s ⊆ v ∧ v ∩ t ⊆ u := by
  simpa [and_assoc] using (nhdsSetWithin_basis_open s t).mem_iff

lemma mem_nhdsSetWithin_iff_forall {X : Type*} [TopologicalSpace X] {s t u : Set X} :
    u ∈ ��ˢ[t] s ↔ ∀ x ∈ s, u ∈ ��[t] x := by
  simp [nhdsSetWithin, nhdsSet, nhdsWithin, sSup_image, ← iSup_inf_principal]

@[simp]
lemma nhdsSetWithin_singleton {x : α} {s : Set α} : ��ˢ[s] {x} = ��[s] x := by
  simp [nhdsSetWithin, nhdsWithin]

@[simp]
lemma nhdsSetWithin_univ {s : Set α} : ��ˢ[univ] s = ��ˢ s := by
  simp [nhdsSetWithin]

theorem mem_nhdsSet {s t : Set α} : s ∈ ��ˢ t ↔ ∃ u ⊆ s, IsOpen u ∧ t ⊆ u := by
  simp [← nhdsSetWithin_univ, mem_nhdsSetWithin, and_comm, and_assoc]

@[simp]
lemma nhdsSetWithin_univ' {s : Set α} : ��ˢ[s] univ = �� s := by
  simp [nhdsSetWithin]

@[simp]
lemma nhdsSetWithin_self {s : Set α} : ��ˢ[s] s = �� s := by
  simp [nhdsSetWithin, principal_le_nhdsSet]

lemma nhdsSetWithin_eq_principal_of_subset {s t : Set α} (h : t ⊆ s) : ��ˢ[t] s = �� t := by
  simp [nhdsSetWithin, (principal_mono.2 h).trans principal_le_nhdsSet]

@[simp]
lemma nhdsSetWithin_empty {s : Set α} : ��ˢ[∅] s = ⊥ := by
  simp [nhdsSetWithin]

@[simp]
lemma nhdsSetWithin_empty' {s : Set α} : ��ˢ[s] ∅ = ⊥ := by
  simp [nhdsSetWithin]

lemma principal_inter_le_nhdsSetWithin {s t : Set α} : �� (s ∩ t) ≤ ��ˢ[t] s := by
  simpa [nhdsSetWithin] using inf_le_of_left_le (b := �� t) principal_le_nhdsSet

lemma nhdsSetWithin_prod_le {s s' : Set α} {t t' : Set β} :
    ��ˢ[s' ×ˢ t'] (s ×ˢ t) ≤ ��ˢ[s'] s ×ˢ ��ˢ[t'] t := by
  simpa [nhdsSetWithin, ← prod_inf_prod] using inf_le_of_left_le <| nhdsSet_prod_le _ _

lemma mem_nhdsSet_induced {α β : Type*} {t : TopologicalSpace β} (f : α → β) (s u : Set α) :
    u ∈ @nhdsSet α (t.induced f) s ↔ ∃ v ∈ ��ˢ (f '' s), f ⁻¹' v ⊆ u := by
  let := t.induced f
  simp_rw [mem_nhdsSet_iff_exists, isOpen_induced_iff]
  refine ⟨fun ⟨v, ⟨v', hv'⟩, hv⟩ ↦ ?_, fun ⟨v, ⟨v', hv'⟩, hv⟩ ↦ ?_⟩
  · refine ⟨v', ⟨v', hv'.1, ?_, subset_rfl⟩, hv'.2.trans_subset hv.2⟩
    exact (image_mono hv.1).trans (by simp [hv'])
  · exact ⟨f ⁻¹' v', ⟨v', hv'.1, rfl⟩, image_subset_iff.1 hv'.2.1, (preimage_mono hv'.2.2).trans hv⟩

lemma nhdsSet_induced {α β : Type*} {t : TopologicalSpace β} (f : α → β) (s : Set α) :
    @nhdsSet α (t.induced f) s = comap f (��ˢ (f '' s)) := by
  ext s
  rw [mem_nhdsSet_induced, mem_comap]

lemma map_nhdsSet_induced_eq {α β : Type*} {t : TopologicalSpace β} {f : α → β} (s : Set α) :
    map f (@nhdsSet α (t.induced f) s) = ��ˢ[range f] (f '' s) := by
  rw [nhdsSet_induced, Filter.map_comap, nhdsSetWithin]

lemma Topology.IsInducing.map_nhdsSet_eq {f : α → β} (hf : IsInducing f) (s : Set α) :
    (��ˢ s).map f = ��ˢ[range f] (f '' s) :=
  hf.eq_induced ▸ map_nhdsSet_induced_eq s

lemma map_nhdsSet_subtype_val {s : Set α} (t : Set s) :
    map (↑) (��ˢ t) = ��ˢ[s] ((↑) '' t) := by
  rw [IsInducing.subtypeVal.map_nhdsSet_eq, Subtype.range_val]

lemma mem_nhdsSet_subtype_iff_nhdsSetWithin {s : Set α} {t u : Set s} :
    u ∈ ��ˢ t ↔ (↑) '' u ∈ ��ˢ[s] ((↑) '' t) := by
  rw [← map_nhdsSet_subtype_val, image_mem_map_iff Subtype.val_injective]

Messung
CHZG
8710010095

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.25Angebot  ¤

*Eine klare Vorstellung vom Zielzustand







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,083
#Domains=862,153