Lemma topologysubtype_neighborhood : ∏ (x : ∑ x : T, dom x) (P : (∑ x0 : T, dom x0) → hProp), topologysubtype x P → ∃ Q : (∑ x0 : T, dom x0) → hProp, topologysubtype x Q × (∏ y : ∑ x0 : T, dom x0, Q y → topologysubtype y P). Proof. intros x A. apply hinhfun. intros B. exists (λ y : ∑ x : T, dom x, pr1 B (pr1 y)). split. - apply hinhpr. exists (pr1 B). split. + exact (pr1 (pr2 B)). + intros. assumption. - intros y By. apply hinhpr. exists (pr1 B). repeat split. + exact By. + exact (pr2 (pr1 (pr2 B))). + exact (pr2 (pr2 B)). 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 _ _).