jwiegley / category-theory

An axiom-free formalization of category theory in Coq for personal study and practical work
BSD 3-Clause "New" or "Revised" License
748 stars 69 forks source link

Definition of full is nonstandard #118

Open patrick-nicodemus opened 1 year ago

patrick-nicodemus commented 1 year ago

From Theory/Functor.v -

Class Full `(F : C ⟶ D) := {
  prefmap {x y} (g : F x ~> F y) : x ~> y;

  prefmap_respects {x y} : Proper (equiv ==> equiv) (@prefmap x y);

  prefmap_id : ∀ x, @prefmap x x id ≈ id;
  prefmap_comp : ∀ x y z (f : F y ~> F z) (g : F x ~> F y),
    prefmap (f ∘ g) ≈ prefmap f ∘ prefmap g;

  fmap_sur {x y} (g : F x ~> F y) : fmap[F] (prefmap g) ≈ g
}.

This definition of 'full' is nonstandard. Do you have a motivation/justification for this choice of definition?

I would advocate instead

Class Full `(F : C ⟶ D) := {
  prefmap {x y} (g : F x ~> F y) : x ~> y;
  fmap_sur {x y} (g : F x ~> F y) : fmap[F] (prefmap g) ≈ g
}.

Or for modularity, define what it means for a map of setoids to be surjective and use that definition.

The question of whether prefmap should respect equality is more an issue of constructive mathematics than of category theory but in Bishop-style constructive math you do not require existence to respect equality.

jwiegley commented 1 year ago

So we're just dropping the functoriality? I think that makes sense, as I cannot recall why I originally added that to the definition. I concur with your assessment.