Skip to content

[Merged by Bors] - feat (CategoryTheory): Chosen pullbacks#31033

Closed
sinhp wants to merge 83 commits intoleanprover-community:masterfrom
sinhp:lccc-chosen_pullback
Closed

[Merged by Bors] - feat (CategoryTheory): Chosen pullbacks#31033
sinhp wants to merge 83 commits intoleanprover-community:masterfrom
sinhp:lccc-chosen_pullback

Conversation

@sinhp
Copy link
Copy Markdown
Collaborator

@sinhp sinhp commented Oct 28, 2025

We develop a computable implementation of pullbacks, by introducing a new type-class ChosenPullbacksAlong. The non-computable HasPullbacksAlong and HasPullbacks predicates yield instances of ChosenPullbacksAlong (using global choice), but interestingly in the category of types every morphism has chosen pullbacks. Also, we prove that in cartesian monoidal categories, morphisms to the terminal object and the product projections have chosen pullbacks. We prove that ChosenPullbacksAlong has good closure properties, e.g., id, isos have chosen pullbacks, and composition of morphisms with chosen pullbacks have chosen pullbacks.


Open in Gitpod

@github-actions github-actions bot added the t-category-theory Category theory label Oct 28, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 28, 2025

PR summary a29cbe30b7

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.CategoryTheory.LocallyCartesianClosed.ChosenPullbacksAlong (new file) 716

Declarations diff

+ ChosenPullbacks
+ ChosenPullbacksAlong
+ cartesianMonoidalCategoryFst
+ cartesianMonoidalCategorySnd
+ cartesianMonoidalCategoryToUnit
+ chosenPullbacksAlongFst
+ comp
+ condition
+ fst
+ fst'
+ fst'_left
+ hasPullbackAlong
+ hasPullbacks
+ hom_ext
+ id
+ isPullback
+ iso
+ isoInv
+ lift
+ lift_fst
+ lift_snd
+ ofHasPullbacksAlong
+ pullbackComp
+ pullbackId
+ pullbackIsoOverPullback
+ pullbackIsoOverPullback_hom_app_comp_fst
+ pullbackIsoOverPullback_hom_app_comp_snd
+ pullbackIsoOverPullback_inv_app_comp_fst
+ pullbackIsoOverPullback_inv_app_comp_snd
+ pullbackMap
+ pullbackMap_comp
+ pullbackMap_fst
+ pullbackMap_id
+ pullbackMap_snd
+ pullbackObj
+ snd
+ snd'
+ snd'_left

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

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 29, 2025
@edegeltje edegeltje added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 10, 2025
@sinhp sinhp removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 10, 2025
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 11, 2025
sinhp and others added 4 commits November 11, 2025 14:57
…long.lean

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
…long.lean

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
…long.lean

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
…long.lean

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@sinhp sinhp removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 11, 2025
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 11, 2025
@sinhp sinhp removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 11, 2025
@joelriou joelriou changed the title feat (CategoryTheory): Chosen Pullbacks feat (CategoryTheory): Chosen pullbacks Nov 11, 2025
@joelriou
Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Nov 11, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 11, 2025
We develop a computable implementation of pullbacks, by introducing a new type-class `ChosenPullbacksAlong`. The non-computable `HasPullbacksAlong` and `HasPullbacks` predicates yield instances of `ChosenPullbacksAlong` (using global choice), but interestingly in the category of types every morphism has chosen pullbacks. Also, we prove that in cartesian monoidal categories, morphisms to the terminal object and the product projections have chosen pullbacks. We prove that `ChosenPullbacksAlong` has good closure properties, e.g., id, isos have chosen pullbacks, and composition of morphisms with chosen pullbacks have chosen pullbacks.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 11, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat (CategoryTheory): Chosen pullbacks [Merged by Bors] - feat (CategoryTheory): Chosen pullbacks Nov 11, 2025
@mathlib-bors mathlib-bors bot closed this Nov 11, 2025
thorimur pushed a commit to thorimur/mathlib4 that referenced this pull request Nov 16, 2025
We develop a computable implementation of pullbacks, by introducing a new type-class `ChosenPullbacksAlong`. The non-computable `HasPullbacksAlong` and `HasPullbacks` predicates yield instances of `ChosenPullbacksAlong` (using global choice), but interestingly in the category of types every morphism has chosen pullbacks. Also, we prove that in cartesian monoidal categories, morphisms to the terminal object and the product projections have chosen pullbacks. We prove that `ChosenPullbacksAlong` has good closure properties, e.g., id, isos have chosen pullbacks, and composition of morphisms with chosen pullbacks have chosen pullbacks.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants