Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functors between (co)cone categories #448

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

t-wissmann
Copy link
Contributor

This adds three functors between cone categories (and cocone categories, respectively). All F₀ and F₁ fields are maps that already have been defined in Categories.Diagram.Co(co)ne.Properties, and thus the Functor definition is places there as well. Unfortunately, using the definition of Cones (and Cocones) requires the import of
Categories.Category.Construction.Cones (and Cocones) in the Cones.Properties module.

For F : Functor J C, the new functors are:

  • Every G : Functor C D lifts to a Functor (Cones F) (Cones (G ∘F F)) and Functor (Cocones F) (Cocones (G ∘F F)) (from Contribution of lemmas about colimits #417)
  • Every G : Functor J′ J lifts to a Functor (Cones F) (Cones (F ∘F G)) and Functor (Cocones F) (Cocones (F ∘F G))
  • Every G : Functor J C and α : NaturalTransformation F G extends to a Functor (Cones F) (Cones G) and Functor (Cocones G) (Cocones F)

In Cocones.Properties, I've restricted the import of Cone.Properties to the four maps that are actually used.

@t-wissmann
Copy link
Contributor Author

Beside the location of the above functors, I also wasn't to certain about the naming scheme for them. I simply took the existing names and replaced Coneˡ and Coconeˡ⇒ etc by Functor, obtaining:

  • F-map-Functorˡ : Functor (Cocones F) (Cocones (G ∘F F))
  • F-map-Functorʳ : Functor (Cocones F) (Cocones (F ∘F G))
  • nat-map-Functor : Functor (Cocones G) (Cocones F)

Copy link
Collaborator

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nitpick, and this is good to go, at least code-wise.

{ F₀ = F-map-Coconeˡ
; F₁ = F-map-Cocone⇒ˡ
; identity = λ {A} → G.identity
; homomorphism = λ {X} {Y} {Z} {f} {g} → G.homomorphism
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here (and everywhere in this PR), can you delete implicits if/when they are not needed please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I've removed all implicit arguments from the lambdas in my commit.

@JacquesCarette
Copy link
Collaborator

On names: I wonder if mapˡ and nat-map would be sufficient? Certainly the F- prefix seems redundant, no?

@t-wissmann
Copy link
Contributor Author

On names: I wonder if mapˡ and nat-map would be sufficient? Certainly the F- prefix seems redundant, no?

I agree; maybe it would still be preferrable to include Cones etc in the name such that no name conflict arises (so far, Cocones.Properties and Cones.Properties don't have any conflicting names). So maybe: map-Conesˡ, map-Coconesˡ, nat-map-Cones?

@JacquesCarette
Copy link
Collaborator

I admit that I was thinking of the usage as having open import Categories.Diagram.Cones as Cones in the header, so that having Cones in the function name doubles things up.

@t-wissmann
Copy link
Contributor Author

t-wissmann commented Jan 27, 2025

I admit that I was thinking of the usage as having open import Categories.Diagram.Cones as Cones in the header, so that having Cones in the function name doubles things up.

Fine for me, too. This would have the advantage of making the order of words canonical (Cones.mapˡ instead of having the dilemma between Cones-mapˡ, map-Conesˡ, mapˡ-Cones).

Edit: so if you want me to rename things to mapˡ etc, just let me know.

This adds three functors between cone categories (and cocone categories,
respectively). All F₀ and F₁ fields are maps that already have been
defined in Categories.Diagram.Co(co)ne.Properties, and thus the Functor
definition is places there as well. Unfortunately, using the definition
of Cones (and Cocones) requires the import of
Categories.Category.Construction.Cones (and Cocones) in the
Cones.Properties module.

For `F : Functor J C`, the new functors are:

  - Every `G : Functor C D` lifts to a `Functor (Cones F) (Cones (G ∘F F))`
    and `Functor (Cocones F) (Cocones (G ∘F F))`
  - Every `G : Functor J′ J` lifts to a `Functor (Cones F) (Cones (F ∘F G))`
    and `Functor (Cocones F) (Cocones (F ∘F G))`
  - Every `G : Functor J C` and `α : NaturalTransformation F G` extends
    to a `Functor (Cones F) (Cones G)` and `Functor (Cocones G) (Cocones F)`

In Cocones.Properties, I've restricted the import of Cone.Properties to
the four maps that are actually used.
@t-wissmann
Copy link
Contributor Author

I've just renamed the functions to mapˡ, nat-map etc. :-)

@t-wissmann
Copy link
Contributor Author

Thanks for approving this PR! Is there anything left that I can (or need to) do?

@JacquesCarette
Copy link
Collaborator

No, I just needed to let the checks run to completion before I could merge (and then I got insanely busy). Merging now.

@JacquesCarette JacquesCarette merged commit 047e7a8 into agda:master Jan 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants