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

feat(CategoryTheory): infer connectedness of comma categories from finality/initiality of the functor #19889

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

javra
Copy link
Collaborator

@javra javra commented Dec 11, 2024


Open in Gitpod

Copy link

github-actions bot commented Dec 11, 2024

PR summary be7d5c8b12

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.CategoryTheory.Comma.Final 580 582 +2 (+0.34%)
Import changes for all files
Files Import difference
Mathlib.CategoryTheory.Comma.Final 2

Declarations diff

+ isConnected_comma_of_final
+ isConnected_comma_of_initial
+ isConnected_iff_isConnected_op
+ isConnected_iff_of_initial

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).

@github-actions github-actions bot added the t-category-theory Category theory label Dec 11, 2024
@javra javra requested review from TwoFX and joelriou December 11, 2024 12:51
Comment on lines 118 to 125
theorem isConnected_iff_of_final (F : C ⥤ D) [F.Final] : IsConnected C ↔ IsConnected D := by
rw [isConnected_iff_colimit_constPUnitFunctor_iso_pUnit.{max v u v₂ u₂} C,
isConnected_iff_colimit_constPUnitFunctor_iso_pUnit.{max v u v₂ u₂} D]
exact Equiv.nonempty_congr <| Iso.isoCongrLeft <|
CategoryTheory.Functor.Final.colimitIso F <| constPUnitFunctor.{max u v u₂ v₂} D

/-- The domain of an initial functor is connected if and only if its codomain is connected. -/
theorem isConnected_iff_of_initial (F : C ⥤ D) [F.Initial] : IsConnected C ↔ IsConnected D := by
Copy link
Member

Choose a reason for hiding this comment

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

The namespacing here is clearly an oversight, would you mind moving these out of the Types namespace? CategoryTheory.Functor is probably the right destination.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could also put those into a new file, wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-category-theory Category theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants