Library UniMath.CategoryTheory.DisplayedCats.Constructions.FullSubcategory

1. The construction of the full subcategory as a displayed category

2. Univalence


Lemma disp_full_sub_univalent (C : category) (P : C UU) :
  ( x : C, isaprop (P x))
  is_univalent_disp (disp_full_sub C P).
Show proof.
  intro HP.
  apply is_univalent_disp_from_fibers.
  intros x xx xx'. cbn in *.
  apply isweqcontrprop. apply HP.
  apply isofhleveltotal2.
  - apply isapropunit.
  - intro. apply (@isaprop_is_z_iso_disp _ (disp_full_sub C P)).

3. Shortcuts for just the resulting total category

4. The truncation functor

Section TruncationFunctor.

  Context {C : category}.
  Context (P : C UU).

  Definition disp_truncation_functor
    : disp_functor
      (functor_identity C)
      (disp_full_sub C P)
      (disp_full_sub C (λ X, P X )).
  Show proof.
    use tpair.
    - use tpair.
      + exact (λ X, hinhpr).
      + exact (λ X Y HX HY f, idfun unit).
    - abstract easy.

  Definition truncation_functor
    : full_subcat C P full_subcat C (λ X, P X )
    := total_functor disp_truncation_functor.

  Lemma truncation_functor_fully_faithful
    : fully_faithful truncation_functor.
  Show proof.
    intros X Y.
    apply idisweq.

  Lemma truncation_functor_essentially_surjective
    : essentially_surjective truncation_functor.
  Show proof.
    intro X.
    refine (hinhfun _ (pr2 X)).
    intro HX.
    exists (pr1 X ,, HX).
    apply (weq_ff_functor_on_z_iso (full_subcat_pr1_fully_faithful _ _)).
    apply identity_z_iso.

End TruncationFunctor.