Lemma TopologyFromNeighborhood_correct {X : hSet} (N : X → (X → hProp) → hProp) (H : isNeighborhood N) : ∏ (x : X) (P : X → hProp), N x P <-> neighborhood (T := TopologyFromNeighborhood N H) x P. Proof. split. - intros Hx. apply hinhpr. simple refine (tpair _ _ _). + simple refine (tpair _ _ _). * intros y. apply (N y P). * simpl ; intros y Hy. generalize (pr2 (pr2 (pr2 (pr2 H))) _ _ Hy). apply hinhuniv. intros Q. apply (pr1 H) with (2 := pr1 (pr2 Q)). exact (pr2 (pr2 Q)). + split ; simpl. * exact Hx. * intros y. now apply (pr1 (pr2 (pr2 (pr2 H)))). - apply hinhuniv. intros O. apply (pr1 H) with (pr1 (pr1 O)). + apply (pr2 (pr2 O)). + simple refine (pr2 (pr1 O) _ _). exact (pr1 (pr2 O)). Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.ConstructiveStructures. Section TopologyFromNeighborhood. End TopologyFromNeighborhood. Definition TopologyFromNeighborhood {X : hSet} Lemma TopologyFromNeighborhood_correct {X : hSet} N x P <-> neighborhood (T := TopologyFromNeighborhood N H) x P. simple refine (TopologyFromNeighborhood _ _). apply TopologyFromNeighborhood_correct. simple refine (TopologyFromNeighborhood _ _). apply TopologyFromNeighborhood_correct. simple refine (TopologyFromNeighborhood _ _).