From ZornsLemma Require Export Filters.
From Topology Require Export TopologicalSpaces Neighborhoods Continuity.
Program Definition neighborhood_filter {X:TopologicalSpace} (x0:point_set X) :
Filter (point_set X) :=
{| filter_family := [N : _ | neighborhood N x0 ] |}.
Next Obligation.
intros.
destruct H as [[U [[]]]], H0 as [[V [[]]]].
constructor.
exists (Intersection U V); split.
- constructor; auto with topology sets.
- red; intros. destruct H5; constructor; auto.
Qed.
Next Obligation.
intros.
destruct H as [[U [[]]]].
red. constructor.
exists U; repeat split; trivial.
auto with sets.
Qed.
Next Obligation.
constructor.
exists Full_set; repeat split; auto with sets topology.
Qed.
Next Obligation.
red; intro.
destruct H as [[U [[]]]].
apply H1 in H0.
destruct H0.
Qed.
Definition filter_limit {X:TopologicalSpace} (F:Filter (point_set X))
(x0:point_set X) : Prop :=
Included (filter_family (neighborhood_filter x0))
(filter_family F).
Definition filter_cluster_point {X:TopologicalSpace}
(F:Filter (point_set X)) (x0:point_set X) : Prop :=
forall S:Ensemble (point_set X), In (filter_family F) S ->
In (closure S) x0.

Lemma ultrafilter_cluster_point_is_limit: forall {X:TopologicalSpace}
(F:Filter (point_set X)) (x0:point_set X),
filter_cluster_point F x0 -> ultrafilter F ->
filter_limit F x0.