Skip to content

Conversation

Jlh18
Copy link
Collaborator

@Jlh18 Jlh18 commented Sep 3, 2025

Lemmas for PR #29283 to prove that Core is the right adjoint to the forgetful functor from Cat to Grpd.

These lemmas are more general than that setting, and need not be stated in the bundled format.


Open in Gitpod

@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Sep 3, 2025
Copy link

github-actions bot commented Sep 3, 2025

PR summary 12fc3dacb3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ coreCompInclusionIso
+ core_comp_inclusion
+ functorToCoreCompLeftIso
+ functorToCoreCompRightIso
+ functorToCoreInclusionIso
+ functorToCore_comp_left
+ functorToCore_comp_right
+ functorToCore_inclusion
+ inclusionCompFunctorToCoreIso
+ inclusion_comp_functorToCore

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 3, 2025
@Jlh18 Jlh18 changed the title feat: naturality lemmas for Core construction feat(CategoryTheory): naturality lemmas for Core construction Sep 3, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 17, 2025
@mathlib4-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Sep 17, 2025
@mathlib4-merge-conflict-bot
Copy link
Collaborator

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Sep 18, 2025
@github-actions github-actions bot added easy < 20s of review time. See the lifecycle page for guidelines. and removed easy < 20s of review time. See the lifecycle page for guidelines. labels Sep 21, 2025
@kex-y kex-y removed their assignment Sep 28, 2025
@hrmacbeth hrmacbeth removed their assignment Sep 29, 2025
@chrisflav chrisflav added the t-category-theory Category theory label Sep 29, 2025
@Jlh18
Copy link
Collaborator Author

Jlh18 commented Sep 29, 2025

+t-category-theory

@Jlh18
Copy link
Collaborator Author

Jlh18 commented Sep 29, 2025

-t-category-theory

1 similar comment
@adomani
Copy link
Collaborator

adomani commented Sep 29, 2025

-t-category-theory

@Jlh18 Jlh18 removed the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Sep 29, 2025

variable {G : Type u₂} [Groupoid.{v₂} G]

lemma functorToCore_comp_left {G' : Type u₃} [Groupoid.{v₃} G'] (H : G ⥤ C) (F : G' ⥤ G) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

For this assertion (and the next two), could you only state this as an isomorphism? (It may be unclear that we actually need equalities of functors here, and in general I would argue that it is better to get the isomorphism first, and then deduce the equality if it is absolutely needed using Functor.ext_of_iso.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am happy to make it an iso, but I definitely also want the equality. This is because I want a 1-adjunction between Grpd and Cat, where this is the right adjoint to the forgetful functor. This allows me to show that Grpd inherits 1-colimits from Cat, as a coreflective subcategory. (see #29282)

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 30, 2025
@Jlh18 Jlh18 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 1, 2025
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 2, 2025
@Jlh18 Jlh18 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 2, 2025
/-- The functor `functorToCore (F ⋙ H)` factors through `functortoCore H`. -/
def functorToCoreCompLeftIso {G' : Type u₃} [Groupoid.{v₃} G'] (H : G ⥤ C) (F : G' ⥤ G) :
functorToCore (F ⋙ H) ≅ F ⋙ functorToCore H :=
NatIso.ofComponents (fun _ ↦ eqToIso _)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
NatIso.ofComponents (fun _ ↦ eqToIso _)
NatIso.ofComponents (fun _ ↦ Iso.refl _)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh sorry I must have misread what you suggested. Fixed now.


/-- The functor `functorToCore (𝟭 G)` is a section of `inclusion G`. -/
def inclusionCompFunctorToCoreIso : inclusion G ⋙ functorToCore (𝟭 G) ≅ 𝟭 (Core G) :=
NatIso.ofComponents (fun _ ↦ eqToIso _)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
NatIso.ofComponents (fun _ ↦ eqToIso _)
NatIso.ofComponents (fun _ ↦ Iso.refl _)

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 3, 2025
@Jlh18 Jlh18 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 3, 2025
```
F.core
Core C ⥤ Core D
includion C ‖ ‖ inclusion D
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
includion C ‖ ‖ inclusion D
inclusion C ‖ ‖ inclusion D

Comment on lines +126 to +128
`Core` is in fact a strict 2-functor,
and this isomorphism is an equality of functors under the hood,
and thus can be promoted to a naturality condition between 1-functors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not think there is a need to give that many comments about this isomorphisms.

Suggested change
`Core` is in fact a strict 2-functor,
and this isomorphism is an equality of functors under the hood,
and thus can be promoted to a naturality condition between 1-functors.

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants