Proposition exp_partial_setoid_eq_sym {Γ : ty H} {Δ : form Γ} {f g : tm Γ (ℙ (X ×h Y))} (p : Δ ⊢ exp_partial_setoid_eq [ ⟨ f , g ⟩ ]) : Δ ⊢ exp_partial_setoid_eq [ ⟨ g , f ⟩ ]. Proof. refine (hyperdoctrine_cut p _). unfold exp_partial_setoid_eq. simplify. do 2 use forall_intro. simplify. pose (γ := π₁ (π₁ (tm_var ((Γ ×h X) ×h Y)))). pose (x := π₂ (π₁ (tm_var ((Γ ×h X) ×h Y)))). pose (y := π₂ (tm_var ((Γ ×h X) ×h Y))). fold γ x y. simple refine (hyperdoctrine_cut (forall_elim (hyperdoctrine_hyp _) x) _). simplify_form. simple refine (hyperdoctrine_cut (forall_elim (hyperdoctrine_hyp _) y) _). simplify. fold γ. use iff_sym. apply hyperdoctrine_hyp. Qed.
Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Hyperdoctrines.Hyperdoctrine. Require Import UniMath.CategoryTheory.Hyperdoctrines.FirstOrderHyperdoctrine. Require Import UniMath.CategoryTheory.Hyperdoctrines.Tripos. Require Import UniMath.CategoryTheory.Hyperdoctrines.GenericPredicate. Require Import UniMath.CategoryTheory.Hyperdoctrines.PartialEqRels.PERs. Require Import UniMath.CategoryTheory.Hyperdoctrines.PartialEqRels.PERMorphisms.