Skip to content

feat(CategoryTheory/Presentable): the representation theorem - #30847

Draft
joelriou wants to merge 479 commits into
leanprover-community:masterfrom
joelriou:representation-theorem
Draft

joelriou wants to merge 479 commits into
leanprover-community:masterfrom
joelriou:representation-theorem

Conversation

@joelriou

@joelriou joelriou commented Oct 24, 2025 •

Copy link
Copy Markdown
Contributor

If C is an essentially w-small category, then the category of κ-continuous functors Cᵒᵖ ⥤ Type w is locally κ-presentable, and any locally κ-presentable category is equivalent to such a category. In particular, we show that a locally κ-presentable category has limits.

This is a draft...


Open in Gitpod

@joelriou joelriou added WIP Work in progress t-category-theory Category theory labels Oct 24, 2025
@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Oct 24, 2025
@github-actions

github-actions Bot commented Oct 24, 2025 •

Copy link
Copy Markdown

PR summary 50fd6b3413

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.CategoryTheory.Presentable.Continuous (new file) 1192
Mathlib.CategoryTheory.Presentable.Representation (new file) 1197

Declarations diff (regex)

+ _root_.CategoryTheory.Equivalence.shrinkYonedaIsoConjugateYoneda
+ costructuredArrowUliftYonedaEquiv
+ costructuredArrowYonedaEquiv
+ essentiallySmall'
+ exists_presentation_of_isCardinalContinuous
+ hasFiniteLimits
+ hasLimitsOfSize
+ instance (F : Cᵒᵖ ⥤ Type w) :
+ instance (J : Type w) [SmallCategory J] :
+ instance (X : C) :
+ instance (X : C) [IsCardinalPresentable X κ] :
+ instance (κ : Cardinal.{w}) :
+ instance :
+ instance : (isCardinalContinuous C (Type w) κ).ι.IsRightAdjoint := by
+ instance : (isCardinalContinuous Cᵒᵖ (Type w) κ).ι.IsRightAdjoint := by
+ instance : (restrictedShrinkYoneda.{w} F).Faithful := by
+ instance : (restrictedShrinkYoneda.{w} F).Full := by
+ instance : (toCardinalContinuous C κ).EssSurj
+ instance : (toCardinalContinuous C κ).Faithful := by
+ instance : (toCardinalContinuous C κ).Full := by
+ instance : (toCardinalContinuous C κ).IsEquivalence
+ instance : HasLimitsOfSize.{w, w} (isCardinalContinuous Cᵒᵖ (Type w) κ).FullSubcategory := by
+ instance : IsCardinalLocallyPresentable
+ instance : IsCardinalLocallyPresentable (isCardinalContinuous C (Type w) κ).FullSubcategory κ
+ instance : IsLocallyPresentable.{w} (isCardinalContinuous C (Type w) κ).FullSubcategory
+ instance [IsLocallyPresentable.{w} C] : HasColimitsOfSize.{w, w} C := by
+ instance {X : C} {P : Cᵒᵖ ⥤ Type w} :
+ isCardinalContinuous
+ isCardinalContinuous.preservesColimitsOfShape
+ isCardinalContinuousCongrLeft
+ isCardinalContinuousMorphismProperty
+ isCardinalContinuous_eq_isLocal
+ isCardinalContinuous_iff
+ isCardinalContinuous_precomp_iff
+ isCardinalFiltered_costructuredArrow_shrinkYoneda
+ isCardinalFiltered_costructuredArrow_yoneda
+ isCardinalPresentable_isCardinalContinuousMorphismProperty_src_tgt
+ isColimitTautologicalCoconeShrink
+ isColimitTautologicalCoconeShrinkEvaluation
+ restrictedShrinkYoneda
+ restrictedShrinkYonedaCompULiftIso
+ shrinkYonedaCompWhiskeringRightUliftFunctorIso
+ shrinkYonedaEquiv_symm_comp
+ shrinkYonedaFlipObjCompUliftFunctorIso
+ shrinkYonedaIso
+ shrinkYonedaIso_hom
+ shrinkYonedaMap
+ tautologicalCoconeShrink
+ toCardinalContinuous
+ toCardinalContinuousCompIso
+ toCardinalContinuousEquivalence
+ whiskeringLeftObjCompWhiskeringRightObj
++ congr
++ instance (C : Type u) [Category.{v} C] [IsLocallyPresentable.{w} C] :
++ instance (J : SmallCategoryCardinalLT κ)
++ ι

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean -- pending)

Computed after the build finishes.


Decrease in strong tech debt: (relative, absolute) = (2.95, 0.02)
Current number Change Type (strong)
backward.defeqAttrib.useBackward 4252 -46
backward.isDefEq.respectTransparency 4868 13
backward.isDefEq.respectTransparency.types 2493 -12
erw 498 1
adaptation notes 376 -2
Increase in weak tech debt: (relative, absolute) = (2.00, 0.00)
Current number Change Type (weak)
exposed public sections 5032 2

Current commit 50fd6b3413
Reference commit 58e016c6f6

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

@mathlib-merge-conflicts mathlib-merge-conflicts 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 Jul 16, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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 Jul 16, 2026
@github-actions github-actions Bot added the tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip label Aug 11, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts 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 Aug 12, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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 Aug 15, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts 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 Aug 29, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Aug 29, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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

@joneugster
joneugster marked this pull request as draft September 19, 2026 16:44
@mathlib-bors

mathlib-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-category-theory Category theory tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants