proposition: Lemma EpisAreSurjective_HSET {A B : HSET} (f: HSET ⟦ A, B ⟧) : isEpi f ≃ issurjective f.
proof: Proof. apply weqimplimpl. - intro epif. apply epiissurjectiontosets; [apply setproperty|]. intros ? ? ? ?. apply toforallpaths. apply epif. now apply funextfun. - intros is_surj_f. intros C g h H. apply funextfun; intro. specialize (is_surj_f x). apply (squash_to_prop is_surj_f); [apply setproperty|]. intro x'. refine (!maponpaths _ (hfiberpr2 _ _ x') @ _). refine (_ @ maponpaths _ (hfiberpr2 _ _ x')). apply toforallpaths in H. apply H. - apply isapropisEpi. apply has_homsets_HSET. - apply isapropissurjective. Qed.
imports: UniMath.Foundations.PartD UniMath.Foundations.Propositions UniMath.Foundations.Sets UniMath.MoreFoundations.Tactics UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Isos UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Monics UniMath.CategoryTheory.Epis UniMath.CategoryTheory.Categories.HSET.Core