module Data.Set.Coequaliser.Split where

Split quotientsπŸ”—

Recall that a quotient of a set by an equivalence relation allows us to β€œreplace” the identity type of by the relation by means of a surjection having equivalent to However, depending on the specifics of we may not need to actually take a quotient after all! It may be the case that is equivalent to a particular subset of When this is the case, we say that the quotient is split. This module outlines sufficient conditions for a quotient to split, by appealing to our intuition about normal forms.

record is-split-congruence (R : Congruence A β„“') : Type (level-of A βŠ” β„“') where
  open Congruence R

  field
    has-is-set : is-set A

A normalisation function for an equivalence relation is one that is the identity β€œup to ”, i.e., we have and which respects the relation, in that, if we have then

    normalise : A β†’ A

    represents : βˆ€ x β†’ x ∼ normalise x
    respects   : βˆ€ x y β†’ x ∼ y β†’ normalise x ≑ normalise y

It turns out that this is just enough to asking for a splitting of the quotient map We can define a function sending each to a fibre of the quotient map over it, by induction. At the points of we take the fibre over to be and we have by the first assumption. By the second assumption, this procedure respects the quotient.

  splitting : (x : Congruence.quotient R) β†’ fibre inc x
  splitting (inc x) = record { fst = normalise x ; snd = quot (symᢜ (represents x)) }
  splitting (glue (x , y , r) i) = record
    { fst = respects x y r i
    ; snd = is-prop→pathp (λ i → Coeq.squash (inc (respects x y r i)) (quot r i))
      (quot (symᢜ (represents x))) (quot (symᢜ (represents y))) i
    }
  splitting (squash x y p q i j) = is-set→squarep
    (Ξ» i j β†’ hlevel {T = fibre inc (squash x y p q i j)} 2)
    (Ξ» i β†’ splitting x) (Ξ» i β†’ splitting (p i)) (Ξ» i β†’ splitting (q i)) (Ξ» i β†’ splitting y) i j

Two other consequences of these assumptions are that the normalisation function is literally idempotent, and that it additionally reflects the quotient relation, in that is equivalent to

  normalises : βˆ€ x β†’ normalise (normalise x) ≑ normalise x
  normalises x = respects (normalise x) x (symᢜ (represents x))

  reflects : βˆ€ x y β†’ normalise x ≑ normalise y β†’ x ∼ y
  reflects x y p = represents x βˆ™αΆœ reflᢜ' p βˆ™αΆœ symᢜ (represents y)

Finally, we show that any splitting of the quotient map generates a normalisation procedure in the above sense: if we have a map we define the normalisation procedure to be

split-surjection→is-split-congruence
  : ⦃ _ : H-Level A 2 ⦄ (R : Congruence A β„“)
  β†’ (βˆ€ x β†’ fibre {B = Congruence.quotient R} inc x)
  β†’ is-split-congruence R
split-surjection→is-split-congruence R split = record
  { has-is-set = hlevel 2
  ; normalise  = Ξ» x β†’ split (inc x) .fst
  ; represents = Ξ» x β†’ effective (sym (split (inc x) .snd))
  ; respects   = Ξ» x y p β†’ ap (fst ∘ split) (quot p)
  } where open Congruence R