Section SUBSPACE_TOPOLOGY.
#[local] Opaque "\in".
#[global, program]
Instance Subspace_topology {A : Type} {P : A -> Prop} (TOPOLOGY : topology A) : topology (@sig A P) :=
{ isOpen U := exists O : ensemble A, isOpen O /\ (forall z, proj1_sig z \in O <-> z \in U) }.
Next Obligation.
ii. split.
- exists E.full. done!.
- i. exists (E.unions (bind Os (fun U => fun O => (forall z, proj1_sig z \in O <-> z \in U) /\ isOpen O))). split.
{ eapply unions_in_T. done!. }
{ done!. }
- i. ss!. exists (E.intersection x0 x). split.
{ eapply intersection_in_T; done!. }
{ done!. }
- done!.
Qed.

Lemma proj1_sig_isContinuous {A : Type} {TOPOLOGY : topology A} (P : A -> Prop)
: @isContinuous (@sig A P) A (Subspace_topology TOPOLOGY) TOPOLOGY (@proj1_sig A P).