Proposition bot_partial_setoid_morphism_eq_id {X : partial_setoid H} (φ : partial_setoid_morphism X bot_partial_setoid) : partial_setoid_comp_morphism φ (bot_partial_setoid_morphism X) = id_partial_setoid_morphism X. Proof. use eq_partial_setoid_morphism. - cbn. use (exists_elim (hyperdoctrine_hyp _)). use weaken_right. simplify_form. use false_elim. use weaken_right. apply hyperdoctrine_hyp. - cbn. use exists_intro. + exact !!. + simplify. use false_elim. pose (x₁ := π₁ (tm_var (X ×h X))). pose (x₂ := π₂ (tm_var (X ×h X))). fold x₁ x₂. use (exists_elim (partial_setoid_mor_hom_exists φ _)). * exact x₁. * exact (partial_setoid_refl_l (hyperdoctrine_hyp _)). * unfold x₁, x₂ ; clear x₁ x₂. rewrite partial_setoid_subst. simplify. cbn. pose (x₁ := π₁ (π₁ (tm_var ((X ×h X) ×h 𝟙)))). pose (x₂ := π₂ (π₁ (tm_var ((X ×h X) ×h 𝟙)))). pose (y := π₂ (tm_var ((X ×h X) ×h 𝟙))). fold x₁ x₂ y. use from_eq_in_bot_partial_setoid. ** exact y. ** exact y. ** use (partial_setoid_mor_cod_defined φ x₁ y). use weaken_right. apply hyperdoctrine_hyp. Qed.
Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Limits.Initial. Require Import UniMath.CategoryTheory.Limits.StrictInitial. 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.