Definition binproducts_partial_setoid (H : first_order_hyperdoctrine) : BinProducts (category_of_partial_setoids H). Proof. intros X Y. use make_BinProduct. - exact (prod_partial_setoid X Y). - exact (partial_setoid_pr1 X Y). - exact (partial_setoid_pr2 X Y). - intros W φ ψ. use make_iscontr. + simple refine (_ ,, _ ,, _). * exact (pair_partial_setoid_morphism φ ψ). * apply pair_partial_setoid_morphism_pr1. * apply pair_partial_setoid_morphism_pr2. + abstract (intros χ ; use subtypePath ; [ intro ; apply isapropdirprod ; apply homset_property | ] ; exact (pair_partial_setoid_morphism_unique _ _ (pr12 χ) (pr22 χ))). Defined.
Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Limits.BinProducts. Require Import UniMath.CategoryTheory.Limits.Preservation. Require Import UniMath.CategoryTheory.Hyperdoctrines.Hyperdoctrine. Require Import UniMath.CategoryTheory.Hyperdoctrines.FirstOrderHyperdoctrine. Require Import UniMath.CategoryTheory.Hyperdoctrines.PartialEqRels.PERs. Require Import UniMath.CategoryTheory.Hyperdoctrines.PartialEqRels.PERMorphisms. Require Import UniMath.CategoryTheory.Hyperdoctrines.PartialEqRels.PERCategory. Require Import UniMath.CategoryTheory.Hyperdoctrines.PartialEqRels.PERConstantObjects.