Definition set_rel_weq {X Y : UU} (R₁ R₂ : X → Y → hSet) : (R₁ = R₂) ≃ ∏ (x : X) (y : Y), R₁ x y ≃ R₂ x y := (weqonsecfibers _ _ (λ x, weqonsecfibers _ _ (λ y, UA_for_HLevels 2 _ _) ∘ invweq (weqfunextsec (λ _, hSet) (R₁ x) (R₂ x))) ∘ invweq (weqfunextsec (λ _, Y → hSet) R₁ R₂))%weq.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Categories.HSET.Core. Require Import UniMath.CategoryTheory.TwoSidedDisplayedCats.TwoSidedDispCat. Require Import UniMath.CategoryTheory.TwoSidedDisplayedCats.Isos. Require Import UniMath.CategoryTheory.TwoSidedDisplayedCats.Univalence. Require Import UniMath.CategoryTheory.TwoSidedDisplayedCats.Discrete. Require Import UniMath.CategoryTheory.TwoSidedDisplayedCats.TwoSidedFibration.