Definition closed (D : T -> Prop) :=
  forall x, not (locally x (fun x : T => not (D x))) -> D x.

(* Specifications: *)
Lemma open_not : forall D : T -> Prop, closed D -> open (fun x => not (D x)).
Lemma closed_not : forall D : T -> Prop, open D -> closed (fun x => not (D x)).
Lemma closed_ext : forall D E : T -> Prop, (forall x, D x <-> E x) -> closed D -> closed E.
Lemma closed_and : forall D E : T -> Prop, closed D -> closed E -> closed (fun x => D x /\ E x).
Lemma closed_true : closed (fun x : T => True).
Lemma closed_false : closed (fun x : T => False).
Lemma closed_comp : forall {T U : UniformSpace} (f : T -> U) (D : U -> Prop), (forall x, filterlim f (locally x) (locally (f x))) -> closed D -> closed (fun x : T => D (f x)).
Lemma closed_filterlim_loc : forall {T} {U : UniformSpace} {F} {FF : ProperFilter' F} (f : T -> U) (D : U -> Prop), forall y, filterlim f F (locally y) -> F (fun x => D (f x)) -> closed D -> D y.
Lemma closed_filterlim : forall {T} {U : UniformSpace} {F} {FF : ProperFilter' F} (f : T -> U) (D : U -> Prop), forall y, filterlim f F (locally y) -> (forall x, D (f x)) -> closed D -> D y.